:root {
  /* Colors - Backgrounds */
  --bg-primary: #020617;
  --bg-secondary: #0f172a;
  --bg-elevated: #111827;
  --bg-deep: #071120;

  /* Colors - Accents (Gradients) */
  --grad-cyan: linear-gradient(135deg, #06b6d4, #67e8f9);
  --grad-blue: linear-gradient(135deg, #3b82f6, #60a5fa);
  --grad-purple: linear-gradient(135deg, #7c3aed, #c084fc);
  --grad-mint: linear-gradient(135deg, #10b981, #6ee7b7);
  --grad-premium: linear-gradient(135deg, #06b6d4, #7c3aed, #3b82f6);

  /* Colors - Glow Effects */
  --glow-cyan: rgba(6, 182, 212, 0.45);
  --glow-blue: rgba(59, 130, 246, 0.45);
  --glow-purple: rgba(124, 58, 237, 0.40);
  --glow-mint: rgba(16, 185, 129, 0.35);

  /* Glassmorphism */
  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-bg-hover: rgba(255, 255, 255, 0.08);
  --glass-blur: blur(24px);
  --glass-border: 1px solid rgba(255, 255, 255, 0.08);
  --glass-border-highlight: 1px solid rgba(255, 255, 255, 0.15);

  /* Typography */
  --font-primary: 'Space Grotesk', sans-serif;
  --font-secondary: 'Inter', sans-serif;
  
  /* Text Colors */
  --text-primary: #ffffff;
  --text-secondary: #dbeafe;
  --text-muted: #94a3b8;

  /* Layout */
  --container-max: 1340px;
  --game-max: 1220px;
  --space-desktop: 120px;
  --space-tablet: 80px;
  --space-mobile: 60px;
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 32px;
  
  /* Transitions */
  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-family: var(--font-secondary);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: rgba(6, 182, 212, 0.3);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(6, 182, 212, 0.6);
}

/* Global Background Elements */
.global-bg {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  z-index: -2;
  background: radial-gradient(circle at 50% 0%, var(--bg-secondary) 0%, var(--bg-primary) 100%);
  overflow: hidden;
}

.ambient-glow {
  position: absolute;
  width: 60vw;
  height: 60vw;
  background: radial-gradient(circle, var(--glow-purple) 0%, transparent 60%);
  top: -20%;
  left: -10%;
  filter: blur(100px);
  opacity: 0.3;
  animation: floatAmbient 15s infinite alternate ease-in-out;
}

.ambient-glow-2 {
  position: absolute;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, var(--glow-cyan) 0%, transparent 60%);
  bottom: -10%;
  right: -10%;
  filter: blur(120px);
  opacity: 0.2;
  animation: floatAmbient 20s infinite alternate-reverse ease-in-out;
}

/* Typography Utilities */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-primary);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-smooth);
}

.text-gradient-cyan {
  background: var(--grad-cyan);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.text-gradient-premium {
  background: var(--grad-premium);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Layout Utilities */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}
.section {
  padding: var(--space-desktop) 0;
}

/* Glassmorphism Classes */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  font-family: var(--font-primary);
  font-weight: 600;
  font-size: 1rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-smooth);
  border: none;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--grad-premium);
  color: #fff;
  box-shadow: 0 0 20px var(--glow-purple);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px var(--glow-cyan);
}

.btn-glass {
  background: var(--glass-bg);
  border: var(--glass-border);
  color: var(--text-primary);
  backdrop-filter: var(--glass-blur);
}
.btn-glass:hover {
  background: var(--glass-bg-hover);
  border: var(--glass-border-highlight);
  transform: translateY(-2px);
  box-shadow: 0 0 20px var(--glow-blue);
}

/* Floating Holographic Header */
.site-header {
  position: fixed;
  top: 24px;
  left: 0;
  width: 100%;
  z-index: 100;
  display: flex;
  justify-content: center;
  padding: 0 24px;
}

.nav-capsule {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1100px;
  height: 70px;
  padding: 0 24px;
  background: var(--glass-bg);
  backdrop-filter: blur(32px);
  border: var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 40px rgba(0,0,0,0.5), inset 0 0 0 1px rgba(255,255,255,0.05);
  animation: borderGlow 4s infinite alternate;
}

/* Logo */
.logo-container {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-primary);
  font-weight: 700;
  font-size: 1.25rem;
  color: #fff;
}
.radar-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid rgba(6, 182, 212, 0.5);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 15px var(--glow-cyan);
}
.radar-icon::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 70%, rgba(6, 182, 212, 0.8) 100%);
  animation: radarSpin 2s linear infinite;
}
.radar-icon::after {
  content: '';
  width: 6px;
  height: 6px;
  background: #06b6d4;
  border-radius: 50%;
  box-shadow: 0 0 10px #06b6d4;
}

/* Nav Links */
.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}
.nav-links a {
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-weight: 500;
  position: relative;
  padding: 8px 0;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--grad-cyan);
  transition: var(--transition-smooth);
  box-shadow: 0 0 10px var(--glow-cyan);
}
.nav-links a:hover {
  color: #fff;
  text-shadow: 0 0 10px rgba(255,255,255,0.5);
}
.nav-links a:hover::after, .nav-links a.active::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  gap: 16px;
}
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 100px; /* Offset for nav */
  overflow: hidden;
}

.hero-particles {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: 
    radial-gradient(circle at 20% 30%, rgba(6, 182, 212, 0.15) 0%, transparent 20%),
    radial-gradient(circle at 80% 70%, rgba(124, 58, 237, 0.15) 0%, transparent 20%);
  z-index: -1;
  animation: pulseBg 8s infinite alternate;
}

.hero-content {
  max-width: 900px;
  position: relative;
  z-index: 2;
}

.hero-badge {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.3);
  border-radius: 30px;
  font-size: 0.85rem;
  color: #06b6d4;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 24px;
  box-shadow: 0 0 15px var(--glow-cyan);
}

.hero h1 {
  font-size: clamp(3rem, 5vw, 5rem);
  margin-bottom: 24px;
  line-height: 1.1;
  text-shadow: 0 0 40px rgba(255,255,255,0.2);
}

.hero p.subtext {
  font-size: clamp(1.1rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  margin-bottom: 40px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  gap: 24px;
  justify-content: center;
  margin-bottom: 60px;
}

.legal-warning-hero {
  background: var(--glass-bg);
  border: var(--glass-border);
  padding: 16px 32px;
  border-radius: var(--radius-sm);
  display: inline-block;
  backdrop-filter: var(--glass-blur);
}
.legal-warning-hero p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.legal-warning-hero span {
  display: block;
  color: #fff;
  font-weight: 600;
  margin-top: 4px;
}

/* Game Section */
.game-section {
  position: relative;
  z-index: 5;
  margin-top: -50px;
  padding-bottom: var(--space-desktop);
}

.game-wrapper {
  max-width: var(--game-max);
  margin: 0 auto;
  position: relative;
  border-radius: var(--radius-lg);
  padding: 8px; /* For animated border */
  background: linear-gradient(135deg, rgba(6,182,212,0.3), rgba(124,58,237,0.3));
  box-shadow: 0 20px 80px rgba(0,0,0,0.6), 0 0 40px var(--glow-cyan);
  transition: transform 0.3s ease;
}
.game-wrapper:hover {
  transform: scale(1.01);
  box-shadow: 0 20px 100px rgba(0,0,0,0.8), 0 0 60px var(--glow-purple);
}

.game-container {
  background: var(--bg-deep);
  border-radius: calc(var(--radius-lg) - 4px);
  overflow: hidden;
  position: relative;
  aspect-ratio: 16/9;
  width: 100%;
}
.game-container iframe {
  width: 100%;
  height: 100%;
  border: none;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 10;
}
.game-loading {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg-deep);
  z-index: 5;
}

.game-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
  padding: 0 24px;
}
.game-title {
  font-size: 1.5rem;
  font-family: var(--font-primary);
}
.game-tags span {
  background: var(--glass-bg);
  border: var(--glass-border);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-left: 8px;
}

/* Bento Grid Features */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: minmax(280px, auto);
  gap: 24px;
}

.bento-card {
  position: relative;
  overflow: hidden;
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  transition: var(--transition-smooth);
}
.bento-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255,255,255,0.2);
}
.bento-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(to top, rgba(7, 17, 32, 0.9) 0%, rgba(7, 17, 32, 0.2) 100%);
  z-index: 1;
}
.bento-img {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  object-fit: cover;
  z-index: 0;
  opacity: 0.5;
  transition: transform 0.5s ease;
}
.bento-card:hover .bento-img {
  transform: scale(1.05);
  opacity: 0.7;
}

.bento-content {
  position: relative;
  z-index: 2;
}
.bento-icon {
  font-size: 2rem;
  margin-bottom: 16px;
  color: #06b6d4;
  filter: drop-shadow(0 0 10px #06b6d4);
}
.bento-title {
  font-size: 1.5rem;
  margin-bottom: 8px;
}
.bento-text {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Specific Bento Placements */
.bento-large { grid-column: span 2; grid-row: span 2; }
.bento-wide { grid-column: span 2; }

/* Stats Dashboard */
.stats-dashboard {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
}
.stat-widget {
  padding: 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.stat-value {
  font-size: 3rem;
  font-family: var(--font-primary);
  font-weight: 700;
  background: var(--grad-cyan);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 8px;
  display: inline-block;
}
.stat-label {
  color: var(--text-secondary);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Content Pages (Legal, About, etc.) */
.page-header {
  padding: 180px 0 80px;
  text-align: center;
  background: radial-gradient(circle at 50% 100%, rgba(6, 182, 212, 0.1) 0%, transparent 50%);
}
.page-header h1 {
  font-size: 3.5rem;
  margin-bottom: 16px;
}
.page-header p {
  color: var(--text-secondary);
  font-size: 1.2rem;
  max-width: 600px;
  margin: 0 auto;
}

.content-section {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px 120px;
}

/* Document Panel Enhancements */
.document-panel {
  padding: 64px;
  background: var(--bg-elevated);
  border-radius: var(--radius-lg);
  border: var(--glass-border);
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}
.document-panel h2 {
  font-size: 2rem;
  margin: 48px 0 24px;
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding-bottom: 16px;
}
.document-panel h2:first-child {
  margin-top: 0;
}
.document-panel p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 24px;
}
.document-panel ul {
  list-style: none;
  margin-bottom: 32px;
  padding-left: 24px;
}
.document-panel ul li {
  position: relative;
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.8;
  font-size: 1.1rem;
}
.document-panel ul li::before {
  content: '▹';
  position: absolute;
  left: -24px;
  color: #06b6d4;
  font-size: 1.2rem;
}

/* Contact Grid */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}
.contact-info-card {
  padding: 32px;
  margin-bottom: 24px;
}
.contact-info-card h3 {
  margin-bottom: 16px;
  color: #fff;
}
.contact-info-card p {
  color: var(--text-secondary);
  margin-bottom: 8px;
}

/* Footer */
.site-footer {
  margin-top: auto;
  background: var(--bg-elevated);
  border-top: var(--glass-border);
  padding: 80px 0 40px;
  position: relative;
}
.site-footer::before {
  content: '';
  position: absolute;
  top: -1px; left: 0; width: 100%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(6, 182, 212, 0.5), transparent);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 60px;
}
.footer-col h4 {
  color: #fff;
  font-size: 1.1rem;
  margin-bottom: 24px;
}
.footer-desc {
  color: var(--text-muted);
  line-height: 1.6;
  margin-top: 16px;
  max-width: 300px;
}
.footer-links {
  list-style: none;
}
.footer-links li {
  margin-bottom: 12px;
}
.footer-links a {
  color: var(--text-secondary);
  font-size: 0.95rem;
}
.footer-links a:hover {
  color: #06b6d4;
  padding-left: 4px;
}
.footer-legal-box {
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.05);
  padding: 24px;
  border-radius: var(--radius-sm);
  text-align: center;
  margin-bottom: 40px;
}
.footer-legal-box p {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.5;
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.05);
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Animations */
@keyframes borderGlow {
  0% { box-shadow: 0 10px 40px rgba(0,0,0,0.5), inset 0 0 0 1px rgba(6, 182, 212, 0.2); }
  100% { box-shadow: 0 10px 40px rgba(0,0,0,0.6), inset 0 0 0 1px rgba(124, 58, 237, 0.4); }
}
@keyframes radarSpin {
  100% { transform: rotate(360deg); }
}
@keyframes floatAmbient {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(5%, 5%) scale(1.1); }
}
@keyframes pulseBg {
  0% { opacity: 0.6; }
  100% { opacity: 1; }
}

/* Responsive */
@media (max-width: 1024px) {
  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .bento-large { grid-column: span 2; grid-row: span 1; }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  :root {
    --space-desktop: var(--space-tablet);
  }
}

@media (max-width: 768px) {
  .nav-links, .nav-actions .btn {
    display: none;
  }
  .mobile-toggle {
    display: block;
  }
  .site-header {
    top: auto;
    bottom: 24px;
  }
  .nav-capsule {
    height: 60px;
  }
  .hero {
    padding-top: 60px;
  }
  .hero-actions {
    flex-direction: column;
    padding: 0 24px;
  }
  .bento-grid {
    grid-template-columns: 1fr;
  }
  .bento-large, .bento-wide {
    grid-column: span 1;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
  .game-container {
    aspect-ratio: 4/3;
  }
  .game-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .document-panel {
    padding: 32px 24px;
  }
  .document-panel h2 {
    font-size: 1.5rem;
    margin: 32px 0 16px;
  }
  :root {
    --space-desktop: var(--space-mobile);
  }
}