:root {
  --red: #b60000;
  --gold: #d4a017;
  --gold-light: #f3d36b;
  --bg: #fff6ea;
  --text: #3b1d0a;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); font-family: "Noto Serif SC", "Microsoft YaHei", system-ui, sans-serif; }
.bg-pattern {
  position: fixed; inset: 0; pointer-events: none;
  background-image:
    radial-gradient(circle at 20% 10%, rgba(214,39,39,.08) 0, transparent 60%),
    radial-gradient(circle at 80% 90%, rgba(212,160,23,.08) 0, transparent 55%),
    linear-gradient(90deg, rgba(255,255,255,.7), rgba(255,247,230,.9));
  z-index: -1;
}
.site-header {
  position: relative; padding: 24px 20px 12px; text-align: center;
  background: linear-gradient(180deg, #ffefcc, #ffe8b3 60%, #ffe3a3);
  border-bottom: 4px solid var(--gold);
}
.lanterns { position: absolute; left: 10px; right: 10px; top: 6px; display: flex; justify-content: space-between; pointer-events: none; }
.lantern { width: 24px; height: 32px; border-radius: 12px; background: radial-gradient(circle at 50% 30%, #ff6b6b, #b60000); box-shadow: 0 6px 10px rgba(0,0,0,.15); transform-origin: top center; animation: swing 2.6s ease-in-out infinite; position: relative; }
.lantern:nth-child(2) { animation-delay: .6s; }
.lantern:nth-child(3) { animation-delay: 1.2s; }
.lantern::after { content: ""; position: absolute; left: 50%; bottom: -10px; width: 2px; height: 10px; background: var(--gold); transform: translateX(-50%); }
@keyframes swing { 0%,100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg); } }
.brand { display: inline-flex; align-items: center; gap: 14px; }
.brand-emblem {
  width: 48px; height: 48px; border-radius: 50%;
  display: inline-grid; place-items: center;
  background: radial-gradient(circle at 50% 40%, var(--gold-light), var(--gold));
  color: #7a0f0f; font-size: 24px; font-weight: 700;
  box-shadow: 0 4px 8px rgba(0,0,0,.15), inset 0 2px 4px rgba(255,255,255,.6);
  animation: pulse 2.2s infinite ease-in-out;
}
.sub { margin-top: 8px; color: #7a0f0f; letter-spacing: 2px; }
@keyframes pulse {
  0%,100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}
h1,h2 { margin: 0; color: #7a0f0f; }
h2 { font-size: 22px; }
main { max-width: 1080px; margin: 0 auto; padding: 24px 16px 80px; }

.hero { display: grid; grid-template-columns: 1.2fr .8fr; gap: 20px; align-items: center; margin-top: 8px; }
.hero-left { padding: 16px; border: 2px solid var(--gold); background: #fffdf5; border-radius: 14px; box-shadow: 0 8px 16px rgba(0,0,0,.06); }
.hero-panel { position: relative; overflow: hidden; background: radial-gradient(circle at 10% 0%, #fff7e8, #fffdf5 60%); }
.panel-header { display: flex; align-items: center; justify-content: space-between; }
.badge { font-size: 12px; color: #fff; background: linear-gradient(90deg,#d43f3f,#b60000); padding: 6px 10px; border-radius: 999px; box-shadow: 0 6px 12px rgba(182,0,0,.2); }
.rotator { margin-top: 12px; height: 180px; border-radius: 12px; overflow: hidden; background: linear-gradient(180deg, #fff7e8, #fff2d6); border: 1px solid #f0d399; position: relative; }
.rotator-inner { position: absolute; inset: 0; display: grid; place-items: center; gap: 10px; padding: 10px; }
.with-frame { box-shadow: inset 0 0 0 2px #edd4a2, 0 10px 16px rgba(0,0,0,.08); position: relative; }
.with-frame::before { content: ""; position: absolute; left: -40%; top: -50%; width: 80%; height: 200%; background: linear-gradient(120deg, rgba(212,160,23,.0), rgba(243,211,107,.35), rgba(212,160,23,.0)); transform: rotate(20deg); animation: shine 3s linear infinite; }
@keyframes shine { 0% { left: -40%; } 100% { left: 120%; } }
.rotator-card {
  display: grid; grid-template-columns: 80px 1fr; gap: 16px; align-items: center;
  width: 100%; max-width: 520px; padding: 12px 16px; background: #ffffff; border-radius: 12px; border: 1px solid #edd4a2;
  box-shadow: 0 6px 12px rgba(0,0,0,.08);
  animation: slideIn .7s ease forwards;
}
.rotator-photo {
  width: 80px; height: 80px; border-radius: 50%; background: linear-gradient(180deg,#fff0d6,#ffd7a1);
  border: 2px solid var(--gold); overflow: hidden; display: grid; place-items: center;
}
.rotator-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rotator-name { font-size: 22px; color: var(--red); font-weight: 700; letter-spacing: 1px; }
.rotator-year { color: #8a5a20; }
.hero-note { margin-top: 10px; color: #8a5a20; font-size: 13px; }
.hero-actions { margin-top: 10px; display: flex; gap: 8px; }
.spark { display: inline-block; padding: 6px 10px; border-radius: 999px; background: linear-gradient(180deg,#fff7e8,#ffe3a3); border: 1px solid #f0d399; color: #7a0f0f; animation: floatSpark 3s ease-in-out infinite; }
.spark:nth-child(2) { animation-delay: .2s; }
.spark:nth-child(3) { animation-delay: .4s; }
.spark:nth-child(4) { animation-delay: .6s; }
@keyframes floatSpark { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes slideIn {
  0% { transform: translateY(20px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}
.hero-right { position: relative; display: grid; place-items: center; }
.drum { width: 180px; height: 180px; border-radius: 50%; background: radial-gradient(circle at 50% 45%, #ffe8b3, #f1c25b); border: 6px solid var(--red); box-shadow: 0 10px 16px rgba(0,0,0,.15); animation: drumBeat 1.6s infinite ease-in-out; }
.drum-face { width: 100%; height: 100%; border-radius: 50%; background-image: radial-gradient(circle at 30% 30%, rgba(255,255,255,.7), transparent 60%), radial-gradient(circle at 70% 70%, rgba(255,255,255,.6), transparent 60%); }
@keyframes drumBeat {
  0%,100% { transform: scale(1); }
  50% { transform: scale(1.03); }
}
.dice-belt { position: absolute; bottom: -14px; width: 240px; display: flex; gap: 10px; justify-content: center; }
.die { width: 36px; height: 36px; border-radius: 6px; background: #fff; border: 3px solid var(--red); box-shadow: 0 6px 12px rgba(0,0,0,.15); display: grid; place-items: center; animation: roll 2.8s infinite ease-in-out; }
.die:nth-child(2) { animation-delay: .4s; }
.die:nth-child(3) { animation-delay: .8s; }
.pip { width: 6px; height: 6px; border-radius: 50%; background: var(--red); display: inline-block; margin: 1px; }
@keyframes roll { 0% { transform: rotate(0deg) translateY(0); } 50% { transform: rotate(20deg) translateY(-6px); } 100% { transform: rotate(0deg) translateY(0); } }
.rotator-card:hover { transform: translateY(-2px) scale(1.01); box-shadow: 0 10px 18px rgba(0,0,0,.12); transition: transform .2s ease, box-shadow .2s ease; }
.rotator-card.rotator-bounce { animation: bounce .6s ease; }
@keyframes bounce {
  0% { transform: scale(.98); }
  50% { transform: scale(1.04); }
  100% { transform: scale(1); }
}
.coins { position: absolute; inset: 0; pointer-events: none; }
.coin {
  position: absolute; width: 22px; height: 22px; border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, var(--gold-light), var(--gold));
  box-shadow: 0 2px 6px rgba(0,0,0,.2);
  animation: floatCoin 5s linear infinite;
}
.coin:nth-child(1) { left: 20%; top: 10%; animation-delay: .2s; }
.coin:nth-child(2) { left: 60%; top: 20%; animation-delay: .6s; }
.coin:nth-child(3) { left: 40%; top: 70%; animation-delay: 1s; }
@keyframes floatCoin {
  0% { transform: translateY(0) rotate(0deg); opacity: .8; }
  50% { transform: translateY(-20px) rotate(90deg); opacity: 1; }
  100% { transform: translateY(0) rotate(180deg); opacity: .8; }
}

.timeline-section { margin-top: 24px; }
.timeline { position: relative; margin-top: 12px; }
.timeline::before {
  content: ""; position: absolute; left: 20px; top: 0; bottom: 0; width: 4px; background: linear-gradient(180deg, var(--gold), var(--gold-light));
  border-radius: 2px;
}
.timeline-item {
  position: relative; display: grid; grid-template-columns: 56px 1fr; gap: 14px; padding: 14px 14px 14px 0;
}
.timeline-dot { width: 40px; height: 40px; border-radius: 50%; border: 3px solid var(--gold); background: #fff; margin-left: 6px; box-shadow: 0 4px 8px rgba(0,0,0,.08); display: grid; place-items: center; color: var(--red); font-weight: 700; }
.timeline-card {
  background: #ffffff; border: 1px solid #edd4a2; border-radius: 12px; padding: 14px; box-shadow: 0 8px 16px rgba(0,0,0,.06);
  display: grid; grid-template-columns: 72px 1fr; gap: 12px; align-items: center;
  opacity: 0; transform: translateY(16px);
}
.timeline-card.show { opacity: 1; transform: translateY(0); transition: all .6s ease; transition-delay: var(--stagger, 0s); }
.timeline-card:hover { transform: translateY(-2px) scale(1.01); box-shadow: 0 12px 20px rgba(0,0,0,.12); }
.timeline-photo {
  width: 72px; height: 72px; border-radius: 8px; border: 2px solid var(--gold); overflow: hidden; background: linear-gradient(180deg,#fff0d6,#ffd7a1); display: grid; place-items: center;
}
.timeline-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.timeline-text { display: grid; gap: 6px; }
.timeline-year { color: #8a5a20; font-weight: 700; }
.timeline-name { font-size: 18px; color: var(--red); font-weight: 700; }

.rules-section { margin-top: 28px; }
.rules { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-top: 12px; }
.rule-card {
  background: #ffffff; border: 1px solid #edd4a2; border-radius: 12px; padding: 14px; box-shadow: 0 8px 16px rgba(0,0,0,.06);
  position: relative;
}
.rule-card::after {
  content: ""; position: absolute; right: -6px; top: -6px; width: 34px; height: 34px; background: radial-gradient(circle at 40% 40%, var(--gold-light), var(--gold)); border-radius: 50%;
  box-shadow: 0 4px 10px rgba(0,0,0,.15);
  animation: sparkle 2.8s infinite ease-in-out;
}
@keyframes sparkle {
  0%,100% { transform: scale(1) rotate(0deg); opacity: .8; }
  50% { transform: scale(1.1) rotate(180deg); opacity: 1; }
}
.rule-card:hover { transform: translateY(-2px) scale(1.01); transition: transform .2s ease; }
.rule-title { font-weight: 700; color: var(--red); margin-bottom: 6px; }
.rule-text { color: #6b3d16; line-height: 1.6; }

.site-footer { text-align: center; padding: 16px; color: #6b3d16; }
canvas#confetti { position: fixed; inset: 0; pointer-events: none; z-index: 9; }

@media (max-width: 840px) {
  .hero { grid-template-columns: 1fr; }
}
