@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;450;500;550;600;650;700&display=swap');

:root { font-family: 'DM Sans', sans-serif; color: #f2edf6; background: #171226; font-synthesis: none; color-scheme: dark; --green: #a1dca5; --milk: #f4f2e8; --muted: #b7a8c7; }
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: radial-gradient(ellipse at 18% 30%, #5a3b8155, transparent 50%), radial-gradient(ellipse at 85% 85%, #65326240, transparent 52%), radial-gradient(ellipse at 58% 0%, #34436b30, transparent 48%); }
body::before { content: ''; position: fixed; inset: 0; background: url('stars.svg') repeat; opacity: .48; pointer-events: none; }
button, input { font: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: default; }
button:focus-visible, input:focus-visible { outline: 3px solid var(--green); outline-offset: 4px; }
main { position: relative; width: min(1080px, calc(100% - 80px)); min-height: 100svh; margin: auto; padding: 72px 0; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(290px, 0.9fr); align-items: center; gap: 100px; }
.wheel-section { display: flex; flex-direction: column; align-items: center; }
.wheel-shell { position: relative; width: 100%; max-width: 530px; aspect-ratio: 1; margin: 12px 0 38px; border: 9px solid var(--milk); border-radius: 50%; box-shadow: 0 0 0 5px #ba92d327, 0 0 75px -20px #ae6fd259, 0 22px 42px -14px #08061099; }
#wheel { display: block; height: 100%; width: 100%; border-radius: 50%; overflow: hidden; will-change: transform; }
.pointer { position: absolute; z-index: 2; top: -24px; left: 50%; transform: translateX(-50%); width: 29px; height: 39px; background: var(--milk); clip-path: polygon(0 0, 100% 0, 100% 42%, 50% 100%, 0 42%); border-radius: 5px 5px 0 0; }
.hub { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 82px; height: 82px; display: grid; place-items: center; border: 7px solid #ffffff50; background: var(--milk); background-clip: padding-box; border-radius: 50%; box-shadow: 0 3px 18px #20133245; transition: width .2s, height .2s; }
.hub:hover:not(:disabled) { width: 88px; height: 88px; }
.hub svg { width: 48px; height: 48px; transform: rotate(-9deg); }
.spin-button { min-width: 210px; min-height: 56px; border: 1px solid #c7edc2; border-radius: 100px; padding: 14px 27px; display: flex; align-items: center; justify-content: center; gap: 48px; color: #183b24; background: var(--green); font-size: 16px; font-weight: 700; box-shadow: 0 4px 24px #8cd19120; transition: background .2s, transform .2s, box-shadow .2s; }
.spin-button:hover:not(:disabled) { background: #b9ebba; box-shadow: 0 6px 28px #8cd19138; transform: translateY(-2px); }
.spin-button:disabled { opacity: .55; }
.spin-button svg { width: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.result-space { height: 62px; max-width: 100%; padding-top: 23px; text-align: center; }
#result { display: block; color: var(--milk); font-size: 20px; font-weight: 650; overflow-wrap: anywhere; text-shadow: 0 0 28px #c59bd044; }
#result.reveal { animation: appear .35s ease-out; }
.options-panel { background: #251d35ed; padding: 22px; border-radius: 20px; border: 1px solid #9b78bc40; box-shadow: 0 14px 45px -15px #0805106b, inset 0 1px 0 #dcc4f208; }
.panel-bar { display: flex; justify-content: space-between; align-items: center; padding: 0 1px 16px 3px; }
#counter { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
#counter span { color: var(--muted); font-weight: 400; margin-left: 3px; }
.icon-button { display: grid; place-items: center; width: 30px; height: 30px; border: none; background: transparent; color: #baacc9; border-radius: 7px; }
.icon-button:hover:not(:disabled) { color: var(--milk); background: #b795d126; }
.icon-button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.option-list { display: flex; flex-direction: column; gap: 9px; max-height: 410px; overflow: auto; scrollbar-width: thin; scrollbar-color: #725b86 transparent; }
.option-row { display: flex; align-items: center; gap: 11px; border: 1px solid #b18bc225; background: #322740; border-radius: 10px; min-height: 48px; padding: 5px 7px 5px 14px; flex-shrink: 0; transition: border-color .2s, background .2s; }
.option-row:focus-within { border-color: #a1dca591; background: #392d49; }
.swatch { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; box-shadow: 0 0 0 1px #ffffff18; }
.option-row input { border: none; outline: none; color: #f2ecf6; background: transparent; width: 100%; min-width: 0; padding: 7px 0; font-size: 14px; }
.option-row input:focus-visible { outline: none; }
.option-row input::placeholder { color: #b4a2c3; }
.option-row input:disabled { opacity: .7; }
.option-row .icon-button { flex-shrink: 0; color: #b7a2c8; }
.add-button { display: flex; align-items: center; justify-content: center; gap: 9px; margin-top: 15px; min-height: 46px; width: 100%; border: 1px dashed #86b49369; border-radius: 10px; background: #9cdda307; color: #b6dfb6; font-size: 13px; font-weight: 500; transition: background .2s; }
.add-button span { font-size: 21px; font-weight: 400; line-height: 1; }
.add-button:hover:not(:disabled) { background: #9cdda315; }
.add-button:disabled { opacity: .4; }
#notice { font-size: 12px; color: #d5bddf; margin: 0; }
#notice:not(:empty) { margin-top: 12px; }
#winner-dialog { width: min(420px, calc(100% - 40px)); max-height: calc(100svh - 40px); padding: 0; border: 1px solid #b68fd15c; border-radius: 24px; background: #281e39; color: var(--milk); box-shadow: 0 24px 100px #08051099, 0 0 60px #ac7bc71a; overflow: auto; }
#winner-dialog[open] { animation: appear .25s ease-out; }
#winner-dialog::backdrop { background: #0b0714b3; backdrop-filter: blur(5px); }
.winner-content { position: relative; padding: 46px 30px 32px; text-align: center; }
.winner-close { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; }
.winner-spark { width: 34px; height: 34px; fill: var(--green); }
#winner-text { margin: 20px 0 30px; font-size: clamp(24px, 5vw, 36px); line-height: 1.25; font-weight: 700; overflow-wrap: anywhere; }
.winner-dismiss { min-width: 0; width: 100%; min-height: 48px; }
@keyframes appear { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }
@media (min-width: 1500px) { main { gap: 120px; } }
@media (max-width: 900px) { main { gap: 45px; width: calc(100% - 48px); } .wheel-shell { border-width: 7px; } }
@media (max-width: 680px) { main { min-height: auto; grid-template-columns: 1fr; width: min(440px, calc(100% - 44px)); padding: 48px 0 32px; gap: 5px; } .wheel-shell { margin-bottom: 28px; } .options-panel { padding: 18px; } .hub { width: 68px; height: 68px; } .hub:hover:not(:disabled) { width: 72px; height: 72px; } .hub svg { width: 38px; height: 38px; } .result-space { height: 65px; } .option-list { max-height: 300px; } .spin-button { min-height: 52px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
