/* ==========================================================================
   ACE COMBAT 8: WINGS OF THEVE - Tactical Aviation & Arcade Hub
   ========================================================================== */

:root {
  --bg-darkest: #05080e;
  --bg-card: #0c121d;
  --bg-card-hover: #121c2c;
  --bg-elevated: #162438;
  
  --hud-cyan: #00f2fe;
  --hud-cyan-glow: rgba(0, 242, 254, 0.4);
  --hud-green: #00ff88;
  --hud-green-glow: rgba(0, 255, 136, 0.35);
  --afterburner-amber: #ff9e00;
  --missile-red: #ff2a6d;
  
  --text-primary: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --border-color: #1e2d42;
  --border-glow: rgba(0, 242, 254, 0.25);
  
  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

body {
  font-family: var(--font-main);
  background-color: var(--bg-darkest);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(0, 242, 254, 0.07) 0%, transparent 45%),
    radial-gradient(circle at 90% 80%, rgba(255, 42, 109, 0.05) 0%, transparent 40%),
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 45px 45px, 45px 45px;
}

/* Header & Navbar */
.site-header {
  background: rgba(5, 8, 14, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-content {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0.65rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  position: relative;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: #fff;
  flex-shrink: 0;
}

.brand-icon {
  font-size: 1.6rem;
  filter: drop-shadow(0 0 10px var(--hud-cyan));
}

.brand-title {
  font-size: 1.2rem;
  font-weight: 900;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #ffffff 40%, var(--hud-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-sub {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: var(--hud-cyan);
  display: block;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 700;
  padding: 0.4rem 0.85rem;
  border-radius: 6px;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  white-space: nowrap;
}

.nav-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-color);
}

.nav-link.active {
  color: var(--hud-cyan);
  background: rgba(0, 242, 254, 0.1);
  border-color: var(--hud-cyan);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  background: #0f1724;
  padding: 0.2rem 0.35rem;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  font-size: 0.75rem;
  font-weight: 800;
}

.lang-btn {
  color: var(--text-dim);
  text-decoration: none;
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
}

.lang-btn.active {
  background: var(--hud-cyan);
  color: #000;
}

.mobile-menu-toggle {
  display: none;
  background: #0f1724;
  border: 1px solid var(--border-color);
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 6px;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
}

@media (max-width: 820px) {
  .brand-sub { display: none; }
  .mobile-menu-toggle { display: inline-flex; }
  .top-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #070c16f8;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 1.25rem;
    flex-direction: column;
    gap: 0.5rem;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.8);
    z-index: 999;
  }
  .top-nav.open { display: flex; }
  .top-nav .nav-link {
    width: 100%;
    text-align: center;
    padding: 0.65rem 1rem;
    font-size: 0.95rem;
  }
}

/* Main Content */
.main-content {
  max-width: 1240px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 4rem 1.25rem;
}

/* Tactical Hero Banner */
.hero-banner {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border-glow);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.8), 0 0 30px rgba(0, 242, 254, 0.15);
  margin-bottom: 2.5rem;
  background: #000;
}

.hero-img-wrap {
  position: relative;
  width: 100%;
  height: clamp(340px, 50vh, 520px);
}

.hero-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
  display: block;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(5,8,14,0.2) 0%, rgba(5,8,14,0.7) 60%, rgba(5,8,14,0.98) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(1.5rem, 4vw, 3rem);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(0, 242, 254, 0.15);
  border: 1px solid var(--hud-cyan);
  color: var(--hud-cyan);
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.3rem 0.8rem;
  border-radius: 50px;
  margin-bottom: 0.75rem;
  width: fit-content;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.hero-title {
  font-size: clamp(1.8rem, 4.5vw, 3.2rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: #fff;
  margin-bottom: 0.75rem;
}

.hero-desc {
  font-size: clamp(0.95rem, 1.8vw, 1.15rem);
  color: var(--text-muted);
  max-width: 800px;
  margin-bottom: 1.5rem;
}

.hero-cta-bar {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
  align-items: center;
}

/* Buttons */
.btn-primary {
  background: linear-gradient(135deg, var(--hud-cyan) 0%, #0099ff 100%);
  color: #000;
  font-weight: 900;
  font-size: 0.95rem;
  padding: 0.75rem 1.6rem;
  border-radius: 8px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 20px var(--hud-cyan-glow);
  transition: all 0.2s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(0, 242, 254, 0.6);
}

.btn-secondary {
  background: #0f1826;
  color: #fff;
  font-weight: 800;
  font-size: 0.9rem;
  padding: 0.75rem 1.35rem;
  border-radius: 8px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  border-color: var(--hud-cyan);
  background: #152236;
}

/* Feature Grid Cards */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.section-title {
  font-size: clamp(1.4rem, 2.5vw, 1.85rem);
  font-weight: 900;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.section-sub {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-top: 0.25rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.tactical-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.tactical-card:hover {
  border-color: var(--hud-cyan);
  background: var(--bg-card-hover);
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.card-tag {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--hud-green);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
  display: block;
}

.tactical-card h3 {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.5rem;
}

.tactical-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

/* Cross-Link Network Banner (Connecting with acecombat8.org) */
.synergy-box {
  background: linear-gradient(135deg, rgba(0, 242, 254, 0.08), rgba(255, 42, 109, 0.08));
  border: 1px solid var(--border-glow);
  border-radius: 14px;
  padding: 1.75rem;
  margin-bottom: 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.synergy-text h4 {
  font-size: 1.2rem;
  font-weight: 900;
  color: #fff;
  margin-bottom: 0.35rem;
}

.synergy-text p {
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* 3D Dogfight Arcade Container */
.dogfight-game-wrapper {
  position: relative;
  width: 100%;
  height: clamp(520px, 78vh, 720px);
  background: #020408;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--hud-cyan-glow);
  box-shadow: 0 15px 40px rgba(0,0,0,0.8), 0 0 25px rgba(0, 242, 254, 0.2);
  margin-bottom: 1rem;
}

#dogfightCanvas {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  cursor: crosshair;
}

/* HUD Overlay on 3D Game */
.game-hud-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1rem;
  font-family: var(--font-mono);
}

.hud-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.hud-radar-box {
  background: rgba(5, 8, 14, 0.8);
  border: 1px solid var(--hud-green);
  border-radius: 8px;
  padding: 0.5rem 0.85rem;
  font-size: 0.8rem;
  color: var(--hud-green);
  box-shadow: 0 0 10px var(--hud-green-glow);
}

.hud-score-box {
  background: rgba(5, 8, 14, 0.8);
  border: 1px solid var(--hud-cyan);
  border-radius: 8px;
  padding: 0.5rem 0.85rem;
  font-size: 0.85rem;
  color: var(--hud-cyan);
  text-align: right;
  box-shadow: 0 0 10px var(--hud-cyan-glow);
}

.hud-center-crosshair {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 120px;
  height: 120px;
  border: 1px dashed rgba(0, 242, 254, 0.5);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.crosshair-center-dot {
  width: 6px;
  height: 6px;
  background: var(--hud-cyan);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--hud-cyan);
}

.hud-lock-warning {
  position: absolute;
  top: 60%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--missile-red);
  font-weight: 900;
  font-size: 0.95rem;
  letter-spacing: 2px;
  animation: pulseLock 0.6s infinite alternate;
}

@keyframes pulseLock {
  from { opacity: 0.3; }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
}

/* Mobile Virtual Flight Controls */
.mobile-flight-controls {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  right: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  pointer-events: none;
}

.touch-stick-area {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(0, 242, 254, 0.12);
  border: 2px solid var(--hud-cyan);
  pointer-events: auto;
  touch-action: none;
  position: relative;
}

.touch-stick-thumb {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--hud-cyan);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 15px var(--hud-cyan);
}

.touch-action-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  pointer-events: auto;
}

.btn-flight-touch {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 2px solid #fff;
  color: #fff;
  font-weight: 900;
  font-size: 0.8rem;
  cursor: pointer;
  touch-action: none;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0,0,0,0.6);
  user-select: none;
}

.btn-flight-touch.btn-missile {
  background: rgba(255, 42, 109, 0.8);
  border-color: var(--missile-red);
}

.btn-flight-touch.btn-gun {
  background: rgba(0, 242, 254, 0.8);
  border-color: var(--hud-cyan);
  color: #000;
}

.btn-flight-touch.btn-afterburner {
  background: rgba(255, 158, 0, 0.8);
  border-color: var(--afterburner-amber);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border-color);
  background: #03060a;
  padding: 3rem 1.5rem;
  text-align: center;
  margin-top: 4rem;
}

.footer-content {
  max-width: 900px;
  margin: 0 auto;
}

.disclaimer-text {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-bottom: 0.5rem;
}

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