:root {
    --red-950: #69000e;
    --red-900: #8f0015;
    --red-800: #b00018;
    --red-700: #c8102e;
    --gold-500: #ffd447;
    --gold-600: #f4aa1b;
    --cream: #fff8ec;
    --white: #ffffff;
    --ink: #26120e;
    --muted: #72544b;
    --green: #0f8a3b;
    --blue: #1455b8;
    --line: rgba(105, 0, 14, 0.18);
    --shadow: 0 18px 50px rgba(75, 0, 10, 0.18);
    --radius: 8px;
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        linear-gradient(90deg, rgba(15, 138, 59, 0.08), transparent 22%, transparent 78%, rgba(20, 85, 184, 0.08)),
        var(--cream);
    color: var(--ink);
    font-family: Arial, Helvetica, sans-serif;
    letter-spacing: 0;
}

button,
input {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

h1,
h2,
p {
    margin-top: 0;
}

.page-shell {
    display: grid;
    grid-template-rows: auto 1fr;
    min-height: 100vh;
}

.hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    overflow: hidden;
    padding: clamp(24px, 4vw, 44px) clamp(16px, 5vw, 56px);
    background: linear-gradient(135deg, var(--red-950), var(--red-700) 56%, var(--red-900));
    color: var(--white);
}

.hero::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 8px;
    background: linear-gradient(90deg, var(--green) 0 25%, var(--gold-500) 25% 72%, var(--blue) 72% 100%);
}

.hero__content {
    position: relative;
    z-index: 1;
}

.event-tag {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    color: var(--gold-500);
    font-size: 0.84rem;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.hero h1,
.login-card h1,
.admin-header h1 {
    margin-bottom: 10px;
    font-size: clamp(2.5rem, 8vw, 5.6rem);
    line-height: 0.92;
}

.hero p {
    max-width: 760px;
    margin-bottom: 0;
    color: var(--gold-500);
    font-size: clamp(1.18rem, 3vw, 2rem);
    font-weight: 900;
    line-height: 1.12;
}

.hero__stage {
    position: relative;
    display: grid;
    grid-template-columns: repeat(2, 64px);
    gap: 16px;
    align-items: center;
    min-width: 180px;
}

.spotlight {
    position: absolute;
    inset: -38px -22px;
    border: 2px solid rgba(255, 212, 71, 0.5);
    border-radius: 50%;
    transform: rotate(-12deg);
}

.wheel-section {
    display: grid;
    place-items: center;
    width: min(1120px, calc(100% - 28px));
    margin: 0 auto;
    padding: clamp(18px, 4vw, 34px) 0 clamp(28px, 5vw, 48px);
}

.wheel-card {
    display: grid;
    justify-items: center;
    width: 100%;
}

.wheel-wrap {
    position: relative;
    display: grid;
    place-items: center;
    width: min(82vh, 760px, 100%);
    aspect-ratio: 1 / 1;
    margin-bottom: clamp(16px, 3vw, 24px);
}

.wheel-wrap canvas {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--cream);
    filter: drop-shadow(0 18px 28px rgba(105, 0, 14, 0.28));
}

.wheel-pointer {
    position: absolute;
    z-index: 4;
    top: -7px;
    left: 50%;
    width: clamp(38px, 6vw, 54px);
    height: clamp(54px, 8vw, 74px);
    border: 4px solid var(--red-950);
    background: var(--gold-500);
    clip-path: polygon(50% 100%, 0 0, 100% 0);
    transform: translateX(-50%);
    filter: drop-shadow(0 8px 10px rgba(70, 0, 10, 0.22));
}

.wheel-center {
    position: absolute;
    z-index: 3;
    display: grid;
    place-items: center;
    width: clamp(92px, 21%, 150px);
    aspect-ratio: 1 / 1;
    border: 8px solid var(--gold-500);
    border-radius: 50%;
    background: var(--red-700);
    color: var(--white);
    box-shadow: 0 10px 24px rgba(75, 0, 10, 0.28);
    text-align: center;
}

.wheel-center span {
    font-size: clamp(1rem, 2.5vw, 1.35rem);
    font-weight: 900;
    line-height: 1;
    text-transform: uppercase;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    width: min(620px, 100%);
}

.spin-button,
.again-button,
.save-button,
.small-button,
.remove-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    border: 0;
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 900;
    text-decoration: none;
    transition: transform 160ms ease, opacity 160ms ease, box-shadow 160ms ease;
}

.spin-button {
    min-height: 62px;
    width: min(420px, 100%);
    background: var(--red-700);
    color: var(--white);
    box-shadow: 0 12px 24px rgba(200, 16, 46, 0.28);
    font-size: clamp(1.05rem, 3vw, 1.35rem);
}

.again-button,
.small-button {
    padding: 0 20px;
    background: var(--gold-500);
    color: var(--red-950);
}

.spin-button:not(:disabled):hover,
.again-button:hover,
.save-button:hover,
.small-button:hover,
.remove-button:hover {
    transform: translateY(-1px);
}

.spin-button:disabled {
    cursor: not-allowed;
    opacity: 0.56;
    box-shadow: none;
}

.status-message {
    min-height: 32px;
    margin: 16px 0 0;
    color: var(--red-800);
    font-size: clamp(1.2rem, 3vw, 1.7rem);
    font-weight: 900;
    text-align: center;
}

.result-box,
.empty-state {
    width: min(720px, 100%);
    border: 3px solid var(--gold-500);
    border-radius: var(--radius);
    background: var(--white);
    color: var(--red-800);
    padding: clamp(16px, 3vw, 24px);
    box-shadow: var(--shadow);
    font-size: clamp(1.4rem, 4vw, 2.3rem);
    font-weight: 900;
    line-height: 1.15;
    text-align: center;
}

.result-box strong {
    color: var(--red-950);
}

.empty-state {
    margin-bottom: 18px;
    font-size: clamp(1.1rem, 3vw, 1.5rem);
}

.confetti-layer {
    position: fixed;
    z-index: 30;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.confetti-piece {
    position: absolute;
    top: -24px;
    width: 10px;
    height: 18px;
    border-radius: 2px;
    animation: confetti-fall 1500ms ease-out forwards;
}

@keyframes confetti-fall {
    to {
        transform: translate(var(--drift), 112vh) rotate(720deg);
        opacity: 0;
    }
}

.icon {
    position: relative;
    display: inline-flex;
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
}

.hero__stage .icon {
    width: 64px;
    height: 64px;
}

.icon--ball {
    border: 2px solid #171717;
    border-radius: 50%;
    background: var(--white);
}

.icon--ball::before {
    content: "";
    position: absolute;
    inset: 8px;
    background: #171717;
    clip-path: polygon(50% 0, 100% 36%, 82% 100%, 18% 100%, 0 36%);
}

.icon--ball::after {
    content: "";
    position: absolute;
    inset: 4px;
    border: 1px solid #171717;
    border-radius: 50%;
}

.icon--note::before,
.icon--note::after {
    content: "";
    position: absolute;
    background: var(--gold-500);
}

.icon--note::before {
    width: 8px;
    height: 19px;
    right: 7px;
    top: 1px;
    border-radius: 4px;
}

.icon--note::after {
    width: 16px;
    height: 10px;
    right: 10px;
    bottom: 3px;
    border-radius: 50%;
}

.icon--mic {
    justify-content: center;
}

.icon--mic::before {
    content: "";
    width: 45%;
    height: 72%;
    border: 5px solid var(--red-950);
    border-radius: 999px;
    background: var(--gold-500);
}

.icon--mic::after {
    content: "";
    position: absolute;
    bottom: 2px;
    width: 58%;
    height: 28%;
    border-bottom: 5px solid var(--gold-500);
    border-left: 5px solid var(--gold-500);
    border-right: 5px solid var(--gold-500);
    border-radius: 0 0 18px 18px;
}

.icon--plate {
    border: 6px solid var(--white);
    border-radius: 50%;
    background: var(--gold-500);
}

.icon--plate::before {
    content: "";
    position: absolute;
    inset: 13px;
    border: 4px solid var(--red-700);
    border-radius: 50%;
}

.admin-page {
    background:
        linear-gradient(90deg, rgba(200, 16, 46, 0.08), transparent 50%, rgba(244, 170, 27, 0.12)),
        var(--cream);
}

.login-shell {
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: 22px;
}

.login-card,
.admin-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow);
}

.login-card {
    width: min(430px, 100%);
    padding: clamp(22px, 5vw, 34px);
}

.login-card h1 {
    color: var(--red-800);
    font-size: clamp(2.1rem, 8vw, 3.4rem);
}

.login-card p {
    color: var(--muted);
    line-height: 1.5;
}

.login-form,
.admin-card form {
    display: grid;
    gap: 14px;
}

.login-form label,
.prize-name {
    display: grid;
    gap: 7px;
    color: var(--red-950);
    font-weight: 900;
}

.login-form input,
.prize-name input {
    width: 100%;
    min-height: 46px;
    border: 1px solid rgba(105, 0, 14, 0.25);
    border-radius: var(--radius);
    background: var(--white);
    color: var(--ink);
    padding: 10px 12px;
    outline: none;
}

.login-form input:focus,
.prize-name input:focus {
    border-color: var(--red-700);
    box-shadow: 0 0 0 3px rgba(255, 212, 71, 0.36);
}

.notice {
    margin: 14px 0;
    border-radius: var(--radius);
    padding: 12px 14px;
    font-size: 0.94rem;
    font-weight: 800;
    line-height: 1.4;
}

.notice--error {
    border: 1px solid rgba(200, 16, 46, 0.28);
    background: rgba(200, 16, 46, 0.09);
    color: var(--red-800);
}

.notice--success {
    border: 1px solid rgba(15, 138, 59, 0.26);
    background: rgba(15, 138, 59, 0.1);
    color: #086b2c;
}

.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 24px clamp(16px, 5vw, 42px);
    background: var(--red-800);
    color: var(--white);
}

.admin-header h1 {
    margin: 0;
    font-size: clamp(1.8rem, 4vw, 3rem);
}

.admin-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.admin-nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: var(--radius);
    color: var(--white);
    padding: 0 14px;
    font-weight: 900;
    text-decoration: none;
}

.admin-shell {
    width: min(980px, calc(100% - 28px));
    margin: 24px auto 48px;
}

.admin-card {
    padding: clamp(16px, 3vw, 24px);
}

.admin-card__heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
}

.admin-card h2 {
    margin-bottom: 4px;
    color: var(--red-800);
}

.admin-card p {
    margin-bottom: 0;
    color: var(--muted);
}

.prize-list {
    display: grid;
    gap: 10px;
}

.prize-row {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) 110px 90px;
    gap: 10px;
    align-items: end;
    border: 1px solid rgba(105, 0, 14, 0.12);
    border-radius: var(--radius);
    background: var(--white);
    padding: 12px;
}

.toggle-line {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    color: var(--red-950);
    font-weight: 900;
}

.toggle-line input {
    width: 21px;
    height: 21px;
    accent-color: var(--red-700);
}

.remove-button {
    background: var(--red-950);
    color: var(--white);
}

.save-button {
    width: min(320px, 100%);
    margin-top: 8px;
    background: var(--red-700);
    color: var(--white);
}

@media (max-width: 840px) {
    .hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .hero__stage {
        grid-template-columns: repeat(2, 52px);
        min-width: 140px;
    }

    .hero__stage .icon {
        width: 52px;
        height: 52px;
    }

    .admin-header,
    .admin-card__heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .prize-row {
        grid-template-columns: 1fr;
    }

    .toggle-line {
        justify-content: flex-start;
    }
}

@media (max-width: 560px) {
    .hero h1 {
        font-size: clamp(2.2rem, 15vw, 3.4rem);
    }

    .wheel-wrap {
        width: min(100%, 88vh);
    }

    .actions {
        display: grid;
    }

    .spin-button,
    .again-button {
        width: 100%;
    }
}
