:root {
  /* Color System */
  --bg-primary: #050b14;
  --bg-secondary: #0d1b2a;
  --glass-surface: rgba(255, 255, 255, 0.045);
  
  --accent-primary: #38e8ff;
  --accent-secondary: #8b7cff;
  --highlight: #b9f7ff;
  
  --text-primary: #f4fbff;
  --text-secondary: #9eb2c5;
  
  /* Border System */
  --border-main: rgba(56, 232, 255, 0.30);
  --border-hover: rgba(56, 232, 255, 0.70);
  --border-game: rgba(56, 232, 255, 0.45);
  
  /* Glow System */
  --glow-primary: rgba(56, 232, 255, 0.35);
  
  /* Typography & Spacing */
  --font-main: 'Inter', system-ui, -apple-system, sans-serif;
  --max-width: 1400px;
  
  --space-desktop: 100px;
  --space-tablet: 70px;
  --space-mobile: 50px;
}

/* Reset & Global */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

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

ul {
  list-style: none;
}

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

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

@media (max-width: 992px) {
  .container {
    padding: 0 var(--space-tablet);
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 var(--space-mobile);
  }
}

/* Header & Brand Identity */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background: rgba(5, 11, 20, 0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-main);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

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

.header-logo {
  height: 40px;
  width: auto;
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 40px;
}

.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--highlight);
  text-shadow: 0 0 8px var(--glow-primary);
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
}

.hamburger {
  display: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
}

.hamburger span {
  width: 25px;
  height: 2px;
  background-color: var(--text-primary);
  transition: 0.3s;
}

@media (max-width: 992px) {
  .hamburger {
    display: flex;
  }
  
  .nav-menu {
    position: absolute;
    top: 80px;
    left: 0;
    width: 100%;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-main);
    flex-direction: column;
    padding: 20px 0;
    gap: 20px;
    transform: translateY(-150%);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 99;
  }
  
  .menu-toggle:checked ~ .nav-menu {
    transform: translateY(0);
    opacity: 1;
  }
  
  .nav-links {
    flex-direction: column;
    width: 100%;
    gap: 20px;
  }
  
  .nav-links li {
    width: 100%;
    text-align: center;
  }
}

/* Button System */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: #000;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.5px;
  box-shadow: 0 0 15px var(--glow-primary);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 25px var(--glow-primary);
  color: #000;
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 0 60px;
  background-image: linear-gradient(to bottom, rgba(5, 11, 20, 0.3), var(--bg-primary)), url('../images/futuristic-cosmic-station-bg.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(circle at center, transparent 0%, var(--bg-primary) 100%);
  pointer-events: none;
}

.hero-panel {
  position: relative;
  background: var(--glass-surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-main);
  border-radius: 24px;
  padding: 60px;
  max-width: 800px;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5), inset 0 0 20px rgba(255,255,255,0.02);
  z-index: 2;
}

.hero-title {
  font-size: 4rem;
  line-height: 1.1;
  margin-bottom: 24px;
  background: linear-gradient(to right, var(--text-primary), var(--highlight));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
  letter-spacing: -1px;
}

.hero-desc {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 40px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin-bottom: 40px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  opacity: 0.7;
}

.hero-legal span {
  background: rgba(0,0,0,0.3);
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.05);
}

@media (max-width: 768px) {
  .hero-panel {
    padding: 40px 20px;
  }
  .hero-title {
    font-size: 2.5rem;
  }
  .hero-desc {
    font-size: 1.1rem;
  }
}

/* Game Section */
.game-section {
  padding: var(--space-desktop) 0;
  background: var(--bg-primary);
  position: relative;
}

.game-container {
  width: 90%;
  max-width: 1300px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

@media (max-width: 768px) {
  .game-container {
    width: 100%;
    padding: 0 var(--space-mobile);
  }
}

.game-title {
  font-size: 1.5rem;
  color: var(--highlight);
  margin-bottom: 20px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.game-frame-wrapper {
  width: 100%;
  background: var(--glass-surface);
  border: 1px solid var(--border-game);
  border-radius: 24px;
  padding: 10px;
  box-shadow: 0 0 30px var(--glow-primary), inset 0 0 15px rgba(56,232,255,0.1);
  aspect-ratio: 16 / 9;
  position: relative;
  overflow: hidden;
}

.game-frame-wrapper iframe {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 16px;
  background: var(--bg-secondary);
}

/* Content Sections */
.content-section {
  padding: var(--space-desktop) 0;
  background: var(--bg-secondary);
  position: relative;
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
}

.glass-card {
  background: var(--glass-surface);
  border: 1px solid var(--border-main);
  border-radius: 20px;
  padding: 50px;
  transition: all 0.3s ease;
}

.glass-card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.glass-card h2 {
  font-size: 2rem;
  color: var(--highlight);
  margin-bottom: 20px;
}

.glass-card p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  line-height: 1.8;
}

@media (max-width: 992px) {
  .content-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .glass-card {
    padding: 30px;
  }
}

/* Simple Page Header (for subpages) */
.page-header {
  padding: 180px 0 80px;
  text-align: center;
  background: linear-gradient(to bottom, var(--bg-secondary), var(--bg-primary));
  border-bottom: 1px solid rgba(255,255,255,0.02);
}

.page-title {
  font-size: 3rem;
  color: var(--text-primary);
  margin-bottom: 15px;
}

.page-subtitle {
  color: var(--accent-primary);
  font-size: 1.2rem;
}

/* Legal & Text Content Pages */
.text-content-section {
  padding: var(--space-desktop) 0;
}

.text-container {
  max-width: 900px;
  margin: 0 auto;
  background: var(--glass-surface);
  border: 1px solid var(--border-main);
  border-radius: 20px;
  padding: 60px;
}

.text-container h2 {
  color: var(--highlight);
  margin: 30px 0 15px;
  font-size: 1.5rem;
}

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

.text-container p {
  color: var(--text-secondary);
  margin-bottom: 20px;
  font-size: 1.05rem;
}

.text-container ul {
  list-style: disc;
  padding-left: 20px;
  margin-bottom: 20px;
  color: var(--text-secondary);
}

.text-container li {
  margin-bottom: 10px;
}

/* Contact Form */
.contact-form {
  max-width: 600px;
  margin: 40px auto;
  text-align: left;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-primary);
  font-weight: 500;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-main);
  border-radius: 8px;
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 1rem;
  transition: all 0.3s ease;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-secondary);
  opacity: 0.6;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--highlight);
  box-shadow: 0 0 10px var(--glow-primary);
  background: rgba(255, 255, 255, 0.08);
}

.contact-form .btn-primary {
  width: 100%;
  margin-top: 10px;
}

@media (max-width: 768px) {
  .text-container {
    padding: 30px 20px;
  }
}

/* Footer */
.site-footer {
  background: var(--bg-primary);
  border-top: 1px solid var(--border-main);
  padding: 80px 0 40px;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 60px;
  margin-bottom: 60px;
}

.footer-logo {
  height: 48px;
  width: auto;
  display: block;
  margin-bottom: 20px;
}

.footer-brand p {
  color: var(--text-secondary);
  max-width: 500px;
  font-size: 0.95rem;
}

.footer-links h4 {
  color: var(--highlight);
  margin-bottom: 20px;
  font-size: 1.1rem;
}

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

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

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

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.05);
  padding-top: 30px;
  text-align: center;
}

.legal-warning {
  color: var(--text-secondary);
  font-size: 0.85rem;
  max-width: 800px;
  margin: 0 auto 20px;
  line-height: 1.5;
}

.copyright {
  color: var(--text-secondary);
  font-size: 0.8rem;
  opacity: 0.6;
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}