@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg: #080808;
  --surface: #111111;
  --border: #222222;
  --text: #E8E3D5;
  --muted: #666660;
  --accent: #C6FF00;
  --red: #FF3D2E;
  --cat-word: #C6FF00;
  --cat-arcade: #FF6B2B;
  --cat-puzzle: #00E5FF;
  --font-display: 'Syne', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

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

a { color: inherit; text-decoration: none; }

@keyframes glitch {
  0% { transform: translate(0); }
  20% { transform: translate(-2px, 1px); }
  40% { transform: translate(2px, -1px); }
  60% { transform: translate(-1px, 2px); }
  80% { transform: translate(1px, -2px); }
  100% { transform: translate(0); }
}


/* ── Nav ── */
nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 40px; border-bottom: 1px solid var(--border);
  position: sticky; top: 0;
  background: rgba(8,8,8,0.92); backdrop-filter: blur(8px); z-index: 100;
}
.logo { font-family: var(--font-display); font-weight: 800; font-size: 17px; letter-spacing: -0.5px; }
.logo:hover { animation: glitch 0.3s steps(2) infinite; }
.logo span  { color: var(--accent); }
.nav-links { display: flex; gap: 32px; list-style: none; }
.nav-links a { color: var(--muted); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; transition: color 0.15s; }
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.btn-submit { background: var(--accent); color: #080808; font-family: var(--font-mono); font-size: 11px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; padding: 8px 16px; display: inline-block; transition: opacity 0.15s; }
.btn-submit:hover { opacity: 0.85; }
@media (max-width: 768px) { nav { padding: 16px 20px; } .nav-links { display: none; } }

/* ── Footer ── */
footer { border-top: 1px solid var(--border); padding: 32px 40px; display: flex; align-items: center; justify-content: space-between; }
.footer-links { display: flex; gap: 24px; list-style: none; }
.footer-links a { font-size: 11px; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; transition: color 0.15s; }
.footer-links a:hover { color: var(--text); }
.footer-copy { font-size: 11px; color: var(--muted); }
.footer-copy a { color: var(--text); }
@media (max-width: 768px) { footer { padding: 24px 20px; flex-direction: column; gap: 16px; text-align: center; } }

/* ── Hero ── */
.hero { padding: 80px 40px 60px; border-bottom: 1px solid var(--border); position: relative; overflow: hidden; }
.hero-tag { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); margin-bottom: 24px; display: flex; align-items: center; gap: 8px; }
.hero-tag::before { content: ''; width: 20px; height: 1px; background: var(--accent); }
.hero h1 { font-family: var(--font-display); font-weight: 800; font-size: clamp(52px, 8vw, 96px); line-height: 0.95; letter-spacing: -3px; max-width: 800px; margin-bottom: 32px; }
.hero h1 em { font-style: normal; color: var(--muted); }
.hero-sub { font-size: 13px; color: var(--muted); max-width: 420px; line-height: 1.7; border-left: 2px solid var(--border); padding-left: 16px; }
.hero-sub strong { color: var(--text); font-weight: 400; }
.hero-counter { position: absolute; right: 40px; bottom: 40px; text-align: right; }
.hero-counter .num { font-family: var(--font-display); font-weight: 800; font-size: 64px; line-height: 1; color: var(--border); letter-spacing: -3px; }
.hero-counter .label { font-size: 11px; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; }

/* ── Featured ── */
.featured-strip { padding: 40px; }
.featured-game { border: 1px solid var(--border); display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; transition: border-color 0.2s; }
.featured-game:hover { border-color: #444; }
.featured-thumb { min-height: 280px; position: relative; overflow: hidden; }
.featured-thumb canvas { width: 100%; height: 100%; display: block; }
.featured-content { padding: 40px; display: flex; flex-direction: column; justify-content: space-between; border-left: 1px solid var(--border); }
.featured-label { font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); margin-bottom: 20px; }
.featured-title { font-family: var(--font-display); font-weight: 800; font-size: 36px; letter-spacing: -1px; line-height: 1.1; margin-bottom: 16px; }
.featured-desc { font-size: 12px; color: var(--muted); line-height: 1.7; margin-bottom: 24px; }
.featured-tags { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.featured-meta { font-size: 11px; color: var(--muted); margin-bottom: 20px; }
.featured-meta span { color: var(--text); }
.featured-play { display: inline-block; background: var(--accent); color: var(--bg); font-family: var(--font-mono); font-size: 11px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; padding: 12px 24px; transition: opacity 0.15s; }
.featured-play:hover { opacity: 0.85; }

/* ── Ad strip ── */
.ad-strip { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 20px 40px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.ad-strip-text { font-size: 12px; color: var(--muted); }
.ad-strip-text strong { color: var(--text); font-weight: 400; }
.ad-strip-cta { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--border); padding: 8px 16px; white-space: nowrap; transition: all 0.15s; }
.ad-strip-cta:hover { border-color: var(--text); color: var(--text); }

/* ── Game card ── */
.game-card { background: var(--bg); position: relative; transition: background 0.15s; overflow: hidden; cursor: pointer; display: block; }
.game-card:hover { background: var(--surface); }
.game-thumb { width: 100%; aspect-ratio: 16/9; position: relative; overflow: hidden; }
.game-thumb canvas { width: 100%; height: 100%; display: block; }
.play-overlay { position: absolute; inset: 0; background: rgba(8,8,8,0.7); display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.2s; }
.game-card:hover .play-overlay { opacity: 1; }
.play-btn { border: 1px solid var(--accent); color: var(--accent); font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; padding: 10px 24px; background: transparent; }
.game-info { padding: 16px; border-top: 1px solid var(--border); }
.game-name { font-family: var(--font-display); font-weight: 700; font-size: 16px; letter-spacing: -0.3px; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.name-accent[data-cat="word"]   { color: var(--cat-word); }
.name-accent[data-cat="arcade"] { color: var(--cat-arcade); }
.name-accent[data-cat="puzzle"] { color: var(--cat-puzzle); }
.game-meta-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.game-author { font-size: 11px; color: var(--muted); }
.game-author .author-name { color: var(--accent); }
.game-tags { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 10px; }
.tag { font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; padding: 3px 7px; border: 1px solid var(--border); color: var(--muted); }
.tag.featured { border-color: var(--accent);    color: var(--accent); }
.tag.new      { border-color: var(--red);        color: var(--red); }
.tag.word     { border-color: var(--cat-word);   color: var(--cat-word); }
.tag.arcade   { border-color: var(--cat-arcade); color: var(--cat-arcade); }
.tag.puzzle   { border-color: var(--cat-puzzle); color: var(--cat-puzzle); }
.game-footer { display: flex; align-items: center; justify-content: space-between; padding-top: 10px; border-top: 1px solid var(--border); }
.game-plays { font-size: 11px; color: var(--muted); display: flex; align-items: center; gap: 4px; }
.game-plays::before { content: ''; width: 6px; height: 6px; background: var(--muted); border-radius: 50%; display: inline-block; }
.built-with { font-size: 10px; color: var(--muted); letter-spacing: 0.04em; }
.built-with strong { color: var(--text); font-weight: 400; }

/* ── Filters / Grid ── */
.grid-section { padding: 40px; }
.filters { display: flex; align-items: center; gap: 4px; margin-bottom: 24px; overflow-x: auto; }
.filter-btn { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; padding: 6px 14px; border: 1px solid transparent; background: transparent; color: var(--muted); white-space: nowrap; transition: all 0.15s; }
.filter-btn:hover { color: var(--text); border-color: var(--border); }
.filter-btn[data-cat="word"]:hover, .filter-btn[data-cat="word"].active   { background: var(--cat-word);   border-color: var(--cat-word);   color: var(--bg); }
.filter-btn[data-cat="arcade"]:hover, .filter-btn[data-cat="arcade"].active { background: var(--cat-arcade); border-color: var(--cat-arcade); color: var(--bg); }
.filter-btn[data-cat="puzzle"]:hover, .filter-btn[data-cat="puzzle"].active { background: var(--cat-puzzle); border-color: var(--cat-puzzle); color: var(--bg); }
.filter-btn.active { color: var(--bg); background: var(--text); border-color: var(--text); }
.section-header { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 24px; }
.section-title { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.section-count { font-size: 11px; color: var(--muted); }
.games-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); }
.game-item { background: var(--bg); }
.game-item.hidden { display: none; }

/* ── Game detail ── */
.game-page { padding: 40px; }
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--muted); letter-spacing: 0.04em; margin-bottom: 24px; }
.breadcrumb a:hover { color: var(--text); }
.breadcrumb span:last-child { color: var(--text); }
.game-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.game-title-row h1 { font-family: var(--font-display); font-weight: 800; font-size: clamp(32px, 5vw, 56px); letter-spacing: -2px; line-height: 1; margin-bottom: 8px; }
.game-byline { font-size: 12px; color: var(--muted); }
.author { color: var(--accent); border-bottom: 1px solid transparent; transition: border-color 0.15s; }
.author:hover { border-color: var(--accent); }
.game-byline strong { color: var(--text); font-weight: 400; }
.game-actions { display: flex; gap: 12px; align-items: center; flex-shrink: 0; }
.btn-play { background: var(--accent); color: var(--bg); font-family: var(--font-mono); font-size: 11px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; padding: 12px 24px; display: inline-block; white-space: nowrap; transition: opacity 0.15s; }
.btn-play:hover { opacity: 0.85; }
.btn-back { font-size: 11px; color: var(--muted); letter-spacing: 0.06em; transition: color 0.15s; white-space: nowrap; }
.btn-back:hover { color: var(--text); }
.game-meta-strip { display: flex; align-items: center; gap: 24px; padding: 16px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); margin-bottom: 32px; flex-wrap: wrap; }
.meta-item { display: flex; align-items: center; gap: 8px; }
.meta-label { font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.meta-value { font-size: 12px; }
.embed-container { width: 100%; aspect-ratio: 16/9; background: var(--surface); border: 1px solid var(--border); position: relative; margin-bottom: 40px; }
.embed-container iframe { width: 100%; height: 100%; border: none; display: block; }
.embed-coming-soon { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; }
.cs-label { font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); border: 1px solid var(--accent); padding: 3px 10px; }
.embed-coming-soon p { font-size: 12px; color: var(--muted); }
.game-about { max-width: 640px; border-top: 1px solid var(--border); padding-top: 32px; }
.game-about h2 { font-family: var(--font-display); font-weight: 700; font-size: 14px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 16px; }
.game-about p { font-size: 13px; color: var(--muted); line-height: 1.8; }

@media (max-width: 768px) {
  .hero { padding: 48px 20px 40px; } .hero-counter { display: none; }
  .featured-strip { padding: 20px; }
  .featured-game { grid-template-columns: 1fr; }
  .featured-content { border-left: none; border-top: 1px solid var(--border); padding: 24px; }
  .grid-section { padding: 24px 20px; }
  .game-page { padding: 20px; }
  .game-title-row { flex-direction: column; }
  .embed-container { aspect-ratio: 4/3; }
}
