/* =========================================================
   RISE ONLINE STREAMER STUDIO - BOSS FIGHT ARENA STYLES
   ========================================================= */

.boss-layout {
  display: grid;
  grid-template-columns: 340px 1fr 340px;
  gap: 16px;
  height: calc(100vh - 84px);
  padding: 14px;
  overflow: hidden;
}

@media (max-width: 1200px) {
  .boss-layout {
    grid-template-columns: 300px 1fr 300px;
    gap: 12px;
  }
}

/* Boss Arena Card / Center Stage */
.boss-arena-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  background: 
    radial-gradient(circle at 50% 50%, rgba(15, 23, 42, 0.15) 0%, rgba(10, 12, 20, 0.55) 50%, rgba(5, 7, 12, 0.88) 100%),
    url('../assets/boss-arena-bg.jpg') center center / cover no-repeat;
  border: 1.5px solid rgba(245, 158, 11, 0.4);
  border-radius: var(--radius-lg);
  box-shadow: 0 0 45px rgba(0, 0, 0, 0.9), inset 0 0 70px rgba(0, 0, 0, 0.75);
  padding: 16px 20px;
  overflow: hidden;
}

/* Background Animated Atmospheric Light Pulse */
.boss-arena-stage::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.12) 0%, rgba(245, 158, 11, 0.06) 40%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  animation: magicPulse 7s infinite ease-in-out;
  z-index: 0;
}

@keyframes magicPulse {
  0%, 100% { transform: translate(-50%, -50%) scale(0.95); opacity: 0.5; }
  50% { transform: translate(-50%, -50%) scale(1.15); opacity: 1; }
}

/* Boss Stage Header */
.boss-stage-header {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.boss-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.boss-status-badge.idle {
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.boss-status-badge.fighting {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border: 1px solid #ef4444;
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.4);
  animation: pulseRed 1.5s infinite;
}

.boss-status-badge.enraged {
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  color: #fff;
  border: 1px solid #fca5a5;
  box-shadow: 0 0 25px rgba(239, 68, 68, 0.8);
  animation: pulseEnrage 0.8s infinite alternate;
}

.boss-status-badge.defeated {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
  border: 1px solid #22c55e;
  box-shadow: 0 0 20px rgba(34, 197, 94, 0.5);
}

@keyframes pulseRed {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.85; transform: scale(0.98); }
}

@keyframes pulseEnrage {
  0% { transform: scale(1); box-shadow: 0 0 15px #ef4444; }
  100% { transform: scale(1.06); box-shadow: 0 0 30px #f43f5e; }
}

/* Boss Health Bar Wrap */
.boss-health-card {
  position: relative;
  z-index: 2;
  background: rgba(10, 12, 18, 0.75);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-bottom: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.boss-name-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
}

.boss-display-title {
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
  background: linear-gradient(135deg, #ffffff 20%, #f59e0b 60%, #ef4444 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: center;
  gap: 8px;
}

.boss-hp-numbers {
  font-size: 1.1rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--gold-light);
}

/* HP Progress Bar */
.hp-bar-outer {
  position: relative;
  width: 100%;
  height: 24px;
  background: rgba(20, 10, 15, 0.85);
  border: 1.5px solid rgba(245, 158, 11, 0.45);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.8);
}

.hp-bar-trail {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background: rgba(239, 68, 68, 0.4);
  transition: width 0.8s ease-out;
}

.hp-bar-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #15803d 0%, #22c55e 35%, #38bdf8 70%, #22c55e 100%);
  background-size: 200% 200%;
  animation: hpWaveGradient 4s ease infinite;
  border-radius: 10px;
  transition: width 0.15s ease-out;
  box-shadow: 0 0 15px rgba(34, 197, 94, 0.6), inset 0 1px 1px rgba(255, 255, 255, 0.4);
}

.hp-bar-fill.warning {
  background: linear-gradient(90deg, #b45309 0%, #f59e0b 50%, #fbbf24 100%);
  box-shadow: 0 0 18px rgba(245, 158, 11, 0.7);
}

.hp-bar-fill.danger {
  background: linear-gradient(90deg, #991b1b 0%, #ef4444 50%, #f43f5e 100%);
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.85);
}

.hp-bar-fill.enraged {
  background: linear-gradient(90deg, #7f1d1d 0%, #dc2626 50%, #f43f5e 100%);
  box-shadow: 0 0 25px rgba(244, 63, 94, 0.9);
  animation: barEnragePulse 0.4s infinite alternate;
}

@keyframes barEnragePulse {
  0% { filter: brightness(1); }
  100% { filter: brightness(1.35); }
}

.hp-bar-percentage {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.78rem;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 1px 4px #000, 0 0 8px rgba(0, 0, 0, 0.9);
  letter-spacing: 0.5px;
  pointer-events: none;
  z-index: 3;
}

/* Rage & Buff Metres */
.boss-sub-meters {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.sub-meter-box {
  flex: 1;
  background: rgba(15, 20, 30, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 4px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sub-meter-label {
  font-size: 0.72rem;
  color: var(--text-dim);
  font-weight: 700;
}

.sub-meter-bar-wrap {
  width: 100px;
  height: 6px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 3px;
  overflow: hidden;
  margin-left: 6px;
}

.rage-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #f97316, #ef4444);
  transition: width 0.3s ease;
  box-shadow: 0 0 8px #ef4444;
}

.raid-buff-badge {
  font-size: 0.75rem;
  font-weight: 800;
  color: #38bdf8;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Boss Stage Center Model Area */
.boss-stage-center {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 460px;
  z-index: 2;
  margin: 4px 0;
  overflow: visible;
}

/* Boss Avatar Figure & Aura */
.boss-avatar-wrapper {
  position: relative;
  width: 100%;
  max-width: 960px;
  height: 100%;
  min-height: 460px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.1s ease;
}

.boss-avatar-wrapper.idle {
  animation: bossFloat 4s infinite ease-in-out;
}

/* Disable floating jitter on fullscreen & video stages */
.stage-omen-fullscreen .boss-avatar-wrapper.idle,
.boss-avatar-wrapper.idle:has(video) {
  animation: none !important;
  transform: none !important;
}

.boss-avatar-wrapper.hit {
  animation: bossHitShake 0.22s ease-out;
}

.boss-avatar-wrapper.crit-hit {
  animation: bossCritShake 0.32s ease-out;
}

.boss-avatar-wrapper.enraged {
  animation: bossEnragedBreathing 1.8s infinite ease-in-out;
}

.boss-avatar-wrapper.defeated {
  animation: bossCinematicDeath 2.5s forwards cubic-bezier(0.2, 0.8, 0.2, 1);
}

.boss-avatar-wrapper.defeated .boss-stage-fullscreen-video,
.boss-avatar-wrapper.defeated .boss-graphic-video,
.boss-avatar-wrapper.defeated .boss-graphic-img {
  filter: grayscale(0.85) sepia(0.5) hue-rotate(-50deg) brightness(0.35) contrast(1.3) !important;
  transition: filter 2.5s ease-out !important;
}

@keyframes bossFloat {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-8px) scale(1.02); }
}

@keyframes bossHitShake {
  0% { transform: scale(0.995); filter: brightness(1.2) contrast(1.05); }
  25% { transform: translate(-2px, 1px) scale(0.995); }
  50% { transform: translate(2px, -1px); filter: brightness(1.12); }
  75% { transform: translate(-1px, 0); }
  100% { transform: translate(0, 0) scale(1); filter: brightness(1); }
}

@keyframes bossCritShake {
  0% { transform: scale(0.99); filter: brightness(1.35) contrast(1.15); }
  20% { transform: translate(-4px, 2px); }
  40% { transform: translate(4px, -2px); }
  60% { transform: translate(-2px, -1px); }
  80% { transform: translate(2px, 1px); }
  100% { transform: translate(0, 0) scale(1); filter: brightness(1); }
}

@keyframes bossEnragedBreathing {
  0%, 100% { transform: scale(1.04); filter: drop-shadow(0 0 35px rgba(239,68,68,0.95)); }
  50% { transform: scale(1.1) scaleY(1.08) translateY(-4px); filter: drop-shadow(0 0 55px rgba(244,63,94,1)); }
}

@keyframes bossCinematicDeath {
  0% { transform: scale(1); }
  10% { transform: scale(1.03) translate(-4px, 4px); filter: brightness(1.3); }
  25% { transform: scale(0.98) translate(4px, -4px); }
  50% { transform: scale(1.01); }
  100% { transform: scale(0.99) translateY(8px); }
}

/* =========================================================
   OMEN FULLSCREEN ARENA STAGE (ZERO BORDER, EDGE-TO-EDGE ART)
   ========================================================= */
.boss-arena-stage.stage-omen-fullscreen {
  padding: 0 !important;
  background: #050609 !important;
  border: 1.5px solid rgba(168, 85, 247, 0.6) !important;
  box-shadow: 0 0 50px rgba(168, 85, 247, 0.3), inset 0 0 35px rgba(0, 0, 0, 0.9) !important;
  overflow: hidden !important;
}

.boss-arena-stage.stage-omen-fullscreen::before {
  display: none !important;
}

/* Hide duplicate top health card when Omen has in-art HUD */
.boss-arena-stage.stage-omen-fullscreen .boss-health-card {
  display: none !important;
}

/* Header overlays cleanly over the top edge of the artwork */
.boss-arena-stage.stage-omen-fullscreen .boss-stage-header {
  position: absolute;
  top: 14px;
  left: 16px;
  right: 16px;
  z-index: 30;
  margin-bottom: 0;
  pointer-events: none;
}

.boss-arena-stage.stage-omen-fullscreen .boss-stage-header button,
.boss-arena-stage.stage-omen-fullscreen .boss-stage-header .boss-status-badge {
  pointer-events: auto;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  background: rgba(10, 12, 20, 0.82);
  border: 1px solid rgba(168, 85, 247, 0.4);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.7);
}

.boss-arena-stage.stage-omen-fullscreen .boss-stage-center {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.boss-arena-stage.stage-omen-fullscreen .boss-avatar-wrapper {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: 100%;
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Omen Fullscreen SVG Container - Fills Stage Edge-to-Edge */
.omen-fullscreen-stage {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.omen-fullscreen-svg {
  width: 100%;
  height: 100%;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

/* Disable redundant child shakes on SVG and Video to prevent tearing and jitter */
.boss-avatar-wrapper.hit .omen-fullscreen-svg,
.boss-avatar-wrapper.crit-hit .omen-fullscreen-svg,
.boss-avatar-wrapper.hit .boss-stage-fullscreen-video,
.boss-avatar-wrapper.crit-hit .boss-stage-fullscreen-video {
  animation: none !important;
}

/* Fullscreen Stage Poster Background (instant visual fallback) */
.boss-stage-poster-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  z-index: 1;
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

/* Fullscreen Stage Video Background - Hardware accelerated with translateZ(0) */
.boss-stage-fullscreen-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  z-index: 2;
  opacity: 1 !important;
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.omen-fullscreen-svg.overlay-svg {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

/* Graphic Mode Poster Background */
.boss-graphic-poster {
  position: absolute;
  width: auto;
  height: clamp(480px, 68vh, 660px);
  max-height: calc(100% - 10px);
  max-width: 96%;
  object-fit: contain;
  border-radius: 12px;
  pointer-events: none;
  z-index: 1;
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.boss-graphic-video {
  width: auto;
  height: clamp(480px, 68vh, 660px);
  max-height: calc(100% - 10px);
  max-width: 96%;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.85);
  pointer-events: none;
  z-index: 2;
  transition: opacity 0.35s ease-out;
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

/* Death VFX Blood & Lens Vignette Overlay */
.boss-death-vfx-container {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 28;
  overflow: hidden;
}

.boss-death-vignette {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: radial-gradient(circle at center, rgba(220, 38, 38, 0) 35%, rgba(185, 28, 28, 0.45) 75%, rgba(69, 10, 10, 0.95) 100%);
  animation: deathVignettePulse 3.5s forwards ease-out;
}

@keyframes deathVignettePulse {
  0% { opacity: 0; transform: scale(1.08); }
  10% { opacity: 1; transform: scale(1); }
  35% { opacity: 0.85; }
  100% { opacity: 0.7; }
}

.boss-blood-splatter-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0;
  animation: bloodSplatterBurst 3.5s forwards cubic-bezier(0.1, 0.9, 0.2, 1);
}

@keyframes bloodSplatterBurst {
  0% { opacity: 0; transform: scale(0.7); }
  8% { opacity: 1; transform: scale(1.02); }
  18% { opacity: 0.95; transform: scale(1); }
  75% { opacity: 0.9; }
  100% { opacity: 0.75; }
}

.boss-blood-drip {
  animation: bloodDripAnim 3.5s forwards ease-in;
}

@keyframes bloodDripAnim {
  0% { transform: translateY(0); }
  100% { transform: translateY(12px); }
}

/* Boss Scene Container for Cutout Models */
.boss-scene-box {
  position: relative;
  display: inline-block;
  max-width: 100%;
  max-height: 100%;
  line-height: 0;
  transition: transform 0.2s ease;
}

/* Boss Graphic 3D Model Image - Seamless Frameless 3D Character */
.boss-graphic-img {
  width: auto;
  height: clamp(480px, 68vh, 660px);
  max-height: calc(100% - 10px);
  max-width: 96%;
  object-fit: contain;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  transition: all 0.3s ease;
  user-select: none;
  -webkit-user-drag: none;
  z-index: 2;
  position: relative;
  animation: bossLevitate 4s infinite ease-in-out;
}

@keyframes bossLevitate {
  0%, 100% {
    transform: translateY(0px) scale(1);
    filter: 
      drop-shadow(0 20px 40px rgba(0, 0, 0, 0.95))
      drop-shadow(0 0 30px var(--theme-col, rgba(168, 85, 247, 0.6)))
      drop-shadow(0 0 65px color-mix(in srgb, var(--theme-col, #a855f7) 35%, transparent));
  }
  50% {
    transform: translateY(-14px) scale(1.02);
    filter: 
      drop-shadow(0 35px 50px rgba(0, 0, 0, 0.8))
      drop-shadow(0 0 50px var(--theme-col, rgba(168, 85, 247, 0.9)))
      drop-shadow(0 0 95px color-mix(in srgb, var(--theme-col, #a855f7) 55%, transparent));
  }
}

.boss-avatar-wrapper.hit .boss-graphic-img,
.boss-avatar-wrapper.hit .boss-graphic-video {
  animation: bossHitGlitch 0.25s ease;
}

.boss-avatar-wrapper.crit-hit .boss-graphic-img,
.boss-avatar-wrapper.crit-hit .boss-graphic-video {
  animation: bossCritGlitch 0.4s ease;
}

@keyframes bossHitGlitch {
  0% { transform: translate(0, 0) scale(1); filter: brightness(1.2) contrast(1.1) drop-shadow(0 0 15px rgba(255, 255, 255, 0.4)); }
  25% { transform: translate(-10px, 5px) scale(0.98); }
  50% { transform: translate(10px, -5px) scale(1.01); filter: brightness(1.1); }
  75% { transform: translate(-5px, -3px); }
  100% { transform: translate(0, 0) scale(1); }
}

@keyframes bossCritGlitch {
  0% { transform: translate(0, 0) scale(1); filter: brightness(1.35) contrast(1.15) drop-shadow(0 0 25px rgba(245, 158, 11, 0.5)); }
  20% { transform: translate(-15px, 8px) rotate(-2deg) scale(0.97); }
  40% { transform: translate(15px, -8px) rotate(2deg) scale(1.02); filter: brightness(1.2); }
  60% { transform: translate(-8px, -5px); }
  80% { transform: translate(5px, 4px); }
  100% { transform: translate(0, 0) scale(1); }
}

.boss-avatar-wrapper.enraged .boss-graphic-img,
.boss-avatar-wrapper.enraged .boss-graphic-video {
  animation: bossEnragedSurge 1.4s infinite ease-in-out;
}

@keyframes bossEnragedSurge {
  0%, 100% {
    transform: scale(1.04) translateY(-8px);
    filter: 
      drop-shadow(0 25px 45px rgba(0, 0, 0, 1))
      drop-shadow(0 0 50px rgba(239, 68, 68, 0.95))
      drop-shadow(0 0 90px rgba(244, 63, 94, 0.7));
  }
  50% {
    transform: scale(1.1) translateY(-18px);
    filter: 
      drop-shadow(0 40px 60px rgba(0, 0, 0, 0.9))
      drop-shadow(0 0 80px rgba(239, 68, 68, 1))
      drop-shadow(0 0 130px rgba(244, 63, 94, 0.9));
  }
}

/* Boss Graphic / SVG Icon (Fallback) */
.boss-graphic-icon {
  width: 100%;
  height: 100%;
  max-height: 480px;
  object-fit: contain;
  filter: drop-shadow(0 0 30px rgba(245, 158, 11, 0.5));
  transition: all 0.3s ease;
  z-index: 2;
  position: relative;
}

/* Atmospheric Glowing Backdrop Aura */
.boss-aura-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 660px;
  height: 660px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--theme-col, #ef4444) 0%, rgba(245, 158, 11, 0.25) 45%, transparent 70%);
  opacity: 0.65;
  filter: blur(35px);
  pointer-events: none;
  animation: auraBreath 4s infinite ease-in-out;
  z-index: 1;
}

@keyframes auraBreath {
  0%, 100% { transform: translate(-50%, -50%) scale(0.92); opacity: 0.5; }
  50% { transform: translate(-50%, -50%) scale(1.18); opacity: 0.85; }
}

/* Atmospheric Rotating Mist Smoke Behind Character */
.boss-smoke-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 580px;
  height: 580px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0%, color-mix(in srgb, var(--theme-col, #818cf8) 25%, transparent) 25%, transparent 50%, color-mix(in srgb, var(--theme-col, #818cf8) 35%, transparent) 75%, transparent 100%);
  filter: blur(32px);
  pointer-events: none;
  animation: smokeSpin 14s linear infinite;
  z-index: 1;
  opacity: 0.75;
}

@keyframes smokeSpin {
  0% { transform: translate(-50%, -50%) rotate(0deg) scale(0.95); }
  50% { transform: translate(-50%, -50%) rotate(180deg) scale(1.1); }
  100% { transform: translate(-50%, -50%) rotate(360deg) scale(0.95); }
}

/* Soft contact light on dais */
.boss-pedestal-light {
  position: absolute;
  bottom: 0px;
  left: 50%;
  transform: translateX(-50%);
  width: 560px;
  height: 65px;
  background: radial-gradient(ellipse at center, var(--theme-col, #ef4444) 0%, transparent 70%);
  opacity: 0.6;
  filter: blur(15px);
  pointer-events: none;
  z-index: 1;
}

@keyframes pedestalPulse {
  0%, 100% { opacity: 0.55; transform: translateX(-50%) scale(0.92); }
  50% { opacity: 0.95; transform: translateX(-50%) scale(1.15); }
}

/* Boss Card Selection Thumbnail */
.boss-card-thumb {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.15);
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.7));
  transition: transform 0.2s ease;
  user-select: none;
  -webkit-user-drag: none;
}

.boss-card-btn:hover .boss-card-thumb {
  transform: scale(1.12);
}

/* Floating Combat Damage Numbers Container */
.combat-text-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  z-index: 10;
}

.floating-dmg {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
  animation: floatDamage 1.2s forwards cubic-bezier(0.1, 0.8, 0.3, 1);
  white-space: nowrap;
}

.floating-dmg .dmg-val {
  font-size: 1.7rem;
  font-weight: 900;
  color: #ffffff;
  -webkit-text-stroke: 1.5px #000;
  text-shadow: 0 0 10px rgba(0,0,0,0.9), 0 3px 6px #000, 0 0 15px currentColor;
  letter-spacing: -0.5px;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.8));
}

.floating-dmg .dmg-author {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--gold-light);
  background: rgba(0, 0, 0, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 1px 7px;
  border-radius: 6px;
  margin-top: -2px;
  backdrop-filter: blur(4px);
}

.floating-dmg.basic .dmg-val {
  color: #fef08a;
  -webkit-text-stroke: 1.5px #78350f;
  text-shadow: 0 0 15px rgba(245, 158, 11, 0.9), 0 3px 6px #000;
}

.floating-dmg.crit .dmg-val {
  font-size: 2.5rem;
  color: #ff0055;
  -webkit-text-stroke: 2px #3f0010;
  text-shadow: 0 0 25px rgba(255, 0, 85, 1), 0 0 45px rgba(251, 191, 36, 1), 0 4px 8px #000;
  animation: critBounce 0.35s ease;
}

.floating-dmg.skill .dmg-val {
  font-size: 2.1rem;
  color: #38bdf8;
  -webkit-text-stroke: 1.8px #0c4a6e;
  text-shadow: 0 0 25px rgba(56, 189, 248, 1), 0 3px 6px #000;
}

@keyframes floatDamage {
  0% { opacity: 0; transform: translate(0, 20px) scale(0.6); }
  20% { opacity: 1; transform: translate(0, 0) scale(1.15); }
  40% { transform: translate(0, -15px) scale(1); }
  80% { opacity: 0.9; transform: translate(0, -45px) scale(0.95); }
  100% { opacity: 0; transform: translate(0, -75px) scale(0.8); }
}

@keyframes critBounce {
  0% { transform: scale(0.5); }
  60% { transform: scale(1.3); }
  100% { transform: scale(1.15); }
}

/* Victory Screen Overlay (when boss defeated) */
.boss-victory-banner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(20, 15, 30, 0.98) 0%, rgba(10, 12, 19, 0.99) 100%);
  border: 2px solid var(--gold-primary);
  box-shadow: 0 0 50px rgba(245, 158, 11, 0.6), inset 0 0 30px rgba(245, 158, 11, 0.2);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  text-align: center;
  z-index: 20;
  width: 90%;
  max-width: 480px;
  animation: victoryModalPop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes victoryModalPop {
  0% { transform: translate(-50%, -50%) scale(0.6); opacity: 0; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

.victory-title {
  font-size: 1.65rem;
  font-weight: 900;
  color: var(--gold-light);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 4px;
  text-shadow: 0 0 20px rgba(245, 158, 11, 0.8);
}

.victory-mvp-box {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 10px;
  padding: 8px 12px;
}

.victory-mvp-name {
  font-size: 1.2rem;
  font-weight: 900;
  color: #fff;
  margin-bottom: 2px;
}

.victory-mvp-stat {
  font-size: 0.78rem;
  color: var(--gold-light);
}

/* 10 RNG LOOT DROP REWARD BOX STYLING */
.boss-loot-box {
  background: rgba(12, 16, 26, 0.95);
  border: 1.5px solid rgba(245, 158, 11, 0.45);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 6px;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8);
}

.boss-loot-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 4px;
}

.loot-display-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(20, 26, 42, 0.95);
  border: 2px solid var(--gold-primary);
  border-radius: 10px;
  padding: 10px 14px;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.3);
  transition: all 0.2s ease;
  text-align: left;
}

.loot-display-card.rolling {
  border-color: #38bdf8;
  box-shadow: 0 0 25px rgba(56, 189, 248, 0.6);
  animation: lootCardPulse 0.12s infinite alternate;
}

.loot-display-card.winner-revealed {
  animation: lootCardWinPop 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes lootCardPulse {
  0% { transform: scale(0.98); filter: brightness(1); }
  100% { transform: scale(1.02); filter: brightness(1.25); }
}

@keyframes lootCardWinPop {
  0% { transform: scale(0.88); }
  50% { transform: scale(1.06); box-shadow: 0 0 35px #fbbf24; }
  100% { transform: scale(1); }
}

.loot-reward-img {
  width: 58px;
  height: 58px;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.8));
}

.loot-reward-name {
  font-size: 1.15rem;
  font-weight: 900;
  color: #ffffff;
  line-height: 1.2;
}

.loot-reward-rarity {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gold-primary);
}

/* Chat Commands Banner */
.boss-commands-banner {
  position: relative;
  z-index: 2;
  background: rgba(12, 16, 26, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 8px;
}

.cmd-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 700;
}

.cmd-pill code {
  color: var(--gold-primary);
  font-family: monospace;
  font-size: 0.85rem;
  font-weight: 800;
}

.cmd-pill .cmd-desc {
  color: var(--text-muted);
  font-size: 0.72rem;
}

/* LEFT PANEL: STREAMER CONTROL PANEL */
.boss-controls-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
}

/* Boss Category Tabs */
.boss-category-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  margin-bottom: 8px;
}

.boss-cat-btn {
  background: rgba(18, 22, 34, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.boss-cat-btn:hover {
  background: rgba(26, 32, 48, 0.9);
  color: #fff;
  border-color: rgba(245, 158, 11, 0.4);
}

.boss-cat-btn.active {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(217, 119, 6, 0.2));
  color: var(--gold-light);
  border-color: var(--gold-primary);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.35);
}

.boss-select-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.boss-card-btn {
  background: rgba(18, 22, 34, 0.8);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 8px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
  text-align: center;
}

.boss-card-btn:hover {
  border-color: rgba(245, 158, 11, 0.5);
  background: rgba(26, 32, 48, 0.9);
  transform: translateY(-2px);
}

.boss-card-btn.active {
  border-color: var(--gold-primary);
  background: rgba(245, 158, 11, 0.15);
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.35);
}

.boss-card-icon {
  font-size: 1.8rem;
}

.boss-card-name {
  font-size: 0.78rem;
  font-weight: 800;
  color: #fff;
}

.boss-card-hp {
  font-size: 0.68rem;
  color: var(--gold-light);
}

/* Quick HP Presets */
.hp-preset-group {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}

.btn-hp-preset {
  background: rgba(18, 22, 34, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-main);
  padding: 4px 6px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-hp-preset:hover, .btn-hp-preset.active {
  background: var(--gold-primary);
  color: #000;
  border-color: var(--gold-primary);
}

/* Test Attack Simulation Group */
.test-attacks-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.btn-test-action {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-main);
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.btn-test-action:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

/* RIGHT PANEL: LEADERBOARD & LIVE LOG */
.boss-intel-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
}

/* Leaderboard Table */
.leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 4px;
}

.leaderboard-row {
  position: relative;
  background: rgba(15, 20, 30, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  padding: 6px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
  transition: all 0.2s ease;
}

.leaderboard-row::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: var(--progress-pct, 0%);
  background: rgba(245, 158, 11, 0.12);
  pointer-events: none;
  transition: width 0.3s ease;
}

.leaderboard-row.rank-1 {
  border-color: rgba(245, 158, 11, 0.5);
  background: rgba(245, 158, 11, 0.08);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.15);
}

.leaderboard-row.rank-2 {
  border-color: rgba(203, 213, 225, 0.3);
}

.leaderboard-row.rank-3 {
  border-color: rgba(217, 119, 6, 0.3);
}

.lb-user-info {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 2;
  overflow: hidden;
}

.lb-rank-badge {
  font-size: 0.8rem;
  font-weight: 900;
  min-width: 20px;
  text-align: center;
}

.lb-user-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 110px;
}

.lb-damage-val {
  position: relative;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--gold-light);
  font-variant-numeric: tabular-nums;
  z-index: 2;
  text-align: right;
}

.lb-hits-count {
  font-size: 0.68rem;
  color: var(--text-dim);
}

/* Combat Log Feed */
.combat-log-feed {
  display: flex;
  flex-direction: column;
  gap: 4px;
  height: 200px;
  overflow-y: auto;
  padding: 6px;
  background: rgba(10, 12, 19, 0.6);
  border-radius: 6px;
  font-size: 0.76rem;
}

.combat-log-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 3px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.02);
  animation: fadeInLog 0.25s ease;
}

@keyframes fadeInLog {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.combat-log-entry.crit {
  background: rgba(239, 68, 68, 0.15);
  border-left: 2px solid #ef4444;
}

.combat-log-entry.skill {
  background: rgba(56, 189, 248, 0.12);
  border-left: 2px solid #38bdf8;
}

.combat-log-entry.buff {
  background: rgba(34, 197, 94, 0.12);
  border-left: 2px solid #22c55e;
}

/* ==========================================
   CUSTOM ATTACK COMMANDS BOX STYLES
   ========================================== */
.boss-custom-commands-box {
  background: rgba(10, 12, 19, 0.75);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 8px;
  padding: 8px 10px;
  width: 100%;
  box-sizing: border-box;
}

.custom-cmd-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
}

.custom-cmd-cell {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

.custom-cmd-lbl {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 4px;
}

.custom-cmd-input {
  width: 100% !important;
  box-sizing: border-box !important;
  min-width: 0 !important;
  padding: 4px 8px !important;
  font-size: 0.8rem !important;
  font-weight: 700 !important;
  color: var(--gold-light) !important;
  font-family: monospace !important;
  background: rgba(0, 0, 0, 0.6) !important;
  border: 1px solid rgba(245, 158, 11, 0.3) !important;
  border-radius: 4px !important;
  text-align: center;
}

.custom-cmd-input:focus {
  border-color: var(--gold-primary) !important;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.5) !important;
  background: rgba(15, 18, 28, 0.9) !important;
}
