/* ==========================================================================
   WORD DUEL (1 VS 1 BATTLE ARENA) STYLESHEET
   ========================================================================== */

.duel-hub-container {
  max-width: 1050px;
  margin: 3rem auto;
  padding: 0 1.5rem;
  font-family: 'Poppins', system-ui, -apple-system, sans-serif;
}

.duel-hub-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.duel-header-badge {
  display: inline-flex;
  align-items: center;
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.25);
  padding: 0.35rem 1rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.duel-hub-title {
  font-size: 3rem;
  font-weight: 900;
  color: #0f172a;
  margin: 0 0 0.75rem 0;
  letter-spacing: -0.02em;
}

.duel-hub-subtitle {
  font-size: 1.15rem;
  color: #64748b;
  max-width: 680px;
  margin: 0 auto;
  line-height: 1.6;
}

.duel-user-status-bar {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 1.25rem;
  padding: 1rem 1.75rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.03);
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.status-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.status-icon {
  font-size: 1.8rem;
}

.status-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
}

.status-val {
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
}

.status-item.booster-active .status-val {
  color: #f59e0b;
}

/* Duel ELO Status Bar (Debajo de Nivel y Miel) */
.duel-elo-status-bar {
  background: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: 1.25rem;
  padding: 1.1rem 1.5rem;
  margin-top: -1.25rem;
  margin-bottom: 2.5rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  transition: all 0.25s ease;
}

.elo-bar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.elo-header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.elo-shield-icon {
  font-size: 1.8rem;
  line-height: 1;
}

.elo-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.elo-level-badge {
  font-size: 1.25rem;
  font-weight: 900;
  color: #0f172a;
}

.elo-header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.elo-total-badge {
  background: rgba(244, 63, 94, 0.1);
  color: #e11d48;
  border: 1px solid rgba(244, 63, 94, 0.25);
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.82rem;
  font-weight: 800;
}

.elo-progress-text {
  font-size: 0.88rem;
  font-weight: 700;
  color: #475569;
}

.elo-progress-track {
  width: 100%;
  height: 10px;
  background: #f1f5f9;
  border-radius: 9999px;
  overflow: hidden;
  position: relative;
}

.elo-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #f43f5e 0%, #fb7185 50%, #f59e0b 100%);
  border-radius: 9999px;
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 10px rgba(244, 63, 94, 0.5);
}

.elo-bar-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: #64748b;
  font-weight: 600;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.duel-section-title-box {
  margin-bottom: 1.5rem;
}

.duel-section-title-box h2 {
  font-size: 1.5rem;
  font-weight: 800;
  color: #1e293b;
  margin: 0 0 0.35rem 0;
  display: flex;
  align-items: center;
}

.duel-section-title-box p {
  color: #64748b;
  font-size: 0.95rem;
  margin: 0;
}

/* Bot Difficulties Grid */
.bot-difficulties-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3.5rem;
}

.bot-card {
  background: #ffffff;
  border-radius: 1.25rem;
  padding: 1.75rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
  border: 2px solid #e2e8f0;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.bot-card:hover {
  transform: translateY(-4px);
}

.bot-card.difficulty-novice:hover {
  border-color: #10b981;
  box-shadow: 0 12px 30px rgba(16, 185, 129, 0.15);
}

.bot-card.difficulty-master:hover {
  border-color: #f59e0b;
  box-shadow: 0 12px 30px rgba(245, 158, 11, 0.15);
}

.bot-card.difficulty-champion:hover {
  border-color: #ef4444;
  box-shadow: 0 12px 30px rgba(239, 68, 68, 0.18);
}

.bot-card-top {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.bot-avatar-box {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  font-size: 2.2rem;
  border: 2px solid #e2e8f0;
  flex-shrink: 0;
}

.difficulty-novice .bot-avatar-box { background: #ecfdf5; border-color: #a7f3d0; }
.difficulty-master .bot-avatar-box { background: #fffbeb; border-color: #fde68a; }
.difficulty-champion .bot-avatar-box { background: #fef2f2; border-color: #fecaca; }

.bot-diff-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.diff-novice { background: #d1fae5; color: #065f46; }
.diff-master { background: #fef3c7; color: #92400e; }
.diff-champion { background: #fee2e2; color: #991b1b; }

.bot-name {
  font-size: 1.35rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
}

.bot-title {
  font-size: 0.85rem;
  color: #64748b;
  font-weight: 500;
}

.bot-stats-box {
  background: #f8fafc;
  border-radius: 0.9rem;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.bot-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.88rem;
}

.bot-stat-lbl { color: #64748b; font-weight: 600; }
.bot-stat-val { color: #1e293b; font-weight: 700; }

.btn-start-duel {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.5rem;
  border-radius: 0.9rem;
  font-size: 1rem;
  font-weight: 800;
  color: #ffffff;
  text-decoration: none;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.btn-duel-novice {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}
.btn-duel-novice:hover {
  background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
  transform: translateY(-2px);
}

.btn-duel-master {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.3);
}
.btn-duel-master:hover {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  transform: translateY(-2px);
}

.btn-duel-champion {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35);
}
.btn-duel-champion:hover {
  background: linear-gradient(135deg, #f87171 0%, #ef4444 100%);
  transform: translateY(-2px);
}

/* Rules Card */
.duel-rules-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 1.25rem;
  padding: 2rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
}

.rules-header {
  display: flex;
  align-items: center;
  margin-bottom: 1.5rem;
}

.rules-header h3 {
  font-size: 1.25rem;
  font-weight: 800;
  color: #1e293b;
  margin: 0;
}

.rules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.rule-item {
  display: flex;
  gap: 0.85rem;
}

.rule-icon { font-size: 1.75rem; flex-shrink: 0; }
.rule-item strong { display: block; color: #0f172a; font-size: 0.95rem; margin-bottom: 0.25rem; }
.rule-item p { margin: 0; font-size: 0.85rem; color: #64748b; line-height: 1.5; }


/* ==========================================================================
   BATTLE ARENA (PRACTICE MATCH)
   ========================================================================== */

.duel-arena-wrapper {
  max-width: 1200px;
  margin: 1.5rem auto;
  padding: 0 1.25rem;
  font-family: 'Poppins', system-ui, -apple-system, sans-serif;
  user-select: none;
}

.duel-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.btn-surrender-duel {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  color: #64748b;
  border-radius: 0.75rem;
  font-weight: 700;
  font-size: 0.88rem;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-surrender-duel:hover {
  background: #fee2e2;
  color: #ef4444;
  border-color: #fca5a5;
}

.duel-match-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.duel-badge-mode {
  background: #0f172a;
  color: #ffffff;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
}

.duel-round-counter {
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
}

.duel-diff-pill {
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 800;
}

/* Battlefield layout */
.duel-battlefield {
  display: grid;
  grid-template-columns: 280px 1fr 280px;
  gap: 2rem;
  align-items: start;
}

/* Fighter Cards */
.fighter-card {
  background: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: 1.5rem;
  padding: 2rem 1.5rem;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

.fighter-card.damage-impact {
  animation: screenShake 0.5s ease-in-out;
  border-color: #ef4444 !important;
  box-shadow: 0 0 35px rgba(239, 68, 68, 0.6) !important;
}

@keyframes screenShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-12px) rotate(-2deg); }
  40%, 80% { transform: translateX(12px) rotate(2deg); }
}

.fighter-avatar-wrapper {
  position: relative;
  width: 100px;
  height: 100px;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fighter-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 3.5px solid #38bdf8;
  position: relative;
  z-index: 2;
}

.bot-avatar-inner {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  position: relative;
  z-index: 2;
}

.diff-bg-novice { background: linear-gradient(135deg, #d1fae5 0%, #10b981 100%); border: 3.5px solid #059669; }
.diff-bg-master { background: linear-gradient(135deg, #fef3c7 0%, #f59e0b 100%); border: 3.5px solid #d97706; }
.diff-bg-champion { background: linear-gradient(135deg, #fee2e2 0%, #ef4444 100%); border: 3.5px solid #b91c1c; }

.fighter-name {
  font-size: 1.25rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 0.25rem 0;
}

.fighter-sub {
  font-size: 0.8rem;
  font-weight: 600;
  color: #64748b;
}

/* HP & Hearts */
.fighter-hp-container {
  width: 100%;
  margin: 1.25rem 0;
}

.fighter-hearts {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
}

.heart.lost {
  opacity: 0.2;
  filter: grayscale(1);
  transform: scale(0.85);
}

.hp-bar-outer {
  width: 100%;
  height: 12px;
  background: #e2e8f0;
  border-radius: 9999px;
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.hp-bar-fill {
  height: 100%;
  border-radius: 9999px;
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.player-hp-fill { background: linear-gradient(90deg, #38bdf8 0%, #0284c7 100%); }
.bot-hp-fill { background: linear-gradient(90deg, #f87171 0%, #ef4444 100%); }

/* Speech Bubble */
.fighter-bubble {
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  border-radius: 1rem;
  padding: 0.6rem 0.9rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #334155;
  width: 100%;
  box-sizing: border-box;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* CENTER STAGE */
.duel-center-stage {
  background: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: 1.75rem;
  padding: 2.5rem 2rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* 20-Second Circular Timer */
.duel-timer-box {
  position: relative;
  width: 110px;
  height: 110px;
  margin-bottom: 1.75rem;
}

.timer-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.timer-bg-circle {
  fill: none;
  stroke: #f1f5f9;
  stroke-width: 8;
}

.timer-progress-circle {
  fill: none;
  stroke: #38bdf8;
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 276.46;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 0.9s linear, stroke 0.3s ease;
}

.timer-number-box {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.timer-seconds {
  font-size: 2.2rem;
  font-weight: 900;
  color: #0f172a;
  line-height: 1;
}

.timer-sublabel {
  font-size: 0.65rem;
  font-weight: 800;
  color: #94a3b8;
  letter-spacing: 0.05em;
}

/* Audio button */
.duel-audio-zone {
  margin-bottom: 1.5rem;
}

.btn-duel-audio {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1.6rem;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  border: 1.5px solid #38bdf8;
  border-radius: 9999px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.3);
  transition: all 0.2s ease;
}

.btn-duel-audio:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.45);
}

.btn-duel-audio.playing {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  border-color: #34d399;
}

.audio-waves-mini {
  display: inline-flex;
  gap: 2px;
  height: 12px;
  align-items: flex-end;
}

.audio-waves-mini span {
  width: 2.5px;
  height: 100%;
  background: #ffffff;
  border-radius: 1px;
  animation: miniWave 0.7s ease-in-out infinite alternate;
}

.audio-waves-mini span:nth-child(2) { animation-delay: 0.2s; }
.audio-waves-mini span:nth-child(3) { animation-delay: 0.4s; }

@keyframes miniWave {
  0% { height: 20%; }
  100% { height: 100%; }
}

/* Word Mask */
.duel-word-hint-box {
  margin-bottom: 1.5rem;
}

.word-mask-letters {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
}

.mask-slot {
  font-size: 1.8rem;
  font-weight: 900;
  color: #94a3b8;
  letter-spacing: 0.1em;
}

/* Spell Input */
.duel-input-container {
  display: flex;
  gap: 0.6rem;
  width: 100%;
  max-width: 480px;
  margin-bottom: 1.5rem;
}

.duel-input {
  flex: 1;
  padding: 0.9rem 1.25rem;
  font-size: 1.1rem;
  font-weight: 700;
  border: 2px solid #cbd5e1;
  border-radius: 0.9rem;
  outline: none;
  transition: all 0.2s ease;
  text-align: center;
  letter-spacing: 0.03em;
  font-family: inherit;
}

.duel-input:focus {
  border-color: #0284c7;
  box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.15);
}

.duel-input.shake-error {
  animation: inputShake 0.4s ease;
  border-color: #ef4444;
  background: #fef2f2;
}

@keyframes inputShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-8px); }
  75% { transform: translateX(8px); }
}

.btn-submit-attack {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #ffffff;
  border: 1.5px solid #f87171;
  border-radius: 0.9rem;
  padding: 0.85rem 1.6rem;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.btn-submit-attack:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.5);
}

/* Combat Feed */
.duel-combat-feed {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 0.65rem 1.25rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: #64748b;
  width: 100%;
  max-width: 480px;
  box-sizing: border-box;
}

.feed-player-hit {
  background: #ecfdf5;
  color: #065f46;
  border-color: #a7f3d0;
}

.feed-bot-hit {
  background: #fef2f2;
  color: #991b1b;
  border-color: #fecaca;
}

/* Word Duel Power-Ups Bar (Vida Extra) */
.duel-powerups-bar {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  width: 100%;
}

.btn-extra-life-powerup {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.1rem;
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.15) 0%, rgba(225, 29, 72, 0.25) 100%);
  border: 1.5px solid #f43f5e;
  border-radius: 9999px;
  color: #ffffff;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(244, 63, 94, 0.25);
  transition: all 0.2s ease;
}

.btn-extra-life-powerup:hover:not(:disabled) {
  background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(244, 63, 94, 0.45);
}

.btn-extra-life-powerup:disabled,
.btn-extra-life-powerup.is-disabled {
  opacity: 0.5;
  cursor: not-allowed;
  border-color: #64748b;
  background: rgba(100, 116, 139, 0.2);
  box-shadow: none;
}

.btn-extra-life-powerup.used-match {
  opacity: 0.75;
  cursor: not-allowed;
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}

.powerup-heart-icon {
  font-size: 1.15rem;
  display: inline-block;
  animation: heartBeatPulse 1.5s infinite ease-in-out;
}

@keyframes heartBeatPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

.powerup-stock-pill {
  background: #f43f5e;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
}

.btn-extra-life-powerup.is-disabled .powerup-stock-pill {
  background: #64748b;
}

/* Word Duel Sword Power-Up Button (Espada de Duelo 🗡️) */
.btn-sword-powerup {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.1rem;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.18) 0%, rgba(59, 130, 246, 0.28) 100%);
  border: 1.5px solid #818cf8;
  border-radius: 9999px;
  color: #ffffff;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
  transition: all 0.2s ease;
}

.btn-sword-powerup:hover:not(:disabled) {
  background: linear-gradient(135deg, #6366f1 0%, #3b82f6 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.55);
}

.btn-sword-powerup:disabled,
.btn-sword-powerup.is-disabled {
  opacity: 0.5;
  cursor: not-allowed;
  border-color: #64748b;
  background: rgba(100, 116, 139, 0.2);
  box-shadow: none;
}

.btn-sword-powerup.used-match,
.btn-sword-powerup.used-round {
  opacity: 0.7;
  cursor: not-allowed;
  border-color: #6366f1;
  background: rgba(99, 102, 241, 0.25);
  color: #a5b4fc;
}

.powerup-sword-icon {
  font-size: 1.15rem;
  display: inline-block;
  animation: swordGlintPulse 2s infinite ease-in-out;
}

@keyframes swordGlintPulse {
  0%, 100% { transform: rotate(0deg) scale(1); }
  25% { transform: rotate(-15deg) scale(1.15); filter: drop-shadow(0 0 8px #60a5fa); }
  50% { transform: rotate(0deg) scale(1); }
}

.btn-sword-powerup .powerup-stock-pill {
  background: #6366f1;
}

.btn-sword-powerup.is-disabled .powerup-stock-pill {
  background: #64748b;
}

/* Floating Heal Animation */
@keyframes heartHealGlow {
  0% { transform: scale(0.8); opacity: 0; }
  50% { transform: scale(1.35); opacity: 1; filter: drop-shadow(0 0 18px #10b981); }
  100% { transform: scale(1); opacity: 1; }
}

.heart-healed-anim {
  animation: heartHealGlow 0.6s ease-out;
}

/* ==========================================================================
   Full-Screen Sword Slash Animation (Shedletsky Slash Effect)
   ========================================================================== */

.sword-slash-screen-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.sword-slash-line {
  position: absolute;
  width: 160vmax;
  height: 6px;
  background: linear-gradient(90deg, 
    transparent 0%, 
    rgba(255, 255, 255, 0.95) 25%, 
    #38bdf8 45%, 
    #818cf8 55%, 
    #ffffff 75%, 
    transparent 100%);
  box-shadow: 
    0 0 25px 8px rgba(56, 189, 248, 0.9),
    0 0 50px 18px rgba(99, 102, 241, 0.8),
    0 0 90px 30px rgba(255, 255, 255, 0.7);
  transform: rotate(-32deg) scaleX(0);
  transform-origin: center;
  animation: swordSlashCut 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes swordSlashCut {
  0% {
    transform: rotate(-32deg) scaleX(0);
    opacity: 0;
  }
  20% {
    opacity: 1;
  }
  50% {
    transform: rotate(-32deg) scaleX(1);
    opacity: 1;
    height: 12px;
  }
  100% {
    transform: rotate(-32deg) scaleX(1.3);
    opacity: 0;
    height: 2px;
  }
}

.sword-slash-burst {
  position: absolute;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.9) 0%, rgba(56, 189, 248, 0.8) 35%, rgba(99, 102, 241, 0.4) 65%, transparent 100%);
  filter: blur(8px);
  animation: swordBurstPop 0.5s ease-out forwards;
}

@keyframes swordBurstPop {
  0% { transform: scale(0.2); opacity: 0.9; }
  60% { transform: scale(1.6); opacity: 1; }
  100% { transform: scale(2.4); opacity: 0; }
}

.fighter-card-slashed {
  animation: fighterSlashShake 0.65s cubic-bezier(0.36, 0.07, 0.19, 0.97) both !important;
  position: relative;
}

.fighter-card-slashed::after {
  content: '';
  position: absolute;
  inset: -10px;
  border-radius: 1.5rem;
  background: radial-gradient(circle, rgba(239, 68, 68, 0.45) 0%, rgba(220, 38, 38, 0.2) 60%, transparent 100%);
  box-shadow: 0 0 30px rgba(239, 68, 68, 0.8);
  pointer-events: none;
  animation: slashImpactFlash 0.6s ease-out forwards;
}

@keyframes fighterSlashShake {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg); }
  10%, 30%, 50%, 70%, 90% { transform: translate3d(-10px, 4px, 0) rotate(-4deg); filter: brightness(1.6) saturate(1.8); }
  20%, 40%, 60%, 80% { transform: translate3d(10px, -4px, 0) rotate(4deg); }
}

@keyframes slashImpactFlash {
  0% { opacity: 1; transform: scale(0.95); }
  50% { opacity: 1; transform: scale(1.1); }
  100% { opacity: 0; transform: scale(1.2); }
}

/* Result Modal */
.duel-result-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3, 7, 18, 0.85);
  backdrop-filter: blur(8px);
  z-index: 20000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.duel-result-card {
  background: #ffffff;
  border-radius: 1.75rem;
  padding: 2.5rem 2rem;
  max-width: 440px;
  width: 100%;
  text-align: center;
  box-shadow: 0 25px 60px rgba(0,0,0,0.3);
  animation: modalScaleUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalScaleUp {
  0% { transform: scale(0.85); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.result-icon-box {
  font-size: 3.5rem;
  margin-bottom: 0.75rem;
}

.result-title {
  font-size: 1.85rem;
  font-weight: 900;
  margin: 0 0 0.5rem 0;
}

.result-subtitle {
  color: #64748b;
  font-size: 0.95rem;
  margin: 0 0 1.5rem 0;
}

.result-rewards-box {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.reward-pill {
  background: #fffbeb;
  border: 1.5px solid #fde68a;
  border-radius: 9999px;
  padding: 0.45rem 1.1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.95rem;
  color: #92400e;
}

.result-stats-summary {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  padding: 1rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-bottom: 1.75rem;
}

.summary-stat .lbl { display: block; font-size: 0.72rem; color: #94a3b8; font-weight: 600; text-transform: uppercase; margin-bottom: 0.2rem; }
.summary-stat .val { font-size: 1.15rem; font-weight: 800; color: #0f172a; }

.result-actions-row {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.btn-play-again {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  border: none;
  padding: 0.85rem 1.5rem;
  border-radius: 0.9rem;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);
  transition: all 0.2s ease;
}

.btn-play-again:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.45);
}

.btn-back-hub {
  color: #64748b;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  padding: 0.4rem;
  transition: color 0.15s ease;
}

.btn-back-hub:hover { color: #0f172a; }

/* Responsive Arena & 1v1 Battle Layout */
@media (max-width: 900px) {
  .duel-battlefield {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    grid-template-areas:
      "player opponent"
      "stage stage" !important;
    gap: 0.85rem !important;
  }

  .fighter-player {
    grid-area: player !important;
  }

  .fighter-opponent,
  .fighter-bot {
    grid-area: opponent !important;
  }

  .duel-center-stage {
    grid-area: stage !important;
    padding: 1.5rem 1rem !important;
  }

  .fighter-card {
    flex-direction: column !important;
    padding: 1rem 0.75rem !important;
    text-align: center !important;
    box-sizing: border-box !important;
    min-width: 0 !important;
  }

  .fighter-avatar-wrapper {
    width: 60px !important;
    height: 60px !important;
    margin-bottom: 0.5rem !important;
    margin-right: 0 !important;
  }

  .fighter-avatar,
  .bot-avatar-inner,
  .profile-avatar-placeholder {
    width: 60px !important;
    height: 60px !important;
    font-size: 1.8rem !important;
  }

  .fighter-name {
    font-size: 0.95rem !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 100% !important;
    margin-bottom: 0.15rem !important;
  }

  .fighter-sub {
    font-size: 0.75rem !important;
  }

  .fighter-hp-container {
    max-width: 100% !important;
    margin: 0.5rem 0 0 0 !important;
  }

  .fighter-hearts {
    font-size: 1rem !important;
    gap: 0.25rem !important;
    margin-bottom: 0.35rem !important;
  }

  .hp-bar-outer {
    height: 9px !important;
  }

  .fighter-bubble {
    display: none !important;
  }
}

@media (max-width: 600px) {
  .duel-hub-container,
  .duel-arena-wrapper {
    padding: 0.85rem 0.65rem !important;
    border-radius: 1.25rem !important;
    margin: 0.5rem auto !important;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100vw !important;
  }

  .duel-top-bar {
    margin-bottom: 0.75rem !important;
    gap: 0.5rem !important;
  }

  .btn-surrender-duel {
    padding: 0.35rem 0.65rem !important;
    font-size: 0.78rem !important;
  }

  .duel-badge-mode {
    font-size: 0.72rem !important;
    padding: 0.25rem 0.6rem !important;
  }

  .duel-round-counter {
    font-size: 0.95rem !important;
  }

  .duel-diff-pill {
    font-size: 0.75rem !important;
    padding: 0.25rem 0.6rem !important;
  }

  .duel-battlefield {
    gap: 0.5rem !important;
  }

  .fighter-card {
    padding: 0.65rem 0.4rem !important;
    border-radius: 0.9rem !important;
  }

  .fighter-avatar-wrapper {
    width: 48px !important;
    height: 48px !important;
    margin-bottom: 0.35rem !important;
  }

  .fighter-avatar,
  .bot-avatar-inner,
  .profile-avatar-placeholder {
    width: 48px !important;
    height: 48px !important;
    font-size: 1.5rem !important;
  }

  .fighter-name {
    font-size: 0.82rem !important;
  }

  .fighter-sub {
    font-size: 0.68rem !important;
  }

  .fighter-hearts {
    font-size: 0.88rem !important;
    gap: 0.2rem !important;
  }

  .hp-bar-outer {
    height: 7px !important;
  }

  /* Center Stage */
  .duel-center-stage {
    padding: 1rem 0.65rem !important;
    border-radius: 1rem !important;
  }

  .duel-timer-box {
    width: 70px !important;
    height: 70px !important;
    margin-bottom: 0.75rem !important;
  }

  .timer-seconds {
    font-size: 1.5rem !important;
  }

  .timer-sublabel {
    font-size: 0.55rem !important;
  }

  .duel-audio-zone {
    margin-bottom: 0.75rem !important;
    width: 100% !important;
  }

  .btn-duel-audio {
    width: 100% !important;
    justify-content: center !important;
    padding: 0.6rem 1rem !important;
    font-size: 0.88rem !important;
    box-sizing: border-box !important;
  }

  .duel-word-hint-box {
    margin-bottom: 0.75rem !important;
  }

  .mask-slot {
    font-size: 1.3rem !important;
  }

  .duel-input-container {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.45rem !important;
    width: 100% !important;
    margin-bottom: 0.75rem !important;
  }

  .duel-input {
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 0.7rem 0.75rem !important;
    font-size: 0.95rem !important;
    border-radius: 0.75rem !important;
  }

  .btn-submit-attack {
    width: 100% !important;
    justify-content: center !important;
    padding: 0.75rem 1rem !important;
    font-size: 0.92rem !important;
    box-sizing: border-box !important;
    border-radius: 0.75rem !important;
  }

  .duel-combat-feed {
    font-size: 0.76rem !important;
    padding: 0.45rem 0.65rem !important;
    line-height: 1.35 !important;
  }
}

/* ==========================================================================
   PVP MULTIPLAYER STYLES
   ========================================================================== */

.pvp-modes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.pvp-card {
  background: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: 1.25rem;
  padding: 1.75rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.pvp-card:hover {
  transform: translateY(-4px);
}

.pvp-matchmaking-card:hover {
  border-color: #ef4444;
  box-shadow: 0 12px 30px rgba(239, 68, 68, 0.15);
}

.pvp-create-card:hover {
  border-color: #f59e0b;
  box-shadow: 0 12px 30px rgba(245, 158, 11, 0.15);
}

.pvp-join-card:hover {
  border-color: #0284c7;
  box-shadow: 0 12px 30px rgba(2, 132, 199, 0.15);
}

.pvp-card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.pvp-icon-box {
  width: 52px;
  height: 52px;
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.pvp-card-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
}

.pvp-card-subtitle {
  font-size: 0.82rem;
  font-weight: 600;
  color: #64748b;
}

.pvp-card-desc {
  font-size: 0.9rem;
  color: #64748b;
  line-height: 1.5;
  margin-bottom: 1.5rem;
}

.pvp-card-desc-mini {
  font-size: 0.78rem;
  color: #94a3b8;
  margin-top: 0.6rem;
  margin-bottom: 0;
}

.btn-pvp-action {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.25rem;
  border-radius: 0.9rem;
  font-size: 0.95rem;
  font-weight: 800;
  color: #ffffff;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.btn-pvp-queue {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35);
}
.btn-pvp-queue:hover {
  background: linear-gradient(135deg, #f87171 0%, #ef4444 100%);
  transform: translateY(-2px);
}

.btn-pvp-create {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
}
.btn-pvp-create:hover {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  transform: translateY(-2px);
}

.pvp-join-form {
  width: 100%;
}

.pvp-join-input-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
}

.pvp-code-input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.85rem 1rem;
  border: 2px solid #cbd5e1;
  border-radius: 0.9rem;
  font-weight: 800;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-align: center;
  outline: none;
  transition: all 0.2s ease;
  background: #f8fafc;
}

.pvp-code-input:focus {
  border-color: #0284c7;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.15);
}

.btn-pvp-join {
  width: 100%;
  padding: 0.85rem 1.25rem;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);
}

.btn-pvp-join:hover {
  background: linear-gradient(135deg, #38bdf8 0%, #0284c7 100%);
  transform: translateY(-2px);
}

.duel-divider {
  border: 0;
  height: 1px;
  background: #e2e8f0;
  margin: 3rem 0;
}

.duel-room-badge {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #b45309;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
}

.duel-room-badge:hover {
  background: #fef3c7;
  transform: scale(1.05);
}

/* Waiting Lobby */
.pvp-waiting-lobby {
  background: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: 2rem;
  padding: 3.5rem 2rem;
  text-align: center;
  max-width: 620px;
  margin: 2rem auto;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.06);
}

.waiting-radar-pulse {
  position: relative;
  width: 90px;
  height: 90px;
  margin: 0 auto 2rem auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.radar-icon {
  font-size: 2.8rem;
  z-index: 2;
  position: relative;
}

.radar-wave {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid #38bdf8;
  opacity: 0;
  animation: radarPulse 2.4s cubic-bezier(0.25, 1, 0.5, 1) infinite;
}

.wave-1 { animation-delay: 0s; }
.wave-2 { animation-delay: 0.8s; }
.wave-3 { animation-delay: 1.6s; }

@keyframes radarPulse {
  0% { transform: scale(0.6); opacity: 0.9; }
  100% { transform: scale(2.4); opacity: 0; }
}

.waiting-title {
  font-size: 1.85rem;
  font-weight: 900;
  color: #0f172a;
  margin: 0 0 0.6rem 0;
}

.waiting-desc {
  color: #64748b;
  font-size: 1rem;
  max-width: 480px;
  margin: 0 auto 2rem auto;
  line-height: 1.6;
}

.waiting-code-display-box {
  background: #f8fafc;
  border: 2px dashed #38bdf8;
  border-radius: 1.25rem;
  padding: 1.25rem 2rem;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  margin-bottom: 2rem;
  transition: all 0.2s ease;
}

.waiting-code-display-box:hover {
  background: #f0f9ff;
  border-color: #0284c7;
  transform: scale(1.03);
}

.code-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.code-val {
  font-size: 2.2rem;
  font-weight: 900;
  color: #0284c7;
  letter-spacing: 0.08em;
}

.code-copy-tip {
  font-size: 0.78rem;
  color: #0369a1;
  font-weight: 700;
  margin-top: 0.25rem;
}

.waiting-actions {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  max-width: 360px;
  margin: 0 auto;
}

.btn-copy-link {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  border: none;
  padding: 0.85rem 1.5rem;
  border-radius: 0.9rem;
  font-weight: 800;
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);
  transition: all 0.2s ease;
}

.btn-copy-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.45);
}

.btn-practice-while-waiting {
  color: #64748b;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  padding: 0.5rem;
  transition: color 0.15s ease;
}

.btn-practice-while-waiting:hover {
  color: #0f172a;
}

/* ==========================================================================
   GALAXY COSMETIC THEME FOR WORD DUEL
   ========================================================================== */

.duel-hub-container.theme-galaxy,
.duel-arena-wrapper.theme-galaxy {
  background: radial-gradient(circle at 50% 20%, #2e1065 0%, #1e1035 45%, #0f0728 100%) !important;
  color: #ffffff !important;
  position: relative;
  overflow: hidden;
  border-radius: 2rem;
  padding: 2.5rem 2rem;
  border: 1.5px solid rgba(168, 85, 247, 0.45) !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7), 0 0 45px rgba(168, 85, 247, 0.25) !important;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
}

/* 1. Animated Nebula Layer in Normal (Unoptimized) Mode */
.duel-hub-container.theme-galaxy::before,
.duel-arena-wrapper.theme-galaxy::before {
  content: '';
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: 
    radial-gradient(circle at 25% 25%, rgba(168, 85, 247, 0.65) 0%, transparent 50%),
    radial-gradient(circle at 75% 65%, rgba(236, 72, 153, 0.55) 0%, transparent 50%),
    radial-gradient(circle at 40% 85%, rgba(56, 189, 248, 0.45) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(99, 102, 241, 0.55) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(192, 132, 252, 0.4) 0%, transparent 55%);
  background-size: 200% 200%;
  animation: duelNebulaFlow 10s infinite alternate ease-in-out;
  pointer-events: none;
  z-index: 0;
}

/* 2. Starfield Dust Texture Overlay */
.duel-hub-container.theme-galaxy::after,
.duel-arena-wrapper.theme-galaxy::after {
  content: '';
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background-image: 
    radial-gradient(2px 2px at 20px 30px, #ffffff, rgba(0,0,0,0)),
    radial-gradient(1.5px 1.5px at 90px 75px, #c084fc, rgba(0,0,0,0)),
    radial-gradient(2.5px 2.5px at 180px 140px, #38bdf8, rgba(0,0,0,0)),
    radial-gradient(1.5px 1.5px at 270px 50px, #f472b6, rgba(0,0,0,0)),
    radial-gradient(2px 2px at 340px 220px, #fef08a, rgba(0,0,0,0)),
    radial-gradient(1.5px 1.5px at 60px 190px, #ffffff, rgba(0,0,0,0)),
    radial-gradient(2px 2px at 230px 290px, #c084fc, rgba(0,0,0,0)),
    radial-gradient(1.5px 1.5px at 310px 130px, #38bdf8, rgba(0,0,0,0));
  background-repeat: repeat;
  background-size: 360px 360px;
  pointer-events: none;
  opacity: 0.85;
  z-index: 0;
}

.duel-hub-container.theme-galaxy > *:not(.galaxy-stars-overlay),
.duel-arena-wrapper.theme-galaxy > *:not(.galaxy-stars-overlay) {
  position: relative;
  z-index: 2;
}

@keyframes duelNebulaFlow {
  0% {
    background-position: 0% 0%;
    filter: hue-rotate(0deg) brightness(1.05);
    opacity: 0.85;
  }
  50% {
    background-position: 100% 70%;
    filter: hue-rotate(35deg) brightness(1.2);
    opacity: 1;
  }
  100% {
    background-position: 30% 100%;
    filter: hue-rotate(-25deg) brightness(1.1);
    opacity: 0.9;
  }
}

/* Header Badge in Galaxy Theme - High Contrast Glowing Pill */
.duel-hub-container.theme-galaxy .duel-header-badge,
.duel-arena-wrapper.theme-galaxy .duel-header-badge {
  background: rgba(244, 63, 94, 0.28) !important;
  color: #ffffff !important;
  border: 1.5px solid #fecdd3 !important;
  text-shadow: 0 0 10px rgba(244, 63, 94, 0.9), 0 0 3px rgba(0, 0, 0, 0.9) !important;
  box-shadow: 0 0 20px rgba(244, 63, 94, 0.45), inset 0 0 10px rgba(244, 63, 94, 0.25) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  font-weight: 800 !important;
  letter-spacing: 0.06em !important;
}

.duel-hub-container.theme-galaxy .duel-header-badge i,
.duel-arena-wrapper.theme-galaxy .duel-header-badge i {
  color: #fda4af !important;
  filter: drop-shadow(0 0 8px #f43f5e) !important;
}

/* Headings & Section Titles - Crystal Clear White */
.duel-hub-container.theme-galaxy .duel-hub-title,
.duel-arena-wrapper.theme-galaxy .duel-hub-title {
  color: #ffffff !important;
  text-shadow: 0 0 25px rgba(192, 132, 252, 0.8) !important;
}

.duel-hub-container.theme-galaxy .duel-hub-subtitle,
.duel-arena-wrapper.theme-galaxy .duel-hub-subtitle {
  color: #f1f5f9 !important;
}

.duel-hub-container.theme-galaxy .duel-section-title-box h2,
.duel-arena-wrapper.theme-galaxy .duel-section-title-box h2 {
  color: #ffffff !important;
  text-shadow: 0 0 20px rgba(192, 132, 252, 0.6) !important;
}

.duel-hub-container.theme-galaxy .duel-section-title-box p,
.duel-arena-wrapper.theme-galaxy .duel-section-title-box p {
  color: #e2e8f0 !important;
}

/* Cards & Containers in Galaxy Theme */
.duel-hub-container.theme-galaxy .duel-user-status-bar,
.duel-hub-container.theme-galaxy .duel-elo-status-bar,
.duel-hub-container.theme-galaxy .pvp-card,
.duel-hub-container.theme-galaxy .bot-card,
.duel-hub-container.theme-galaxy .duel-rules-card,
.duel-arena-wrapper.theme-galaxy .fighter-card,
.duel-arena-wrapper.theme-galaxy .duel-center-stage,
.duel-arena-wrapper.theme-galaxy .pvp-waiting-lobby {
  background: rgba(15, 23, 42, 0.85) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border: 1.5px solid rgba(192, 132, 252, 0.4) !important;
  color: #ffffff !important;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5), 0 0 25px rgba(168, 85, 247, 0.2) !important;
}

/* Text inside Status Bar & ELO Bar */
.duel-hub-container.theme-galaxy .status-label,
.duel-hub-container.theme-galaxy .elo-title {
  color: #cbd5e1 !important;
}

.duel-hub-container.theme-galaxy .status-val,
.duel-hub-container.theme-galaxy .elo-level-badge {
  color: #ffffff !important;
  font-weight: 800 !important;
}

.duel-hub-container.theme-galaxy .elo-progress-text {
  color: #e2e8f0 !important;
}

.duel-hub-container.theme-galaxy .elo-total-badge {
  background: rgba(244, 63, 94, 0.25) !important;
  color: #ffe4e6 !important;
  border-color: rgba(251, 113, 133, 0.5) !important;
}

.duel-hub-container.theme-galaxy .elo-progress-track {
  background: rgba(30, 41, 59, 0.8) !important;
}

.duel-hub-container.theme-galaxy .elo-bar-footer {
  color: #cbd5e1 !important;
}

/* Text inside PVP Cards */
.duel-hub-container.theme-galaxy .pvp-card-title {
  color: #ffffff !important;
}

.duel-hub-container.theme-galaxy .pvp-card-subtitle {
  color: #c084fc !important;
  font-weight: 700 !important;
}

.duel-hub-container.theme-galaxy .pvp-card-desc {
  color: #e2e8f0 !important;
}

.duel-hub-container.theme-galaxy .pvp-card-desc strong {
  color: #ffffff !important;
}

.duel-hub-container.theme-galaxy .pvp-card-desc-mini {
  color: #cbd5e1 !important;
}

/* Text inside Bot Cards */
.duel-hub-container.theme-galaxy .bot-name {
  color: #ffffff !important;
}

.duel-hub-container.theme-galaxy .bot-title {
  color: #cbd5e1 !important;
}

.duel-hub-container.theme-galaxy .bot-stats-box {
  background: rgba(30, 41, 59, 0.85) !important;
  border-color: rgba(192, 132, 252, 0.35) !important;
}

.duel-hub-container.theme-galaxy .bot-stat-lbl {
  color: #e2e8f0 !important;
  font-weight: 600 !important;
}

.duel-hub-container.theme-galaxy .bot-stat-val {
  color: #ffffff !important;
  font-weight: 700 !important;
}

/* Text inside Rules Card */
.duel-hub-container.theme-galaxy .rules-header h3 {
  color: #ffffff !important;
}

.duel-hub-container.theme-galaxy .rule-item strong {
  color: #ffffff !important;
}

.duel-hub-container.theme-galaxy .rule-item p {
  color: #e2e8f0 !important;
}

/* Input boxes in Galaxy Mode */
.duel-hub-container.theme-galaxy .pvp-code-input {
  background: rgba(30, 41, 59, 0.9) !important;
  border-color: rgba(192, 132, 252, 0.5) !important;
  color: #ffffff !important;
}

.duel-hub-container.theme-galaxy .pvp-code-input::placeholder {
  color: #94a3b8 !important;
}

.duel-arena-wrapper.theme-galaxy .duel-combat-feed {
  background: rgba(30, 41, 59, 0.9) !important;
  border-color: rgba(192, 132, 252, 0.4) !important;
  color: #f1f5f9 !important;
}

.duel-arena-wrapper.theme-galaxy .duel-input {
  background: rgba(15, 23, 42, 0.95) !important;
  border-color: rgba(192, 132, 252, 0.6) !important;
  color: #ffffff !important;
}

.duel-arena-wrapper.theme-galaxy .duel-input:focus {
  border-color: #c084fc !important;
  box-shadow: 0 0 0 4px rgba(192, 132, 252, 0.3), 0 0 20px rgba(168, 85, 247, 0.5) !important;
}

.duel-arena-wrapper.theme-galaxy .fighter-name {
  color: #ffffff !important;
}

.duel-arena-wrapper.theme-galaxy .fighter-sub {
  color: #cbd5e1 !important;
}

.duel-arena-wrapper.theme-galaxy .waiting-title {
  color: #ffffff !important;
}

.duel-arena-wrapper.theme-galaxy .waiting-desc {
  color: #e2e8f0 !important;
}

.duel-arena-wrapper.theme-galaxy .timer-bg-circle {
  stroke: rgba(255, 255, 255, 0.15) !important;
}

.duel-arena-wrapper.theme-galaxy .timer-seconds {
  color: #ffffff !important;
  text-shadow: 0 0 15px rgba(192, 132, 252, 0.8) !important;
}

/* ==========================================================================
   Galaxy Performance Optimizer Button
   (Strictly visible ONLY on mobile screens <= 768px when Galaxy Theme is active,
    completely hidden on desktop/PC)
   ========================================================================== */
.duel-galaxy-optimizer-container {
  display: none !important;
}

@media (max-width: 768px) {
  .duel-galaxy-optimizer-container {
    display: flex !important;
    justify-content: center !important;
    width: 100% !important;
    margin: 1rem 0 !important;
  }
}

.duel-galaxy-optimizer-container .btn-galaxy-perf-toggle {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.65rem !important;
  padding: 0.65rem 1.4rem !important;
  background: linear-gradient(135deg, rgba(30, 27, 75, 0.95) 0%, rgba(88, 28, 135, 0.85) 50%, rgba(15, 23, 42, 0.95) 100%) !important;
  border: 1.5px solid rgba(192, 132, 252, 0.75) !important;
  border-radius: 9999px !important;
  color: #ffffff !important;
  font-family: inherit !important;
  font-size: 0.9rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.02em !important;
  cursor: pointer !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), 0 0 18px rgba(168, 85, 247, 0.35) !important;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.duel-galaxy-optimizer-container .btn-galaxy-perf-toggle:hover {
  background: linear-gradient(135deg, rgba(88, 28, 135, 0.98) 0%, rgba(126, 34, 206, 0.9) 100%) !important;
  border-color: #c084fc !important;
  transform: translateY(-2px) scale(1.02) !important;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.5), 0 0 25px rgba(192, 132, 252, 0.5) !important;
}

.duel-galaxy-optimizer-container .btn-galaxy-perf-toggle.is-optimized {
  background: linear-gradient(135deg, rgba(6, 78, 59, 0.95) 0%, rgba(5, 150, 105, 0.85) 100%) !important;
  border-color: #34d399 !important;
  color: #ffffff !important;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.45) !important;
}

/* Galaxy Optimized Mode (Zero-lag cosmic purple background with static stars and no meteors) */
.duel-hub-container.theme-galaxy.galaxy-optimized,
.duel-arena-wrapper.theme-galaxy.galaxy-optimized {
  background: radial-gradient(circle at 50% 20%, #2e1065 0%, #1e1035 45%, #0f0728 100%) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
}

.duel-hub-container.theme-galaxy.galaxy-optimized::before,
.duel-arena-wrapper.theme-galaxy.galaxy-optimized::before {
  animation: none !important;
  transform: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.duel-hub-container.theme-galaxy.galaxy-optimized::after,
.duel-arena-wrapper.theme-galaxy.galaxy-optimized::after {
  opacity: 0.5 !important;
}

/* Keep stars visible in optimized mode without any animation */
.duel-hub-container.theme-galaxy.galaxy-optimized .galaxy-stars-overlay,
.duel-arena-wrapper.theme-galaxy.galaxy-optimized .galaxy-stars-overlay {
  display: block !important;
}

.duel-hub-container.theme-galaxy.galaxy-optimized .galaxy-stars-overlay .g-star,
.duel-arena-wrapper.theme-galaxy.galaxy-optimized .galaxy-stars-overlay .g-star {
  animation: none !important;
  opacity: 0.85 !important;
  transform: none !important;
}

/* Completely remove and disable shooting meteors and animations */
.duel-hub-container.theme-galaxy.galaxy-optimized .galaxy-stars-overlay .g-meteor,
.duel-arena-wrapper.theme-galaxy.galaxy-optimized .galaxy-stars-overlay .g-meteor {
  display: none !important;
  animation: none !important;
}

/* Solid cosmic purple cards eliminating GPU blur lag */
.duel-hub-container.theme-galaxy.galaxy-optimized .duel-user-status-bar,
.duel-hub-container.theme-galaxy.galaxy-optimized .pvp-card,
.duel-hub-container.theme-galaxy.galaxy-optimized .bot-card,
.duel-hub-container.theme-galaxy.galaxy-optimized .duel-rules-card,
.duel-arena-wrapper.theme-galaxy.galaxy-optimized .fighter-card,
.duel-arena-wrapper.theme-galaxy.galaxy-optimized .duel-center-stage,
.duel-arena-wrapper.theme-galaxy.galaxy-optimized .pvp-waiting-lobby {
  background: #180e30 !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border-color: rgba(192, 132, 252, 0.35) !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4) !important;
}

.duel-hub-container.theme-galaxy.galaxy-optimized .bot-stats-box,
.duel-hub-container.theme-galaxy.galaxy-optimized .pvp-code-input,
.duel-arena-wrapper.theme-galaxy.galaxy-optimized .duel-combat-feed {
  background: #231444 !important;
  border-color: rgba(192, 132, 252, 0.3) !important;
}

.duel-arena-wrapper.theme-galaxy.galaxy-optimized .duel-input {
  background: #1e1038 !important;
  border-color: rgba(192, 132, 252, 0.5) !important;
}


/* ==========================================================================
   COSMETIC ATTACK & VICTIM HIT FX SYSTEM
   ========================================================================== */

.celestial-lightning-screen-flash {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 50% 40%, rgba(255,255,255,0.95) 0%, rgba(56,189,248,0.65) 45%, rgba(168,85,247,0.4) 80%, transparent 100%);
  pointer-events: none;
  z-index: 99998;
  animation: flashFadeOut 0.65s ease-out forwards;
}

.celestial-lightning-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 99999;
  overflow: hidden;
}

.celestial-lightning-svg {
  width: 100%;
  height: 100%;
}

.lightning-bolt {
  fill: none;
  stroke: #ffffff;
  stroke-linecap: round;
  stroke-linejoin: bevel;
  filter: drop-shadow(0 0 12px #38bdf8) drop-shadow(0 0 25px #0284c7) drop-shadow(0 0 45px #a855f7);
  stroke-dasharray: 1200;
  stroke-dashoffset: 1200;
  animation: lightningStrike 0.65s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.bolt-main {
  stroke-width: 7;
}

.bolt-branch-1, .bolt-branch-2 {
  stroke-width: 4;
  animation-delay: 0.05s;
}

/* Victim Card Shocked / Burned / Bubbled Styles */
.victim-card-shocked {
  animation: shockTremor 0.75s cubic-bezier(0.36, 0.07, 0.19, 0.97) both !important;
  box-shadow: 0 0 45px rgba(56, 189, 248, 0.95), 0 0 85px rgba(168, 85, 247, 0.8), inset 0 0 30px rgba(255, 255, 255, 0.9) !important;
  border-color: #38bdf8 !important;
}

.victim-card-burned {
  animation: fireImpactTremor 0.8s ease-out both !important;
  box-shadow: 0 0 50px rgba(249, 115, 22, 0.95), 0 0 95px rgba(239, 68, 68, 0.85), inset 0 0 35px rgba(254, 240, 138, 0.9) !important;
  border-color: #f97316 !important;
}

.victim-card-bubbled {
  animation: bubbleJellyRipple 0.85s cubic-bezier(0.34, 1.56, 0.64, 1) both !important;
  box-shadow: 0 0 40px rgba(56, 189, 248, 0.85), 0 0 70px rgba(236, 72, 153, 0.75), 0 0 95px rgba(168, 85, 247, 0.65), inset 0 0 25px rgba(255, 255, 255, 0.9) !important;
  border-color: #38bdf8 !important;
}

/* Shockwave Rings on Victim */
.victim-shockwave-ring {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  animation: victimRingExpand 0.7s cubic-bezier(0.12, 0.8, 0.32, 1) forwards;
}

.electric-shockwave {
  border: 4px solid #ffffff;
  box-shadow: 0 0 25px #38bdf8, 0 0 50px #a855f7, inset 0 0 20px #38bdf8;
}

.fire-shockwave {
  border: 4px solid #fef08a;
  box-shadow: 0 0 30px #f97316, 0 0 60px #ef4444, inset 0 0 25px #fde047;
}

.bubble-shockwave {
  border: 3.5px solid #ffffff;
  box-shadow: 0 0 25px #38bdf8, 0 0 50px #ec4899, inset 0 0 20px #a855f7;
}

/* Battlefield Camera Shakes */
.battlefield-shake-lightning {
  animation: cameraShakeFast 0.6s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

.battlefield-shake-fire {
  animation: cameraShakeHeavy 0.65s ease-out both;
}

.battlefield-shake-bubble {
  animation: cameraShakeSoft 0.6s ease-out both;
}

/* Keyframes */
@keyframes victimSparkBurst {
  0% {
    transform: translate(-50%, -50%) scale(0.3);
    opacity: 1;
  }
  60% {
    transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) scale(1.2);
    opacity: 0.9;
  }
  100% {
    transform: translate(calc(-50% + var(--tx) * 1.3), calc(-50% + var(--ty) * 1.3)) scale(0.2);
    opacity: 0;
  }
}

@keyframes victimRingExpand {
  0% {
    width: 20px;
    height: 20px;
    opacity: 1;
  }
  100% {
    width: 320px;
    height: 320px;
    opacity: 0;
  }
}

@keyframes shockTremor {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  10%, 30%, 50%, 70%, 90% { transform: translate(-7px, 5px) rotate(-1.5deg); }
  20%, 40%, 60%, 80% { transform: translate(7px, -5px) rotate(1.5deg); }
}

@keyframes fireImpactTremor {
  0%, 100% { transform: translate(0, 0) scale(1); }
  15% { transform: translate(-8px, 4px) scale(0.96); }
  35% { transform: translate(8px, -4px) scale(1.03); }
  55% { transform: translate(-5px, 3px) scale(0.98); }
  75% { transform: translate(4px, -2px) scale(1.01); }
}

@keyframes bubbleJellyRipple {
  0% { transform: scale(1); }
  25% { transform: scale(1.1, 0.92); }
  50% { transform: scale(0.93, 1.08); }
  75% { transform: scale(1.04, 0.97); }
  100% { transform: scale(1); }
}

@keyframes cameraShakeFast {
  0%, 100% { transform: translate(0, 0); }
  10%, 30%, 50%, 70%, 90% { transform: translate(-5px, 3px); }
  20%, 40%, 60%, 80% { transform: translate(5px, -3px); }
}

@keyframes cameraShakeHeavy {
  0%, 100% { transform: translate(0, 0); }
  15% { transform: translate(-8px, 6px); }
  35% { transform: translate(7px, -5px); }
  55% { transform: translate(-4px, 3px); }
  75% { transform: translate(3px, -2px); }
}

@keyframes cameraShakeSoft {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-3px, 2px); }
  40% { transform: translate(3px, -2px); }
  60% { transform: translate(-2px, 1px); }
  80% { transform: translate(2px, -1px); }
}

@keyframes lightningStrike {
  0% { stroke-dashoffset: 1200; opacity: 1; }
  30% { stroke-dashoffset: 0; opacity: 1; }
  60% { stroke-dashoffset: 0; opacity: 0.9; }
  100% { stroke-dashoffset: 0; opacity: 0; }
}

@keyframes flashFadeOut {
  0% { opacity: 0; transform: scale(0.98); }
  20% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.02); }
}

@keyframes floatUpBurn {
  0% { transform: translateY(0) scale(0.5); opacity: 1; }
  50% { transform: translateY(-30px) scale(1.2); opacity: 0.8; }
  100% { transform: translateY(-70px) scale(0.2); opacity: 0; }
}

@keyframes bubblePopFloat {
  0% { transform: translateY(0) scale(0.4); opacity: 0.9; }
  60% { transform: translateY(-40px) scale(1.1); opacity: 1; }
  90% { transform: translateY(-60px) scale(1.3); opacity: 0.7; }
  100% { transform: translateY(-75px) scale(1.6); opacity: 0; }
}


/* ==========================================================================
   WORD DUEL EMOTE WHEEL & LIVE REACTION SYSTEM
   ========================================================================== */

/* Bottom Actions Row & Centered Trigger Button */
.duel-bottom-actions-row {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin-top: 0.6rem;
}

.btn-duel-emote-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.22) 0%, rgba(168, 85, 247, 0.28) 100%);
  color: #f1f5f9;
  border: 1.5px solid rgba(192, 132, 252, 0.45);
  border-radius: 9999px;
  padding: 0.4rem 1.15rem;
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.3), inset 0 0 10px rgba(168, 85, 247, 0.2);
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  user-select: none;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(4px);
}

.btn-duel-emote-trigger:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 6px 20px rgba(168, 85, 247, 0.55);
  border-color: #e9d5ff;
}

.btn-duel-emote-trigger:active {
  transform: translateY(1px) scale(0.97);
}

.btn-duel-emote-trigger .emote-icon {
  font-size: 1.2rem;
  line-height: 1;
  display: inline-block;
  animation: emoteWiggle 2.5s infinite ease-in-out;
}

.btn-duel-emote-trigger .emote-shortcut-tag {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 4px;
  font-size: 0.65rem;
  padding: 0.1rem 0.3rem;
  color: #e0e7ff;
  font-weight: 700;
}

.btn-duel-emote-trigger.is-cooldown {
  opacity: 0.65;
  cursor: not-allowed;
  filter: grayscale(0.4);
  transform: none !important;
}

.btn-duel-emote-trigger .cooldown-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 900;
  color: #fde047;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.btn-duel-emote-trigger.is-cooldown .cooldown-overlay {
  opacity: 1;
}

@keyframes emoteWiggle {
  0%, 100% { transform: rotate(0deg) scale(1); }
  25% { transform: rotate(-10deg) scale(1.1); }
  75% { transform: rotate(10deg) scale(1.1); }
}

/* Modal Radial Overlay */
.duel-emote-wheel-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.duel-emote-wheel-overlay.is-active {
  opacity: 1;
  visibility: visible;
}

.emote-wheel-container {
  position: relative;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  transform: scale(0.6) rotate(-20deg);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.duel-emote-wheel-overlay.is-active .emote-wheel-container {
  transform: scale(1) rotate(0deg);
}

/* Center Hub */
.emote-wheel-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: radial-gradient(circle, #1e1b4b 0%, #0f172a 100%);
  border: 2px solid #a855f7;
  box-shadow: 0 0 30px rgba(168, 85, 247, 0.6), inset 0 0 15px rgba(168, 85, 247, 0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s ease;
}

.emote-wheel-center:hover {
  transform: translate(-50%, -50%) scale(1.1);
  border-color: #f43f5e;
  box-shadow: 0 0 35px rgba(244, 63, 94, 0.8);
}

.emote-wheel-center .center-icon {
  font-size: 1.6rem;
  line-height: 1;
}

.emote-wheel-center .center-label {
  font-size: 0.65rem;
  font-weight: 800;
  color: #cbd5e1;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 2px;
}

/* Emote Radial Items (8-way arrangement) */
.emote-wheel-item {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 68px;
  height: 68px;
  margin-left: -34px;
  margin-top: -34px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #312e81 0%, #1e1b4b 70%, #0f172a 100%);
  border: 2px solid rgba(192, 132, 252, 0.5);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4), 0 0 15px rgba(168, 85, 247, 0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
  user-select: none;
  outline: none;
  z-index: 5;
}

/* Polar Angle Coordinates (Radius: 115px) */
.emote-wheel-item[data-slot="0"] { transform: translate(0px, -115px); }
.emote-wheel-item[data-slot="1"] { transform: translate(81px, -81px); }
.emote-wheel-item[data-slot="2"] { transform: translate(115px, 0px); }
.emote-wheel-item[data-slot="3"] { transform: translate(81px, 81px); }
.emote-wheel-item[data-slot="4"] { transform: translate(0px, 115px); }
.emote-wheel-item[data-slot="5"] { transform: translate(-81px, 81px); }
.emote-wheel-item[data-slot="6"] { transform: translate(-115px, 0px); }
.emote-wheel-item[data-slot="7"] { transform: translate(-81px, -81px); }

/* Hover States with Directional Pop */
.emote-wheel-item:hover {
  border-color: #fde047;
  box-shadow: 0 0 25px rgba(253, 224, 71, 0.8), 0 8px 25px rgba(0, 0, 0, 0.6);
  z-index: 20;
}

.emote-wheel-item[data-slot="0"]:hover { transform: translate(0px, -125px) scale(1.22); }
.emote-wheel-item[data-slot="1"]:hover { transform: translate(88px, -88px) scale(1.22); }
.emote-wheel-item[data-slot="2"]:hover { transform: translate(125px, 0px) scale(1.22); }
.emote-wheel-item[data-slot="3"]:hover { transform: translate(88px, 88px) scale(1.22); }
.emote-wheel-item[data-slot="4"]:hover { transform: translate(0px, 125px) scale(1.22); }
.emote-wheel-item[data-slot="5"]:hover { transform: translate(-88px, 88px) scale(1.22); }
.emote-wheel-item[data-slot="6"]:hover { transform: translate(-125px, 0px) scale(1.22); }
.emote-wheel-item[data-slot="7"]:hover { transform: translate(-88px, -88px) scale(1.22); }

.emote-wheel-item .item-emoji {
  font-size: 1.8rem;
  line-height: 1;
  transition: transform 0.2s ease;
}

.emote-wheel-item:hover .item-emoji {
  transform: scale(1.15);
}

.emote-wheel-item .item-title {
  font-size: 0.6rem;
  font-weight: 800;
  color: #f8fafc;
  margin-top: 2px;
  white-space: nowrap;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

/* Fighter Avatar Floating Emote Bubble */
.fighter-emote-bubble-anchor {
  position: relative;
}

.fighter-emote-bubble {
  position: absolute;
  top: -85px;
  left: 50%;
  transform: translateX(-50%) scale(0);
  background: linear-gradient(135deg, #1e1b4b 0%, #0f172a 100%);
  border: 2.5px solid #f59e0b;
  border-radius: 1.25rem;
  padding: 0.55rem 1.1rem;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.6), 0 0 25px rgba(245, 158, 11, 0.5);
  display: flex;
  align-items: center;
  gap: 0.55rem;
  white-space: nowrap;
  pointer-events: none;
  z-index: 9999;
  animation: emoteBubblePopIn 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards, emoteBubbleFloat 1.8s 0.35s ease-in-out infinite alternate, emoteBubbleFadeOut 0.4s 2.3s ease-in forwards;
}

.fighter-opponent .fighter-emote-bubble,
.fighter-bot .fighter-emote-bubble {
  border-color: #38bdf8;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.6), 0 0 25px rgba(56, 189, 248, 0.5);
}

/* Comic Pointer Arrow */
.fighter-emote-bubble::after {
  content: '';
  position: absolute;
  bottom: -11px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 11px solid #f59e0b;
}

.fighter-opponent .fighter-emote-bubble::after,
.fighter-bot .fighter-emote-bubble::after {
  border-top-color: #38bdf8;
}

.fighter-emote-bubble .bubble-emoji {
  font-size: 2.2rem;
  line-height: 1;
  animation: bubbleEmojiWobble 0.8s ease-in-out infinite alternate;
}

.fighter-emote-bubble .bubble-text {
  font-size: 0.95rem;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 0.02em;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

@keyframes emoteBubblePopIn {
  0% { transform: translateX(-50%) translateY(20px) scale(0.2); opacity: 0; }
  70% { transform: translateX(-50%) translateY(-5px) scale(1.1); opacity: 1; }
  100% { transform: translateX(-50%) translateY(0) scale(1); opacity: 1; }
}

@keyframes emoteBubbleFloat {
  0% { transform: translateX(-50%) translateY(0); }
  100% { transform: translateX(-50%) translateY(-6px); }
}

@keyframes emoteBubbleFadeOut {
  0% { opacity: 1; transform: translateX(-50%) translateY(-6px) scale(1); }
  100% { opacity: 0; transform: translateX(-50%) translateY(-25px) scale(0.7); }
}

@keyframes bubbleEmojiWobble {
  0% { transform: rotate(-8deg) scale(1); }
  100% { transform: rotate(8deg) scale(1.15); }
}

/* Mobile Responsive */
@media (max-width: 640px) {
  .emote-wheel-container {
    width: 280px;
    height: 280px;
  }
  .emote-wheel-item {
    width: 58px;
    height: 58px;
    margin-left: -29px;
    margin-top: -29px;
  }
  .emote-wheel-item[data-slot="0"] { transform: translate(0px, -98px); }
  .emote-wheel-item[data-slot="1"] { transform: translate(69px, -69px); }
  .emote-wheel-item[data-slot="2"] { transform: translate(98px, 0px); }
  .emote-wheel-item[data-slot="3"] { transform: translate(69px, 69px); }
  .emote-wheel-item[data-slot="4"] { transform: translate(0px, 98px); }
  .emote-wheel-item[data-slot="5"] { transform: translate(-69px, 69px); }
  .emote-wheel-item[data-slot="6"] { transform: translate(-98px, 0px); }
  .emote-wheel-item[data-slot="7"] { transform: translate(-69px, -69px); }

  .emote-wheel-item[data-slot="0"]:hover { transform: translate(0px, -104px) scale(1.15); }
  .emote-wheel-item[data-slot="1"]:hover { transform: translate(74px, -74px) scale(1.15); }
  .emote-wheel-item[data-slot="2"]:hover { transform: translate(104px, 0px) scale(1.15); }
  .emote-wheel-item[data-slot="3"]:hover { transform: translate(74px, 74px) scale(1.15); }
  .emote-wheel-item[data-slot="4"]:hover { transform: translate(0px, 104px) scale(1.15); }
  .emote-wheel-item[data-slot="5"]:hover { transform: translate(-74px, 74px) scale(1.15); }
  .emote-wheel-item[data-slot="6"]:hover { transform: translate(-104px, 0px) scale(1.15); }
  .emote-wheel-item[data-slot="7"]:hover { transform: translate(-74px, -74px) scale(1.15); }

  .emote-wheel-item .item-emoji {
    font-size: 1.45rem;
  }
  .emote-wheel-item .item-title {
    font-size: 0.52rem;
  }

  .fighter-emote-bubble {
    top: -70px;
    padding: 0.4rem 0.8rem;
  }
  .fighter-emote-bubble .bubble-emoji {
    font-size: 1.6rem;
  }
  .fighter-emote-bubble .bubble-text {
    font-size: 0.8rem;
  }
}
