/* Design System & Custom Properties */
:root {
  --bg-dark: #070913;
  --bg-panel: rgba(16, 20, 38, 0.45);
  --border-glass: rgba(255, 255, 255, 0.08);
  --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  
  --color-gold: #e2c974;
  --color-gold-glow: rgba(226, 201, 116, 0.45);
  --color-red: #ff4757;
  --color-red-glow: rgba(255, 71, 87, 0.45);
  --color-cyan: #00d2d3;
  --color-cyan-glow: rgba(0, 210, 211, 0.45);
  --color-green: #2ed573;
  
  --font-sans: 'Outfit', 'Noto Sans KR', sans-serif;
}

/* Base Resets & Global Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--bg-dark);
  color: #f1f2f6;
  font-family: var(--font-sans);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* Animated Ambient Background Glows */
body::before, body::after {
  content: '';
  position: absolute;
  width: 50vw;
  height: 50vw;
  border-radius: 50%;
  pointer-events: none;
  z-index: -10;
  filter: blur(140px);
  opacity: 0.15;
  transition: all 1s ease;
}
body::before {
  top: -10%;
  right: -10%;
  background: radial-gradient(circle, var(--color-cyan) 0%, transparent 70%);
}
body::after {
  bottom: -10%;
  left: -10%;
  background: radial-gradient(circle, var(--color-red) 0%, transparent 70%);
}

/* Background floating particles */
.particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -5;
  overflow: hidden;
}
.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background-color: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  animation: floatUp 15s infinite linear;
}
@keyframes floatUp {
  0% { transform: translateY(100vh) translateX(0); opacity: 0; }
  50% { opacity: 0.5; }
  100% { transform: translateY(-10vh) translateX(50px); opacity: 0; }
}

/* Header & Navigation */
header {
  height: 70px;
  border-bottom: 1px solid var(--border-glass);
  background: rgba(7, 9, 19, 0.6);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  background: linear-gradient(135deg, #f1f2f6 0%, var(--color-gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.logo-icon {
  -webkit-text-fill-color: initial;
  font-size: 1.6rem;
}

/* Header Action buttons */
.icon-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #f1f2f6;
  padding: 0.5rem 1rem;
  border-radius: 12px;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.icon-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

/* Main Container Layout */
main {
  flex: 1;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Glassmorphism Panels */
.glass-panel {
  background: var(--bg-panel);
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-glass);
  backdrop-filter: blur(16px);
  border-radius: 24px;
  padding: 1.5rem;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Form Styles & Inputs */
.setup-card {
  max-width: 600px;
  width: 100%;
  margin: 0 auto;
  background: rgba(16, 20, 38, 0.65);
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-glass);
  backdrop-filter: blur(20px);
  border-radius: 32px;
  padding: 3rem;
}
.setup-header {
  text-align: center;
  margin-bottom: 2rem;
}
.setup-header h2 {
  font-size: 2rem;
  font-weight: 800;
  margin-top: 0.5rem;
  margin-bottom: 0.75rem;
  line-height: 1.3;
  color: #fff;
}
.setup-header p {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
}
.badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  background: rgba(226, 201, 116, 0.1);
  border: 1px solid var(--color-gold);
  color: var(--color-gold);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
}

/* Forms */
.form-group {
  margin-bottom: 1.5rem;
}
.input-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--color-gold);
}
.text-input {
  width: 100%;
  background: rgba(7, 9, 19, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 0.8rem 1rem;
  font-family: var(--font-sans);
  color: #fff;
  font-size: 0.95rem;
  outline: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.text-input:focus {
  border-color: var(--color-gold);
  box-shadow: 0 0 10px rgba(226, 201, 116, 0.2);
  background: rgba(7, 9, 19, 0.75);
}
.select-input {
  appearance: none;
  background-image: radial-gradient(var(--color-gold) 1px, transparent 0);
  background-position: right 15px center;
  background-size: 8px 8px;
  background-repeat: no-repeat;
  cursor: pointer;
}
.select-input option {
  background-color: var(--bg-dark);
  color: #fff;
}

/* Buttons */
.action-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--color-gold) 0%, #b89c44 100%);
  border: none;
  border-radius: 14px;
  padding: 1rem;
  font-family: var(--font-sans);
  color: #070913;
  font-weight: 700;
  font-size: 1.05rem;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(226, 201, 116, 0.3);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  margin-top: 1rem;
}
.action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(226, 201, 116, 0.5);
  background: linear-gradient(135deg, #f5e08f 0%, #d4b455 100%);
}
.action-btn:active {
  transform: translateY(1px);
}
.action-btn.btn-secondary {
  background: transparent;
  border: 1px solid var(--border-glass);
  color: #f1f2f6;
  box-shadow: none;
}
.action-btn.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.05);
  box-shadow: none;
  border-color: rgba(255, 255, 255, 0.2);
}

/* Gameplay Grid Layout */
.gameplay-grid {
  display: grid;
  grid-template-columns: 280px 1fr 340px;
  gap: 1.5rem;
  min-height: 550px;
}

/* Left HUD Sidebar */
.hud-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.hud-section h3 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-gold);
  margin-bottom: 0.75rem;
}
.stats-card {
  background: rgba(0, 0, 0, 0.25);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.03);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}
.stat-label {
  color: rgba(255, 255, 255, 0.5);
}
.stat-value {
  font-weight: 700;
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
}
.text-red { color: var(--color-red); text-shadow: 0 0 8px var(--color-red-glow); }
.text-gold { color: var(--color-gold); text-shadow: 0 0 8px var(--color-gold-glow); }
.text-cyan { color: var(--color-cyan); text-shadow: 0 0 8px var(--color-cyan-glow); }
.text-green { color: var(--color-green); }

/* ID Card Component */
.id-card {
  background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.01) 100%);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.id-avatar {
  font-size: 2rem;
  background: rgba(255,255,255,0.05);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.id-name {
  font-weight: 700;
  font-size: 0.95rem;
}
.id-dept {
  font-size: 0.72rem;
  color: var(--color-gold);
}

/* Center Panel: Boss Arena */
.arena-panel {
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.arena-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 1rem;
  margin-bottom: 1rem;
}
.boss-display-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}
.boss-class-badge {
  font-size: 0.7rem;
  background: rgba(255, 71, 87, 0.15);
  color: var(--color-red);
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 71, 87, 0.3);
  font-weight: 600;
}
.health-container {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.health-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-red);
}
.health-bar-bg {
  height: 8px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.health-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #ff4757 0%, #ff6b81 100%);
  border-radius: 4px;
  transition: width 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 10px rgba(255, 71, 87, 0.4);
}

/* Interactive Avatar Area */
.avatar-view-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  border-radius: 20px;
  /* Deep dark — white checkerboard areas multiply to black */
  background: #07091380;
  background-image:
    radial-gradient(ellipse at 30% 60%, rgba(255, 71, 87, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 40%, rgba(0, 210, 211, 0.04) 0%, transparent 60%);
  background-color: #070913;
  border: 1px solid rgba(255,255,255,0.05);
  user-select: none;
  overflow: hidden;
}

/* Boss Bubble Speech */
.boss-bubble {
  position: absolute;
  top: 25px;
  background: rgba(255, 255, 255, 0.95);
  color: #070913;
  padding: 0.8rem 1.2rem;
  border-radius: 18px;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  max-width: 250px;
  line-height: 1.4;
  opacity: 0;
  transform: translateY(10px) scale(0.9);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  pointer-events: none;
  z-index: 15;
}
.boss-bubble.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.boss-bubble::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 8px 8px 0;
  border-style: solid;
  border-color: rgba(255, 255, 255, 0.95) transparent;
}

/* Hit Effects Layer & floating particles */
.hit-effects-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 20;
}

/* Floating Text Animation */
.floating-hit-text {
  position: absolute;
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 1.1rem;
  text-shadow: 0 2px 12px rgba(0,0,0,0.9), 0 0 20px currentColor;
  pointer-events: none;
  animation: floatTextUp 0.9s forwards cubic-bezier(0.22, 1, 0.36, 1);
  white-space: nowrap;
}
@keyframes floatTextUp {
  0%   { transform: translateY(0) scale(0.4) rotate(-4deg); opacity: 0; }
  12%  { transform: translateY(-8px) scale(1.3) rotate(2deg); opacity: 1; }
  35%  { transform: translateY(-22px) scale(1.1) rotate(-1deg); opacity: 1; }
  70%  { transform: translateY(-50px) scale(0.95) rotate(0.5deg); opacity: 0.7; }
  100% { transform: translateY(-80px) scale(0.7) rotate(0deg); opacity: 0; }
}

/* Splat visuals */
.coffee-splat {
  position: absolute;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: radial-gradient(circle, #a0682a 0%, rgba(91, 62, 36, 0.5) 50%, rgba(91, 62, 36, 0) 70%);
  opacity: 0;
  pointer-events: none;
  animation: elasticSplat 0.65s forwards cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes elasticSplat {
  0%   { transform: scale(0.2); opacity: 0.95; border-radius: 50%; }
  22%  { transform: scale(1.7) scaleX(1.3) scaleY(0.8); opacity: 0.85; border-radius: 40%; }
  45%  { transform: scale(1.4) scaleX(0.9) scaleY(1.15); opacity: 0.7; border-radius: 45%; }
  70%  { transform: scale(1.6) scaleX(1.05) scaleY(0.97); opacity: 0.4; border-radius: 50%; }
  100% { transform: scale(2.0); opacity: 0; border-radius: 50%; }
}

/* Avatar wrappers */
.boss-avatar-wrapper {
  position: relative;
  width: 280px;
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.3s ease;
}
.boss-avatar-wrapper:hover {
  transform: scale(1.05);
  filter: drop-shadow(0 15px 30px rgba(255, 71, 87, 0.2));
}
.boss-avatar-wrapper:active {
  transform: scale(0.96);
}
.boss-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
  background: transparent;
  transition: filter 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.2s ease;
}

/* Whacking effects */
.boss-avatar-wrapper.hit-light {
  animation: elasticJiggleLight 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.boss-avatar-wrapper.hit-heavy {
  animation: elasticSpinHit 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.boss-avatar-wrapper.hit-splash {
  animation: elasticShakeHeavy 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

@keyframes elasticJiggleLight {
  0% { transform: scale(1) rotate(0deg); }
  15% { transform: scale(0.88) rotate(-6deg); }
  35% { transform: scale(1.08) rotate(4deg); }
  55% { transform: scale(0.96) rotate(-2deg); }
  75% { transform: scale(1.02) rotate(1deg); }
  100% { transform: scale(1) rotate(0deg); }
}
@keyframes elasticSpinHit {
  0% { transform: scale(1) rotate(0deg) translateY(0); }
  18% { transform: scale(0.72) rotate(-16deg) translateY(18px); }
  38% { transform: scale(1.18) rotate(12deg) translateY(-12px); }
  58% { transform: scale(0.92) rotate(-6deg) translateY(6px); }
  78% { transform: scale(1.04) rotate(2deg) translateY(-2px); }
  90% { transform: scale(0.98) rotate(-1deg) translateY(0); }
  100% { transform: scale(1) rotate(0deg) translateY(0); }
}
@keyframes elasticShakeHeavy {
  0% { transform: translate(0, 0) scale(1) rotate(0deg); }
  12.5% { transform: translate(-10px, 8px) scale(0.93) rotate(-4deg); }
  25% { transform: translate(8px, -8px) scale(1.13) rotate(3.5deg); }
  37.5% { transform: translate(-7px, 6px) scale(0.96) rotate(-2.5deg); }
  50% { transform: translate(5px, -4px) scale(1.06) rotate(1.8deg); }
  62.5% { transform: translate(-3px, 2px) scale(0.98) rotate(-1deg); }
  75% { transform: translate(2px, -1px) scale(1.02) rotate(0.5deg); }
  87.5% { transform: translate(-1px, 0.5px) scale(0.99) rotate(-0.2deg); }
  100% { transform: translate(0, 0) scale(1) rotate(0deg); }
}

/* Dizzy stars above boss */
.dizzy-stars-overlay {
  position: absolute;
  top: -15px;
  font-size: 1.6rem;
  letter-spacing: 0.1em;
  opacity: 0;
  pointer-events: none;
  animation: orbitStars 2.5s infinite linear;
}
.boss-avatar-wrapper.dizzy .dizzy-stars-overlay {
  opacity: 1;
}
@keyframes orbitStars {
  0% { transform: rotate(0) translateY(-5px); }
  50% { transform: rotate(180deg) translateY(5px); }
  100% { transform: rotate(360deg) translateY(-5px); }
}

/* Arena Shaking */
.arena-panel.shake {
  animation: arenaShakeEffect 0.3s ease;
}
@keyframes arenaShakeEffect {
  0%, 100% { transform: translate(0, 0); }
  10%, 90% { transform: translate(-3px, 1px); }
  20%, 80% { transform: translate(4px, -2px); }
  30%, 50%, 70% { transform: translate(-5px, -4px); }
  40%, 60% { transform: translate(6px, 4px); }
}

/* Custom Cursors according to weapons */
.active-weapon-paper #boss-target-area {
  cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" style="font-size:24px"><text y="24">🧻</text></svg>') 16 16, auto;
}
.active-weapon-hammer #boss-target-area {
  cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" style="font-size:24px"><text y="24">🔨</text></svg>') 16 16, auto;
}
.active-weapon-coffee #boss-target-area {
  cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" style="font-size:24px"><text y="24">☕</text></svg>') 16 16, auto;
}
.active-weapon-resignation #boss-target-area {
  cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" style="font-size:24px"><text y="24">📄</text></svg>') 16 16, auto;
}

/* Right Panel: Weapon wheel inventory */
.weapons-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.weapons-sidebar h3 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-gold);
}
.weapon-slots {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  flex: 1;
}
.weapon-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 16px;
  padding: 0.8rem 1.2rem;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.weapon-card:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateX(3px);
}
.weapon-card.active {
  background: rgba(226, 201, 116, 0.07);
  border-color: var(--color-gold);
  box-shadow: 0 0 12px rgba(226, 201, 116, 0.1);
}
.weapon-icon {
  font-size: 1.8rem;
}
.weapon-details h4 {
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}
.weapon-desc {
  font-size: 0.7rem;
  color: var(--color-text-secondary);
}
.weapon-select-dot {
  position: absolute;
  right: 15px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--color-gold);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.weapon-card.active .weapon-select-dot {
  opacity: 1;
  box-shadow: 0 0 8px var(--color-gold);
}

/* Cooldown overlays */
.cooldown-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 4px;
  background-color: var(--color-cyan);
  transition: width 0.1s linear;
  box-shadow: 0 0 8px var(--color-cyan-glow);
}

/* Hit Combo component */
.combo-container {
  background: linear-gradient(135deg, rgba(255, 71, 87, 0.07) 0%, rgba(255, 71, 87, 0.01) 100%);
  border: 1px dashed rgba(255, 71, 87, 0.2);
  border-radius: 16px;
  padding: 0.85rem;
  text-align: center;
  margin-top: auto;
}
.combo-title {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--color-red);
  letter-spacing: 0.15em;
}
.combo-number {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--color-red);
  text-shadow: 0 0 10px var(--color-red-glow);
  font-family: 'Outfit', sans-serif;
  animation: pulseCombo 0.2s ease;
}
@keyframes pulseCombo {
  0% { transform: scale(1); }
  50% { transform: scale(1.25); }
  100% { transform: scale(1); }
}

/* Victory Overlay card */
.victory-card {
  max-width: 500px;
  width: 90%;
  margin: 0 auto;
  background: rgba(16, 20, 38, 0.75);
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-glass);
  backdrop-filter: blur(24px);
  border-radius: 32px;
  padding: 3rem;
  text-align: center;
}
.victory-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  animation: bounceAnim 2s infinite ease-in-out;
}
@keyframes bounceAnim {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
.victory-card h2 {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
}
.stress-free-banner {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  background: linear-gradient(135deg, var(--color-gold) 0%, #ff6b81 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1.5rem;
}
.report-box {
  background: rgba(0, 0, 0, 0.35);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.03);
  padding: 1.5rem;
  text-align: left;
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.report-box h3 {
  font-size: 0.88rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--color-gold);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  padding-bottom: 0.5rem;
  margin-bottom: 0.25rem;
}
.report-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
}

/* Sound notification toast */
.toast-notification {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%) translateY(30px);
  background: rgba(16, 20, 38, 0.9);
  border: 1px solid var(--color-gold);
  box-shadow: 0 8px 32px var(--color-gold-glow);
  padding: 0.8rem 1.5rem;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  z-index: 10000;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}
.toast-notification.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* Variables for texts */
:root {
  --color-text-secondary: rgba(255, 255, 255, 0.6);
}

/* View states mapping */
.customizing-mode #customizer-panel { display: block !important; }
.customizing-mode #gameplay-panel { display: none !important; }
.customizing-mode #victory-panel { display: none !important; }

.playing-mode #customizer-panel { display: none !important; }
.playing-mode #gameplay-panel { display: grid !important; }
.playing-mode #victory-panel { display: none !important; }

.victory-mode #customizer-panel { display: none !important; }
.victory-mode #gameplay-panel { display: none !important; }
.victory-mode #victory-panel { display: block !important; }

/* AdSense slots */
.adsense-container {
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 0.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.adsense-container .ads-label {
  font-size: 0.6rem;
  color: rgba(255, 255, 255, 0.3);
  letter-spacing: 0.1em;
  margin-bottom: 0.25rem;
  text-transform: uppercase;
}

/* Fever Mode */
.fever-banner {
  position: absolute;
  top: 15px;
  left: 50%;
  transform: translateX(-50%) scale(0.9);
  background: linear-gradient(135deg, #ff4757 0%, #ff9f43 100%);
  border: 2px solid #ff4757;
  box-shadow: 0 0 15px rgba(255, 71, 87, 0.6);
  color: #fff;
  padding: 0.5rem 1.2rem;
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 800;
  z-index: 25;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.fever-banner.active {
  opacity: 1;
  transform: translateX(-50%) scale(1.0);
  animation: feverBlink 1.5s infinite alternate ease-in-out;
}
@keyframes feverBlink {
  0% { box-shadow: 0 0 10px rgba(255, 71, 87, 0.6); filter: brightness(1); }
  100% { box-shadow: 0 0 25px rgba(255, 71, 87, 1); filter: brightness(1.25); }
}

/* Fever Mode background state on body */
body.fever-active::before {
  background: radial-gradient(circle, rgba(255, 71, 87, 0.2) 0%, transparent 70%);
  animation: feverPulse 1s infinite alternate ease-in-out !important;
}
@keyframes feverPulse {
  0% { opacity: 0.15; }
  100% { opacity: 0.45; }
}

/* Weapon Upgrade Shop */
.shop-points {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 0.5rem 0.8rem;
  font-size: 0.82rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 0.75rem;
}
.shop-items {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.shop-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  padding: 0.5rem 0.75rem;
  transition: background 0.2s ease;
}
.shop-item:hover {
  background: rgba(255, 255, 255, 0.04);
}
.shop-item-info {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.shop-item-name {
  font-size: 0.8rem;
  font-weight: 600;
}
.shop-item-level {
  font-size: 0.65rem;
  color: var(--color-cyan);
}
.shop-upgrade-btn {
  background: linear-gradient(135deg, var(--color-gold) 0%, #b89c44 100%);
  border: none;
  border-radius: 8px;
  color: #070913;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.35rem 0.65rem;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 65px;
  text-align: center;
}
.shop-upgrade-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(226, 201, 116, 0.3);
}
.shop-upgrade-btn:disabled {
  background: rgba(255, 255, 255, 0.08) !important;
  color: rgba(255, 255, 255, 0.25) !important;
  cursor: not-allowed;
  box-shadow: none !important;
  transform: none !important;
}

/* Footer styles */
footer {
  margin-top: auto;
  border-top: 1px solid var(--border-glass);
  padding: 1.5rem 0;
  background: rgba(7, 9, 19, 0.6);
  text-align: center;
  font-size: 0.72rem;
  color: var(--color-text-secondary);
  z-index: 50;
}
.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
}
.footer-links {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}
.footer-links a {
  color: var(--color-gold);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}
.footer-links a:hover {
  color: #fff;
  text-decoration: underline;
}
.footer-divider {
  color: rgba(255, 255, 255, 0.15);
}

/* Modal Overlays */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(7, 9, 19, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 20000;
  padding: 1rem;
}
.modal-card {
  max-width: 500px;
  width: 100%;
  background: rgba(16, 20, 38, 0.95);
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-glass);
  border-radius: 20px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  animation: modalScaleIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes modalScaleIn {
  0% { transform: scale(0.9); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 0.75rem;
}
.modal-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-gold);
}
.modal-close-btn {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 1.5rem;
  cursor: pointer;
  transition: color 0.2s ease;
  line-height: 1;
}
.modal-close-btn:hover {
  color: #fff;
}
.modal-body {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
  max-height: 300px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding-right: 0.5rem;
}
.modal-body p strong {
  color: var(--color-cyan);
}
.modal-body::-webkit-scrollbar {
  width: 4px;
}
.modal-body::-webkit-scrollbar-track {
  background: transparent;
}
.modal-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .gameplay-grid {
    grid-template-columns: 1fr;
  }
  .hud-sidebar, .weapons-sidebar {
    max-height: initial;
  }
}

/* ============================================
   BOSS PAIN ANIMATION STATE
   ============================================ */
.boss-avatar-wrapper.boss-pain .boss-img {
  animation: bossPainShiver 0.35s cubic-bezier(0.36, 0.07, 0.19, 0.97);
  filter: brightness(2) saturate(4) hue-rotate(-20deg) contrast(1.3) !important;
}
@keyframes bossPainShiver {
  0%   { transform: translate(0, 0)   rotate(0deg)   scale(1); }
  10%  { transform: translate(-6px, 4px) rotate(-5deg)  scale(0.94); }
  25%  { transform: translate(6px, -5px) rotate(4deg)   scale(1.06); }
  40%  { transform: translate(-4px, 3px) rotate(-3deg)  scale(0.97); }
  55%  { transform: translate(3px, -2px) rotate(2deg)   scale(1.03); }
  70%  { transform: translate(-2px, 1px) rotate(-1deg)  scale(0.99); }
  85%  { transform: translate(1px, 0)    rotate(0.5deg) scale(1.01); }
  100% { transform: translate(0, 0)   rotate(0deg)   scale(1); }
}

/* ============================================
   BOSS TEARS — falling teardrop effect
   ============================================ */
.boss-tear {
  position: absolute;
  width: 7px;
  height: 12px;
  border-radius: 50% 50% 60% 60% / 40% 40% 60% 60%;
  background: linear-gradient(180deg, rgba(100, 180, 255, 0.9) 0%, rgba(60, 140, 255, 0.7) 100%);
  box-shadow: 0 0 8px rgba(100, 180, 255, 0.8);
  opacity: 0;
  pointer-events: none;
  z-index: 22;
  top: 55px;
}
.boss-tear.tear-left  { left: 72px; }
.boss-tear.tear-right { right: 72px; }
.boss-tear.crying {
  animation: tearFall 1.1s ease-in forwards;
}
@keyframes tearFall {
  0%   { opacity: 0;   transform: translateY(0)   scaleY(0.8); }
  15%  { opacity: 1;   transform: translateY(4px)  scaleY(1.1); }
  80%  { opacity: 0.8; transform: translateY(70px) scaleY(1); }
  100% { opacity: 0;   transform: translateY(95px) scaleY(0.6); }
}

/* ============================================
   PAIN EMOJI OVERLAY — floating emoji on hard hits
   ============================================ */
.pain-emoji-overlay {
  position: absolute;
  top: 30px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 2.2rem;
  pointer-events: none;
  opacity: 0;
  z-index: 28;
  text-shadow: 0 4px 16px rgba(0,0,0,0.9);
}
.pain-emoji-overlay.show {
  animation: emojiPop 0.85s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes emojiPop {
  0%   { opacity: 0; transform: translateX(-50%) translateY(10px) scale(0.4); }
  25%  { opacity: 1; transform: translateX(-50%) translateY(-8px)  scale(1.25); }
  60%  { opacity: 1; transform: translateX(-50%) translateY(-18px) scale(1.05); }
  100% { opacity: 0; transform: translateX(-50%) translateY(-40px) scale(0.8); }
}

/* ============================================
   HP PHASE BOSS TINT — visual state per HP
   ============================================ */
/* 50% HP — slight worry glow */
body.hp-phase-warning .boss-avatar-wrapper {
  filter: drop-shadow(0 0 18px rgba(255, 180, 0, 0.35));
}
/* 25% HP — danger red glow + subtle pulse */
body.hp-phase-danger .boss-avatar-wrapper {
  filter: drop-shadow(0 0 24px rgba(255, 60, 60, 0.5));
  animation: dangerPulseGlow 2s infinite alternate ease-in-out;
}
@keyframes dangerPulseGlow {
  0%   { filter: drop-shadow(0 0 16px rgba(255, 60, 60, 0.35)); }
  100% { filter: drop-shadow(0 0 32px rgba(255, 60, 60, 0.75)); }
}

/* ============================================
   SHIELD INDICATOR — event active on boss
   ============================================ */
.boss-avatar-wrapper.shielded::before {
  content: '🛡️';
  position: absolute;
  top: -12px;
  right: -12px;
  font-size: 1.8rem;
  animation: shieldBob 1.2s infinite ease-in-out;
  z-index: 30;
}
@keyframes shieldBob {
  0%, 100% { transform: translateY(0) rotate(-5deg); }
  50%       { transform: translateY(-6px) rotate(5deg); }
}
/* Invincibility flash */
.boss-avatar-wrapper.invincible {
  animation: invincibleFlash 0.3s infinite alternate;
}
@keyframes invincibleFlash {
  0%   { filter: brightness(1.6) hue-rotate(200deg); }
  100% { filter: brightness(0.8) hue-rotate(220deg); }
}

/* ============================================
   RANDOM EVENT POPUP OVERLAY
   ============================================ */
.random-event-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: rgba(7, 9, 19, 0.7);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50000;
  animation: eventOverlayFadeIn 0.3s ease forwards;
}
@keyframes eventOverlayFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.random-event-card {
  background: rgba(16, 20, 38, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 60px rgba(0, 210, 211, 0.2), 0 24px 48px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(24px);
  border-radius: 28px;
  padding: 2.5rem 3rem;
  text-align: center;
  max-width: 420px;
  width: 90%;
  animation: eventCardSlideIn 0.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  position: relative;
  overflow: hidden;
}
@keyframes eventCardSlideIn {
  from { transform: translateY(40px) scale(0.9); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}
.event-icon {
  font-size: 3.5rem;
  margin-bottom: 0.75rem;
  animation: iconBounce 0.8s ease infinite alternate;
  display: block;
}
@keyframes iconBounce {
  0%   { transform: translateY(0) scale(1); }
  100% { transform: translateY(-10px) scale(1.1); }
}
.event-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--color-gold);
  text-shadow: 0 0 20px rgba(226, 201, 116, 0.5);
  margin-bottom: 0.5rem;
  letter-spacing: 0.04em;
}
.event-desc {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.5;
  margin-bottom: 0.75rem;
}
.event-quote {
  font-size: 0.88rem;
  font-style: italic;
  color: var(--color-cyan);
  background: rgba(0, 210, 211, 0.06);
  border: 1px solid rgba(0, 210, 211, 0.15);
  border-radius: 12px;
  padding: 0.6rem 1rem;
  line-height: 1.5;
  margin-bottom: 1.2rem;
}
.event-timer-bar {
  height: 5px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
}
.event-timer-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-cyan) 0%, var(--color-gold) 100%);
  border-radius: 3px;
  width: 100%;
  transition: width linear;
}
