/* ==========================================================================
   1. VARIABLES - "COSMIC GLASS FRONTIER"
   ========================================================================== */
:root {
  /* Core Colors */
  --space-black: #020617;
  --space-dark: #0b1220;
  
  /* Typography Colors */
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #64748b;
  
  /* Gradients */
  --accent-gold: linear-gradient(135deg, #f59e0b, #f97316);
  --accent-blue: linear-gradient(135deg, #3b82f6, #6366f1);
  --accent-aurora: linear-gradient(135deg, #22d3ee, #a855f7);
  --gloss-layer: linear-gradient(135deg, rgba(255,255,255,0.12), rgba(255,255,255,0.02));
  
  /* Glassmorphism */
  --glass-bg: rgba(255, 255, 255, 0.04);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-blur: 28px;
  
  /* Glows */
  --glow-gold: rgba(245, 158, 11, 0.35);
  --glow-blue: rgba(59, 130, 246, 0.35);
  --glow-aurora: rgba(168, 85, 247, 0.35);
  
  /* Spacing */
  --spacing-desktop: 120px;
  --spacing-tablet: 80px;
  --spacing-mobile: 60px;
  
  /* Transitions */
  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   2. RESET & BASE
   ========================================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
  background-color: var(--space-black);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

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

ul {
  list-style: none;
}

/* ==========================================================================
   3. COSMIC BACKGROUND
   ========================================================================== */
.cosmic-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -2;
  background: var(--space-black);
  overflow: hidden;
}

.cosmic-bg::before,
.cosmic-bg::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
}

.cosmic-bg::before {
  background: 
    radial-gradient(circle at 20% 30%, rgba(59,130,246,0.15), transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(168,85,247,0.15), transparent 40%);
  z-index: -1;
  animation: bgBreathing 15s ease-in-out infinite alternate;
}

.particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(rgba(255,255,255,0.2) 1px, transparent 1px),
    radial-gradient(rgba(255,255,255,0.15) 1px, transparent 1px);
  background-size: 50px 50px, 90px 90px;
  background-position: 0 0, 25px 25px;
  animation: particleFloat 60s linear infinite;
  opacity: 0.6;
}

/* ==========================================================================
   4. LAYOUT SYSTEM
   ========================================================================== */
.main-layout {
  display: flex;
  min-height: 100vh;
}

.content-wrapper {
  flex: 1;
  margin-left: 100px; /* Space for floating nav */
  padding: 0 2rem;
  max-width: 1280px;
  margin-right: auto;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   5. HEADER & TOP BAR
   ========================================================================== */
.top-bar {
  position: fixed;
  top: 0;
  left: 100px;
  right: 0;
  height: 80px;
  padding: 0 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
  pointer-events: none; /* Let clicks pass through empty areas */
}

.top-bar > * {
  pointer-events: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-icon {
  width: 32px;
  height: 32px;
  fill: none;
  stroke: url(#gold-gradient);
  stroke-width: 2;
  filter: drop-shadow(0 0 8px var(--glow-gold));
}

.brand-text {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 1px;
  background: var(--text-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ==========================================================================
   6. FLOATING GLASS COMMAND NAV
   ========================================================================== */
.floating-nav {
  position: fixed;
  left: 24px;
  top: 50%;
  transform: translateY(-50%);
  width: 72px;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: 36px;
  padding: 24px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  z-index: 200;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5), inset 0 0 20px rgba(255,255,255,0.02);
}

.nav-item {
  position: relative;
  width: 48px;
  height: 48px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  color: var(--text-secondary);
  transition: var(--transition-smooth);
}

.nav-item svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  stroke-width: 1.5;
  fill: none;
  transition: var(--transition-smooth);
}

.nav-item:hover {
  color: var(--text-primary);
  transform: scale(1.08);
  background: rgba(255,255,255,0.08);
  box-shadow: 0 0 15px rgba(255,255,255,0.1);
}

.nav-item.active {
  color: #fff;
  background: var(--accent-blue);
  box-shadow: 0 0 20px var(--glow-blue);
  border: 1px solid rgba(255,255,255,0.2);
}

.nav-tooltip {
  position: absolute;
  left: 60px;
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--glass-border);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-10px);
  transition: var(--transition-smooth);
  white-space: nowrap;
}

.nav-item:hover .nav-tooltip {
  opacity: 1;
  transform: translateX(0);
}

/* ==========================================================================
   7. BUTTON SYSTEM
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 2rem;
  border-radius: 20px;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.5px;
  cursor: pointer;
  border: none;
  outline: none;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--accent-gold);
  color: #fff;
  box-shadow: 0 4px 15px var(--glow-gold);
}

.btn-primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 25px var(--glow-gold);
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: var(--gloss-layer);
  opacity: 0;
  transition: var(--transition-smooth);
}

.btn-primary:hover::before {
  opacity: 1;
}

.btn-secondary {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.08);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(255,255,255,0.05);
}

/* ==========================================================================
   8. HERO SECTION
   ========================================================================== */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding-top: 80px; /* Offset for top bar */
  position: relative;
}

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

.hero-label {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  backdrop-filter: blur(10px);
}

.hero-title {
  font-size: clamp(3rem, 6vw, 5rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  background: linear-gradient(to right, #fff, #cbd5e1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 4px 20px rgba(255,255,255,0.1));
}

.hero-title span {
  background: var(--accent-gold);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  position: relative;
}

.hero-subtitle {
  font-size: clamp(1.125rem, 2vw, 1.5rem);
  color: var(--text-secondary);
  margin-bottom: 3rem;
  max-width: 600px;
  margin-inline: auto;
}

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

/* ==========================================================================
   9. GAME SECTION
   ========================================================================== */
.game-section {
  padding: var(--spacing-desktop) 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1.125rem;
}

.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: 28px;
  padding: 2rem;
  width: 100%;
  max-width: 1200px;
  position: relative;
  transition: var(--transition-smooth);
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.glass-card::before {
  content: '';
  position: absolute;
  top: -1px; left: -1px; right: -1px; bottom: -1px;
  border-radius: 29px;
  background: linear-gradient(135deg, rgba(255,255,255,0.1), transparent, rgba(255,255,255,0.05));
  z-index: -1;
  pointer-events: none;
}

.glass-card:hover {
  transform: scale(1.01);
  box-shadow: 0 30px 60px rgba(0,0,0,0.5), 0 0 40px var(--glow-blue);
  border-color: rgba(255,255,255,0.15);
}

.game-container {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 16px;
  overflow: hidden;
  background: #000;
  position: relative;
}

.game-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.game-info {
  margin-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.game-details h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.game-details p {
  color: var(--text-secondary);
}

/* ==========================================================================
   10. FEATURES / INFO GRID
   ========================================================================== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  padding: var(--spacing-tablet) 0;
  max-width: 1200px;
  margin: 0 auto;
}

.feature-card {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 2.5rem;
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.feature-card:hover {
  transform: translateY(-10px);
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.12);
  box-shadow: 0 15px 30px rgba(0,0,0,0.3);
}

.feature-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: rgba(255,255,255,0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,0.1);
}

.feature-icon svg {
  width: 28px;
  height: 28px;
  stroke: url(#blue-gradient);
}

.feature-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ==========================================================================
   11. CONTENT PAGES (ABOUT, TERMS, ETC)
   ========================================================================== */
.page-header {
  padding: calc(var(--spacing-desktop) + 40px) 0 var(--spacing-tablet);
  text-align: center;
}

.page-content {
  max-width: 800px;
  margin: 0 auto;
  padding-bottom: var(--spacing-desktop);
}

.text-glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 3rem;
}

.text-glass-panel h2 {
  font-size: 1.75rem;
  margin: 2rem 0 1rem;
  color: #fff;
}

.text-glass-panel h2:first-child {
  margin-top: 0;
}

.text-glass-panel p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.text-glass-panel ul {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
  color: var(--text-secondary);
}

.text-glass-panel li {
  margin-bottom: 0.5rem;
  list-style-type: disc;
}

/* Contact Form */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.form-control {
  width: 100%;
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 1rem;
  color: #fff;
  font-family: inherit;
  transition: var(--transition-smooth);
}

.form-control:focus {
  outline: none;
  border-color: rgba(59,130,246,0.5);
  box-shadow: 0 0 15px rgba(59,130,246,0.2);
}

textarea.form-control {
  min-height: 150px;
  resize: vertical;
}

/* ==========================================================================
   12. FOOTER
   ========================================================================== */
.footer {
  margin-top: auto;
  padding: 4rem 2rem 2rem;
  border-top: 1px solid var(--glass-border);
  background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2rem;
}

.footer-nav {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-nav a {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.footer-nav a:hover {
  color: #fff;
}

.legal-notice {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--glass-border);
  padding: 1rem 2rem;
  border-radius: 12px;
  color: var(--text-muted);
  font-size: 0.75rem;
  max-width: 800px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.copyright {
  color: var(--text-muted);
  font-size: 0.875rem;
}

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

@keyframes bgBreathing {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(1.1); opacity: 1; }
}

@keyframes particleFloat {
  0% { background-position: 0 0, 25px 25px; }
  100% { background-position: 500px 500px, 525px 525px; }
}

/* ==========================================================================
   14. RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 1024px) {
  .top-bar {
    left: 0;
    padding: 0 2rem;
  }
  .content-wrapper {
    margin-left: 0;
    padding-bottom: 100px; /* Space for bottom nav */
  }
  
  /* Mobile App Style Bottom Nav */
  .floating-nav {
    top: auto;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 400px;
    flex-direction: row;
    justify-content: space-around;
    padding: 12px 24px;
    height: 72px;
  }
  
  .nav-tooltip {
    display: none;
  }
}

@media (max-width: 768px) {
  :root {
    --spacing-desktop: 80px;
    --spacing-tablet: 60px;
  }
  
  .hero-actions {
    flex-direction: column;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
  }
  
  .glass-card {
    padding: 1rem;
    border-radius: 20px;
  }
  
  .game-info {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .top-bar {
    height: 70px;
    padding: 0 1.5rem;
  }
  
  .brand-text {
    display: none; /* Icon only on small mobile */
  }
  
  .text-glass-panel {
    padding: 1.5rem;
  }
}