/* Self-hosted fonts — Anybody (variable, latin + latin-ext) */
@font-face {
  font-family: 'Anybody';
  font-style: normal;
  font-weight: 400 900;
  font-stretch: 100%;
  font-display: swap;
  src: url(assets/fonts/anybody-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Anybody';
  font-style: normal;
  font-weight: 400 900;
  font-stretch: 100%;
  font-display: swap;
  src: url(assets/fonts/anybody-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Self-hosted fonts — JetBrains Mono (variable, latin + latin-ext) */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(assets/fonts/jetbrains-mono-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(assets/fonts/jetbrains-mono-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

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

:root {
  --bg: #0a0a0b;
  --surface: #131316;
  --border: #1e1e24;
  --text: #e8e6e3;
  --text-dim: #6b6a6f;
  --accent: #c8ff2e;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Ambient background glow */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(200, 255, 46, 0.04), transparent),
    radial-gradient(ellipse 50% 40% at 90% 100%, rgba(255, 68, 68, 0.02), transparent),
    radial-gradient(ellipse 50% 40% at 10% 80%, rgba(0, 204, 255, 0.02), transparent);
  pointer-events: none;
  z-index: 0;
}

/* ─── HEADER ─────────────────────────────────────────── */

.site-header {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 64px 24px 48px;
}

.site-title {
  font-family: 'Anybody', sans-serif;
  font-weight: 900;
  font-size: clamp(2.5rem, 8vw, 5rem);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text);
  line-height: 1;
  margin-bottom: 16px;
  position: relative;
}

.site-title .shm {
  color: var(--accent);
}

/* Subtle glow behind title */
.site-title::after {
  content: 'SHMARCADE';
  position: absolute;
  inset: 0;
  color: transparent;
  text-shadow: 0 0 80px rgba(200, 255, 46, 0.15), 0 0 160px rgba(200, 255, 46, 0.05);
  pointer-events: none;
  z-index: -1;
}

.site-tagline {
  font-size: clamp(0.65rem, 1.5vw, 0.8rem);
  color: var(--text-dim);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

/* ─── MAIN ───────────────────────────────────────────── */

.site-main {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 64px;
}

/* ─── GAME GRID ──────────────────────────────────────── */

.game-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

@media (max-width: 900px) {
  .game-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .game-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

/* ─── GAME CARD ──────────────────────────────────────── */

.game-card {
  --card-accent: #c8ff2e;
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  cursor: default;
}

.card-thumb-link {
  display: block;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  background: #000;
}

.card-thumb {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  opacity: 0.85;
  transition: opacity 0.2s ease, transform 0.3s ease;
}

.game-card:hover .card-thumb {
  opacity: 1;
  transform: scale(1.03);
}

.card-body {
  padding: 20px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-grow: 1;
}

.game-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--card-accent);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.game-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--card-accent) 30%, var(--border));
  box-shadow:
    0 8px 32px -8px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.02),
    0 0 48px -12px color-mix(in srgb, var(--card-accent) 12%, transparent);
}

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

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-title {
  font-family: 'Anybody', sans-serif;
  font-weight: 900;
  font-size: 1.1rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
  line-height: 1.2;
}

.card-genre {
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 3px 8px;
  border: 1px solid var(--card-accent);
  color: var(--card-accent);
  white-space: nowrap;
  flex-shrink: 0;
}

.card-desc {
  font-size: 0.72rem;
  color: var(--text-dim);
  letter-spacing: 0.03em;
  line-height: 1.6;
  flex-grow: 1;
}

.card-play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 8px 24px;
  border: 1px solid var(--card-accent);
  background: transparent;
  color: var(--card-accent);
  transition: all 0.15s ease;
  margin-top: 4px;
}

.card-play:hover {
  background: var(--card-accent);
  color: var(--bg);
}

.card-play:active {
  transform: scale(0.97);
}

/* ─── FOOTER ─────────────────────────────────────────── */

.site-footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 32px 24px 48px;
  border-top: 1px solid var(--border);
}

.footer-text {
  font-size: 0.6rem;
  color: var(--text-dim);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.5;
}

.footer-text .shm {
  color: var(--accent);
  opacity: 1;
}

.footer-nav {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 16px;
}

.footer-nav a {
  font-size: 0.6rem;
  color: var(--text-dim);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color 0.15s ease;
}

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

/* ─── COOKIE BANNER ─────────────────────────────────── */

.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10000;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  font-size: 0.7rem;
  color: var(--text-dim);
}

.cookie-btn {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 6px 20px;
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.cookie-btn:hover {
  background: var(--accent);
  color: var(--bg);
}

/* ─── LEGAL PAGES ───────────────────────────────────── */

.legal-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 24px 64px;
  position: relative;
  z-index: 1;
}

.legal-page h1 {
  font-family: 'Anybody', sans-serif;
  font-weight: 900;
  font-size: 1.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 32px;
}

.legal-page h2 {
  font-family: 'Anybody', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 32px;
  margin-bottom: 12px;
  color: var(--accent);
}

.legal-page p,
.legal-page li {
  font-size: 0.75rem;
  line-height: 1.8;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.legal-page ul {
  list-style: none;
  padding-left: 0;
}

.legal-page ul li::before {
  content: '//';
  color: var(--accent);
  margin-right: 8px;
  font-weight: 700;
}

.legal-page a {
  color: var(--accent);
  text-decoration: none;
}

.legal-page a:hover {
  text-decoration: underline;
}

.back-link {
  display: inline-block;
  font-size: 0.6rem;
  color: var(--text-dim);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-decoration: none;
  margin-bottom: 24px;
  transition: color 0.15s ease;
}

.back-link:hover {
  color: var(--accent);
}

/* ─── SCANLINE OVERLAY (subtle) ──────────────────────── */

body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.03) 2px,
    rgba(0, 0, 0, 0.03) 4px
  );
  pointer-events: none;
  z-index: 9999;
}

/* ─── CARD ENTRANCE ANIMATION ────────────────────────── */

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.game-card {
  animation: cardIn 0.4s ease both;
}

.game-card:nth-child(1)  { animation-delay: 0.04s; }
.game-card:nth-child(2)  { animation-delay: 0.08s; }
.game-card:nth-child(3)  { animation-delay: 0.12s; }
.game-card:nth-child(4)  { animation-delay: 0.16s; }
.game-card:nth-child(5)  { animation-delay: 0.20s; }
.game-card:nth-child(6)  { animation-delay: 0.24s; }
.game-card:nth-child(7)  { animation-delay: 0.28s; }
.game-card:nth-child(8)  { animation-delay: 0.32s; }
.game-card:nth-child(9)  { animation-delay: 0.36s; }
.game-card:nth-child(10) { animation-delay: 0.40s; }
.game-card:nth-child(11) { animation-delay: 0.44s; }
.game-card:nth-child(12) { animation-delay: 0.48s; }
.game-card:nth-child(13) { animation-delay: 0.52s; }
.game-card:nth-child(14) { animation-delay: 0.56s; }

/* ─── HEADER GLOW PULSE ──────────────────────────────── */

@keyframes glowPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.site-title::after {
  animation: glowPulse 4s ease-in-out infinite;
}
