/* ═══════════════════════════════════════════════════════
   theme-retro.css  —  GBA Pokémon-inspired dialog style
   ═══════════════════════════════════════════════════════

   CUSTOM FONT: drop your Pokémon font @font-face here.
   The font-family name used throughout is 'PokemonFont'.
   Replace the placeholder block below with your hosted URL.
   ─────────────────────────────────────────────────────── */

@font-face {
    font-family: 'PokemonFont';
    src: url('../fonts/PokemonFont.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: block;
}

:root {
    --retro-bg:       #181830;
    --retro-border:   #d8d8e8;
    --retro-prog:     #f8d030;   /* Gold  — key item */
    --retro-useful:   #78c850;   /* Grass — useful   */
    --retro-trap:     #f05030;   /* Fire  — trap     */
    --retro-normal:   #98b8f0;   /* Water — normal   */
    --retro-text:     #e8e8f8;
    --retro-muted:    #8890b8;
    --retro-shadow:   2px 2px 0 #000;
}

.theme-retro {
    font-family: 'PokemonFont', 'Press Start 2P', monospace;
    image-rendering: pixelated;
}

/* ── header ─────────────────────────────────────────── */
.theme-retro #header {
    background: var(--retro-bg);
    border: 3px solid var(--retro-border);
    box-shadow: 4px 4px 0 #000, 0 0 0 1px #000;
    border-radius: 6px;
    padding: 8px 12px;
}

.theme-retro #header .title {
    font-family: 'PokemonFont', 'Press Start 2P', monospace;
    font-size: 9px;
    color: var(--retro-text);
    letter-spacing: 0.08em;
    text-shadow: var(--retro-shadow);
}

.theme-retro #header .game-label {
    font-size: 7px;
    color: var(--retro-muted);
    text-shadow: var(--retro-shadow);
}

/* ── feed ────────────────────────────────────────────── */
.theme-retro #feed { gap: 6px; }

/* ── dialog box cards ────────────────────────────────── */
.theme-retro .entry {
    background: var(--retro-bg);
    border: 3px solid var(--retro-border);
    box-shadow: 4px 4px 0 #000, 0 0 0 1px #000;
    border-radius: 6px;
    padding: 10px 12px 8px;
    position: relative;
    overflow: hidden;
    animation: retroIn 0.18s steps(3, end) both;
}

/* type colour stripe at top — 3px pixel-thick */
.theme-retro .entry::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
}
.theme-retro .entry.prog::before   { background: var(--retro-prog); }
.theme-retro .entry.useful::before { background: var(--retro-useful); }
.theme-retro .entry.trap::before   { background: var(--retro-trap); }
.theme-retro .entry.normal::before { background: var(--retro-normal); }

/* scanline texture */
.theme-retro .entry::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent 0px, transparent 3px,
        rgba(0, 0, 0, 0.07) 3px, rgba(0, 0, 0, 0.07) 4px
    );
    pointer-events: none;
    border-radius: 4px;
}

/* ── item name ───────────────────────────────────────── */
.theme-retro .r-name {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 9px;
    line-height: 1.7;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: var(--retro-shadow);
}

.theme-retro .entry.prog   .r-name { color: var(--retro-prog); }
.theme-retro .entry.useful .r-name { color: var(--retro-useful); }
.theme-retro .entry.trap   .r-name { color: var(--retro-trap); }
.theme-retro .entry.normal .r-name { color: var(--retro-normal); }

/* ── badge (Pokémon-flavoured labels) ────────────────── */
.theme-retro .r-badge {
    font-size: 6px;
    padding: 1px 4px;
    border: 2px solid currentColor;
    border-radius: 2px;
    flex-shrink: 0;
    text-shadow: none;
    line-height: 1.4;
}

.theme-retro .entry.prog   .r-badge { color: var(--retro-prog); }
.theme-retro .entry.useful .r-badge { color: var(--retro-useful); }
.theme-retro .entry.trap   .r-badge { color: var(--retro-trap); }

/* ── meta row ────────────────────────────────────────── */
.theme-retro .r-meta {
    font-size: 7px;
    margin-top: 4px;
    color: var(--retro-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: var(--retro-shadow);
    line-height: 1.8;
}

.theme-retro .slot-name {
    text-shadow: var(--retro-shadow);
}

.theme-retro .r-arrow {
    color: rgba(136, 144, 184, 0.5);
    margin: 0 3px;
}

/* ── status message ──────────────────────────────────── */
.theme-retro #status-msg {
    font-family: 'PokemonFont', 'Press Start 2P', monospace;
    font-size: 7px;
    background: var(--retro-bg);
    border: 3px solid var(--retro-border);
    box-shadow: 3px 3px 0 #000;
    border-radius: 4px;
    color: var(--retro-muted);
    text-shadow: var(--retro-shadow);
}

/* ── animations ──────────────────────────────────────── */
@keyframes retroIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: none; }
}

.theme-retro .entry.removing {
    animation: retroOut 0.18s steps(3, end) forwards;
}

@keyframes retroOut {
    to {
        opacity: 0;
        max-height: 0;
        padding: 0 12px;
        margin: 0;
        border-width: 0;
    }
}
