.hero-demo { max-width: 480px; margin: 0 auto 32px; position: relative; }
.hero-demo-board {
  background: var(--card); border: 2px solid var(--line); border-radius: 20px;
  padding: 16px 18px 18px;
  transition: filter 0.3s ease, opacity 0.3s ease;
}
.hero-demo.hd-finished .hero-demo-board { filter: grayscale(1); opacity: 0.5; }

.hero-demo-score { display: flex; justify-content: center; gap: 14px; margin-bottom: 8px; }
.hd-box { position: relative; border-radius: 12px; padding: 6px 18px; text-align: center; min-width: 96px; }
.hd-box.a { background: var(--coral-bg); color: var(--coral-ink); }
.hd-box.b { background: var(--teal-bg); color: var(--teal-ink); }
.hd-name { display: block; font-size: 11px; font-weight: 800; }
.hd-score { display: block; font-size: clamp(22px, 5vw, 30px); font-weight: 800; line-height: 1.15; }
.hd-box::after {
  content: ''; position: absolute; top: 6px; right: 8px; width: 8px; height: 8px;
  border-radius: 50%; background: currentColor; opacity: 0;
}
.hd-box.scoring { animation: hdPulse 0.5s ease; }
.hd-box.scoring::after { animation: hdDot 0.7s ease forwards; }

.hero-demo-field { margin: 2px 0 10px; }
.hero-demo-field svg { width: 100%; display: block; }
#hdBall { transition: transform 0.75s ease; }

.hero-demo-duel { display: flex; justify-content: center; align-items: center; gap: 10px; margin-bottom: 10px; }
.hd-pill { border-radius: 99px; padding: 6px 16px; font-weight: 800; font-size: clamp(13px, 3vw, 17px); }
.hd-pill.a { background: var(--coral-bg); color: var(--coral-ink); }
.hd-pill.b { background: var(--teal-bg); color: var(--teal-ink); }
.hd-pill.winner { box-shadow: 0 0 0 3px var(--accent); animation: hdWinnerPop 0.4s ease; }
.hd-vs { font-size: 11px; font-weight: 700; color: var(--muted); }

.hero-demo-card {
  min-height: 44px; display: flex; align-items: center; justify-content: center;
  text-align: center; background: var(--bg); border: 2px solid var(--line); border-radius: 12px;
  padding: 8px 14px; font-size: clamp(14px, 3.4vw, 18px); font-weight: 800; color: var(--ink);
}
.hero-demo-card.answer { border-color: var(--accent); background: var(--accent-bg); color: var(--accent-ink); }
.hero-demo-card.hd-pop, .hd-pill.hd-pop { animation: hdPop 0.35s ease; }

.hd-replay {
  position: absolute; top: 50%; left: 50%; z-index: 2;
  display: flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; margin: 0; padding: 0;
  border: none; border-radius: 50%; background: var(--accent); color: #fff;
  font-family: 'Nunito', sans-serif; font-size: 22px; line-height: 1; cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  transform: translate(-50%, -50%);
}
.hd-replay:hover { background: var(--accent-ink); }
.hd-replay.hd-pop { animation: hdPopCenter 0.35s ease; }
.hd-replay[hidden] { display: none; }

@keyframes hdPop { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@keyframes hdPopCenter {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.85); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
@keyframes hdPulse { 0% { transform: scale(1); } 35% { transform: scale(1.08); } 100% { transform: scale(1); } }
@keyframes hdDot { 0% { opacity: 0; transform: scale(0.4); } 30% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1); } }
@keyframes hdWinnerPop { 0% { transform: scale(0.9); } 50% { transform: scale(1.1); } 100% { transform: scale(1); } }

@media (prefers-reduced-motion: reduce) {
  .hero-demo * { animation: none !important; transition: none !important; }
}
