/* ==========================================================================
   ARABIAN CMS — Shared Pages Stylesheet
   Used by banlist.php and team.php
   ========================================================================== */

/* ---- Base (mirrors style.css) ---- */
:root,
[data-theme="gold"] {
    --bg: #0a0c0b;
    --bg-rgb: 10, 12, 11;
    --bg2: #0f1311;
    --header-bg: rgba(10, 12, 11, .80);
    --panel: rgba(18, 22, 20, .86);
    --panel2: rgba(26, 31, 28, .92);
    --line: rgba(120, 140, 120, .14);
    --line-hot: rgba(211, 175, 55, .30);
    --hud: #d3af37;
    --hud-dim: #977e27;
    --hud-hover: #f1c95a;
    --hud-glow: rgba(211, 175, 55, .55);
    --hud-soft: rgba(211, 175, 55, .10);
    --hud-contrast: #1a1408;
    --t: #d9534f;
    --on: #6fcf5f;
    --ct: #5b9bd5;
    --ink: #e7eae3;
    --ink2: #9aa39a;
    --ink3: #5f6961;
    --r: 12px;
    --r-sm: 8px;
}

[data-theme="white-blue"] {
    --bg: #f4f6fb;
    --bg-rgb: 244, 246, 251;
    --bg2: #ffffff;
    --header-bg: rgba(244, 246, 251, .85);
    --panel: rgba(255, 255, 255, .96);
    --panel2: rgba(248, 250, 253, .92);
    --line: rgba(30, 58, 95, .14);
    --line-hot: rgba(37, 99, 235, .28);
    --hud: #2563eb;
    --hud-dim: #1d4ed8;
    --hud-hover: #3b82f6;
    --hud-glow: rgba(37, 99, 235, .45);
    --hud-soft: rgba(37, 99, 235, .10);
    --hud-contrast: #ffffff;
    --t: #dc2626;
    --on: #16a34a;
    --ct: #2563eb;
    --ink: #0f1b2d;
    --ink2: #475569;
    --ink3: #7c8aa0;
}

[data-theme="black-red"] {
    --bg: #0a0808;
    --bg-rgb: 10, 8, 8;
    --bg2: #140f0f;
    --header-bg: rgba(10, 8, 8, .80);
    --panel: rgba(24, 16, 16, .86);
    --panel2: rgba(34, 22, 22, .92);
    --line: rgba(150, 110, 110, .16);
    --line-hot: rgba(226, 59, 59, .32);
    --hud: #e23b3b;
    --hud-dim: #a51f1f;
    --hud-hover: #ff5a5a;
    --hud-glow: rgba(226, 59, 59, .55);
    --hud-soft: rgba(226, 59, 59, .12);
    --hud-contrast: #1a0606;
    --t: #ff4d4d;
    --on: #4ade80;
    --ct: #60a5fa;
    --ink: #ece3e3;
    --ink2: #9a8888;
    --ink3: #6e5a5a;
}

[data-theme="white-red"] {
    --bg: #faf6f6;
    --bg-rgb: 250, 246, 246;
    --bg2: #ffffff;
    --header-bg: rgba(250, 246, 246, .85);
    --panel: rgba(255, 255, 255, .96);
    --panel2: rgba(252, 248, 248, .92);
    --line: rgba(95, 30, 30, .14);
    --line-hot: rgba(220, 38, 38, .26);
    --hud: #dc2626;
    --hud-dim: #b91c1c;
    --hud-hover: #ef4444;
    --hud-glow: rgba(220, 38, 38, .40);
    --hud-soft: rgba(220, 38, 38, .09);
    --hud-contrast: #ffffff;
    --t: #dc2626;
    --on: #16a34a;
    --ct: #2563eb;
    --ink: #2a0f0f;
    --ink2: #6b4545;
    --ink3: #9c7a7a;
    --r: 12px;
    --r-sm: 8px;
}


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

html { background: var(--bg); }

body {
    min-height: 100vh;
    color: var(--ink);
    font: 14px/1.6 'Inter', 'Segoe UI', sans-serif;
    background:
        radial-gradient(1100px 600px at 80% -10%, var(--hud-soft), transparent 60%),
        radial-gradient(900px 700px at -10% 110%, rgba(var(--bg-rgb), .04), transparent 55%),
        repeating-linear-gradient(0deg, transparent 0 2px, rgba(0, 0, 0, .07) 2px 3px),
        var(--bg);
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
}

::selection { background: var(--hud); color: var(--hud-contrast); }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--hud-dim); border-radius: 20px; }
::-webkit-scrollbar-track { background: transparent; }

a { color: inherit; text-decoration: none; }
a:focus-visible,
button:focus-visible,
input:focus-visible {
    outline: 2px solid var(--hud);
    outline-offset: 2px;
    border-radius: 4px;
}

/* ---- Layout ---- */
.wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 18px 60px;
}

/* ---- Skip Link (Accessibility) ---- */
.skip-link {
    position: absolute;
    top: -100%;
    left: 16px;
    z-index: 9999;
    padding: 10px 18px;
    background: var(--hud);
    color: var(--hud-contrast);
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    font-weight: 700;
    border-radius: var(--r-sm);
    text-decoration: none;
    transition: top .2s ease;
}
.skip-link:focus {
    top: 10px;
    outline: 3px solid #fff;
    outline-offset: 2px;
}

/* ---- Page Hero ---- */
.page-hero {
    padding: 8px 0 22px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--line);
}
.page-hero-title {
    font-family: 'Rajdhani', sans-serif;
    font-size: 30px;
    font-weight: 700;
    letter-spacing: .5px;
    text-transform: uppercase;
    line-height: 1;
}
.page-hero-title span { color: var(--hud); }

/* ---- Top Bar ---- */
.topbar {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    margin-bottom: 22px;
    background: linear-gradient(180deg, var(--panel2), var(--panel));
    border: 1px solid var(--line);
    border-left: 3px solid var(--hud);
    border-radius: var(--r);
}
.topbar .mark {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 2px;
    color: var(--bg);
    background: var(--hud);
    padding: 4px 8px;
    border-radius: 4px;
}
.topbar h1 {
    font-family: 'Rajdhani', sans-serif;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: .5px;
    text-transform: uppercase;
}
.topbar h1 b { color: var(--hud); }
.topbar .spacer { flex: 1; }

/* ---- Eyebrow ---- */
.eyebrow {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--hud-dim);
    margin-bottom: 6px;
}
.eyebrow::before { content: '> '; color: var(--hud); }

/* ---- Buttons ---- */
.btn-ghost {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--ink2);
    background: transparent;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    padding: 9px 16px;
    cursor: pointer;
    transition: all .15s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.btn-ghost:hover { color: var(--hud); border-color: var(--line-hot); }

.btn-gold {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--hud-contrast);
    background: var(--hud);
    border: none;
    border-radius: var(--r-sm);
    padding: 10px 20px;
    cursor: pointer;
    transition: background .15s;
    white-space: nowrap;
}
.btn-gold:hover { background: #e8c64e; }

/* ---- Stats Row ---- */
.stats {
    display: flex;
    gap: 1px;
    background: var(--line);
    border-radius: var(--r-sm);
    overflow: hidden;
    margin-bottom: 18px;
}
.stats .st {
    flex: 1;
    background: var(--panel2);
    padding: 12px 16px;
    text-align: center;
}
.stats .st .n {
    font-family: 'JetBrains Mono', monospace;
    font-size: 20px;
    font-weight: 700;
    color: var(--ink);
}
.stats .st .n.hud { color: var(--hud); }
.stats .st .n.red { color: var(--t); }
.stats .st .l {
    font-size: 10px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--ink3);
    margin-top: 2px;
}

/* ---- Search Bar ---- */
.search-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 18px;
}
.search-bar input {
    flex: 1;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    color: var(--ink);
    background: var(--bg2);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    padding: 10px 14px;
    outline: none;
    transition: border-color .15s;
    min-width: 0;
}
.search-bar input:focus { border-color: var(--line-hot); }
.search-bar input::placeholder { color: var(--ink3); }

/* ---- Footer ---- */
.foot {
    text-align: center;
    margin-top: 40px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
    color: var(--ink3);
    font-size: 12px;
}
.foot a { color: var(--hud-dim); }
.foot a:hover { color: var(--hud); }

/* ---- Empty State ---- */
.empty {
    padding: 48px 20px;
    text-align: center;
    color: var(--ink3);
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
}
.empty a { color: var(--hud); }

/* ---- Skeleton Loader ---- */
.skel {
    background: linear-gradient(90deg, rgba(255,255,255,.03) 25%, rgba(255,255,255,.07) 37%, rgba(255,255,255,.03) 63%);
    background-size: 400% 100%;
    animation: skel 1.4s ease infinite;
    border-radius: 4px;
}
@keyframes skel {
    0% { background-position: 100% 50%; }
    100% { background-position: 0 50%; }
}

/* ---- Screen Reader Only ---- */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ---- Mobile Menu Overlay ---- */
#mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .5);
    z-index: 48;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
}
#mobile-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

/* ==========================================================================
   BANLIST-SPECIFIC STYLES
   ========================================================================== */

/* Data table */
.tablebox {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--r);
    border: 1px solid var(--line);
}
table.lb {
    width: 100%;
    border-collapse: collapse;
    background: var(--panel);
    min-width: 780px;
}
table.lb caption {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--ink3);
    text-align: left;
    padding: 10px 12px;
    caption-side: bottom;
}
table.lb thead th {
    position: sticky;
    top: 0;
    background: var(--bg2);
    color: var(--ink3);
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-align: left;
    padding: 12px 10px;
    border-bottom: 1px solid var(--line-hot);
    white-space: nowrap;
    z-index: 1;
}
table.lb tbody td {
    padding: 10px;
    font-size: 13px;
    color: var(--ink2);
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}
table.lb tbody tr { transition: background .1s; }
table.lb tbody tr:hover td { background: var(--hud-soft); }

/* Cell styles */
.nick {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    font-size: 15px;
    color: var(--ink);
}
.pill {
    display: inline-block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .5px;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 20px;
}
.pill.st-active { background: rgba(217,83,79,.15); color: var(--t); border: 1px solid rgba(217,83,79,.3); }
.pill.st-permanent { background: rgba(217,83,79,.25); color: #ff7b76; border: 1px solid rgba(217,83,79,.4); }
.pill.st-expired { background: rgba(255,255,255,.05); color: var(--ink3); border: 1px solid var(--line); }
.pill.st-unbanned { background: rgba(111,207,95,.12); color: var(--on); border: 1px solid rgba(111,207,95,.3); }
.pill.st-active-row { background: rgba(217,83,79,.08); }
.date { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--ink3); white-space: nowrap; }
.reason {
    font-size: 12px;
    color: var(--ink2);
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.admin-cell {
    font-size: 12px;
    color: var(--ink3);
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.length-val {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-weight: 500;
}

/* Expandable detail row */
.detail-row { display: none; background: var(--bg2); }
.detail-row.open { display: table-row; }
.detail-row td { padding: 0 !important; border-bottom: 2px solid var(--hud-dim) !important; }
.detail-inner {
    padding: 16px 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 32px;
}
.detail-inner .kv {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid var(--line);
}
.detail-inner .kv:last-child { border-bottom: 0; }
.detail-inner .kv .k { color: var(--ink3); font-size: 12px; }
.detail-inner .kv .v {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--ink);
    text-align: right;
    word-break: break-all;
}

/* Detail toggle button */
.dtoggle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: transparent;
    color: var(--ink3);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    transition: all .15s;
    font-family: 'JetBrains Mono', monospace;
}
.dtoggle:hover { border-color: var(--hud); color: var(--hud); }
.dtoggle.open { background: var(--hud); color: var(--hud-contrast); border-color: var(--hud); }

/* Pagination */
.pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 18px;
    flex-wrap: wrap;
}
.pager a, .pager strong {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    font-weight: 500;
    padding: 7px 12px;
    border-radius: var(--r-sm);
    border: 1px solid var(--line);
    color: var(--ink2);
}
.pager a:hover { border-color: var(--line-hot); color: var(--hud); }
.pager strong { background: var(--hud); color: var(--hud-contrast); border-color: var(--hud); }
.pager .disabled {
    opacity: .4;
    pointer-events: none;
}
.summary {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--ink3);
    text-align: center;
    margin-top: 10px;
}

/* Active ban row highlight */
tr.ban-active { background: rgba(217, 83, 79, .04); }

/* ==========================================================================
   TEAM-SPECIFIC STYLES
   ========================================================================== */

/* Hero section */
.hero {
    text-align: center;
    padding: 28px 20px 30px;
    margin-bottom: 32px;
    background: linear-gradient(180deg, var(--panel2), var(--panel));
    border: 1px solid var(--line);
    border-top: 3px solid var(--hud);
    border-radius: var(--r);
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: -80px;
    left: 50%;
    transform: translateX(-50%);
    width: 500px;
    height: 260px;
    background: radial-gradient(ellipse, var(--hud-soft), transparent 70%);
    pointer-events: none;
}
.hero h2 {
    font-family: 'Rajdhani', sans-serif;
    font-size: 36px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--ink);
    position: relative;
}
.hero h2 span { color: var(--hud); }
.hero .sub {
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 400;
    color: var(--ink2);
    margin-top: 10px;
    position: relative;
    letter-spacing: .01em;
}

/* Team grid */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

/* Member card */
.card {
    background: linear-gradient(180deg, var(--panel2), var(--panel));
    border: 1px solid var(--line);
    border-radius: var(--r);
    padding: 24px 20px;
    text-align: center;
    transition: border-color .2s, transform .2s, box-shadow .2s;
    position: relative;
    overflow: hidden;
}
.card:hover {
    border-color: var(--line-hot);
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, .3), 0 0 0 1px var(--line-hot);
}
.card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--hud), transparent);
    opacity: 0;
    transition: opacity .2s;
}
.card:hover::after { opacity: 1; }

/* Card skeleton loader */
.card-skel {
    background: linear-gradient(180deg, var(--panel2), var(--panel));
    border: 1px solid var(--line);
    border-radius: var(--r);
    padding: 24px 20px;
    text-align: center;
}
.card-skel .av-skel {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    margin: 0 auto 14px;
    background: linear-gradient(90deg, rgba(255,255,255,.04) 25%, rgba(255,255,255,.08) 37%, rgba(255,255,255,.04) 63%);
    background-size: 400% 100%;
    animation: skel 1.4s ease infinite;
}
.card-skel .line-skel {
    height: 14px;
    margin: 8px auto;
    border-radius: 4px;
    background: linear-gradient(90deg, rgba(255,255,255,.03) 25%, rgba(255,255,255,.07) 37%, rgba(255,255,255,.03) 63%);
    background-size: 400% 100%;
    animation: skel 1.4s ease infinite;
}

/* Avatar */
.av-wrap {
    width: 88px;
    height: 88px;
    margin: 0 auto 14px;
    position: relative;
    border-radius: 50%;
}
.av-ring {
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 2px solid var(--line);
    transition: border-color .2s;
}
.card:hover .av-ring { border-color: var(--hud); }
.av {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--bg2);
    display: block;
}
.card .nick {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    font-size: 20px;
    color: var(--ink);
    letter-spacing: .3px;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.card .steam-name {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--ink3);
    margin-bottom: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 17px;
}

/* Profile button */
.profile-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--hud);
    border: 1px solid var(--line-hot);
    background: transparent;
    border-radius: 20px;
    padding: 7px 16px;
    transition: all .15s;
    cursor: pointer;
}
.profile-btn:hover { background: var(--hud); color: var(--hud-contrast); border-color: var(--hud); }
.profile-btn svg { width: 14px; height: 14px; fill: currentColor; }

/* Steam ID row */
.sid {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: var(--ink3);
    margin-top: 10px;
    opacity: .6;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Count badge */
.count {
    display: inline-block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-weight: 700;
    color: var(--hud);
    background: var(--hud-soft);
    border: 1px solid var(--line-hot);
    border-radius: 20px;
    padding: 3px 12px;
    margin-top: 10px;
    position: relative;
}

/* Steam profile loading state */
.av-loading {
    opacity: .5;
    filter: grayscale(.3);
    transition: opacity .3s, filter .3s;
}
.av-loaded {
    opacity: 1;
    filter: none;
}

/* Error state */
.error-banner {
    background: rgba(217, 83, 79, .1);
    border: 1px solid rgba(217, 83, 79, .25);
    border-radius: var(--r-sm);
    padding: 12px 16px;
    text-align: center;
    color: var(--t);
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    margin-bottom: 18px;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 820px) {
    .topbar h1 { font-size: 18px; }
    .stats { flex-wrap: wrap; }
    .stats .st { flex: 1 1 30%; min-width: 100px; }
    .detail-inner { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .team-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
    .hero h2 { font-size: 28px; }
    .card { padding: 20px 16px; }
    .av, .av-wrap { width: 72px; height: 72px; }
    .card .nick { font-size: 17px; }
}

@media (max-width: 560px) {
    .wrap { padding: 12px 10px 40px; }
    .topbar { flex-wrap: wrap; gap: 8px; }
    .topbar .spacer { display: none; }
    .stats .st { flex: 1 1 45%; }
    .stats .st .n { font-size: 16px; }
    .search-bar { flex-direction: column; }
    table.lb { min-width: 600px; }
}

@media (max-width: 380px) {
    .team-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .001ms !important;
        transition-duration: .001ms !important;
    }
}

/* Print styles */
@media print {
    body { background: #fff !important; color: #000 !important; }
    header, .topbar, .search-bar, .pager, .summary, .foot, #mobile-overlay, .btn-ghost, .btn-gold { display: none !important; }
    .tablebox { border: 1px solid #ccc; }
    table.lb thead th { background: #eee; color: #000; }
    .card { border: 1px solid #ccc; box-shadow: none; }
    a { color: #000; text-decoration: underline; }
}

/* ==========================================================================
   LIGHT-THEME TEXT READABILITY (shared pages)
   Mirror of the rule in style.css so the header site-name / nav text on
   banlist.php & team.php stays readable on white-blue / white-red themes.
   ========================================================================== */
[data-theme="white-blue"] .text-white,
[data-theme="white-red"] .text-white {
    color: var(--ink) !important;
}
[data-theme="white-blue"] .hover\:text-white:hover,
[data-theme="white-red"] .hover\:text-white:hover {
    color: var(--ink) !important;
}
[data-theme="white-blue"] .keep-white,
[data-theme="white-red"] .keep-white {
    color: #fff !important;
}

/* ==========================================================================
   LEGAL / ARTICLE PAGES (Privacy Policy, Terms of Service)
   ========================================================================== */
.legal {
    max-width: 820px;
    margin: 0 auto;
    background: linear-gradient(180deg, var(--panel2), var(--panel));
    border: 1px solid var(--line);
    border-radius: var(--r);
    padding: 32px 30px;
}
.legal .intro {
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    line-height: 1.7;
    color: var(--ink2);
    margin-bottom: 8px;
}
.legal h3 {
    font-family: 'Rajdhani', sans-serif;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: .3px;
    color: var(--ink);
    margin: 28px 0 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--line);
}
.legal h3 .num {
    color: var(--hud);
    margin-right: 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 15px;
}
.legal p {
    font-family: 'Inter', sans-serif;
    font-size: 14.5px;
    line-height: 1.75;
    color: var(--ink2);
    margin: 0 0 12px;
}
.legal ul {
    list-style: none;
    margin: 0 0 14px;
    padding: 0;
}
.legal ul li {
    font-family: 'Inter', sans-serif;
    font-size: 14.5px;
    line-height: 1.7;
    color: var(--ink2);
    padding: 7px 0 7px 26px;
    position: relative;
    border-bottom: 1px solid var(--line);
}
.legal ul li:last-child { border-bottom: 0; }
.legal ul li::before {
    content: '\f105'; /* fa chevron-right */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: var(--hud);
    position: absolute;
    left: 6px;
    top: 8px;
    font-size: 12px;
}
.legal ul li strong,
.legal p strong { color: var(--ink); font-weight: 600; }
.legal a { color: var(--hud); }
.legal a:hover { color: var(--hud-dim); }
.legal .updated {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--ink3);
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-top: 26px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

/* ==========================================================================
   THREAD (standalone page) CONTENT
   Renders admin-authored rich text from the editor.
   ========================================================================== */
.thread-content {
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    line-height: 1.8;
    color: var(--ink2);
}
.thread-content h1,
.thread-content h2,
.thread-content h3 {
    font-family: 'Rajdhani', sans-serif;
    color: var(--ink);
    font-weight: 700;
    line-height: 1.25;
    margin: 26px 0 12px;
}
.thread-content h1 { font-size: 26px; }
.thread-content h2 { font-size: 22px; }
.thread-content h3 { font-size: 18px; }
.thread-content p { margin: 0 0 14px; }
.thread-content a { color: var(--hud); text-decoration: underline; }
.thread-content a:hover { color: var(--hud-dim); }
.thread-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--r-sm);
    border: 1px solid var(--line);
    margin: 14px 0;
    display: block;
}
.thread-content ul,
.thread-content ol { margin: 0 0 14px; padding-left: 22px; }
.thread-content ul { list-style: disc; }
.thread-content ol { list-style: decimal; }
.thread-content li { margin: 6px 0; }
.thread-content blockquote {
    border-left: 3px solid var(--hud);
    margin: 16px 0;
    padding: 6px 16px;
    background: var(--hud-soft);
    color: var(--ink);
    border-radius: 0 var(--r-sm) var(--r-sm) 0;
}
.thread-content strong { color: var(--ink); }
.thread-content code {
    font-family: 'JetBrains Mono', monospace;
    background: var(--bg2);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
}
.thread-content hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }

/* ==========================================================================
   CONTACT FORM + DONATE PAGE
   ========================================================================== */
.form-card {
    max-width: 720px;
    margin: 0 auto;
    background: linear-gradient(180deg, var(--panel2), var(--panel));
    border: 1px solid var(--line);
    border-radius: var(--r);
    padding: 28px 26px;
}
.form-row { margin-bottom: 16px; }
.form-row label {
    display: block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--ink3);
    margin-bottom: 6px;
}
.form-row label .opt { color: var(--ink3); opacity: .7; text-transform: none; letter-spacing: 0; }
.form-row input,
.form-row textarea,
.form-row select {
    width: 100%;
    background: var(--bg2);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    padding: 11px 13px;
    color: var(--ink);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    transition: border-color .15s;
}
.form-row input:focus,
.form-row textarea:focus,
.form-row select:focus {
    outline: none;
    border-color: var(--hud);
}
.form-row textarea { resize: vertical; min-height: 130px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } }
.reason-group { display: flex; gap: 12px; flex-wrap: wrap; }
.reason-opt {
    flex: 1; min-width: 220px;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    padding: 14px 16px;
    cursor: pointer;
    transition: all .15s;
    background: var(--bg2);
}
.reason-opt:hover { border-color: var(--line-hot); }
.reason-opt input { display: none; }
.reason-opt .ttl { font-family: 'Rajdhani', sans-serif; font-weight: 700; font-size: 16px; color: var(--ink); }
.reason-opt .desc { font-size: 12px; color: var(--ink2); margin-top: 2px; }
.reason-opt.sel { border-color: var(--hud); background: var(--hud-soft); }
.reason-opt.sel .ttl { color: var(--hud); }
.form-submit {
    width: 100%;
    background: var(--hud);
    color: #1a1408;
    border: 0;
    border-radius: var(--r-sm);
    padding: 13px;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    font-size: 16px;
    letter-spacing: .3px;
    cursor: pointer;
    transition: background .15s;
}
[data-theme="white-blue"] .form-submit,
[data-theme="white-red"] .form-submit { color: #fff; }
.form-submit:hover { background: var(--hud-dim); }
.form-note {
    text-align: center;
    font-size: 12.5px;
    color: var(--ink3);
    margin-top: 14px;
}
.form-note a { color: var(--hud); }
.alert {
    border-radius: var(--r-sm);
    padding: 12px 16px;
    margin-bottom: 18px;
    font-size: 14px;
    border: 1px solid;
}
.alert.ok  { background: rgba(111,207,95,.10); border-color: rgba(111,207,95,.4); color: var(--on); }
.alert.err { background: rgba(217,83,79,.10); border-color: rgba(217,83,79,.4); color: var(--t); }

/* Donate */
.donate-hero {
    max-width: 760px; margin: 0 auto 26px;
    text-align: center;
}
.donate-card {
    max-width: 620px; margin: 0 auto;
    background: linear-gradient(180deg, var(--panel2), var(--panel));
    border: 1px solid var(--line-hot);
    border-radius: var(--r);
    padding: 30px 28px;
    text-align: center;
    box-shadow: 0 0 30px rgba(211,175,55,.08);
}
.donate-amount {
    font-family: 'Rajdhani', sans-serif;
    font-size: 40px; font-weight: 700;
    color: var(--hud);
    line-height: 1;
    margin: 6px 0 2px;
}
.donate-amount small { font-size: 16px; color: var(--ink2); font-weight: 500; }
.paypal-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    background: #0070ba; color: #fff;
    border-radius: var(--r-sm);
    padding: 14px 28px;
    font-family: 'Rajdhani', sans-serif; font-weight: 700; font-size: 17px;
    text-decoration: none;
    transition: background .15s, transform .15s;
    margin-top: 8px;
}
.paypal-btn:hover { background: #005ea6; transform: translateY(-1px); }
.donate-prose {
    max-width: 680px; margin: 30px auto 0;
    color: var(--ink2); font-size: 14.5px; line-height: 1.75;
}
.donate-prose strong { color: var(--ink); }
.pledge {
    max-width: 680px; margin: 24px auto 0;
    display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
}
@media (max-width:560px){ .pledge { grid-template-columns: 1fr; } }
.pledge .item {
    border: 1px solid var(--line); border-radius: var(--r-sm);
    padding: 14px 16px; background: var(--bg2);
}
.pledge .item i { color: var(--hud); margin-right: 8px; }
.pledge .item .h { font-family:'Rajdhani',sans-serif; font-weight:700; color: var(--ink); font-size: 15px; }
.pledge .item .p { font-size: 13px; color: var(--ink2); margin-top: 3px; }
.donators {
    max-width: 680px; margin: 30px auto 0;
}
.donators h3 {
    font-family:'Rajdhani',sans-serif; font-size: 20px; color: var(--ink);
    text-align:center; margin-bottom: 16px;
    padding-bottom: 10px; border-bottom: 1px solid var(--line);
}
.donator-row {
    display:flex; align-items:center; justify-content:space-between;
    padding: 10px 14px; border:1px solid var(--line); border-radius: var(--r-sm);
    margin-bottom: 8px; background: var(--bg2);
}
.donator-row .rank { font-family:'JetBrains Mono',monospace; color: var(--hud); font-weight:700; width: 28px; }
.donator-row .who  { flex:1; color: var(--ink); font-weight:600; }
.donator-row .amt  { font-family:'JetBrains Mono',monospace; color: var(--ink2); }
.donator-row.top1 { border-color: var(--line-hot); background: var(--hud-soft); }

/* Donate QR */
.qr-block {
    margin: 20px auto 4px;
    display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.qr-img {
    width: 150px; height: 150px;
    background: #fff;
    padding: 10px;
    border-radius: var(--r-sm);
    border: 1px solid var(--line);
    display: block;
}
.qr-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11.5px;
    color: var(--ink-3);
    letter-spacing: .03em;
}
.qr-label i { color: var(--hud); margin-right: 5px; }
