*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Fredoka", "Baloo 2", "Trebuchet MS", sans-serif;
  background: radial-gradient(circle at top, #1a1a3e 0%, #0d0d24 100%);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem clamp(1rem, 4vw, 3rem) 3rem;
  overflow-x: hidden;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ───── Particle canvas ───── */
.particle-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ───── Ambient glow ───── */
.ambient-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: conic-gradient(from 180deg at 50% 50%,
      rgba(220, 10, 45, 0.35),
      rgba(59, 76, 202, 0.3),
      rgba(255, 222, 0, 0.35),
      rgba(220, 10, 45, 0.35));
  filter: blur(160px);
  opacity: 0.15;
  animation: glowSpin 60s linear infinite;
}

@keyframes glowSpin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

/* ───── Header ───── */
.hero {
  text-align: center;
  margin-bottom: 1.5rem;
  z-index: 1;
}

.hero h1 {
  margin: 0.2rem 0;
  font-size: clamp(2.25rem, 6vw, 3.5rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #FFDE00;
  text-shadow:
    0 0 12px rgba(255, 222, 0, 0.8),
    0 0 24px rgba(255, 222, 0, 0.4),
    0 0 60px rgba(255, 222, 0, 0.2);
  animation: titleGlow 3s ease-in-out infinite alternate;
}

@keyframes titleGlow {
  from {
    text-shadow: 0 0 12px rgba(255, 222, 0, 0.8), 0 0 24px rgba(255, 222, 0, 0.4), 0 0 60px rgba(255, 222, 0, 0.2);
    filter: brightness(1);
  }

  to {
    text-shadow: 0 0 20px rgba(255, 222, 0, 1), 0 0 40px rgba(255, 222, 0, 0.6), 0 0 80px rgba(255, 222, 0, 0.3);
    filter: brightness(1.1);
  }
}

.tagline {
  margin: 0 auto;
  max-width: 28rem;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.85);
}

.toggles {
  margin-top: 1rem;
  display: flex;
  justify-content: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  background: rgba(26, 42, 80, 0.8);
  border: 2px solid rgba(255, 255, 255, 0.2);
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.3s ease, background 0.3s ease;
  font-size: 0.9rem;
}

.toggle:hover {
  border-color: rgba(255, 222, 0, 0.6);
  background: rgba(26, 42, 80, 0.95);
}

.toggle input {
  accent-color: #DC0A2D;
  width: 1rem;
  height: 1rem;
}

/* ───── Arena layout ───── */
.arena {
  width: min(62rem, 100%);
  display: grid;
  gap: 1.5rem;
  z-index: 1;
}

/* ───── Card panel ───── */
.card {
  position: relative;
  padding: clamp(1.4rem, 3vw, 2.25rem);
  border-radius: 26px;
  background: linear-gradient(145deg, rgba(20, 20, 50, 0.95), rgba(30, 30, 70, 0.9));
  border: 2px solid rgba(255, 222, 0, 0.3);
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.5),
    0 0 30px rgba(255, 222, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(from 0deg,
      transparent 0deg 340deg,
      rgba(255, 222, 0, 0.08) 340deg 360deg);
  animation: borderSpin 8s linear infinite;
  pointer-events: none;
}

@keyframes borderSpin {
  to {
    transform: rotate(360deg);
  }
}

.card::after {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(20, 20, 50, 0.98), rgba(30, 30, 70, 0.95));
  pointer-events: none;
  z-index: -1;
}

.stage.hidden {
  display: none;
}

.scoreboard.hidden {
  display: none;
}

.hidden {
  display: none !important;
}

.card h2 {
  margin-top: 0;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #FFDE00;
  text-shadow: 0 0 12px rgba(255, 222, 0, 0.4);
}

.intro {
  margin-top: 0.2rem;
  color: rgba(255, 255, 255, 0.75);
  font-size: 1rem;
}

/* ───── Screen transitions ───── */
.stage {
  animation: screenEnter 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes screenEnter {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.96);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ───── Screen wipe ───── */
.screen-wipe {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  background: #0d0d24;
  opacity: 0;
  pointer-events: none;
  transition: none;
}

.screen-wipe.active {
  animation: wipeInOut 0.7s ease-in-out forwards;
  pointer-events: auto;
}

@keyframes wipeInOut {
  0% {
    opacity: 0;
  }

  30% {
    opacity: 1;
  }

  70% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    pointer-events: none;
  }
}

.wipe-pokeball {
  width: 80px;
  height: 80px;
  position: relative;
  animation: pokeballSpin 0.7s ease-in-out;
}

.wipe-ball-top {
  position: absolute;
  top: 0;
  width: 80px;
  height: 40px;
  background: #DC0A2D;
  border-radius: 80px 80px 0 0;
}

.wipe-ball-bottom {
  position: absolute;
  bottom: 0;
  width: 80px;
  height: 40px;
  background: #fff;
  border-radius: 0 0 80px 80px;
}

.wipe-ball-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 24px;
  height: 24px;
  background: white;
  border-radius: 50%;
  border: 4px solid #333;
  z-index: 2;
}

.wipe-ball-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  background: white;
  border-radius: 50%;
  border: 3px solid #333;
}

@keyframes pokeballSpin {
  0% {
    transform: rotate(0deg) scale(0.5);
    opacity: 0;
  }

  30% {
    transform: rotate(180deg) scale(1);
    opacity: 1;
  }

  70% {
    transform: rotate(360deg) scale(1);
    opacity: 1;
  }

  100% {
    transform: rotate(540deg) scale(0.5);
    opacity: 0;
  }
}

/* ───── Round splash overlay ───── */
.round-splash {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: grid;
  place-items: center;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.95) 100%);
  backdrop-filter: blur(8px);
}

.round-splash.hidden {
  display: none;
}

.round-splash-text {
  font-size: clamp(4rem, 15vw, 8rem);
  font-weight: 900;
  color: #FFDE00;
  text-shadow:
    0 0 40px rgba(255, 222, 0, 0.9),
    0 0 80px rgba(220, 10, 45, 0.5),
    0 0 120px rgba(255, 222, 0, 0.3);
  animation: roundSlam 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
  letter-spacing: 0.1em;
}

.round-splash-sub {
  font-size: clamp(1.2rem, 4vw, 2rem);
  color: rgba(255, 255, 255, 0.8);
  font-weight: 600;
  margin-top: -1rem;
  animation: fadeIn 0.5s ease 0.3s both;
}

@keyframes roundSlam {
  0% {
    transform: scale(3) rotate(-5deg);
    opacity: 0;
  }

  50% {
    transform: scale(0.9) rotate(2deg);
    opacity: 1;
  }

  70% {
    transform: scale(1.1) rotate(-1deg);
  }

  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

/* ───── Badge shelf ───── */
.badge-shelf {
  margin-bottom: 1.2rem;
  padding: 1rem;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255, 222, 0, 0.08), rgba(220, 10, 45, 0.05));
  border: 1px solid rgba(255, 222, 0, 0.2);
}

.badge-shelf-title {
  margin: 0 0 0.6rem;
  font-size: 1rem;
  color: #FFDE00;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-list {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.badge-item {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255, 222, 0, 0.2), rgba(255, 199, 0, 0.15));
  border: 1px solid rgba(255, 222, 0, 0.4);
  font-size: 0.8rem;
  font-weight: 700;
  color: #FFDE00;
  box-shadow: 0 2px 12px rgba(255, 222, 0, 0.2);
  animation: badgeShine 3s ease-in-out infinite alternate;
}

@keyframes badgeShine {
  from {
    box-shadow: 0 2px 12px rgba(255, 222, 0, 0.2);
  }

  to {
    box-shadow: 0 2px 20px rgba(255, 222, 0, 0.4);
  }
}

.badge-item .badge-icon {
  font-size: 1.1rem;
}

.stats-summary {
  margin-bottom: 1rem;
  padding: 0.6rem 1rem;
  border-radius: 14px;
  background: rgba(59, 76, 202, 0.15);
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
  justify-content: center;
}

.stats-summary .stat-item {
  display: flex;
  gap: 0.3rem;
  align-items: center;
}

.stats-summary .stat-value {
  font-weight: 700;
  color: #FFDE00;
}

/* ───── Setup form ───── */
.setup-form {
  display: grid;
  gap: 1.5rem;
}

.field {
  display: grid;
  gap: 0.35rem;
}

.field label {
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.85);
}

.input-with-note {
  display: flex;
  gap: 0.8rem;
  align-items: center;
  flex-wrap: wrap;
}

input[type="number"],
input[type="text"] {
  padding: 0.6rem 0.8rem;
  border-radius: 14px;
  border: 2px solid rgba(59, 76, 202, 0.5);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 1rem;
  width: 5.5rem;
  font-family: inherit;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input[type="number"]:focus,
input[type="text"]:focus {
  outline: none;
  border-color: #FFDE00;
  box-shadow: 0 0 0 3px rgba(255, 222, 0, 0.15), 0 0 20px rgba(255, 222, 0, 0.1);
}

input[type="text"] {
  width: 100%;
}

.note {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.55);
}

/* ───── Trainer grid ───── */
.trainer-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.trainer-card {
  padding: 1rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.06);
  border: 2px solid rgba(59, 76, 202, 0.3);
  display: grid;
  gap: 0.6rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.trainer-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(59, 76, 202, 0.3);
  border-color: rgba(255, 222, 0, 0.4);
}

.trainer-card label {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
}

.emoji-options {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.emoji-options button {
  flex: 1 1 auto;
  min-width: 44px;
  min-height: 44px;
  padding: 0.4rem 0.6rem;
  border-radius: 12px;
  border: 2px solid transparent;
  background: rgba(255, 255, 255, 0.06);
  color: #000;
  font-size: 1.2rem;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.emoji-options button:hover {
  background: rgba(255, 222, 0, 0.1);
}

.emoji-options button.active {
  border-color: #FFDE00;
  transform: scale(1.08);
  background: rgba(255, 222, 0, 0.15);
  box-shadow: 0 0 12px rgba(255, 222, 0, 0.3);
}

/* ───── Buttons ───── */
.action {
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  text-transform: uppercase;
  border-radius: 999px;
  border: none;
  padding: 0.9rem 1.6rem;
  cursor: pointer;
  transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease, filter 0.2s ease;
  letter-spacing: 0.05em;
  min-height: 48px;
  position: relative;
  overflow: hidden;
}

.action::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, transparent 50%);
  pointer-events: none;
}

.action.primary {
  background: linear-gradient(135deg, #DC0A2D, #ff3d5a);
  color: #ffffff;
  box-shadow: 0 8px 24px rgba(220, 10, 45, 0.4), 0 0 40px rgba(220, 10, 45, 0.15);
}

.action.secondary {
  background: linear-gradient(135deg, #3B4CCA, #5865F2);
  color: #ffffff;
  box-shadow: 0 8px 24px rgba(59, 76, 202, 0.4), 0 0 40px rgba(59, 76, 202, 0.15);
}

.action:hover:not(:disabled),
.action:focus:not(:disabled) {
  outline: none;
  transform: translateY(-3px) scale(1.04);
  filter: brightness(1.1);
}

.action:active:not(:disabled) {
  transform: translateY(1px) scale(0.97);
  filter: brightness(0.95);
}

.action:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.5rem;
  justify-content: center;
}

/* ───── Pick screen ───── */
.pick-trainer-info {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.trainer-badge-lg {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 2rem;
  font-weight: 700;
  background: linear-gradient(135deg, #FFDE00, #FFC700);
  border: 3px solid #DC0A2D;
  box-shadow: 0 0 20px rgba(255, 222, 0, 0.5), 0 0 40px rgba(255, 222, 0, 0.2);
  animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {

  0%,
  100% {
    box-shadow: 0 0 20px rgba(255, 222, 0, 0.5), 0 0 40px rgba(255, 222, 0, 0.2);
  }

  50% {
    box-shadow: 0 0 30px rgba(255, 222, 0, 0.7), 0 0 60px rgba(255, 222, 0, 0.3);
  }
}

.pick-name {
  font-size: 1.4rem;
  font-weight: 700;
  color: #FFDE00;
}

.pick-search-row {
  display: flex;
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.pokemon-search {
  flex: 1;
  padding: 0.7rem 1rem;
  border-radius: 14px;
  border: 2px solid rgba(59, 76, 202, 0.5);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 1.1rem;
  font-family: inherit;
  min-height: 48px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.pokemon-search::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.pokemon-search:focus {
  outline: none;
  border-color: #FFDE00;
  box-shadow: 0 0 0 3px rgba(255, 222, 0, 0.15), 0 0 20px rgba(255, 222, 0, 0.1);
}

.search-status {
  text-align: center;
  padding: 0.5rem;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
}

.pokemon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.8rem;
  margin-bottom: 1rem;
  max-height: 420px;
  overflow-y: auto;
  padding: 0.4rem;
}

.pokemon-card-option {
  border-radius: 14px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.4rem;
  min-height: 48px;
  position: relative;
}

/* Holographic shimmer on pokemon cards */
.pokemon-card-option::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg,
      transparent 20%,
      rgba(255, 222, 0, 0.08) 30%,
      rgba(220, 10, 45, 0.06) 40%,
      rgba(59, 76, 202, 0.08) 50%,
      transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 1;
}

.pokemon-card-option:hover::before,
.pokemon-card-option:focus::before {
  opacity: 1;
  animation: holoShift 2s linear infinite;
}

@keyframes holoShift {
  from {
    background-position: -200% 0;
  }

  to {
    background-position: 200% 0;
  }
}

.pokemon-card-option:hover,
.pokemon-card-option:focus {
  transform: translateY(-6px) scale(1.03);
  border-color: #FFDE00;
  box-shadow: 0 12px 30px rgba(255, 222, 0, 0.3), 0 0 20px rgba(255, 222, 0, 0.1);
  outline: none;
}

.pokemon-card-option.selected {
  border-color: #DC0A2D;
  box-shadow:
    0 0 20px rgba(220, 10, 45, 0.5),
    0 0 40px rgba(220, 10, 45, 0.2);
  transform: scale(1.05);
}

.pokemon-card-option img {
  width: 100%;
  height: auto;
  border-radius: 10px;
}

.pokemon-card-option .poke-name {
  font-size: 0.75rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
  text-align: center;
  padding: 0.2rem 0;
  line-height: 1.2;
}

.pick-selected {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.8rem;
  margin-bottom: 0.5rem;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255, 222, 0, 0.1), rgba(220, 10, 45, 0.06));
  border: 2px solid rgba(255, 222, 0, 0.4);
  animation: selectedPulse 2s ease-in-out infinite;
}

@keyframes selectedPulse {

  0%,
  100% {
    border-color: rgba(255, 222, 0, 0.4);
  }

  50% {
    border-color: rgba(220, 10, 45, 0.6);
  }
}

.pick-selected-img {
  width: 80px;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 0 16px rgba(255, 222, 0, 0.3);
}

.pick-selected-name {
  font-size: 1.2rem;
  font-weight: 700;
  color: #FFDE00;
}

/* ───── VS / Battle screen ───── */
#battle-screen {
  background: linear-gradient(145deg, rgba(15, 10, 35, 0.98), rgba(25, 15, 50, 0.95));
  border-color: rgba(220, 10, 45, 0.4);
  min-height: 320px;
}

.vs-stage {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0;
  min-height: 260px;
  position: relative;
  flex-wrap: wrap;
  padding: 1rem;
}

.vs-fighter {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  opacity: 0;
  flex: 0 0 auto;
  position: relative;
}

.vs-fighter.slide-left {
  animation: slideFromLeft 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.vs-fighter.slide-right {
  animation: slideFromRight 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.vs-fighter.slide-in {
  animation: slideFromBottom 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.vs-fighter-card {
  width: clamp(100px, 22vw, 160px);
  border-radius: 14px;
  overflow: hidden;
  border: 3px solid rgba(255, 222, 0, 0.6);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(255, 222, 0, 0.15);
  background: rgba(255, 255, 255, 0.05);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}

/* Type aura glow around VS cards */
.vs-fighter-card::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 18px;
  background: var(--type-color, rgba(255, 222, 0, 0.3));
  opacity: 0;
  filter: blur(12px);
  z-index: -1;
  animation: typeAura 2s ease-in-out infinite alternate;
}

@keyframes typeAura {
  from {
    opacity: 0.3;
    transform: scale(1);
  }

  to {
    opacity: 0.6;
    transform: scale(1.05);
  }
}

.vs-fighter-card img {
  width: 100%;
  height: auto;
  display: block;
}

.vs-fighter-card .vs-no-card {
  width: 100%;
  aspect-ratio: 3 / 4;
  display: grid;
  place-items: center;
  font-size: 2.5rem;
  background: linear-gradient(135deg, rgba(59, 76, 202, 0.15), rgba(220, 10, 45, 0.1));
}

.vs-fighter-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: #FFDE00;
  text-align: center;
  max-width: 160px;
  text-shadow: 0 0 8px rgba(255, 222, 0, 0.3);
}

.vs-fighter-hp {
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
}

/* HP bar on VS screen */
.vs-hp-bar {
  width: clamp(80px, 18vw, 140px);
  height: 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
  position: relative;
}

.vs-hp-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, #4CAF50, #8BC34A);
  transition: width 1s ease-out;
  box-shadow: 0 0 8px rgba(76, 175, 80, 0.5);
}

.vs-hp-fill.high {
  background: linear-gradient(90deg, #4CAF50, #8BC34A);
}

.vs-hp-fill.mid {
  background: linear-gradient(90deg, #FF9800, #FFC107);
}

.vs-hp-fill.low {
  background: linear-gradient(90deg, #f44336, #FF5722);
}

.vs-hp-text {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 600;
  text-align: center;
  margin-top: 2px;
}

.vs-emblem {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  pointer-events: none;
  opacity: 0;
}

.vs-emblem.active {
  animation: vsPulse 1.2s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.vs-text {
  display: block;
  font-size: clamp(3.5rem, 12vw, 6rem);
  font-weight: 900;
  color: #FFDE00;
  text-shadow:
    0 0 30px rgba(255, 222, 0, 1),
    0 0 60px rgba(220, 10, 45, 0.8),
    0 0 100px rgba(255, 222, 0, 0.4),
    4px 4px 0 #DC0A2D,
    -2px -2px 0 #DC0A2D;
  letter-spacing: 0.12em;
}

/* Energy clash effect */
.energy-clash {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 200px;
  height: 200px;
  pointer-events: none;
  z-index: 5;
  opacity: 0;
}

.energy-clash.active {
  animation: clashBurst 1s ease-out forwards;
}

.energy-clash.active::before,
.energy-clash.active::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
}

.energy-clash.active::before {
  background: radial-gradient(circle, rgba(255, 222, 0, 0.6) 0%, transparent 70%);
  animation: clashRing 0.8s ease-out forwards;
}

.energy-clash.active::after {
  background: radial-gradient(circle, rgba(220, 10, 45, 0.4) 0%, transparent 60%);
  animation: clashRing 0.8s ease-out 0.1s forwards;
}

@keyframes clashBurst {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(0.1);
  }

  50% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.5);
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(2);
  }
}

@keyframes clashRing {
  0% {
    transform: scale(0.3);
    opacity: 1;
  }

  100% {
    transform: scale(2.5);
    opacity: 0;
  }
}

@keyframes slideFromLeft {
  from {
    opacity: 0;
    transform: translateX(-200px) scale(0.6) rotate(-5deg);
  }

  to {
    opacity: 1;
    transform: translateX(0) scale(1) rotate(0deg);
  }
}

@keyframes slideFromRight {
  from {
    opacity: 0;
    transform: translateX(200px) scale(0.6) rotate(5deg);
  }

  to {
    opacity: 1;
    transform: translateX(0) scale(1) rotate(0deg);
  }
}

@keyframes slideFromBottom {
  from {
    opacity: 0;
    transform: translateY(80px) scale(0.6);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes vsPulse {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.2) rotate(-10deg);
  }

  30% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.4) rotate(5deg);
  }

  50% {
    transform: translate(-50%, -50%) scale(0.9) rotate(-2deg);
  }

  70% {
    transform: translate(-50%, -50%) scale(1.15) rotate(1deg);
  }

  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1) rotate(0deg);
  }
}

/* Winner glow on VS card */
.vs-fighter-card.winner-glow {
  box-shadow:
    0 0 30px rgba(255, 222, 0, 0.9),
    0 0 60px rgba(255, 222, 0, 0.5),
    0 0 100px rgba(255, 222, 0, 0.2);
  border-color: #FFDE00;
  transform: scale(1.08);
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ───── Countdown overlay ───── */
.countdown-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.9) 100%);
  backdrop-filter: blur(6px);
}

.countdown-overlay.hidden {
  display: none;
}

.countdown-number {
  font-size: clamp(8rem, 25vw, 16rem);
  font-weight: 900;
  color: #FFDE00;
  text-shadow:
    0 0 60px rgba(255, 222, 0, 1),
    0 0 120px rgba(220, 10, 45, 0.6),
    0 0 200px rgba(255, 222, 0, 0.3);
  animation: countPulse 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes countPulse {
  0% {
    transform: scale(3) rotate(-5deg);
    opacity: 0;
    filter: blur(8px);
  }

  40% {
    transform: scale(0.85) rotate(2deg);
    opacity: 1;
    filter: blur(0);
  }

  70% {
    transform: scale(1.1) rotate(-1deg);
  }

  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

/* ───── Screen flash ───── */
.screen-flash {
  position: fixed;
  inset: 0;
  z-index: 99;
  background: white;
  opacity: 0;
  pointer-events: none;
  transition: none;
}

.screen-flash.active {
  animation: flashBang 0.5s ease-out forwards;
}

@keyframes flashBang {
  0% {
    opacity: 1;
  }

  20% {
    opacity: 0.8;
  }

  100% {
    opacity: 0;
  }
}

/* ───── Screen shake ───── */
.arena.shake {
  animation: screenShake 0.6s ease-out;
}

@keyframes screenShake {

  0%,
  100% {
    transform: translateX(0) translateY(0);
  }

  10% {
    transform: translateX(-10px) translateY(-3px) rotate(-0.8deg);
  }

  20% {
    transform: translateX(10px) translateY(2px) rotate(0.8deg);
  }

  30% {
    transform: translateX(-8px) translateY(-2px);
  }

  40% {
    transform: translateX(8px) translateY(1px);
  }

  50% {
    transform: translateX(-5px) translateY(-1px);
  }

  60% {
    transform: translateX(5px);
  }

  70% {
    transform: translateX(-3px);
  }

  80% {
    transform: translateX(3px);
  }
}

/* ───── Decree section ───── */
.decree-stage {
  display: grid;
  gap: 1.2rem;
  justify-items: center;
}

.card-flip {
  display: none;
  gap: 1.1rem;
  justify-items: center;
  pointer-events: none;
}

.card-flip.active {
  display: grid;
  animation: fadeIn 0.35s ease forwards;
}

.flip-row {
  display: flex;
  gap: clamp(0.4rem, 2.4vw, 1rem);
  align-items: flex-end;
}

.flip-card {
  width: clamp(90px, 22vw, 140px);
  height: clamp(125px, 30vw, 195px);
  border-radius: 16px;
  border: 3px solid #DC0A2D;
  background: linear-gradient(135deg, rgba(20, 20, 50, 0.95), rgba(30, 30, 70, 0.9));
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.5), 0 0 15px rgba(220, 10, 45, 0.3);
  display: grid;
  place-items: center;
  font-size: clamp(1.5rem, 5vw, 2.2rem);
  color: #fff;
  opacity: 0;
  transform: translateY(-140px) scale(0.78) rotate(-8deg);
  animation: cardDrop 1s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  animation-delay: var(--card-delay, 0ms);
}

.flip-card span {
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.5));
}

.flip-center {
  width: clamp(64px, 16vw, 92px);
  height: clamp(64px, 16vw, 92px);
  border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, #FFDE00, #DC0A2D 70%);
  display: grid;
  place-items: center;
  font-size: clamp(1.8rem, 6vw, 2.4rem);
  font-weight: 800;
  color: #ffffff;
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.5), 0 0 30px rgba(255, 222, 0, 0.6);
  opacity: 0;
  transform: scale(0.4);
}

.card-flip.show-question .flip-center {
  animation: questionPop 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* ───── Auto-judge panel ───── */
.auto-judge-panel {
  margin-top: 1rem;
  padding: 1.2rem;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(76, 175, 80, 0.12), rgba(87, 221, 255, 0.08));
  border: 1px solid rgba(76, 175, 80, 0.3);
  animation: judgeSlideIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes judgeSlideIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.auto-judge-message {
  font-size: 1.05rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  text-align: center;
  margin-bottom: 0.8rem;
  line-height: 1.5;
}

.auto-judge-message .judge-icon {
  font-size: 1.8rem;
  display: block;
  margin-bottom: 0.4rem;
}

.auto-judge-message .judge-winner {
  color: #FFDE00;
  font-weight: 800;
  text-shadow: 0 0 8px rgba(255, 222, 0, 0.4);
}

/* ───── Judging panel ───── */
.judging-panel {
  margin-top: 1.6rem;
  padding: clamp(1.2rem, 3vw, 1.8rem);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.04);
  border: 2px dashed rgba(59, 76, 202, 0.3);
  display: grid;
  gap: 1.2rem;
}

.judging-panel.hidden {
  display: none;
}

.judging-intro {
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
}

.judging-panel .trainer-grid {
  margin-top: 0.2rem;
}

.judging-panel .action {
  justify-self: center;
}

/* ───── Decree display ───── */
.decree {
  margin-top: 1rem;
  padding: 1.6rem;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(220, 10, 45, 0.85), rgba(180, 8, 24, 0.9));
  border: 3px solid rgba(255, 222, 0, 0.6);
  font-size: clamp(1.2rem, 3.6vw, 1.7rem);
  font-weight: 700;
  text-align: center;
  color: #fff;
  cursor: pointer;
  box-shadow:
    0 15px 40px rgba(220, 10, 45, 0.4),
    0 0 30px rgba(255, 222, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.25s ease;
  position: relative;
  overflow: hidden;
}

.decree::before {
  content: "";
  position: absolute;
  top: -100%;
  left: -100%;
  width: 300%;
  height: 300%;
  background: linear-gradient(45deg,
      transparent 30%,
      rgba(255, 255, 255, 0.05) 50%,
      transparent 70%);
  animation: decreeShine 4s linear infinite;
  pointer-events: none;
}

@keyframes decreeShine {
  from {
    transform: translateX(-50%) translateY(-50%) rotate(0deg);
  }

  to {
    transform: translateX(50%) translateY(50%) rotate(0deg);
  }
}

.decree.is-concealed {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.decree-emoji {
  font-size: clamp(2.2rem, 6vw, 3rem);
  margin-bottom: 0.8rem;
  animation: emojiFloat 2s ease-in-out infinite;
}

@keyframes emojiFloat {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-6px);
  }
}

.decree-text {
  display: grid;
  gap: 0.3rem;
  font-size: 1.05em;
}

.decree-text strong {
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #FFDE00;
  text-shadow: 0 0 8px rgba(255, 222, 0, 0.6);
  font-size: 1.1em;
}

.decree-text span {
  display: block;
  color: rgba(255, 255, 255, 0.95);
  line-height: 1.4;
}

.decree:hover,
.decree:focus {
  transform: translateY(-4px) scale(1.02);
  box-shadow:
    0 22px 50px rgba(220, 10, 45, 0.5),
    0 0 40px rgba(255, 222, 0, 0.2);
  outline: none;
}

/* Decree text typing effect */
.decree-text span .typing-cursor {
  display: inline-block;
  width: 3px;
  height: 1em;
  background: #FFDE00;
  margin-left: 2px;
  animation: blink 0.5s step-end infinite;
  vertical-align: text-bottom;
  box-shadow: 0 0 6px rgba(255, 222, 0, 0.6);
}

@keyframes blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

/* ───── Scoreboard ───── */
.scoreboard {
  display: grid;
  gap: 1rem;
  padding-bottom: 1.5rem;
}

.scoreboard header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.score-target {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.6);
}

.score-list {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.score-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.8rem 1rem;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  border: 2px solid rgba(59, 76, 202, 0.25);
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.score-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255, 222, 0, 0.15));
  opacity: 0;
  transition: opacity 0.5s ease;
}

.score-item.leader {
  border-color: rgba(255, 222, 0, 0.4);
  box-shadow: 0 0 20px rgba(255, 222, 0, 0.1);
}

.score-item.leader::after {
  opacity: 1;
}

.trainer-badge {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: #000;
  background: linear-gradient(135deg, #FFDE00, #FFC700);
  border: 2px solid #DC0A2D;
  box-shadow: 0 0 12px rgba(255, 222, 0, 0.4);
  flex-shrink: 0;
  z-index: 1;
}

.score-item-pokemon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
  border: 2px solid rgba(59, 76, 202, 0.3);
  flex-shrink: 0;
  z-index: 1;
}

.trainer-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
  z-index: 1;
}

.trainer-name {
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
}

.score-count {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.65);
  font-weight: 600;
}

.star-track {
  display: flex;
  gap: 0.35rem;
}

.star-track span {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(59, 76, 202, 0.3);
  background: rgba(255, 255, 255, 0.08);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.star-track span.filled {
  background: linear-gradient(135deg, #FFDE00, #FFC700);
  border-color: #DC0A2D;
  box-shadow: 0 0 12px rgba(255, 222, 0, 0.6);
  animation: starPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes starPop {
  0% {
    transform: scale(0);
  }

  60% {
    transform: scale(1.3);
  }

  100% {
    transform: scale(1);
  }
}

/* ───── Star / judging buttons ───── */
.star-button {
  border: 2px solid rgba(59, 76, 202, 0.3);
  border-radius: 18px;
  padding: 1.1rem;
  font-size: 1.05rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  display: grid;
  gap: 0.4rem;
  justify-items: center;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease, border-color 0.2s ease;
  min-height: 48px;
}

.star-button span {
  display: block;
}

.star-button-emoji {
  font-size: 1.8rem;
}

.star-button-name {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.9);
}

.star-button-cta {
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.6);
}

.star-button-pokemon {
  width: 140px;
  height: auto;
  border-radius: 10px;
  object-fit: contain;
}

.star-button:hover,
.star-button:focus {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.4);
  border-color: rgba(255, 222, 0, 0.4);
  outline: none;
}

.star-button.selected {
  transform: translateY(-4px) scale(1.04);
  box-shadow: 0 18px 36px rgba(255, 222, 0, 0.3), 0 0 30px rgba(255, 222, 0, 0.15);
  border: 2px solid #FFDE00;
  background: rgba(255, 222, 0, 0.1);
}

.star-button.auto-suggested {
  border: 2px solid rgba(76, 175, 80, 0.6);
  box-shadow: 0 0 20px rgba(76, 175, 80, 0.2);
}

/* ───── Animations ───── */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes cardDrop {
  0% {
    opacity: 0;
    transform: translateY(-140px) scale(0.78) rotate(-8deg);
  }

  70% {
    opacity: 1;
    transform: translateY(10px) scale(1.03) rotate(3deg);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1) rotate(0deg);
  }
}

@keyframes questionPop {
  0% {
    opacity: 0;
    transform: scale(0.4);
  }

  70% {
    opacity: 1;
    transform: scale(1.15);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* ───── Champion screen ───── */
#champion-screen {
  overflow: hidden;
}

.champion-spotlight {
  position: absolute;
  top: -50%;
  left: 50%;
  width: 200%;
  height: 200%;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(255, 222, 0, 0.15) 0%, transparent 50%);
  animation: spotlightPulse 3s ease-in-out infinite;
  pointer-events: none;
}

@keyframes spotlightPulse {

  0%,
  100% {
    opacity: 0.5;
    transform: translateX(-50%) scale(1);
  }

  50% {
    opacity: 1;
    transform: translateX(-50%) scale(1.2);
  }
}

.champion-trophy {
  font-size: clamp(4rem, 12vw, 7rem);
  text-align: center;
  animation: trophyEntrance 1.2s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  filter: drop-shadow(0 0 30px rgba(255, 222, 0, 0.6));
  position: relative;
  z-index: 1;
}

@keyframes trophyEntrance {
  0% {
    transform: translateY(-100px) scale(0) rotate(-30deg);
    opacity: 0;
  }

  50% {
    transform: translateY(10px) scale(1.2) rotate(10deg);
    opacity: 1;
  }

  70% {
    transform: translateY(-5px) scale(0.95) rotate(-3deg);
  }

  100% {
    transform: translateY(0) scale(1) rotate(0deg);
    opacity: 1;
  }
}

.champion-display {
  display: grid;
  gap: 1rem;
  justify-items: center;
  margin: 1rem 0;
  position: relative;
  z-index: 1;
}

.champion-name {
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  font-weight: 800;
  color: #FFDE00;
  text-shadow:
    0 0 20px rgba(255, 222, 0, 1),
    0 0 40px rgba(255, 222, 0, 0.5),
    2px 2px 4px rgba(220, 10, 45, 0.5);
  animation: championGlow 2s ease-in-out infinite alternate;
}

@keyframes championGlow {
  from {
    text-shadow: 0 0 20px rgba(255, 222, 0, 1), 0 0 40px rgba(255, 222, 0, 0.5), 2px 2px 4px rgba(220, 10, 45, 0.5);
  }

  to {
    text-shadow: 0 0 30px rgba(255, 222, 0, 1), 0 0 60px rgba(255, 222, 0, 0.7), 0 0 100px rgba(255, 222, 0, 0.3), 2px 2px 4px rgba(220, 10, 45, 0.5);
  }
}

.champion-name.multiple {
  text-align: center;
}

.champion-pokemon {
  display: flex;
  gap: 1.2rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.champion-pokemon-card {
  width: 120px;
  border-radius: 14px;
  border: 3px solid #FFDE00;
  box-shadow:
    0 0 30px rgba(255, 222, 0, 0.6),
    0 0 60px rgba(255, 222, 0, 0.2);
  animation: cardFloat 3s ease-in-out infinite;
}

@keyframes cardFloat {

  0%,
  100% {
    transform: translateY(0) rotate(-1deg);
  }

  50% {
    transform: translateY(-8px) rotate(1deg);
  }
}

.game-stats {
  padding: 1rem;
  border-radius: 16px;
  background: rgba(59, 76, 202, 0.1);
  color: rgba(255, 255, 255, 0.8);
  text-align: center;
  font-size: 0.95rem;
  line-height: 1.6;
  position: relative;
  z-index: 1;
}

.game-stats .stats-line {
  display: block;
}

/* Streak display */
.streak-display {
  font-size: 1.1rem;
  font-weight: 700;
  color: #FFDE00;
  text-align: center;
  padding: 0.5rem;
  animation: streakPulse 1s ease-in-out;
}

@keyframes streakPulse {
  0% {
    transform: scale(0.5);
    opacity: 0;
  }

  50% {
    transform: scale(1.2);
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.confetti {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.confetti-piece {
  position: absolute;
  opacity: 0.9;
  animation: confettiFall linear forwards;
}

.confetti-piece.circle {
  border-radius: 50%;
}

.confetti-piece.strip {
  border-radius: 2px;
}

.confetti-piece.star {
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

@keyframes confettiFall {
  0% {
    transform: translateY(-20vh) rotate(0deg);
  }

  100% {
    transform: translateY(120vh) rotate(720deg);
    opacity: 0;
  }
}

/* ───── Footer ───── */
.footer {
  margin-top: 2rem;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.45);
  text-align: center;
  z-index: 1;
}

/* ───── Scrollbar ───── */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 222, 0, 0.3);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 222, 0, 0.5);
}

/* ───── Mobile ───── */
@media (max-width: 600px) {
  body {
    padding: 1rem;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .action {
    width: 100%;
  }

  .button-row {
    gap: 0.8rem;
  }

  .vs-stage {
    min-height: 200px;
    gap: 0.2rem;
  }

  .pokemon-grid {
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    max-height: 300px;
  }

  .champion-trophy {
    font-size: 4rem;
  }

  .round-splash-text {
    font-size: 4rem;
  }
}

/* ───── Card zoom modal ───── */
.card-zoom-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  cursor: pointer;
  animation: fadeIn 0.2s ease;
  padding: 2rem;
}

.card-zoom-modal.hidden {
  display: none;
}

.card-zoom-img {
  max-width: min(90vw, 420px);
  max-height: 85vh;
  border-radius: 16px;
  box-shadow:
    0 0 60px rgba(255, 222, 0, 0.3),
    0 30px 80px rgba(0, 0, 0, 0.6);
  animation: cardZoomIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}

@keyframes cardZoomIn {
  from {
    transform: scale(0.7);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* ───── Reduce motion ───── */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}