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

:root {
  /* Colors */
  --bg-primary: #04060d;
  --bg-secondary: #0a1020;
  --bg-overlay: #111827;
  
  /* Accents */
  --accent-blue: #38bdf8;
  --accent-blue-dark: #2563eb;
  --accent-purple: #c084fc;
  --accent-purple-dark: #8b5cf6;
  --accent-orange: #fb923c;
  --accent-orange-dark: #f97316;
  
  /* Gradients */
  --gradient-blue: linear-gradient(135deg, var(--accent-blue), var(--accent-blue-dark));
  --gradient-purple: linear-gradient(135deg, var(--accent-purple-dark), var(--accent-purple));
  --gradient-orange: linear-gradient(135deg, var(--accent-orange), var(--accent-orange-dark));
  --gradient-premium: linear-gradient(135deg, var(--accent-blue), var(--accent-purple-dark));
  
  /* Typography Colors */
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #64748b;
  
  /* Glass UI */
  --glass-bg: rgba(255, 255, 255, 0.06);
  --glass-border: 1px solid rgba(255, 255, 255, 0.08);
  --glass-blur: blur(20px);
  
  /* Shadows & Glows */
  --glow-blue: rgba(56, 189, 248, 0.45);
  --glow-purple: rgba(139, 92, 246, 0.45);
  --glow-orange: rgba(249, 115, 22, 0.35);
  
  /* Layout */
  --container-width: 1320px;
  --nav-width: 80px;
}

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

html {
  scroll-behavior: smooth;
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 15% 50%, rgba(56, 189, 248, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 85% 30%, rgba(139, 92, 246, 0.08) 0%, transparent 50%);
  background-attachment: fixed;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1rem;
}

a {
  color: var(--text-primary);
  text-decoration: none;
  transition: all 0.3s ease;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 120px;
}

/* Typography Utilities */
.text-gradient {
  background: var(--gradient-premium);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.text-gradient-orange {
  background: var(--gradient-orange);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

/* Layout Utilities */
section {
  padding: 120px 0;
  position: relative;
}

/* Floating Command Panel (Navigation) */
.command-panel {
  position: fixed;
  left: 30px;
  top: 50%;
  transform: translateY(-50%);
  width: var(--nav-width);
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: var(--glass-border);
  border-radius: 30px;
  padding: 30px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  z-index: 1000;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5), 0 0 15px rgba(255, 255, 255, 0.02) inset;
  animation: floatPanel 6s ease-in-out infinite;
}

.nav-item {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  position: relative;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.nav-item svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  transition: all 0.3s ease;
}

.nav-item::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--gradient-blue);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.nav-item:hover {
  color: #fff;
  transform: scale(1.15);
  box-shadow: 0 0 15px var(--glow-blue);
}

.nav-item:hover::before, .nav-item.active::before {
  opacity: 1;
}

.nav-item.active {
  color: #fff;
  box-shadow: 0 0 20px var(--glow-blue);
}

.nav-tooltip {
  position: absolute;
  left: 60px;
  background: var(--bg-overlay);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-10px);
  transition: all 0.3s ease;
  border: var(--glass-border);
}

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

/* Top Right Command Station */
.top-command {
  position: fixed;
  top: 30px;
  right: 40px;
  display: flex;
  align-items: center;
  gap: 20px;
  z-index: 1000;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  padding: 8px 16px;
  border-radius: 20px;
  border: var(--glass-border);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.status-dot {
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 10px #10b981;
  animation: pulseDot 2s infinite;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: 20px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  border: none;
  z-index: 1;
}

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

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

.btn-primary {
  background: var(--gradient-blue);
  color: #fff;
  box-shadow: 0 0 20px var(--glow-blue);
  border: 1px solid rgba(255,255,255,0.1);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px var(--glow-blue);
}

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

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

.btn-secondary:hover {
  background: rgba(255,255,255,0.1);
  transform: translateY(-2px);
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  padding-left: 120px; /* Offset for nav and visual balance */
  padding-top: 100px; /* Safe space from top-command */
  padding-bottom: 60px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: url('images/cosmic-nebula-bg.jpg') center/cover no-repeat;
  opacity: 0.4;
  animation: slowZoom 30s infinite alternate;
}

.hero-particles {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: 
    radial-gradient(2px 2px at 20px 30px, #ffffff, rgba(0,0,0,0)),
    radial-gradient(2px 2px at 40px 70px, #ffffff, rgba(0,0,0,0)),
    radial-gradient(2px 2px at 50px 160px, #ffffff, rgba(0,0,0,0)),
    radial-gradient(2px 2px at 90px 40px, #ffffff, rgba(0,0,0,0)),
    radial-gradient(2px 2px at 130px 80px, #ffffff, rgba(0,0,0,0)),
    radial-gradient(2px 2px at 160px 120px, #ffffff, rgba(0,0,0,0));
  background-repeat: repeat;
  background-size: 200px 200px;
  animation: moveParticles 100s linear infinite;
  opacity: 0.3;
}

.hero-content {
  max-width: 900px;
  width: 100%;
  position: relative;
  z-index: 10;
  padding: 0 20px;
}

.hero-title {
  font-size: clamp(3rem, 6vw, 5.5rem);
  letter-spacing: -0.03em;
  margin-bottom: 24px;
  text-shadow: 0 0 40px rgba(56, 189, 248, 0.3);
}

.hero-subtitle {
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  color: var(--text-secondary);
  margin-bottom: 40px;
  max-width: 600px;
  margin-inline: auto;
  line-height: 1.6;
}

.hero-ctas {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-bottom: 30px;
}

.hero-legal {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  background: var(--glass-bg);
  padding: 12px 24px;
  border-radius: 30px;
  display: inline-block;
  border: var(--glass-border);
  max-width: 100%;
  line-height: 1.5;
  margin-top: 10px;
}

/* Game Section */
.game-section {
  padding-left: calc(var(--nav-width) + 20px);
}

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

.section-title {
  font-size: 2.5rem;
}

.game-showcase {
  max-width: 1250px;
  margin: 0 auto;
  position: relative;
  border-radius: 24px;
  padding: 20px;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: var(--glass-border);
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  transition: transform 0.3s ease;
}

.game-showcase::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 26px;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple), var(--accent-orange));
  z-index: -1;
  opacity: 0.5;
  animation: borderRotate 4s linear infinite;
}

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

.game-showcase:hover::before {
  animation: borderRotate 2s linear infinite;
  opacity: 1;
}

.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;
  display: block;
}

.game-hud {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  padding: 0 10px;
}

.game-info h3 {
  margin-bottom: 4px;
  font-size: 1.5rem;
}

.game-info p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.game-actions {
  display: flex;
  gap: 12px;
}

.action-btn {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.action-btn:hover {
  background: rgba(255,255,255,0.15);
  transform: translateY(-2px);
}

/* Feature Grid */
.features {
  padding-left: calc(var(--nav-width) + 20px);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
  max-width: 1250px;
  margin: 0 auto;
}

.feature-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: var(--glass-border);
  border-radius: 28px;
  padding: 40px;
  position: relative;
  overflow: hidden;
  transition: all 0.4s ease;
}

.feature-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0,0,0,0.4), 0 0 20px rgba(56, 189, 248, 0.1);
  border-color: rgba(56, 189, 248, 0.3);
}

.feature-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.05), transparent);
  transform: skewX(-20deg);
  transition: 0.5s;
}

.feature-card:hover::after {
  left: 150%;
}

.fc-wide { grid-column: span 8; }
.fc-square { grid-column: span 4; }
.fc-half { grid-column: span 6; }

.feature-icon {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  background: var(--gradient-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  font-size: 24px;
  box-shadow: 0 0 20px var(--glow-blue);
}

.feature-card.purple .feature-icon {
  background: var(--gradient-purple);
  box-shadow: 0 0 20px var(--glow-purple);
}

.feature-card.orange .feature-icon {
  background: var(--gradient-orange);
  box-shadow: 0 0 20px var(--glow-orange);
}

.feature-card h3 {
  font-size: 1.5rem;
  margin-bottom: 12px;
}

.feature-card p {
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Galaxy Map / Explore */
.explore-universe {
  padding-left: calc(var(--nav-width) + 20px);
}

.universe-map {
  max-width: 1250px;
  margin: 0 auto;
  height: 500px;
  background: var(--bg-overlay);
  border-radius: 30px;
  border: var(--glass-border);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.planet {
  position: absolute;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.planet-1 {
  width: 100px;
  height: 100px;
  background: radial-gradient(circle at 30% 30%, #38bdf8, #0ea5e9, #0284c7);
  box-shadow: 0 0 40px rgba(56, 189, 248, 0.4);
  top: 20%;
  left: 20%;
  animation: float 6s ease-in-out infinite;
}

.planet-2 {
  width: 140px;
  height: 140px;
  background: radial-gradient(circle at 30% 30%, #c084fc, #9333ea, #6b21a8);
  box-shadow: 0 0 50px rgba(168, 85, 247, 0.4);
  bottom: 20%;
  right: 25%;
  animation: float 8s ease-in-out infinite reverse;
}

.planet-3 {
  width: 60px;
  height: 60px;
  background: radial-gradient(circle at 30% 30%, #fb923c, #ea580c, #9a3412);
  box-shadow: 0 0 30px rgba(249, 115, 22, 0.4);
  top: 30%;
  right: 15%;
  animation: float 5s ease-in-out infinite 1s;
}

.planet:hover {
  transform: scale(1.1);
  z-index: 10;
}

.planet-label {
  position: absolute;
  bottom: -30px;
  background: var(--glass-bg);
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  border: var(--glass-border);
  white-space: nowrap;
  backdrop-filter: blur(10px);
}

.connection-line {
  position: absolute;
  width: 40%;
  height: 2px;
  background: linear-gradient(90deg, rgba(56, 189, 248, 0.1), rgba(168, 85, 247, 0.5), rgba(56, 189, 248, 0.1));
  top: 45%;
  left: 30%;
  transform: rotate(20deg);
  z-index: 0;
}

/* Dashboard / Stats */
.dashboard-stats {
  padding-left: calc(var(--nav-width) + 20px);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  max-width: 1250px;
  margin: 0 auto;
}

.stat-card {
  background: var(--glass-bg);
  border: var(--glass-border);
  padding: 30px;
  border-radius: 20px;
  text-align: center;
  backdrop-filter: var(--glass-blur);
}

.stat-value {
  font-size: 2.5rem;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  margin-bottom: 10px;
}

.stat-label {
  color: var(--text-secondary);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Content Pages (Legal, About, etc.) */
.page-hero {
  min-height: 40vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: url('images/cosmic-header-bg.jpg') center/cover no-repeat;
  position: relative;
  padding-left: var(--nav-width);
  padding-top: 80px;
  padding-bottom: 40px;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--bg-primary);
  opacity: 0.8;
}

.page-hero .container {
  position: relative;
  z-index: 1;
}

.page-hero h1 {
  font-size: 3.5rem;
  margin-bottom: 10px;
}

.content-section {
  padding-left: calc(var(--nav-width) + 20px);
  max-width: 900px;
  margin: 0 auto;
  padding-top: 60px;
  padding-bottom: 60px;
}

.content-box {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: var(--glass-border);
  border-radius: 24px;
  padding: 50px;
  color: var(--text-secondary);
  line-height: 1.8;
}

.content-box h2 {
  color: var(--text-primary);
  margin-top: 30px;
  margin-bottom: 15px;
  font-size: 1.8rem;
}

.content-box h2:first-child {
  margin-top: 0;
}

.content-box p {
  margin-bottom: 20px;
}

.content-box ul {
  margin-bottom: 20px;
  padding-left: 20px;
}

.content-box li {
  margin-bottom: 10px;
}

.content-image {
  width: 100%;
  border-radius: 16px;
  margin: 30px 0;
  border: var(--glass-border);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  object-fit: cover;
  max-height: 400px;
}

.company-details {
  margin-top: 24px;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.company-details strong {
  color: var(--text-secondary);
}

/* Contact Form */
.form-group {
  margin-bottom: 24px;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-primary);
  font-family: 'Space Grotesk', sans-serif;
}

.form-control {
  width: 100%;
  background: rgba(0,0,0,0.3);
  border: var(--glass-border);
  border-radius: 12px;
  padding: 16px;
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  transition: all 0.3s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.2);
}

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

/* Footer */
footer {
  padding-left: calc(var(--nav-width) + 20px);
  background: var(--bg-overlay);
  border-top: var(--glass-border);
  padding-top: 80px;
  padding-bottom: 40px;
  margin-top: 80px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 60px;
  max-width: 1250px;
  margin: 0 auto;
  margin-bottom: 60px;
}

.footer-brand h2 {
  font-size: 2rem;
  margin-bottom: 20px;
}

.footer-desc {
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 20px;
}

.footer-links h4 {
  font-size: 1.2rem;
  margin-bottom: 20px;
}

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

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

.footer-links a {
  color: var(--text-secondary);
}

.footer-links a:hover {
  color: var(--accent-blue);
  padding-left: 5px;
}

.footer-bottom {
  max-width: 1250px;
  margin: 0 auto;
  text-align: center;
  padding-top: 30px;
  border-top: 1px solid rgba(255,255,255,0.05);
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-disclaimer {
  background: rgba(255,255,255,0.02);
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 20px;
  border: 1px solid rgba(255,255,255,0.05);
}

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

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

@keyframes pulseDot {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

@keyframes moveParticles {
  from { background-position: 0 0; }
  to { background-position: -1000px 1000px; }
}

@keyframes slowZoom {
  from { transform: scale(1); }
  to { transform: scale(1.1); }
}

@keyframes borderRotate {
  100% { filter: hue-rotate(360deg); }
}

/* Responsive Breakpoints */
@media (max-width: 1200px) {
  .container { padding: 0 80px; }
  .feature-grid, .stats-grid { gap: 16px; }
  .fc-wide { grid-column: span 12; }
  .fc-square { grid-column: span 6; }
}

@media (max-width: 992px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; gap: 40px; }
  .fc-half { grid-column: span 12; }
}

@media (max-width: 768px) {
  /* Mobile Nav Restructure */
  body { padding-bottom: 80px; }
  
  .command-panel {
    top: auto;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 400px;
    flex-direction: row;
    justify-content: space-around;
    padding: 15px;
    border-radius: 24px;
    animation: none;
  }
  
  .nav-tooltip { display: none; }
  
  .top-command {
    top: 15px;
    right: 15px;
  }
  
  .status-indicator { display: none; } /* Hide on mobile to save space */
  
  /* Reset Paddings */
  .hero { 
    padding-left: 0; 
    padding-bottom: 120px; /* Safe space from bottom nav bar */
  }
  
  .page-hero { 
    padding-left: 0; 
    padding-bottom: 60px;
  }
  
  .game-section, .features, .explore-universe, .dashboard-stats, .content-section, footer {
    padding-left: 20px;
    padding-right: 20px;
  }
  
  .hero-title { font-size: 2.5rem; }
  
  .fc-square { grid-column: span 12; }
  
  .universe-map { height: 350px; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .hero-ctas { flex-direction: column; }
  .content-box { padding: 30px 20px; }
}