/* Everholm Wiki shared theme — matches the in-game UI */
@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@500;600;700;800&family=Signika:wght@400;500;600&display=swap');

:root {
    --night: #201623;
    --night-soft: #2b1e2e;
    --wood-dark: #5b3427;
    --wood: #a05c3f;
    --wood-light: #b8764f;
    --slot: #d99e6e;
    --slot-light: #e5b183;
    --slot-dark: #8a4f38;
    --cream: #f6e7c8;
    --cream-deep: #ecd9b0;
    --cream-bright: #fdf4de;
    --ink: #5b3427;
    --ink-soft: #7a5138;
    --ink-faint: #a3805f;
    --gold: #f0d9a4;
    --gold-deep: #c9a353;
    --red: #d8484f;
    --red-dark: #8e2734;
    --green: #6f8a58;
    --green-deep: #4c6340;
    --font-display: 'Baloo 2', 'Signika', sans-serif;
    --font-body: 'Signika', 'Segoe UI', sans-serif;
}

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

body {
    font-family: var(--font-body);
    background-color: var(--night);
    background-image:
        radial-gradient(ellipse at 50% 0%, rgba(184,118,79,0.10), transparent 55%),
        radial-gradient(ellipse at 85% 100%, rgba(90,52,80,0.35), transparent 60%),
        radial-gradient(ellipse at 10% 90%, rgba(90,52,80,0.3), transparent 55%);
    color: var(--cream);
    line-height: 1.5;
    min-height: 100vh;
}

/* ---------- Header bar (wooden) ---------- */
.header {
    background: var(--wood);
    border-bottom: 4px solid var(--wood-dark);
    box-shadow:
        inset 0 3px 0 var(--wood-light),
        inset 0 -3px 0 rgba(0,0,0,0.15),
        0 4px 12px rgba(0,0,0,0.4);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    position: sticky;
    top: 0;
    z-index: 100;
}
.header h1 {
    font-family: var(--font-display);
    font-size: 21px;
    font-weight: 800;
    color: var(--cream);
    text-shadow: 0 2px 0 rgba(0,0,0,0.25);
    white-space: nowrap;
    line-height: 1.2;
}
.header-info { font-size: 13px; color: var(--gold); font-weight: 500; }
.header-actions { display: flex; gap: 8px; margin-left: auto; flex-wrap: wrap; }

.hub-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 14px 5px;
    border-radius: 8px;
    border: 2px solid var(--wood-dark);
    background: var(--gold);
    color: var(--ink);
    text-decoration: none;
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 700;
    box-shadow: inset 0 -2px 0 var(--gold-deep);
    transition: transform 0.12s;
    white-space: nowrap;
}
.hub-link:hover { transform: translateY(-1px); filter: brightness(1.06); }

/* ---------- Buttons ---------- */
.btn {
    padding: 5px 14px 6px;
    border-radius: 8px;
    border: 2px solid var(--wood-dark);
    background: var(--gold);
    color: var(--ink);
    cursor: pointer;
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 700;
    box-shadow: inset 0 -2px 0 var(--gold-deep);
    transition: transform 0.12s;
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.06); }
.btn:active { transform: translateY(1px); box-shadow: inset 0 2px 0 var(--gold-deep); }
.btn-primary {
    background: var(--red);
    color: var(--cream);
    box-shadow: inset 0 -2px 0 var(--red-dark);
}
.btn-primary:active { box-shadow: inset 0 2px 0 var(--red-dark); }

.container { max-width: 1200px; margin: 0 auto; padding: 24px; }

/* ---------- Drop zone (cream tooltip card) ---------- */
.drop-zone {
    background: var(--cream);
    color: var(--ink);
    border: 3px dashed var(--wood);
    border-radius: 14px;
    box-shadow: 0 6px 0 rgba(0,0,0,0.25), 0 14px 30px rgba(0,0,0,0.35);
    padding: 52px 40px;
    text-align: center;
    margin: 48px auto;
    max-width: 620px;
    transition: transform 0.15s, border-color 0.15s;
    cursor: pointer;
}
.drop-zone:hover, .drop-zone.dragover {
    border-color: var(--red);
    transform: translateY(-2px);
}
.drop-zone .icon { margin-bottom: 14px; }
.drop-zone .icon svg { width: 56px; height: 56px; }
.drop-zone h2 {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 6px;
}
.drop-zone p { color: var(--ink-soft); font-size: 14.5px; }
.drop-zone .hint { margin-top: 12px; font-size: 12.5px; color: var(--ink-faint); }

/* ---------- Search & filters ---------- */
.filter-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    align-items: center;
}
.search-input {
    padding: 8px 16px;
    border-radius: 9px;
    border: 3px solid var(--wood-dark);
    background: var(--cream);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 14px;
    flex: 1;
    min-width: 200px;
    box-shadow: inset 0 2px 0 rgba(0,0,0,0.08);
}
.search-input:focus { outline: none; border-color: var(--gold-deep); }
.search-input::placeholder { color: var(--ink-faint); }

.filter-btn {
    padding: 5px 13px 6px;
    border-radius: 8px;
    border: 2px solid var(--wood-dark);
    background: var(--slot);
    color: var(--ink);
    cursor: pointer;
    font-family: var(--font-display);
    font-size: 13.5px;
    font-weight: 700;
    box-shadow: inset 0 -2px 0 rgba(0,0,0,0.15);
    transition: transform 0.12s, filter 0.12s;
}
.filter-btn:hover { transform: translateY(-1px); filter: brightness(1.06); }
.filter-btn.active {
    background: var(--gold);
    box-shadow: inset 0 -2px 0 var(--gold-deep), 0 0 0 2px var(--gold-deep);
}

/* ---------- Cream content cards ---------- */
.wiki-card {
    background: var(--cream);
    color: var(--ink);
    border: 3px solid var(--wood-dark);
    border-radius: 12px;
    box-shadow:
        inset 0 3px 0 var(--cream-bright),
        inset 0 -4px 0 var(--cream-deep),
        0 4px 0 rgba(0,0,0,0.25);
    margin-bottom: 18px;
    overflow: hidden;
}

/* ---------- Sprite boxes (item-slot style) ---------- */
.sprite-slot {
    background: var(--slot-dark);
    border: 2px solid var(--wood-dark);
    border-radius: 8px;
    box-shadow: inset 0 2px 0 rgba(0,0,0,0.25);
    object-fit: contain;
    image-rendering: pixelated;
}

.empty-state {
    text-align: center;
    padding: 24px;
    color: var(--ink-faint);
    font-size: 14px;
}

/* ---------- Dev mode ---------- */
/* .dev-only elements are hidden for players; wiki-dev.js adds
   html.dev-mode when enabled via ?dev=1 */
.dev-only { display: none !important; }
html.dev-mode .dev-only { display: inline-block !important; }

@media (max-width: 768px) {
    .header { padding: 10px 14px; }
    .container { padding: 14px; }
}
