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

:root {
    --bg-deep: #120b0f;
    --bg-mid: #2b1218;
    --bg-glow: #5d1521;
    --gold: #f5c96a;
    --gold-dark: #b7832f;
    --crimson: #b20c2a;
    --ink: #f8f1e2;
    --muted: rgba(248, 241, 226, 0.7);
    --shadow: rgba(0, 0, 0, 0.5);
}

body {
    font-family: "Outfit", sans-serif;
    color: var(--ink);
    min-height: 100vh;
    background:
        radial-gradient(circle at top, rgba(245, 201, 106, 0.25), transparent 55%),
        radial-gradient(circle at 20% 40%, rgba(178, 12, 42, 0.35), transparent 55%),
        radial-gradient(circle at 80% 10%, rgba(93, 21, 33, 0.7), transparent 60%),
        linear-gradient(135deg, var(--bg-deep), var(--bg-mid));
    display: flex;
    justify-content: center;
    padding: 40px 20px 120px;
}

.page {
    width: min(1100px, 100%);
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.masthead {
    display: flex;
    gap: 18px;
    align-items: center;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(245, 201, 106, 0.3);
    border-radius: 16px;
    padding: 22px 28px;
    box-shadow: 0 18px 40px var(--shadow);
}

.crest {
    font-family: "Cinzel", serif;
    font-size: 32px;
    font-weight: 800;
    height: 56px;
    width: 56px;
    border-radius: 50%;
    background: radial-gradient(circle at top, #ffe2a3, var(--gold));
    color: #2c1a0f;
    display: grid;
    place-items: center;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.eyebrow {
    letter-spacing: 0.32em;
    text-transform: uppercase;
    font-size: 12px;
    color: var(--muted);
}

h1 {
    font-family: "Cinzel", serif;
    font-size: clamp(32px, 4vw, 46px);
    margin-top: 6px;
}

.subtitle {
    color: var(--muted);
    margin-top: 6px;
}

main {
    display: grid;
    gap: 24px;
}

.panel {
    background: rgba(10, 7, 9, 0.55);
    border: 1px solid rgba(245, 201, 106, 0.25);
    border-radius: 18px;
    padding: 28px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
}

.panel-header h2 {
    font-family: "Cinzel", serif;
    font-size: clamp(22px, 3vw, 30px);
}

.panel-header p {
    margin-top: 8px;
    color: var(--muted);
}

.input-row {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    flex-wrap: wrap;
}

input {
    flex: 1;
    min-width: 220px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(245, 201, 106, 0.3);
    background: rgba(255, 255, 255, 0.05);
    color: var(--ink);
    font-size: 16px;
}

input:focus {
    outline: 2px solid var(--gold);
    border-color: transparent;
}

.btn {
    border: none;
    border-radius: 999px;
    padding: 12px 22px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.btn-gold {
    background: linear-gradient(140deg, #ffe4a1, var(--gold-dark));
    color: #2c1a0f;
}

.btn-crimson {
    background: linear-gradient(140deg, #f5324d, var(--crimson));
    color: #fff4f6;
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.08);
    color: var(--ink);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.list-wrap {
    margin-top: 24px;
}

.list-wrap h3 {
    font-size: 18px;
    margin-bottom: 12px;
}

.student-list {
    list-style: none;
    display: grid;
    gap: 10px;
    max-height: 260px;
    overflow-y: auto;
    padding-right: 6px;
}

.student-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 10px 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.student-list button {
    background: none;
    border: none;
    color: var(--gold);
    cursor: pointer;
}

.actions {
    margin-top: 24px;
}

.site-footer {
    margin-top: 4px;
    text-align: center;
}

.site-footer a {
    color: var(--gold);
    text-decoration: none;
    border-bottom: 1px solid rgba(245, 201, 106, 0.45);
    padding-bottom: 2px;
}

.site-footer a:hover {
    color: #ffe4a1;
}

.cookie-notice {
    position: fixed;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: min(880px, calc(100% - 28px));
    background: rgba(0, 0, 0, 0.86);
    border: 1px solid rgba(245, 201, 106, 0.5);
    border-radius: 14px;
    padding: 14px;
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    z-index: 60;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
}

.cookie-notice p {
    margin: 0;
    color: var(--ink);
    line-height: 1.4;
}

.cookie-notice a {
    color: var(--gold);
}

.cookie-notice .btn {
    white-space: nowrap;
}

.wheel-stage {
    margin-top: 18px;
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(200px, 280px);
    gap: 24px;
    align-items: center;
}

.wheel-frame {
    position: relative;
    display: grid;
    place-items: center;
    padding: 20px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(245, 201, 106, 0.2), rgba(0, 0, 0, 0.2));
    box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.6), 0 20px 40px rgba(0, 0, 0, 0.4);
}

canvas {
    max-width: 100%;
    height: auto;
    filter: drop-shadow(0 12px 25px rgba(0, 0, 0, 0.6));
}

.pointer {
    position: absolute;
    top: 8px;
    width: 0;
    height: 0;
    border-left: 18px solid transparent;
    border-right: 18px solid transparent;
    border-top: 32px solid var(--gold);
    filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.6));
}

.wheel-controls {
    display: grid;
    gap: 14px;
}

.status-label {
    letter-spacing: 0.2em;
    text-transform: uppercase;
    font-size: 12px;
    color: var(--muted);
}

.count {
    font-family: "Cinzel", serif;
    font-size: 32px;
}

.winners {
    margin-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 18px;
}

.winner {
    font-family: "Cinzel", serif;
    font-size: clamp(22px, 3vw, 30px);
    margin-top: 10px;
}

.pomp {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle, rgba(178, 12, 42, 0.9), rgba(0, 0, 0, 0.92));
    display: grid;
    place-items: center;
    z-index: 20;
    animation: fadeIn 0.4s ease;
}

.pomp-inner {
    text-align: center;
    padding: 40px 50px;
    border-radius: 24px;
    border: 2px solid rgba(245, 201, 106, 0.5);
    background: rgba(0, 0, 0, 0.45);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
}

.pomp-label {
    font-family: "Cinzel", serif;
    font-size: 18px;
    letter-spacing: 0.5em;
    text-transform: uppercase;
    color: var(--muted);
}

.pomp-name {
    font-family: "Cinzel", serif;
    font-size: clamp(40px, 6vw, 60px);
    margin: 18px 0 12px;
    color: var(--gold);
    text-shadow: 0 12px 25px rgba(0, 0, 0, 0.5);
}

.pomp-sub {
    color: var(--muted);
}

.pomp-actions {
    margin-top: 20px;
}

.sparks {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.spark {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    animation: spark 1.2s ease-out forwards;
}

.legal-page .panel h2 {
    font-family: "Cinzel", serif;
    margin-bottom: 10px;
    margin-top: 26px;
    font-size: clamp(24px, 3vw, 32px);
}

.legal-page .panel h2:first-child {
    margin-top: 0;
}

.legal-page .panel h3 {
    margin-top: 16px;
    margin-bottom: 8px;
    font-size: 18px;
}

.legal-page .panel p {
    line-height: 1.6;
    color: var(--ink);
}

.hidden {
    display: none;
}

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

@keyframes spark {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(var(--x), var(--y)) scale(0.2);
        opacity: 0;
    }
}

@media (max-width: 900px) {
    .wheel-stage {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .cookie-notice {
        flex-direction: column;
        align-items: stretch;
    }

    .cookie-notice .btn {
        width: 100%;
    }
}

@media (max-width: 600px) {
    body {
        padding: 24px 14px 110px;
    }

    .masthead {
        flex-direction: column;
        align-items: flex-start;
    }

    .panel {
        padding: 22px;
    }
}
