:root {
  --bg-primary: #020617;
  --bg-secondary: #0b1220;
  
  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-blur: 20px;
  
  --accent-violet-start: #7c3aed;
  --accent-violet-end: #a78bfa;
  --accent-blue-start: #0ea5e9;
  --accent-blue-end: #38bdf8;
  --accent-star-start: #22d3ee;
  --accent-star-end: #e879f9;
  
  --glow-violet: rgba(124, 58, 237, 0.45);
  --glow-blue: rgba(14, 165, 233, 0.45);
  --glow-pink: rgba(232, 121, 249, 0.35);
  
  --text-primary: #e2e8f0;
  --text-secondary: #cbd5f5;
  --text-muted: #64748b;
  
  --font-main: 'Inter', system-ui, -apple-system, sans-serif;
  --font-display: 'Syncopate', sans-serif;
  
  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-main);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Cosmic Background System */
.space-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -10;
  background: radial-gradient(circle at 50% 0%, var(--bg-secondary) 0%, var(--bg-primary) 70%);
  overflow: hidden;
}

.bg-image-overlay {
  position: absolute;
  inset: 0;
  background-image: url('images/stardust-texture-overlay.png');
  background-size: cover;
  background-position: center;
  opacity: 0.1;
  z-index: -5;
  pointer-events: none;
}

.stars {
  position: absolute;
  width: 2px;
  height: 2px;
  background: transparent;
  box-shadow: 
    120px 80px #fff, 300px 150px #fff, 400px 300px #fff, 
    500px 100px #fff, 600px 400px #fff, 800px 200px #fff, 
    900px 500px #fff, 100px 600px #fff, 200px 800px #fff, 
    300px 900px #fff, 700px 700px #fff, 1100px 150px #fff;
  animation: twinkle 4s infinite alternate;
}

.stars::after {
  content: "";
  position: absolute;
  top: 100vh;
  width: 2px;
  height: 2px;
  background: transparent;
  box-shadow: inherit;
}

.stars-2 {
  position: absolute;
  width: 1px;
  height: 1px;
  background: transparent;
  box-shadow: 
    50px 50px #cbd5f5, 150px 250px #cbd5f5, 250px 50px #cbd5f5, 
    450px 350px #cbd5f5, 550px 150px #cbd5f5, 750px 450px #cbd5f5, 
    850px 250px #cbd5f5, 950px 550px #cbd5f5, 50px 650px #cbd5f5, 
    150px 850px #cbd5f5, 250px 750px #cbd5f5, 450px 950px #cbd5f5;
  animation: twinkle 6s infinite alternate-reverse;
}

.nebula-glow {
  position: absolute;
  width: 60vw;
  height: 60vw;
  border-radius: 50%;
  background: radial-gradient(circle, var(--glow-violet) 0%, transparent 60%);
  top: -20%;
  left: -10%;
  filter: blur(80px);
  opacity: 0.5;
  animation: float 20s infinite ease-in-out alternate;
}

.nebula-glow-2 {
  position: absolute;
  width: 50vw;
  height: 50vw;
  border-radius: 50%;
  background: radial-gradient(circle, var(--glow-blue) 0%, transparent 60%);
  bottom: -10%;
  right: -10%;
  filter: blur(80px);
  opacity: 0.3;
  animation: float 15s infinite ease-in-out alternate-reverse;
}

/* Animations */
@keyframes twinkle {
  0% { opacity: 0.3; }
  100% { opacity: 1; }
}

@keyframes float {
  0% { transform: translate(0, 0); }
  100% { transform: translate(5%, 5%); }
}

@keyframes orbit {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes counter-orbit {
  0% { transform: rotate(360deg); }
  100% { transform: rotate(0deg); }
}

@keyframes pulse-glow {
  0% { box-shadow: 0 0 10px var(--glow-violet), 0 0 20px var(--glow-blue); }
  50% { box-shadow: 0 0 20px var(--glow-violet), 0 0 40px var(--glow-blue); }
  100% { box-shadow: 0 0 10px var(--glow-violet), 0 0 20px var(--glow-blue); }
}

@keyframes shooting-star {
  0% {
    transform: translateX(0) translateY(0) rotate(45deg) scale(1);
    opacity: 1;
  }
  100% {
    transform: translateX(-100vw) translateY(100vh) rotate(45deg) scale(0);
    opacity: 0;
  }
}

/* Typography Utilities */
h1, h2, h3, h4, .brand-text {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 2px;
}

.text-gradient {
  background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-neon {
  background: linear-gradient(135deg, var(--accent-star-start), var(--accent-star-end));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 20px var(--glow-pink);
}

/* Layout Utilities */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 100px 0;
  position: relative;
  z-index: 1;
}

.glass-panel {
  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: 24px;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  border-radius: 20px;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-decoration: none;
  text-transform: uppercase;
  transition: var(--transition-smooth);
  cursor: pointer;
  border: none;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-violet-start), var(--accent-blue-start));
  color: #fff;
  box-shadow: 0 0 20px var(--glow-violet);
}

.btn-primary::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: var(--transition-smooth);
}

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

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

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

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--accent-blue-start);
  box-shadow: 0 0 15px var(--glow-blue);
  transform: translateY(-2px);
}

/* Header - Orbital Control Nav */
.site-header {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 1000px;
  z-index: 1000;
  transition: var(--transition-smooth);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  border-radius: 100px;
  background: rgba(11, 18, 32, 0.4);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(124, 58, 237, 0.2);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5), inset 0 0 20px rgba(124, 58, 237, 0.1);
}

.navbar:hover {
  border-color: rgba(14, 165, 233, 0.4);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5), inset 0 0 20px rgba(14, 165, 233, 0.2);
}

.brand-container {
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  position: relative;
}

.orbital-logo-wrapper {
  position: relative;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.orbital-logo-core {
  width: 16px;
  height: 16px;
  background: linear-gradient(135deg, var(--accent-star-start), var(--accent-star-end));
  border-radius: 50%;
  box-shadow: 0 0 15px var(--glow-pink);
  z-index: 2;
}

.orbital-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  animation: orbit 10s linear infinite;
}

.navbar:hover .orbital-ring {
  animation-duration: 5s;
}

.orbital-planet {
  position: absolute;
  top: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 8px;
  height: 8px;
  background: var(--accent-blue-start);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--glow-blue);
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 1px;
  transition: var(--transition-smooth);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-violet-start), var(--accent-blue-start));
  transition: var(--transition-smooth);
  box-shadow: 0 0 8px var(--glow-violet);
}

.nav-links a:hover {
  color: #fff;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-cta .btn {
  padding: 10px 24px;
  font-size: 0.8rem;
}

/* Mobile Nav Dock */
.mobile-nav-dock {
  display: none;
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  background: rgba(11, 18, 32, 0.8);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 100px;
  padding: 12px 24px;
  z-index: 1000;
  justify-content: space-between;
  box-shadow: 0 10px 30px rgba(0,0,0,0.8);
}

.dock-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.7rem;
  transition: var(--transition-smooth);
}

.dock-item svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.dock-item.active, .dock-item:hover {
  color: var(--accent-blue-start);
  filter: drop-shadow(0 0 8px var(--glow-blue));
}

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

.hero-content {
  max-width: 800px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.hero-badge {
  background: rgba(124, 58, 237, 0.1);
  border: 1px solid rgba(124, 58, 237, 0.3);
  padding: 8px 16px;
  border-radius: 100px;
  font-size: 0.8rem;
  letter-spacing: 1px;
  color: var(--accent-violet-end);
  backdrop-filter: blur(10px);
}

.hero-title {
  font-size: clamp(3rem, 5vw, 5rem);
  line-height: 1.1;
  text-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.hero-desc {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

.hero-ctas {
  display: flex;
  gap: 16px;
  margin-top: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

.legal-warning-hero {
  margin-top: 40px;
  font-size: 0.8rem;
  color: var(--text-muted);
  padding: 12px 24px;
  background: rgba(0,0,0,0.3);
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.05);
}

.shooting-star-layer {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.s-star {
  position: absolute;
  width: 100px;
  height: 2px;
  background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,1));
  animation: shooting-star 3s linear infinite;
  opacity: 0;
}
.s-star:nth-child(1) { top: 10%; right: -10%; animation-delay: 0s; }
.s-star:nth-child(2) { top: 30%; right: -20%; animation-delay: 4s; }
.s-star:nth-child(3) { top: 60%; right: 10%; animation-delay: 7s; }

/* Game Section */
.game-section {
  padding: 80px 0;
}

.game-container {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  transition: var(--transition-smooth);
}

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

.game-card {
  padding: 16px;
  border-radius: 26px;
  background: var(--bg-secondary);
  position: relative;
  z-index: 2;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

.nebula-border {
  position: absolute;
  inset: -2px;
  border-radius: 28px;
  background: linear-gradient(45deg, var(--accent-violet-start), var(--accent-blue-start), var(--accent-star-start), var(--accent-violet-start));
  background-size: 300% 300%;
  z-index: 1;
  animation: bg-shift 8s ease infinite;
  opacity: 0.6;
  filter: blur(4px);
  transition: var(--transition-smooth);
}

.game-container:hover .nebula-border {
  opacity: 1;
  filter: blur(8px);
}

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

.game-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding: 0 16px;
}

.game-title {
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  gap: 12px;
}

.game-title::before {
  content: '';
  display: block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent-star-start);
  box-shadow: 0 0 10px var(--glow-pink);
  animation: pulse-glow 2s infinite;
}

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

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

/* Features Section */
.features-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
  margin-top: 60px;
}

.feature-card {
  grid-column: span 3;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-blue-start), transparent);
  transform: translateX(-100%);
  transition: 0.5s;
}

.feature-card:hover {
  transform: translateY(-10px);
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(14, 165, 233, 0.3);
}

.feature-card:hover::before {
  transform: translateX(100%);
}

.feature-icon {
  width: 48px;
  height: 48px;
  background: rgba(14, 165, 233, 0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(14, 165, 233, 0.2);
  color: var(--accent-blue-start);
}

.feature-card h3 {
  font-size: 1.1rem;
}

.feature-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Immersive Story Section */
.story-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  padding: 100px 0;
}

.story-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.story-visual {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  aspect-ratio: 4/3;
  box-shadow: 0 20px 40px rgba(0,0,0,0.6);
}

.story-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-smooth);
}

.story-visual:hover img {
  transform: scale(1.05);
}

.story-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--bg-primary), transparent);
}

/* Image and Content Enhancements */
.content-image {
  width: 100%;
  height: auto;
  border-radius: 16px;
  margin: 24px 0;
  object-fit: cover;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  border: 1px solid var(--glass-border);
}

.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
  margin: 32px 0;
}

.team-card {
  text-align: center;
  padding: 24px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  transition: var(--transition-smooth);
}

.team-card:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(14, 165, 233, 0.3);
}

.team-card img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 2px solid var(--accent-blue-start);
  margin-bottom: 16px;
  object-fit: cover;
  box-shadow: 0 0 20px var(--glow-blue);
}

/* Content Pages (Terms, Privacy, RG, About, Contact) */
.page-header {
  padding: 160px 0 60px;
  text-align: center;
  background: linear-gradient(to bottom, rgba(11, 18, 32, 0.5), transparent);
}

.page-header h1 {
  font-size: clamp(2.5rem, 4vw, 4rem);
  margin-bottom: 16px;
}

.content-wrapper {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px;
  margin-bottom: 80px;
}

.content-wrapper h2 {
  margin: 32px 0 16px;
  color: var(--text-primary);
  font-size: 1.5rem;
}

.content-wrapper p, .content-wrapper ul {
  margin-bottom: 16px;
  color: var(--text-secondary);
}

.content-wrapper ul {
  padding-left: 24px;
}

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

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

.form-control {
  width: 100%;
  padding: 16px;
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  color: var(--text-primary);
  font-family: var(--font-main);
  transition: var(--transition-smooth);
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-blue-start);
  box-shadow: 0 0 15px rgba(14, 165, 233, 0.2);
}

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

/* Footer */
.site-footer {
  border-top: 1px solid var(--glass-border);
  background: rgba(2, 6, 23, 0.8);
  backdrop-filter: blur(10px);
  padding: 60px 0 20px;
  position: relative;
  z-index: 10;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  margin-bottom: 40px;
}

.footer-col h4 {
  font-size: 1rem;
  margin-bottom: 24px;
  color: var(--text-primary);
}

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

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

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: var(--transition-smooth);
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: var(--accent-blue-start);
}

.footer-legal {
  padding-top: 24px;
  border-top: 1px solid var(--glass-border);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.footer-legal p {
  margin-bottom: 8px;
}

.warning-box {
  display: inline-block;
  padding: 12px 24px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.4);
  margin-bottom: 16px;
  color: #cbd5f5;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .feature-card {
    grid-column: span 6;
  }
  .story-section {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav-links, .nav-cta {
    display: none;
  }
  
  .navbar {
    justify-content: center;
  }
  
  .mobile-nav-dock {
    display: flex;
  }
  
  .hero-title {
    font-size: 2.5rem;
  }
  
  .feature-card {
    grid-column: span 12;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .content-wrapper {
    padding: 24px;
  }
  
  body {
    padding-bottom: 80px; /* Space for mobile dock */
  }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--glass-border);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-blue-start);
}