:root {
  --purple: #a855f7;
  --purple-dark: #7c3aed;
  --purple-light: #c084fc;
  --black: #0a0a0f;
  --black-light: #1a1a2e;
  --text: #ffffff;
  --text-gray: #a1a1aa;
  --accent: #f97316;
}

* { 
  box-sizing: border-box; 
  margin: 0; 
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

html, body { 
  height: 100%;
  /* Убираем отскок на iOS */
  position: fixed;
  overflow: hidden;
  width: 100%;
}

html {
  scroll-behavior: smooth;
}

body > * {
  position: relative;
}

.container {
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  max-width: 720px;
  margin: 0 auto;
  padding: 20px 20px 120px 20px;
  position: relative;
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--text);
  background: linear-gradient(135deg, #0a0a0f 0%, #1a1a2e 50%, #0f0a1f 100%);
  background-attachment: fixed;
  overflow-x: hidden;
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
  overscroll-behavior: none;
  -webkit-overflow-scrolling: touch;
  /* Убираем подсветку при тапе на мобильных */
  -webkit-tap-highlight-color: transparent;
}


/* App Header with Logo */
.app-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  margin-top: 7px;
  padding: 0;
  background: transparent;
  border: none;
  position: relative;
  overflow: visible;
}

/* Контейнер логотипа с иконками */
.logo-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.app-logo {
  position: relative;
  width: 110px;
  height: 110px;
  flex-shrink: 0;
}

.logo-icon {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 4px 12px rgba(168, 85, 247, 0.5));
}

/* ========================================= */
/* СУПЕР-ПЛАВНЫЕ АНИМАЦИИ (без лагов, 60 FPS) */
/* ========================================= */

/* Анимация фона логотипа (фиолетовый круг) */
.logo-bg {
  animation: logoRotate 20s linear infinite, logoPulse 4s ease-in-out infinite;
  transform-origin: 50% 50%;
  will-change: transform;
  /* Аппаратное ускорение */
  transform: translateZ(0);
  backface-visibility: hidden;
  perspective: 1000px;
}

@keyframes logoRotate {
  0% {
    transform: rotate(0deg) translateZ(0);
  }
  100% {
    transform: rotate(360deg) translateZ(0);
  }
}

@keyframes logoPulse {
  0%, 100% {
    opacity: 0.95;
  }
  50% {
    opacity: 0.85;
  }
}

/* Анимация окантовки текста SF - СТАТИЧНАЯ (без лагов) */
.logo-text-stroke {
  transform: translateZ(0);
  backface-visibility: hidden;
}

/* Анимация текста SF - ТОЛЬКО СВЕЧЕНИЕ (плавно) */
.logo-text {
  animation: textGlow 4s ease-in-out infinite;
  transform: translateZ(0);
  backface-visibility: hidden;
}

@keyframes textGlow {
  0%, 100% {
    filter: url(#glow) drop-shadow(0 2px 8px rgba(168, 85, 247, 0.7));
  }
  50% {
    filter: url(#glow) drop-shadow(0 4px 16px rgba(168, 85, 247, 0.9));
  }
}

/* Анимация пульсирующего кольца */
.logo-pulse {
  animation: pulse 3s ease-in-out infinite;
  transform-origin: 50% 50%;
  will-change: opacity;
}

@keyframes pulse {
  0%, 100% {
    r: 42;
    opacity: 0.4;
    stroke-width: 2;
  }
  50% {
    r: 46;
    opacity: 0.1;
    stroke-width: 1.5;
  }
}

/* Оптимизация для мобильных устройств */
@media (max-width: 768px) {
  .logo-bg {
    animation: logoRotate 25s linear infinite, logoPulse 4s ease-in-out infinite;
  }
  
  .logo-text,
  .logo-text-stroke {
    animation: textFloat 4s ease-in-out infinite;
  }
  
  .logo-pulse {
    animation: pulse 4s ease-in-out infinite;
  }
  
  /* Убираем свечение на мобильных для производительности */
  .logo-text {
    animation: textFloat 4s ease-in-out infinite;
  }
}

/* Плавность для устройств с низкой производительностью */
@media (prefers-reduced-motion: reduce) {
  .logo-bg,
  .logo-text,
  .logo-text-stroke,
  .logo-pulse {
    animation: none !important;
  }
  
  .logo-bg {
    opacity: 0.95;
    transform: none;
  }
  
  .logo-text,
  .logo-text-stroke {
    transform: none;
  }
}

/* Дополнительная оптимизация GPU */
.logo-icon * {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ======================================== */
/* Вылетающие иконки соцсетей */
/* ======================================== */

.social-icons {
  position: absolute;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.social-icon {
  position: absolute;
  width: 24px;
  height: 24px;
  opacity: 0;
  animation-fill-mode: forwards;
  will-change: transform, opacity;
  transform: translateZ(0);
  backface-visibility: hidden;
}

.social-icon svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 2px 8px rgba(168, 85, 247, 0.6));
}

.youtube-icon {
  top: 50%;
  left: -40px;
  color: #FF0000;
  animation: flyOutLeft 4s ease-in-out infinite;
}

.instagram-icon {
  top: 50%;
  right: -40px;
  color: #E4405F;
  animation: flyOutRight 4s ease-in-out infinite;
}

@keyframes flyOutLeft {
  0%, 100% {
    transform: translate3d(0, -50%, 0) scale(0.8);
    opacity: 0;
  }
  20% {
    transform: translate3d(-15px, -50%, 0) scale(1);
    opacity: 1;
  }
  40% {
    transform: translate3d(-25px, -50%, 0) scale(1);
    opacity: 0.8;
  }
  60% {
    transform: translate3d(-15px, -50%, 0) scale(1);
    opacity: 1;
  }
  80% {
    transform: translate3d(0, -50%, 0) scale(0.8);
    opacity: 0;
  }
}

@keyframes flyOutRight {
  0%, 100% {
    transform: translate3d(0, -50%, 0) scale(0.8);
    opacity: 0;
  }
  20% {
    transform: translate3d(15px, -50%, 0) scale(1);
    opacity: 1;
  }
  40% {
    transform: translate3d(25px, -50%, 0) scale(1);
    opacity: 0.8;
  }
  60% {
    transform: translate3d(15px, -50%, 0) scale(1);
    opacity: 1;
  }
  80% {
    transform: translate3d(0, -50%, 0) scale(0.8);
    opacity: 0;
  }
}

/* ======================================== */
/* Текст обводкой ближе к логотипу */
/* ======================================== */

.app-title {
  text-align: center;
  width: 100%;
  margin-top: -10px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Подзаголовок под логотипом */
.app-subtitle {
  text-align: center;
  width: 100%;
  margin-top: 8px;
}

.app-subtitle p {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-gray);
  line-height: 1.5;
  background: linear-gradient(135deg, #c084fc 0%, #a855f7 50%, #7c3aed 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0;
}

/* Кнопка помощи AI (компактная) */
.ai-help-button {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), var(--purple-dark));
  border: none;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  box-shadow: 0 8px 24px rgba(168, 85, 247, 0.5);
  z-index: 9999;
  font-size: 28px;
  -webkit-tap-highlight-color: transparent;
}

.ai-help-button:hover {
  transform: scale(1.1) rotate(10deg);
  box-shadow: 0 12px 32px rgba(168, 85, 247, 0.7);
}

.ai-help-button:active {
  transform: scale(0.95);
}

.ai-help-button.active {
  background: linear-gradient(135deg, var(--purple-dark), var(--purple));
}

.title-main {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 1px;
  text-transform: uppercase;
  display: block;
  /* Центр по логотипу + 7px вправо (-6px + 13px = 7px) */
  transform: translateX(7px);
  /* Обводка: прозрачная заливка + фиолетовая окантовка */
  color: transparent;
  -webkit-text-stroke: 2px #a855f7;
  text-stroke: 2px #a855f7;
  /* Дополнительная тень для объема */
  text-shadow: 
    0 0 10px rgba(168, 85, 247, 0.3),
    0 0 20px rgba(168, 85, 247, 0.2),
    2px 2px 4px rgba(0, 0, 0, 0.8);
  animation: outlineGlow 6s ease-in-out infinite;
  filter: drop-shadow(0 2px 8px rgba(168, 85, 247, 0.3));
}


@keyframes outlineGlow {
  0%, 100% {
    -webkit-text-stroke: 2px #a855f7;
    text-shadow: 
      0 0 10px rgba(168, 85, 247, 0.3),
      0 0 20px rgba(168, 85, 247, 0.2),
      2px 2px 4px rgba(0, 0, 0, 0.8);
  }
  50% {
    -webkit-text-stroke: 2px #b975f8;
    text-shadow: 
      0 0 15px rgba(185, 117, 248, 0.4),
      0 0 25px rgba(185, 117, 248, 0.3),
      2px 2px 4px rgba(0, 0, 0, 0.8);
  }
}

h1 { 
  margin: 0 0 8px; 
  font-size: 32px; 
  font-weight: 800;
  background: linear-gradient(135deg, var(--purple-light) 0%, var(--purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

h2 {
  font-size: 20px;
  font-weight: 700;
  margin: 24px 0 12px;
  color: var(--text);
}

h3 { 
  margin: 16px 0 12px; 
  font-size: 18px; 
  font-weight: 600;
  color: var(--purple-light); 
}

p { margin: 0 0 12px; color: var(--text-gray); line-height: 1.6; }

hr {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--purple), transparent);
  opacity: 0.3;
  margin: 24px 0;
}

.status-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.1) 0%, rgba(124, 58, 237, 0.05) 100%);
  border: 2px solid rgba(168, 85, 247, 0.3);
  border-radius: 20px;
  margin-bottom: 16px;
  font-weight: 600;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(168, 85, 247, 0.2);
  transition: all 0.3s ease;
}

.status-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(168, 85, 247, 0.3);
  border-color: var(--purple);
}

.status-indicator {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #555;
  position: relative;
}

.status-indicator.active { 
  background: var(--purple); 
  animation: pulse-glow 2s infinite;
  box-shadow: 0 0 20px var(--purple);
}

.status-indicator.inactive { 
  background: #444;
}

@keyframes pulse-glow {
  0%, 100% { 
    opacity: 1; 
    box-shadow: 0 0 20px var(--purple);
  }
  50% { 
    opacity: 0.6; 
    box-shadow: 0 0 10px var(--purple);
  }
}

.subscription-info {
  padding: 16px;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.15) 0%, rgba(124, 58, 237, 0.1) 100%);
  border-radius: 16px;
  font-size: 14px;
  border: 1px solid rgba(168, 85, 247, 0.2);
  backdrop-filter: blur(10px);
}

#mainActions {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 24px 0;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 24px;
  border-radius: 16px;
  border: none;
  cursor: pointer;
  font-weight: 700;
  font-size: 16px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  color: var(--text);
  -webkit-tap-highlight-color: transparent;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s;
}

.btn:hover::before {
  left: 100%;
}

.btn-primary { 
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.3) 0%, rgba(124, 58, 237, 0.3) 100%);
  border: 2px solid var(--purple);
  box-shadow: 0 4px 20px rgba(168, 85, 247, 0.3);
}

.btn-success { 
  background: linear-gradient(135deg, var(--purple) 0%, var(--purple-dark) 100%);
  box-shadow: 0 8px 30px rgba(168, 85, 247, 0.4);
}

.btn-outline { 
  background: rgba(26, 26, 46, 0.5);
  border: 2px solid var(--purple);
  backdrop-filter: blur(10px);
}

.btn:hover { 
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 12px 40px rgba(168, 85, 247, 0.5);
}

.btn:active { 
  transform: translateY(-1px) scale(0.98);
}

.btn:disabled { 
  opacity: 0.4; 
  cursor: not-allowed; 
  transform: none; 
}

.btn:disabled:hover {
  transform: none;
  box-shadow: none;
}

.locations {
  margin-top: 32px;
}

.location-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.location-item {
  padding: 16px;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.1) 0%, rgba(26, 26, 46, 0.5) 100%);
  border: 2px solid rgba(168, 85, 247, 0.3);
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  font-weight: 600;
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.location-item::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.1) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s;
}

.location-item:hover::before {
  opacity: 1;
}

.location-item:hover {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.2) 0%, rgba(26, 26, 46, 0.7) 100%);
  border-color: var(--purple);
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 8px 30px rgba(168, 85, 247, 0.4);
}

.help-section {
  margin-top: 32px;
}

details {
  padding: 16px;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.05) 0%, rgba(26, 26, 46, 0.3) 100%);
  border: 1px solid rgba(168, 85, 247, 0.2);
  border-radius: 16px;
  margin-bottom: 12px;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

details:hover {
  border-color: var(--purple);
  box-shadow: 0 4px 20px rgba(168, 85, 247, 0.2);
}

summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--purple-light);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

summary::before {
  content: '▶';
  transition: transform 0.3s;
  color: var(--purple);
}

details[open] summary::before {
  transform: rotate(90deg);
}

details[open] summary {
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(168, 85, 247, 0.2);
}

/* News Feed */
.news-feed {
  margin-top: 32px;
}

.news-feed-title {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 20px;
  text-align: center;
  background: linear-gradient(135deg, #c084fc 0%, #a855f7 50%, #7c3aed 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
}

.news-item {
  padding: 20px;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.1) 0%, rgba(26, 26, 46, 0.5) 100%);
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: 20px;
  margin-bottom: 16px;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.news-item::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 150px;
  height: 150px;
  background-image: 
    radial-gradient(circle at 20% 20%, rgba(168, 85, 247, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(168, 85, 247, 0.1) 0%, transparent 50%);
  opacity: 0.6;
  pointer-events: none;
  z-index: 0;
}

/* Фоновые схематичные рисунки для новостей */
.news-item-servers::after {
  content: '';
  position: absolute;
  top: 5px;
  right: 5px;
  width: 150px;
  height: 150px;
  background-image: 
    url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 150 150"><defs><radialGradient id="bgFade" cx="50%25" cy="50%25" r="50%25"><stop offset="0%25" stop-color="white" stop-opacity="0.5"/><stop offset="50%25" stop-color="white" stop-opacity="0.3"/><stop offset="100%25" stop-color="white" stop-opacity="0"/></radialGradient><radialGradient id="crossFade" cx="50%25" cy="50%25" r="50%25"><stop offset="0%25" stop-color="%23003580" stop-opacity="0.6"/><stop offset="60%25" stop-color="%23003580" stop-opacity="0.35"/><stop offset="100%25" stop-color="%23003580" stop-opacity="0"/></radialGradient><mask id="softMask"><circle cx="75" cy="75" r="75" fill="url(%23bgFade)"/></mask></defs><g mask="url(%23softMask)"><rect width="150" height="150" fill="url(%23bgFade)"/><rect x="0" y="58" width="150" height="34" fill="url(%23crossFade)"/><rect x="58" y="0" width="34" height="150" fill="url(%23crossFade)"/><g transform="translate(20, 20)"><rect x="0" y="0" width="28" height="8" rx="2" fill="rgba(34,197,94,0.4)"/><rect x="0" y="11" width="28" height="8" rx="2" fill="rgba(34,197,94,0.38)"/><rect x="0" y="22" width="28" height="8" rx="2" fill="rgba(34,197,94,0.35)"/><circle cx="5" cy="4" r="1.5" fill="rgba(34,197,94,0.6)"/><circle cx="5" cy="15" r="1.5" fill="rgba(34,197,94,0.6)"/><circle cx="5" cy="26" r="1.5" fill="rgba(34,197,94,0.6)"/></g><g transform="translate(102, 20)"><rect x="0" y="0" width="28" height="8" rx="2" fill="rgba(34,197,94,0.4)"/><rect x="0" y="11" width="28" height="8" rx="2" fill="rgba(34,197,94,0.38)"/><rect x="0" y="22" width="28" height="8" rx="2" fill="rgba(34,197,94,0.35)"/><circle cx="5" cy="4" r="1.5" fill="rgba(34,197,94,0.6)"/><circle cx="5" cy="15" r="1.5" fill="rgba(34,197,94,0.6)"/><circle cx="5" cy="26" r="1.5" fill="rgba(34,197,94,0.6)"/></g><g transform="translate(61, 102)"><rect x="0" y="0" width="28" height="8" rx="2" fill="rgba(34,197,94,0.4)"/><rect x="0" y="11" width="28" height="8" rx="2" fill="rgba(34,197,94,0.38)"/><circle cx="5" cy="4" r="1.5" fill="rgba(34,197,94,0.6)"/><circle cx="5" cy="15" r="1.5" fill="rgba(34,197,94,0.6)"/></g></g></svg>');
  background-size: contain;
  background-repeat: no-repeat;
  opacity: 0.85;
  pointer-events: none;
  z-index: 0;
  filter: blur(0.3px);
}

.news-item-promo::after {
  content: '';
  position: absolute;
  top: -6px;
  right: -10px;
  width: 180px;
  height: 180px;
  background-image: 
    url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 180 180"><defs><radialGradient id="softFade" cx="50%25" cy="50%25" r="50%25"><stop offset="0%25" stop-color="white" stop-opacity="0.8"/><stop offset="70%25" stop-color="white" stop-opacity="0.4"/><stop offset="100%25" stop-color="white" stop-opacity="0"/></radialGradient><mask id="smoothMask"><circle cx="90" cy="90" r="90" fill="url(%23softFade)"/></mask></defs><g mask="url(%23smoothMask)"><g transform="translate(15, 50)"><ellipse cx="25" cy="18" rx="14" ry="18" fill="rgba(168,85,247,0.25)"/><circle cx="25" cy="12" r="10" fill="rgba(168,85,247,0.3)"/><line x1="25" y1="36" x2="25" y2="58" stroke="rgba(168,85,247,0.35)" stroke-width="3" stroke-linecap="round"/><line x1="25" y1="58" x2="18" y2="75" stroke="rgba(168,85,247,0.35)" stroke-width="3" stroke-linecap="round"/><line x1="25" y1="58" x2="32" y2="75" stroke="rgba(168,85,247,0.35)" stroke-width="3" stroke-linecap="round"/><line x1="14" y1="45" x2="3" y2="55" stroke="rgba(168,85,247,0.35)" stroke-width="3" stroke-linecap="round"/><line x1="36" y1="45" x2="47" y2="55" stroke="rgba(168,85,247,0.35)" stroke-width="3" stroke-linecap="round"/></g><g transform="translate(125, 50)"><ellipse cx="25" cy="18" rx="14" ry="18" fill="rgba(168,85,247,0.25)"/><circle cx="25" cy="12" r="10" fill="rgba(168,85,247,0.3)"/><line x1="25" y1="36" x2="25" y2="58" stroke="rgba(168,85,247,0.35)" stroke-width="3" stroke-linecap="round"/><line x1="25" y1="58" x2="18" y2="75" stroke="rgba(168,85,247,0.35)" stroke-width="3" stroke-linecap="round"/><line x1="25" y1="58" x2="32" y2="75" stroke="rgba(168,85,247,0.35)" stroke-width="3" stroke-linecap="round"/><line x1="14" y1="45" x2="3" y2="55" stroke="rgba(168,85,247,0.35)" stroke-width="3" stroke-linecap="round"/><line x1="36" y1="45" x2="47" y2="55" stroke="rgba(168,85,247,0.35)" stroke-width="3" stroke-linecap="round"/></g><g transform="translate(70, 85)"><circle cx="20" cy="20" r="18" fill="rgba(168,85,247,0.12)" stroke="rgba(168,85,247,0.35)" stroke-width="2"/><text x="20" y="26" font-family="Inter, sans-serif" font-size="16" font-weight="700" fill="rgba(168,85,247,0.5)" text-anchor="middle">SF</text></g><path d="M 55 105 Q 70 100 90 105" stroke="rgba(168,85,247,0.25)" stroke-width="2" fill="none" stroke-linecap="round"/><path d="M 90 105 Q 110 100 125 105" stroke="rgba(168,85,247,0.25)" stroke-width="2" fill="none" stroke-linecap="round"/><circle cx="55" cy="105" r="3" fill="rgba(168,85,247,0.4)"/><circle cx="125" cy="105" r="3" fill="rgba(168,85,247,0.4)"/></g></svg>');
  background-size: contain;
  background-repeat: no-repeat;
  opacity: 0.7;
  pointer-events: none;
  z-index: 0;
  filter: blur(0.4px);
}

.news-content {
  position: relative;
  z-index: 1;
}

.news-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--purple) 0%, var(--purple-dark) 100%);
  z-index: 0;
}

.news-item:hover {
  transform: translateX(4px);
  border-color: var(--purple);
  box-shadow: 0 8px 32px rgba(168, 85, 247, 0.3);
}

.news-badge {
  display: inline-block;
  padding: 6px 14px;
  background: linear-gradient(135deg, var(--purple) 0%, var(--purple-dark) 100%);
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 12px;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 12px rgba(168, 85, 247, 0.4);
}

.news-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.news-desc {
  color: var(--text-gray);
  font-size: 14px;
  line-height: 1.6;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

/* Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal.active {
  display: flex;
  animation: fadeIn 0.3s ease forwards;
}

.modal.closing {
  animation: fadeOut 0.3s ease forwards;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

.modal-content {
  background: linear-gradient(135deg, rgba(26, 26, 46, 0.85) 0%, rgba(10, 10, 15, 0.85) 100%);
  border-left: none;
  border-right: none;
  border-top: none;
  border-bottom: none;
  border-radius: 0;
  padding: 75px 24px 32px 24px;
  max-width: 100vw;
  width: 100vw;
  max-height: 100vh;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  backdrop-filter: blur(20px);
  box-shadow: 
    inset 2px 0 0 rgba(168, 85, 247, 0),
    inset -2px 0 0 rgba(168, 85, 247, 0),
    0 20px 60px rgba(168, 85, 247, 0.3);
  animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: fixed;
  top: 0;
  left: 0;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

.modal-content::before,
.modal-content::after {
  content: '';
  position: fixed;
  width: 2px;
  height: 100%;
  top: 0;
  pointer-events: none;
  z-index: 1001;
}

.modal-content::before {
  left: 0;
  background: linear-gradient(
    to bottom,
    rgba(168, 85, 247, 0.15) 0%,
    rgba(168, 85, 247, 0.15) 5%,
    rgba(168, 85, 247, 0.6) 50%,
    rgba(168, 85, 247, 0.6) 75%,
    rgba(168, 85, 247, 0.15) 98%,
    rgba(168, 85, 247, 0.15) 100%
  );
}

.modal-content::after {
  right: 0;
  background: linear-gradient(
    to bottom,
    rgba(168, 85, 247, 0.15) 0%,
    rgba(168, 85, 247, 0.15) 5%,
    rgba(168, 85, 247, 0.6) 50%,
    rgba(168, 85, 247, 0.6) 75%,
    rgba(168, 85, 247, 0.15) 98%,
    rgba(168, 85, 247, 0.15) 100%
  );
}

@keyframes slideUp {
  from { 
    transform: translateY(50px);
    opacity: 0;
  }
  to { 
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  margin-top: 9px;
}

.modal-title {
  font-size: 24px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--purple-light) 0%, var(--purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(168, 85, 247, 0.2);
  border: none;
  color: var(--text);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  -webkit-tap-highlight-color: transparent;
  line-height: 1;
  padding: 0;
}

.modal-close:hover {
  background: rgba(168, 85, 247, 0.4);
  transform: rotate(90deg);
}

.modal-close.closing {
  transform: rotate(90deg);
  background: rgba(168, 85, 247, 0.4);
}

.plan-section {
  margin-bottom: 24px;
}

.plan-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--purple-light);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.plan-options {
  display: grid;
  gap: 12px;
}

.plan-option {
  padding: 16px;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.05) 0%, rgba(26, 26, 46, 0.3) 100%);
  border: 2px solid rgba(168, 85, 247, 0.3);
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.plan-option::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(168, 85, 247, 0.1), transparent);
  transition: left 0.5s;
}

.plan-option:hover::before {
  left: 100%;
}

.plan-option:hover {
  border-color: var(--purple);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(168, 85, 247, 0.3);
}

.plan-option.selected {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.2) 0%, rgba(124, 58, 237, 0.2) 100%);
  border-color: var(--purple);
  box-shadow: 0 0 30px rgba(168, 85, 247, 0.4);
}

.plan-option.selected::after {
  content: '✓';
  position: absolute;
  top: 12px;
  right: 12px;
  width: 24px;
  height: 24px;
  background: var(--purple);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  animation: checkPop 0.3s ease;
}

@keyframes checkPop {
  0% { transform: scale(0); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

.plan-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.plan-badge {
  padding: 2px 8px;
  background: linear-gradient(135deg, var(--accent) 0%, #ea580c 100%);
  border-radius: 12px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.plan-price {
  font-size: 24px;
  font-weight: 800;
  color: var(--purple-light);
  margin: 8px 0;
}

.plan-price-old {
  font-size: 16px;
  color: var(--text-gray);
  text-decoration: line-through;
  margin-right: 8px;
}

.plan-desc {
  font-size: 13px;
  color: var(--text-gray);
  line-height: 1.5;
}

.payment-section {
  margin-top: 24px;
}

.payment-methods {
  display: grid;
  gap: 12px;
  margin-bottom: 24px;
}

.payment-method {
  padding: 18px 20px;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.05) 0%, rgba(26, 26, 46, 0.3) 100%);
  border: 2px solid rgba(168, 85, 247, 0.3);
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 12px;
}

.payment-method:hover {
  border-color: var(--purple);
  transform: translateX(4px);
  box-shadow: 0 4px 20px rgba(168, 85, 247, 0.3);
}

.payment-method.selected {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.2) 0%, rgba(124, 58, 237, 0.2) 100%);
  border-color: var(--purple);
  box-shadow: 0 0 30px rgba(168, 85, 247, 0.4);
}

.payment-icon {
  display: none;
}

.payment-info {
  flex: 1;
}

.payment-name {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text);
}

.payment-desc {
  font-size: 13px;
  color: var(--text-gray);
  font-weight: 400;
  opacity: 0.8;
}

.modal-footer {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.modal-footer .btn {
  flex: 1;
}

/* Payment Forms */
.payment-form {
  background: var(--black-light);
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  /* Фиксируем высоту при открытии клавиатуры */
  min-height: auto;
}

/* ИСХОДНЫЙ ВАРИАНТ (до автоматизации):
  .payment-form {
    background: var(--black-light);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  }
*/

/* Стили при открытой клавиатуре */
body.keyboard-open .modal-content {
  padding-bottom: 0;
}

body.keyboard-open .payment-form {
  margin-bottom: 0;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-input {
  width: 100%;
  padding: 14px 16px;
  background: rgba(10, 10, 15, 0.6);
  border: 2px solid rgba(168, 85, 247, 0.2);
  border-radius: 8px;
  color: var(--text);
  font-size: 16px;
  font-weight: 500;
  transition: all 0.3s ease;
  outline: none;
  /* Предотвращаем сдвиг при открытии клавиатуры */
  -webkit-user-select: text;
  user-select: text;
}

/* ИСХОДНЫЙ ВАРИАНТ (до автоматизации):
  .form-input {
    width: 100%;
    padding: 14px 16px;
    background: rgba(10, 10, 15, 0.6);
    border: 2px solid rgba(168, 85, 247, 0.2);
    border-radius: 8px;
    color: var(--text);
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    outline: none;
  }
*/

.form-input:focus {
  border-color: var(--purple);
  background: rgba(10, 10, 15, 0.8);
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.1);
}

.form-input::placeholder {
  color: var(--text-gray);
  opacity: 0.5;
}

.form-row {
  display: flex;
  gap: 12px;
}

.form-row .form-group {
  margin-bottom: 16px;
}

/* СБП Info */
.sbp-info {
  background: rgba(168, 85, 247, 0.04);
  padding: 14px;
  border-radius: 8px;
  margin-top: 14px;
  border: 1px solid rgba(168, 85, 247, 0.08);
}

/* Tabs Navigation */
.tabs-nav {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.05) 0%, rgba(26, 26, 46, 0.3) 100%);
  padding: 8px;
  border-radius: 20px;
  border: 1px solid rgba(168, 85, 247, 0.2);
}

.tab-btn {
  flex: 1;
  padding: 12px 16px;
  background: transparent;
  border: none;
  border-radius: 16px;
  color: var(--text-gray);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.tab-btn:hover {
  color: var(--text);
}

.tab-btn.active {
  background: linear-gradient(135deg, var(--purple) 0%, var(--purple-dark) 100%);
  color: var(--text);
  box-shadow: 0 4px 20px rgba(168, 85, 247, 0.4);
}

.tab-btn.active::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: linear-gradient(135deg, var(--purple-light), var(--purple));
  border-radius: 16px;
  opacity: 0.5;
  filter: blur(8px);
  z-index: -1;
}

.tab-content {
  display: none;
  animation: fadeInTab 0.3s ease;
}

.tab-content.active {
  display: block;
}

@keyframes fadeInTab {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Connection Section */
.connection-panel {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.1) 0%, rgba(26, 26, 46, 0.5) 100%);
  border: 2px solid rgba(168, 85, 247, 0.3);
  border-radius: 20px;
  padding: 24px;
  margin-bottom: 20px;
  backdrop-filter: blur(10px);
}

.connection-status {
  text-align: center;
  margin-bottom: 24px;
}

.connection-circle {
  width: 120px;
  height: 120px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.2) 0%, rgba(124, 58, 237, 0.2) 100%);
  border: 3px solid rgba(168, 85, 247, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  position: relative;
  transition: all 0.3s ease;
}

.connection-circle.connected {
  border-color: var(--purple);
  box-shadow: 0 0 40px rgba(168, 85, 247, 0.6);
  animation: pulse-circle 2s infinite;
}

@keyframes pulse-circle {
  0%, 100% {
    box-shadow: 0 0 40px rgba(168, 85, 247, 0.6);
  }
  50% {
    box-shadow: 0 0 60px rgba(168, 85, 247, 0.8);
  }
}

.connection-circle.disconnected {
  opacity: 0.5;
}

.connection-text {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
}

.connection-subtext {
  font-size: 14px;
  color: var(--text-gray);
}

.server-selector {
  margin: 20px 0;
}

.server-select {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.1) 0%, rgba(26, 26, 46, 0.5) 100%);
  border: 2px solid rgba(168, 85, 247, 0.3);
  border-radius: 16px;
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23a855f7' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

.server-select:hover {
  border-color: var(--purple);
  box-shadow: 0 4px 20px rgba(168, 85, 247, 0.3);
}

.server-select option {
  background: var(--black-light);
  color: var(--text);
  padding: 12px;
}

.connection-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 20px;
}

.stat-item {
  text-align: center;
  padding: 12px;
  background: rgba(168, 85, 247, 0.1);
  border-radius: 12px;
}

.stat-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--purple-light);
}

.stat-label {
  font-size: 12px;
  color: var(--text-gray);
  margin-top: 4px;
}

/* Account Section */
.info-card {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.1) 0%, rgba(26, 26, 46, 0.5) 100%);
  border: 2px solid rgba(168, 85, 247, 0.3);
  border-radius: 20px;
  padding: 20px;
  margin-bottom: 16px;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.info-card:hover {
  border-color: var(--purple);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(168, 85, 247, 0.3);
}

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid rgba(168, 85, 247, 0.1);
}

.info-row:last-child {
  border-bottom: none;
}

.info-label {
  color: var(--text-gray);
  font-size: 14px;
}

.info-value {
  color: var(--text);
  font-weight: 600;
  font-size: 15px;
}

.info-value.highlight {
  color: var(--purple-light);
  font-weight: 700;
}

.qr-container {
  text-align: center;
  padding: 20px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  margin: 20px 0;
}

.qr-code {
  width: 200px;
  height: 200px;
  margin: 0 auto;
  background: white;
  padding: 12px;
  border-radius: 12px;
}

.device-list {
  margin-top: 16px;
}

.device-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: rgba(168, 85, 247, 0.05);
  border-radius: 12px;
  margin-bottom: 8px;
  transition: all 0.3s ease;
}

.device-item:hover {
  background: rgba(168, 85, 247, 0.1);
  transform: translateX(4px);
}

.device-icon {
  width: 40px;
  height: 40px;
  background: var(--purple);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.device-info {
  flex: 1;
}

/* AI Консультант (минималистичный) */
.ai-consultant {
  position: fixed;
  bottom: 92px;
  right: 20px;
  width: 360px;
  max-width: calc(100vw - 40px);
  max-height: 500px;
  background: linear-gradient(135deg, rgba(26, 26, 46, 0.98) 0%, rgba(10, 10, 15, 0.98) 100%);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(168, 85, 247, 0.3);
  backdrop-filter: blur(20px);
  z-index: 9998;
  opacity: 0;
  transform: translateY(20px) scale(0.9);
  pointer-events: none;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  display: flex;
  flex-direction: column;
}

.ai-consultant.expanded {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.ai-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(168, 85, 247, 0.2);
  user-select: none;
}

.ai-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ai-icon {
  font-size: 24px;
}

.ai-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  background: linear-gradient(135deg, var(--purple-light), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.ai-close-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(168, 85, 247, 0.2);
  border: none;
  color: var(--text);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.ai-close-btn:hover {
  background: rgba(168, 85, 247, 0.4);
  transform: rotate(90deg);
}

.ai-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.ai-chat {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  max-height: 360px;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

.ai-chat::-webkit-scrollbar {
  width: 6px;
}

.ai-chat::-webkit-scrollbar-track {
  background: rgba(168, 85, 247, 0.05);
  border-radius: 3px;
}

.ai-chat::-webkit-scrollbar-thumb {
  background: rgba(168, 85, 247, 0.3);
  border-radius: 3px;
}

.ai-chat::-webkit-scrollbar-thumb:hover {
  background: rgba(168, 85, 247, 0.5);
}

.ai-message {
  display: flex;
  margin-bottom: 16px;
  animation: messageSlide 0.3s ease-out;
}

@keyframes messageSlide {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.ai-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), var(--purple-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
  flex-shrink: 0;
  font-size: 16px;
}

.ai-text {
  background: rgba(168, 85, 247, 0.1);
  padding: 12px 16px;
  border-radius: 12px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.4;
  flex: 1;
}

.ai-message.ai-user .ai-avatar {
  background: linear-gradient(135deg, var(--text-gray), var(--black-light));
  order: 2;
  margin-right: 0;
  margin-left: 12px;
}

.ai-message.ai-user .ai-text {
  background: var(--black-light);
  border: 1px solid rgba(168, 85, 247, 0.2);
}

.ai-input-area {
  display: flex;
  padding: 12px 16px;
  border-top: 1px solid rgba(168, 85, 247, 0.2);
  gap: 8px;
}

.ai-input-area input {
  flex: 1;
  background: var(--black-light);
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: 20px;
  padding: 10px 16px;
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: border-color 0.3s ease;
}

.ai-input-area input:focus {
  border-color: var(--purple);
}

.ai-input-area input::placeholder {
  color: var(--text-gray);
}

.ai-input-area button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), var(--purple-dark));
  border: none;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(168, 85, 247, 0.4);
  position: relative;
  z-index: 3000; /* Кнопка всегда поверх */
  pointer-events: auto; /* На случай перекрытий */
}

.ai-input-area button:before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(135deg, var(--purple), var(--purple-dark));
  border-radius: 50%;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.ai-input-area button:hover:before {
  opacity: 0.7;
}

.ai-input-area button:hover {
  transform: scale(1.1);
}

.ai-input-area button:active {
  transform: scale(0.95);
}

.ai-send-icon {
  font-size: 16px;
}

.ai-typing {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--purple);
  font-size: 12px;
  margin-top: 8px;
}

.ai-typing-dots {
  display: flex;
  gap: 2px;
}

.ai-typing-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--purple);
  animation: typingDot 1.4s ease-in-out infinite;
}

.ai-typing-dot:nth-child(1) { animation-delay: 0s; }
.ai-typing-dot:nth-child(2) { animation-delay: 0.2s; }
.ai-typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingDot {
  0%, 60%, 100% { opacity: 0.3; }
  30% { opacity: 1; }
}

/* AI консультант адаптивность */
@media (max-width: 480px) {
  .ai-consultant {
    width: calc(100vw - 32px);
    right: 16px;
    bottom: 92px;
    max-height: 70vh;
  }
  
  .ai-help-button {
    width: 52px;
    height: 52px;
    bottom: 20px;
    right: 20px;
    font-size: 26px;
  }
  
  .ai-content {
    max-height: calc(70vh - 70px);
  }
  
  .ai-chat {
    max-height: calc(70vh - 140px);
  }
}

.device-name {
  font-weight: 600;
  margin-bottom: 2px;
}

.device-status {
  font-size: 12px;
  color: var(--text-gray);
}

/* ================================================================
   Premium Section - Компактный личный кабинет
   ================================================================ */

.premium-card {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.1) 0%, rgba(26, 26, 46, 0.6) 100%);
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: 20px;
  padding: 24px;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(168, 85, 247, 0.2);
  margin-bottom: 24px;
  margin-top: 5px;
}

.premium-info {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 20px;
}

.premium-info-item {
  background: transparent;
  border: none;
  padding: 0;
  text-align: center;
}

.premium-label {
  font-size: 14px;
  color: var(--text-gray);
  margin-bottom: 8px;
  font-weight: 500;
  background: linear-gradient(135deg, #c084fc 0%, #a855f7 50%, #7c3aed 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.premium-value {
  font-size: 16px;
  color: #fff;
  font-weight: 700;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

.premium-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.premium-btn {
  border: none;
  border-radius: 12px;
  padding: 14px 20px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

.premium-btn-primary {
  background: linear-gradient(135deg, var(--purple), var(--purple-dark));
  color: #fff;
  box-shadow: 0 4px 15px rgba(168, 85, 247, 0.4);
}

.premium-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(168, 85, 247, 0.6);
}

.premium-btn-primary:active {
  transform: translateY(0);
}

.premium-btn-secondary {
  background: rgba(168, 85, 247, 0.2);
  border: 2px solid rgba(168, 85, 247, 0.6);
  color: var(--purple-light);
}

.premium-btn-secondary:hover {
  background: rgba(168, 85, 247, 0.3);
  border: 2px solid var(--purple);
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.5);
}

.premium-btn-secondary:active {
  border: 2px solid var(--purple-light);
  box-shadow: 0 0 25px rgba(168, 85, 247, 0.7);
}

.premium-btn-cancel {
  background: rgba(239, 68, 68, 0.2);
  border: 2px solid rgba(239, 68, 68, 0.6);
  color: #ef4444;
}

.premium-btn-cancel:hover {
  background: rgba(239, 68, 68, 0.3);
  border: 2px solid #ef4444;
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.5);
}

.premium-btn-cancel:active {
  border: 2px solid #f87171;
  box-shadow: 0 0 25px rgba(239, 68, 68, 0.7);
}

.btn-icon {
  font-size: 18px;
}

.premium-hint {
  text-align: center;
  font-size: 12px;
  color: var(--text-gray);
  line-height: 1.6;
  padding: 12px;
  background: rgba(168, 85, 247, 0.05);
  border-radius: 8px;
}

/* Адаптивность */
@media (max-width: 480px) {
  .premium-card {
    padding: 20px;
  }
  
  .premium-info {
    gap: 12px;
    padding: 6px 12px;
  }
  
  .premium-value {
    font-size: 14px;
  }
  
  .container {
    padding: 20px 16px 100px 16px;
  }
  
  .app-header {
    padding: 20px 16px;
  }
}

/* ================================================================
   Config Modal - Модальное окно с VPN конфигом
   ================================================================ */

.config-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 0.3s ease;
}

.config-modal.active {
  display: flex;
}

.config-modal-content {
  background: linear-gradient(135deg, #0a0a0f 0%, #1a1a2e 50%, #0f0a1f 100%);
  border: 2px solid rgba(168, 85, 247, 0.5);
  border-radius: 20px;
  padding: 0;
  max-width: 90%;
  width: 450px;
  max-height: 80vh;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(168, 85, 247, 0.3), 0 0 100px rgba(168, 85, 247, 0.2);
  animation: slideUp 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes slideUp {
  from {
    transform: translateY(100px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.config-modal-header {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.2), rgba(124, 58, 237, 0.3));
  padding: 24px;
  border-bottom: 1px solid rgba(168, 85, 247, 0.3);
  position: relative;
}

.config-modal-title {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.config-modal-title::before {
  content: "🎉";
  font-size: 28px;
  animation: bounce 1s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.config-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(168, 85, 247, 0.2);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.config-modal-close:hover {
  background: rgba(168, 85, 247, 0.4);
  transform: rotate(90deg);
}

.config-modal-body {
  padding: 24px;
  overflow-y: auto;
  max-height: calc(80vh - 120px);
}

.config-success-message {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
  color: #22c55e;
  font-size: 14px;
  line-height: 1.6;
}

.config-info {
  background: rgba(168, 85, 247, 0.1);
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
}

.config-info-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--purple-light);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.servers-list {
  background: var(--black);
  border: 1px solid rgba(168, 85, 247, 0.2);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 20px;
}

.server-item {
  color: var(--purple-light);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 0;
  border-bottom: 1px solid rgba(168, 85, 247, 0.1);
}

.server-item:last-child {
  border-bottom: none;
}

.config-preview::-webkit-scrollbar {
  width: 6px;
}

.config-preview::-webkit-scrollbar-track {
  background: rgba(168, 85, 247, 0.1);
  border-radius: 3px;
}

.config-preview::-webkit-scrollbar-thumb {
  background: var(--purple);
  border-radius: 3px;
}

.config-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.config-download-btn {
  background: linear-gradient(135deg, var(--purple), var(--purple-dark));
  border: none;
  padding: 16px;
  border-radius: 12px;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 4px 15px rgba(168, 85, 247, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.config-download-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(168, 85, 247, 0.6);
}

.config-download-btn:active {
  transform: translateY(0);
}

.config-open-app-btn {
  background: rgba(168, 85, 247, 0.2);
  border: 1px solid rgba(168, 85, 247, 0.4);
  padding: 14px;
  border-radius: 12px;
  color: var(--purple-light);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.config-open-app-btn:hover {
  background: rgba(168, 85, 247, 0.3);
  border-color: rgba(168, 85, 247, 0.6);
}

.config-hint {
  font-size: 12px;
  color: var(--text-gray);
  text-align: center;
  margin-top: 12px;
  line-height: 1.5;
}

/* ================================================================
   Success Modal - Компактное окно успешной активации (3D эффект)
   ================================================================ */

.success-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(15px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 0.4s ease;
}

.success-modal.active {
  display: flex;
}

.success-modal-content {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.15) 0%, rgba(10, 10, 15, 0.95) 100%);
  border: 2px solid rgba(168, 85, 247, 0.6);
  border-radius: 24px;
  padding: 48px 40px;
  max-width: 90%;
  width: 360px;
  text-align: center;
  box-shadow: 0 30px 80px rgba(168, 85, 247, 0.5), 
              0 0 100px rgba(168, 85, 247, 0.3),
              inset 0 0 60px rgba(168, 85, 247, 0.1);
  animation: successAppear 0.9s cubic-bezier(0.25, 1.2, 0.5, 1);
  transform-style: preserve-3d;
  perspective: 1000px;
}

@keyframes successAppear {
  0% { 
    transform: scale(0.5) rotateY(-360deg) translateZ(0px);
    opacity: 0;
  }
  100% { 
    transform: scale(1) rotateY(0deg) translateZ(0px);
    opacity: 1;
  }
}

.success-icon {
  width: 100px;
  height: 100px;
  margin: 0 auto 24px;
  background: linear-gradient(135deg, var(--purple) 0%, var(--purple-dark) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 60px;
  color: #fff;
  font-weight: bold;
  box-shadow: 0 10px 40px rgba(168, 85, 247, 0.6),
              inset 0 0 20px rgba(255, 255, 255, 0.2);
  animation: iconPulse 2s ease-in-out infinite;
  transform-style: preserve-3d;
}

@keyframes iconPulse {
  0%, 100% {
    transform: scale(1) translateZ(20px);
    box-shadow: 0 10px 40px rgba(168, 85, 247, 0.6),
                inset 0 0 20px rgba(255, 255, 255, 0.2);
  }
  50% {
    transform: scale(1.05) translateZ(30px);
    box-shadow: 0 15px 60px rgba(168, 85, 247, 0.8),
                inset 0 0 30px rgba(255, 255, 255, 0.3);
  }
}

.success-title {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #c084fc 0%, #a855f7 50%, #7c3aed 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 4px 20px rgba(168, 85, 247, 0.5);
}

.success-message {
  font-size: 16px;
  color: var(--text-gray);
  font-weight: 500;
  line-height: 1.6;
  background: linear-gradient(135deg, #d8b4fe 0%, #c084fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

