:root {
    --page-background: #f4eadf;
    --page-accent: #bf4127;
    --page-accent-dark: #7f2b1b;
    --page-highlight: #f3bf57;
    --page-ink: #1f352f;
    --page-surface: rgba(255, 249, 241, 0.72);
    --page-shadow: 0 28px 70px rgba(73, 34, 19, 0.18);
    --wheel-gradient: conic-gradient(
        from -90deg,
        #bf4127 0deg 51.42deg,
        #de8b38 51.42deg 102.84deg,
        #8fbb68 102.84deg 154.26deg,
        #3b6a57 154.26deg 205.68deg,
        #5f7b9a 205.68deg 257.1deg,
        #a75b75 257.1deg 308.52deg,
        #d45d42 308.52deg 360deg
    );
    --wheel-radius: 178px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    color: var(--page-ink);
    background:
        radial-gradient(circle at top, rgba(255, 255, 255, 0.74), transparent 38%),
        linear-gradient(135deg, #faefe2 0%, #f4eadf 42%, #ebddca 100%);
}

body::before,
body::after {
    content: "";
    position: fixed;
    inset: auto;
    pointer-events: none;
    border-radius: 50%;
    filter: blur(12px);
    opacity: 0.65;
}

body::before {
    width: 320px;
    height: 320px;
    top: 56px;
    right: 56px;
    background: rgba(243, 191, 87, 0.24);
}

body::after {
    width: 260px;
    height: 260px;
    left: 40px;
    bottom: 48px;
    background: rgba(191, 65, 39, 0.12);
}

.page-shell {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(240px, 360px) minmax(360px, 1fr);
    gap: 32px;
    align-items: center;
    min-height: 100vh;
    padding: 48px;
}

.intro-panel,
.wheel-panel {
    backdrop-filter: blur(16px);
    background: var(--page-surface);
    border: 1px solid rgba(191, 65, 39, 0.12);
    border-radius: 32px;
    box-shadow: var(--page-shadow);
}

.intro-panel {
    padding: 40px;
}

.intro-tag {
    margin: 0 0 12px;
    color: var(--page-accent);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.intro-panel h1 {
    margin: 0;
    font-family: "Songti SC", "STSong", "Noto Serif CJK SC", serif;
    font-size: clamp(2.6rem, 4vw, 4.5rem);
    line-height: 1;
}

.intro-copy {
    margin: 20px 0 0;
    max-width: 28ch;
    color: rgba(31, 53, 47, 0.82);
    font-size: 1rem;
    line-height: 1.8;
}

.wheel-panel {
    padding: 36px 32px 32px;
}

.wheel-stage {
    position: relative;
    display: grid;
    place-items: center;
}

.wheel-frame {
    position: relative;
    display: grid;
    place-items: center;
    width: min(100%, 560px);
    aspect-ratio: 1;
}

.wheel-disc {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--wheel-gradient);
    border: 14px solid rgba(127, 43, 27, 0.92);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        inset 0 -20px 50px rgba(57, 20, 13, 0.2),
        0 20px 40px rgba(82, 37, 19, 0.24);
    overflow: hidden;
}

.wheel-disc::before {
    content: "";
    position: absolute;
    inset: 28px;
    border-radius: 50%;
    border: 1px dashed rgba(255, 248, 230, 0.38);
}

.wheel-gloss {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 28% 24%, rgba(255, 255, 255, 0.28), transparent 26%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.1), transparent 42%);
    mix-blend-mode: screen;
}

.wheel-labels {
    position: absolute;
    inset: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.wheel-label {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 136px;
    color: #fff8e6;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    line-height: 1.2;
    text-align: center;
    text-shadow: 0 2px 10px rgba(31, 20, 14, 0.42);
    transform:
        translate(-50%, -50%)
        rotate(var(--label-angle))
        translateY(calc(var(--wheel-radius) * -1))
        rotate(calc(var(--label-angle) * -1));
}

.wheel-pointer {
    position: absolute;
    top: -12px;
    left: 50%;
    z-index: 3;
    width: 0;
    height: 0;
    border-left: 22px solid transparent;
    border-right: 22px solid transparent;
    border-top: 38px solid var(--page-highlight);
    transform: translateX(-50%);
    filter: drop-shadow(0 8px 12px rgba(70, 31, 18, 0.22));
}

.wheel-pointer::after {
    content: "";
    position: absolute;
    top: -42px;
    left: -7px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff6dd;
    border: 3px solid var(--page-accent-dark);
}

.wheel-center {
    position: absolute;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 8px;
    width: 36%;
    aspect-ratio: 1;
    padding: 16px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 32% 26%, rgba(255, 255, 255, 0.92), rgba(255, 247, 231, 0.86) 48%, rgba(238, 220, 190, 0.96) 100%);
    border: 8px solid rgba(127, 43, 27, 0.14);
    box-shadow:
        0 16px 28px rgba(99, 47, 23, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.78);
    text-align: center;
}

.center-caption {
    color: rgba(31, 53, 47, 0.72);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.08em;
}

.selected-food {
    color: var(--page-accent-dark);
    font-family: "Songti SC", "STSong", "Noto Serif CJK SC", serif;
    font-size: clamp(1.1rem, 2vw, 1.6rem);
    line-height: 1.3;
}

.control-panel {
    display: grid;
    justify-items: center;
    gap: 16px;
    margin-top: 28px;
}

.spin-button {
    min-width: 224px;
    padding: 16px 32px;
    border: none;
    border-radius: 999px;
    background: linear-gradient(180deg, #d85d42 0%, #bf4127 100%);
    box-shadow:
        0 14px 24px rgba(127, 43, 27, 0.24),
        inset 0 1px 0 rgba(255, 240, 229, 0.42);
    color: #fffaf2;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    cursor: pointer;
    transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.spin-button:hover {
    transform: translateY(-2px);
    box-shadow:
        0 18px 30px rgba(127, 43, 27, 0.28),
        inset 0 1px 0 rgba(255, 240, 229, 0.48);
}

.spin-button:active {
    transform: translateY(1px);
}

.spin-button:disabled {
    cursor: wait;
    filter: saturate(0.6);
    opacity: 0.72;
    transform: none;
}

.status-text {
    min-height: 24px;
    margin: 0;
    color: rgba(31, 53, 47, 0.76);
    font-size: 0.94rem;
}

.status-text.is-error {
    color: #9d241f;
}

.status-text.is-success {
    color: #2f6a46;
}

@media (max-width: 980px) {
    .page-shell {
        grid-template-columns: 1fr;
        padding: 24px;
    }

    .intro-panel,
    .wheel-panel {
        width: 100%;
    }
}

@media (max-width: 640px) {
    :root {
        --wheel-radius: 118px;
    }

    .page-shell {
        padding: 16px;
    }

    .intro-panel,
    .wheel-panel {
        padding-left: 20px;
        padding-right: 20px;
    }

    .wheel-panel {
        padding-bottom: 24px;
    }

    .wheel-label {
        width: 96px;
        font-size: 0.8rem;
    }

    .wheel-center {
        width: 40%;
    }

    .spin-button {
        width: 100%;
        min-width: 0;
    }
}
