/* ═══════════════════════════════════════════════
   RedditGacha — Battle System
   Dramatic animations for duels, raids, and team battles
═══════════════════════════════════════════════ */

/* ─── Battle view layout ─────────────────────── */

.battle-view-inner {
  max-width: 900px;
  margin: 0 auto;
}

.battle-view-inner h2 {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 20px;
}

/* ─── Mode selection cards ───────────────────── */

.battle-modes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.battle-mode-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: 1px solid var(--border);
  transition: box-shadow 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
}

.battle-mode-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  border-color: var(--reddit-orange);
}

.battle-mode-icon { font-size: 32px; }

.battle-mode-card h3 { font-size: 18px; font-weight: 700; }
.battle-mode-card p { font-size: 13px; color: var(--text-secondary); line-height: 1.5; }

.btn-battle-mode {
  background: var(--reddit-orange);
  color: #fff;
  font-weight: 700;
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 14px;
  align-self: flex-start;
  margin-top: auto;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 2px 8px rgba(255,69,0,.25);
}

.btn-battle-mode:hover {
  background: var(--reddit-orange-dk);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(255,69,0,.4);
}

/* ─── Raid HP bar ────────────────────────────── */

.raid-hp-bar-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.raid-hp-bar {
  height: 8px;
  background: var(--bg-surface3);
  border-radius: 4px;
  overflow: hidden;
}

.raid-hp-fill {
  height: 100%;
  background: linear-gradient(90deg, #E53935, #FF5722);
  border-radius: 4px;
  transition: width 0.6s cubic-bezier(.4,0,.2,1);
  width: 100%;
}

.raid-hp-label {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 600;
}

/* ─── Battle arena ───────────────────────────── */

.battle-arena {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  animation: arenaSlideIn 0.35s cubic-bezier(.23,1,.32,1) both;
}

@keyframes arenaSlideIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── Battle stage (duel layout) ─────────────── */

.battle-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  position: relative;
}

.battle-stage-player,
.battle-stage-opponent {
  animation: combatantEnter 0.5s cubic-bezier(.23,1,.32,1) both;
}

.battle-stage-player {
  animation-delay: 0.1s;
}

.battle-stage-opponent {
  animation-delay: 0.3s;
}

@keyframes combatantEnter {
  from { opacity: 0; transform: translateX(var(--enter-x, -40px)) scale(0.85); }
  to   { opacity: 1; transform: translateX(0) scale(1); }
}

.battle-stage-opponent {
  --enter-x: 40px;
}

/* ─── VS badge ───────────────────────────────── */

.battle-vs {
  font-size: 28px;
  font-weight: 900;
  color: var(--reddit-orange);
  position: relative;
  z-index: 2;
}

.battle-vs-animated {
  animation: vsPulse 0.6s cubic-bezier(.23,1,.32,1) both;
  animation-delay: 0.5s;
  opacity: 0;
}

@keyframes vsPulse {
  0%   { opacity: 0; transform: scale(2.5); }
  50%  { opacity: 1; transform: scale(0.9); }
  100% { opacity: 1; transform: scale(1); }
}

/* ─── Clash flash ────────────────────────────── */

.battle-clash-flash {
  position: fixed;
  inset: 0;
  z-index: 160;
  pointer-events: none;
  background: radial-gradient(circle at center, rgba(255,255,255,.7) 0%, rgba(255,255,255,0) 70%);
  animation: clashFlash 0.4s ease-out forwards;
}

@keyframes clashFlash {
  0%   { opacity: 1; }
  100% { opacity: 0; }
}

/* ─── Damage number popup ────────────────────── */

.battle-damage-num {
  position: absolute;
  font-size: 32px;
  font-weight: 900;
  color: #E53935;
  text-shadow: 0 2px 8px rgba(229,57,53,.4);
  pointer-events: none;
  z-index: 10;
  animation: damageFloat 1s cubic-bezier(.23,1,.32,1) forwards;
  white-space: nowrap;
}

.battle-damage-num.heal {
  color: #00C853;
  text-shadow: 0 2px 8px rgba(0,200,83,.4);
}

@keyframes damageFloat {
  0%   { opacity: 1; transform: translateY(0) scale(1.3); }
  30%  { opacity: 1; transform: translateY(-20px) scale(1); }
  100% { opacity: 0; transform: translateY(-60px) scale(0.8); }
}

/* ─── Battle result banner ───────────────────── */

.battle-result-banner {
  text-align: center;
  padding: 16px 24px;
  border-radius: var(--radius-lg);
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 20px;
  animation: bannerSlam 0.5s cubic-bezier(.17,.67,.29,1.35) both;
  position: relative;
  overflow: hidden;
}

@keyframes bannerSlam {
  0%   { opacity: 0; transform: scale(1.5) translateY(-20px); }
  60%  { opacity: 1; transform: scale(0.95) translateY(2px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

.battle-result-banner.win {
  background: linear-gradient(135deg, #E8F5E9, #C8E6C9);
  color: #1B5E20;
  border: 1px solid rgba(27,94,32,.15);
}

.battle-result-banner.loss {
  background: linear-gradient(135deg, #FFEBEE, #FFCDD2);
  color: #B71C1C;
  border: 1px solid rgba(183,28,28,.15);
}

.battle-result-banner.draw {
  background: linear-gradient(135deg, #FFF3E0, #FFE0B2);
  color: #E65100;
  border: 1px solid rgba(230,81,0,.15);
}

/* Shimmer sweep across win banner */
.battle-result-banner.win::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,.5) 50%, transparent 60%);
  animation: bannerShimmer 2s ease infinite;
  background-size: 200% 100%;
}

@keyframes bannerShimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.battle-result-reasoning {
  text-align: center;
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 24px;
  animation: fadeInUp 0.4s ease both;
  animation-delay: 0.3s;
  opacity: 0;
}

/* ─── Duel card outline results ──────────────── */

.battle-card-win {
  outline: 3px solid #00C853;
  border-radius: 12px;
  animation: cardResultPop 0.4s cubic-bezier(.17,.67,.29,1.35) both;
}

.battle-card-loss {
  outline: 3px solid #E53935;
  border-radius: 12px;
  animation: cardResultPop 0.4s cubic-bezier(.17,.67,.29,1.35) both;
}

@keyframes cardResultPop {
  0%   { transform: scale(0.8); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* ─── Raid boss section ──────────────────────── */

.raid-boss-section {
  text-align: center;
  margin-bottom: 20px;
}

.raid-boss-section h3 {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 6px;
}

.raid-boss-section p {
  color: var(--text-secondary);
  font-size: 13px;
  margin-bottom: 16px;
}

.raid-boss-card-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
  position: relative;
}

/* Boss damage shake */
.raid-boss-card-wrap.boss-hit {
  animation: bossHit 0.3s ease;
}

@keyframes bossHit {
  0%, 100% { transform: translateX(0); }
  15%      { transform: translateX(-8px) rotate(-1deg); }
  30%      { transform: translateX(8px) rotate(1deg); }
  45%      { transform: translateX(-6px); }
  60%      { transform: translateX(6px); }
  75%      { transform: translateX(-3px); }
}

/* Boss HP bar (arena version) */
.raid-arena-hp-wrap {
  max-width: 400px;
  margin: 0 auto 24px;
}

.raid-arena-hp-bar {
  height: 12px;
  background: var(--bg-surface3);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0,0,0,.1);
}

.raid-arena-hp-fill {
  height: 100%;
  background: linear-gradient(90deg, #E53935, #FF7043);
  border-radius: 6px;
  transition: width 0.6s cubic-bezier(.4,0,.2,1);
  position: relative;
}

/* HP bar flash on damage */
.raid-arena-hp-fill.hp-flash {
  animation: hpFlash 0.3s ease;
}

@keyframes hpFlash {
  0%, 100% { filter: brightness(1); }
  50%      { filter: brightness(2); }
}

.raid-arena-hp-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 600;
  margin-top: 4px;
}

/* Raid attacker card pulse on click */
.raid-card-attacking {
  animation: raidAttackPulse 0.3s ease;
}

@keyframes raidAttackPulse {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.08); box-shadow: 0 0 20px rgba(255,69,0,.5); }
  100% { transform: scale(1); }
}

.raid-card-used {
  opacity: 0.35;
  filter: grayscale(0.6);
  pointer-events: none;
  transition: opacity 0.4s ease, filter 0.4s ease;
}

/* ─── Team battle grid ───────────────────────── */

.team-battle-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: start;
  margin-top: 16px;
}

.team-column-label {
  font-weight: 700;
  margin-bottom: 12px;
  text-align: center;
  font-size: 15px;
}

.team-card-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.team-card-list .card {
  animation: teamCardReveal 0.4s cubic-bezier(.23,1,.32,1) both;
  animation-delay: var(--reveal-delay, 0ms);
}

@keyframes teamCardReveal {
  from { opacity: 0; transform: scale(0.7) translateY(20px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.team-vs-divider {
  padding-top: 80px;
  font-size: 28px;
  font-weight: 900;
  color: var(--reddit-orange);
}

/* ─── Card picker ────────────────────────────── */

.card-picker-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
  text-align: center;
}

.card-picker-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 20px;
}

.card-picker-grid .card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.card-picker-grid .card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,.15);
}

/* Stagger entrance for picker cards */
.card-picker-grid .card {
  animation: pickerCardIn 0.3s cubic-bezier(.23,1,.32,1) both;
  animation-delay: var(--pick-delay, 0ms);
}

@keyframes pickerCardIn {
  from { opacity: 0; transform: translateY(20px) scale(0.9); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ─── Battle action buttons ──────────────────── */

.battle-actions {
  text-align: center;
  margin-top: 20px;
  animation: fadeInUp 0.4s ease both;
  animation-delay: 0.6s;
  opacity: 0;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── Responsive ─────────────────────────────── */

@media (max-width: 680px) {
  .battle-stage { gap: 16px; }
  .team-battle-grid { grid-template-columns: 1fr; gap: 12px; }
  .team-vs-divider { padding-top: 0; text-align: center; }
  .battle-result-banner { font-size: 18px; padding: 12px 16px; }
}

/* ═══════════════════════════════════════════════
   NEW BATTLE SYSTEM — Turn-Based Duel, Raid Phases, Team Draft
═══════════════════════════════════════════════ */

/* ─── Card info button (battle pickers) ──────────────── */

.battle-card-info-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(0,0,0,.45);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  pointer-events: auto !important;
  opacity: 0;
  transition: opacity 0.15s ease, background 0.15s ease;
  line-height: 1;
  border: none;
}

.card:hover .battle-card-info-btn,
.card--disabled .battle-card-info-btn {
  opacity: 1;
}

.battle-card-info-btn:hover {
  background: rgba(0,0,0,.75);
}

/* ─── Shared ──────────────────────────────────────────── */

.battle-sub-hint {
  text-align: center;
  color: var(--text-secondary);
  font-size: 13px;
  margin-bottom: 18px;
  margin-top: -8px;
}

.battle-float-label {
  position: absolute;
  font-size: 15px;
  font-weight: 900;
  pointer-events: none;
  z-index: 12;
  left: 50%;
  top: 20%;
  transform: translateX(-50%);
  animation: damageFloat 1s cubic-bezier(.23,1,.32,1) forwards;
  white-space: nowrap;
  text-shadow: 0 2px 6px rgba(0,0,0,.3);
}

.float-crit  { color: #FF6F00; font-size: 20px; }
.float-shield { color: #1565C0; }

/* ─── Duel header (HP bars + round badge) ─────────────── */

.duel-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 20px;
}

.duel-side {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.duel-side.align-right {
  text-align: right;
}

.duel-side-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.duel-hp-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.duel-side.align-right .duel-hp-row {
  flex-direction: row-reverse;
}

.duel-hp-track {
  flex: 1;
  height: 10px;
  background: var(--bg-surface3);
  border-radius: 5px;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0,0,0,.1);
}

.duel-hp-fill {
  height: 100%;
  border-radius: 5px;
  transition: width 0.5s cubic-bezier(.4,0,.2,1), background 0.5s ease;
  background: linear-gradient(90deg, #2E7D32, #43A047);
}

.duel-hp-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  white-space: nowrap;
  min-width: 80px;
}

.duel-round-badge {
  flex-shrink: 0;
  background: var(--reddit-orange);
  color: #fff;
  font-weight: 900;
  font-size: 13px;
  padding: 4px 12px;
  border-radius: 20px;
  align-self: center;
  letter-spacing: 0.04em;
  transition: transform 0.2s ease;
}

.round-bump {
  animation: roundBump 0.35s cubic-bezier(.17,.67,.29,1.4);
}

@keyframes roundBump {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.35); }
  100% { transform: scale(1); }
}

/* ─── Duel combat card animations ────────────────────── */

.duel-card-lunge {
  animation: cardLunge 0.18s ease-out;
}

@keyframes cardLunge {
  0%   { transform: translateX(0) scale(1); }
  60%  { transform: translateX(18px) scale(1.04); }
  100% { transform: translateX(0) scale(1); }
}

.battle-stage-opponent .duel-card-lunge {
  animation-name: cardLungeOpp;
}

@keyframes cardLungeOpp {
  0%   { transform: translateX(0) scale(1); }
  60%  { transform: translateX(-18px) scale(1.04); }
  100% { transform: translateX(0) scale(1); }
}

.duel-card-hit {
  animation: cardHit 0.35s ease;
}

@keyframes cardHit {
  0%,100% { transform: translateX(0); filter: brightness(1); }
  20%     { transform: translateX(-10px); filter: brightness(1.6) saturate(0.3); }
  50%     { transform: translateX(8px);  filter: brightness(1.3); }
  75%     { transform: translateX(-5px); }
}

/* ─── Duel move buttons ───────────────────────────────── */

.duel-moves {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 16px;
  animation: fadeInUp 0.3s ease both;
  animation-delay: 0.8s;
  opacity: 0;
}

.duel-move-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 20px;
  min-width: 100px;
  background: var(--bg-surface2);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all 0.18s ease;
  font-family: var(--font);
}

.duel-move-btn:hover:not(:disabled) {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.duel-move-btn:active:not(:disabled) {
  transform: scale(0.96);
}

.move-strike:hover:not(:disabled) {
  border-color: #E53935;
  background: #fff5f5;
}
.move-guard:hover:not(:disabled) {
  border-color: #1565C0;
  background: #f0f4ff;
}
.move-karma:hover:not(:disabled) {
  border-color: #FF6F00;
  background: #fff8f0;
}

.move-icon { font-size: 22px; }
.move-name { font-size: 13px; font-weight: 700; }
.move-stat { font-size: 11px; color: var(--text-secondary); }

.duel-move-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.move-locked {
  opacity: 0.3 !important;
  cursor: not-allowed;
  text-decoration: line-through;
}

/* ─── Duel log ────────────────────────────────────────── */

.duel-log {
  min-height: 60px;
  max-height: 110px;
  overflow-y: auto;
  padding: 8px 12px;
  background: var(--bg-surface2);
  border-radius: var(--radius-md);
  margin: 12px 0 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
  scrollbar-width: thin;
}

.duel-log-line {
  font-size: 12px;
  font-weight: 600;
  padding: 2px 0;
  animation: fadeInUp 0.2s ease both;
}

.log-player  { color: #1B5E20; }
.log-enemy   { color: #B71C1C; }
.log-neutral { color: var(--text-secondary); }

/* ─── Raid phase header ───────────────────────────────── */

.raid-phase-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 16px;
  border-radius: var(--radius-lg);
  margin-bottom: 14px;
  background: var(--bg-surface2);
  border: 1px solid var(--border);
  transition: background 0.5s ease;
}

.raid-phase-header.phase-2 { background: #FFF3E0; border-color: #FF6F00; }
.raid-phase-header.phase-3 { background: #F3E5F5; border-color: #7B1FA2; }

.raid-phase-label {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.phase-2 .raid-phase-label { color: #E65100; }
.phase-3 .raid-phase-label { color: #6A1B9A; }

.raid-phase-pips {
  display: flex;
  align-items: center;
  gap: 6px;
}

.raid-pip {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--bg-surface3);
  border: 2px solid var(--border-dk);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  color: var(--text-secondary);
  transition: all 0.4s ease;
}

.raid-pip.active {
  background: var(--reddit-orange);
  border-color: var(--reddit-orange-dk);
  color: #fff;
  box-shadow: 0 0 8px rgba(255,69,0,.4);
}

.raid-pip-bar {
  width: 24px;
  height: 3px;
  background: var(--border-dk);
  border-radius: 2px;
  transition: background 0.4s ease;
}

.raid-pip-bar.active {
  background: var(--reddit-orange);
}

/* ─── Raid shield ─────────────────────────────────────── */

.raid-shield-banner {
  background: linear-gradient(135deg, #E3F2FD, #BBDEFB);
  border: 1px solid #1565C0;
  border-radius: var(--radius-lg);
  padding: 12px 16px;
  margin-bottom: 14px;
  font-size: 13px;
  font-weight: 700;
  color: #0D47A1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: shieldAppear 0.5s cubic-bezier(.23,1,.32,1) both;
}

@keyframes shieldAppear {
  from { opacity: 0; transform: scaleY(0.6); }
  to   { opacity: 1; transform: scaleY(1); }
}

.shield-shatter {
  animation: shieldShatter 0.6s ease forwards !important;
}

@keyframes shieldShatter {
  0%   { opacity: 1; transform: scale(1); filter: brightness(1); }
  40%  { transform: scale(1.05); filter: brightness(2); }
  100% { opacity: 0; transform: scale(0.8) translateY(-10px); }
}

.raid-shield-bar-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.raid-shield-bar {
  flex: 1;
  height: 8px;
  background: rgba(21,101,192,.2);
  border-radius: 4px;
  overflow: hidden;
}

.raid-shield-fill {
  height: 100%;
  background: linear-gradient(90deg, #1565C0, #42A5F5);
  border-radius: 4px;
  transition: width 0.5s cubic-bezier(.4,0,.2,1);
}

.raid-shield-label {
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

/* ─── Raid weak point banner ──────────────────────────── */

.raid-weakpoint-banner {
  background: linear-gradient(135deg, #F3E5F5, #E1BEE7);
  border: 1px solid #7B1FA2;
  border-radius: var(--radius-lg);
  padding: 10px 16px;
  margin-bottom: 14px;
  font-size: 14px;
  font-weight: 800;
  color: #4A148C;
  text-align: center;
  animation: weakpointPulse 2s ease infinite;
}

@keyframes weakpointPulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(123,31,162,.3); }
  50%     { box-shadow: 0 0 0 6px rgba(123,31,162,.0); }
}

/* ─── Boss enrage / weakpoint glow ───────────────────── */

.boss-enraged .card {
  box-shadow: 0 0 20px rgba(255,111,0,.5), 0 0 40px rgba(255,111,0,.2);
  animation: bossEnragePulse 1.5s ease infinite;
}

@keyframes bossEnragePulse {
  0%,100% { box-shadow: 0 0 20px rgba(255,111,0,.5), 0 0 40px rgba(255,111,0,.2); }
  50%     { box-shadow: 0 0 30px rgba(255,111,0,.8), 0 0 60px rgba(255,111,0,.3); }
}

.boss-weakpoint .card {
  animation: bossWeakpointFlicker 0.8s ease infinite;
}

@keyframes bossWeakpointFlicker {
  0%,100% { box-shadow: 0 0 20px rgba(123,31,162,.6); filter: brightness(1); }
  50%     { box-shadow: 0 0 40px rgba(123,31,162,.9); filter: brightness(1.15); }
}

/* ─── Raid stun ───────────────────────────────────────── */

.raid-card-stunned {
  opacity: 0.3 !important;
  filter: grayscale(1) brightness(0.6) !important;
  pointer-events: none !important;
  transition: all 0.4s ease;
  position: relative;
}

.raid-card-stunned::after {
  content: '⚡ Stunned';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  color: #FF6F00;
  background: rgba(0,0,0,.35);
  border-radius: 12px;
}

/* ─── Raid hint ───────────────────────────────────────── */

.raid-hint {
  text-align: center;
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 600;
  margin-bottom: 16px;
}

/* ─── Team draft layout ───────────────────────────────── */

.team-draft-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 4px;
}

.team-section-title {
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.team-slot-count {
  font-size: 13px;
  font-weight: 600;
  color: var(--reddit-orange);
}

.team-opp-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.team-mystery-card {
  width: 100px;
  aspect-ratio: 2/3;
  background: var(--bg-surface3);
  border: 2px dashed var(--border-dk);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: var(--text-meta);
  animation: pickerCardIn 0.3s ease both;
}

.team-synergy-badge {
  background: linear-gradient(135deg, #FFF8E1, #FFF3E0);
  border: 1px solid #FF6F00;
  color: #E65100;
  font-size: 12px;
  font-weight: 800;
  padding: 5px 10px;
  border-radius: 20px;
  margin-bottom: 10px;
  display: inline-block;
  animation: fadeInUp 0.3s ease both;
}

.team-synergy-badge-sm {
  font-size: 11px;
  font-weight: 700;
  color: #E65100;
  padding: 2px 8px;
  background: #FFF3E0;
  border-radius: 10px;
}

.team-synergy-empty {
  font-size: 12px;
  color: var(--text-meta);
  margin-bottom: 8px;
}

.team-chosen-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 60px;
}

.team-pick-hint {
  font-size: 13px;
  color: var(--text-meta);
  font-style: italic;
  align-self: center;
}

.team-chosen-slot {
  position: relative;
}

.team-remove-btn {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #E53935;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  cursor: pointer;
  border: 2px solid #fff;
  transition: transform 0.15s ease;
}

.team-remove-btn:hover {
  transform: scale(1.2);
}

.team-card-chosen {
  opacity: 0.3;
  filter: grayscale(0.5);
  pointer-events: none;
}

.team-fight-btn {
  margin-top: 12px;
  animation: bannerSlam 0.5s cubic-bezier(.17,.67,.29,1.35) both;
  font-size: 16px;
  padding: 12px 32px;
}

.team-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 20px 0 16px;
}

/* ─── Team battle reveal ──────────────────────────────── */

.team-battle-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 20px;
}

.team-score {
  font-size: 32px;
  font-weight: 900;
  color: var(--text-secondary);
  transition: color 0.3s ease;
  letter-spacing: 0.05em;
}

.team-score.score-win  { color: #2E7D32; }
.team-score.score-loss { color: #B71C1C; }

.team-matchup-stage {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 16px;
}

.team-matchup-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  animation: teamRowReveal 0.4s cubic-bezier(.23,1,.32,1) both;
  flex-wrap: wrap;
}

@keyframes teamRowReveal {
  from { opacity: 0; transform: translateY(20px) scale(0.92); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.team-matchup-vs {
  font-size: 18px;
  font-weight: 900;
  color: var(--reddit-orange);
  flex-shrink: 0;
}

.team-battle-log {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 14px;
  background: var(--bg-surface2);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
}

.team-log-line {
  font-size: 12px;
  font-weight: 600;
  animation: fadeInUp 0.2s ease both;
}

/* ─── Responsive updates ──────────────────────────────── */

@media (max-width: 680px) {
  .duel-header     { gap: 8px; }
  .duel-hp-label   { display: none; }
  .duel-moves      { gap: 6px; }
  .duel-move-btn   { min-width: 80px; padding: 10px 12px; }
  .team-draft-grid { grid-template-columns: 1fr; }
  .team-matchup-row { gap: 10px; }
}
