:root { --red: #a72536; --red-dark: #751b29; --wine: #420f1b; --gold: #f7cf84; --cream: #fff8e9; --ink: #45282b; --muted: #8a6c65; --line: #e9d9c2; --symbol-size: 112px; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--cream); background: radial-gradient(ellipse at 80% 8%, #c43e41 0, transparent 45%), linear-gradient(150deg, #a32938 0, #751b29 42%, #420f1b 100%); font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; min-width: 320px; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
button:focus-visible, a:focus-visible { outline: 3px solid var(--gold); outline-offset: 5px; }
.shell { width: min(1180px, calc(100% - 64px)); margin: auto; }
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 28px 0; border-bottom: 1px solid #f7cf8433; }
.brand { display: flex; gap: 12px; align-items: center; text-decoration: none; color: inherit; }
.brand-mark { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid var(--gold); border-radius: 50%; font-size: 25px; color: var(--gold); }
.brand-copy { display: grid; gap: 4px; }
.brand-copy strong { font-size: 18px; letter-spacing: .13em; }
.brand-copy small { color: #f7d8bc; font-size: 9px; letter-spacing: .2em; }
.nav { display: flex; flex-wrap: wrap; gap: 22px; align-items: center; }
.nav a { color: #ffe8d5; font-size: 12px; text-decoration: none; padding: 8px 0; }
.nav a:hover { color: var(--gold); }
.nav .admin-link { border: 1px solid #f7cf8455; padding: 9px 15px; border-radius: 30px; }
.hero { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 65px; align-items: center; padding: 58px 0 52px; }
.eyebrow { display: flex; align-items: center; gap: 10px; color: var(--gold); font-size: 12px; letter-spacing: .23em; }
.eyebrow::before { content: ""; width: 28px; height: 1px; background: var(--gold); }
h1 { margin: 23px 0; font-size: clamp(48px, 5.7vw, 76px); font-weight: 800; line-height: 1.14; letter-spacing: -.045em; }
h1 em { font-style: normal; color: var(--gold); }
.hero-copy > p { max-width: 360px; color: #f4d6cc; font-size: 14px; line-height: 1.95; margin: 22px 0; }
.hero-tags { display: flex; gap: 8px; flex-wrap: wrap; margin: 24px 0; }
.hero-tags > span { font-size: 11px; padding: 7px 10px; border: 1px solid #f7cf844a; border-radius: 4px; color: #ffe5bd; }
.hero-cta { display: inline-flex; align-items: center; gap: 28px; background: var(--gold); color: #621926; text-decoration: none; font-size: 14px; font-weight: 700; border-radius: 6px; padding: 15px 22px; box-shadow: 0 4px 0 #c7904c; }
.hero-cta:hover { background: #ffe2a5; }
.holiday-note { display: flex; align-items: center; gap: 14px; margin-top: 35px; color: #efc7b7; font-size: 11px; }
.holiday-note::before { content: "✦"; color: var(--gold); font-size: 25px; }
.machine-wrap { position: relative; padding: 15px 30px 15px 0; min-width: 0; scroll-margin-top: 22px; }
.machine-wrap::before, .machine-wrap::after { position: absolute; content: "✦"; color: var(--gold); pointer-events: none; }
.machine-wrap::before { right: 0; top: -8px; font-size: 44px; transform: rotate(15deg); }
.machine-wrap::after { left: -25px; bottom: 15px; font-size: 30px; }
.machine { position: relative; padding: 24px; border: 7px solid #e8b766; outline: 1px solid #fff0be; border-radius: 100px 100px 24px 24px / 45px 45px 24px 24px; background: linear-gradient(135deg, #d64a4b, #a42435 55%, #821f2c); box-shadow: 0 10px 0 #a17036, 0 20px 0 #631728, 0 32px 50px #26060d66, inset 0 0 0 3px #fbe0a455; }
.machine::before { content: ""; position: absolute; left: 14px; right: 14px; top: 12px; height: 8px; background: radial-gradient(circle, #ffeeb8 3px, transparent 4px) left center / 22px 8px repeat-x; }
.machine-header { text-align: center; padding: 14px 0 17px; }
.machine-edition { color: #ffdeb1; font-size: 9px; letter-spacing: .25em; }
.machine-header h2 { margin: 7px 0 0; font-size: clamp(22px, 2.7vw, 32px); color: #fff0c6; letter-spacing: .2em; text-shadow: 0 3px #701827; }
.machine-marquee { display: flex; justify-content: center; align-items: center; gap: 12px; color: #fbe0a4; font-size: 11px; margin-bottom: 16px; }
.machine-marquee strong { color: #fff6d8; font-size: 18px; }
.reel-case { position: relative; padding: 10px; border: 2px solid #f5d28a; border-radius: 14px; background: #541727; box-shadow: inset 0 5px 12px #1a030a88; }
.reels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.reel { height: var(--symbol-size); overflow: hidden; background: linear-gradient(#eadbc2, #fffdf4 26%, #fffdf4 72%, #eadbc2); border-radius: 7px; box-shadow: inset 0 3px 7px #3a19132b; }
.reel-track { will-change: transform; }
.reel-symbol { height: var(--symbol-size); display: grid; place-items: center; padding: 6px; text-align: center; overflow-wrap: anywhere; font-size: clamp(16px, 2.4vw, 30px); line-height: 1.1; font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-weight: 800; color: #7d2028; text-shadow: 0 2px 0 #dfb37955; }
.reel.is-spinning .reel-track { animation: reel-roll .38s linear infinite; filter: blur(1px); }
.reel.is-stopping .reel-track { animation: reel-settle .3s ease-out; }
.machine.is-winning .reel-case { box-shadow: 0 0 24px #ffe1a4aa; border-color: #fff8d9; }
.machine-status { min-height: 42px; margin: 13px 0 9px; display: grid; place-items: center; text-align: center; color: #ffe9c1; font-size: 12px; line-height: 1.6; }
.spin-button { width: 100%; padding: 15px; border: 1px solid #fff0c1; border-radius: 9px; background: linear-gradient(#ffe4a6, #efba62); color: #761a29; font-size: 19px; font-weight: 800; letter-spacing: .16em; box-shadow: 0 5px 0 #9d6330, 0 8px 14px #55132455; transition: transform .15s, box-shadow .15s; }
.spin-button:not(:disabled):hover { filter: brightness(1.1); transform: translateY(-1px); }
.spin-button:not(:disabled):active { transform: translateY(4px); box-shadow: 0 1px 0 #9d6330; }
.spin-button:disabled { opacity: .65; }
.machine-foot { margin: 17px 0 0; text-align: center; color: #ffdcad; font-size: 10px; letter-spacing: .13em; }
.lever { position: absolute; top: 44%; right: -28px; width: 30px; height: 94px; border: 0; border-radius: 0 10px 10px 0; background: linear-gradient(90deg, #af753c, #f2c775 50%, #ba844d); transform-origin: bottom center; }
.lever::before { position: absolute; content: ""; width: 9px; height: 74px; background: linear-gradient(90deg, #b17e48, #ffdc97, #ba864d); right: 6px; bottom: 35px; border-radius: 5px; }
.lever::after { position: absolute; content: ""; width: 37px; height: 37px; border: 3px solid #ffdf9c; border-radius: 50%; right: -8px; top: -35px; background: radial-gradient(circle at 35% 30%, #ff8a6d, #c3323c 40%, #8a2032); box-shadow: 0 3px 10px #50132077; }
.machine.is-spinning .lever { animation: lever-pull .65s ease-in-out; }
.celebration { position: absolute; inset: 0; overflow: hidden; border-radius: 20px; pointer-events: none; z-index: 3; }
.confetti { position: absolute; top: -20px; left: var(--x); width: 8px; height: 14px; background: var(--color); animation: confetti-fall 2.5s var(--delay) ease-out both; }
.result-panel { margin-top: 29px; padding: 22px; border: 1px solid #f2cf8c; border-radius: 12px; background: #fff5dd; color: var(--ink); text-align: center; }
.result-inner { display: grid; gap: 10px; justify-items: center; }
.result-kicker { color: #a84639; font-size: 11px; letter-spacing: .12em; }
.result-title { font-size: clamp(23px, 3vw, 34px); color: var(--red); line-height: 1.3; }
.result-copy { max-width: 380px; font-size: 12px; color: #79574e; line-height: 1.8; }
.reward-code { padding: 10px 12px; max-width: 100%; overflow-wrap: anywhere; user-select: all; border: 1px dashed #c2915a; border-radius: 4px; background: #fffdfa; color: #932639; font: 13px/1.7 ui-monospace, Consolas, monospace; }
.result-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 15px; }
.secondary-button { border: 1px solid #b46f51; border-radius: 5px; background: transparent; padding: 10px 14px; color: var(--red); font-size: 12px; }
.secondary-button:hover { background: #f5e5cc; }
.entry-card { padding: 33px 38px; background: var(--cream); color: var(--ink); border-radius: 14px; border-top: 4px solid var(--gold); box-shadow: 0 15px 35px #29071026; scroll-margin-top: 25px; }
.card-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 23px; }
.card-heading h2 { margin: 0 0 8px; font-size: 23px; }
.card-heading p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.date-tag { padding: 8px 12px; border-radius: 4px; color: var(--red); background: #f2e5d3; font-size: 11px; white-space: nowrap; }
.prize-strip { display: grid; grid-template-columns: repeat(3, 1fr); border-block: 1px solid var(--line); margin-bottom: 24px; }
.prize-item { padding: 15px; }
.prize-item + .prize-item { border-left: 1px solid var(--line); }
.prize-item span { display: block; color: var(--muted); font-size: 11px; margin-bottom: 7px; }
.prize-item strong { color: var(--red); font-size: 19px; }
.prize-list { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: -8px 0 25px; }
.prize-row { display: grid; gap: 4px; min-width: 0; padding: 11px 12px; border: 1px solid var(--line); background: #fffaf2; }
.prize-row strong { color: var(--ink); font-size: 12px; }
.prize-row span { color: var(--muted); font-size: 10px; overflow-wrap: anywhere; }
.prize-row b { color: var(--red); font-size: 14px; }
.prize-note { color: var(--muted); font-size: 11px; line-height: 1.7; margin: -12px 0 24px; }
.entry-panel { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 18px; }
.field-group { display: grid; gap: 9px; align-content: start; min-width: 0; }
.field-label { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px; font-size: 12px; font-weight: 650; }
.field-label span { color: var(--muted); font-size: 10px; font-weight: 400; }
.input-row { display: flex; gap: 9px; }
.code-input { width: 100%; min-width: 0; border: 1px solid #d8c2af; border-radius: 5px; background: #fffefa; color: var(--ink); padding: 13px; font-size: 14px; }
.code-input:focus { outline: 2px solid #e9b25b; outline-offset: 2px; }
.code-input:disabled { background: #f1e8da; color: #927969; }
.primary-button { flex: none; border: 0; border-radius: 5px; background: var(--red); color: #fff6df; padding: 13px 19px; font-size: 13px; font-weight: 650; }
.primary-button:hover { background: var(--red-dark); }
.primary-button:disabled { opacity: .55; }
.status-line { grid-column: 1 / -1; color: var(--muted); font-size: 12px; line-height: 1.7; min-height: 20px; }
.status-line[data-kind="error"] { color: #b52433; }
.status-line[data-kind="success"] { color: #33744b; }
.change-entry { border: 0; background: transparent; color: var(--red); text-decoration: underline; padding: 0 0 0 8px; font-size: 12px; }
.batch-panel { margin-top: 26px; padding-top: 23px; border-top: 1px solid var(--line); }
.batch-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 15px; }
.batch-heading h3 { margin: 0 0 6px; font-size: 17px; color: var(--red); }
.batch-heading p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.7; }
.batch-limit { flex: none; color: var(--red); background: #f2e5d3; border-radius: 4px; padding: 7px 9px; font-size: 10px; white-space: nowrap; }
.batch-codes { display: block; width: 100%; margin-top: 9px; resize: vertical; min-height: 112px; border: 1px solid #d8c2af; border-radius: 5px; background: #fffefa; color: var(--ink); padding: 12px 13px; font: 13px/1.7 ui-monospace, Consolas, monospace; }
.batch-codes:focus { outline: 2px solid #e9b25b; outline-offset: 2px; }
.batch-codes:disabled { background: #f1e8da; color: #927969; }
.batch-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin-top: 11px; }
.file-button { display: inline-flex; align-items: center; border: 1px solid #b46f51; border-radius: 5px; color: var(--red); background: transparent; padding: 12px 14px; font-size: 12px; cursor: pointer; }
.file-button:hover { background: #f5e5cc; }
.file-button input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.batch-actions .primary-button { padding: 12px 16px; }
.batch-cancel { padding: 11px 13px; }
.batch-status { min-height: 20px; margin: 11px 0 0; color: var(--muted); font-size: 11px; line-height: 1.7; }
.batch-status[data-kind="error"] { color: #b52433; }
.batch-status[data-kind="success"] { color: #33744b; }
.batch-results { display: grid; gap: 6px; margin: 14px 0 0; padding: 0; list-style: none; max-height: 360px; overflow: auto; border-top: 1px solid var(--line); }
.batch-row { display: grid; grid-template-columns: 64px minmax(115px, .7fr) minmax(0, 1.3fr); gap: 10px; align-items: start; padding: 9px 0; border-bottom: 1px solid #eadbc955; color: var(--muted); font-size: 11px; line-height: 1.6; }
.batch-row-state { color: #a47761; font-size: 10px; }
.batch-row[data-kind="won"] .batch-row-state { color: #33744b; }
.batch-row[data-kind="lost"] .batch-row-state { color: #a84639; }
.batch-row[data-kind="error"] .batch-row-state { color: #b52433; }
.batch-row[data-kind="skipped"] .batch-row-state { color: #997d67; }
.batch-row-code { min-width: 0; overflow-wrap: anywhere; color: var(--ink); font: 11px/1.6 ui-monospace, Consolas, monospace; }
.batch-row-result { min-width: 0; overflow-wrap: anywhere; }
.local-history { padding: 38px 0 26px; }
.history-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.history-heading h2, .rules h2 { margin: 0; font-size: 22px; }
.history-heading p { margin: 9px 0 0; color: #e5bcad; font-size: 12px; line-height: 1.7; }
.history-clear { border: 1px solid #f3cbad66; border-radius: 5px; color: #f0d2bd; background: transparent; padding: 9px 12px; font-size: 11px; white-space: nowrap; }
.history-row { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto; gap: 16px; padding: 17px 0; border-top: 1px solid #ffdebd33; align-items: center; }
.history-status { font-size: 12px; color: #f1d2c4; }
.history-status[data-kind="won"], .history-status[data-kind="pending"] { color: var(--gold); }
.history-detail { min-width: 0; display: grid; gap: 6px; }
.history-detail strong { font-size: 12px; }
.history-detail span { font-size: 11px; color: #ebc5b8; overflow-wrap: anywhere; line-height: 1.7; }
.history-time { font-size: 11px; color: #e3b4a5; white-space: nowrap; }
.history-empty { border-top: 1px solid #ffdebd33; padding: 20px 0 0; color: #e3b4a5; font-size: 12px; }
.rules { padding: 26px 0; border-top: 1px solid #ffdebd33; display: grid; grid-template-columns: .7fr 1.3fr; gap: 30px; }
.rules-intro { color: #e3b4a5; font-size: 12px; line-height: 1.8; max-width: 260px; }
.rule-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin: 0; padding: 0; list-style: none; }
.rule-list li { display: flex; gap: 10px; color: #f0cbbd; font-size: 12px; line-height: 1.8; }
.rule-list b { color: var(--gold); font-size: 11px; }
.footer-note { border-top: 1px solid #ffdebd33; padding: 19px 0 24px; margin: 0; font-size: 10px; color: #d5a798; text-align: center; line-height: 1.8; }
.toast { position: fixed; z-index: 10; left: 50%; bottom: 25px; max-width: calc(100% - 32px); padding: 13px 19px; border-radius: 8px; background: #3c111bef; color: #fff1d7; font-size: 12px; box-shadow: 0 8px 28px #0004; transform: translate(-50%, 160%); visibility: hidden; transition: transform .25s, visibility .25s; }
.toast.is-visible { transform: translate(-50%, 0); visibility: visible; }
@keyframes reel-roll { to { transform: translateY(calc(-4 * var(--symbol-size))); } }
@keyframes reel-settle { 0% { transform: translateY(-15%); } 65% { transform: translateY(5%); } 100% { transform: translateY(0); } }
@keyframes lever-pull { 50% { transform: rotate(15deg) translateY(12px); } }
@keyframes confetti-fall { to { transform: translateY(600px) rotate(600deg); opacity: 0; } }
@media (max-width: 960px) { .hero { gap: 30px; } :root { --symbol-size: 88px; } .machine { padding: 20px 15px; } .hero-copy > p { font-size: 13px; } .brand-copy small { letter-spacing: .1em; } }
@media (max-width: 760px) { .shell { width: min(560px, calc(100% - 32px)); } .site-header { flex-wrap: wrap; gap: 18px; padding: 20px 0; } .nav { gap: 19px; } .hero { grid-template-columns: 1fr; padding-top: 33px; gap: 25px; } .hero-copy > p { max-width: none; margin: 17px 0; } h1 { font-size: 53px; margin: 17px 0; } h1 br { display: none; } .hero-tags { margin: 18px 0; } .holiday-note { display: none; } .machine-wrap { margin: 0 2px 5px 5px; } :root { --symbol-size: 106px; } .machine { padding: 22px; } .entry-card { padding: 25px 22px; } .entry-panel { grid-template-columns: 1fr; gap: 15px; } .card-heading { display: block; } .date-tag { display: inline-block; margin-top: 14px; } .rules { grid-template-columns: 1fr; gap: 12px; } .rules-intro { max-width: none; } .history-row { grid-template-columns: minmax(0, 1fr) auto; gap: 9px; } .history-detail { grid-column: 1 / -1; grid-row: 2; } .history-time { grid-column: 2; grid-row: 1; } .prize-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 400px) { :root { --symbol-size: 78px; } h1 { font-size: 44px; } .machine { padding: 18px 13px; border-width: 5px; } .reels { gap: 5px; } .machine-header h2 { font-size: 22px; } .entry-card { padding: 23px 17px; } .card-heading h2 { font-size: 21px; } .input-row { flex-direction: column; } .rule-list { grid-template-columns: 1fr; gap: 12px; } .history-heading { align-items: flex-start; } .history-heading p { font-size: 11px; } }
@media (max-width: 760px) { h1 em { display: block; } }
.machine-marquee strong, .result-title, .prize-item strong { overflow-wrap: anywhere; min-width: 0; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
