/* =========================================
   CRYPTORA — FinTech / Web3 Dark Theme
   Glassmorphism · Neon Gradients
   ========================================= */

:root {
  /* Core palette */
  --void-black: #05070a;
  --deep-navy: #0a0b1e;
  --navy-mid: #12132b;
  --navy-surface: #1a1b3a;
  --navy-elevated: #222347;

  /* Neon accents */
  --cyan-primary: #06b6d4;
  --cyan-bright: #22d3ee;
  --purple-primary: #8b5cf6;
  --purple-deep: #7c3aed;
  --pink-accent: #ec4899;
  --violet-glow: #a855f7;
  --indigo-mid: #6366f1;

  /* Functional */
  --green-positive: #10b981;
  --green-bright: #34d399;
  --red-negative: #f43f5e;
  --amber-warn: #f59e0b;

  /* Surfaces & glass */
  --surface-1: rgba(255, 255, 255, 0.06);
  --surface-2: rgba(255, 255, 255, 0.04);
  --surface-3: rgba(255, 255, 255, 0.08);
  --glass-bg: rgba(10, 11, 30, 0.65);
  --glass-border: rgba(255, 255, 255, 0.1);

  /* Borders */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(255, 255, 255, 0.14);
  --border-strong: rgba(139, 92, 246, 0.35);
  --border-glow: rgba(6, 182, 212, 0.4);

  /* Text */
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.68);
  --text-tertiary: rgba(255, 255, 255, 0.45);
  --text-dark: #05070a;

  /* Typography */
  --font-heading: 'Poppins', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;

  /* Radius */
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  /* Shadows & glow */
  --shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.55);
  --shadow-glow-cyan: 0 0 40px rgba(6, 182, 212, 0.25);
  --shadow-glow-purple: 0 0 40px rgba(139, 92, 246, 0.3);
  --shadow-glow-pink: 0 0 30px rgba(236, 72, 153, 0.2);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 500ms ease;

  /* Layout */
  --header-height: 76px;
  --container-max: 1200px;

  /* Legacy aliases — keeps inline styles working */
  --ocean-deep: var(--void-black);
  --ocean-mid: var(--deep-navy);
  --ocean-surface: var(--navy-mid);
  --ocean-light: var(--navy-surface);
  --coral-primary: var(--cyan-primary);
  --coral-light: var(--cyan-bright);
  --sand-gold: var(--amber-warn);
  --sand-cream: #fef3c7;
  --aqua-bright: var(--cyan-bright);
  --aqua-soft: #67e8f9;
  --teal-deep: var(--purple-primary);
  --teal-light: var(--violet-glow);
  --sky-dawn: var(--indigo-mid);
  --sky-dusk: var(--purple-deep);
  --ui-bg: var(--void-black);
  --ui-surface: var(--surface-2);
  --ui-surface-2: var(--surface-3);
  --ui-border: var(--border-medium);
  --ui-border-soft: var(--border-subtle);
  --ui-text: var(--text-primary);
  --ui-muted: var(--text-secondary);
  --ui-faint: var(--text-tertiary);
  --ui-accent: var(--cyan-primary);
  --ui-accent-2: var(--purple-primary);
  --ui-accent-3: var(--pink-accent);
  --ui-accent-ink: var(--void-black);
  --ui-glow-accent: var(--shadow-glow-cyan);
  --ui-glow-cyan: var(--shadow-glow-purple);
  --clr-primary: var(--cyan-primary);
  --clr-secondary: var(--purple-primary);
  --clr-bg: var(--void-black);
  --clr-muted: var(--text-secondary);
  --clr-border: var(--border-subtle);
  --primary-color: var(--cyan-primary);
  --border-color: var(--border-subtle);
  --bg-card: var(--surface-2);
  --text-main: var(--text-primary);
  --text-muted: var(--text-secondary);
  --bg-dark: var(--void-black);
  --bg-pane: var(--surface-2);
  --bg-pane-hover: var(--surface-3);
  --border-light: var(--border-subtle);
  --border-hover: var(--border-medium);
  --glow-primary: var(--shadow-glow-cyan);
  --clr-primary-glow: rgba(6, 182, 212, 0.35);
  --clr-secondary-glow: rgba(139, 92, 246, 0.35);
  --header-bg: rgba(5, 7, 10, 0.82);
}

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background:
    radial-gradient(ellipse 70% 50% at 15% 20%, rgba(139, 92, 246, 0.14) 0%, transparent 55%),
    radial-gradient(ellipse 60% 45% at 85% 75%, rgba(6, 182, 212, 0.1) 0%, transparent 50%),
    radial-gradient(ellipse 50% 35% at 50% 100%, rgba(236, 72, 153, 0.08) 0%, transparent 45%),
    linear-gradient(180deg, var(--void-black) 0%, var(--deep-navy) 45%, var(--void-black) 100%);
  background-attachment: fixed;
  color: var(--text-primary);
  line-height: 1.65;
  overflow-x: hidden;
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  top: 5%;
  right: -8%;
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(90px);
  z-index: -1;
  animation: float-orb 22s ease-in-out infinite;
}

body::after {
  content: "";
  position: fixed;
  bottom: 5%;
  left: -6%;
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.12) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(90px);
  z-index: -1;
  animation: float-orb 28s ease-in-out infinite reverse;
}

@keyframes float-orb {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(25px, -35px) scale(1.08); }
  66% { transform: translate(-30px, 25px) scale(0.92); }
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

a {
  text-decoration: none;
  color: inherit;
  transition: all var(--transition-base);
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-md);
}

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--cyan-primary), var(--purple-primary));
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--cyan-bright), var(--violet-glow));
}

.container {
  width: min(92%, var(--container-max));
  margin: 0 auto;
}

.ambient-background {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 30%, rgba(99, 102, 241, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(6, 182, 212, 0.06) 0%, transparent 40%);
}

.ambient-background .orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.5;
}

.orb-1 {
  width: 420px;
  height: 420px;
  top: -120px;
  left: -80px;
  background: rgba(139, 92, 246, 0.22);
  animation: orb-drift 32s ease-in-out infinite;
}

.orb-2 {
  width: 360px;
  height: 360px;
  top: 25%;
  right: -60px;
  background: rgba(6, 182, 212, 0.18);
  animation: orb-drift 26s ease-in-out infinite reverse;
}

.orb-3 {
  width: 320px;
  height: 320px;
  bottom: 8%;
  left: 35%;
  background: rgba(236, 72, 153, 0.15);
  animation: orb-drift 38s ease-in-out infinite;
}

@keyframes orb-drift {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(40px, 25px); }
}

/* Header */
header, #main-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  display: flex;
  align-items: center;
  z-index: 1000;
  background: var(--header-bg);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid var(--glass-border);
  transition: all var(--transition-base);
}

header.scrolled {
  background: rgba(5, 7, 10, 0.96);
  box-shadow: var(--shadow-md);
}

.header-container {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-md);
}

.logo img {
  height: 38px;
  filter: drop-shadow(0 0 12px rgba(6, 182, 212, 0.35));
}

.nav-list ul {
  display: flex;
  gap: var(--space-lg);
  align-items: center;
}

.nav-list a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  position: relative;
  padding: 0.4rem 0;
  letter-spacing: 0.01em;
}

.nav-list a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--cyan-primary), var(--purple-primary));
  border-radius: 2px;
  transition: width var(--transition-base);
}

.nav-list a:hover,
.nav-list li.active a {
  color: var(--text-primary);
}

.nav-list a:hover::after {
  width: 100%;
}

.header-auth {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.btn-login {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-medium);
  background: transparent;
  cursor: pointer;
  transition: all var(--transition-base);
}

.btn-login:hover {
  background: var(--surface-2);
  border-color: var(--cyan-primary);
  box-shadow: var(--shadow-glow-cyan);
}

.btn-signup {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--cyan-primary) 0%, var(--indigo-mid) 55%, var(--purple-primary) 100%);
  color: white;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.7rem 1.5rem;
  border-radius: var(--radius-md);
  border: none;
  box-shadow: var(--shadow-glow-cyan);
  cursor: pointer;
  transition: all var(--transition-base);
}

.btn-signup:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(6, 182, 212, 0.35), 0 0 20px rgba(139, 92, 246, 0.2);
}

.mobile-menu-toggle {
  display: none;
  background: transparent;
  border: none;
  width: 44px;
  height: 44px;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.mobile-menu-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition-base);
}

.mobile-menu-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 7, 10, 0.92);
  backdrop-filter: blur(12px);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
}

.mobile-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

body.no-scroll {
  overflow: hidden;
}

.section-title {
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  margin-bottom: var(--space-md);
  text-align: center;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.section-prefix {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: var(--cyan-primary);
  margin-bottom: var(--space-sm);
  text-align: center;
}

.gradient-text {
  background: linear-gradient(135deg, var(--cyan-bright) 0%, var(--purple-primary) 50%, var(--pink-accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

footer, #main-footer {
  background: linear-gradient(180deg, rgba(10, 11, 30, 0.6) 0%, var(--void-black) 100%);
  border-top: 1px solid var(--glass-border);
  padding: var(--space-2xl) 0 var(--space-lg);
  margin-top: 0;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
}

.footer-brand p,
.footer-desc {
  color: var(--text-secondary);
  font-size: 0.92rem;
  margin-top: var(--space-sm);
  max-width: 320px;
  line-height: 1.75;
}

.footer-nav h4,
.footer-contact h4 {
  font-size: 1rem;
  margin-bottom: var(--space-md);
  color: var(--text-primary);
  font-weight: 600;
}

.footer-nav ul {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.footer-nav a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: all var(--transition-fast);
}

.footer-nav a:hover {
  color: var(--cyan-primary);
  padding-left: 4px;
}

.footer-bottom {
  border-top: 1px solid var(--border-subtle);
  padding-top: var(--space-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-tertiary);
  font-size: 0.85rem;
  gap: var(--space-md);
}

.footer-links a {
  color: var(--cyan-primary);
  font-weight: 600;
  transition: all var(--transition-fast);
}

.footer-links a:hover {
  color: var(--purple-primary);
}

.text-white { color: #fff !important; }
.text-center { text-align: center !important; }
.d-flex { display: flex !important; }
.gap-3 { gap: 1rem !important; }
.mb-5 { margin-bottom: 3rem !important; }
.mt-3 { margin-top: 1rem !important; }
.pt-3 { padding-top: 1rem !important; }
.me-2 { margin-right: 0.5rem !important; }
.ms-1 { margin-left: 0.25rem !important; }
.ms-2 { margin-left: 0.5rem !important; }
.border-top-dark { border-top: 1px solid var(--border-subtle) !important; }
.text-muted-light { color: var(--text-secondary) !important; }

.glass-nav {
  border-radius: var(--radius-lg);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-md);
}

.mobile-bottom-bar {
  display: none;
}

@media (max-width: 768px) {
  .btn-login,
  .btn-signup,
  .btn-primary,
  .btn-secondary,
  .btn-play-game,
  .faq-question,
  .read-more,
  .mobile-bottom-bar a,
  .news-list-item,
  .tournament-card,
  .game-card-large,
  .step-card,
  .trust-card-v2,
  .testimonial-card,
  .vip-tier-horizontal,
  .why-card,
  .winner-testimonial,
  .news-preview-card {
    min-height: 44px;
  }

  .faq-question {
    min-height: 48px;
    display: flex;
    align-items: center;
  }

  .btn-primary,
  .btn-secondary,
  .btn-login,
  .btn-signup,
  .mobile-bottom-bar a {
    min-height: 48px;
    min-width: 48px;
  }
}

@media (max-width: 480px) {
  :root {
    --space-xs: 0.375rem;
    --space-sm: 0.75rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --header-height: 68px;
  }

  .section-title {
    font-size: clamp(1.5rem, 7vw, 2rem);
  }

  .section-prefix {
    font-size: 0.68rem;
    letter-spacing: 0.18em;
  }

  .container {
    width: min(94%, var(--container-max));
  }

  .logo img {
    height: 32px;
  }
}

@supports (padding-top: env(safe-area-inset-top)) {
  @media (max-width: 768px) {
    body {
      padding-top: env(safe-area-inset-top);
      padding-bottom: calc(80px + env(safe-area-inset-bottom));
    }

    #main-header {
      padding-top: env(safe-area-inset-top);
      height: calc(var(--header-height) + env(safe-area-inset-top));
    }

    .nav-list {
      top: calc(var(--header-height) + env(safe-area-inset-top));
      height: calc(100vh - var(--header-height) - env(safe-area-inset-top));
    }

    .mobile-bottom-bar {
      padding-bottom: calc(12px + env(safe-area-inset-bottom));
    }

    .footer-register-banner {
      padding-bottom: calc(var(--space-2xl) + env(safe-area-inset-bottom));
    }
  }
}

@media (max-width: 1024px) {
  .nav-list {
    position: fixed;
    top: var(--header-height);
    right: -100%;
    width: min(300px, 85%);
    height: calc(100vh - var(--header-height));
    background: rgba(5, 7, 10, 0.98);
    border-left: 1px solid var(--glass-border);
    padding: var(--space-lg);
    display: flex;
    flex-direction: column;
    transition: right var(--transition-base);
    z-index: 999;
    overflow-y: auto;
  }

  .nav-list.active {
    right: 0;
  }

  .nav-list ul {
    flex-direction: column;
    gap: var(--space-md);
    align-items: flex-start;
  }

  .nav-list a {
    font-size: 1.05rem;
    padding: 0.65rem 0;
    display: block;
    width: 100%;
  }

  .header-auth .btn-signup {
    display: none;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
  }
}

@media (max-width: 768px) {
  .footer-top {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .mobile-bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(5, 7, 10, 0.97);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--glass-border);
    display: flex;
    padding: 12px;
    gap: 10px;
    z-index: 1000;
  }

  .mobile-bottom-bar a {
    flex: 1;
    text-align: center;
    padding: 14px;
    border-radius: var(--radius-md);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.9rem;
  }

  .mobile-bottom-bar .btn-login {
    background: var(--surface-2);
    color: var(--text-primary);
    border: 1px solid var(--border-medium);
  }

  .mobile-bottom-bar .btn-register {
    background: linear-gradient(135deg, var(--cyan-primary), var(--purple-primary));
    color: white;
    border: none;
  }

  body {
    padding-bottom: 80px;
  }
}
