:root {
  /* Ultra Modern Color Palette */
  --primary: #00ff88; /* Cyberpunk / Crypto Neon Green */
  --primary-hover: #00cc6a;
  --primary-glass: rgba(0, 255, 136, 0.15);
  
  --secondary: #0f172a;
  
  --background: #ffffff;
  --surface: #f8fafc;
  --surface-glass: rgba(255, 255, 255, 0.6);
  
  --text: #334155;
  --text-muted: #64748b;
  --text-heading: #0f172a;
  
  --border: #e2e8f0;
  --border-glass: rgba(0, 0, 0, 0.05);
  
  /* Fonts */
  --font-sans: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-display: 'Space Grotesk', system-ui, sans-serif;

  /* Shadows */
  --shadow-glow: 0 0 20px rgba(0, 255, 136, 0.4);
  --shadow-card: 0 10px 30px -5px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] {
  --primary: #00ff88;
  --background: #050505; /* Pitch Black for cinematic feel */
  --surface: #111111;
  --surface-glass: rgba(17, 17, 17, 0.7);
  
  --text: #94a3b8;
  --text-muted: #64748b;
  --text-heading: #ffffff;
  
  --border: #222222;
  --border-glass: rgba(255, 255, 255, 0.05);
  
  --shadow-card: 0 10px 30px -5px rgba(0, 0, 0, 0.5);
}

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

html { scroll-behavior: smooth; font-size: 16px; overflow-x: hidden; }

body {
  font-family: var(--font-sans);
  background-color: var(--background);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

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

.container { max-width: 1280px; margin: 0 auto; padding: 0 1.5rem; }

/* Skip Link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 9999;
  background: #0a0e0f;
  color: #00ff88;
  padding: 0.75rem 1.25rem;
  border: 1px solid #00ff88;
  border-radius: 6px;
  text-decoration: none;
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

/* Accessibility Focus States */
a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Custom Cursor (Optional visual element) */
.cursor-dot {
  width: 8px;
  height: 8px;
  background-color: var(--primary);
  border-radius: 50%;
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 10000;
  transform: translate(-50%, -50%);
  transition: transform 0.1s ease-out;
}
.cursor-outline {
  width: 40px;
  height: 40px;
  border: 2px solid var(--primary);
  border-radius: 50%;
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.2s, height 0.2s, transform 0.15s ease-out;
}
.cursor-hover .cursor-outline {
  width: 60px; height: 60px;
  background-color: var(--primary-glass);
  border-color: transparent;
}

/* Typography */
h1, h2, h3, h4, h5, h6 { font-family: var(--font-display); color: var(--text-heading); font-weight: 700; letter-spacing: -0.03em; margin-bottom: 1rem;}
.text-gradient {
  background: linear-gradient(135deg, var(--primary) 0%, #00a3ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Header Glassmorphism */
.header {
  position: fixed;
  top: 0; width: 100%;
  z-index: 1000;
  background: var(--surface-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-glass);
}
.nav-container { display: flex; justify-content: space-between; align-items: center; height: 5rem; }
.logo { font-family: var(--font-display); font-size: 1.5rem; font-weight: 800; display: flex; align-items: center; gap: 0.5rem;}
.logo lord-icon { width: 32px; height: 32px; }
.nav-links { display: flex; gap: 2.5rem; }
.nav-link { font-weight: 600; font-size: 0.95rem; color: var(--text); transition: 0.3s; }
.nav-link:hover, .nav-link[aria-current="page"] { color: var(--primary); }

/* Mobile Navigation Toggle */
.mobile-nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid rgba(0, 255, 136, 0.4);
  border-radius: 6px;
  color: inherit;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

@media (max-width: 860px) {
  .mobile-nav-toggle { display: inline-flex; }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.5rem;
    display: none;
    gap: 1rem;
  }
  .nav-links.is-open { display: flex; }
  .d-none-mobile { display: none !important; }
}

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 0.75rem 1.5rem; border-radius: 99px; font-weight: 600; transition: 0.3s; font-family: var(--font-sans); gap: 0.5rem; border: none; cursor: pointer; text-decoration: none; }
.btn-primary { background: var(--primary); color: #000 !important; box-shadow: var(--shadow-glow); }
.btn-primary:hover { transform: scale(1.05); box-shadow: 0 0 30px rgba(0,255,136,0.6); }
.btn-lg { padding: 1rem 2.5rem; font-size: 1.125rem; }
.btn-glass { background: var(--surface-glass); border: 1px solid var(--border-glass); backdrop-filter: blur(10px); color: var(--text-heading); }
.btn-glass:hover { background: var(--border); }

/* Vanta Hero Section */
.hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  padding-top: 5rem;
  overflow: hidden;
}
.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
}
.badge-pill {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--surface-glass);
  border: 1px solid var(--border-glass);
  padding: 0.5rem 1rem;
  border-radius: 99px;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 2rem;
  backdrop-filter: blur(10px);
  color: var(--text-heading);
}
.badge-dot { width: 8px; height: 8px; background: var(--primary); border-radius: 50%; box-shadow: var(--shadow-glow); animation: pulse 2s infinite; }
@keyframes pulse { 0% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.5); opacity: 0.5; } 100% { transform: scale(1); opacity: 1; } }

.cinematic-title { font-size: clamp(2.5rem, 6vw, 5rem); line-height: 1.1; margin-bottom: 1.5rem; text-shadow: 0 10px 30px rgba(0,0,0,0.3);}
.hero-subtitle { font-size: clamp(1.125rem, 2vw, 1.35rem); max-width: 700px; margin: 0 auto 2.5rem; color: var(--text-muted); }

.hero-actions { display: flex; gap: 1.5rem; justify-content: center; margin-bottom: 4rem;}

/* Dark Glass Sections */
.section-dark-glass { background: rgba(0,0,0,0.02); }
[data-theme="dark"] .section-dark-glass { background: #0a0a0a; border-top: 1px solid #1a1a1a; border-bottom: 1px solid #1a1a1a; }
.section { padding: 6rem 0; }
.section-title { font-size: clamp(1.75rem, 3.5vw, 2.75rem); text-align: center; margin-bottom: 1rem; }
.section-subtitle { text-align: center; color: var(--text-muted); font-size: 1.15rem; margin-bottom: 3.5rem; max-width: 800px; margin-left: auto; margin-right: auto; }

/* Grid */
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.75rem; }

/* Tilt Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 2.25rem;
  border-radius: 20px;
  box-shadow: var(--shadow-card);
  transform-style: preserve-3d;
  position: relative;
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}
.card:hover {
  border-color: var(--primary-glass);
}
.card-title { font-size: 1.35rem; transform: translateZ(20px); }
.card-desc { transform: translateZ(10px); margin-bottom: 1.5rem; color: var(--text-muted); font-size: 0.95rem; line-height: 1.6; }
.card-link { color: var(--primary); font-weight: 700; display: inline-flex; align-items: center; transform: translateZ(20px); }
.card-link:hover { text-decoration: underline; }

/* Level Cards */
.level-item.is-upcoming { opacity: 0.6; }
.level-tag {
  display: inline-block;
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(0, 255, 136, 0.4);
  color: var(--primary);
  margin-bottom: 0.5rem;
}

/* FAQ Details/Summary Accordion */
.faq-item summary {
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  color: var(--text-heading);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  flex-shrink: 0;
  font-size: 1.25rem;
  color: var(--primary);
}
.faq-item[open] summary::after { content: "−"; }
.faq-item p { margin-top: 0.75rem; }

/* Theme Toggle & Tools */
.theme-toggle, .menu-btn { background: transparent; border: none; font-size: 1.25rem; color: var(--text-heading); cursor: pointer; }

/* Cookie Consent Banner */
.cookie-consent-banner {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 800px;
  background: var(--surface-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--primary);
  border-radius: 20px;
  padding: 1.5rem 2rem;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: var(--shadow-glow);
}
@media (min-width: 768px) {
  .cookie-consent-banner { flex-direction: row; align-items: center; justify-content: space-between; }
}
.cookie-content h4 { margin-bottom: 0.5rem; color: var(--text-heading); }
.cookie-content p { font-size: 0.875rem; color: var(--text-muted); margin-bottom: 0; }
.cookie-content a { color: var(--primary); text-decoration: underline; }

/* Typed.js Cursor */
.typed-cursor {
  color: var(--primary);
  font-size: 1.2em;
  animation: blink 1s infinite;
}
@keyframes blink { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }

/* Article & Content Page Styles */
.article-header { margin-bottom: 3rem; text-align: center; max-width: 800px; margin-left: auto; margin-right: auto; padding-top: 4rem;}
.article-content { max-width: 780px; margin: 0 auto; font-size: 1.05rem; color: var(--text); line-height: 1.7; }
.article-content h2 { margin-top: 2.5rem; margin-bottom: 1rem; font-size: 1.85rem; color: var(--text-heading);}
.article-content h3 { margin-top: 1.75rem; margin-bottom: 0.75rem; font-size: 1.35rem; color: var(--text-heading);}
.article-content p { margin-bottom: 1.35rem; }
.article-content ul, .article-content ol { margin-bottom: 1.5rem; padding-left: 1.5rem; }
.article-content li { margin-bottom: 0.5rem; }

.breadcrumbs { display: flex; gap: 0.5rem; margin-bottom: 2rem; list-style: none; font-size: 0.9rem; color: var(--text-muted); flex-wrap: wrap; }
.breadcrumbs a { color: var(--primary); }
.breadcrumbs li+li::before { content: "/"; padding-right: 0.5rem; color: var(--text-muted); }

.read-progress-container { position: fixed; top: 0; left: 0; width: 100%; height: 3px; z-index: 9999; }
.read-progress-bar { height: 100%; background: var(--primary); width: 0%; }

.warning-box, .info-box {
  padding: 1.5rem;
  margin: 1.75rem 0;
  border-radius: 12px;
  font-size: 0.95rem;
  line-height: 1.65;
}
.warning-box {
  background: rgba(245, 158, 11, 0.1);
  border-left: 4px solid #f59e0b;
  color: var(--text-heading);
}
.info-box {
  background: var(--primary-glass);
  border-left: 4px solid var(--primary);
  color: var(--text-heading);
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  background: var(--surface);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
}
th, td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}
th {
  background: var(--background);
  color: var(--text-heading);
  font-weight: 700;
}
tr:last-child td { border-bottom: none; }

/* Calculators & Form controls */
.calculator-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2.25rem;
  max-width: 650px;
  margin: 0 auto 2.5rem;
  box-shadow: var(--shadow-card);
}
.form-group { margin-bottom: 1.35rem; }
.form-group label { display: block; margin-bottom: 0.5rem; font-weight: 600; color: var(--text-heading); }
.form-control {
  width: 100%;
  padding: 0.85rem 1.15rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--background);
  color: var(--text-heading);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.3s;
}
.form-control:focus {
  outline: none;
  border-color: var(--primary);
}
.calc-result {
  margin-top: 1.5rem;
  padding: 1.5rem;
  background: var(--primary-glass);
  border-radius: 12px;
  text-align: center;
  border: 1px solid rgba(0, 255, 136, 0.3);
}
.calc-result-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
  font-family: var(--font-display);
  margin-top: 0.25rem;
}
.search-container {
  max-width: 600px;
  margin: 0 auto 3rem;
  position: relative;
}
.search-input {
  width: 100%;
  padding: 1rem 1.5rem;
  padding-right: 3rem;
  border: 1px solid var(--border);
  border-radius: 99px;
  font-size: 1.05rem;
  background: var(--surface);
  color: var(--text-heading);
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
