/* Trang danh mục: cùng token màu với giao diện bài (spec/08 mục 1). */
:root {
  --bg: #0a0f1f; --panel: rgba(17, 25, 50, .94); --line: #2a3a63; --ink: #e8ecf7; --muted: #9aa6c4; --accent: #ffcc4e;
  --font: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', sans-serif; color-scheme: dark;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(ellipse at 50% 0%, #1a2347 0%, var(--bg) 60%) fixed; color: var(--ink); font: 16px/1.5 var(--font); }
button, input { font: inherit; color: inherit; }
.top { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: end; max-width: 1180px; margin: 0 auto; padding: 32px 16px 8px; }
h1 { margin: 0; font-size: 30px; letter-spacing: -.01em; }
.sub { margin: 4px 0 0; color: var(--muted); }
.join { display: flex; gap: 8px; align-items: center; opacity: .55; }
.join label { color: var(--muted); font-size: 14px; }
.join input { width: 120px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; }
.join button { background: none; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; }
main { max-width: 1180px; margin: 0 auto; padding: 8px 16px 32px; }
.tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 16px 0; }
#q { flex: 1 1 260px; min-width: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 9px 14px; }
#q:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; cursor: pointer; font-size: 14px; }
.chip.on { background: var(--accent); border-color: var(--accent); color: #1a1300; font-weight: 600; }
.grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.card a { display: flex; flex-direction: column; height: 100%; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; color: inherit; text-decoration: none; transition: border-color .15s, transform .15s; }
.card a:hover, .card a:focus-visible { border-color: var(--accent); transform: translateY(-2px); outline: none; }
.thumb { aspect-ratio: 16 / 9; display: grid; place-items: center; font-size: 46px; background: linear-gradient(135deg, var(--c1), var(--c2)); }
.body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.topic { color: var(--accent); font-size: 12.5px; font-weight: 600; letter-spacing: .02em; }
.title { font-weight: 700; font-size: 17px; line-height: 1.35; }
.meta { margin-top: auto; padding-top: 6px; color: var(--muted); font-size: 13px; }
.msg { color: var(--muted); }
footer { max-width: 1180px; margin: 0 auto; padding: 16px; color: var(--muted); font-size: 12.5px; border-top: 1px solid var(--line); }
@media (max-width: 600px) { h1 { font-size: 24px; } .top { padding-top: 20px; } }
