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

/* Page navigation progress bar */
#nav-progress {
  position: fixed; top: 0; left: 0; right: 0; z-index: 9999;
  height: 3px; background: transparent; pointer-events: none;
}
#nav-progress-bar {
  height: 100%; width: 0%; background: var(--accent);
  border-radius: 0 2px 2px 0;
  transition: width .15s ease;
}

/* Custom dark scrollbar */
* { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.08) transparent; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.15); }
::-webkit-scrollbar-corner { background: transparent; }

:root {
  --bg: #050505;
  --fg: #e8e8ec;
  --card: #0a0a0c;
  --card-fg: #e8e8ec;
  --secondary: #101014;
  --muted: #161619;
  --muted-fg: #6e6e7a;
  --accent: #e53935;
  --accent-dim: rgba(229,57,53,0.07);
  --accent-border: rgba(229,57,53,0.25);
  --cyan: #0ef0cc;
  --cyan-dim: rgba(14,240,204,0.06);
  --cyan-border: rgba(14,240,204,0.2);
  --border: #161619;
  --border-hover: #252529;
  --input: #0c0c0f;
  --ring: #e53935;
  --radius: 0.35rem;
  --glow: rgba(229,57,53,0.15);
  --header-h: 3.25rem;
  --font-display: "Chakra Petch", sans-serif;
  --font-body: "DM Sans", -apple-system, BlinkMacSystemFont, sans-serif;
}

.hidden { display: none !important; }
html { height: 100%; overflow: hidden; scroll-behavior: smooth; }
body { height: 100%; overflow: hidden; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(229,57,53,0.03) 0%, transparent 70%),
    url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.015'/%3E%3C/svg%3E");
  background-attachment: fixed;
}

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

/* ═══ HEADER ═══ */
header {
  border-bottom: 1px solid var(--border);
  height: var(--header-h);
  display: flex;
  align-items: center;
  padding: 0 1.25rem;
  position: sticky; top: 0; z-index: 50;
  background: rgba(5,5,5,0.8);
  backdrop-filter: blur(20px) saturate(1.2);
  gap: 1rem;
}
.logo {
  font-family: var(--font-display);
  font-size: 1.05rem; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase;
  white-space: nowrap; flex-shrink: 0;
  position: relative;
}
.logo span { color: var(--accent); }
@keyframes glitch {
  0% { transform: translate(0); }
  20% { transform: translate(-2px, 1px); text-shadow: 2px 0 var(--accent), -2px 0 var(--cyan); }
  40% { transform: translate(2px, -1px); text-shadow: -2px 0 var(--accent), 2px 0 var(--cyan); }
  60% { transform: translate(-1px, 2px); text-shadow: 1px 0 var(--accent), -1px 0 var(--cyan); }
  80% { transform: translate(1px, -2px); text-shadow: -1px 0 var(--accent), 1px 0 var(--cyan); }
  100% { transform: translate(0); text-shadow: none; }
}

.game-tabs {
  display: flex; align-items: center; gap: 0.125rem;
  margin-bottom: 0.75rem; border-bottom: 1px solid var(--border);
}
.game-tab {
  font-family: var(--font-display);
  font-size: 0.775rem; font-weight: 600; color: var(--muted-fg);
  padding: 0.4rem 0.65rem; border-radius: 0;
  transition: color .15s; cursor: pointer; white-space: nowrap;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  letter-spacing: 0.03em; text-transform: uppercase;
}
.game-tab:hover { color: var(--fg); }
.game-tab.active { color: var(--fg); border-bottom-color: var(--accent); }

.header-actions { display: flex; align-items: center; gap: 0.375rem; flex-shrink: 0; margin-left: auto; }

.btn {
  display: inline-flex; align-items: center; gap: 0.35rem;
  font-family: var(--font-display);
  font-size: 0.775rem; font-weight: 500; letter-spacing: 0.02em;
  padding: 0.35rem 0.65rem; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--secondary);
  color: var(--muted-fg); cursor: pointer; transition: all .2s;
  white-space: nowrap; text-decoration: none;
}
.btn:hover { color: var(--fg); border-color: var(--border-hover); }
.btn i { font-size: 13px; flex-shrink: 0; }
.btn-accent { background: var(--accent-dim); border-color: var(--accent-border); color: var(--accent); }
.btn-accent:hover { background: rgba(229,57,53,0.15); color: #f44336; }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: var(--secondary); border-color: transparent; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: #c62828; }

nav { display: flex; align-items: center; gap: .125rem; flex-shrink: 0; }
nav a { font-family: var(--font-display); font-size: .775rem; font-weight: 500; color: var(--muted-fg); padding: .35rem .65rem; border-radius: var(--radius); transition: color .15s, background .15s; letter-spacing: 0.02em; }
nav a:hover, nav a.active { color: var(--fg); background: var(--secondary); }

/* ═══ PAGE LAYOUT - fixed viewport, only middle scrolls ═══ */
.page-layout {
  display: grid;
  grid-template-columns: 190px minmax(0,1fr) 240px;
  gap: 0;
  max-width: 1100px;
  margin: 0 auto;
  height: calc(100vh - var(--header-h));
  overflow: hidden;
}

.sidebar-left {
  padding: 1rem 1rem 1rem 1.25rem;
  overflow-y: auto;
  border-right: 1px solid var(--border);
}

.sidebar-right {
  padding: 1rem 1.25rem 1rem 1rem;
  overflow-y: auto;
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.main-content {
  padding: 1rem 1.25rem;
  overflow-y: auto;
}

/* ═══ LEFT SIDEBAR ═══ */
.sidebar-section-title {
  font-family: var(--font-display);
  font-size: 0.6rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.12em; color: var(--muted-fg); margin-bottom: 0.5rem; padding-left: 0.5rem;
}
.filter-list { list-style: none; display: flex; flex-direction: column; gap: 0.1rem; }
.filter-item {
  font-size: 0.8rem; font-weight: 450; color: var(--muted-fg);
  padding: 0.35rem 0.5rem; border-radius: var(--radius);
  cursor: pointer; transition: color .2s, background .2s;
  display: flex; align-items: center; gap: 0.45rem;
}
.filter-item i { font-size: 13px; opacity: 0.4; flex-shrink: 0; transition: opacity .2s; }
.filter-item:hover { color: var(--fg); background: var(--secondary); }
.filter-item:hover i { opacity: 0.7; }
.filter-item.active { color: var(--fg); background: var(--secondary); }
.filter-item.active i { opacity: 1; color: var(--accent); }
.filter-count {
  margin-left: auto; font-size: 0.575rem; font-family: var(--font-display);
  color: var(--muted-fg); opacity: 0.4; letter-spacing: 0.02em;
}

/* ═══ MAIN CONTENT ═══ */
.post-count { font-size: 0.7rem; color: var(--muted-fg); margin-left: auto; }

/* ═══ POST CARDS ═══ */
.posts { display: flex; flex-direction: column; gap: 0.6rem; }
.card {
  display: block; background: var(--card);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1rem; transition: border-color .25s, box-shadow .25s, transform .25s; color: var(--card-fg);
  position: relative; overflow: hidden;
  animation: cardIn 0.4s ease both;
}
.card:nth-child(1) { animation-delay: 0s; }
.card:nth-child(2) { animation-delay: 0.05s; }
.card:nth-child(3) { animation-delay: 0.1s; }
.card:nth-child(4) { animation-delay: 0.15s; }
.card:nth-child(5) { animation-delay: 0.2s; }
.card:nth-child(6) { animation-delay: 0.25s; }
.card:nth-child(7) { animation-delay: 0.3s; }
.card:nth-child(8) { animation-delay: 0.35s; }
@keyframes cardIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.card::before {
  content: ""; position: absolute; inset: 0; opacity: 0;
  background: radial-gradient(500px circle at var(--mx, 50%) var(--my, 50%), rgba(229,57,53,0.05), transparent 55%);
  transition: opacity 0.3s; pointer-events: none;
}
.card::after {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(229,57,53,0.3) 50%, transparent 100%);
  opacity: 0; transition: opacity .3s; pointer-events: none;
}
.card:hover::before { opacity: 1; }
.card:hover::after { opacity: 1; }
.card:hover { border-color: rgba(229,57,53,0.3); box-shadow: 0 0 0 1px rgba(229,57,53,0.06), 0 4px 24px rgba(229,57,53,0.08); transform: translateY(-1px); }
.card-header { display: flex; align-items: center; gap: 0.4rem; margin-bottom: 0.4rem; flex-wrap: wrap; }
.card-header .date { font-size: 0.6rem; font-family: var(--font-display); color: var(--muted-fg); letter-spacing: 0.02em; }
.card-header .dot { width: 2px; height: 2px; border-radius: 50%; background: var(--muted-fg); opacity: 0.4; }
.card-meta-item { font-size: 0.6rem; color: var(--muted-fg); display: inline-flex; align-items: center; gap: 0.2rem; }
.card-meta-item i { font-size: 10px; }
.card h2 { font-family: var(--font-display); font-size: 0.95rem; font-weight: 600; letter-spacing: -0.1px; margin-bottom: 0.25rem; line-height: 1.35; }
.card p { color: var(--muted-fg); font-size: 0.8rem; line-height: 1.55; }
.card-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 0.6rem; font-size: 0.7rem; color: var(--accent); font-weight: 500; font-family: var(--font-display); letter-spacing: 0.02em; }
.card-footer i { font-size: 11px; }
.card-empty { text-align: center; padding: 2rem 1rem; color: var(--muted-fg); font-size: 0.85rem; }
.card-skeleton { height: 120px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 0.6; } 50% { opacity: 0.25; } }

/* ═══ BADGE ═══ */
.badge {
  display: inline-flex; align-items: center;
  border: 1px solid var(--border); background: var(--secondary);
  font-family: var(--font-display); letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--muted-fg); padding: 0.1rem 0.45rem;
  border-radius: 9999px; font-size: 0.625rem; font-weight: 500; white-space: nowrap;
}
.badge-red { background: var(--accent-dim); border-color: var(--accent-border); color: var(--accent); }

/* ═══ RIGHT SIDEBAR ═══ */
.sidebar-card {
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 0.875rem; background: var(--card);
  position: relative;
  transition: border-color .2s;
}
.sidebar-card:hover { border-color: var(--border-hover); }
.sidebar-card-title {
  font-family: var(--font-display);
  font-size: 0.775rem; font-weight: 600; margin-bottom: 0.5rem;
  display: flex; align-items: center; gap: 0.35rem;
  letter-spacing: 0.02em;
}
.sidebar-card-title i { font-size: 13px; color: var(--accent); }

/* Subscribe + inline socials */
.subscribe-form { display: flex; gap: 0.3rem; }
.subscribe-form input {
  flex: 1; padding: 0.35rem 0.5rem; font-size: 0.775rem; font-family: inherit;
  background: var(--input); border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--fg); outline: none; transition: border-color .15s; min-width: 0;
}
.subscribe-form input::placeholder { color: var(--muted-fg); opacity: 0.5; }
.subscribe-form input:focus { border-color: var(--accent-border); }
.subscribe-form button {
  padding: 0.35rem 0.5rem; font-size: 0.775rem; font-weight: 500;
  font-family: var(--font-display); letter-spacing: 0.03em;
  background: var(--accent); border: none; border-radius: var(--radius);
  color: #fff; cursor: pointer; transition: all .2s; white-space: nowrap;
}
.subscribe-form button:hover { background: #c62828; }
.subscribe-msg { font-size: 0.65rem; margin-top: 0.3rem; min-height: 0.8rem; }
.subscribe-msg.success { color: #22c55e; }
.subscribe-msg.error { color: var(--accent); }

.social-row {
  display: flex; gap: 0.25rem; margin-top: 0.5rem; padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}
.social-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: var(--radius);
  color: var(--muted-fg); transition: color .15s, background .15s;
}
.social-icon:hover { color: var(--fg); background: var(--secondary); }
.social-icon i { font-size: 15px; }

.subscribe-note { font-size: 0.6rem; color: var(--muted-fg); margin-top: 0.375rem; opacity: 0.6; }

/* Support / Tip buttons */
.sidebar-btn {
  width: 100%; padding: 0.5rem; font-size: 0.775rem; font-weight: 500;
  font-family: var(--font-display); letter-spacing: 0.02em;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--card); color: var(--muted-fg); cursor: pointer;
  transition: all .2s; display: flex; align-items: center; justify-content: center; gap: 0.375rem;
  text-decoration: none;
}
.sidebar-btn:hover { color: var(--fg); border-color: var(--border-hover); background: var(--secondary); }
.sidebar-btn i { font-size: 14px; }
.sidebar-btn-accent { border-color: var(--accent-border); color: var(--accent); }
.sidebar-btn-accent:hover { background: var(--accent-dim); color: #ef4444; }

.sidebar-cta-text { font-size: 0.7rem; color: var(--muted-fg); line-height: 1.45; margin-bottom: 0.5rem; }

/* ═══ DIALOGS - translucent glassmorphism ═══ */
.dialog-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
}
.dialog {
  background: rgba(10,10,12,0.85);
  backdrop-filter: blur(28px) saturate(1.2); -webkit-backdrop-filter: blur(28px) saturate(1.2);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: calc(var(--radius) + 4px);
  width: 100%; max-width: 400px; max-height: 90vh; overflow-y: auto;
  padding: 1.5rem; position: relative;
  box-shadow: 0 0 60px rgba(0,0,0,0.5), 0 0 1px rgba(255,255,255,0.05);
  animation: dialogIn 0.25s ease;
}
@keyframes dialogIn {
  from { opacity: 0; transform: scale(0.97) translateY(4px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.dialog-close {
  position: absolute; top: 0.75rem; right: 0.75rem;
  background: none; border: none; color: var(--muted-fg);
  cursor: pointer; font-size: 18px; padding: 0.25rem; line-height: 1;
}
.dialog-close:hover { color: var(--fg); }
.dialog-title {
  font-family: var(--font-display);
  font-size: 1.1rem; font-weight: 700; margin-bottom: 0.25rem; letter-spacing: -0.1px;
}
.dialog-subtitle { font-size: 0.8rem; color: var(--muted-fg); margin-bottom: 1rem; }

/* Dialog tabs */
.dialog-tabs {
  display: flex; gap: 0.125rem; margin-bottom: 1rem;
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 0.2rem; background: var(--bg);
}
.dialog-tab {
  flex: 1; padding: 0.375rem 0.5rem; font-size: 0.775rem; font-weight: 500;
  font-family: inherit; background: transparent; border: none; border-radius: calc(var(--radius) - 2px);
  color: var(--muted-fg); cursor: pointer; transition: all .15s; text-align: center;
}
.dialog-tab:hover { color: var(--fg); }
.dialog-tab.active { background: var(--secondary); color: var(--fg); }

/* Line variant tabs */
.dialog-tabs-line {
  border: none; background: none; padding: 0;
  border-bottom: 1px solid var(--border); border-radius: 0; gap: 0;
}
.dialog-tabs-line .dialog-tab {
  border-radius: 0; padding: 0.5rem 0.75rem;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.dialog-tabs-line .dialog-tab.active {
  background: none; color: var(--fg);
  border-bottom-color: var(--accent);
}
.dialog-tabs-line .dialog-tab:hover { background: none; }

.dialog-tab-panel { display: none; }
.dialog-tab-panel.active { display: block; }

/* Crypto dialog */
.crypto-display { text-align: center; padding: 0.5rem 0; }
.qr-area {
  width: 140px; height: 140px; margin: 0 auto 0.75rem;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: #fff; display: flex; align-items: center; justify-content: center;
  color: #000; font-size: 0.65rem; font-weight: 500; padding: 0.5rem;
  word-break: break-all; font-family: monospace;
}
.crypto-addr-display {
  font-size: 0.65rem; font-family: "SF Mono","Fira Mono",monospace;
  color: var(--muted-fg); background: var(--input);
  padding: 0.5rem; border-radius: var(--radius); border: 1px solid var(--border);
  word-break: break-all; margin-bottom: 0.625rem; cursor: pointer;
  transition: border-color .15s, color .15s; position: relative;
}
.crypto-addr-display:hover { border-color: var(--border-hover); color: var(--fg); }

/* Auth dialog */
.auth-error { font-size: 0.75rem; color: var(--accent); margin-bottom: 0.75rem; min-height: 1rem; }
.auth-success { font-size: 0.75rem; color: #22c55e; margin-bottom: 0.75rem; }

.form-group { margin-bottom: 0.75rem; }
.form-label { display: block; font-family: var(--font-display); font-size: 0.775rem; font-weight: 500; margin-bottom: 0.3rem; letter-spacing: 0.01em; }
.form-hint { font-size: 0.65rem; color: var(--muted-fg); margin-top: 0.2rem; }
.form-input, .form-select, .form-textarea {
  width: 100%; padding: 0.45rem 0.625rem; font-size: 0.825rem; font-family: var(--font-body);
  background: var(--input); border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--fg); outline: none; transition: border-color .2s, box-shadow .2s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus { border-color: var(--accent-border); box-shadow: 0 0 0 2px rgba(229,57,53,0.06); }
.form-input::placeholder, .form-textarea::placeholder { color: var(--muted-fg); opacity: 0.5; }
.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' viewBox='0 0 24 24' stroke='%23a1a1aa' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0.75rem center; padding-right: 2rem;
}
.form-select option { background: var(--card); color: var(--fg); }
.form-textarea { resize: vertical; min-height: 4rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }

.form-check { display: flex; align-items: center; gap: 0.45rem; cursor: pointer; }
.form-check input[type="checkbox"] {
  appearance: none; width: 15px; height: 15px;
  border: 1px solid var(--border); border-radius: 3px;
  background: var(--input); cursor: pointer; position: relative; flex-shrink: 0;
}
.form-check input[type="checkbox"]:checked { background: var(--accent); border-color: var(--accent); }
.form-check input[type="checkbox"]:checked::after {
  content: ""; position: absolute; top: 2px; left: 4px;
  width: 4px; height: 7px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.form-check span { font-size: 0.8rem; }
.form-check .check-desc { font-size: 0.675rem; color: var(--muted-fg); display: block; }

.contact-field { max-height: 0; overflow: hidden; transition: max-height .2s; }
.contact-field.visible { max-height: 5rem; }

.btn-submit {
  width: 100%; padding: 0.5rem; font-size: 0.85rem; font-weight: 600;
  font-family: var(--font-display); letter-spacing: 0.03em;
  background: var(--accent); border: none; border-radius: var(--radius);
  color: #fff; cursor: pointer; transition: all .2s;
  display: flex; align-items: center; justify-content: center; gap: 0.4rem;
  position: relative; overflow: hidden;
}
.btn-submit:hover { background: #c62828; box-shadow: 0 0 20px rgba(229,57,53,0.2); }
.btn-submit:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-submit i { font-size: 15px; }

/* ═══ POST DETAIL PAGE ═══ */
.post-page {
  max-width: 720px; margin: 0 auto;
  padding: 2rem 2rem 3rem;
  height: calc(100vh - var(--header-h)); overflow-y: auto;
}
.post-page .back {
  display: inline-flex; align-items: center; gap: 0.35rem;
  margin-bottom: 1.25rem; color: var(--muted-fg); font-size: 0.8rem; font-weight: 500; transition: color .15s;
}
.post-page .back:hover { color: var(--fg); }
.post-page .back i { font-size: 13px; }
.post-page h1 { font-family: var(--font-display); font-size: 1.85rem; font-weight: 700; letter-spacing: -0.5px; margin-bottom: 0.6rem; line-height: 1.15; }
.post-page .post-meta {
  display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap;
  margin-bottom: 1.5rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--border);
}
.post-page .post-meta .date { font-size: 0.7rem; color: var(--muted-fg); }
.post-page .post-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--muted-fg); opacity: 0.35; }
.post-read-time, .post-view-count { font-size: 0.7rem; color: var(--muted-fg); display: inline-flex; align-items: center; gap: 0.25rem; }
.post-read-time i, .post-view-count i { font-size: 12px; }
.post-page .content { font-size: 0.95rem; line-height: 1.8; }
.post-page .content p { margin-bottom: 1.1rem; color: rgba(250,250,250,0.85); }
.post-page .content h2 { font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; margin: 2rem 0 0.75rem; letter-spacing: -0.1px; color: var(--fg); }
.post-page .content h3 { font-family: var(--font-display); font-size: 1rem; font-weight: 600; margin: 1.4rem 0 0.5rem; color: var(--fg); }
.post-page .content ul, .post-page .content ol { margin: 0 0 1.1rem 1.5rem; color: rgba(250,250,250,0.85); }
.post-page .content li { margin-bottom: 0.35rem; line-height: 1.7; }
.post-page .content li strong { color: var(--fg); }
.post-page .content blockquote {
  border-left: 2px solid var(--accent); padding: 0.75rem 1rem;
  margin: 1.25rem 0; background: linear-gradient(135deg, var(--secondary) 0%, var(--accent-dim) 100%);
  border-radius: 0 var(--radius) var(--radius) 0; color: var(--muted-fg); font-style: italic; font-size: 0.9rem;
}
.post-page .content a { color: rgba(250,250,250,0.9); text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 3px; text-decoration-color: rgba(250,250,250,0.3); transition: opacity .15s; }
.post-page .content a:hover { opacity: 1; color: #fafafa; text-decoration-color: rgba(250,250,250,0.5); }
/* Scoreboard tables */
.post-page .content .table-wrap { overflow-x: auto; margin: 0.5rem 0 1rem; }
.post-page .content table {
  width: 100%; border-collapse: separate; border-spacing: 0;
  font-size: 0.675rem; border-radius: 0.4rem; overflow: hidden;
  border: 1px solid var(--border);
}
.post-page .content th, .post-page .content td {
  padding: 0.3rem 0.5rem; text-align: left; border-bottom: 1px solid var(--border);
}
.post-page .content th {
  background: var(--secondary); font-weight: 600; font-size: 0.6rem;
  text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted-fg);
}
/* Fixed column widths for scoreboards only */
.scoreboard table { table-layout: fixed !important; }
.scoreboard th:nth-child(1),
.scoreboard td:nth-child(1) { width: 28px; text-align: center; padding-left: 0.3rem; padding-right: 0.15rem; }
.scoreboard th:nth-child(2),
.scoreboard td:nth-child(2) { width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scoreboard th:nth-child(3),
.scoreboard td:nth-child(3) { width: 26px; text-align: center; padding-left: 0.15rem; padding-right: 0.15rem; }
.scoreboard td:nth-child(n+4) { text-align: center; white-space: nowrap; }
.scoreboard th:nth-child(n+4) { text-align: center; }
.post-page .content tr:last-child td { border-bottom: none; }
.post-page .content td { color: rgba(250,250,250,0.85); }
.post-page .content tr:hover td { background: rgba(255,255,255,0.02); }
.post-page .content td img.agent-icon { width: 20px; height: 20px; border-radius: 3px; vertical-align: middle; }
.post-page .content td img.rank-icon { width: 18px; height: 18px; vertical-align: middle; }
.post-page .content .thrower td { background: rgba(220,38,38,0.06); }
.post-page .content .thrower td:first-child { border-left: 2px solid #dc2626; }
.post-page .content .beneficiary td { background: rgba(34,197,94,0.06); }
.post-page .content .beneficiary td:first-child { border-left: 2px solid #22c55e; }

/* Team heading outside table */
.team-heading {
  display: flex; align-items: center; gap: 0.4rem;
  font-size: 0.7rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.04em; margin-top: 0.75rem; margin-bottom: 0.25rem;
  padding: 0.3rem 0;
}
.team-heading .team-dot { width: 8px; height: 8px; border-radius: 2px; flex-shrink: 0; }
.team-heading .team-dot.red { background: #ef4444; }
.team-heading .team-dot.blue { background: #3b82f6; }
.team-heading .team-score { color: var(--fg); font-weight: 700; }
.match-id-label { font-family: "SF Mono","Fira Mono",monospace; font-size: 0.65rem; color: var(--muted-fg); opacity: 0.6; margin-top: 0.25rem; word-break: break-all; }
.color-legend { display: flex; gap: 1rem; font-size: 0.725rem; color: var(--muted-fg); margin: 0.75rem 0; }
.color-legend-item { display: flex; align-items: center; gap: 0.3rem; }
.color-legend-dot { width: 10px; height: 10px; border-radius: 2px; }
.color-legend-dot.thrower { background: #dc2626; }
.color-legend-dot.beneficiary { background: #22c55e; }
.puuid-display { font-family: "SF Mono","Fira Mono",monospace; font-size: 0.575rem; color: var(--muted-fg); opacity: 0.5; word-break: break-all; margin-bottom: 0.5rem; }
.puuid-label { font-size: 0.6rem; font-weight: 600; color: var(--muted-fg); opacity: 0.6; text-transform: uppercase; letter-spacing: 0.04em; display: block; margin-bottom: 0.1rem; font-family: inherit; }

/* ═══ POST VOTES ═══ */
.post-votes { display: flex; gap: 0.25rem; margin-left: auto; }
.vote-btn {
  display: inline-flex; align-items: center; gap: 0.2rem;
  padding: 0.2rem 0.5rem; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--card);
  color: var(--muted-fg); font-size: 0.7rem; font-family: inherit;
  cursor: pointer; transition: all .15s;
}
.vote-btn i { font-size: 12px; }
.vote-btn:hover { color: var(--fg); border-color: var(--border-hover); }
.vote-btn.active.vote-up { color: #22c55e; border-color: rgba(34,197,94,0.4); background: rgba(34,197,94,0.08); }
.vote-btn.active.vote-down { color: var(--accent); border-color: var(--accent-border); background: var(--accent-dim); }

/* Feed vote display */
.card-votes { display: flex; gap: 0.3rem; align-items: center; font-size: 0.65rem; color: var(--muted-fg); line-height: 1; }
.card-votes span { display: inline-flex; align-items: center; gap: 0.15rem; }
.card-votes i { font-size: 11px; }
.card-vote-up { color: #22c55e; }
.card-vote-down { color: var(--accent); }

/* ═══ POST CTA ═══ */
.post-cta {
  margin-top: 2rem; padding: 1rem;
  border: 1px solid var(--accent-border); border-radius: var(--radius);
  background: var(--accent-dim);
}
.post-cta-inner {
  display: flex; align-items: center; gap: 0.75rem;
}
.post-cta-inner > i { font-size: 20px; color: var(--accent); flex-shrink: 0; }
.post-cta-inner div { flex: 1; }
.post-cta-inner strong { font-size: 0.825rem; display: block; margin-bottom: 0.15rem; }
.post-cta-inner p { font-size: 0.725rem; color: var(--muted-fg); line-height: 1.4; margin: 0; }
.post-cta-inner .btn { flex-shrink: 0; }

/* ═══ CONTACT PAGE ═══ */
.contact-page {
  max-width: 600px; margin: 0 auto; padding: 2rem 2rem 3rem;
  height: calc(100vh - var(--header-h)); overflow-y: auto;
}
.contact-page h1 { font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; letter-spacing: -0.2px; margin-bottom: 0.3rem; }
.contact-subtitle { color: var(--muted-fg); font-size: 0.85rem; margin-bottom: 1.25rem; }
.contact-result { text-align: center; padding: 0.75rem; margin-top: 0.75rem; border-radius: var(--radius); font-size: 0.8rem; }
.contact-result.success { background: rgba(34,197,94,0.08); border: 1px solid rgba(34,197,94,0.2); color: #22c55e; }
.contact-result.error { background: var(--accent-dim); border: 1px solid var(--accent-border); color: var(--accent); }

.panel-apply-result { text-align: center; padding: 0.75rem; margin-top: 0.75rem; border-radius: var(--radius); font-size: 0.8rem; }
.panel-apply-result.success { background: rgba(34,197,94,0.08); border: 1px solid rgba(34,197,94,0.2); color: #22c55e; }
.panel-apply-result.error { background: var(--accent-dim); border: 1px solid var(--accent-border); color: var(--accent); }
.panel-apply-result.hidden { display: none; }

/* ═══ COMMENTS ═══ */
.comments-section {
  margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--border);
}
.comments-section h2 {
  font-size: 1rem; font-weight: 700; margin-bottom: 1rem;
  display: flex; align-items: center; gap: 0.375rem;
}
.comments-section h2 i { font-size: 16px; color: var(--muted-fg); }

.comment {
  padding: 0.75rem; border: 1px solid var(--border); border-radius: var(--radius);
  margin-bottom: 0.5rem; background: var(--card);
}
.comment-header { display: flex; align-items: center; gap: 0.4rem; margin-bottom: 0.35rem; }
.comment-username { font-weight: 600; font-size: 0.8rem; }
.comment-role { font-size: 0.6rem; padding: 0.05rem 0.3rem; border-radius: 9999px; font-weight: 500; }
.comment-role-admin { background: var(--accent-dim); border: 1px solid var(--accent-border); color: var(--accent); }
.comment-date { font-size: 0.65rem; color: var(--muted-fg); margin-left: auto; }
.comment-body { font-size: 0.825rem; color: rgba(250,250,250,0.85); line-height: 1.55; }
.comment-empty { font-size: 0.8rem; color: var(--muted-fg); padding: 1rem 0; }
.comment-login-prompt { font-size: 0.8rem; color: var(--muted-fg); padding: 0.75rem 0; }
.comment-login-prompt button { background: none; border: none; color: var(--accent); cursor: pointer; font-family: inherit; font-size: inherit; font-weight: 500; text-decoration: underline; padding: 0; }

.comment-form { margin-top: 0.75rem; }
.comment-form textarea {
  width: 100%; padding: 0.5rem 0.625rem; font-size: 0.825rem; font-family: inherit;
  background: var(--input); border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--fg); outline: none; resize: vertical; min-height: 3.5rem; transition: border-color .15s;
}
.comment-form textarea:focus { border-color: var(--accent-border); }
.comment-form textarea::placeholder { color: var(--muted-fg); opacity: 0.5; }
.comment-form-actions { display: flex; justify-content: flex-end; margin-top: 0.375rem; }

/* ═══ REPORT PAGE ═══ */
.report-page {
  max-width: 600px; margin: 0 auto; padding: 2rem 2rem 3rem;
  height: calc(100vh - var(--header-h)); overflow-y: auto;
}
.report-page h1 { font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; letter-spacing: -0.2px; margin-bottom: 0.3rem; }
.report-subtitle { color: var(--muted-fg); font-size: 0.85rem; margin-bottom: 1.25rem; }
.security-notice {
  border: 1px solid var(--cyan-border); background: var(--cyan-dim);
  border-radius: var(--radius); padding: 0.75rem; margin-bottom: 1.25rem;
  display: flex; gap: 0.5rem; align-items: flex-start;
}
.security-notice i { font-size: 15px; color: var(--cyan); flex-shrink: 0; margin-top: 1px; }
.security-notice p { font-size: 0.775rem; color: var(--muted-fg); line-height: 1.5; }
.security-notice strong { color: var(--fg); }
.report-result { text-align: center; padding: 0.75rem; margin-top: 0.75rem; border-radius: var(--radius); font-size: 0.8rem; }
.report-result.success { background: rgba(34,197,94,0.08); border: 1px solid rgba(34,197,94,0.2); color: #22c55e; }
.report-result.error { background: var(--accent-dim); border: 1px solid var(--accent-border); color: var(--accent); }

/* Valorant player preview card */
.val-player-preview {
  margin-top: 0.5rem; padding: 0.625rem;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--card); display: flex; align-items: center; gap: 0.75rem;
}
.val-player-preview.hidden { display: none; }
.val-players-list { display: flex; flex-direction: column; gap: 0.35rem; margin-top: 0.5rem; }
.val-player-entry {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.5rem 0.625rem;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--card); font-size: 0.775rem;
}
.val-player-entry.loading { opacity: 0.6; }
.val-player-entry.error { border-color: var(--accent-border); }
.val-player-entry img { width: 36px; height: 36px; border-radius: var(--radius); border: 1px solid var(--border); object-fit: cover; flex-shrink: 0; }
.val-player-entry-info { flex: 1; min-width: 0; }
.val-player-entry-name { font-weight: 600; font-size: 0.8rem; }
.val-player-entry-name .val-player-tag { color: var(--muted-fg); font-weight: 400; }
.val-player-entry-meta { font-size: 0.65rem; color: var(--muted-fg); }
.val-player-entry-remove {
  background: none; border: none; color: var(--muted-fg); cursor: pointer;
  font-size: 14px; padding: 0.2rem; transition: color .15s; flex-shrink: 0;
}
.val-player-entry-remove:hover { color: var(--accent); }
.val-player-preview.error { border-color: var(--accent-border); color: var(--accent); font-size: 0.775rem; }
.val-player-preview img { width: 48px; height: 48px; border-radius: var(--radius); border: 1px solid var(--border); object-fit: cover; }
.val-player-info { flex: 1; }
.val-player-name { font-size: 0.85rem; font-weight: 600; }
.val-player-tag { color: var(--muted-fg); }
.val-player-stats { display: flex; gap: 0.6rem; margin-top: 0.2rem; font-size: 0.7rem; color: var(--muted-fg); }
.val-player-stats span { display: flex; align-items: center; gap: 0.2rem; }

/* Post layout with player panel */
.post-with-player {
  display: grid;
  grid-template-columns: 1fr 280px;
  max-width: 1040px;
  margin: 0 auto;
  height: calc(100vh - var(--header-h));
  overflow: hidden;
}
.post-with-player .post-page {
  max-width: none; margin: 0;
  border-right: 1px solid var(--border);
}
.player-panel {
  padding: 1.25rem;
  overflow-y: auto;
  scrollbar-width: thin; scrollbar-color: var(--border) transparent;
}
.player-panel-section {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--card); padding: 0.875rem; margin-bottom: 0.6rem;
}
.player-panel-card { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.6rem; }
.player-panel-card img { width: 40px; height: 40px; border-radius: var(--radius); border: 1px solid var(--border); flex-shrink: 0; }
.player-panel-card-info { }
.player-panel-name { font-size: 0.825rem; font-weight: 600; }
.player-panel-tag { color: var(--muted-fg); font-weight: 400; font-size: 0.75rem; }
.player-panel-region { font-size: 0.65rem; color: var(--muted-fg); letter-spacing: 0.02em; }
.country-flag { width: 14px; height: 14px; border-radius: 50%; vertical-align: middle; flex-shrink: 0; }
.player-panel-stats {
  display: flex; flex-direction: column; gap: 0.35rem;
  margin: 0.5rem 0 0;
}
.player-stat-row {
  display: flex; justify-content: space-between; font-size: 0.75rem;
}
.player-stat-label { color: var(--muted-fg); }
.player-stat-value { font-weight: 600; }
.player-stat-accent { color: var(--accent); }
.player-panel-stats .rank-icon { width: 18px; height: 18px; vertical-align: middle; margin-right: 0.2rem; }
.player-panel h3 {
  font-size: 0.775rem; font-weight: 600; margin-bottom: 0.5rem;
  display: flex; align-items: center; gap: 0.35rem;
}
.player-panel h3 i { font-size: 13px; color: var(--accent); }
.name-history-list { list-style: none; }
.name-history-item {
  padding: 0.35rem 0; border-bottom: 1px solid var(--border);
  font-size: 0.725rem;
  display: flex; justify-content: space-between;
}
.name-history-item:last-child { border-bottom: none; }
.name-history-id { font-weight: 500; }
.name-history-date { color: var(--muted-fg); font-size: 0.65rem; }

@media (max-width: 1100px) {
  .post-layout { grid-template-columns: 1fr; height: auto; }
  .post-layout.post-with-player { grid-template-columns: 1fr; }
  .post-layout .post-page { border-right: none; }
  .post-toc { display: none; }
  .player-panel { border-top: 1px solid var(--border); }
}
.back-link { margin-bottom: 1rem; }

/* ═══ ABOUT PAGE ═══ */
.about-grid { display: grid; gap: 0.6rem; margin: 1rem 0; }
.about-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 0.875rem;
  transition: border-color .2s, transform .2s;
}
.about-card:hover { border-color: var(--border-hover); transform: translateY(-1px); }
.about-card h3 { font-family: var(--font-display); font-size: 0.85rem; font-weight: 600; margin-bottom: 0.3rem; display: flex; align-items: center; gap: 0.4rem; }
.about-card h3 i { font-size: 13px; color: var(--accent); }
.about-card p, .about-card li { color: var(--muted-fg); font-size: 0.8rem; line-height: 1.6; }
.about-card ul { margin: 0.3rem 0 0 1.25rem; }
.about-card li { margin-bottom: 0.15rem; }
@media (min-width: 641px) { .about-grid { grid-template-columns: 1fr 1fr; } }

/* Accordion (shadcn-style) */
.accordion { margin: 0.75rem 0; }
.accordion-item { border-bottom: 1px solid var(--border); }
.accordion-trigger {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  padding: 0.875rem 0; background: none; border: none;
  font-family: var(--font-display); font-size: 0.85rem; font-weight: 500;
  color: var(--fg); cursor: pointer; text-align: left; transition: color .15s;
}
.accordion-trigger:hover { color: var(--muted-fg); }
.accordion-icon {
  font-size: 14px; color: var(--muted-fg); flex-shrink: 0;
  transition: transform .2s ease;
}
.accordion-item.open .accordion-icon { transform: rotate(180deg); }
.accordion-content {
  max-height: 0; overflow: hidden;
  transition: max-height .3s ease, padding .3s ease;
  padding: 0 0;
}
.accordion-item.open .accordion-content {
  max-height: 300px;
  padding: 0 0 0.875rem;
}
.accordion-content p {
  font-size: 0.8rem; color: var(--muted-fg); line-height: 1.65; margin: 0;
}

/* ═══ NEW POST DIALOG ═══ */
.dialog-wide { max-width: 560px; }
.checkbox-group { display: flex; flex-direction: column; gap: 0.25rem; }

/* ═══ ADMIN SHELL ═══ */
.adm-shell {
  height: calc(100vh - var(--header-h));
  overflow: hidden;
}
.adm-layout {
  display: grid;
  grid-template-columns: 180px 1fr;
  height: 100%;
}
.dash-panel { display: none; height: 100%; }
.dash-panel.active { display: flex; }

/* Sidebar nav */
.adm-nav {
  border-right: 1px solid var(--border);
  padding: 0.75rem 0.5rem;
  display: flex;
  flex-direction: column;
}
.adm-nav-item {
  display: flex; align-items: center; gap: 0.45rem;
  font-size: 0.775rem; font-weight: 500; font-family: var(--font-display);
  color: var(--muted-fg); background: none; border: none;
  padding: 0.45rem 0.65rem; border-radius: var(--radius);
  cursor: pointer; transition: all .15s; width: 100%; text-align: left;
  letter-spacing: 0.02em;
}
.adm-nav-item i { font-size: 14px; }
.adm-nav-item:hover { color: var(--fg); background: var(--secondary); }
.adm-nav-item.active { color: var(--fg); background: var(--secondary); }

.adm-content {
  height: 100%;
  overflow: hidden;
}

/* ═══ CMS SPLIT LAYOUT ═══ */
.adm-split {
  display: grid;
  grid-template-columns: 260px 1fr;
  height: 100%;
  width: 100%;
}

/* Post list (left pane) */
.adm-list {
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  height: 100%; overflow: hidden;
}
.adm-list-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.75rem 0.875rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.adm-list-title {
  font-size: 0.775rem; font-weight: 600;
  display: flex; align-items: center; gap: 0.4rem;
}
.adm-list-count {
  font-size: 0.625rem; font-weight: 500; color: var(--muted-fg);
  background: var(--secondary); padding: 0.1rem 0.4rem; border-radius: 9999px;
}
.adm-list-add {
  background: none; border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--muted-fg); cursor: pointer; padding: 0.25rem 0.4rem;
  font-size: 14px; transition: all .15s; display: flex; align-items: center;
}
.adm-list-add:hover { color: var(--fg); border-color: var(--border-hover); background: var(--secondary); }

.adm-list-items {
  flex: 1; overflow-y: auto;
  scrollbar-width: thin; scrollbar-color: var(--border) transparent;
}

/* Post item in list */
.adm-post-item {
  padding: 0.625rem 0.875rem;
  border-bottom: 1px solid var(--border);
  cursor: pointer; transition: background .15s;
}
.adm-post-item:hover { background: var(--secondary); }
.adm-post-item.active { background: var(--secondary); border-left: 2px solid var(--accent); }
.adm-post-item-title {
  font-size: 0.775rem; font-weight: 500; margin-bottom: 0.2rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.adm-post-item-meta {
  display: flex; align-items: center; gap: 0.35rem;
  font-size: 0.625rem; color: var(--muted-fg);
}
.adm-post-item-meta .dot {
  width: 2px; height: 2px; border-radius: 50%;
  background: var(--muted-fg); opacity: 0.4;
}

/* Editor (right pane) */
.adm-editor {
  display: flex; flex-direction: column;
  height: 100%; overflow: hidden;
}
.adm-editor-empty {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  color: var(--muted-fg); gap: 0.5rem;
}
.adm-editor-empty i { font-size: 2rem; opacity: 0.3; }
.adm-editor-empty p { font-size: 0.825rem; }

.adm-editor-active {
  display: flex; flex-direction: column;
  height: 100%; overflow: hidden;
}

/* Editor topbar */
.adm-editor-topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.5rem 1rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.adm-editor-tabs {
  display: flex; gap: 0.125rem;
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 0.15rem; background: var(--bg);
}
.adm-editor-tab {
  padding: 0.3rem 0.6rem; font-size: 0.725rem; font-weight: 500;
  font-family: inherit; background: none; border: none;
  border-radius: calc(var(--radius) - 2px);
  color: var(--muted-fg); cursor: pointer; transition: all .15s;
  display: flex; align-items: center; gap: 0.3rem;
}
.adm-editor-tab i { font-size: 12px; }
.adm-editor-tab:hover { color: var(--fg); }
.adm-editor-tab.active { background: var(--secondary); color: var(--fg); }
.adm-editor-actions { display: flex; align-items: center; gap: 0.35rem; }

/* Editor tab panels */
.adm-etab-panel { display: none; flex: 1; overflow-y: auto; }
.adm-etab-panel.active { display: flex; flex-direction: column; }

/* Editor form */
.adm-form {
  display: flex; flex-direction: column;
  flex: 1; padding: 1rem 1.25rem; gap: 0.625rem;
  overflow-y: auto;
  scrollbar-width: thin; scrollbar-color: var(--border) transparent;
}
.adm-form-group { }
.adm-title-input {
  width: 100%; padding: 0.5rem 0;
  font-size: 1.25rem; font-weight: 700; font-family: var(--font-display);
  letter-spacing: -0.1px;
  background: none; border: none; border-bottom: 1px solid var(--border);
  color: var(--fg); outline: none; transition: border-color .15s;
}
.adm-title-input::placeholder { color: var(--muted-fg); opacity: 0.4; }
.adm-title-input:focus { border-color: var(--accent-border); }

.adm-form-meta {
  display: flex; gap: 1rem; align-items: center; flex-wrap: wrap;
}
.adm-form-inline {
  display: flex; align-items: center; gap: 0.5rem;
}
.adm-form-inline .form-label { margin-bottom: 0; font-size: 0.7rem; color: var(--muted-fg); white-space: nowrap; }
.adm-form-inline .form-select { width: auto; font-size: 0.75rem; padding: 0.3rem 1.75rem 0.3rem 0.5rem; }
.adm-checks { display: flex; gap: 0.5rem; }
.adm-checks .form-check span { font-size: 0.725rem; }

.adm-form-fill { flex: 1; display: flex; flex-direction: column; min-height: 0; }
/* Formatting toolbar */
.adm-toolbar {
  display: flex; align-items: center; gap: 0.2rem;
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--border); border-bottom: none;
  border-radius: var(--radius) var(--radius) 0 0;
  background: var(--secondary);
  flex-shrink: 0;
}
.adm-toolbar-group { display: flex; gap: 0.1rem; }
.adm-toolbar-sep {
  width: 1px; height: 18px; background: var(--border); margin: 0 0.25rem;
}
.adm-tb-btn {
  display: flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: var(--radius);
  background: none; border: none; color: var(--muted-fg);
  cursor: pointer; transition: all .15s; font-size: 14px;
}
.adm-tb-btn:hover { color: var(--fg); background: var(--muted); }
.adm-tb-btn:active { background: var(--border); }

.adm-content-editor {
  flex: 1; min-height: 200px; resize: none;
  font-family: "SF Mono","Fira Mono","Fira Code",monospace;
  font-size: 0.8rem; line-height: 1.7;
  border-top-left-radius: 0; border-top-right-radius: 0;
}

/* Preview panel */
.adm-preview-body {
  padding: 1.25rem 1.5rem;
  overflow-y: auto;
  flex: 1;
}

.cms-empty { text-align: center; padding: 2rem; color: var(--muted-fg); font-size: 0.8rem; }

/* ═══ ADMIN PAGES (Users, Settings) ═══ */
.adm-page {
  padding: 1.25rem 1.5rem;
  overflow-y: auto;
  height: 100%;
}
.adm-page-header {
  display: flex; align-items: center; gap: 0.75rem;
  margin-bottom: 1rem; padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}
.adm-page-header h1 { font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; letter-spacing: -0.1px; }
.adm-page-count { font-size: 0.7rem; color: var(--muted-fg); }

.adm-table-head, .user-row {
  display: grid;
  grid-template-columns: 1fr 100px 140px 100px;
  gap: 0.5rem; padding: 0.5rem 0.625rem; align-items: center;
  font-size: 0.775rem;
}
.adm-table-head {
  color: var(--muted-fg); font-weight: 600; text-transform: uppercase;
  font-size: 0.625rem; letter-spacing: 0.04em;
  border-bottom: 1px solid var(--border);
}
.user-row { border-bottom: 1px solid var(--border); transition: background .15s; }
.user-row:hover { background: var(--secondary); }
.user-username { font-weight: 500; }
.user-role { font-size: 0.7rem; }
.user-date { font-size: 0.7rem; color: var(--muted-fg); }
.user-actions { display: flex; gap: 0.2rem; }

/* Access denied */
.cms-access-denied {
  text-align: center; padding: 4rem 2rem;
}
.cms-access-denied i { font-size: 2.5rem; color: var(--accent); display: block; margin-bottom: 1rem; }
.cms-access-denied h2 { font-size: 1.2rem; font-weight: 700; margin-bottom: 0.5rem; }
.cms-access-denied p { color: var(--muted-fg); font-size: 0.85rem; margin-bottom: 1.25rem; }

/* ═══ REPORT CARDS (admin) ═══ */
.report-card {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--card); padding: 1rem; margin-bottom: 0.6rem;
}
.report-card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 0.5rem;
}
.report-card-meta { display: flex; align-items: center; gap: 0.35rem; }
.report-card-date { font-size: 0.65rem; color: var(--muted-fg); }
.report-card-id { font-family: "SF Mono","Fira Mono",monospace; font-size: 0.6rem; color: var(--muted-fg); opacity: 0.5; }
.report-card-title { font-size: 0.9rem; font-weight: 600; margin-bottom: 0.35rem; }
.report-card-desc { font-size: 0.775rem; color: var(--muted-fg); line-height: 1.55; margin-bottom: 0.5rem; }
.report-card-players { display: flex; flex-wrap: wrap; gap: 0.25rem; margin-bottom: 0.5rem; }
.report-card-links { margin-bottom: 0.5rem; }
.report-card-contact { font-size: 0.7rem; color: var(--muted-fg); padding-top: 0.4rem; border-top: 1px solid var(--border); }

/* ═══ SETTINGS ═══ */
.settings-card {
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.25rem; background: var(--card);
}
.settings-card-header h3 {
  font-size: 0.9rem; font-weight: 600; margin-bottom: 0.25rem;
  display: flex; align-items: center; gap: 0.4rem;
}
.settings-card-header h3 i { font-size: 15px; color: var(--accent); }
.settings-card-header p { font-size: 0.775rem; color: var(--muted-fg); line-height: 1.5; }
.settings-code-row {
  display: flex; align-items: center; gap: 0.75rem; margin-top: 1rem;
}
.settings-code {
  font-family: "SF Mono","Fira Mono",monospace; font-size: 1.5rem; font-weight: 700;
  letter-spacing: 0.35em; color: var(--fg);
  background: var(--input); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 0.625rem 1.25rem;
}
.settings-note {
  font-size: 0.675rem; color: var(--muted-fg); margin-top: 0.75rem; opacity: 0.7;
}

/* Scanline overlay for intimidating feel */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 999; pointer-events: none;
  background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,0,0,0.04) 2px, rgba(0,0,0,0.04) 4px);
  opacity: 0.35;
  mix-blend-mode: multiply;
}

/* ═══ FOOTER ═══ */
footer {
  border-top: 1px solid var(--border); text-align: center;
  padding: 1rem 2rem; color: var(--muted-fg); font-size: 0.7rem;
}

/* ═══ RESPONSIVE ═══ */
@media (max-width: 900px) {
  html, body { overflow: auto; }
  .page-layout { grid-template-columns: 1fr; height: auto; overflow: visible; }
  .sidebar-left { border-right: none; border-bottom: 1px solid var(--border); padding: 0.75rem 1rem; }
  .filter-list { flex-direction: row; flex-wrap: wrap; gap: 0.2rem; }
  .filter-item { padding: 0.25rem 0.5rem; font-size: 0.725rem; }
  .filter-count { display: none; }
  .main-content { border: none; padding: 0.75rem 1rem; overflow: visible; }
  .sidebar-right { border-left: none; border-top: 1px solid var(--border); padding: 0.75rem 1rem; overflow: visible; }
  .post-page, .report-page { height: auto; overflow: visible; }
  .header-actions .btn-text { display: none; }
}
@media (max-width: 640px) {
  header { padding: 0 0.75rem; gap: 0.5rem; }
  .game-tab { padding: 0.3rem 0.4rem; font-size: 0.7rem; }
  .post-page h1 { font-size: 1.4rem; }
  .form-row { grid-template-columns: 1fr; }
}
