/*
 * Bierlympiade – consolidated stylesheet
 * Bereinigt aus der bisherigen style.css; aktuelle Cascade bleibt erhalten.
 */

/* ===== THEME ===== */

:root, html[data-theme="light"] {
    color-scheme: light;
    --background: #f3eadb;
    --surface: #fffaf0;
    --surface-raised: #ffffff;
    --text: #211b15;
    --text-muted: #74685c;
    --primary: #c98216;
    --primary-hover: #a9670e;
    --primary-text: #fffaf0;
    --accent: #c64f35;
    --accent-soft: #efd2c5;
    --gold: #dda128;
    --gold-soft: #f3d995;
    --border: #dfd0bd;
    --shadow: 0 10px 30px rgba(70, 48, 24, 0.08);
    --shadow-hover: 0 18px 45px rgba(70, 48, 24, 0.16);
}

@media (prefers-color-scheme: dark) {
    :root {
        color-scheme: dark;
        --background: #11100e;
        --surface: #1b1814;
        --surface-raised: #242019;
        --text: #f5efe4;
        --text-muted: #b1a494;
        --primary: #e3a52c;
        --primary-hover: #f0b73d;
        --primary-text: #18130d;
        --accent: #d75b40;
        --accent-soft: #543027;
        --gold: #e3a52c;
        --gold-soft: #664d21;
        --border: #393128;
        --shadow: 0 14px 35px rgba(0, 0, 0, 0.28);
        --shadow-hover: 0 22px 55px rgba(0, 0, 0, 0.42);
    }
}

html[data-theme="dark"] {
    color-scheme: dark;
    --background: #11100e;
    --surface: #1b1814;
    --surface-raised: #242019;
    --text: #f5efe4;
    --text-muted: #b1a494;
    --primary: #e3a52c;
    --primary-hover: #f0b73d;
    --primary-text: #18130d;
    --accent: #d75b40;
    --accent-soft: #543027;
    --gold: #e3a52c;
    --gold-soft: #664d21;
    --border: #393128;
    --shadow: 0 14px 35px rgba(0, 0, 0, 0.28);
    --shadow-hover: 0 22px 55px rgba(0, 0, 0, 0.42);
}

/* ===== OTHER ===== */

* {
    box-sizing: border-box;
}

/* ===== BASE & LAYOUT ===== */

body {
    margin: 0;
    min-height: 100vh;
    background: var(--background);
    color: var(--text);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.topbar {
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.brand {
    color: var(--text);

    font-size: 1.2rem;
    font-weight: 700;

    text-decoration: none;
}

.theme-switcher {
    display: flex;
    gap: 6px;
}

.theme-switcher button {
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
}

.theme-switcher button:hover {
    background: var(--background);
}

.content {
    width: min(1100px, calc(100% - 32px));
    margin: 40px auto;
}

.welcome {
    margin-bottom: 48px;
}

.welcome h1 {
    margin: 4px 0 8px;
    font-size: clamp(2rem, 5vw, 3.5rem);
}

.eyebrow {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.muted {
    color: var(--text-muted);
}

.section-heading {
    margin-bottom: 18px;
}

.section-heading h2 {
    margin: 0;
}

.event-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.event-card {
    padding: 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
}

.event-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.event-edition {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
}

.event-card h3 {
    margin: 18px 0 8px;
    font-size: 2rem;
}

.event-date, .event-participants {
    margin: 6px 0;
    color: var(--text-muted);
}

.event-status {
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
}

.event-status-completed {
    background: var(--primary);
    color: var(--primary-text);
}

.event-status-running {
    background: #d98700;
    color: #ffffff;
}

.event-status-planning {
    border: 1px solid var(--border);
}

.event-card-link {
    display: block;
    color: inherit;
    text-decoration: none;
    transition: transform 0.15s ease, border-color 0.15s ease;
}

.event-card-link:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
}


/* ===== OVERALL STATISTICS CARD ===== */

.overall-statistics-section {
    margin-bottom: 42px;
}

.overall-statistics-card {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 230px;
    padding: 34px 40px;
    overflow: hidden;
    color: var(--text);
    text-decoration: none;
    background:
        radial-gradient(
            circle at 82% 35%,
            color-mix(in srgb, var(--gold) 24%, transparent),
            transparent 34%
        ),
        radial-gradient(
            circle at 95% 90%,
            color-mix(in srgb, var(--accent) 18%, transparent),
            transparent 34%
        ),
        linear-gradient(
            145deg,
            var(--surface-raised),
            var(--surface)
        );
    border:
        1px solid
        color-mix(in srgb, var(--gold) 38%, var(--border));
    border-radius: 22px;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.14);
    isolation: isolate;
    transition:
        transform 0.24s ease,
        box-shadow 0.24s ease,
        border-color 0.24s ease;
}

.overall-statistics-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 5px;
    background: linear-gradient(180deg, var(--gold), var(--accent));
}

.overall-statistics-card:hover {
    transform: translateY(-5px) scale(1.005);
    border-color:
        color-mix(in srgb, var(--gold) 70%, var(--border));
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
}

.overall-statistics-content {
    position: relative;
    z-index: 3;
    max-width: 650px;
}

.overall-statistics-card h2 {
    margin: 7px 0 10px;
    font-size: clamp(2rem, 4vw, 3.1rem);
    line-height: 1;
    letter-spacing: -0.045em;
}

.overall-statistics-description {
    max-width: 570px;
    margin: 0;
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.6;
}

.overall-statistics-action {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-top: 24px;
    color: var(--primary);
    font-size: 0.9rem;
    font-weight: 900;
    transition:
        gap 0.18s ease,
        color 0.18s ease;
}

.overall-statistics-card:hover .overall-statistics-action {
    gap: 14px;
    color: var(--gold);
}

.overall-statistics-icon {
    position: relative;
    z-index: 3;
    flex: 0 0 auto;
    margin-right: 35px;
    font-size: clamp(5rem, 10vw, 8rem);
    line-height: 1;
    transform: rotate(5deg);
    filter: drop-shadow(0 16px 18px rgba(0, 0, 0, 0.28));
    animation: overall-trophy-float 3.8s ease-in-out infinite;
}

.overall-statistics-glow {
    position: absolute;
    z-index: 1;
    right: -40px;
    top: 50%;
    width: 330px;
    height: 330px;
    transform: translateY(-50%);
    border-radius: 50%;
    background:
        radial-gradient(
            circle,
            color-mix(in srgb, var(--gold) 23%, transparent),
            transparent 68%
        );
    pointer-events: none;
    transition:
        transform 0.35s ease,
        opacity 0.35s ease;
}

.overall-statistics-card:hover .overall-statistics-glow {
    transform: translateY(-50%) scale(1.12);
}

@keyframes overall-trophy-float {
    0%,
    100% {
        transform: translateY(0) rotate(5deg);
    }

    50% {
        transform: translateY(-8px) rotate(1deg);
    }
}

@media (max-width: 700px) {
    .overall-statistics-card {
        min-height: 215px;
        padding: 26px 24px;
    }

    .overall-statistics-content {
        max-width: 72%;
    }

    .overall-statistics-description {
        font-size: 0.9rem;
    }

    .overall-statistics-icon {
        position: absolute;
        right: 15px;
        bottom: 25px;
        margin: 0;
        font-size: 4.5rem;
        opacity: 0.82;
    }
}

@media (prefers-reduced-motion: reduce) {
    .overall-statistics-icon {
        animation: none;
    }
}


/* ===== OVERALL STATISTICS PAGE ===== */

.overall-page-header {
    margin-bottom: 26px;
}

.overall-page-header h1 {
    margin: 5px 0 10px;
    font-size: clamp(2.4rem, 6vw, 4.3rem);
    line-height: 0.95;
}

.overall-page-header .muted {
    max-width: 720px;
    margin-bottom: 0;
}

.overall-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 28px;
    padding: 7px;
    overflow-x: auto;
    background: color-mix(in srgb, var(--surface) 82%, transparent);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
}

.overall-tabs a {
    flex: 0 0 auto;
    padding: 11px 15px;
    border-radius: 10px;
    color: var(--text-muted);
    font-size: 0.88rem;
    font-weight: 850;
    text-decoration: none;
    white-space: nowrap;
    transition:
        color 0.18s ease,
        background 0.18s ease,
        transform 0.18s ease,
        box-shadow 0.18s ease;
}

.overall-tabs a:hover {
    color: var(--text);
    background: color-mix(in srgb, var(--primary) 9%, transparent);
    transform: translateY(-1px);
}

.overall-tabs .overall-tab-active {
    color: var(--primary-text);
    background: linear-gradient(135deg, var(--primary), var(--gold));
    box-shadow: 0 6px 18px color-mix(in srgb, var(--primary) 27%, transparent);
}

.overall-tab-panel {
    min-height: 420px;
    padding: 30px;
    background:
        linear-gradient(
            145deg,
            color-mix(in srgb, var(--surface-raised) 96%, transparent),
            color-mix(in srgb, var(--surface) 94%, transparent)
        );
    border: 1px solid var(--border);
    border-radius: 22px;
    box-shadow: var(--shadow);
}

.overall-section-heading {
    margin-bottom: 28px;
}

.overall-section-heading h2 {
    margin: 5px 0 8px;
    font-size: clamp(1.8rem, 4vw, 2.6rem);
}

.overall-section-heading p:last-child {
    margin-bottom: 0;
}


/* ---------- Hall of Champions ---------- */

.champion-mug-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 28px;
    align-items: end;
}

.champion-entry {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
    padding: 18px 12px 12px;
    text-align: center;
}

.champion-entry h3 {
    margin: 8px 0 4px;
    font-size: 1.25rem;
}

.champion-entry p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.86rem;
    font-weight: 700;
}

.champion-year {
    margin-top: 17px;
    color: var(--gold);
    font-size: 1.25rem;
    font-weight: 950;
    letter-spacing: 0.04em;
}

.beer-mug {
    position: relative;
    width: 138px;
    height: 174px;
    border: 5px solid color-mix(in srgb, var(--text) 72%, transparent);
    border-top-width: 4px;
    border-radius: 10px 10px 21px 21px;
    background:
        linear-gradient(
            90deg,
            rgba(255,255,255,0.18),
            rgba(255,255,255,0.04) 35%,
            rgba(255,255,255,0.12) 74%,
            rgba(255,255,255,0.02)
        );
    box-shadow:
        inset 0 0 20px rgba(255,255,255,0.11),
        0 17px 30px rgba(0,0,0,0.18);
    isolation: isolate;
}

.beer-mug::after {
    content: "";
    position: absolute;
    z-index: -2;
    top: 42px;
    right: -48px;
    width: 52px;
    height: 82px;
    border: 9px solid color-mix(in srgb, var(--text) 68%, transparent);
    border-left: 0;
    border-radius: 0 34px 34px 0;
}

.beer-mug-liquid {
    position: absolute;
    z-index: -1;
    left: 3px;
    right: 3px;
    bottom: 3px;
    height: 70%;
    overflow: hidden;
    border-radius: 2px 2px 14px 14px;
    background:
        linear-gradient(
            180deg,
            #f6c73f 0%,
            #e7a61f 45%,
            #c98216 100%
        );
    box-shadow:
        inset 0 12px 24px rgba(255,255,255,0.15),
        inset 0 -15px 22px rgba(120,65,4,0.14);
}

.beer-mug-foam {
    position: absolute;
    z-index: 2;
    top: 39px;
    left: 5px;
    right: 5px;
    height: 31px;
    border-radius: 50% 50% 34% 34%;
    background: #fff2c9;
    box-shadow:
        0 4px 0 rgba(255,255,255,0.22),
        0 7px 12px rgba(123,75,11,0.08);
}

.beer-mug-foam span {
    position: absolute;
    border-radius: 50%;
    background: #fff8df;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.beer-mug-foam span:nth-child(1) {
    width: 29px;
    height: 29px;
    left: 5px;
    top: -12px;
}

.beer-mug-foam span:nth-child(2) {
    width: 38px;
    height: 38px;
    left: 31px;
    top: -18px;
}

.beer-mug-foam span:nth-child(3) {
    width: 31px;
    height: 31px;
    right: 19px;
    top: -13px;
}

.beer-mug-foam span:nth-child(4) {
    width: 25px;
    height: 25px;
    right: 2px;
    top: -8px;
}

.beer-mug-avatar {
    position: absolute;
    z-index: 3;
    left: 50%;
    top: 77px;
    width: 76px;
    height: 76px;
    transform: translateX(-50%);
    border: 4px solid rgba(255, 248, 225, 0.9);
    border-radius: 50%;
    object-fit: cover;
    background: var(--surface);
    box-shadow: 0 9px 18px rgba(89, 48, 4, 0.28);
    animation: champion-avatar-float 3.2s ease-in-out infinite;
}

.beer-mug-shine {
    position: absolute;
    z-index: 5;
    top: 18px;
    bottom: 17px;
    left: 15px;
    width: 12px;
    border-radius: 999px;
    background:
        linear-gradient(
            180deg,
            rgba(255,255,255,0.52),
            rgba(255,255,255,0.06)
        );
    opacity: 0.58;
    pointer-events: none;
}

@keyframes champion-avatar-float {
    0%,
    100% {
        transform: translateX(-50%) translateY(0) rotate(-1deg);
    }

    50% {
        transform: translateX(-50%) translateY(-6px) rotate(1deg);
    }
}


/* ---------- Minigolf Hall ---------- */

.golf-winner-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 20px;
}

.golf-winner-card {
    position: relative;
    overflow: hidden;
    padding: 24px 20px;
    text-align: center;
    background:
        radial-gradient(
            circle at 50% 0%,
            rgba(78, 165, 92, 0.18),
            transparent 44%
        ),
        var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow);
}

.golf-winner-visual {
    position: relative;
    width: 118px;
    height: 118px;
    margin: 0 auto 18px;
}

.golf-winner-visual::before {
    content: "";
    position: absolute;
    inset: 13px;
    border-radius: 50%;
    background:
        radial-gradient(
            circle at 50% 55%,
            #315a32 0 8%,
            #58a65e 9% 100%
        );
    box-shadow: 0 12px 24px rgba(36, 94, 45, 0.18);
}

.golf-winner-visual img {
    position: absolute;
    z-index: 2;
    left: 50%;
    bottom: 8px;
    width: 80px;
    height: 80px;
    transform: translateX(-50%);
    border: 4px solid #f7f1e5;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 8px 18px rgba(0,0,0,0.22);
}

.golf-winner-flag {
    position: absolute;
    z-index: 3;
    top: -5px;
    right: -3px;
    font-size: 2.7rem;
    filter: drop-shadow(0 6px 8px rgba(0,0,0,0.18));
}

.golf-winner-year {
    color: var(--gold);
    font-size: 1.1rem;
    font-weight: 950;
}

.golf-winner-card h3 {
    margin: 6px 0 3px;
    font-size: 1.3rem;
}

.golf-winner-card p {
    margin: 0;
}




/* ---------- Top 10 Best Games ---------- */

.best-games-podium {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    align-items: stretch;
    margin-bottom: 26px;
}

.best-game-podium-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 24px 22px;
    overflow: hidden;
    color: var(--text);
    text-decoration: none;
    background:
        radial-gradient(
            circle at 85% 10%,
            color-mix(in srgb, var(--gold) 15%, transparent),
            transparent 32%
        ),
        linear-gradient(145deg, var(--surface-raised), var(--surface));
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow);
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease;
}

.best-game-podium-card:hover {
    transform: translateY(-5px);
    border-color: color-mix(in srgb, var(--gold) 60%, var(--border));
    box-shadow: var(--shadow-hover);
}

.best-game-podium-1 {
    border-color: color-mix(in srgb, var(--gold) 70%, var(--border));
    box-shadow:
        0 18px 45px
        color-mix(in srgb, var(--gold) 16%, transparent);
}

.best-game-podium-card::after {
    content: "";
    position: absolute;
    right: -42px;
    bottom: -52px;
    width: 145px;
    height: 145px;
    border-radius: 50%;
    background:
        color-mix(in srgb, var(--primary) 8%, transparent);
    pointer-events: none;
}

.best-game-medal {
    margin-bottom: 12px;
    font-size: 2.2rem;
    line-height: 1;
}

.best-game-podium-rank {
    position: absolute;
    top: 18px;
    right: 19px;
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 900;
}

.best-game-year {
    color: var(--primary);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.11em;
}

.best-game-podium-card h3 {
    margin: 7px 0 4px;
    font-size: clamp(1.25rem, 2.8vw, 1.75rem);
    line-height: 1.1;
}

.best-game-creator {
    margin: 0 0 22px;
    color: var(--text-muted);
    font-size: 0.86rem;
    font-weight: 700;
}

.best-game-score {
    margin-top: auto;
    color: var(--gold);
    font-size: 2rem;
    font-weight: 950;
    letter-spacing: -0.04em;
}

.best-game-scorebar,
.best-game-row-bar {
    width: 100%;
    overflow: hidden;
    border: 0;
    border-radius: 999px;
    appearance: none;
    -webkit-appearance: none;
    background:
        color-mix(in srgb, var(--border) 65%, transparent);
}

.best-game-scorebar {
    height: 8px;
    margin-top: 10px;
}

.best-game-scorebar::-webkit-progress-bar,
.best-game-row-bar::-webkit-progress-bar {
    background:
        color-mix(in srgb, var(--border) 65%, transparent);
    border-radius: 999px;
}

.best-game-scorebar::-webkit-progress-value,
.best-game-row-bar::-webkit-progress-value {
    border-radius: 999px;
    background:
        linear-gradient(
            90deg,
            var(--primary),
            var(--gold)
        );
}

.best-game-scorebar::-moz-progress-bar,
.best-game-row-bar::-moz-progress-bar {
    border-radius: 999px;
    background:
        linear-gradient(
            90deg,
            var(--primary),
            var(--gold)
        );
}

.best-game-points {
    margin: 9px 0 0;
    color: var(--text-muted);
    font-size: 0.76rem;
    font-weight: 700;
}


/* Platz 4 bis 10 */

.best-games-list {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.best-game-row {
    display: grid;
    grid-template-columns:
        58px
        minmax(180px, 1fr)
        125px
        85px
        130px;
    align-items: center;
    gap: 14px;
    padding: 15px 18px;
    color: var(--text);
    text-decoration: none;
    border-bottom: 1px solid var(--border);
    transition:
        background 0.16s ease,
        transform 0.16s ease;
}

.best-game-row:last-child {
    border-bottom: 0;
}

.best-game-row:hover {
    background:
        color-mix(
            in srgb,
            var(--primary) 8%,
            var(--surface)
        );
}

.best-game-row-rank {
    color: var(--text-muted);
    font-size: 1.05rem;
    font-weight: 950;
}

.best-game-row-main {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.best-game-row-main strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.best-game-row-main span {
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 650;
}

.best-game-row-points {
    text-align: right;
    font-weight: 900;
}

.best-game-row-points span {
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 650;
}

.best-game-row-score {
    color: var(--gold);
    text-align: right;
    font-size: 1.05rem;
    font-weight: 950;
}

.best-game-row-bar {
    height: 7px;
}

.best-games-explanation {
    display: flex;
    gap: 8px;
    margin-top: 18px;
    padding: 13px 15px;
    color: var(--text-muted);
    background:
        color-mix(in srgb, var(--primary) 6%, var(--surface));
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 0.8rem;
    line-height: 1.45;
}

.best-games-explanation strong {
    flex: 0 0 auto;
    color: var(--text);
}


@media (max-width: 850px) {
    .best-games-podium {
        grid-template-columns: 1fr;
    }

    .best-game-podium-card {
        min-height: 0;
    }

    .best-game-row {
        grid-template-columns:
            44px
            minmax(150px, 1fr)
            75px;
    }

    .best-game-row-points,
    .best-game-row-bar {
        display: none;
    }
}


@media (max-width: 560px) {
    .best-game-row {
        gap: 8px;
        padding: 13px 12px;
    }

    .best-game-row-rank {
        font-size: 0.9rem;
    }

    .best-game-row-main span {
        font-size: 0.7rem;
    }

    .best-games-explanation {
        flex-direction: column;
    }
}




/* ---------- Eternal Table ---------- */

.eternal-table-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 20px;
    margin-bottom: 16px;
    padding: 12px 14px;
    color: var(--text-muted);
    background:
        color-mix(in srgb, var(--primary) 5%, var(--surface));
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 0.78rem;
    line-height: 1.45;
}

.eternal-table-legend strong {
    color: var(--text);
}

.eternal-table-wrapper {
    width: 100%;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-gutter: stable;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow);
}

.eternal-table {
    width: 100%;
    min-width: 1480px;
    border-collapse: collapse;
    font-variant-numeric: tabular-nums;
}

.eternal-table th,
.eternal-table td {
    padding: 14px 15px;
    text-align: center;
    white-space: nowrap;
    border-bottom: 1px solid var(--border);
}

.eternal-table thead {
    background:
        color-mix(
            in srgb,
            var(--primary) 10%,
            var(--surface)
        );
}

.eternal-table th {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 0;
}

.eternal-table tbody tr:last-child td {
    border-bottom: 0;
}

.eternal-table tbody tr {
    transition:
        background 0.15s ease,
        transform 0.15s ease;
}

.eternal-table tbody tr:hover {
    background:
        color-mix(
            in srgb,
            var(--primary) 7%,
            var(--surface)
        );
}

.eternal-sort-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    min-height: 49px;
    padding: 11px 12px;
    color: var(--text-muted);
    background: transparent;
    border: 0;
    cursor: pointer;
    font: inherit;
    font-size: 0.76rem;
    font-weight: 850;
    white-space: nowrap;
    transition:
        color 0.15s ease,
        background 0.15s ease;
}

.eternal-sort-button:hover {
    color: var(--text);
    background:
        color-mix(
            in srgb,
            var(--primary) 7%,
            transparent
        );
}

.eternal-sort-button.eternal-sort-active {
    color: var(--primary);
}

.sort-indicator {
    min-width: 12px;
    color: var(--gold);
    font-size: 0.78rem;
}

.eternal-player-cell {
    min-width: 210px;
    text-align: left !important;
}

.eternal-player-content {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.eternal-player-content img {
    width: 36px;
    height: 36px;
    flex: 0 0 auto;
    border: 2px solid
        color-mix(
            in srgb,
            var(--gold) 55%,
            var(--border)
        );
    border-radius: 50%;
    object-fit: cover;
    background: var(--surface-raised);
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.12);
}

.eternal-player-content strong {
    overflow: hidden;
    text-overflow: ellipsis;
}


/* Sticky Rang + Spieler */

.eternal-table th:first-child,
.eternal-table td:first-child {
    position: sticky;
    left: 0;
    width: 72px;
    min-width: 72px;
    max-width: 72px;
}

.eternal-table th:nth-child(2),
.eternal-table td:nth-child(2) {
    position: sticky;
    left: 72px;
    min-width: 210px;
}

.eternal-table td:first-child,
.eternal-table td:nth-child(2) {
    z-index: 3;
    background: var(--surface);
}

.eternal-table th:first-child,
.eternal-table th:nth-child(2) {
    z-index: 6;
    background:
        color-mix(
            in srgb,
            var(--primary) 10%,
            var(--surface)
        );
}

.eternal-table th:nth-child(2),
.eternal-table td:nth-child(2) {
    box-shadow:
        10px 0 14px -12px rgba(0, 0, 0, 0.45);
}

.eternal-rank-1 td:first-child,
.eternal-rank-1 td:nth-child(2) {
    background:
        color-mix(
            in srgb,
            var(--gold) 7%,
            var(--surface)
        );
}

.eternal-rank-2 td:first-child,
.eternal-rank-2 td:nth-child(2) {
    background:
        color-mix(
            in srgb,
            #c9cdd3 6%,
            var(--surface)
        );
}

.eternal-rank-3 td:first-child,
.eternal-rank-3 td:nth-child(2) {
    background:
        color-mix(
            in srgb,
            #bb7948 6%,
            var(--surface)
        );
}

.eternal-table tbody tr:hover td:first-child,
.eternal-table tbody tr:hover td:nth-child(2) {
    background:
        color-mix(
            in srgb,
            var(--primary) 7%,
            var(--surface)
        );
}


/* Offizieller Wert etwas prominenter */

.eternal-table th:nth-child(4) {
    background:
        color-mix(
            in srgb,
            var(--gold) 12%,
            var(--surface)
        );
}

.eternal-table th:nth-child(4) .eternal-sort-button {
    color: var(--text);
}

.eternal-table td:nth-child(4) {
    background:
        color-mix(
            in srgb,
            var(--gold) 4%,
            transparent
        );
}

.eternal-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    min-height: 30px;
    padding: 4px 8px;
    border-radius: 999px;
    color: var(--text-muted);
    font-weight: 950;
}

.eternal-main-score {
    color: var(--gold);
    font-size: 1.02rem;
    font-weight: 950;
}

.eternal-rank-1 .eternal-rank {
    color: #604000;
    background:
        linear-gradient(
            135deg,
            #ffe88a,
            #e7ae20
        );
    box-shadow:
        0 5px 13px rgba(202, 144, 13, 0.24);
}

.eternal-rank-2 .eternal-rank {
    color: #434343;
    background:
        linear-gradient(
            135deg,
            #f0f0f0,
            #bfc4ca
        );
}

.eternal-rank-3 .eternal-rank {
    color: #4e2d16;
    background:
        linear-gradient(
            135deg,
            #e3aa75,
            #b9743d
        );
}

.eternal-rank-1 {
    background:
        color-mix(
            in srgb,
            var(--gold) 7%,
            var(--surface)
        );
}

.eternal-rank-2 {
    background:
        color-mix(
            in srgb,
            #c9cdd3 6%,
            var(--surface)
        );
}

.eternal-rank-3 {
    background:
        color-mix(
            in srgb,
            #bb7948 6%,
            var(--surface)
        );
}

.eternal-table-note {
    margin: 13px 4px 0;
    color: var(--text-muted);
    font-size: 0.76rem;
    line-height: 1.5;
}


@media (max-width: 700px) {
    .eternal-table-legend {
        flex-direction: column;
        gap: 6px;
    }
}


@media (prefers-reduced-motion: reduce) {
    .eternal-table tbody tr {
        transition: none;
    }
}




/* ---------- Records & Curiosities ---------- */

.record-book-intro {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    min-height: 220px;
    margin-bottom: 32px;
    padding: 30px 34px;
    overflow: hidden;
    background:
        radial-gradient(
            circle at 80% 32%,
            color-mix(in srgb, var(--gold) 26%, transparent),
            transparent 36%
        ),
        radial-gradient(
            circle at 12% 100%,
            color-mix(in srgb, var(--accent) 13%, transparent),
            transparent 35%
        ),
        linear-gradient(
            145deg,
            var(--surface-raised),
            var(--surface)
        );
    border:
        1px solid
        color-mix(in srgb, var(--gold) 44%, var(--border));
    border-radius: 22px;
    box-shadow: var(--shadow);
    isolation: isolate;
}

.record-book-intro::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 6px;
    background:
        linear-gradient(
            180deg,
            var(--gold),
            var(--accent)
        );
}

.record-book-copy {
    position: relative;
    z-index: 3;
    max-width: 690px;
}

.record-book-copy h2 {
    margin: 6px 0 10px;
    font-size: clamp(2rem, 5vw, 3.35rem);
    line-height: 1;
    letter-spacing: -0.045em;
}

.record-book-copy > p:last-child {
    max-width: 600px;
    margin: 0;
    color: var(--text-muted);
    line-height: 1.65;
}

.record-book-trophy {
    position: relative;
    z-index: 3;
    flex: 0 0 auto;
    margin-right: 26px;
    font-size: clamp(5.2rem, 10vw, 8.2rem);
    line-height: 1;
    filter:
        drop-shadow(
            0 17px 18px rgba(0, 0, 0, 0.26)
        );
    animation:
        record-trophy-party
        3.5s
        ease-in-out
        infinite;
}

.record-confetti {
    position: absolute;
    z-index: 2;
    pointer-events: none;
    filter:
        drop-shadow(
            0 8px 10px rgba(0, 0, 0, 0.18)
        );
    animation:
        record-confetti-float
        4s
        ease-in-out
        infinite;
}

.record-confetti-1 {
    right: 17%;
    top: 18px;
    font-size: 2rem;
    transform: rotate(-18deg);
}

.record-confetti-2 {
    right: 8%;
    bottom: 20px;
    font-size: 1.9rem;
    animation-delay: -1.2s;
}

.record-confetti-3 {
    right: 31%;
    bottom: 18px;
    font-size: 1.8rem;
    animation-delay: -2.1s;
}

.record-section-heading {
    margin: 34px 0 18px;
}

.record-section-heading h3 {
    margin: 5px 0 0;
    font-size: clamp(1.45rem, 3vw, 2rem);
}

.record-section-heading-fun {
    margin-top: 42px;
}


/* Shared record cards */

.record-featured-grid,
.record-fun-grid {
    display: grid;
    gap: 18px;
}

.record-featured-grid {
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
}

.record-fun-grid {
    grid-template-columns:
        repeat(
            auto-fit,
            minmax(235px, 1fr)
        );
}

.record-card {
    --record-tone: var(--gold);

    position: relative;
    min-width: 0;
    overflow: hidden;
    background:
        radial-gradient(
            circle at 90% 10%,
            color-mix(
                in srgb,
                var(--record-tone) 22%,
                transparent
            ),
            transparent 38%
        ),
        linear-gradient(
            145deg,
            var(--surface-raised),
            var(--surface)
        );
    border:
        1px solid
        color-mix(
            in srgb,
            var(--record-tone) 38%,
            var(--border)
        );
    box-shadow: var(--shadow);
    isolation: isolate;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease;
}

.record-card:hover {
    transform:
        translateY(-5px)
        rotate(-0.15deg);
    border-color:
        color-mix(
            in srgb,
            var(--record-tone) 68%,
            var(--border)
        );
    box-shadow: var(--shadow-hover);
}

.record-card-featured {
    min-height: 350px;
    padding: 25px 26px 24px;
    border-radius: 20px;
}

.record-card-fun {
    min-height: 315px;
    padding: 22px 20px 20px;
    border-radius: 18px;
}

.record-watermark {
    position: absolute;
    z-index: -1;
    right: -17px;
    bottom: -27px;
    font-size: 8.2rem;
    line-height: 1;
    opacity: 0.07;
    transform: rotate(-10deg);
    filter: grayscale(0.15);
    transition:
        transform 0.25s ease,
        opacity 0.25s ease;
}

.record-card:hover .record-watermark {
    opacity: 0.12;
    transform:
        rotate(-3deg)
        scale(1.08);
}

.record-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    margin-bottom: 15px;
    border:
        1px solid
        color-mix(
            in srgb,
            var(--record-tone) 48%,
            var(--border)
        );
    border-radius: 16px;
    background:
        color-mix(
            in srgb,
            var(--record-tone) 13%,
            var(--surface-raised)
        );
    font-size: 2rem;
    line-height: 1;
    box-shadow:
        0 9px 20px
        color-mix(
            in srgb,
            var(--record-tone) 14%,
            transparent
        );
    animation:
        record-icon-bob
        3.2s
        ease-in-out
        infinite;
}

.record-card-fun .record-icon {
    width: 48px;
    height: 48px;
    font-size: 1.75rem;
}

.record-kicker {
    margin: 0 0 4px;
    color: var(--record-tone);
    font-size: 0.72rem;
    font-weight: 950;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.record-card h3 {
    margin: 0 0 18px;
    font-size: 1.55rem;
    line-height: 1.08;
}

.record-card-fun h3 {
    font-size: 1.3rem;
}

.record-avatar-stack {
    display: flex;
    align-items: center;
    min-height: 60px;
    margin: 4px 0 10px;
    padding-left: 5px;
}

.record-avatar-stack img,
.record-avatar-more {
    width: 58px;
    height: 58px;
    flex: 0 0 auto;
    margin-left: -8px;
    border:
        3px solid
        var(--surface-raised);
    border-radius: 50%;
    object-fit: cover;
    background: var(--surface-raised);
    box-shadow:
        0 8px 18px rgba(0, 0, 0, 0.18);
}

.record-avatar-stack img:first-child {
    margin-left: 0;
}

.record-avatar-stack-small img,
.record-avatar-stack-small .record-avatar-more {
    width: 48px;
    height: 48px;
}

.record-avatar-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    background:
        color-mix(
            in srgb,
            var(--record-tone) 18%,
            var(--surface-raised)
        );
    font-size: 0.77rem;
    font-weight: 950;
}

.record-names {
    min-height: 24px;
    color: var(--text);
    font-size: 0.92rem;
    line-height: 1.45;
}

.record-names span {
    color: var(--text-muted);
}

.record-value {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 14px;
    color: var(--record-tone);
    font-size: clamp(2.5rem, 5vw, 3.65rem);
    font-weight: 950;
    line-height: 0.95;
    letter-spacing: -0.055em;
    text-shadow:
        0 5px 16px
        color-mix(
            in srgb,
            var(--record-tone) 15%,
            transparent
        );
}

.record-value span {
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 850;
    letter-spacing: 0;
}

.record-value-small {
    font-size: 2.15rem;
}

.record-detail {
    max-width: 470px;
    margin: 11px 0 0;
    color: var(--text-muted);
    font-size: 0.8rem;
    line-height: 1.55;
}


/* Record personalities */

.record-gold {
    --record-tone: #dda128;
}

.record-crown {
    --record-tone: #a878e8;
}

.record-target {
    --record-tone: #d65a3a;
}

.record-electric {
    --record-tone: #e9b323;
}

.record-podium {
    --record-tone: #ba7c45;
}

.record-loyal {
    --record-tone: #7e9fbe;
}

.record-golf {
    --record-tone: #55a35e;
}

.record-game {
    --record-tone: #d65b8f;
}

.record-forge {
    --record-tone: #e87f33;
}

.record-bed {
    --record-tone: #c85b4e;
}

.record-rocket {
    --record-tone: #d55a35;
}

.record-photo {
    --record-tone: #6f9fc9;
}

.record-bed .record-icon {
    animation:
        record-bed-bounce
        2.8s
        ease-in-out
        infinite;
}

.record-rocket .record-icon {
    animation:
        record-rocket-bob
        2.5s
        ease-in-out
        infinite;
}


/* Records footer */

.record-footnote {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-top: 24px;
    padding: 13px 15px;
    color: var(--text-muted);
    background:
        color-mix(
            in srgb,
            var(--primary) 5%,
            var(--surface)
        );
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 0.78rem;
    line-height: 1.45;
}

.record-footnote > span {
    flex: 0 0 auto;
    font-size: 1.3rem;
}

.record-footnote p {
    margin: 0;
}


/* Records animations */

@keyframes record-trophy-party {
    0%,
    100% {
        transform:
            translateY(0)
            rotate(5deg);
    }

    50% {
        transform:
            translateY(-9px)
            rotate(-2deg);
    }
}

@keyframes record-confetti-float {
    0%,
    100% {
        transform:
            translateY(0)
            rotate(-9deg);
    }

    50% {
        transform:
            translateY(-11px)
            rotate(8deg);
    }
}

@keyframes record-icon-bob {
    0%,
    100% {
        transform:
            translateY(0)
            rotate(-2deg);
    }

    50% {
        transform:
            translateY(-4px)
            rotate(2deg);
    }
}

@keyframes record-bed-bounce {
    0%,
    100% {
        transform:
            translateY(0)
            rotate(-4deg);
    }

    50% {
        transform:
            translateY(-5px)
            rotate(5deg);
    }
}

@keyframes record-rocket-bob {
    0%,
    100% {
        transform:
            translateY(0)
            rotate(-9deg);
    }

    50% {
        transform:
            translateY(-7px)
            rotate(3deg);
    }
}


@media (max-width: 820px) {
    .record-featured-grid {
        grid-template-columns: 1fr;
    }

    .record-book-intro {
        min-height: 205px;
        padding: 26px 22px;
    }

    .record-book-copy {
        max-width: 72%;
    }

    .record-book-trophy {
        position: absolute;
        right: 13px;
        bottom: 28px;
        margin: 0;
        font-size: 5rem;
        opacity: 0.88;
    }

    .record-confetti-1,
    .record-confetti-2,
    .record-confetti-3 {
        opacity: 0.7;
    }
}


@media (max-width: 520px) {
    .record-book-copy {
        max-width: 100%;
        padding-bottom: 72px;
    }

    .record-book-trophy {
        right: 18px;
        bottom: 13px;
        font-size: 4.3rem;
    }

    .record-card-featured,
    .record-card-fun {
        min-height: 0;
    }

    .record-fun-grid {
        grid-template-columns: 1fr;
    }
}


@media (prefers-reduced-motion: reduce) {
    .record-book-trophy,
    .record-confetti,
    .record-icon {
        animation: none;
    }

    .record-card,
    .record-watermark {
        transition: none;
    }
}


/* ---------- Placeholder tabs ---------- */

.overall-coming-soon,
.overall-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 330px;
    padding: 34px;
    text-align: center;
}

.overall-coming-soon {
    max-width: 720px;
    margin: 0 auto;
}

.overall-coming-icon,
.overall-empty-state > span {
    display: block;
    margin-bottom: 16px;
    font-size: 3.7rem;
    filter: drop-shadow(0 9px 12px rgba(0,0,0,0.14));
}

.overall-coming-soon h2,
.overall-empty-state h3 {
    margin: 4px 0 10px;
}

.overall-coming-soon p:last-child,
.overall-empty-state p {
    max-width: 620px;
    margin: 0;
    color: var(--text-muted);
    line-height: 1.65;
}


@media (max-width: 760px) {
    .overall-tab-panel {
        padding: 22px 18px;
    }

    .overall-tabs {
        margin-left: -2px;
        margin-right: -2px;
    }

    .champion-mug-grid {
        grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
        gap: 20px;
    }

    .beer-mug {
        transform: scale(0.92);
        transform-origin: center bottom;
    }

    .champion-year {
        margin-top: 8px;
    }
}


@media (prefers-reduced-motion: reduce) {
    .beer-mug-avatar {
        animation: none;
    }
}

.back-link {
    display: inline-block;
    margin-bottom: 28px;
    color: var(--text-muted);
    text-decoration: none;
}

.back-link:hover {
    color: var(--text);
}

.event-header {
    margin-bottom: 30px;
}

.event-header h1 {
    margin: 5px 0 8px;
    font-size: clamp(2rem, 5vw, 3.5rem);
}

.event-nav {
    display: flex;
    gap: 8px;
    margin-bottom: 32px;
    padding-bottom: 12px;
    overflow-x: auto;
    border-bottom: 1px solid var(--border);
}

.event-nav span {
    flex: 0 0 auto;
    padding: 9px 14px;
    border-radius: 8px;
    color: var(--text-muted);
}

.event-nav-active {
    background: var(--primary);
    color: var(--primary-text) !important;
}

.detail-card {
    padding: 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
}

.detail-card h2 {
    margin-top: 0;
}

.event-nav a {
    flex: 0 0 auto;
    padding: 9px 14px;
    border-radius: 8px;
    color: var(--text-muted);
    text-decoration: none;
}

.event-nav a:hover {
    color: var(--text);
}

.table-wrapper {
    width: 100%;
    overflow-x: auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
}

.score-table {
    width: 100%;
    min-width: 700px;
    border-collapse: collapse;
}

.score-table th, .score-table td {
    padding: 14px 16px;
    text-align: center;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.score-table th {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 700;
}

.score-table tbody tr:last-child td {
    border-bottom: 0;
}

.score-table tbody tr:hover {
    background: var(--background);
}

.score-table .player-cell {
    text-align: left;
    font-weight: 700;
}
/* ---------- Saisonstatistik ---------- */

.statistics-table {
    min-width: 760px;
    font-variant-numeric: tabular-nums;
}

.statistics-table th,
.statistics-table td {
    padding: 16px 20px;
}

.statistics-table thead {
    background:
        color-mix(
            in srgb,
            var(--primary) 12%,
            var(--surface)
        );
}

.statistics-table th {
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.045em;
    text-transform: uppercase;
}

.statistics-table th:nth-child(2),
.statistics-table td:nth-child(2) {
    text-align: left;
}

.statistics-table td:nth-child(1) {
    width: 80px;

    font-size: 1.05rem;
    font-weight: 900;
}

.statistics-table td:nth-child(2) {
    min-width: 180px;

    font-size: 1rem;
    font-weight: 800;
}

.statistics-table td:nth-child(3) {
    color: var(--gold);

    font-size: 1.08rem;
    font-weight: 950;
}

.statistics-table td:nth-child(4),
.statistics-table td:nth-child(5),
.statistics-table td:nth-child(6) {
    min-width: 120px;
}

.statistics-table td:last-child {
    font-weight: 750;
}

.statistics-table tbody tr {
    transition:
        background 0.15s ease,
        box-shadow 0.15s ease;
}

.statistics-table tbody tr:hover {
    background:
        color-mix(
            in srgb,
            var(--primary) 9%,
            var(--surface)
        );
}

/* Podium dezent hervorheben */

.statistics-table tbody tr:nth-child(1) {
    background:
        linear-gradient(
            90deg,
            color-mix(in srgb, var(--gold) 15%, transparent),
            transparent 58%
        );
}

.statistics-table tbody tr:nth-child(2) {
    background:
        linear-gradient(
            90deg,
            rgba(170, 175, 180, 0.11),
            transparent 52%
        );
}

.statistics-table tbody tr:nth-child(3) {
    background:
        linear-gradient(
            90deg,
            rgba(185, 110, 66, 0.10),
            transparent 52%
        );
}

.statistics-table tbody tr:nth-child(1) td:first-child {
    color: var(--gold);
}

.statistics-table tbody tr:nth-child(2) td:first-child {
    color: #aeb4ba;
}

.statistics-table tbody tr:nth-child(3) td:first-child {
    color: #b96e42;
}
.rank-cell {
    width: 70px;
    font-weight: 700;
}

.total-cell {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text);
}

.login-section {
    min-height: calc(100vh - 145px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    width: min(100%, 420px);
    padding: 32px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
}

.login-card h1 {
    margin: 6px 0 8px;
    font-size: 2rem;
}

.form-group {
    margin-top: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 7px;
    font-weight: 600;
}

.form-group input {
    width: 100%;
    padding: 12px 14px;
    background: var(--background);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 9px;
    font: inherit;
}

.form-group input:focus {
    outline: 2px solid var(--primary);
    outline-offset: 1px;
}

.primary-button {
    width: 100%;
    margin-top: 24px;
    padding: 12px 16px;
    border: 0;
    border-radius: 9px;
    background: var(--primary);
    color: var(--primary-text);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.primary-button:hover {
    opacity: 0.9;
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.game-card {
    display: block;
    padding: 24px;
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 16px;
    text-decoration: none;
    transition: transform 0.15s ease, border-color 0.15s ease;
}

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

.game-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.game-card h2 {
    margin: 22px 0;
    font-size: 1.5rem;
}

.game-status {
    padding: 5px 9px;
    border-radius: 999px;
    background: var(--background);
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 700;
}

.game-winner-short {
    font-size: 0.9rem;
    font-weight: 700;
}

.game-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.game-meta > div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.game-meta-label {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.game-detail-header {
    margin-bottom: 30px;
}

.game-detail-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.game-detail-title-row h1 {
    margin: 5px 0 8px;
    font-size: clamp(2rem, 5vw, 3.5rem);
}

.game-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.result-list {
    display: flex;
    flex-direction: column;
}

.result-row {
    display: grid;
    grid-template-columns: 55px 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 13px 0;
    border-bottom: 1px solid var(--border);
}

.result-row:last-child {
    border-bottom: 0;
}

.result-place {
    font-weight: 700;
}

.result-player {
    font-weight: 700;
}

.result-points {
    color: var(--text-muted);
}

.game-master-row {
    opacity: 0.7;
}

.game-media-section {
    margin-top: 20px;
}

.secret-description {
    padding: 16px;
    background: var(--background);
    border: 1px dashed var(--border);
    border-radius: 10px;
    color: var(--text-muted);
}

@media (max-width: 750px) {
    .game-detail-grid {
        grid-template-columns: 1fr;
    }
    .game-detail-title-row {
        flex-direction: column;
    }
}

.game-card-title {
    margin: 0 0 14px;
    font-size: 1.65rem;
    line-height: 1.2;
}

.game-card-winner {
    margin-bottom: 18px;
    font-size: 1.05rem;
    font-weight: 700;
}

.game-card-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 600;
}

.game-card-separator {
    opacity: 0.5;
}

.voting-status-line {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
    color: var(--text-muted);
}

.voting-status {
    font-weight: 700;
}

.voting-status-open {
    color: #38a169;
}

.voting-status-closed {
    color: var(--text-muted);
}

.voting-status-not-open {
    color: #d98700;
}

.voting-form-card {
    margin-top: 20px;
}

.voting-saved {
    padding: 12px 14px;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 9px;
    font-weight: 600;
}

.form-group select {
    width: 100%;
    padding: 12px 14px;
    background: var(--background);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 9px;
    font: inherit;
}

.voting-result-header {
    margin-bottom: 24px;
    text-align: center;
}

.voting-result-header h2 {
    margin-top: 6px;
    font-size: 2rem;
}

.voting-pyramid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.voting-result-card {
    width: var(--result-width);
    max-width: 100%;
    display: grid;
    grid-template-columns: 60px 1fr auto;
    align-items: center;
    gap: 16px;
    padding: 18px 22px;
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 14px;
    text-decoration: none;
    transition: transform 0.15s ease, border-color 0.15s ease;
}

.voting-result-card:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
}

.voting-result-rank {
    font-size: 1.25rem;
    font-weight: 800;
}

.voting-result-main {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.voting-result-name {
    font-size: 1.1rem;
}

.voting-result-creator {
    color: var(--text-muted);
    font-size: 0.82rem;
}

.voting-result-points {
    display: flex;
    flex-direction: column;
    text-align: right;
    font-size: 1.35rem;
    font-weight: 800;
}

.voting-result-points span {
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 600;
}

@media (max-width: 700px) {
    .voting-result-card {
        width: 100% !important;
    }
}

/* ===== VISUAL LAYER ===== */

body {
    position: relative;
    overflow-x: hidden;
    background: radial-gradient( circle at 15% 0%, color-mix(in srgb, var(--primary) 12%, transparent), transparent 35% ), radial-gradient( circle at 90% 20%, color-mix(in srgb, var(--accent) 9%, transparent), transparent 30% ), var(--background);
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    min-height: 68px;
    background: color-mix(in srgb, var(--surface) 88%, transparent);
    border-bottom: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
    backdrop-filter: blur(16px);
    box-shadow: 0 3px 18px rgba(0, 0, 0, 0.06);
}

.brand {
    font-size: 1.25rem;
    font-weight: 900;
    letter-spacing: -0.02em;
}

.brand::after {
    content: "";
    display: block;
    width: 32px;
    height: 3px;
    margin-top: 3px;
    border-radius: 999px;
    background: linear-gradient( 90deg, var(--gold), var(--accent) );
}

.theme-switcher button {
    transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.theme-switcher button:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
}

h1, h2, h3 {
    letter-spacing: -0.025em;
}

.eyebrow {
    color: var(--primary);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.13em;
}

.event-card, .game-card, .detail-card, .login-card, .table-wrapper, .voting-result-card {
    background: linear-gradient( 145deg, var(--surface-raised), var(--surface) );
    border: 1px solid color-mix(in srgb, var(--border) 90%, transparent);
    box-shadow: var(--shadow);
}

.event-card, .game-card {
    position: relative;
    overflow: hidden;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.event-card::before, .game-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: linear-gradient( 180deg, var(--gold), var(--accent) );
    opacity: 0;
    transition: opacity 0.2s ease;
}

.event-card:hover, .game-card:hover {
    transform: translateY(-5px) scale(1.01);
    border-color: color-mix(in srgb, var(--primary) 60%, var(--border));
    box-shadow: var(--shadow-hover);
}

.event-card:hover::before, .game-card:hover::before {
    opacity: 1;
}

.game-card-title {
    color: var(--text);
}

.game-card-winner {
    color: var(--gold);
}

.game-card-footer {
    padding-top: 12px;
    border-top: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}

.event-nav {
    gap: 4px;
    padding: 6px;
    background: color-mix(in srgb, var(--surface) 78%, transparent);
    border: 1px solid var(--border);
    border-radius: 14px;
    backdrop-filter: blur(12px);
}

.event-nav a, .event-nav span {
    position: relative;
    border-radius: 9px;
    transition: color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.event-nav a:hover {
    transform: translateY(-1px);
    background: color-mix(in srgb, var(--primary) 10%, transparent);
}

.event-nav .event-nav-active {
    background: linear-gradient( 135deg, var(--primary), var(--gold) );
    color: var(--primary-text) !important;
    box-shadow: 0 5px 16px color-mix(in srgb, var(--primary) 25%, transparent);
}

.event-status-completed {
    background: linear-gradient( 135deg, var(--primary), var(--gold) );
    color: var(--primary-text);
}

.score-table thead {
    background: color-mix(in srgb, var(--primary) 7%, var(--surface));
}

.score-table tbody tr {
    transition: background 0.15s ease, transform 0.15s ease;
}

.score-table tbody tr:hover {
    background: color-mix(in srgb, var(--primary) 8%, var(--surface));
}

.total-cell {
    color: var(--gold);
}

.primary-button {
    background: linear-gradient( 135deg, var(--primary), var(--gold) );
    color: var(--primary-text);
    box-shadow: 0 8px 20px color-mix(in srgb, var(--primary) 25%, transparent);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.primary-button:hover {
    opacity: 1;
    transform: translateY(-2px);
    box-shadow: 0 12px 28px color-mix(in srgb, var(--primary) 35%, transparent);
}

.voting-result-card:first-child {
    border-color: color-mix(in srgb, var(--gold) 80%, var(--border));
    box-shadow: 0 12px 35px color-mix(in srgb, var(--gold) 16%, transparent);
}

.voting-result-points {
    color: var(--gold);
}

@keyframes bierlympiadeFadeUp {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.event-card, .game-card, .detail-card, .voting-result-card {
    animation: bierlympiadeFadeUp 0.45s ease both;
}

.event-grid > *:nth-child(2), .game-grid > *:nth-child(2), .voting-pyramid > *:nth-child(2) {
    animation-delay: 0.05s;
}

.event-grid > *:nth-child(3), .game-grid > *:nth-child(3), .voting-pyramid > *:nth-child(3) {
    animation-delay: 0.10s;
}

.event-grid > *:nth-child(4), .game-grid > *:nth-child(4), .voting-pyramid > *:nth-child(4) {
    animation-delay: 0.15s;
}

.event-grid > *:nth-child(5), .game-grid > *:nth-child(5), .voting-pyramid > *:nth-child(5) {
    animation-delay: 0.20s;
}

.event-grid > *:nth-child(6), .game-grid > *:nth-child(6), .voting-pyramid > *:nth-child(6) {
    animation-delay: 0.25s;
}

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

/* ===== PARTY & COMPETITION ===== */

body::before {
    content: "";
    position: fixed;
    z-index: -1;
    inset: -20%;
    pointer-events: none;
    background: radial-gradient( circle at 20% 20%, color-mix(in srgb, var(--gold) 16%, transparent), transparent 26% ), radial-gradient( circle at 80% 35%, color-mix(in srgb, var(--accent) 13%, transparent), transparent 28% ), radial-gradient( circle at 55% 90%, color-mix(in srgb, var(--primary) 10%, transparent), transparent 30% );
    animation: partyGlow 14s ease-in-out infinite alternate;
}

@keyframes partyGlow {
    0% {
        transform: translate3d(-2%, -1%, 0) scale(1);
    }
    50% {
        transform: translate3d(2%, 1%, 0) scale(1.04);
    }
    100% {
        transform: translate3d(-1%, 2%, 0) scale(1.02);
    }
}

.brand {
    text-transform: uppercase;
    letter-spacing: 0.035em;
}

.brand::after {
    width: 58px;
    background: linear-gradient( 90deg, var(--gold), var(--accent), var(--gold) );
    background-size: 200% 100%;
    animation: brandEnergy 3s linear infinite;
}

@keyframes brandEnergy {
    from {
        background-position: 0% 50%;
    }
    to {
        background-position: 200% 50%;
    }
}

.game-card, .event-card {
    isolation: isolate;
}

.game-card::after, .event-card::after {
    content: "";
    position: absolute;
    z-index: -1;
    width: 130px;
    height: 130px;
    right: -70px;
    top: -70px;
    border-radius: 50%;
    background: color-mix( in srgb, var(--gold) 10%, transparent );
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0.5;
}

.game-card:hover::after, .event-card:hover::after {
    transform: scale(1.7);
    opacity: 1;
}

.game-card-winner {
    position: relative;
    font-size: 1.1rem;
    font-weight: 900;
}

.game-card:hover .game-card-winner {
    text-shadow: 0 0 20px color-mix(in srgb, var(--gold) 35%, transparent);
}

.score-table tbody tr:first-child {
    background: linear-gradient( 90deg, color-mix(in srgb, var(--gold) 14%, transparent), transparent );
}

.score-table tbody tr:first-child .player-cell, .score-table tbody tr:first-child .total-cell {
    font-weight: 900;
}

.voting-result-card:first-child {
    position: relative;
    overflow: hidden;
    transform-origin: center;
    animation: bierlympiadeFadeUp 0.45s ease both, winnerGlow 3s ease-in-out 0.5s infinite alternate;
}

@keyframes winnerGlow {
    from {
        box-shadow: 0 12px 30px color-mix(in srgb, var(--gold) 12%, transparent);
    }
    to {
        box-shadow: 0 18px 46px color-mix(in srgb, var(--gold) 30%, transparent);
    }
}

.event-nav .event-nav-active {
    position: relative;
    overflow: hidden;
}

.event-nav .event-nav-active::after {
    content: "";
    position: absolute;
    left: -50%;
    top: 0;
    width: 35%;
    height: 100%;
    transform: skewX(-20deg);
    background: linear-gradient( 90deg, transparent, rgba(255, 255, 255, 0.22), transparent );
    animation: navShine 4s ease-in-out infinite;
}

@keyframes navShine {
    0%, 65% {
        left: -50%;
    }
    100% {
        left: 130%;
    }
}

@media (prefers-reduced-motion: reduce) {
    body::before, .brand::after, .voting-result-card:first-child, .event-nav .event-nav-active::after {
        animation: none !important;
    }
}

/* ===== EVENT HERO & BEER BUBBLES ===== */

.event-hero {
    position: relative;
    isolation: isolate;
    min-height: 390px;
    margin-bottom: 26px;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 22px;
    box-shadow: var(--shadow-hover);
}

.event-hero-placeholder {
    position: absolute;
    z-index: -4;
    inset: 0;
    background: radial-gradient( circle at 75% 25%, rgba(217, 84, 63, 0.65), transparent 34% ), radial-gradient( circle at 25% 70%, rgba(227, 165, 44, 0.6), transparent 38% ), linear-gradient( 135deg, #21170c, #533416 45%, #1b1713 );
    transform: scale(1.03);
    animation: heroPlaceholderMove 12s ease-in-out infinite alternate;
}

@keyframes heroPlaceholderMove {
    from {
        transform: scale(1.03) translate3d(-1%, 0, 0);
    }
    to {
        transform: scale(1.09) translate3d(1%, -1%, 0);
    }
}

.event-hero-overlay {
    position: absolute;
    z-index: -2;
    inset: 0;
    background: linear-gradient( 90deg, rgba(10, 8, 6, 0.86) 0%, rgba(10, 8, 6, 0.55) 52%, rgba(10, 8, 6, 0.15) 100% ), linear-gradient( 0deg, rgba(10, 8, 6, 0.72), transparent 65% );
}

.event-hero-content {
    position: relative;
    z-index: 3;
    width: 100%;
    padding: 42px;
    color: #fff8eb;
}

.event-hero-edition {
    margin: 0 0 8px;
    color: #f0b73d;
    font-size: 0.8rem;
    font-weight: 900;
    letter-spacing: 0.18em;
}

.event-hero h1 {
    margin: 0;
    font-size: clamp(2.8rem, 8vw, 5.7rem);
    line-height: 0.88;
    letter-spacing: -0.055em;
}

.event-hero h1 span {
    display: block;
    color: #e3a52c;
}

.event-hero-date {
    margin: 20px 0 0;
    color: rgba(255, 248, 235, 0.8);
    font-weight: 700;
}

.event-hero-stats {
    display: flex;
    gap: 14px;
    margin-top: 26px;
}

.event-hero-stats > div {
    min-width: 105px;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    backdrop-filter: blur(8px);
}

.event-hero-stats strong {
    display: block;
    color: #f0b73d;
    font-size: 1.25rem;
}

.event-hero-stats span {
    display: block;
    margin-top: 2px;
    color: rgba(255, 248, 235, 0.72);
    font-size: 0.72rem;
    font-weight: 600;
}

.beer-bubbles {
    position: absolute;
    z-index: -1;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.beer-bubbles span {
    position: absolute;
    bottom: -40px;
    width: 12px;
    height: 12px;
    border: 1px solid rgba(255, 221, 143, 0.5);
    border-radius: 50%;
    background: rgba(255, 210, 107, 0.08);
    box-shadow: inset 2px 2px 4px rgba(255, 255, 255, 0.16);
    animation: beerBubbleRise 9s linear infinite;
}

.beer-bubbles span:nth-child(1) {
    left: 8%;
    width: 8px;
    height: 8px;
    animation-duration: 8s;
}

.beer-bubbles span:nth-child(2) {
    left: 17%;
    animation-delay: -5s;
    animation-duration: 11s;
}

.beer-bubbles span:nth-child(3) {
    left: 28%;
    width: 6px;
    height: 6px;
    animation-delay: -2s;
    animation-duration: 7s;
}

.beer-bubbles span:nth-child(4) {
    left: 38%;
    width: 16px;
    height: 16px;
    animation-delay: -7s;
    animation-duration: 13s;
}

.beer-bubbles span:nth-child(5) {
    left: 49%;
    animation-delay: -4s;
    animation-duration: 9s;
}

.beer-bubbles span:nth-child(6) {
    left: 58%;
    width: 7px;
    height: 7px;
    animation-delay: -8s;
    animation-duration: 8s;
}

.beer-bubbles span:nth-child(7) {
    left: 67%;
    width: 14px;
    height: 14px;
    animation-delay: -1s;
    animation-duration: 12s;
}

.beer-bubbles span:nth-child(8) {
    left: 75%;
    width: 6px;
    height: 6px;
    animation-delay: -6s;
    animation-duration: 7s;
}

.beer-bubbles span:nth-child(9) {
    left: 83%;
    animation-delay: -3s;
    animation-duration: 10s;
}

.beer-bubbles span:nth-child(10) {
    left: 91%;
    width: 17px;
    height: 17px;
    animation-delay: -9s;
    animation-duration: 14s;
}

.beer-bubbles span:nth-child(11) {
    left: 34%;
    width: 9px;
    height: 9px;
    animation-delay: -10s;
    animation-duration: 12s;
}

.beer-bubbles span:nth-child(12) {
    left: 72%;
    width: 10px;
    height: 10px;
    animation-delay: -4s;
    animation-duration: 9s;
}

@keyframes beerBubbleRise {
    0% {
        transform: translate3d(0, 0, 0) scale(0.6);
        opacity: 0;
    }
    10% {
        opacity: 0.65;
    }
    60% {
        transform: translate3d(14px, -260px, 0) scale(1);
    }
    100% {
        transform: translate3d(-8px, -460px, 0) scale(1.15);
        opacity: 0;
    }
}

@media (max-width: 700px) {
    .event-hero {
        min-height: 340px;
    }
    .event-hero-content {
        padding: 26px;
    }
    .event-hero-stats {
        flex-wrap: wrap;
    }
}

@media (prefers-reduced-motion: reduce) {
    .event-hero-placeholder, .beer-bubbles span {
        animation: none !important;
    }
}

/* ===== GALLERY ===== */

.media-upload-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    margin-top: 24px;
}

.media-upload-options h3 {
    margin-bottom: 10px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.media-upload-options ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.media-upload-options li {
    margin-bottom: 7px;
}

.gallery-section {
    margin-top: 34px;
}

.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 18px;
}

.media-card {
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.media-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.media-preview {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #000;
}

.media-preview img, .media-preview video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.media-preview img {
    transition: transform 0.4s ease;
}

.media-card:hover img {
    transform: scale(1.04);
}

.media-card-info {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    padding: 12px;
}

.media-card-info > span:first-child {
    width: 100%;
    color: var(--text-muted);
    font-size: 0.78rem;
}

.media-chip {
    padding: 4px 8px;
    background: color-mix( in srgb, var(--primary) 12%, var(--surface) );
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
}

@media (max-width: 700px) {
    .media-upload-options {
        grid-template-columns: 1fr;
    }
}

.gallery-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 24px;
}

.gallery-toolbar-left {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    flex: 1;
}

.gallery-search, .gallery-toolbar select {
    min-height: 42px;
    padding: 10px 12px;
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 9px;
    font: inherit;
}

.gallery-search {
    min-width: 220px;
    flex: 1;
}

.gallery-upload-button {
    width: auto;
    margin-top: 0;
    white-space: nowrap;
}

.gallery-upload-panel {
    margin-bottom: 28px;
}

.gallery-upload-panel[hidden] {
    display: none;
}

@media (max-width: 850px) {
    .gallery-toolbar {
        align-items: stretch;
        flex-direction: column;
    }
    .gallery-upload-button {
        width: 100%;
    }
}

/* ===== SLIDESHOW & LIGHTBOX ===== */

.hero-slideshow {
    position: absolute;
    z-index: -4;
    inset: 0;
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    background-position: center;
    background-size: cover;
    transform: scale(1.03);
    transition: opacity 1.4s ease-in-out;
    animation: heroPhotoMovement 12s ease-in-out infinite alternate;
}

.hero-slide-active {
    opacity: 1;
}

@keyframes heroPhotoMovement {
    from {
        transform: scale(1.03) translate3d(-0.5%, 0, 0);
    }
    to {
        transform: scale(1.10) translate3d(0.8%, -0.7%, 0);
    }
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient( 135deg, rgba(227, 165, 44, 0.05), rgba(198, 79, 53, 0.07) );
}

@media (prefers-reduced-motion: reduce) {
    .hero-slide {
        animation: none !important;
        transition-duration: 0.01ms !important;
    }
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    overflow: hidden;
    transition: opacity 1.4s ease-in-out;
}

.hero-slide-active {
    opacity: 1;
}

.hero-slide-bg {
    position: absolute;
    inset: -30px;
    width: calc(100% + 60px);
    height: calc(100% + 60px);
    object-fit: cover;
    filter: blur(20px) brightness(0.55) saturate(1.15);
    transform: scale(1.08);
}

.hero-slide-image {
    position: relative;
    width: 100%;
    height: 100%;
    object-fit: contain;
    animation: heroPhotoMovement 12s ease-in-out infinite alternate;
}

@keyframes heroPhotoMovement {
    from {
        transform: scale(1);
    }
    to {
        transform: scale(1.035);
    }
}

.gallery-image {
    cursor: zoom-in;
}

.gallery-lightbox {
    position: fixed;
    z-index: 1000;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    background: rgba(7, 6, 5, 0.92);
    backdrop-filter: blur(12px);
    animation: lightboxFadeIn 0.2s ease;
}

.gallery-lightbox[hidden] {
    display: none;
}

.lightbox-content {
    width: min(1200px, 96vw);
    height: min(88vh, 900px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}

.lightbox-content img {
    flex: 1;
    width: 100%;
    min-height: 0;
    object-fit: contain;
    background: #080706;
}

.lightbox-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 14px 18px;
}

.lightbox-actions span {
    overflow: hidden;
    color: var(--text-muted);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lightbox-download {
    width: auto;
    margin: 0;
    text-decoration: none;
    white-space: nowrap;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 26px;
    z-index: 1001;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: white;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

body.lightbox-open {
    overflow: hidden;
}

@keyframes lightboxFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@media (max-width: 700px) {
    .gallery-lightbox {
        padding: 12px;
    }
    .lightbox-content {
        height: 86vh;
    }
    .lightbox-actions {
        align-items: stretch;
        flex-direction: column;
    }
    .lightbox-download {
        width: 100%;
        text-align: center;
    }
}

.event-hero-year {
    margin: 4px 0 0;
    color: #e3a52c;
    font-size: clamp(4rem, 8vw, 7rem);
    font-weight: 950;
    line-height: 0.9;
    letter-spacing: -0.06em;
}

.event-hero-edition {
    display: inline-block;
    padding-left: 14px;
    border-left: 4px solid #e3a52c;
}

.event-hero-split {
    grid-template-columns: 32% 68%;
}

.event-hero-copy {
    padding: 44px 34px;
}

.event-hero-edition {
    margin-bottom: 10px;
    font-size: 1.15rem;
    font-weight: 950;
    letter-spacing: 0.12em;
}

.event-hero-year {
    margin-top: 0;
    font-size: clamp(4.8rem, 8vw, 7.4rem);
}

.event-hero-media .hero-slide-image {
    padding: 8px 14px 8px 26px;
}

.event-hero-split {
    grid-template-columns: 30% 70%;
}

.event-hero-media .hero-slide {
    justify-content: flex-end;
}

.event-hero-media .hero-slide-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: right center;
    padding: 8px 0 8px 18px;
}

.event-hero-copy .event-hero-edition {
    margin: 0 0 14px;
    font-size: clamp(1.4rem, 2.2vw, 1.9rem);
    font-weight: 950;
    line-height: 1;
    letter-spacing: 0.08em;
}

.event-hero-copy {
    padding: 42px 30px;
}

.lightbox-nav {
    position: absolute;
    z-index: 1001;
    top: 50%;
    width: 54px;
    height: 70px;
    transform: translateY(-50%);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 12px;
    background: rgba(15, 12, 9, 0.55);
    color: #fff8eb;
    font-size: 2.8rem;
    line-height: 1;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: background 0.18s ease, transform 0.18s ease;
}

.lightbox-nav:hover {
    background: rgba(227, 165, 44, 0.85);
    transform: translateY(-50%) scale(1.05);
}

.lightbox-prev {
    left: 24px;
}

.lightbox-next {
    right: 24px;
}

@media (max-width: 700px) {
    .lightbox-nav {
        width: 44px;
        height: 58px;
        font-size: 2.2rem;
    }
    .lightbox-prev {
        left: 8px;
    }
    .lightbox-next {
        right: 8px;
    }
}

/* ===== GAME MEDIA ===== */

.game-media-section {
    margin-top: 20px;
}

.game-media-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.game-media-heading h2 {
    margin: 4px 0 0;
}

.game-gallery-link {
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 800;
    text-decoration: none;
}

.game-gallery-link:hover {
    text-decoration: underline;
}

.game-media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.game-media-card {
    overflow: hidden;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.game-media-preview {
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #080706;
}

.game-media-preview img, .game-media-preview video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.game-media-preview img {
    transition: transform 0.35s ease;
}

.game-media-preview:hover img {
    transform: scale(1.05);
}

.game-media-info {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px;
}

.game-media-empty {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 22px;
    background: var(--background);
    border: 1px dashed var(--border);
    border-radius: 12px;
}

.game-media-empty > span {
    font-size: 2rem;
}

.game-media-empty p {
    margin-bottom: 0;
}

/* ===== STATISTICS & AWARDS ===== */

.media-edit-link {
    width: 100%;
    margin-top: 5px;
    color: var(--primary);
    font-size: 0.78rem;
    font-weight: 800;
    text-decoration: none;
}

.media-edit-link:hover {
    text-decoration: underline;
}

.game-of-year-card h2 {
    margin-top: 6px;
    margin-bottom: 6px;
}

.game-of-year-card a {
    color: var(--text);
    text-decoration: none;
}

.game-of-year-card a:hover {
    color: var(--primary);
}

.game-of-year-entry + .game-of-year-entry {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

/* ===== SIDE AWARDS ===== */

.award-strip {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px;
    margin-bottom: 24px;
}

.award-box {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 145px;
    padding: 14px 20px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 15px;
    background: linear-gradient( 145deg, var(--surface-raised), var(--surface) );
}

.lantern-box {
    border-left: 4px solid #b84838;
}

.golf-box {
    border-left: 4px solid #6c9e43;
}

.award-character {
    position: relative;
    flex: 0 0 110px;
    height: 120px;
    margin-right: 15px;
}

.award-head {
    position: absolute;
    z-index: 4;
    left: 50%;
    top: 0;
    width: 72px;
    height: 72px;
    transform: translateX(-50%);
    overflow: hidden;
    border: 3px solid var(--surface-raised);
    border-radius: 50%;
    background: white;
}

.award-head img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.08);
}

.award-body {
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 57px;
    height: 61px;
    transform: translateX(-50%);
    border-radius: 19px 19px 8px 8px;
    background: linear-gradient( 145deg, var(--primary), var(--accent) );
}

.award-prop {
    position: absolute;
    z-index: 7;
}

.award-lantern {
    left: 0;
    bottom: 2px;
    font-size: 2.1rem;
    animation: lantern-swing 2.5s ease-in-out infinite;
}

@keyframes lantern-swing {
    0%, 100% {
        transform: rotate(-7deg);
    }
    50% {
        transform: rotate(8deg);
    }
}

.award-sheet {
    right: -2px;
    bottom: 5px;
    font-size: 1.9rem;
}

.award-golf {
    right: -2px;
    bottom: 3px;
    font-size: 2.2rem;
}

.award-info {
    min-width: 0;
}

.award-info h3 {
    margin: 4px 0;
    font-size: 1.3rem;
}

.award-info p {
    margin: 0;
    color: var(--text-muted);
}

.award-duty {
    margin-top: 6px !important;
    color: var(--text) !important;
    font-size: 0.82rem;
    font-weight: 800;
}

@media (max-width: 850px) {
    .award-strip {
        grid-template-columns: 1fr;
    }
}

/* ===== PARTICIPANT AVATARS ===== */

.participant-avatar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 18px;
    margin-top: 18px;
}

.participant-avatar-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 155px;
    padding: 16px 10px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: linear-gradient( 145deg, var(--surface-raised), var(--surface) );
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.participant-avatar-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.18);
}

.participant-avatar-image {
    width: 92px;
    height: 92px;
    margin-bottom: 10px;
    object-fit: cover;
    border-radius: 50%;
    background: white;
    animation: participant-bounce 3.2s ease-in-out infinite;
    animation-delay: calc( var(--participant-index) * -0.35s );
}

.participant-avatar-name {
    font-size: 0.95rem;
}

@keyframes participant-bounce {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-7px) rotate(1deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .participant-avatar-image {
        animation: none;
    }
}

/* ===== PODIUM – DEFINITIVE VERSION ===== */

.winner-section {
    position: relative;
    min-height: 610px;
    margin: 24px 0;
    overflow: hidden;
    padding: 32px 35px 0;
    border: 1px solid rgba(227, 165, 44, 0.22);
    border-radius: 20px;
    background:
        radial-gradient(ellipse at 50% 22%, rgba(255, 196, 56, 0.22) 0%, rgba(255, 196, 56, 0.07) 30%, transparent 57%),
        linear-gradient(180deg, #201a12 0%, #171410 58%, #100e0c 100%);
    box-shadow:
        inset 0 -70px 80px rgba(0, 0, 0, 0.35),
        0 20px 45px rgba(0, 0, 0, 0.22);
}

.winner-section::before,
.winner-section::after {
    content: "";
    position: absolute;
    top: -100px;
    width: 260px;
    height: 600px;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(255, 221, 139, 0.16), rgba(255, 221, 139, 0.02) 75%, transparent);
    filter: blur(8px);
}

.winner-section::before {
    left: 20%;
    border-radius: 50%;
    box-shadow: 0 0 100px rgba(227, 165, 44, 0.18);
    transform: rotate(14deg);
}

.winner-section::after {
    right: 20%;
    transform: rotate(-14deg);
}

.winner-heading {
    position: relative;
    z-index: 10;
    text-align: center;
}

.winner-heading h2 {
    margin: 3px 0 0;
    font-size: clamp(2rem, 4vw, 3rem);
    letter-spacing: -0.04em;
}

.winner-stage {
    position: relative;
    z-index: 5;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: clamp(8px, 3vw, 42px);
    min-height: 500px;
    margin-top: 6px;
}

.winner-slot {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: min(29%, 250px);
    min-width: 165px;
    text-align: center;
}

.winner-slot-1 {
    order: 2;
    z-index: 5;
}

.winner-slot-2 {
    order: 1;
    z-index: 4;
}

.winner-slot-3 {
    order: 3;
    z-index: 4;
}

.winner-person {
    position: relative;
    width: 150px;
    height: 220px;
    margin: auto;
    transform-origin: bottom center;
    animation: podium-character-idle 3.6s ease-in-out infinite;
}

.winner-slot-1 .winner-person {
    width: 185px;
    height: 260px;
    animation: podium-champion-idle 3s ease-in-out infinite;
}

.winner-slot-2 .winner-person {
    animation-delay: -1.2s;
}

.winner-slot-3 .winner-person {
    animation-delay: -2.3s;
}

.winner-head {
    position: absolute;
    z-index: 8;
    left: 50%;
    top: 2px;
    width: 104px;
    height: 104px;
    overflow: hidden;
    border: 4px solid rgba(255, 255, 255, 0.88);
    border-radius: 50%;
    background: white;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.42);
    transform: translateX(-50%);
}

.winner-slot-1 .winner-head {
    width: 126px;
    height: 126px;
    border-color: #f2b32b;
    box-shadow:
        0 0 28px rgba(242, 179, 43, 0.38),
        0 10px 22px rgba(0, 0, 0, 0.4);
}

.winner-head img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.08);
}

.winner-body {
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 106px;
    height: 130px;
    transform: translateX(-50%);
}

.winner-shirt {
    position: absolute;
    z-index: 4;
    left: 50%;
    top: 15px;
    width: 78px;
    height: 87px;
    border-radius: 30px 30px 15px 15px;
    background: linear-gradient(145deg, #c9831d, #985316);
    box-shadow: inset -9px -9px 15px rgba(0, 0, 0, 0.15);
    transform: translateX(-50%);
}

.winner-slot-1 .winner-shirt {
    background: linear-gradient(145deg, #f4b72d, #c37514);
    box-shadow:
        inset -9px -9px 15px rgba(0, 0, 0, 0.14),
        0 0 24px rgba(244, 183, 45, 0.18);
}

.winner-slot-2 .winner-shirt {
    background: linear-gradient(145deg, #969da5, #62676d);
}

.winner-slot-3 .winner-shirt {
    background: linear-gradient(145deg, #b96e42, #754028);
}

.winner-arm {
    position: absolute;
    z-index: 3;
    top: 29px;
    width: 23px;
    height: 75px;
    border-radius: 20px;
    background: linear-gradient(90deg, #d89f75, #edb98d);
    transform-origin: top center;
}

.winner-arm-left {
    left: 3px;
    transform: rotate(17deg);
}

.winner-arm-right {
    right: 3px;
    transform: rotate(-17deg);
}

.winner-slot-1 .winner-arm-left {
    transform: rotate(42deg);
    animation: winner-left-arm 2.8s ease-in-out infinite;
}

.winner-slot-1 .winner-arm-right {
    transform: rotate(-42deg);
    animation: winner-right-arm 2.8s ease-in-out infinite;
}

.winner-leg {
    position: absolute;
    z-index: 2;
    bottom: 0;
    width: 28px;
    height: 58px;
    border-radius: 7px 7px 12px 12px;
    background: linear-gradient(180deg, #34312d, #191816);
}

.winner-leg::after {
    content: "";
    position: absolute;
    bottom: -3px;
    width: 36px;
    height: 13px;
    border-radius: 9px;
    background: #090807;
}

.winner-leg-left {
    left: 23px;
}

.winner-leg-left::after {
    left: -10px;
}

.winner-leg-right {
    right: 23px;
}

.winner-leg-right::after {
    right: -10px;
}

.winner-crown {
    position: absolute;
    z-index: 20;
    left: 50%;
    top: -43px;
    font-size: 3.1rem;
    filter: drop-shadow(0 4px 7px rgba(0, 0, 0, 0.4));
    transform: translateX(-50%) rotate(-5deg);
    animation: crown-party 2.7s ease-in-out infinite;
}

.winner-slot-1::before {
    content: "🏆";
    position: absolute;
    z-index: 20;
    right: 4%;
    top: 105px;
    font-size: 2.7rem;
    filter: drop-shadow(0 5px 7px rgba(0, 0, 0, 0.35));
    transform: rotate(8deg);
    animation: trophy-bounce 2.4s ease-in-out infinite;
}

.winner-name {
    position: relative;
    z-index: 8;
    margin-top: 3px;
    color: #f5efe4;
    font-size: 1.35rem;
    font-weight: 950;
}

.winner-slot-1 .winner-name {
    color: #ffc13a;
    font-size: 1.75rem;
}

.winner-score {
    position: relative;
    z-index: 8;
    margin: 3px 0 11px;
    color: #b9ad9d;
    font-weight: 750;
}

.winner-pedestal {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    width: 100%;
    padding-top: 14px;
    overflow: visible;
    border-radius: 9px 9px 0 0;
    color: rgba(255, 255, 255, 0.88);
    font-weight: 950;
    text-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
    box-shadow:
        inset 0 5px 0 rgba(255, 255, 255, 0.14),
        inset 0 -20px 30px rgba(0, 0, 0, 0.13),
        0 12px 24px rgba(0, 0, 0, 0.2);
}

.winner-pedestal::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -10px;
    height: 15px;
    border-radius: 10px 10px 3px 3px;
    background: rgba(255, 255, 255, 0.14);
    transform: skewX(-12deg);
}

.winner-pedestal-1 {
    height: 165px;
    background: linear-gradient(135deg, #d99b18, #8e5310);
    font-size: 4.4rem;
}

.winner-pedestal-2 {
    height: 118px;
    background: linear-gradient(135deg, #8f959b, #54575a);
    font-size: 3.6rem;
}

.winner-pedestal-3 {
    height: 88px;
    background: linear-gradient(135deg, #a9633c, #623822);
    font-size: 3.2rem;
}

.winner-slot::after {
    content: "";
    position: absolute;
    left: 12%;
    right: 12%;
    bottom: -7px;
    height: 14px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.35);
    filter: blur(7px);
}

@keyframes podium-character-idle {
    0%,
    100% {
        transform: translateY(0) rotate(-0.7deg);
    }
    50% {
        transform: translateY(-6px) rotate(0.7deg);
    }
}

@keyframes podium-champion-idle {
    0%,
    100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-8px) scale(1.015);
    }
}

@keyframes winner-left-arm {
    0%,
    100% {
        transform: rotate(42deg);
    }
    50% {
        transform: rotate(51deg);
    }
}

@keyframes winner-right-arm {
    0%,
    100% {
        transform: rotate(-42deg);
    }
    50% {
        transform: rotate(-51deg);
    }
}

@keyframes crown-party {
    0%,
    100% {
        transform: translateX(-50%) rotate(-6deg) translateY(0);
    }
    50% {
        transform: translateX(-50%) rotate(6deg) translateY(-4px);
    }
}

@keyframes trophy-bounce {
    0%,
    100% {
        transform: rotate(8deg) translateY(0);
    }
    50% {
        transform: rotate(3deg) translateY(-7px);
    }
}

@media (max-width: 850px) {
    .winner-section {
        min-height: unset;
        padding-left: 10px;
        padding-right: 10px;
    }

    .winner-stage {
        gap: 4px;
        min-height: 420px;
    }

    .winner-slot {
        min-width: 0;
        width: 33.333%;
    }

    .winner-person {
        scale: 0.78;
    }

    .winner-slot-1 .winner-person {
        scale: 0.84;
    }

    .winner-name {
        font-size: 1rem;
    }

    .winner-slot-1 .winner-name {
        font-size: 1.2rem;
    }

    .winner-score {
        font-size: 0.82rem;
    }

    .winner-slot-1::before {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .winner-person,
    .winner-arm,
    .winner-crown,
    .winner-slot-1::before {
        animation: none;
    }
}


/* ===== EVENT SELF REGISTRATION ===== */

.event-registration-card {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 22px;
    margin: 0 0 24px;
    padding: 24px 26px;
    overflow: hidden;
    background:
        radial-gradient(
            circle at 91% 18%,
            color-mix(in srgb, var(--gold) 22%, transparent),
            transparent 34%
        ),
        linear-gradient(
            145deg,
            var(--surface-raised),
            var(--surface)
        );
    border:
        1px solid
        color-mix(in srgb, var(--gold) 42%, var(--border));
    border-radius: 20px;
    box-shadow: var(--shadow);
    isolation: isolate;
}

.event-registration-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 5px;
    background:
        linear-gradient(
            180deg,
            var(--gold),
            var(--accent)
        );
}

.event-registration-card::after {
    content: "🍺";
    position: absolute;
    z-index: -1;
    right: -14px;
    bottom: -36px;
    font-size: 8.5rem;
    line-height: 1;
    opacity: 0.055;
    transform: rotate(12deg);
}

.event-registration-card-confirmed {
    border-color:
        color-mix(in srgb, #5ca765 42%, var(--border));
    background:
        radial-gradient(
            circle at 91% 18%,
            color-mix(in srgb, #5ca765 18%, transparent),
            transparent 34%
        ),
        linear-gradient(
            145deg,
            var(--surface-raised),
            var(--surface)
        );
}

.event-registration-card-confirmed::before {
    background:
        linear-gradient(
            180deg,
            #65b66f,
            #3c8e4a
        );
}

.event-registration-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 68px;
    height: 68px;
    flex: 0 0 auto;
    border:
        1px solid
        color-mix(in srgb, var(--gold) 45%, var(--border));
    border-radius: 18px;
    background:
        color-mix(in srgb, var(--gold) 12%, var(--surface-raised));
    font-size: 2.35rem;
    box-shadow:
        0 10px 22px
        color-mix(in srgb, var(--gold) 15%, transparent);
    animation:
        event-registration-bob
        3.1s
        ease-in-out
        infinite;
}

.event-registration-card-confirmed .event-registration-icon {
    border-color:
        color-mix(in srgb, #5ca765 45%, var(--border));
    background:
        color-mix(in srgb, #5ca765 12%, var(--surface-raised));
}

.event-registration-copy {
    min-width: 0;
}

.event-registration-copy h2 {
    margin: 4px 0 7px;
    font-size: clamp(1.45rem, 3vw, 2rem);
}

.event-registration-copy > p:last-child {
    max-width: 650px;
    margin: 0;
    color: var(--text-muted);
    line-height: 1.55;
}

.event-registration-form {
    display: flex;
    justify-content: flex-end;
}

.event-registration-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 50px;
    padding: 0 19px;
    color: var(--primary-text);
    background:
        linear-gradient(
            135deg,
            var(--primary),
            var(--gold)
        );
    border: 0;
    border-radius: 13px;
    box-shadow:
        0 9px 22px
        color-mix(in srgb, var(--primary) 25%, transparent);
    cursor: pointer;
    font: inherit;
    font-size: 0.92rem;
    font-weight: 900;
    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease,
        filter 0.18s ease;
}

.event-registration-button strong {
    font-size: 1.2rem;
}

.event-registration-button:hover {
    transform: translateY(-2px) scale(1.015);
    filter: brightness(1.04);
    box-shadow:
        0 13px 28px
        color-mix(in srgb, var(--primary) 31%, transparent);
}

.event-registration-button:active {
    transform: translateY(0) scale(0.99);
}

.event-registration-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 13px;
    color: #2f793b;
    background:
        color-mix(in srgb, #65b66f 14%, var(--surface-raised));
    border:
        1px solid
        color-mix(in srgb, #65b66f 40%, var(--border));
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 900;
    white-space: nowrap;
}

html[data-theme="dark"] .event-registration-status {
    color: #9ed7a5;
}

@keyframes event-registration-bob {
    0%,
    100% {
        transform: translateY(0) rotate(-2deg);
    }

    50% {
        transform: translateY(-4px) rotate(2deg);
    }
}

@media (max-width: 760px) {
    .event-registration-card {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .event-registration-form,
    .event-registration-status {
        grid-column: 1 / -1;
        justify-self: stretch;
    }

    .event-registration-button {
        width: 100%;
    }

    .event-registration-status {
        justify-self: start;
    }
}

@media (max-width: 520px) {
    .event-registration-card {
        grid-template-columns: 1fr;
        padding: 22px 20px;
    }

    .event-registration-icon {
        width: 58px;
        height: 58px;
        font-size: 2rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .event-registration-icon {
        animation: none;
    }

    .event-registration-button {
        transition: none;
    }
}


/* ===== MY GAME / GAME EDITOR ===== */

.my-game-card {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 20px;
    margin: 0 0 24px;
    padding: 23px 25px;
    overflow: hidden;
    background:
        radial-gradient(
            circle at 88% 20%,
            color-mix(in srgb, var(--accent) 15%, transparent),
            transparent 35%
        ),
        linear-gradient(
            145deg,
            var(--surface-raised),
            var(--surface)
        );
    border: 1px solid
        color-mix(in srgb, var(--accent) 35%, var(--border));
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.my-game-card::after {
    content: "🎲";
    position: absolute;
    right: -8px;
    bottom: -38px;
    font-size: 8rem;
    line-height: 1;
    opacity: 0.045;
    transform: rotate(12deg);
    pointer-events: none;
}

.my-game-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border: 1px solid
        color-mix(in srgb, var(--accent) 35%, var(--border));
    border-radius: 18px;
    background:
        color-mix(in srgb, var(--accent) 10%, var(--surface-raised));
    font-size: 2rem;
}

.my-game-card-copy {
    min-width: 0;
}

.my-game-card-copy h2 {
    margin: 4px 0 6px;
    font-size: clamp(1.3rem, 2.6vw, 1.8rem);
}

.my-game-card-copy > p:last-child {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.5;
}

.my-game-action {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 17px;
    color: var(--text);
    background:
        color-mix(in srgb, var(--accent) 11%, var(--surface-raised));
    border: 1px solid
        color-mix(in srgb, var(--accent) 32%, var(--border));
    border-radius: 13px;
    text-decoration: none;
    font-size: 0.86rem;
    font-weight: 900;
    white-space: nowrap;
    transition:
        transform 0.18s ease,
        border-color 0.18s ease,
        background 0.18s ease;
}

.my-game-action:hover {
    transform: translateY(-2px);
    border-color:
        color-mix(in srgb, var(--accent) 60%, var(--border));
    background:
        color-mix(in srgb, var(--accent) 16%, var(--surface-raised));
}

.game-editor-page {
    max-width: 880px;
    margin: 0 auto;
}

.game-editor-header {
    margin: 20px 0 22px;
}

.game-editor-header h1 {
    margin: 5px 0 9px;
    font-size: clamp(2rem, 5vw, 3.25rem);
}

.game-editor-secret-note {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
    padding: 15px 17px;
    background:
        color-mix(in srgb, var(--gold) 9%, var(--surface));
    border: 1px solid
        color-mix(in srgb, var(--gold) 31%, var(--border));
    border-radius: 15px;
}

.game-editor-secret-icon {
    flex: 0 0 auto;
    font-size: 1.65rem;
}

.game-editor-secret-note strong {
    display: block;
    margin-bottom: 2px;
}

.game-editor-secret-note p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.84rem;
    line-height: 1.45;
}

.game-editor-form {
    display: grid;
    gap: 21px;
    padding: 25px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.game-editor-field {
    display: grid;
    gap: 8px;
}

.game-editor-field label {
    font-weight: 900;
    font-size: 0.96rem;
}

.game-editor-field-hint {
    color: var(--text-muted);
    font-size: 0.76rem;
}

.game-editor-field input,
.game-editor-field textarea {
    width: 100%;
    box-sizing: border-box;
    color: var(--text);
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: 13px;
    padding: 13px 14px;
    font: inherit;
    line-height: 1.5;
    outline: none;
    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        background 0.18s ease;
}

.game-editor-field textarea {
    min-height: 250px;
    resize: vertical;
}

.game-editor-field input:focus,
.game-editor-field textarea:focus {
    border-color:
        color-mix(in srgb, var(--primary) 60%, var(--border));
    box-shadow: 0 0 0 4px
        color-mix(in srgb, var(--primary) 11%, transparent);
}

.game-editor-field .game-editor-input-error {
    border-color: #c85b4e;
}

.game-editor-error {
    color: #b84a3f;
    font-size: 0.78rem;
    font-weight: 800;
}

html[data-theme="dark"] .game-editor-error {
    color: #f19a8f;
}

.game-editor-error-general {
    padding: 11px 13px;
    background:
        color-mix(in srgb, #c85b4e 10%, var(--surface));
    border: 1px solid
        color-mix(in srgb, #c85b4e 35%, var(--border));
    border-radius: 12px;
}

.game-editor-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    padding-top: 4px;
}

.game-editor-cancel,
.game-editor-save {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 17px;
    border-radius: 13px;
    font: inherit;
    font-size: 0.86rem;
    font-weight: 900;
    text-decoration: none;
}

.game-editor-cancel {
    color: var(--text-muted);
    background: transparent;
    border: 1px solid var(--border);
}

.game-editor-save {
    color: var(--primary-text);
    background:
        linear-gradient(
            135deg,
            var(--primary),
            var(--gold)
        );
    border: 0;
    cursor: pointer;
    box-shadow: 0 9px 22px
        color-mix(in srgb, var(--primary) 23%, transparent);
    transition:
        transform 0.18s ease,
        filter 0.18s ease;
}

.game-editor-save:hover {
    transform: translateY(-2px);
    filter: brightness(1.04);
}

@media (max-width: 720px) {
    .my-game-card {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .my-game-action {
        grid-column: 1 / -1;
        width: 100%;
        box-sizing: border-box;
    }
}

@media (max-width: 520px) {
    .my-game-card {
        grid-template-columns: 1fr;
        padding: 21px 19px;
    }

    .game-editor-form {
        padding: 19px;
    }

    .game-editor-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .game-editor-cancel,
    .game-editor-save {
        width: 100%;
        box-sizing: border-box;
    }
}


/* ===== 7-DAY GAME NAME REVEAL ===== */

.game-reveal-countdown {
    position: relative;
    max-width: 860px;
    margin: 34px auto 0;
    padding: 46px 34px 40px;
    overflow: hidden;
    text-align: center;
    background:
        radial-gradient(
            circle at 50% -10%,
            color-mix(in srgb, var(--gold) 23%, transparent),
            transparent 40%
        ),
        linear-gradient(
            145deg,
            var(--surface-raised),
            var(--surface)
        );
    border: 1px solid
        color-mix(in srgb, var(--gold) 36%, var(--border));
    border-radius: 26px;
    box-shadow: var(--shadow);
}

.game-reveal-countdown::before,
.game-reveal-countdown::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 19%;
    opacity: 0.13;
    background:
        repeating-linear-gradient(
            90deg,
            var(--accent) 0 14px,
            transparent 14px 28px
        );
    pointer-events: none;
}

.game-reveal-countdown::before {
    left: 0;
}

.game-reveal-countdown::after {
    right: 0;
    transform: scaleX(-1);
}

.game-reveal-lock {
    width: 82px;
    height: 82px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 17px;
    border-radius: 24px;
    background:
        color-mix(in srgb, var(--gold) 13%, var(--surface-raised));
    border: 1px solid
        color-mix(in srgb, var(--gold) 38%, var(--border));
    font-size: 2.7rem;
    animation:
        game-reveal-lock-float
        3s
        ease-in-out
        infinite;
}

.game-reveal-countdown h2 {
    margin: 6px 0 10px;
    font-size: clamp(1.8rem, 4vw, 2.7rem);
}

.game-reveal-countdown-copy {
    max-width: 610px;
    margin: 0 auto;
    color: var(--text-muted);
    line-height: 1.55;
}

.game-reveal-timer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 31px auto 22px;
}

.game-reveal-time-box {
    min-width: 96px;
    padding: 16px 13px 12px;
    background:
        color-mix(in srgb, var(--primary) 6%, var(--surface-raised));
    border: 1px solid var(--border);
    border-radius: 15px;
    box-shadow:
        0 8px 18px
        color-mix(in srgb, var(--text) 7%, transparent);
}

.game-reveal-time-box strong {
    display: block;
    font-size: clamp(1.8rem, 5vw, 2.75rem);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.game-reveal-time-box span {
    display: block;
    margin-top: 7px;
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.09em;
}

.game-reveal-time-separator {
    color: var(--gold);
    font-size: 2rem;
    font-weight: 900;
    transform: translateY(-8px);
}

.game-reveal-date {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.82rem;
}


/* Reveal curtain */

.game-reveal-curtain[hidden] {
    display: none;
}

.game-reveal-curtain {
    position: fixed;
    z-index: 9999;
    inset: 0;
    display: flex;
    align-items: stretch;
    justify-content: stretch;
    background: #090707;
    opacity: 0;
    transition: opacity 0.35s ease;
}

.game-reveal-curtain-visible {
    opacity: 1;
}

.game-reveal-stage {
    position: relative;
    width: 100%;
    min-height: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(
            ellipse at 50% 65%,
            #3b2d17 0,
            #120e0b 42%,
            #050404 76%
        );
}

.game-reveal-spotlight {
    position: absolute;
    top: -16%;
    left: 50%;
    width: min(600px, 80vw);
    height: 115%;
    transform: translateX(-50%);
    clip-path: polygon(42% 0, 58% 0, 100% 100%, 0 100%);
    background:
        linear-gradient(
            180deg,
            rgba(255, 232, 157, 0.34),
            rgba(255, 214, 96, 0.08) 72%,
            transparent
        );
    filter: blur(9px);
    opacity: 0;
    transition: opacity 1s ease 1.1s;
}

.game-reveal-curtain-open .game-reveal-spotlight {
    opacity: 1;
}

.game-reveal-curtain-panel {
    position: absolute;
    z-index: 3;
    top: 0;
    bottom: 0;
    width: 53%;
    background:
        repeating-linear-gradient(
            90deg,
            #721f27 0 5%,
            #a3343f 5% 10%,
            #5c1720 10% 15%
        );
    box-shadow:
        inset 0 0 40px rgba(0, 0, 0, 0.5),
        0 0 30px rgba(0, 0, 0, 0.65);
    transition:
        transform
        2.1s
        cubic-bezier(0.65, 0, 0.35, 1);
}

.game-reveal-curtain-left {
    left: 0;
    transform-origin: left center;
}

.game-reveal-curtain-right {
    right: 0;
    transform-origin: right center;
}

.game-reveal-curtain-open .game-reveal-curtain-left {
    transform: translateX(-92%);
}

.game-reveal-curtain-open .game-reveal-curtain-right {
    transform: translateX(92%);
}

.game-reveal-curtain-valance {
    position: absolute;
    z-index: 5;
    top: 0;
    left: 0;
    right: 0;
    height: 18vh;
    min-height: 100px;
    background:
        repeating-linear-gradient(
            90deg,
            #681a23 0 5%,
            #96313b 5% 10%,
            #57161e 10% 15%
        );
    border-radius: 0 0 50% 50%;
    box-shadow:
        0 12px 25px rgba(0, 0, 0, 0.55);
    transition:
        transform
        1.7s
        cubic-bezier(0.65, 0, 0.35, 1)
        0.2s;
}

.game-reveal-curtain-open .game-reveal-curtain-valance {
    transform: translateY(-70%);
}

.game-reveal-stage-copy {
    position: relative;
    z-index: 2;
    max-width: 760px;
    padding: 30px;
    text-align: center;
    color: #fff8e5;
    opacity: 0;
    transform: translateY(24px) scale(0.96);
    transition:
        opacity 0.8s ease 1.4s,
        transform 0.8s ease 1.4s;
}

.game-reveal-curtain-open .game-reveal-stage-copy {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.game-reveal-stage-icon {
    display: block;
    margin-bottom: 12px;
    font-size: clamp(3.6rem, 11vw, 7.5rem);
    animation:
        game-reveal-icon-pop
        1.3s
        ease-in-out
        infinite alternate;
}

.game-reveal-stage-copy .eyebrow {
    color: #ffd772;
}

.game-reveal-stage-copy h2 {
    margin: 7px 0 10px;
    font-size: clamp(2rem, 6vw, 4.7rem);
    text-shadow:
        0 5px 25px rgba(0, 0, 0, 0.75);
}

.game-reveal-stage-copy p:last-child {
    margin: 0;
    color: rgba(255, 248, 229, 0.8);
    font-size: clamp(0.95rem, 2.2vw, 1.2rem);
}

.game-reveal-curtain-finish {
    opacity: 0;
    pointer-events: none;
}


/* Revealed game cards */

.revealed-games-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px;
    margin: 30px 0 21px;
}

.revealed-games-header h2 {
    margin: 4px 0 6px;
    font-size: clamp(1.7rem, 4vw, 2.45rem);
}

.revealed-games-header p:last-child {
    max-width: 650px;
    margin-bottom: 0;
}

.revealed-games-badge {
    flex: 0 0 auto;
    padding: 9px 12px;
    border:
        1px solid
        color-mix(in srgb, var(--gold) 40%, var(--border));
    border-radius: 999px;
    background:
        color-mix(in srgb, var(--gold) 11%, var(--surface));
    color: var(--text);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.06em;
}

.revealed-games-grid {
    display: grid;
    grid-template-columns:
        repeat(auto-fit, minmax(235px, 1fr));
    gap: 16px;
}

.revealed-game-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 260px;
    padding: 20px;
    overflow: hidden;
    color: var(--text);
    background:
        linear-gradient(
            145deg,
            var(--surface-raised),
            var(--surface)
        );
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow:
        0 10px 22px
        color-mix(in srgb, var(--text) 5%, transparent);
    text-decoration: none;
    transition:
        transform 0.18s ease,
        border-color 0.18s ease,
        box-shadow 0.18s ease;
}

.revealed-game-card::after {
    content: "🎲";
    position: absolute;
    right: -14px;
    bottom: -27px;
    font-size: 6.8rem;
    opacity: 0.045;
    transform: rotate(16deg);
    pointer-events: none;
}

.revealed-game-card:hover {
    transform: translateY(-4px);
    border-color:
        color-mix(in srgb, var(--primary) 45%, var(--border));
    box-shadow:
        0 15px 30px
        color-mix(in srgb, var(--text) 9%, transparent);
}

.revealed-game-card-own {
    border-color:
        color-mix(in srgb, var(--gold) 48%, var(--border));
    background:
        radial-gradient(
            circle at 100% 0,
            color-mix(in srgb, var(--gold) 13%, transparent),
            transparent 43%
        ),
        linear-gradient(
            145deg,
            var(--surface-raised),
            var(--surface)
        );
}

.revealed-game-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 28px;
}

.revealed-game-number {
    color: var(--text-muted);
    font-size: 0.74rem;
    font-weight: 900;
}

.revealed-game-own-badge {
    padding: 5px 8px;
    color: var(--text);
    background:
        color-mix(in srgb, var(--gold) 13%, var(--surface));
    border:
        1px solid
        color-mix(in srgb, var(--gold) 38%, var(--border));
    border-radius: 999px;
    font-size: 0.66rem;
    font-weight: 900;
}

.revealed-game-icon {
    margin: 16px 0 9px;
    font-size: 2.2rem;
}

.revealed-game-card h3 {
    margin: 0;
    font-size: 1.35rem;
    line-height: 1.22;
}

.revealed-game-creator {
    margin: 6px 0 14px;
    color: var(--text-muted);
    font-size: 0.82rem;
}

.revealed-game-secret,
.revealed-game-winner {
    margin: 0 0 16px;
    font-size: 0.78rem;
}

.revealed-game-secret {
    color: var(--text-muted);
}

.revealed-game-winner {
    color:
        color-mix(in srgb, var(--gold) 75%, var(--text));
    font-weight: 800;
}

.revealed-game-open {
    margin-top: auto;
    font-size: 0.78rem;
    font-weight: 900;
}


/* Reveal animations */

@keyframes game-reveal-lock-float {
    0%,
    100% {
        transform: translateY(0) rotate(-2deg);
    }

    50% {
        transform: translateY(-5px) rotate(2deg);
    }
}

@keyframes game-reveal-icon-pop {
    from {
        transform: scale(0.95) rotate(-3deg);
    }

    to {
        transform: scale(1.05) rotate(3deg);
    }
}


@media (max-width: 700px) {
    .game-reveal-countdown {
        padding: 36px 18px 32px;
    }

    .game-reveal-timer {
        gap: 5px;
    }

    .game-reveal-time-box {
        min-width: 0;
        flex: 1 1 0;
        padding: 13px 6px 10px;
    }

    .game-reveal-time-separator {
        font-size: 1.4rem;
    }

    .revealed-games-header {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 470px) {
    .game-reveal-time-box strong {
        font-size: 1.55rem;
    }

    .game-reveal-time-box span {
        font-size: 0.57rem;
    }

    .game-reveal-time-separator {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .game-reveal-lock,
    .game-reveal-stage-icon {
        animation: none;
    }

    .game-reveal-curtain,
    .game-reveal-curtain-panel,
    .game-reveal-curtain-valance,
    .game-reveal-stage-copy,
    .game-reveal-spotlight {
        transition: none;
    }
}


/* ===== SCORE TABLE: FIXED RANK + PLAYER COLUMNS ===== */

.table-wrapper {
    position: relative;
}

.score-table {
    --score-rank-width: 78px;
    --score-player-width: 165px;
}

.score-table .score-sticky-rank,
.score-table .score-sticky-player {
    position: sticky;
    background: var(--surface);
}

.score-table .score-sticky-rank {
    left: 0;
    z-index: 3;
    width: var(--score-rank-width);
    min-width: var(--score-rank-width);
    max-width: var(--score-rank-width);
}

.score-table .score-sticky-player {
    left: var(--score-rank-width);
    z-index: 3;
    width: var(--score-player-width);
    min-width: var(--score-player-width);
    max-width: var(--score-player-width);
    box-shadow:
        12px 0 18px -18px
        color-mix(in srgb, var(--text) 65%, transparent);
}

.score-table thead .score-sticky-rank,
.score-table thead .score-sticky-player {
    z-index: 6;
    background:
        color-mix(
            in srgb,
            var(--primary) 7%,
            var(--surface)
        );
}

.score-table tbody tr:hover .score-sticky-rank,
.score-table tbody tr:hover .score-sticky-player {
    background:
        color-mix(
            in srgb,
            var(--primary) 8%,
            var(--surface)
        );
}

.score-table tbody tr:first-child .score-sticky-rank,
.score-table tbody tr:first-child .score-sticky-player {
    background:
        color-mix(
            in srgb,
            var(--gold) 14%,
            var(--surface)
        );
}

.score-table tbody tr:last-child .score-sticky-rank,
.score-table tbody tr:last-child .score-sticky-player {
    border-bottom: 0;
}

@media (max-width: 700px) {
    .score-table {
        --score-rank-width: 64px;
        --score-player-width: 138px;
    }

    .score-table th,
    .score-table td {
        padding-left: 12px;
        padding-right: 12px;
    }
}


/* ===== LIVE GAME FLOW: DESCRIPTION REVEAL + RESULTS ===== */

.game-live-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    margin: 24px 0;
    padding: 32px;
    overflow: hidden;
    background:
        radial-gradient(
            circle at 100% 0,
            color-mix(in srgb, var(--gold) 15%, transparent),
            transparent 42%
        ),
        linear-gradient(
            145deg,
            var(--surface-raised),
            var(--surface)
        );
    border: 1px solid var(--border);
    border-radius: 22px;
    box-shadow: var(--shadow);
}

.game-live-hero h1 {
    margin: 4px 0 8px;
    font-size: clamp(2.15rem, 5vw, 4rem);
}

.game-live-byline {
    margin: 0;
    color: var(--text-muted);
}

.game-live-hero-icon {
    flex: 0 0 auto;
    font-size: clamp(4.2rem, 10vw, 7rem);
    transform: rotate(8deg);
    filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.15));
}

.game-live-statuses {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.game-live-status {
    padding: 7px 10px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--background);
    font-size: 0.73rem;
    font-weight: 800;
}

.game-live-status-revealed,
.game-live-status-complete {
    border-color:
        color-mix(in srgb, #39a66b 42%, var(--border));
}

.game-live-status-secret {
    border-color:
        color-mix(in srgb, var(--gold) 44%, var(--border));
}

.game-live-status-own {
    border-color:
        color-mix(in srgb, var(--primary) 45%, var(--border));
}

.game-rules-card,
.game-results-card {
    margin-top: 18px;
}

.game-rules-heading,
.game-results-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
}

.game-rules-heading h2,
.game-results-heading h2 {
    margin-top: 4px;
}

.game-secret-chip,
.game-result-count {
    flex: 0 0 auto;
    padding: 7px 10px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 900;
}

.game-secret-chip {
    background:
        color-mix(in srgb, var(--gold) 13%, var(--surface));
    border:
        1px solid
        color-mix(in srgb, var(--gold) 38%, var(--border));
}

.game-result-count {
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.game-rules-text {
    margin-top: 22px;
    line-height: 1.7;
}

.game-rules-text p:last-child {
    margin-bottom: 0;
}

.game-live-action-panel,
.game-live-next-step {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-top: 24px;
    padding: 20px;
    background:
        color-mix(in srgb, var(--gold) 8%, var(--background));
    border:
        1px solid
        color-mix(in srgb, var(--gold) 35%, var(--border));
    border-radius: 16px;
}

.game-live-action-panel p,
.game-live-next-step p {
    margin: 4px 0 0;
}

.game-live-next-step {
    margin: 18px 0 0;
    background:
        color-mix(in srgb, var(--primary) 7%, var(--surface));
    border-color:
        color-mix(in srgb, var(--primary) 30%, var(--border));
}

.game-live-next-step h2 {
    margin: 4px 0 0;
}

.game-reveal-button,
.game-results-button {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 11px 16px;
    border: 0;
    border-radius: 11px;
    font: inherit;
    font-size: 0.85rem;
    font-weight: 900;
    text-decoration: none;
    cursor: pointer;
    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease;
}

.game-reveal-button {
    background: var(--gold);
    color: #251b08;
}

.game-results-button {
    background: var(--primary);
    color: #fff;
}

.game-reveal-button:hover,
.game-results-button:hover {
    transform: translateY(-2px);
    box-shadow:
        0 9px 18px
        color-mix(in srgb, var(--text) 12%, transparent);
}

.game-locked-card {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 18px;
}

.game-locked-card h2 {
    margin: 4px 0 7px;
}

.game-locked-icon {
    flex: 0 0 auto;
    font-size: 3rem;
}

.game-result-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 20px;
}

.game-result-row {
    display: grid;
    grid-template-columns: 56px 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 13px 15px;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.game-result-row:first-child {
    border-color:
        color-mix(in srgb, var(--gold) 48%, var(--border));
    background:
        color-mix(in srgb, var(--gold) 9%, var(--background));
}

.game-result-row-creator {
    opacity: 0.72;
    border-style: dashed;
}

.game-result-place {
    font-weight: 900;
    font-size: 1.05rem;
    text-align: center;
}

.game-result-player {
    font-weight: 800;
}

.game-result-player span {
    display: block;
    margin-top: 2px;
    color: var(--text-muted);
    font-size: 0.68rem;
    font-weight: 600;
}

.game-result-points {
    min-width: 78px;
    text-align: right;
    font-size: 1.15rem;
    font-weight: 900;
}

.game-result-points span {
    display: block;
    color: var(--text-muted);
    font-size: 0.62rem;
    font-weight: 700;
}

.game-results-empty {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 20px;
    padding: 20px;
    background: var(--background);
    border: 1px dashed var(--border);
    border-radius: 13px;
}

.game-results-empty > span {
    font-size: 2rem;
}

.game-results-empty p {
    margin: 3px 0 0;
    color: var(--text-muted);
}

.game-result-editor {
    max-width: 820px;
    margin: 24px auto 0;
}

.game-result-form {
    margin-top: 22px;
}

.game-result-editor-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.game-result-editor-row {
    display: grid;
    grid-template-columns: 1fr auto 125px;
    align-items: center;
    gap: 14px;
    padding: 15px 17px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 13px;
}

.game-result-editor-player {
    display: flex;
    align-items: center;
    gap: 11px;
}

.game-result-editor-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 37px;
    height: 37px;
    border-radius: 10px;
    background:
        color-mix(in srgb, var(--primary) 8%, var(--background));
}

.game-result-editor-row label {
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 800;
}

.game-result-editor-row select {
    width: 100%;
    padding: 10px 12px;
    background: var(--background);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 9px;
    font: inherit;
    font-weight: 800;
}

.game-result-points-note {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 18px;
    padding: 15px 17px;
    color: var(--text-muted);
    background:
        color-mix(in srgb, var(--gold) 7%, var(--surface));
    border:
        1px solid
        color-mix(in srgb, var(--gold) 25%, var(--border));
    border-radius: 12px;
    font-size: 0.8rem;
}

.game-result-points-note strong {
    color: var(--text);
}

.game-result-errors {
    margin: 18px 0;
    padding: 14px 16px;
    border: 1px solid
        color-mix(in srgb, #c64c4c 42%, var(--border));
    border-radius: 11px;
    background:
        color-mix(in srgb, #c64c4c 8%, var(--surface));
}

.game-result-errors p {
    margin: 0;
}

.game-result-errors p + p {
    margin-top: 5px;
}

@media (max-width: 700px) {
    .game-live-hero,
    .game-live-action-panel,
    .game-live-next-step {
        align-items: flex-start;
        flex-direction: column;
    }

    .game-live-hero-icon {
        display: none;
    }

    .game-reveal-button,
    .game-results-button {
        width: 100%;
    }

    .game-live-action-panel form {
        width: 100%;
    }

    .game-result-editor-row {
        grid-template-columns: 1fr 100px;
    }

    .game-result-editor-row label {
        display: none;
    }

    .game-result-editor-player {
        min-width: 0;
    }
}


/* ===== MEMBER LOGOUT ===== */

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logout-form {
    margin: 0;
}

.logout-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--surface);
    color: var(--text-muted);
    font: inherit;
    font-size: 0.82rem;
    font-weight: 800;
    cursor: pointer;
    transition:
        color 0.18s ease,
        background 0.18s ease,
        border-color 0.18s ease,
        transform 0.18s ease;
}

.logout-button:hover {
    color: var(--text);
    background:
        color-mix(
            in srgb,
            var(--accent) 9%,
            var(--surface)
        );
    border-color:
        color-mix(
            in srgb,
            var(--accent) 38%,
            var(--border)
        );
    transform: translateY(-1px);
}

@media (max-width: 700px) {
    .topbar-actions {
        margin-left: auto;
    }

    .logout-button {
        padding-inline: 10px;
    }

    .logout-button-label {
        display: none;
    }
}
