/* ============================================================
   wiki.css — Realm Keep Wiki shared styles (THEME.md aligned)
   Font: Roboto Slab / Georgia serif  |  Palette: §1 gold/cream
   ============================================================ */

:root {
    --gold:        #ffe6a3;
    --gold-bright: #ffd97a;
    --gold-dim:    rgba(255,220,150,0.30);
    --gold-faint:  rgba(255,220,150,0.18);
    --gold-muted:  rgba(255,220,150,0.55);
    --cream:       #e8d8b0;
    --cream-dim:   #d8d0c4;
    --bg:          #0a0814;
    --border:      rgba(255,200,120,0.30);
    --panel:       linear-gradient(180deg, rgba(18,12,30,0.92), rgba(8,4,16,0.96));
}

/* Full-viewport atmospheric background */
html {
    background:
        linear-gradient(rgba(8,4,16,0.88), rgba(8,4,16,0.88)),
        url('/static/img/title_bg/scene_pink_moon.png') center / cover fixed;
    min-height: 100%;
}

body {
    background: transparent;
    color: var(--cream);
    font-family: 'Roboto Slab', Georgia, serif;
    font-weight: 500;
    font-size: 15px;
    padding: 2vw 4vw;
    line-height: 1.75;
    max-width: 1100px;
    margin: auto;
}

a { color: var(--gold-bright); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--gold); }

h1 {
    color: var(--gold);
    font-weight: 900;
    font-size: 2.2em;
    letter-spacing: 1px;
    border-bottom: 2px solid var(--gold-dim);
    padding-bottom: 10px;
    margin-bottom: 30px;
}

h2 {
    color: var(--gold);
    font-weight: 700;
    font-size: 1.25em;
    letter-spacing: 1px;
    border-left: 4px solid var(--gold-dim);
    padding-left: 14px;
    margin-top: 44px;
    margin-bottom: 16px;
}

h3 {
    color: var(--cream-dim);
    font-weight: 600;
    font-size: 1em;
    margin-top: 24px;
    margin-bottom: 8px;
}

/* ── Navigation ─────────────────────────────────────────── */
.nav {
    background: rgba(8,4,16,0.80);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 20px;
    margin-bottom: 38px;
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    align-items: center;
    backdrop-filter: blur(6px);
}
.nav a {
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--cream-dim);
}
.nav a:hover { color: var(--gold); }
.nav .back { margin-left: auto; color: var(--gold-muted); font-size: 12px; }
.nav .back:hover { color: var(--gold-bright); }

/* ── Panels / cards ─────────────────────────────────────── */
.panel-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 10px;
    backdrop-filter: blur(3px);
    padding: 24px;
    margin-bottom: 12px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.45);
}

/* Hero cards */
.hero-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 10px;
    backdrop-filter: blur(3px);
    padding: 26px;
    margin-bottom: 24px;
    box-shadow: 0 6px 28px rgba(0,0,0,0.50);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}
@media (max-width: 700px) { .hero-card { grid-template-columns: 1fr; } }

.hero-left { display: flex; flex-direction: column; gap: 10px; }
.hero-header { display: flex; align-items: center; gap: 14px; margin-bottom: 4px; }
.hero-portrait {
    width: 80px; height: 80px;
    image-rendering: pixelated;
    border-radius: 6px;
    border: 2px solid var(--gold-faint);
    flex-shrink: 0;
}
.hero-name { color: var(--gold); font-weight: 700; font-size: 1.3em; margin: 0 0 4px; letter-spacing: 0.5px; }
.role-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 3px;
    font-size: 0.68em;
    letter-spacing: 2px;
    font-weight: 700;
    text-transform: uppercase;
}
.tip {
    background: rgba(8,4,16,0.55);
    border: 1px solid rgba(80,160,80,0.18);
    border-left: 3px solid #44aa44;
    padding: 10px 14px;
    border-radius: 4px;
    font-size: 0.82em;
    color: #88cc88;
    margin-top: 6px;
    line-height: 1.6;
}

/* ── Ability rows ────────────────────────────────────────── */
.abilities { display: flex; flex-direction: column; gap: 8px; }
.ability {
    padding: 10px 14px;
    background: rgba(8,4,16,0.60);
    border-radius: 5px;
    border-left: 3px solid #a08868;
}
.ability.r-ability { border-left-color: var(--gold-bright); }
.ability .key {
    display: inline-block;
    background: #1a1408;
    border: 1px solid #a08868;
    color: #e0c890;
    padding: 1px 7px;
    border-radius: 3px;
    font-size: 0.73em;
    font-weight: 700;
    margin-right: 6px;
    font-family: 'Roboto Slab', Georgia, serif;
}
.ability.r-ability .key {
    background: #2a1a04;
    border-color: var(--gold-bright);
    color: var(--gold);
}
.ability .cd  { color: var(--gold-muted); font-size: 0.73em; margin-left: 4px; opacity: 0.7; }
.ability .mp  { color: #7090b8; font-size: 0.73em; margin-left: 4px; }
.ability-name { color: var(--cream); font-weight: 700; font-size: 0.95em; }
.ability-desc { color: var(--cream-dim); font-size: 0.83em; margin-top: 3px; line-height: 1.55; }

/* ── Stats ───────────────────────────────────────────────── */
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat-row  { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; margin: 14px 0; }
.stat {
    background: rgba(8,4,16,0.65);
    padding: 10px 8px;
    border-radius: 5px;
    border: 1px solid var(--gold-faint);
    text-align: center;
}
.stat-label {
    font-size: 0.58em;
    text-transform: uppercase;
    color: var(--gold-muted);
    display: block;
    margin-bottom: 3px;
    font-weight: 700;
    letter-spacing: 2px;
}
.stat-val { font-size: 1em; font-weight: 700; color: var(--cream); }

/* Unit cards */
.unit-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 10px;
    backdrop-filter: blur(3px);
    padding: 22px;
    margin-bottom: 18px;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 20px;
    align-items: start;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}
.unit-sprite { image-rendering: pixelated; flex-shrink: 0; border-radius: 6px; border: 1px solid var(--gold-faint); background: rgba(8,4,16,0.5); }

/* Structure cards */
.structure-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 10px;
    backdrop-filter: blur(3px);
    padding: 26px;
    margin-bottom: 22px;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 24px;
    align-items: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}
.structure-img { image-rendering: pixelated; display: block; }

/* ── Tables ──────────────────────────────────────────────── */
table { width: 100%; border-collapse: collapse; margin: 14px 0; }
th, td { padding: 9px 12px; border: 1px solid rgba(255,200,120,0.12); text-align: left; font-size: 0.88em; }
th {
    background: rgba(8,4,16,0.75);
    color: var(--gold);
    font-weight: 700;
    font-size: 0.72em;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}
tr:nth-child(even) { background: rgba(255,220,150,0.03); }

/* ── Callout blocks ──────────────────────────────────────── */
.note {
    background: rgba(8,4,16,0.55);
    border-left: 3px solid #44aa44;
    padding: 10px 14px;
    border-radius: 4px;
    font-size: 0.85em;
    color: #88cc88;
    margin: 12px 0;
    line-height: 1.6;
}
.warn {
    background: rgba(8,4,16,0.55);
    border-left: 3px solid #aa4444;
    padding: 10px 14px;
    border-radius: 4px;
    font-size: 0.85em;
    color: #cc8888;
    margin: 12px 0;
    line-height: 1.6;
}

/* ── Footer ──────────────────────────────────────────────── */
footer {
    margin-top: 80px;
    padding: 24px;
    border-top: 1px solid var(--gold-dim);
    opacity: 0.35;
    text-align: center;
    font-size: 0.75em;
    letter-spacing: 4px;
    text-transform: uppercase;
}
