@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&display=swap');

:root {
  --bg-primary: #020617;
  --bg-secondary: #050a14;
  --rock-layer: rgba(255, 255, 255, 0.03);
  --glass-surface: rgba(255, 255, 255, 0.04);
  
  --cyan: #06b6d4;
  --violet: #7c3aed;
  --gold: #facc15;
  
  --grad-cyan: linear-gradient(135deg, #06b6d4, #22d3ee);
  --grad-violet: linear-gradient(135deg, #7c3aed, #a855f7);
  --grad-gold: linear-gradient(135deg, #facc15, #fde047);
  --grad-core: linear-gradient(135deg, #06b6d4, #7c3aed, #facc15);
  
  --glow-cyan: rgba(6, 182, 212, 0.45);
  --glow-violet: rgba(124, 58, 237, 0.45);
  --glow-gold: rgba(250, 204, 21, 0.35);
  
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  
  --font-tech: 'Space Grotesk', sans-serif;
  
  --z-base: 1;
  --z-glass: 10;
  --z-header: 100;
  --z-nav: 200;
  --z-cursor: 9999;
}

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

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

body {
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  background: radial-gradient(circle at 50% 0%, var(--bg-secondary) 0%, var(--bg-primary) 70%);
}

/* Background Depth Overlay */
.grid-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: 
    linear-gradient(var(--rock-layer) 1px, transparent 1px),
    linear-gradient(90deg, var(--rock-layer) 1px, transparent 1px);
  background-size: 60px 60px;
  z-index: 0;
  pointer-events: none;
  perspective: 1000px;
}

.grid-overlay::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(circle at 50% 50%, transparent 20%, var(--bg-primary) 100%);
}

/* Cursor Glow */
.cursor-glow {
  position: fixed;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--glow-cyan) 0%, transparent 60%);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: var(--z-base);
  opacity: 0.3;
  transition: opacity 0.3s ease;
  mix-blend-mode: screen;
}

/* Layout */
.app-container {
  display: flex;
  min-height: 100vh;
  position: relative;
  z-index: var(--z-glass);
}

.main-content {
  flex: 1;
  margin-left: 0;
  padding-bottom: 80px;
  display: flex;
  flex-direction: column;
}

/* Floating Side Nav */
.side-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 70px;
  background: var(--glass-surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(6, 182, 212, 0.2);
  z-index: var(--z-nav);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 0 20px;
  box-shadow: 0 -10px 40px rgba(0,0,0,0.5);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 500;
  transition: all 0.3s ease;
  padding: 8px 12px;
  border-radius: 12px;
}

.nav-item svg {
  width: 24px;
  height: 24px;
  margin-bottom: 4px;
  fill: currentColor;
  transition: all 0.3s ease;
}

.nav-item:hover, .nav-item.active {
  color: var(--cyan);
  background: rgba(6, 182, 212, 0.1);
  box-shadow: 0 0 15px var(--glow-cyan);
  transform: translateY(-2px);
}

/* Header */
.top-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 80px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  background: linear-gradient(to bottom, rgba(2,6,23,0.9), transparent);
  z-index: var(--z-header);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-icon {
  width: 40px;
  height: 40px;
  background: var(--glass-surface);
  border: 1px solid rgba(124, 58, 237, 0.4);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 0 20px var(--glow-violet);
  animation: float 3s ease-in-out infinite;
}

.brand-name {
  color: var(--text-primary);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  background: var(--grad-cyan);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: 18px;
  font-family: var(--font-tech);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  outline: none;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--grad-core);
  color: #000;
  box-shadow: 0 0 20px var(--glow-cyan);
}

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

.btn-primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 0 30px var(--glow-violet), 0 0 10px var(--glow-cyan);
}

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

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

.btn-secondary {
  background: var(--glass-surface);
  color: var(--cyan);
  border: 1px solid rgba(6, 182, 212, 0.4);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: rgba(6, 182, 212, 0.1);
  box-shadow: 0 0 15px var(--glow-cyan) inset;
  transform: translateY(-2px);
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 100px 20px;
  text-align: center;
}

.hero-content {
  max-width: 800px;
  z-index: 2;
  animation: fadeInDown 1s ease-out forwards;
}

.hero-tag {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(250, 204, 21, 0.1);
  border: 1px solid rgba(250, 204, 21, 0.3);
  color: var(--gold);
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 24px;
  box-shadow: 0 0 15px var(--glow-gold);
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  line-height: 1.1;
  margin-bottom: 24px;
  background: linear-gradient(180deg, #ffffff 0%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 20px rgba(255,255,255,0.1));
}

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

.hero-cta {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-legal {
  margin-top: 40px;
  font-size: 0.8rem;
  color: rgba(148, 163, 184, 0.5);
}

/* Floating Particles */
.particles {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  overflow: hidden;
  pointer-events: none;
}

.particle {
  position: absolute;
  background: var(--cyan);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--cyan);
  animation: floatParticle linear infinite;
  opacity: 0.3;
}

@keyframes floatParticle {
  0% { transform: translateY(100vh) scale(0); opacity: 0; }
  20% { opacity: 0.6; }
  80% { opacity: 0.6; }
  100% { transform: translateY(-20vh) scale(1); opacity: 0; }
}

/* Game Section */
.game-section {
  padding: 80px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-header h2 {
  font-size: 2.5rem;
  margin-bottom: 16px;
  background: var(--grad-violet);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.game-container {
  width: 100%;
  max-width: 1200px;
  position: relative;
  border-radius: 24px;
  background: var(--bg-secondary);
  padding: 4px; /* Space for animated border */
  z-index: 1;
  transition: transform 0.3s ease;
}

.game-container::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--grad-core);
  border-radius: 24px;
  z-index: -1;
  animation: borderGlow 4s linear infinite;
  background-size: 200% 200%;
}

.game-container::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--grad-core);
  border-radius: 24px;
  z-index: -2;
  filter: blur(20px);
  opacity: 0.5;
  animation: borderGlow 4s linear infinite;
  background-size: 200% 200%;
}

.game-container:hover {
  transform: scale(1.02);
}

.game-frame-wrapper {
  background: var(--bg-primary);
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  aspect-ratio: 16/9;
  width: 100%;
}

.game-frame-wrapper iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* Features Grid */
.features-section {
  padding: 80px 20px;
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.feature-card {
  background: var(--glass-surface);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 24px;
  padding: 40px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: radial-gradient(circle at top right, var(--glow-cyan), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 0;
  pointer-events: none;
}

.feature-card:hover {
  transform: translateY(-5px);
  border-color: rgba(6, 182, 212, 0.3);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

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

.feature-icon {
  width: 60px;
  height: 60px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 24px;
  position: relative;
  z-index: 1;
  color: var(--cyan);
}

.feature-card h3 {
  font-size: 1.5rem;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}

.feature-card p {
  color: var(--text-secondary);
  line-height: 1.6;
  position: relative;
  z-index: 1;
}

/* Internal Page Styles (About, Terms, etc.) */
.page-hero {
  padding: 160px 20px 80px;
  text-align: center;
  background: linear-gradient(to bottom, rgba(6,182,212,0.1), transparent);
}

.page-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px 80px;
}

.glass-box {
  background: var(--glass-surface);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 24px;
  padding: 40px;
}

.glass-box h2, .glass-box h3 {
  margin-top: 24px;
  margin-bottom: 16px;
  color: var(--cyan);
}

.glass-box p {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 16px;
}

.glass-box ul {
  margin-left: 20px;
  margin-bottom: 16px;
  color: var(--text-secondary);
  line-height: 1.8;
}

/* Contact Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.form-control {
  background: rgba(0,0,0,0.5);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 16px;
  color: var(--text-primary);
  font-family: var(--font-tech);
  transition: all 0.3s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.2);
}

/* Footer */
.footer {
  background: #000;
  padding: 60px 20px 40px;
  border-top: 1px solid rgba(255,255,255,0.05);
  position: relative;
  z-index: 10;
}

.footer-content {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand p {
  color: var(--text-secondary);
  margin-top: 16px;
  max-width: 300px;
}

.footer-links h4 {
  color: var(--text-primary);
  margin-bottom: 20px;
}

.footer-links ul {
  list-style: none;
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.3s ease;
}

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

.footer-bottom {
  text-align: center;
  padding-top: 40px;
  border-top: 1px solid rgba(255,255,255,0.05);
  color: rgba(148, 163, 184, 0.6);
  font-size: 0.875rem;
}

.footer-disclaimer {
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 16px;
  display: block;
}

/* Animations */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

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

@keyframes borderGlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Desktop Media Queries */
@media (min-width: 768px) {
  .side-nav {
    top: 0;
    bottom: 0;
    left: 0;
    width: 90px;
    height: 100vh;
    flex-direction: column;
    padding: 40px 0;
    border-top: none;
    border-right: 1px solid rgba(6, 182, 212, 0.2);
    box-shadow: 10px 0 40px rgba(0,0,0,0.5);
  }

  .nav-item {
    padding: 16px;
  }

  .top-header {
    left: 90px;
    padding: 0 40px;
  }

  .main-content {
    margin-left: 90px;
    padding-bottom: 0;
  }

  .hero {
    padding-top: 0;
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .features-grid .feature-card:nth-child(1) {
    grid-column: span 2;
  }

  .footer-content {
    grid-template-columns: 2fr 1fr 1fr;
  }
}

@media (min-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .features-grid .feature-card:nth-child(1) {
    grid-column: span 2;
  }
}

/* Utility Classes */
.text-cyan { color: var(--cyan); }
.text-violet { color: var(--violet); }
.text-gold { color: var(--gold); }