/* Framebuf CMS — public theme */
:root {
  --bg: #0b0f14;
  --bg-2: #121821;
  --panel: #161d28;
  --border: #263243;
  --text: #e6edf3;
  --muted: #8b98a9;
  --accent: #5eead4;
  --accent-ink: #04140f;
  --radius: 14px;
  --wrap: 1080px;
  --mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  background: radial-gradient(1200px 600px at 50% -10%, #12202b 0%, var(--bg) 60%) fixed;
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }

.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(11,15,20,.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.brand { display: inline-flex; align-items: center; }
.brand-text { font-family: var(--mono); font-weight: 700; font-size: 1.25rem; letter-spacing: .02em; color: var(--text); }
.brand:hover { text-decoration: none; }
.logo { max-height: 40px; width: auto; }
.main-nav { display: flex; align-items: center; gap: 6px; }
.main-nav a { color: var(--muted); padding: 8px 12px; border-radius: 8px; font-weight: 500; font-size: .95rem; }
.main-nav a:hover { color: var(--text); background: var(--bg-2); text-decoration: none; }
.main-nav a.active { color: var(--accent); }
.nav-admin { border: 1px solid var(--border); }
.nav-toggle { display: none; background: none; border: 1px solid var(--border); color: var(--text); font-size: 1.2rem; border-radius: 8px; padding: 4px 10px; cursor: pointer; }

.hero { padding: 84px 0 48px; text-align: center; }
.hero-title { font-family: var(--mono); font-size: clamp(2.2rem, 6vw, 4rem); margin: 0 0 14px; letter-spacing: -.02em; }
.hero-sub { font-size: 1.2rem; color: var(--muted); max-width: 620px; margin: 0 auto 28px; }

.btn { display: inline-block; padding: 11px 18px; border-radius: 10px; font-weight: 600; font-size: .95rem; background: var(--panel); color: var(--text); border: 1px solid var(--border); cursor: pointer; }
.btn:hover { text-decoration: none; border-color: var(--accent); }
.btn-accent { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn-accent:hover { filter: brightness(1.08); }
.btn.full { width: 100%; text-align: center; }
.btn.small { padding: 6px 11px; font-size: .82rem; border-radius: 8px; }
.btn.danger { color: #ff8a8a; }
.btn.danger:hover { border-color: #ff8a8a; }

.section { padding: 40px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 22px; border-bottom: 1px solid var(--border); padding-bottom: 10px; }
.section-head h2 { margin: 0; font-family: var(--mono); font-size: 1.4rem; }
.section-link { font-size: .9rem; }
.page-head { padding: 40px 0 10px; }
.page-head h1 { font-family: var(--mono); font-size: 2.2rem; margin: 0 0 6px; }
.narrow { max-width: 760px; }

.grid { display: grid; gap: 20px; }
.games-grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: transform .15s ease, border-color .15s ease; }
.card:hover { text-decoration: none; transform: translateY(-3px); border-color: var(--accent); }
.card-media { aspect-ratio: 16/10; background: var(--bg-2); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-media-empty { width: 100%; height: 100%; display: grid; place-items: center; color: var(--border); font-size: 3rem; font-family: var(--mono); }
.card-media-empty.big { aspect-ratio: 16/10; }
.card-body { padding: 16px 18px; }
.card-body h3 { margin: 0 0 4px; color: var(--text); font-size: 1.12rem; }

.post-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; }
.post-list.wide .post-item { padding: 22px; }
.post-item { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; }
.post-item h2, .post-item h3 { margin: 0 0 6px; color: var(--text); }
.post-item a:hover { text-decoration: none; }
.post-item a:hover h2, .post-item a:hover h3 { color: var(--accent); }
.post-meta { color: var(--muted); font-size: .85rem; font-family: var(--mono); margin: 0 0 8px; }

.crumbs { font-size: .9rem; margin-bottom: 18px; }
.game-hero { display: grid; grid-template-columns: 1.2fr 1fr; gap: 28px; align-items: center; margin-bottom: 30px; }
.game-hero-media img, .game-hero-media .card-media-empty { border-radius: var(--radius); border: 1px solid var(--border); width: 100%; }
.game-hero-info h1 { font-family: var(--mono); font-size: 2.2rem; margin: 0 0 8px; }
.game-hero-info .lead { font-size: 1.15rem; color: var(--muted); margin: 0 0 12px; }
.game-embed { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin: 8px 0 14px; }
.game-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.embed-actions { margin: 0 0 24px; }

.game-gallery { margin: 8px 0 24px; }
.game-gallery h2 { font-family: var(--mono); font-size: 1.3rem; margin: 0 0 12px; }
.game-gallery .gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.game-gallery .gallery-shot { display: block; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--radius); border: 1px solid var(--border); background: #000; }
.game-gallery .gallery-shot img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s ease; }
.game-gallery .gallery-shot:hover img { transform: scale(1.04); }

.post-cover { width: 100%; border-radius: var(--radius); border: 1px solid var(--border); margin: 4px 0 18px; }
.post-link { margin: 0 0 20px; }
.post-thumb { display: block; margin-bottom: 10px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.post-thumb img { display: block; width: 100%; max-height: 260px; object-fit: cover; }

.prose { font-size: 1.05rem; }
.prose h1, .prose h2, .prose h3 { font-family: var(--mono); margin-top: 1.6em; }
.prose img { border-radius: 10px; border: 1px solid var(--border); margin: 1em 0; }
.prose code { font-family: var(--mono); background: var(--bg-2); padding: 2px 6px; border-radius: 6px; font-size: .9em; }
.prose pre { background: var(--bg-2); border: 1px solid var(--border); padding: 16px; border-radius: 10px; overflow: auto; }
.prose pre code { background: none; padding: 0; }
.prose a { text-decoration: underline; }
.prose blockquote { border-left: 3px solid var(--accent); margin: 1em 0; padding: 4px 16px; color: var(--muted); }

.site-footer { border-top: 1px solid var(--border); margin-top: 60px; padding: 30px 0; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: .9rem; }

@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .main-nav { display: none; position: absolute; top: 66px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--bg-2); border-bottom: 1px solid var(--border); padding: 8px; }
  body.nav-open .main-nav { display: flex; }
  .game-hero { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; gap: 8px; }
}
