:root {
  --bg: #0f1115;
  --panel: #171a21;
  --panel-2: #1e222b;
  --text: #e8eaed;
  --text-dim: #9aa0ab;
  --accent: #ff5b2e;
  --accent-2: #2e7bff;
  --border: #2a2e38;
  --radius: 10px;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; line-height: 1.6; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
.container { max-width: 1160px; margin: 0 auto; padding: 0 20px; }

header.site-header { background: var(--panel); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 50; }
.header-top { display: flex; align-items: center; justify-content: space-between; padding: 16px 0; }
.logo { font-size: 22px; font-weight: 800; }
.logo span { color: var(--accent); }
.tagline { color: var(--text-dim); font-size: 13px; margin-top: 2px; }
nav.categories { display: flex; gap: 18px; overflow-x: auto; padding: 10px 0; border-top: 1px solid var(--border); }
nav.categories a { color: var(--text-dim); font-size: 14px; font-weight: 600; white-space: nowrap; padding: 4px 2px; }
nav.categories a:hover, nav.categories a.active { color: var(--accent); }
.search-box { display: flex; gap: 8px; }
.search-box input { background: var(--panel-2); border: 1px solid var(--border); color: var(--text); padding: 8px 12px; border-radius: var(--radius); width: 220px; }
.search-box button { background: var(--accent); color: #fff; border: none; padding: 8px 14px; border-radius: var(--radius); cursor: pointer; font-weight: 600; }

.hero { padding: 40px 0 20px; }
.hero h1 { font-size: 30px; margin: 0 0 8px; }
.hero p { color: var(--text-dim); max-width: 640px; }

.section-title { font-size: 20px; font-weight: 800; margin: 36px 0 16px; border-left: 4px solid var(--accent); padding-left: 10px; }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 900px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid { grid-template-columns: 1fr; } }

.card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: transform .15s ease, border-color .15s ease; display: flex; flex-direction: column; }
.card:hover { transform: translateY(-3px); border-color: var(--accent); }
.card .thumb { height: 150px; background: linear-gradient(135deg, var(--accent-2), var(--accent)); display: flex; align-items: center; justify-content: center; font-size: 13px; color: #fff; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
.card .body { padding: 14px 16px; flex: 1; display: flex; flex-direction: column; }
.card .cat { color: var(--accent); font-size: 12px; font-weight: 700; text-transform: uppercase; margin-bottom: 6px; }
.card h3 { font-size: 16px; margin: 0 0 8px; }
.card p { color: var(--text-dim); font-size: 13px; margin: 0 0 10px; flex: 1; }
.card .meta { color: var(--text-dim); font-size: 12px; }

.badge { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 20px; background: var(--panel-2); color: var(--text-dim); margin-left: 6px; }
.badge.review { background: #3a2a12; color: #ffb454; }

.breadcrumbs { color: var(--text-dim); font-size: 13px; margin: 20px 0 6px; }
.breadcrumbs a:hover { color: var(--accent); }

.article-header h1 { font-size: 30px; margin: 10px 0 12px; }
.article-meta { color: var(--text-dim); font-size: 13px; margin-bottom: 20px; }
.article-body { font-size: 17px; }
.article-body h2 { font-size: 22px; margin-top: 32px; }
.article-body h3 { font-size: 18px; margin-top: 24px; }
.article-body p { margin: 14px 0; }
.article-body ul, .article-body ol { margin: 14px 0; padding-left: 24px; }
.article-body a { color: var(--accent-2); text-decoration: underline; }

.faq { margin-top: 30px; border-top: 1px solid var(--border); padding-top: 20px; }
.faq-item { border-bottom: 1px solid var(--border); padding: 14px 0; }
.faq-item h4 { margin: 0 0 6px; font-size: 15px; }
.faq-item p { margin: 0; color: var(--text-dim); font-size: 14px; }

.tags { margin-top: 24px; display: flex; gap: 8px; flex-wrap: wrap; }
.tags a { background: var(--panel-2); border: 1px solid var(--border); padding: 4px 12px; border-radius: 20px; font-size: 12px; color: var(--text-dim); }

.review-notice { background: #2a1e10; border: 1px solid #5a3d15; color: #ffb454; padding: 12px 16px; border-radius: var(--radius); font-size: 13px; margin: 16px 0; }

.ad-slot { background: var(--panel); border: 1px dashed var(--border); border-radius: var(--radius); padding: 14px; text-align: center; color: var(--text-dim); font-size: 12px; margin: 24px 0; min-height: 90px; display: flex; align-items: center; justify-content: center; }

footer.site-footer { background: var(--panel); border-top: 1px solid var(--border); margin-top: 60px; padding: 40px 0; color: var(--text-dim); font-size: 13px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 24px; }
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-grid h4 { color: var(--text); font-size: 14px; margin-bottom: 10px; }
.footer-grid a { display: block; color: var(--text-dim); padding: 3px 0; }
.footer-grid a:hover { color: var(--accent); }
.footer-bottom { text-align: center; margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--border); color: var(--text-dim); }

.search-form { margin: 20px 0 30px; display: flex; gap: 8px; max-width: 480px; }
.search-form input { flex: 1; background: var(--panel-2); border: 1px solid var(--border); color: var(--text); padding: 10px 14px; border-radius: var(--radius); }
.search-form button { background: var(--accent); border: none; color: #fff; padding: 10px 18px; border-radius: var(--radius); font-weight: 700; cursor: pointer; }

.pagelist { list-style: none; padding: 0; }
.pagelist li { padding: 10px 0; border-bottom: 1px solid var(--border); }

.admin-body { background: #0f1115; color: #e8eaed; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; }
.admin-wrap { max-width: 980px; margin: 40px auto; padding: 0 20px; }
.admin-card { background: #171a21; border: 1px solid #2a2e38; border-radius: 10px; padding: 24px; }
.admin-table { width: 100%; border-collapse: collapse; margin-top: 16px; }
.admin-table th, .admin-table td { text-align: left; padding: 10px; border-bottom: 1px solid #2a2e38; font-size: 14px; }
.admin-table th { color: #9aa0ab; font-weight: 600; }
.btn { display: inline-block; background: #ff5b2e; color: #fff; border: none; padding: 8px 14px; border-radius: 8px; font-weight: 700; cursor: pointer; font-size: 13px; text-decoration:none; }
.btn.secondary { background: #2e7bff; }
.btn.small { padding: 5px 10px; font-size: 12px; }
.status-pill { padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 700; }
.status-published { background: #133a1e; color: #3ddc7d; }
.status-needs_review { background: #3a2a12; color: #ffb454; }
.status-draft { background: #2a2e38; color: #9aa0ab; }
.login-box { max-width: 380px; margin: 100px auto; }
.login-box input { width: 100%; padding: 12px; margin-bottom: 12px; border-radius: 8px; border: 1px solid #2a2e38; background: #171a21; color: #fff; }
.error-msg { color: #ff5b6a; font-size: 13px; margin-bottom: 10px; }
