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

:root {
  /* Color System */
  --bg-primary: #020308;
  --bg-secondary: #0a0f1c;
  
  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-hover: rgba(255, 255, 255, 0.06);
  
  --accent-electric: #00eaff;
  --accent-electric-dark: #3b82f6;
  --accent-turbo: #ff5a1f;
  --accent-turbo-dark: #ffb020;
  
  --grad-primary: linear-gradient(135deg, var(--accent-electric), var(--accent-electric-dark));
  --grad-secondary: linear-gradient(135deg, var(--accent-turbo), var(--accent-turbo-dark));
  --grad-premium: linear-gradient(135deg, var(--accent-electric), var(--accent-turbo));
  
  --glow-blue: rgba(0, 234, 255, 0.45);
  --glow-orange: rgba(255, 90, 31, 0.4);
  --glow-speed: rgba(59, 130, 246, 0.35);

  /* Typography */
  --font-heading: 'Chakra Petch', sans-serif;
  --font-body: 'Inter', sans-serif;
  
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #64748b;
  
  /* Layout & Spacing */
  --max-width: 1280px;
  --space-desk: 120px;
  --space-tab: 80px;
  --space-mob: 60px;
  
  --hud-width: 80px;
}

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

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  background-image: 
    radial-gradient(circle at 15% 50%, rgba(0, 234, 255, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 85% 30%, rgba(255, 90, 31, 0.03) 0%, transparent 50%);
  background-attachment: fixed;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 1px;
  line-height: 1.2;
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

ul {
  list-style: none;
}

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

/* Utility Classes */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
}

.glass-panel::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  opacity: 0.5;
}

.text-gradient-blue {
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-premium {
  background: var(--grad-premium);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Layout */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.main-content {
  margin-left: calc(var(--hud-width) + 40px);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

section {
  padding: var(--space-desk) 0;
  position: relative;
}

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

.btn-primary {
  background: var(--grad-primary);
  color: var(--bg-primary);
  box-shadow: 0 0 20px var(--glow-blue);
}

.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: left 0.5s ease;
  z-index: -1;
}

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

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

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

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

/* Header & HUD System */
.top-header {
  position: fixed;
  top: 20px;
  left: calc(var(--hud-width) + 40px);
  right: 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
  pointer-events: none;
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-primary);
  text-shadow: 0 0 10px var(--glow-blue);
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: var(--grad-primary);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 15px var(--glow-blue);
  position: relative;
}

.logo-icon::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border-top: 3px solid var(--bg-primary);
  border-right: 3px solid var(--bg-primary);
  transform: rotate(45deg) translate(-2px, 2px);
}

.hud-nav {
  position: fixed;
  top: 50%;
  left: 20px;
  transform: translateY(-50%);
  width: var(--hud-width);
  background: var(--glass-bg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--glass-border);
  border-radius: 26px;
  padding: 30px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  z-index: 100;
  box-shadow: inset 0 0 20px rgba(0, 234, 255, 0.05), 0 0 30px rgba(0, 0, 0, 0.5);
}

.hud-nav::before {
  content: '';
  position: absolute;
  left: -1px; top: 20%; bottom: 20%; width: 2px;
  background: var(--grad-primary);
  box-shadow: 0 0 15px var(--glow-blue);
  border-radius: 2px;
}

.hud-item {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all 0.3s ease;
}

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

.hud-item::after {
  content: attr(data-tooltip);
  position: absolute;
  left: calc(100% + 15px);
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  padding: 6px 12px;
  border-radius: 8px;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  letter-spacing: 1px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-10px);
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.hud-item:hover, .hud-item.active {
  color: var(--accent-electric);
  background: rgba(0, 234, 255, 0.1);
  box-shadow: inset 0 0 10px rgba(0, 234, 255, 0.2);
}

.hud-item:hover svg {
  transform: scale(1.1) translateX(2px);
  filter: drop-shadow(0 0 5px var(--glow-blue));
}

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

/* Hero Cinematic Entry */
.hero {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: var(--bg-primary);
  z-index: -2;
}

.hero-bg::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%; width: 200vw; height: 200vh;
  transform: translate(-50%, -50%);
  background: conic-gradient(from 90deg, transparent 0%, rgba(0,234,255,0.1) 45%, rgba(255,90,31,0.1) 55%, transparent 100%);
  animation: spin 20s linear infinite;
  z-index: -1;
}

@keyframes spin {
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.speed-lines {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background-image: repeating-linear-gradient(90deg, transparent, transparent 100px, rgba(255,255,255,0.02) 100px, rgba(255,255,255,0.02) 101px);
  transform: perspective(500px) rotateX(60deg) translateY(-100px);
  transform-origin: top center;
  animation: speedMove 2s linear infinite;
  z-index: -1;
}

@keyframes speedMove {
  0% { background-position: 0 0; }
  100% { background-position: 0 200px; }
}

.hero-content {
  max-width: 800px;
  z-index: 1;
  padding: 40px;
  animation: fadeUp 1s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.hero h1 {
  font-size: 5rem;
  margin-bottom: 20px;
  text-shadow: 0 0 30px rgba(0, 234, 255, 0.3);
}

.hero p.subtext {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 40px;
  font-weight: 300;
}

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

.hero-legal {
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 1px;
  text-transform: uppercase;
  background: rgba(0,0,0,0.4);
  padding: 10px 20px;
  border-radius: 20px;
  border: 1px solid var(--glass-border);
  display: inline-block;
}

/* Game Section - Turbo Rush Core */
.game-section {
  padding-top: 0;
  margin-top: -100px;
  z-index: 10;
}

.game-container {
  max-width: 1200px;
  margin: 0 auto;
  border-radius: 24px;
  padding: 4px;
  background: linear-gradient(135deg, rgba(0,234,255,0.5), rgba(255,90,31,0.5), rgba(59,130,246,0.5));
  background-size: 200% 200%;
  animation: borderGlow 4s ease infinite;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5), 0 0 40px rgba(0,234,255,0.2);
  transition: transform 0.3s ease;
}

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

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

.game-inner {
  background: var(--bg-primary);
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

.game-header {
  padding: 20px 30px;
  background: rgba(255,255,255,0.02);
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.game-title {
  display: flex;
  align-items: center;
  gap: 15px;
}

.status-dot {
  width: 10px;
  height: 10px;
  background: var(--accent-electric);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--glow-blue);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 234, 255, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(0, 234, 255, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 234, 255, 0); }
}

.game-frame-wrapper {
  width: 100%;
  height: 650px;
  background: #000;
  position: relative;
}

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

/* Features - Performance Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 30px;
}

.feature-card {
  padding: 40px;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.feature-card:hover {
  transform: translateY(-10px);
}

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

.feature-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 2px;
  background: var(--grad-premium);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card-icon {
  width: 60px;
  height: 60px;
  background: rgba(0, 234, 255, 0.1);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  border: 1px solid rgba(0, 234, 255, 0.2);
  color: var(--accent-electric);
}

.card-icon svg {
  width: 30px;
  height: 30px;
  fill: currentColor;
}

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

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

.fc-1 { grid-column: span 8; }
.fc-2 { grid-column: span 4; }
.fc-3 { grid-column: span 4; }
.fc-4 { grid-column: span 8; }

/* Footer & Legal */
footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--glass-border);
  padding: 80px 0 40px;
  margin-top: 60px;
}

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

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

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

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

.footer-links a:hover {
  color: var(--accent-electric);
  text-shadow: 0 0 8px var(--glow-blue);
  padding-left: 5px;
}

.footer-legal-box {
  background: rgba(0,0,0,0.5);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 30px;
  text-align: center;
  margin-bottom: 40px;
}

.footer-legal-box p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 10px;
}

.footer-legal-box h5 {
  color: var(--accent-turbo);
  font-size: 1.2rem;
  margin-bottom: 10px;
}

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

/* Inner Pages Header */
.inner-page-header {
  padding: 180px 0 80px;
  text-align: center;
  background: radial-gradient(ellipse at top center, rgba(0, 234, 255, 0.1) 0%, transparent 70%);
  border-bottom: 1px solid var(--glass-border);
}

.inner-page-header h1 {
  font-size: 4rem;
  margin-bottom: 20px;
}

/* Text Content Container (Legal/About) */
.content-container {
  max-width: 800px;
  margin: 0 auto;
  padding: var(--space-desk) 20px;
}

.content-container h2 {
  font-size: 2rem;
  margin: 40px 0 20px;
  color: var(--accent-electric);
}

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

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

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

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

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

.form-control:focus {
  outline: none;
  border-color: var(--accent-electric);
  box-shadow: 0 0 15px rgba(0, 234, 255, 0.2);
  background: rgba(0, 234, 255, 0.05);
}

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

/* Animations */
@keyframes fadeUp {
  0% { opacity: 0; transform: translateY(40px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* Responsive Design */
@media (max-width: 1024px) {
  :root {
    --hud-width: 0px;
  }
  
  .hud-nav {
    display: none; /* Hide desktop side nav */
  }
  
  .main-content {
    margin-left: 0;
    margin-bottom: 80px; /* Space for mobile nav */
  }
  
  .top-header {
    left: 20px;
    right: 20px;
    background: var(--glass-bg);
    backdrop-filter: blur(18px);
    padding: 15px 20px;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
  }
  
  /* Mobile Bottom Nav */
  .mobile-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background: rgba(2, 3, 8, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--glass-border);
    z-index: 100;
    justify-content: space-around;
    align-items: center;
    padding-bottom: env(safe-area-inset-bottom);
  }
  
  .mobile-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--text-muted);
    font-size: 0.7rem;
    font-family: var(--font-heading);
    text-transform: uppercase;
  }
  
  .mobile-item svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
  }
  
  .mobile-item.active {
    color: var(--accent-electric);
    text-shadow: 0 0 10px var(--glow-blue);
  }
  
  .hero h1 { font-size: 3.5rem; }
  
  .fc-1, .fc-2, .fc-3, .fc-4 { grid-column: span 12; }
  
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  section { padding: var(--space-mob) 0; }
  .hero h1 { font-size: 2.5rem; }
  .hero-cta { flex-direction: column; }
  .game-frame-wrapper { height: 500px; }
  .footer-grid { grid-template-columns: 1fr; }
  .inner-page-header h1 { font-size: 2.5rem; }
}

@media (min-width: 1025px) {
  .mobile-nav { display: none; }
}