:root {
  --bg: #0b0c10;
  --panel: #11131a;
  --text: #e7e9ee;
  --muted: #9aa3b2;
  --brand: #6ea8fe;
  --brand-2: #8bd3ff;
  --accent: #a78bfa;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

html, body {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, 'Segoe UI', Roboto, Ubuntu, 'Helvetica Neue', Arial;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(1200px, 92vw);
  margin: 0 auto;
}

/* ===== NAVIGATION ===== */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 12, 16, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(110, 168, 254, 0.1);
  transition: all 0.3s ease;
}

.nav.scrolled {
  background: rgba(11, 12, 16, 0.95);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 16px 0;
}

.logo {
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: transform 0.3s ease;
}

.logo:hover {
  transform: scale(1.05);
}

.menu {
  margin-left: auto;
  display: flex;
  gap: 32px;
  align-items: center;
}

.menu a {
  color: var(--muted);
  font-weight: 500;
  position: relative;
  transition: color 0.3s ease;
}

.menu a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--brand), var(--accent));
  transition: width 0.3s ease;
}

.menu a:hover {
  color: var(--text);
}

.menu a:hover::after {
  width: 100%;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 14px;
  border: 1px solid transparent;
  font-weight: 600;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

/* 🔧 FIX 3: Яркая кнопка "Открыть каталог" */
.btn-primary {
  background: linear-gradient(135deg, #5B9BFF, #A78BFA);
  color: #fff;
  box-shadow: 0 8px 30px rgba(91, 155, 255, 0.5);
  font-size: 1.05rem;
  font-weight: 700;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(91, 155, 255, 0.7);
  background: linear-gradient(135deg, #6EABFF, #B89BFA);
}

.btn-ghost {
  background: transparent;
  border: 1px solid rgba(110, 168, 254, 0.3);
  color: var(--text);
}

.btn-ghost:hover {
  background: rgba(110, 168, 254, 0.1);
  border-color: var(--brand);
}

.btn-lg {
  padding: 16px 32px;
  font-size: 1.1rem;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.85rem;
  background: rgba(110, 168, 254, 0.1);
  border: 1px solid rgba(110, 168, 254, 0.2);
  color: var(--text);
  border-radius: 8px;
  transition: all 0.3s ease;
}

.btn-sm:hover {
  background: rgba(110, 168, 254, 0.15);
  border-color: var(--brand);
  transform: translateY(-1px);
}

/* Стили для модальных окон в профиле */
#topUpModal .btn {
  background: rgba(110, 168, 254, 0.1);
  border: 1px solid rgba(110, 168, 254, 0.2);
  color: var(--text);
  padding: 16px;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 12px;
  transition: all 0.3s ease;
}

#topUpModal .btn:hover {
  background: rgba(110, 168, 254, 0.15);
  border-color: var(--brand);
  transform: translateY(-1px);
}

#topUpModal input[type="number"] {
  color: var(--text) !important;
  background: var(--bg) !important;
  border: 1px solid var(--line) !important;
  /* Убираем стрелки у поля ввода чисел */
  -moz-appearance: textfield;
}

#topUpModal input[type="number"]::-webkit-outer-spin-button,
#topUpModal input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

#topUpModal .btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--accent));
  color: #fff;
  border: none;
}

#topUpModal .btn-ghost {
  background: transparent;
  border: 1px solid rgba(110, 168, 254, 0.3);
  color: var(--text);
}

/* ===== HERO SECTION ===== */
.hero {
  position: relative;
  background: 
    radial-gradient(1200px 600px at 20% -10%, rgba(110, 168, 254, 0.15), transparent 60%),
    radial-gradient(1000px 500px at 80% -20%, rgba(167, 139, 250, 0.12), transparent 60%),
    radial-gradient(800px 400px at 50% 100%, rgba(139, 211, 255, 0.08), transparent 70%);
  border-bottom: 1px solid rgba(110, 168, 254, 0.1);
  overflow: hidden;
  /* 🔧 FIX 4: z-index чтобы hero не накладывалась на следующие секции */
  z-index: 1;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(110, 168, 254, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  animation: gridMove 30s linear infinite;
  z-index: -1;
}

@keyframes gridMove {
  0% { transform: translate(0, 0); }
  100% { transform: translate(50px, 50px); }
}

.hero-inner {
  position: relative;
  padding: 100px 0 80px;
  text-align: center;
  z-index: 2;
}



.lead {
  font-size: 1.25rem;
  color: var(--muted);
  max-width: 700px;
  margin: 0 auto 40px;
  line-height: 1.8;
}

.cta {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 60px;
}

/* Stats */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 40px;
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 0 0;
}

.stat-item {
  text-align: center;
}

.stat-value {
  font-size: 2.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}

.stat-label {
  color: var(--muted);
  font-size: 0.95rem;
}

/* ===== SECTIONS ===== */
.section-title {
  font-size: clamp(28px, 4vw, 42px);
  text-align: center;
  margin-bottom: 50px;
  background: linear-gradient(135deg, var(--text), var(--brand-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== FEATURES ===== */
.features {
  padding: 80px 0;
  position: relative;
  z-index: 10;
  background: var(--bg);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.card {
  background: var(--panel);
  border: 1px solid rgba(110, 168, 254, 0.1);
  border-radius: 20px;
  padding: 32px;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(110, 168, 254, 0.05), rgba(167, 139, 250, 0.05));
  opacity: 0;
  transition: opacity 0.4s ease;
}

.card:hover {
  transform: translateY(-8px);
  border-color: rgba(110, 168, 254, 0.3);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.card:hover::before {
  opacity: 1;
}

.card-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  display: inline-block;
  filter: grayscale(0.3);
  transition: all 0.4s ease;
}

.card:hover .card-icon {
  transform: scale(1.2) rotate(5deg);
  filter: grayscale(0);
}

.card h3 {
  font-size: 1.4rem;
  margin-bottom: 12px;
  color: var(--text);
}

.card p {
  color: var(--muted);
  line-height: 1.7;
}

/* ===== HOW IT WORKS ===== */
.how {
  padding: 80px 0;
  background: 
    linear-gradient(180deg, rgba(110, 168, 254, 0.03), transparent 50%, rgba(167, 139, 250, 0.03)),
    var(--bg);
  border-block: 1px solid rgba(110, 168, 254, 0.1);
  position: relative;
  z-index: 10;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
  margin-top: 50px;
}

.step-card {
  position: relative;
  padding: 32px;
  background: var(--panel);
  border: 1px solid rgba(110, 168, 254, 0.1);
  border-radius: 20px;
  transition: all 0.4s ease;
}

.step-card::before {
  content: '';
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  bottom: -1px;
  background: linear-gradient(135deg, rgba(110, 168, 254, 0.1), rgba(167, 139, 250, 0.1));
  border-radius: 20px;
  opacity: 0;
  z-index: -1;
  transition: opacity 0.4s ease;
}

.step-card:hover {
  transform: translateY(-8px);
  border-color: rgba(110, 168, 254, 0.3);
  background: rgba(110, 168, 254, 0.05);
}

.step-card:hover::before {
  opacity: 1;
}

.step-number {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 20px;
  box-shadow: 0 8px 20px rgba(110, 168, 254, 0.3);
  /* Улучшенное центрирование */
  text-align: center;
  line-height: 1;
  position: relative;
  /* Микро-коррекция для идеального центрирования */
  top: 1px;
}

.step-card h3 {
  font-size: 1.3rem;
  margin-bottom: 12px;
  color: var(--text);
  transition: color 0.3s ease;
}

.step-card p {
  color: var(--muted);
  line-height: 1.7;
  transition: color 0.3s ease;
}

/* Улучшенная читаемость при hover */
.step-card:hover h3 {
  color: var(--text);
}

.step-card:hover p {
  color: var(--text);
  opacity: 0.9;
}


/* ===== FAQ ===== */
.faq {
  padding: 80px 0;
  position: relative;
  z-index: 10;
}

/* 🔧 FIX 5: Плавное раскрытие FAQ */
.faq-item {
  background: var(--panel);
  border: 1px solid rgba(110, 168, 254, 0.1);
  border-radius: 16px;
  padding: 24px 28px;
  margin: 16px 0;
  transition: all 0.3s ease;
  cursor: pointer;
  overflow: hidden;
}

.faq-item:hover {
  border-color: rgba(110, 168, 254, 0.3);
  background: rgba(17, 19, 26, 0.8);
}

.faq-item summary {
  font-weight: 600;
  font-size: 1.1rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.faq-item summary::after {
  content: '+';
  font-size: 1.5rem;
  color: var(--brand);
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-item p {
  margin-top: 16px;
  color: var(--muted);
  line-height: 1.7;
  padding-left: 0;
  animation: fadeInDown 0.3s ease;
}

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

/* ===== CTA SECTION ===== */
.cta-section {
  padding: 100px 0;
  background: 
    radial-gradient(1000px 500px at 50% 50%, rgba(110, 168, 254, 0.1), transparent 70%),
    var(--bg);
  position: relative;
  z-index: 10;
}

.cta-box {
  text-align: center;
  padding: 60px 40px;
  background: var(--panel);
  border: 1px solid rgba(110, 168, 254, 0.2);
  border-radius: 24px;
  position: relative;
  overflow: hidden;
}

.cta-box::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(110, 168, 254, 0.1) 1px, transparent 1px);
  background-size: 40px 40px;
  animation: gridMove 20s linear infinite;
}

.cta-box h2 {
  font-size: clamp(28px, 4vw, 42px);
  margin-bottom: 16px;
  position: relative;
}

.cta-box p {
  font-size: 1.2rem;
  color: var(--muted);
  margin-bottom: 32px;
  position: relative;
}

.cta-box .btn {
  position: relative;
}

/* ===== FOOTER ===== */
.footer {
  border-top: 1px solid rgba(110, 168, 254, 0.1);
  padding: 40px 0;
  position: relative;
  z-index: 10;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--brand);
}

.muted {
  color: var(--muted);
  font-size: 0.95rem;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-on-scroll {
  opacity: 0;
  animation: fadeInUp 0.8s ease forwards;
}

.animate-on-scroll.visible {
  animation: fadeInUp 0.8s ease forwards;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 860px) {
  .menu {
    display: none;
  }

  .hero-inner {
    padding: 60px 0 50px;
  }

  .stats {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .grid,
  .steps-grid {
    grid-template-columns: 1fr;
  }

  .section-title {
    font-size: 32px;
  }
}

/* 🔧 FIX 1: Auth slot - кнопка войти справа */
.auth-slot {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.chip {
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(110, 168, 254, 0.1);
  border: 1px solid rgba(110, 168, 254, 0.2);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.chip:hover {
  background: rgba(110, 168, 254, 0.15);
  border-color: var(--brand);
}

.btn-secondary {
  background: rgba(110, 168, 254, 0.1);
  border: 1px solid rgba(110, 168, 254, 0.2);
  color: var(--text);
}

.btn-secondary:hover {
  background: rgba(110, 168, 254, 0.15);
  border-color: var(--brand);
}





/* ========================================
   🔧 ОКОНЧАТЕЛЬНЫЙ ПАТЧ
   УДАЛИ ВСЕ ПРЕДЫДУЩИЕ ПАТЧИ И ДОБАВЬ ТОЛЬКО ЭТОТ
   ======================================== */

/* Убираем margin-bottom и border-radius - никакого наслаивания */
.hero {
  position: relative !important;
  z-index: 1 !important;
  padding-bottom: 80px !important;
  margin-bottom: 0 !important;
  transform: none !important;
  border-radius: 0 !important;
}

.features {
  position: relative !important;
  z-index: 2 !important;
  background: var(--bg) !important;
  border-radius: 0 !important;
  padding-top: 80px !important;
  padding-bottom: 80px !important;
  margin-bottom: 0 !important;
}

.how {
  position: relative !important;
  z-index: 3 !important;
  background: 
    linear-gradient(180deg, rgba(110, 168, 254, 0.03), transparent 50%, rgba(167, 139, 250, 0.03)),
    var(--bg) !important;
  border-radius: 0 !important;
  padding-top: 80px !important;
  padding-bottom: 80px !important;
  margin-bottom: 0 !important;
}

.faq {
  position: relative !important;
  z-index: 4 !important;
  background: var(--bg) !important;
  border-radius: 0 !important;
  padding-top: 80px !important;
  padding-bottom: 80px !important;
  margin-bottom: 0 !important;
}

.cta-section {
  position: relative !important;
  z-index: 5 !important;
  background: 
    radial-gradient(1000px 500px at 50% 50%, rgba(110, 168, 254, 0.1), transparent 70%),
    var(--bg) !important;
  border-radius: 0 !important;
  padding-top: 100px !important;
  padding-bottom: 100px !important;
  margin-bottom: 0 !important;
}

.footer {
  position: relative !important;
  z-index: 6 !important;
  background: var(--bg) !important;
  margin-top: 0 !important;
}

/* Кнопка "Открыть каталог" */
.btn-primary {
  background: linear-gradient(90deg, #4A8EFF 0%, #7B85FA 50%, #8B7BFA 100%) !important;
  background-size: 200% 100% !important;
  background-position: 100% 0 !important;
  color: #fff !important;
  box-shadow: 0 8px 25px rgba(74, 142, 255, 0.3) !important;
  font-weight: 700 !important;
  position: relative !important;
  vertical-align: middle !important;
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.btn-primary:hover {
  background-position: 0% 0 !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 12px 35px rgba(91, 155, 255, 0.4) !important;
}

.btn-primary::before {
  display: none !important;
}

.btn-shimmer {
  animation: none !important;
}

/* Кнопка "Войти" */
.btn-secondary {
  box-shadow: 0 2px 8px rgba(110, 168, 254, 0.15) !important;
  vertical-align: middle !important;
}

.btn-secondary:hover {
  box-shadow: 0 4px 12px rgba(110, 168, 254, 0.25) !important;
}

/* Все кнопки */
.btn {
  vertical-align: middle !important;
}

.auth-slot {
  vertical-align: middle !important;
}

.chip {
  vertical-align: middle !important;
}

.btn-ghost {
  vertical-align: middle !important;
}

.btn-ghost:hover {
  transform: translateY(-1px) !important;
}


/* ========================================
   🔧 ПАТЧ: Плавная анимация FAQ
   Добавь в конец styles_enhanced.css
   ======================================== */

/* Убираем стандартное поведение details */
.faq-item {
  background: var(--panel) !important;
  border: 1px solid rgba(110, 168, 254, 0.1) !important;
  border-radius: 16px !important;
  margin: 16px 0 !important;
  transition: all 0.3s ease !important;
  cursor: pointer !important;
  overflow: hidden !important;
}

.faq-item:hover {
  border-color: rgba(110, 168, 254, 0.3) !important;
  background: rgba(17, 19, 26, 0.8) !important;
}

.faq-item summary {
  font-weight: 600 !important;
  font-size: 1.1rem !important;
  list-style: none !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  cursor: pointer !important;
  padding: 24px 28px !important;
  user-select: none !important;
}

/* Убираем стандартный маркер */
.faq-item summary::-webkit-details-marker {
  display: none !important;
}

.faq-item summary::after {
  content: '+' !important;
  font-size: 1.5rem !important;
  color: var(--brand) !important;
  transition: transform 0.3s ease !important;
  flex-shrink: 0 !important;
}

.faq-item[open] summary::after {
  transform: rotate(45deg) !important;
}

/* Плавная анимация контента */
.faq-content {
  max-height: 0 !important;
  overflow: hidden !important;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
              opacity 0.3s ease, 
              padding 0.3s ease !important;
  opacity: 0 !important;
  padding: 0 28px !important;
}

.faq-item[open] .faq-content {
  padding: 0 28px 24px 28px !important;
  opacity: 1 !important;
}

.faq-content p {
  color: var(--muted) !important;
  line-height: 1.7 !important;
  margin: 0 !important;
}





/* ========================================
   🎨 ГРАДИЕНТ ДЛЯ JS АНИМАЦИИ
   Замени патч градиента на это
   ======================================== */

.hero-title {
  font-size: clamp(36px, 6vw, 64px) !important;
  line-height: 1.2 !important;
  margin-bottom: 24px !important;
  padding: 8px 0 !important;
  overflow: visible !important;

  /* Градиент будет анимироваться через JS */
  background: linear-gradient(90deg, #5B9BFF, #8BD3FF, #A78BFA, #C084FC, #A78BFA, #8BD3FF, #5B9BFF) !important;
  background-size: 300% 100% !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
}

/* Убираем CSS анимацию - будет через JS */
.hero-title.animate-on-scroll {
  animation: fadeInUp 0.8s ease forwards !important;
}
