/* === Variables === */
:root {
  --bg: #05070d;
  --bg-card: #0d1117;
  --bg-card-hover: #131922;
  --blue: #00a8ff;
  --blue-dim: #0080cc;
  --blue-glow: rgba(0, 168, 255, 0.35);
  --blue-glow-strong: rgba(0, 168, 255, 0.55);
  --text: #e8ecf1;
  --text-dim: #8b95a5;
  --text-muted: #5a6474;
  --border: #1a2030;
  --radius: 12px;
  --radius-sm: 8px;
  --header-h: 64px;
  --max-w: 1100px;
  --transition: 0.3s ease;
}

/* === Reset === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

/* === Header === */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(5, 7, 13, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  height: var(--header-h);
  transition: box-shadow var(--transition);
}
.site-header.scrolled {
  box-shadow: 0 2px 24px rgba(0, 168, 255, 0.08);
}
.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
}
.logo-link { display: flex; align-items: center; }
.header-logo {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
}
.main-nav { display: flex; gap: 8px; }
.nav-link {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-dim);
  transition: color var(--transition), background var(--transition);
  letter-spacing: 0.02em;
}
.nav-link:hover {
  color: var(--blue);
  background: rgba(0, 168, 255, 0.06);
}

/* Mobile toggle */
.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.mobile-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.mobile-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mobile-toggle.active span:nth-child(2) { opacity: 0; }
.mobile-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* === Hero === */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--header-h) + 40px) 24px 60px;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.18;
  filter: blur(2px);
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--bg) 0%, rgba(5,7,13,0.6) 40%, var(--bg) 100%);
}
.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 720px;
}
.hero-title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #fff 30%, var(--blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub {
  font-size: clamp(0.95rem, 1.8vw, 1.1rem);
  color: var(--text-dim);
  max-width: 560px;
  margin: 0 auto 32px;
  line-height: 1.7;
}
.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn-icon { width: 18px; height: 18px; }
.btn-primary {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 0 20px var(--blue-glow);
}
.btn-primary:hover {
  background: #1ab5ff;
  box-shadow: 0 0 32px var(--blue-glow-strong);
  transform: translateY(-1px);
}
.btn-outline {
  background: transparent;
  color: var(--blue);
  border: 1px solid var(--blue);
  box-shadow: 0 0 12px rgba(0,168,255,0.1);
}
.btn-outline:hover {
  background: rgba(0,168,255,0.08);
  box-shadow: 0 0 24px var(--blue-glow);
  transform: translateY(-1px);
}
.btn-ghost {
  background: rgba(255,255,255,0.05);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  background: rgba(255,255,255,0.1);
  border-color: var(--blue-dim);
  transform: translateY(-1px);
}
.btn-lg { padding: 16px 36px; font-size: 1rem; }

/* === Sections === */
.section { padding: 100px 24px; }
.container { max-width: var(--max-w); margin: 0 auto; }
.section-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: 12px;
}
.section-sub {
  text-align: center;
  color: var(--text-dim);
  max-width: 520px;
  margin: 0 auto 48px;
  font-size: 0.95rem;
}

/* === Social Cards === */
.social-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  max-width: 800px;
  margin: 0 auto;
}
.social-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 28px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all var(--transition);
  text-align: center;
}
.social-card:hover {
  border-color: var(--blue);
  box-shadow: 0 0 28px var(--blue-glow), inset 0 0 28px rgba(0,168,255,0.04);
  transform: translateY(-4px);
  background: var(--bg-card-hover);
}
.social-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(0,168,255,0.08);
  color: var(--blue);
  transition: background var(--transition);
}
.social-card:hover .social-icon {
  background: rgba(0,168,255,0.16);
}
.social-icon svg { width: 22px; height: 22px; }
.social-label {
  font-weight: 600;
  font-size: 0.95rem;
}
.social-handle {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* === About === */
.about-section { background: var(--bg-card); }
.about-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 48px;
  align-items: center;
}
.about-img-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
.about-img {
  width: 100%;
  height: 380px;
  object-fit: cover;
}
.about-text p {
  color: var(--text-dim);
  margin-bottom: 16px;
  font-size: 0.95rem;
  line-height: 1.8;
}
.about-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(0,168,255,0.06);
  border: 1px solid rgba(0,168,255,0.15);
  border-radius: var(--radius-sm);
  color: var(--blue);
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: 8px;
}
.badge-icon { width: 18px; height: 18px; }

/* === Gallery === */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.gallery-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--transition);
}
.gallery-card:hover {
  border-color: var(--blue-dim);
  box-shadow: 0 8px 36px var(--blue-glow);
  transform: translateY(-4px);
}
.gallery-img-wrap { overflow: hidden; }
.gallery-img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.gallery-card:hover .gallery-img {
  transform: scale(1.06);
}
.gallery-info {
  padding: 16px 20px;
}
.gallery-info h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 4px;
}
.gallery-info p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* === Merch === */
.merch-section {
  background: var(--bg-card);
  text-align: center;
}
.merch-inner {
  max-width: 540px;
  margin: 0 auto;
}

/* === Game === */
.game-wrapper {
  max-width: 420px;
  margin: 0 auto;
  text-align: center;
}
.game-hud {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-dim);
}
#game-canvas {
  width: 100%;
  max-width: 400px;
  height: auto;
  background: #080c14;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: block;
  margin: 0 auto;
}
.game-controls {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 16px;
}
.game-mobile-controls {
  display: none;
  gap: 16px;
  justify-content: center;
  margin-top: 12px;
}
.game-touch-btn {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 1px solid var(--blue);
  background: rgba(0,168,255,0.08);
  color: var(--blue);
  font-size: 1.5rem;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--transition);
  -webkit-user-select: none;
  user-select: none;
}
.game-touch-btn:active {
  background: rgba(0,168,255,0.25);
}

/* === Footer === */
.site-footer {
  padding: 48px 24px 32px;
  border-top: 1px solid var(--border);
}
.footer-inner {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.footer-logo {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  object-fit: cover;
}
.footer-name {
  font-weight: 600;
  font-size: 0.95rem;
}
.footer-socials {
  display: flex;
  gap: 16px;
}
.footer-socials a {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
  color: var(--text-muted);
  transition: color var(--transition), background var(--transition);
}
.footer-socials a:hover {
  color: var(--blue);
  background: rgba(0,168,255,0.1);
}
.footer-socials svg { width: 18px; height: 18px; }
.footer-veteran {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.footer-top-link {
  font-size: 0.8rem;
  color: var(--blue);
  transition: opacity var(--transition);
}
.footer-top-link:hover { opacity: 0.7; }
.footer-copy {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* === Reveal Animation === */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* === Responsive === */
@media (max-width: 768px) {
  .main-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: rgba(5,7,13,0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    flex-direction: column;
    padding: 16px 24px;
    gap: 4px;
    border-bottom: 1px solid var(--border);
    transform: translateY(-110%);
    transition: transform 0.3s ease;
    z-index: 999;
  }
  .main-nav.open { transform: translateY(0); }
  .mobile-toggle { display: flex; }

  .hero { min-height: auto; padding: calc(var(--header-h) + 32px) 20px 48px; }
  .hero-title { font-size: clamp(1.5rem, 5vw, 2rem); }
  .hero-actions { flex-direction: column; align-items: center; }

  .about-grid { grid-template-columns: 1fr; gap: 24px; }
  .about-img { height: 280px; }

  .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
  .gallery-img { height: 200px; }

  .social-grid { grid-template-columns: 1fr; max-width: 360px; }

  .section { padding: 64px 20px; }

  .game-mobile-controls { display: flex !important; }
}

@media (max-width: 480px) {

  .gallery-grid { grid-template-columns: 1fr; }
  .btn { padding: 10px 18px; font-size: 0.85rem; }
  .btn-lg { padding: 14px 28px; }
}
