/* ==========================================================================
   Showdown — styles. Theme tokens and shared components come from
   shared/style.css.

   One screen: the opponent on top, the arena in the middle, you and your four
   moves at the bottom. At the reveal, zaps fly across the arena.
   ========================================================================== */

.sd { display: grid; gap: .6rem; max-width: 30rem; margin-inline: auto; padding-block: .5rem 2rem; }
.sd-title { font-size: clamp(1.6rem, 7vw, 2.2rem); text-align: center; }
.sd-center { text-align: center; }
.sd-center-btn { justify-self: center; }
.sd-note { font-size: 1.05rem; font-weight: 700; text-align: center; }
.sd-top { display: flex; align-items: center; gap: .6rem; }
.sd-score { font-size: 1.4rem; font-weight: 900; font-variant-numeric: tabular-nums; }
.sd-top > .btn { margin-inline-start: auto; }

/* ---------- Menu ---------- */

.sd-menu { display: grid; gap: .7rem; }
.sd-tagline { font-size: 1.1rem; font-weight: 700; text-align: center; }
.sd-best { font-weight: 900; text-align: center; }
.howto { max-width: 30rem; margin: 1.5rem auto 0; padding: .25rem 1rem; }
.howto summary { min-height: var(--tap); display: flex; align-items: center; font-weight: 800; cursor: pointer; }
.howto ol { display: grid; gap: .5rem; padding: 0 0 1rem; padding-inline-start: 1.4rem; list-style: decimal; }

/* ---------- The fighters ---------- */

.sd-fighter { display: flex; align-items: center; gap: .7rem; padding: .55rem .8rem; background: var(--surface); border: 3px solid var(--line); border-radius: 18px 15px 20px 14px; }
.sd-fighter.is-me { border-color: var(--sea); box-shadow: 4px 4px 0 var(--sea); }
.sd-fighter__face { font-size: 2.4rem; line-height: 1; }
.sd-fighter__who { flex: 1; min-width: 0; display: grid; gap: .1rem; }
.sd-fighter__name { overflow: hidden; font-weight: 900; text-overflow: ellipsis; white-space: nowrap; }
.sd-fighter__side { display: grid; justify-items: end; gap: .1rem; }
.sd-fighter__side small { font-weight: 800; color: var(--muted); }
.sd-points { font-size: 1.1rem; letter-spacing: .1em; color: var(--tomato); }
.sd-gauges { display: flex; align-items: center; gap: .6rem; }
.sd-energy i { font-style: normal; opacity: .2; filter: grayscale(1); }
.sd-energy i.is-on { opacity: 1; filter: none; }
.sd-shields { font-size: .85rem; }

/* ---------- The arena ---------- */

.sd-arena { position: relative; display: grid; justify-items: center; align-content: center; gap: .45rem; min-height: 11rem; padding: .7rem 1rem; background: var(--surface-2); border: 3px dashed var(--line); border-radius: 18px; overflow: hidden; }
.sd-arena .timebar { width: 100%; }
.sd-prompt { font-size: 1.25rem; font-weight: 900; text-align: center; }
.sd-recap { font-size: .85rem; font-weight: 700; color: var(--muted); }
.sd-move { display: grid; justify-items: center; font-weight: 900; }
.sd-move__icon { font-size: 2.6rem; line-height: 1.1; animation: sd-pop .35s cubic-bezier(.2, 1.6, .5, 1) both; }
.sd-move.is-hit { color: var(--tomato); animation: sd-shake .5s .45s both; }
.sd-outcome { position: relative; z-index: 1; padding: .15rem .8rem; font-size: 1.15rem; font-weight: 900; text-align: center; background: var(--surface); border: 2.5px solid var(--line); border-radius: 999px; animation: sd-pop .3s .4s cubic-bezier(.2, 1.6, .5, 1) both; }
.sd-shot { position: absolute; left: 50%; font-size: 1.8rem; pointer-events: none; }
.sd-shot--up { bottom: 2.6rem; animation: sd-up .5s .15s ease-in both; }
.sd-shot--down { top: 2.6rem; animation: sd-down .5s .15s ease-in both; }
.sd-shot.is-mega { font-size: 2.6rem; }
@keyframes sd-pop { from { transform: scale(.3); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes sd-up { from { transform: translate(-50%, 0); opacity: 1; } to { transform: translate(-50%, -6rem); opacity: 0; } }
@keyframes sd-down { from { transform: translate(-50%, 0); opacity: 1; } to { transform: translate(-50%, 6rem); opacity: 0; } }
@keyframes sd-shake { 0%, 100% { transform: translateX(0); } 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
@media (prefers-reduced-motion: reduce) {
  .sd-move__icon, .sd-move.is-hit, .sd-outcome, .sd-shot { animation: none; }
  .sd-shot { display: none; }
}
.sd-point-banner { padding: .5rem; font-size: 1.4rem; font-weight: 900; text-align: center; color: #fff; background: var(--sea); border: 3px solid var(--line); border-radius: 14px 16px 13px 17px; }

/* ---------- The moves ---------- */

.sd-moves { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.sd-btn {
  display: grid;
  justify-items: center;
  gap: .05rem;
  min-height: 5.4rem;
  padding: .45rem .4rem;
  font: inherit;
  color: var(--ink);
  background: var(--btn-bg, #fffaf0);
  border: 3px solid var(--ink);
  border-radius: 16px 14px 18px 13px;
  box-shadow: 0 4px 0 var(--ink);
  cursor: pointer;
  touch-action: manipulation;
}
.sd-btn:active:not([disabled]) { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.sd-btn[disabled] { opacity: .35; cursor: not-allowed; }
.sd-btn__icon { font-size: 1.9rem; line-height: 1.1; }
.sd-btn b { font-size: 1.05rem; font-weight: 900; }
.sd-btn small { font-size: .72rem; font-weight: 700; }
.sd-btn--charge { --btn-bg: #fff3bf; }
.sd-btn--zap { --btn-bg: #ffd8a8; }
.sd-btn--shield { --btn-bg: #d0ebff; }
.sd-btn--mega { --btn-bg: #e5dbff; }
.sd-btn.is-chosen { outline: 4px solid var(--sea); outline-offset: 2px; opacity: 1; }

/* ---------- The end ---------- */

.sd-final-score { font-size: clamp(2.6rem, 14vw, 3.6rem); font-weight: 900; line-height: 1; text-align: center; font-variant-numeric: tabular-nums; }
.sd-wins { font-weight: 800; }
