/* ============================================================
   Murder Mystery Downloads — Download Portal
   Aesthetic: Inky dark editorial with gold accents
   Fonts: Cormorant Garamond + DM Mono
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;0,700;1,300;1,400;1,600&family=DM+Mono:wght@300;400;500&display=swap');

/* Fonts — loaded locally, no external request */
:root {
    --ff-head: 'Cormorant Garamond', 'Palatino Linotype', Palatino, 'Book Antiqua', Georgia, serif;
    --ff-mono: 'DM Mono', 'Courier New', Courier, monospace;
    --ink:        #16120e;   /* slightly lighter than pure black */
    --ink-soft:   #1e1a15;
    --paper:      #f5f0e6;   /* brighter main text */
    --paper-dim:  #d8cfc0;   /* brighter dimmed text */
    --gold:       #d4a847;   /* slightly brighter gold */
    --gold-bright:#ecc96a;
    --gold-dim:   rgba(212,168,71,0.2);
    --gold-line:  rgba(212,168,71,0.35);  /* more visible lines */
    --red:        #8c1c1c;
    --green:      #2d6a4f;
    --ash:        #252018;   /* lighter card background */
    --mist:       #46403a;   /* lighter panel background */
    --fog:        #9a9088;   /* much brighter muted text — was #6b6258 */
    --ff-head:    'Cormorant Garamond', Georgia, serif;
    --ff-mono:    'DM Mono', 'Courier New', monospace;
    --ease:       cubic-bezier(.4,0,.2,1);
}

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

a { color: inherit; text-decoration: none; }
html { font-size: 16px; scroll-behavior: smooth; }

body {
    background: var(--ink);
    color: var(--paper);
    font-family: var(--ff-mono);
    font-weight: 400;   /* was 300 — too thin to read easily */
    line-height: 1.7;   /* was 1.6 */
    min-height: 100vh;
}

/* ——— Grain overlay ——————————————————————————————————————— */
body::before {
    content: '';
    position: fixed; inset: 0;
    pointer-events: none; z-index: 9999;
    opacity: 0.035;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 200px 200px;
}

/* ——— Layout ——————————————————————————————————————————————— */
.page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.wrap { max-width: 760px; margin: 0 auto; padding: 0 1.5rem; width: 100%; }
.wrap-lg { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; width: 100%; }

/* ——— Header ——————————————————————————————————————————————— */
.site-header {
    border-bottom: 1px solid var(--gold-line);
    padding: 1.1rem 0;
    position: sticky; top: 0; z-index: 50;
    background: rgba(12,10,8,0.95);
    backdrop-filter: blur(10px);
}

.site-header .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-logo {
    display: flex; align-items: center; gap: 8px;
    text-decoration: none; color: var(--paper);
    font-family: var(--ff-head); font-size: 1rem; font-weight: 600;
    letter-spacing: 0.04em;
}
.logo-mark {
    width: 28px; height: 28px;
    border: 1px solid var(--gold-line);
    display: flex; align-items: center; justify-content: center;
    color: var(--gold); font-size: 0.7rem;
}

.header-tag {
    font-size: 0.62rem; letter-spacing: 0.2em; text-transform: uppercase;
    color: var(--fog); font-family: var(--ff-mono);
    border: 1px solid var(--gold-line); padding: 3px 10px;
}

/* ——— Hero ——————————————————————————————————————————————— */
.hero {
    padding: 5rem 0 4rem;
    text-align: center;
    border-bottom: 1px solid var(--gold-line);
    background:
        radial-gradient(ellipse 80% 50% at 50% -10%, rgba(140,28,28,0.12) 0%, transparent 70%),
        var(--ink);
    position: relative;
    overflow: hidden;
}

/* Crosshatch lines in background */
.hero::before {
    content: '';
    position: absolute; inset: 0;
    background-image:
        linear-gradient(var(--gold-dim) 1px, transparent 1px),
        linear-gradient(90deg, var(--gold-dim) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 70%);
    pointer-events: none;
}

.hero-eyebrow {
    font-size: 0.65rem; letter-spacing: 0.3em; text-transform: uppercase;
    color: var(--gold); margin-bottom: 1.75rem;
    display: flex; align-items: center; justify-content: center; gap: 12px;
}
.hero-eyebrow::before, .hero-eyebrow::after {
    content: '';
    display: block; width: 40px; height: 1px; background: var(--gold-line);
}

.hero h1 {
    font-family: var(--ff-head);
    font-size: clamp(2.4rem, 5.5vw, 3.8rem);
    font-weight: 300;
    font-style: italic;
    line-height: 1.1;
    color: var(--paper);
    max-width: 600px;
    margin: 0 auto 0.5rem;
}
.hero h1 strong {
    font-weight: 600; font-style: normal;
    color: var(--gold);
}

.hero-sub {
    font-size: 0.82rem; letter-spacing: 0.08em; color: var(--paper-dim);
    margin: 1rem auto 0; max-width: 380px; line-height: 1.8;
}

/* ——— Access code form ——————————————————————————————————— */
.access-panel {
    padding: 3.5rem 0;
    border-bottom: 1px solid var(--gold-line);
}

.panel-box {
    background: var(--ash);
    border: 1px solid var(--gold-line);
    padding: 2.5rem 2.5rem 2rem;
    position: relative;
    overflow: hidden;
}

/* corner ornaments */
.panel-box::before, .panel-box::after {
    content: '';
    position: absolute;
    width: 20px; height: 20px;
    border-color: var(--gold);
    border-style: solid;
}
.panel-box::before { top: -1px; left: -1px; border-width: 2px 0 0 2px; }
.panel-box::after  { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; }

.panel-label {
    font-size: 0.65rem; letter-spacing: 0.25em; text-transform: uppercase;
    color: var(--gold); margin-bottom: 0.5rem;
}

.panel-box h2 {
    font-family: var(--ff-head); font-size: 1.6rem; font-style: italic;
    font-weight: 300; color: var(--paper); margin-bottom: 1.75rem;
    line-height: 1.2;
}

.code-form { display: flex; flex-direction: column; gap: 1rem; }

.code-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0;
    border: 1px solid var(--gold-line);
    background: var(--ink);
    transition: border-color 0.2s var(--ease);
}
.code-row:focus-within { border-color: var(--gold); }

.code-input {
    background: transparent;
    border: none; outline: none;
    color: var(--paper);
    font-family: var(--ff-mono);
    font-size: 1rem; font-weight: 400;
    letter-spacing: 0.12em;
    padding: 0.85rem 1.1rem;
    width: 100%;
    text-transform: uppercase;
}
.code-input::placeholder { color: var(--fog); font-size: 0.85rem; letter-spacing: 0.08em; }

.code-submit {
    background: var(--gold);
    border: none; cursor: pointer;
    color: var(--ink);
    font-family: var(--ff-mono);
    font-size: 0.7rem; font-weight: 500;
    letter-spacing: 0.15em; text-transform: uppercase;
    padding: 0 1.5rem;
    transition: background 0.2s var(--ease);
    white-space: nowrap;
    flex-shrink: 0;
}
.code-submit:hover { background: var(--gold-bright); }
.code-submit:active { transform: scale(0.98); }

.email-group { display: flex; flex-direction: column; gap: 0.4rem; }
.field-label {
    font-size: 0.65rem; letter-spacing: 0.2em; text-transform: uppercase;
    color: var(--paper-dim);  /* was --fog, much brighter now */
}
.email-input {
    background: var(--ink);
    border: 1px solid var(--gold-line);
    color: var(--paper);
    font-family: var(--ff-mono); font-size: 0.92rem;
    padding: 0.7rem 1rem;
    outline: none; width: 100%;
    transition: border-color 0.2s var(--ease);
}
.email-input:focus { border-color: var(--gold); }
.email-input::placeholder { color: var(--fog); }

.help-text {
    font-size: 0.72rem; color: var(--paper-dim); line-height: 1.8;
    margin-top: 0.75rem; letter-spacing: 0.02em;
}

/* ——— Alert messages ——————————————————————————————————————— */
.alert {
    padding: 0.85rem 1.1rem;
    border: 1px solid;
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    margin-bottom: 1.25rem;
    display: flex; align-items: flex-start; gap: 0.6rem;
}
.alert-icon { flex-shrink: 0; font-size: 0.9rem; margin-top: 1px; }
.alert-error   { background: rgba(140,28,28,0.1); border-color: rgba(140,28,28,0.4); color: #e07070; }
.alert-success { background: rgba(45,106,79,0.1); border-color: rgba(45,106,79,0.4); color: #6fcf97; }
.alert-info    { background: rgba(200,164,90,0.08); border-color: var(--gold-line); color: var(--gold); }

/* ——— Download portal (after code unlocked) ————————————— */
.portal { padding: 3rem 0; flex: 1; }

.game-header { margin-bottom: 2.5rem; }
.game-header-inner { display: grid; grid-template-columns: auto 1fr; gap: 2rem; align-items: start; }

.game-cover {
    width: 160px; height: 120px;
    background: var(--ash);
    border: 1px solid var(--gold-line);
    display: flex; align-items: center; justify-content: center;
    font-size: 3rem; flex-shrink: 0;
    overflow: hidden;
}
.game-cover img { width: 100%; height: 100%; object-fit: cover; filter: sepia(20%) brightness(0.85); }

.game-info-tag {
    font-size: 0.62rem; letter-spacing: 0.2em; text-transform: uppercase;
    color: var(--gold); margin-bottom: 0.5rem;
    display: flex; align-items: center; gap: 8px;
}
.game-info-tag::after { content: ''; flex: 1; height: 1px; background: var(--gold-line); }

.game-title {
    font-family: var(--ff-head); font-size: 2rem; font-style: italic;
    font-weight: 300; color: var(--paper); margin-bottom: 0.75rem;
}

.game-meta {
    display: flex; gap: 1.25rem; flex-wrap: wrap;
    font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--paper-dim);  /* was --fog */
}
.game-meta span { display: flex; align-items: center; gap: 5px; }

.access-info {
    margin-top: 1rem;
    background: var(--ink);
    border: 1px solid var(--gold-line);
    padding: 0.75rem 1rem;
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 0.5rem;
}
.access-code-display {
    font-family: var(--ff-mono); font-size: 0.8rem; color: var(--gold);
    letter-spacing: 0.12em;
}
.access-meta-pills { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.pill {
    font-size: 0.6rem; letter-spacing: 0.12em; text-transform: uppercase;
    padding: 2px 8px; border: 1px solid;
}
.pill-gold   { color: var(--gold); border-color: var(--gold-line); }
.pill-green  { color: #6fcf97; border-color: rgba(111,207,151,0.3); }
.pill-red    { color: #e07070; border-color: rgba(224,112,112,0.3); }

/* ——— File list ——————————————————————————————————————————— */
.files-heading {
    font-size: 0.62rem; letter-spacing: 0.25em; text-transform: uppercase;
    color: var(--gold); margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--gold-line);
}

.file-item-audio audio {
    width: 100%;
    min-height: 54px;
    display: block;
    margin: 0.5rem 0;
}

.file-item-audio {
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    background: var(--mist);
    border-left: 2px solid var(--gold) !important;
}

.file-list { display: flex; flex-direction: column; gap: 0; }

.file-item {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 1rem;
    padding: 1.1rem 1.25rem;
    border: 1px solid var(--gold-line);
    border-top: none;
    background: var(--ash);
    transition: background 0.15s var(--ease);
    position: relative;
}
.file-item:first-child { border-top: 1px solid var(--gold-line); }
.file-item:hover { background: var(--mist); }

.file-item::before {
    content: '';
    position: absolute; left: 0; top: 0; bottom: 0;
    width: 2px;
    background: var(--gold);
    opacity: 0;
    transition: opacity 0.15s;
}
.file-item:hover::before { opacity: 1; }

.file-icon {
    width: 32px; height: 32px;
    border: 1px solid var(--gold-line);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.6rem; color: var(--gold); letter-spacing: 0.05em;
    font-family: var(--ff-mono);
    flex-shrink: 0;
}

.file-details { display: flex; align-items: center; gap: 1rem; }

.file-label {
    font-family: var(--ff-head); font-size: 1rem; font-style: italic;
    color: var(--paper); font-weight: 400;
}
.file-size {
    font-size: 0.65rem; color: var(--fog); letter-spacing: 0.08em;
}

.file-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.btn-view-file,
.btn-print-file {
    display: flex; align-items: center; gap: 5px;
    font-family: var(--ff-mono); font-size: 0.65rem;
    letter-spacing: 0.15em; text-transform: uppercase;
    padding: 0.55rem 0.9rem;
    text-decoration: none;
    transition: all 0.2s var(--ease);
    white-space: nowrap;
    border: 1px solid;
}

.btn-view-file {
    background: transparent;
    color: var(--gold);
    border-color: var(--gold-line);
}
.btn-view-file:hover {
    background: var(--gold);
    color: var(--ink);
    border-color: var(--gold);
}

.btn-print-file {
    background: transparent;
    color: var(--paper-dim);
    border-color: rgba(216,207,192,0.35);  /* brighter border */
}
.btn-print-file:hover {
    background: rgba(216,207,192,0.12);
    color: var(--paper);
    border-color: rgba(216,207,192,0.55);
}

.download-all-row {
    margin-top: 1.5rem;
    padding: 1.25rem;
    background: var(--ink);
    border: 1px solid var(--gold-line);
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 1rem;
}
.download-all-text { font-size: 0.78rem; color: var(--fog); }
.download-all-text strong { color: var(--paper); display: block; font-weight: 400; margin-bottom: 2px; }
.btn-download-all {
    background: var(--gold);
    color: var(--ink);
    border: none;
    font-family: var(--ff-mono);
    font-size: 0.65rem; letter-spacing: 0.15em; text-transform: uppercase;
    padding: 0.7rem 1.5rem;
    cursor: pointer;
    font-weight: 500;
    text-decoration: none; display: inline-flex; align-items: center; gap: 6px;
    transition: background 0.2s;
}
.btn-download-all:hover { background: var(--gold-bright); }

/* ——— Footer note ————————————————————————————————————————— */
.download-note {
    margin-top: 2rem;
    padding: 1.25rem;
    border: 1px solid var(--gold-line);
    background: rgba(212,168,71,0.06);
    font-size: 0.78rem; color: var(--paper-dim); line-height: 1.9;
}
.download-note strong { color: var(--paper); font-weight: 500; }

/* ——— Footer ——————————————————————————————————————————————— */
.site-footer {
    border-top: 1px solid var(--gold-line);
    padding: 1.5rem 0;
    margin-top: auto;
}
.footer-inner {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 0.75rem;
    font-size: 0.65rem; color: var(--fog); letter-spacing: 0.08em;
}
.footer-brand { color: var(--paper); }
.footer-links { display: flex; gap: 1.25rem; }
.footer-links a { color: var(--fog); text-decoration: none; transition: color 0.2s; }
.footer-links a:hover { color: var(--gold); }

/* ——— Admin styles ——————————————————————————————————————— */
.admin-layout { display: grid; grid-template-columns: 200px 1fr; min-height: 100vh; gap: 0; }
.admin-sidebar { background: var(--ash); border-right: 1px solid var(--gold-line); padding: 2rem 0; }
.admin-logo { padding: 0 1.25rem 2rem; font-family: var(--ff-head); font-size: 1rem; color: var(--gold); font-style: italic; }
.admin-nav a { display: block; padding: 0.55rem 1.25rem; color: var(--fog); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none; border-left: 2px solid transparent; transition: all 0.2s; }
.admin-nav a:hover, .admin-nav a.active { color: var(--gold); background: rgba(200,164,90,0.06); border-left-color: var(--gold); }
.admin-content { padding: 2rem 2.5rem; }
.admin-content h1 { font-family: var(--ff-head); font-size: 1.7rem; font-style: italic; font-weight: 300; margin-bottom: 0.25rem; }
.admin-content .sub { color: var(--fog); font-size: 0.72rem; margin-bottom: 2rem; }

.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px,1fr)); gap: 1rem; margin-bottom: 2.5rem; }
.stat-card { background: var(--ash); border: 1px solid var(--gold-line); padding: 1.25rem; }
.stat-card .val { font-family: var(--ff-head); font-size: 2rem; color: var(--gold); font-weight: 300; }
.stat-card .lbl { font-size: 0.62rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--fog); margin-top: 2px; }

.tbl { width: 100%; border-collapse: collapse; font-size: 0.78rem; }
.tbl th { padding: 0.6rem 0.75rem; text-align: left; font-size: 0.62rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--fog); border-bottom: 1px solid var(--gold-line); font-weight: 400; }
.tbl td { padding: 0.75rem; border-bottom: 1px solid rgba(200,164,90,0.08); vertical-align: middle; }
.tbl tr:hover td { background: rgba(255,255,255,0.02); }

.form-group { margin-bottom: 1.1rem; }
.form-group label { display: block; font-size: 0.62rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--fog); margin-bottom: 0.4rem; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%; background: var(--ink); border: 1px solid var(--gold-line);
    color: var(--paper); font-family: var(--ff-mono); font-size: 0.88rem;
    padding: 0.65rem 0.85rem; outline: none;
    transition: border-color 0.2s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--gold); }
.form-group input::placeholder { color: var(--fog); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.btn { display: inline-flex; align-items: center; gap: 6px; padding: 0.6rem 1.4rem; font-family: var(--ff-mono); font-size: 0.68rem; letter-spacing: 0.15em; text-transform: uppercase; cursor: pointer; transition: all 0.2s; text-decoration: none; border: none; }
.btn-primary { background: var(--gold); color: var(--ink); font-weight: 500; }
.btn-primary:hover { background: var(--gold-bright); }
.btn-secondary { background: transparent; border: 1px solid var(--gold-line); color: var(--gold); }
.btn-secondary:hover { background: var(--gold-dim); }
.btn-danger { background: var(--red); color: var(--paper); }
.btn-danger:hover { background: #a52020; }
.btn-sm { padding: 0.4rem 0.85rem; font-size: 0.62rem; }

.code-badge {
    font-family: var(--ff-mono); font-size: 0.78rem; color: var(--gold);
    letter-spacing: 0.1em; background: var(--gold-dim);
    padding: 2px 8px; border: 1px solid var(--gold-line);
}
.status-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; }
.status-active { background: #6fcf97; }
.status-claimed { background: var(--gold); }
.status-inactive { background: var(--fog); }

/* ——— Animations ————————————————————————————————————————— */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp 0.5s var(--ease) both; }
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }

/* ——— Login page ————————————————————————————————————————— */
.login-section {
    max-width: 480px;
    margin: 0 auto;
    padding: 2rem 0 4rem;
}

.login-form { display: flex; flex-direction: column; gap: 1.25rem; }
.email-group { display: flex; flex-direction: column; gap: 0.4rem; }

.field-label {
    font-size: 0.62rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--fog);
}

.email-input {
    background: var(--ash);
    border: 1px solid var(--gold-line);
    color: var(--paper);
    font-family: var(--ff-mono);
    font-size: 0.85rem;
    padding: 0.75rem 1rem;
    outline: none;
    width: 100%;
    transition: border-color 0.2s;
}

.email-input:focus { border-color: var(--gold); }
.code-input { letter-spacing: 0.15em; text-transform: uppercase; }

.btn-submit {
    background: var(--gold);
    color: var(--ink);
    border: none;
    font-family: var(--ff-mono);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    padding: 0.9rem 1.5rem;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
}

.btn-submit:hover { background: #b8943a; transform: translateY(-1px); }
.btn-submit:active { transform: translateY(0); }
.btn-arrow { font-size: 1rem; }

.help-text {
    font-size: 0.7rem;
    color: var(--fog);
    text-align: center;
    letter-spacing: 0.05em;
}

.help-link { color: var(--gold); }
.help-link:hover { color: var(--paper); }

/* ——— Custom audio player ———————————————————————————————— */
.audio-player {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--ink);
    border: 1px solid var(--gold-line);
    padding: 0.6rem 0.85rem;
    width: 100%;
}

.audio-play-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: transparent;
    border: 1px solid var(--gold-line);
    color: var(--gold);
    font-family: var(--ff-mono);
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.4rem 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
    white-space: nowrap;
}

.audio-play-btn:hover {
    background: rgba(200,164,90,0.1);
    border-color: var(--gold);
}

.audio-play-btn.playing {
    border-color: var(--gold);
    background: rgba(200,164,90,0.1);
}

.play-icon { font-size: 0.7rem; }

.audio-progress {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.audio-bar {
    flex: 1;
    height: 3px;
    background: rgba(200,164,90,0.2);
    cursor: pointer;
    position: relative;
    border-radius: 2px;
}

.audio-bar:hover { background: rgba(200,164,90,0.3); }

.audio-fill {
    height: 100%;
    width: 0%;
    background: var(--gold);
    transition: width 0.1s linear;
    border-radius: 2px;
    pointer-events: none;
}

.audio-time {
    font-family: var(--ff-mono);
    font-size: 0.62rem;
    color: var(--fog);
    white-space: nowrap;
    min-width: 32px;
    text-align: right;
}

.audio-volume {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
}

.audio-volume-icon {
    font-size: 0.7rem;
    color: var(--fog);
    cursor: pointer;
    user-select: none;
}

.audio-volume input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 60px;
    height: 3px;
    background: rgba(200,164,90,0.2);
    outline: none;
    border-radius: 2px;
    cursor: pointer;
}

.audio-volume input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--gold);
    cursor: pointer;
}

.audio-volume input[type="range"]::-moz-range-thumb {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--gold);
    cursor: pointer;
    border: none;
}

/* Align file actions to the right */
.file-actions {
    justify-content: flex-end;
}
.site-nav { display: flex; gap: 1.5rem; align-items: center; }
.nav-link { font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fog); text-decoration: none; transition: color 0.2s; }
.nav-link:hover { color: var(--gold); }

.games-section { margin-top: 2rem; }

.section-heading {
    font-size: 0.65rem; letter-spacing: 0.2em; text-transform: uppercase;
    color: var(--fog); margin-bottom: 1.25rem;
    padding-bottom: 0.5rem; border-bottom: 1px solid var(--gold-line);
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.25rem;
}

.game-card,
.game-card:link,
.game-card:visited,
.game-card:hover,
.game-card:active {
    background: var(--ash);
    border: 1px solid var(--gold-line);
    text-decoration: none;
    color: var(--paper);
    display: flex;
    flex-direction: column;
    transition: border-color 0.2s, transform 0.2s;
    cursor: pointer;
}

.game-card:hover {
    border-color: var(--gold);
    transform: translateY(-2px);
}

.game-card-cover {
    width: 100%; height: 160px;
    background: var(--ink);
    overflow: hidden;
    position: relative;
}

.game-card-cover img {
    width: 100%; height: 100%;
    object-fit: cover;
    filter: sepia(20%) brightness(0.85);
    transition: filter 0.2s;
}

.game-card:hover .game-card-cover img { filter: sepia(10%) brightness(0.95); }

.game-card-cover-placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    font-size: 2rem; color: var(--gold-dim);
}

.game-card-info { padding: 1rem; flex: 1; display: flex; flex-direction: column; gap: 0.35rem; }

.game-card-title { font-family: var(--ff-head); font-size: 1rem; font-style: italic; color: var(--paper); line-height: 1.3; }

.game-card-meta { font-size: 0.65rem; letter-spacing: 0.08em; color: var(--fog); }

.game-card-author { font-size: 0.65rem; color: var(--fog); }

.game-card-action {
    margin-top: auto; padding-top: 0.75rem;
    font-size: 0.62rem; letter-spacing: 0.15em;
    text-transform: uppercase; color: var(--gold);
}

/* Expired games list */
.expired-list { display: flex; flex-direction: column; gap: 0.75rem; }

.expired-item {
    display: flex; gap: 1rem; align-items: center;
    padding: 0.75rem; background: var(--ash);
    border: 1px solid rgba(200,164,90,0.1);
    opacity: 0.5;
}

.expired-cover {
    width: 60px; height: 45px;
    flex-shrink: 0; background: var(--ink);
    overflow: hidden;
}

.expired-cover img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(100%); }

.expired-info { flex: 1; }

/* ——— Responsive ————————————————————————————————————————— */
@media (max-width: 600px) {
    .game-header-inner { grid-template-columns: 1fr; }
    .game-cover { width: 100%; height: 160px; }
    .file-details { flex-direction: column; align-items: flex-start; gap: 0.25rem; }
    .admin-layout { grid-template-columns: 1fr; }
    .admin-sidebar { display: none; }
    .code-row { grid-template-columns: 1fr; }
    .code-submit { padding: 0.75rem; width: 100%; justify-content: center; }
    .form-row { grid-template-columns: 1fr; }
    .games-grid { grid-template-columns: 1fr 1fr; }
}
</style>