* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: #0b0c10;
  font-family: 'Nunito', sans-serif;
  color: #e0e6ed;
}

#game-container {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  background: radial-gradient(circle at center, #1b1e2b 0%, #08090d 100%);
}

canvas#gameCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* ==========================================================================
   HUD LAYER
   ========================================================================== */
.hud-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px 22px;
  z-index: 10;
}

.hud-layer.hidden {
  display: none !important;
}

.hud-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  width: 100%;
  gap: 16px;
}

.player-hud-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Player Stats */
.player-stats {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(13, 16, 25, 0.88);
  backdrop-filter: blur(8px);
  padding: 10px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

/* Live Weapon & Slash Power Card */
.weapon-power-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: rgba(13, 16, 25, 0.88);
  backdrop-filter: blur(8px);
  padding: 8px 14px;
  border-radius: 12px;
  border: 1px solid rgba(245, 158, 11, 0.35);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  width: 250px;
  transition: all 0.3s ease;
}

.wp-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.wp-icon {
  font-size: 20px;
}

.wp-name-group {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.wp-title {
  font-family: 'Cinzel', serif;
  font-size: 13px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.1;
}

.wp-tier {
  font-size: 9px;
  color: #fbbf24;
  font-weight: 700;
  text-transform: uppercase;
}

.wp-dmg-pill {
  display: flex;
  align-items: baseline;
  gap: 2px;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.25), rgba(220, 38, 38, 0.15));
  border: 1px solid #ef4444;
  padding: 2px 8px;
  border-radius: 8px;
}

.wp-dmg-val {
  font-family: 'Cinzel', serif;
  font-size: 15px;
  font-weight: 900;
  color: #f87171;
}

.wp-dmg-lbl {
  font-size: 9px;
  font-weight: 800;
  color: #fca5a5;
}

.wp-stats-row {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: #94a3b8;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 4px;
}

.wp-substat strong {
  color: #f1f5f9;
}

.level-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border-radius: 12px;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.5), inset 0 2px 4px rgba(255, 255, 255, 0.4);
  border: 2px solid #fbbf24;
}

.lvl-label {
  font-size: 10px;
  font-weight: 900;
  color: #78350f;
  line-height: 1;
  letter-spacing: 1px;
}

.lvl-number {
  font-family: 'Cinzel', serif;
  font-size: 22px;
  font-weight: 900;
  color: #ffffff;
  line-height: 1;
}

.bars-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 180px;
}

.bar-wrapper {
  position: relative;
  height: 16px;
  background: rgba(18, 22, 33, 0.9);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.bar-fill {
  height: 100%;
  transition: width 0.15s ease-out;
  border-radius: 8px;
}

.hp-fill {
  background: linear-gradient(90deg, #ef4444, #f87171);
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.6);
}

.exp-fill {
  background: linear-gradient(90deg, #3b82f6, #60a5fa, #93c5fd);
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.6);
}

.bar-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

/* Wave & Combo Display */
.hud-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.wave-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(13, 16, 25, 0.88);
  backdrop-filter: blur(8px);
  padding: 8px 24px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.wave-title {
  font-family: 'Cinzel', serif;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 2px;
  color: #f59e0b;
}

.wave-sub {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 700;
}

/* Dynamic Combo Banner */
.combo-banner {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: linear-gradient(135deg, rgba(225, 29, 72, 0.9), rgba(190, 18, 60, 0.9));
  padding: 6px 16px;
  border-radius: 12px;
  border: 1px solid #f43f5e;
  box-shadow: 0 0 18px rgba(225, 29, 72, 0.6);
  animation: pulseCombo 0.4s infinite alternate;
}

.combo-banner.hidden {
  display: none !important;
}

@keyframes pulseCombo {
  0% { transform: scale(1); }
  100% { transform: scale(1.05); }
}

.combo-flame {
  font-size: 14px;
}

.combo-text {
  font-family: 'Cinzel', serif;
  font-size: 14px;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 1px;
}

.combo-timer-bar {
  width: 100%;
  height: 4px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 2px;
  margin-top: 4px;
  overflow: hidden;
}

.combo-timer-fill {
  height: 100%;
  background: #fde047;
}

/* Top Right Stats */
.hud-right {
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
}

.stat-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(13, 16, 25, 0.88);
  backdrop-filter: blur(8px);
  padding: 8px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-weight: 800;
  font-size: 14px;
  color: #f1f5f9;
}

.gold-pill {
  border-color: rgba(245, 158, 11, 0.4);
  color: #fbbf24;
}

.stat-icon {
  font-size: 15px;
}

.btn-icon {
  background: rgba(13, 16, 25, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: all 0.2s ease;
}

.btn-icon:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.05);
}

/* Boss Health Bar */
.boss-bar-container {
  width: 60%;
  max-width: 550px;
  margin: 10px auto 0 auto;
  background: rgba(20, 10, 15, 0.95);
  padding: 8px 16px;
  border-radius: 12px;
  border: 2px solid #ef4444;
  box-shadow: 0 0 24px rgba(239, 68, 68, 0.5);
}

.boss-bar-container.hidden {
  display: none !important;
}

.boss-info {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 4px;
}

.boss-name {
  color: #f87171;
  font-family: 'Cinzel', serif;
  letter-spacing: 1px;
}

.boss-bar-wrapper {
  height: 14px;
  background: #2b0f14;
  border-radius: 6px;
  overflow: hidden;
}

.boss-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #dc2626, #ef4444, #fca5a5);
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.8);
  transition: width 0.1s linear;
}

/* Active Skills HUD */
.skills-hud {
  align-self: flex-start;
  margin-top: auto;
  display: flex;
  gap: 12px;
}

.skill-icon-box {
  position: relative;
  background: rgba(13, 16, 25, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 8px 14px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
}

.skill-key {
  font-size: 9px;
  font-weight: 800;
  color: #f59e0b;
}

.skill-name {
  font-size: 12px;
  font-weight: 800;
  color: #f1f5f9;
}

.skill-cooldown-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0%;
  background: rgba(0, 0, 0, 0.65);
}

.ult-box {
  border-color: rgba(245, 158, 11, 0.4);
}

.ult-box.ready {
  border-color: #fbbf24;
  box-shadow: 0 0 16px rgba(251, 191, 36, 0.7);
  animation: pulseUlt 0.5s infinite alternate;
}

@keyframes pulseUlt {
  0% { transform: scale(1); }
  100% { transform: scale(1.06); box-shadow: 0 0 24px rgba(251, 191, 36, 1); }
}

.ult-fill-overlay {
  background: rgba(0, 0, 0, 0.72);
}

.touch-ult-btn {
  position: absolute;
  bottom: 45px;
  right: 125px;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c3aed, #4f46e5);
  border: 3px solid #a855f7;
  color: white;
  font-weight: 900;
  font-size: 11px;
  box-shadow: 0 0 16px rgba(124, 58, 237, 0.5);
  pointer-events: auto;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.touch-ult-btn.ready {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  border-color: #fbbf24;
  box-shadow: 0 0 22px rgba(245, 158, 11, 0.8);
  animation: pulseUlt 0.5s infinite alternate;
}

/* ==========================================================================
   TOUCH CONTROLS (Mobile)
   ========================================================================== */
.touch-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 15;
}

.touch-layer.hidden {
  display: none !important;
}

.joystick-zone {
  position: absolute;
  bottom: 30px;
  left: 30px;
  width: 140px;
  height: 140px;
  pointer-events: auto;
}

.joystick-base {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.joystick-stick {
  width: 55px;
  height: 55px;
  border-radius: 50%;
  background: radial-gradient(circle, #60a5fa, #2563eb);
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.6);
  transform: translate(0, 0);
  pointer-events: none;
}

.touch-dash-btn {
  position: absolute;
  bottom: 45px;
  right: 35px;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border: 3px solid #fbbf24;
  color: white;
  font-weight: 900;
  font-size: 13px;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.5);
  pointer-events: auto;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
   OVERLAY SCREENS (Start, Dojo, Upgrade, Chest, Death, Victory)
   ========================================================================== */
.overlay-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(5, 7, 12, 0.88);
  backdrop-filter: blur(10px);
  z-index: 50;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease-out;
  padding: 20px;
}

.overlay-screen.active {
  opacity: 1;
  pointer-events: auto;
}

.overlay-screen.hidden {
  display: none !important;
}

.screen-card {
  max-width: 540px;
  width: 100%;
  background: linear-gradient(180deg, #181c2b 0%, #111420 100%);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 34px 30px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7), 0 0 30px rgba(59, 130, 246, 0.15);
}

.badge-title {
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  color: #93c5fd;
  background: rgba(59, 130, 246, 0.15);
  padding: 6px 14px;
  border-radius: 20px;
  margin-bottom: 14px;
  letter-spacing: 1px;
}

.main-title {
  font-family: 'Cinzel', serif;
  font-size: 34px;
  font-weight: 900;
  line-height: 1.15;
  color: #ffffff;
  margin-bottom: 12px;
}

.accent-title {
  background: linear-gradient(90deg, #f59e0b, #fbbf24, #f59e0b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.tagline {
  font-size: 14px;
  color: #94a3b8;
  line-height: 1.6;
  margin-bottom: 20px;
}

.bank-pill-row {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.bank-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 800;
  color: #fcd34d;
}

.bank-pill.score-pill {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.4);
  color: #93c5fd;
}

.bank-pill.center-pill {
  margin-top: 6px;
}

.bank-amount {
  font-size: 15px;
  color: #fbbf24;
}

.main-menu-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 22px;
}

.btn-primary {
  width: 100%;
  padding: 16px 24px;
  background: linear-gradient(135deg, #e11d48, #be123c);
  color: #ffffff;
  border: none;
  border-radius: 14px;
  font-family: 'Cinzel', serif;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 1px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(225, 29, 72, 0.4);
  transition: all 0.2s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

.btn-dojo {
  width: 100%;
  padding: 14px 20px;
  background: linear-gradient(135deg, #d97706, #b45309);
  color: #ffffff;
  border: none;
  border-radius: 14px;
  font-family: 'Cinzel', serif;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 1px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(217, 119, 6, 0.35);
  transition: all 0.2s ease;
}

.btn-dojo:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

.btn-secondary {
  width: 100%;
  padding: 13px 20px;
  background: rgba(255, 255, 255, 0.08);
  color: #f1f5f9;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
}

.controls-guide {
  background: rgba(10, 13, 20, 0.6);
  border-radius: 14px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.guide-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: #cbd5e1;
}

.key-pill {
  background: #252d42;
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 2px 7px;
  border-radius: 6px;
  font-weight: 800;
  font-size: 11px;
  color: #f8fafc;
}

/* ==========================================================================
   BLACKSMITH DOJO SCREEN
   ========================================================================== */
.dojo-card {
  max-width: 620px;
}

.dojo-title {
  font-family: 'Cinzel', serif;
  font-size: 26px;
  font-weight: 900;
  color: #f59e0b;
  margin-bottom: 6px;
}

.dojo-upgrades-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 16px 0;
  max-height: 380px;
  overflow-y: auto;
  padding-right: 6px;
}

.dojo-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(10, 13, 20, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 12px 16px;
  border-radius: 14px;
  gap: 12px;
}

.dojo-row-info {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
}

.dojo-row-icon {
  font-size: 26px;
}

.dojo-row-text {
  display: flex;
  flex-direction: column;
}

.dojo-row-name {
  font-size: 14px;
  font-weight: 800;
  color: #ffffff;
}

.dojo-row-desc {
  font-size: 11px;
  color: #94a3b8;
}

.dojo-row-tier {
  font-size: 11px;
  font-weight: 800;
  color: #fbbf24;
}

.btn-buy-upgrade {
  padding: 8px 16px;
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.btn-buy-upgrade:disabled {
  background: #334155;
  color: #64748b;
  cursor: not-allowed;
}

/* ==========================================================================
   LEVEL UP & REROLL
   ========================================================================== */
.upgrade-modal {
  max-width: 860px;
  width: 100%;
  text-align: center;
}

.upgrade-sparkle {
  font-size: 13px;
  font-weight: 900;
  color: #fbbf24;
  letter-spacing: 3px;
  margin-bottom: 6px;
}

.upgrade-title {
  font-family: 'Cinzel', serif;
  font-size: 28px;
  font-weight: 900;
  color: #ffffff;
  margin-bottom: 6px;
}

.upgrade-subtitle {
  font-size: 14px;
  color: #94a3b8;
  margin-bottom: 24px;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 22px;
}

.upgrade-card {
  background: linear-gradient(180deg, #1b2133 0%, #111522 100%);
  border-radius: 18px;
  padding: 22px 18px;
  text-align: center;
  border: 2px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.upgrade-card:hover {
  transform: translateY(-6px) scale(1.02);
  border-color: #f59e0b;
  box-shadow: 0 12px 30px rgba(245, 158, 11, 0.35);
}

.card-icon {
  font-size: 38px;
  margin-bottom: 10px;
}

.card-title {
  font-family: 'Cinzel', serif;
  font-size: 16px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 6px;
}

.card-rarity {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 6px;
  margin-bottom: 10px;
}

.rarity-common { background: rgba(148, 163, 184, 0.2); color: #cbd5e1; }
.rarity-rare { background: rgba(59, 130, 246, 0.2); color: #60a5fa; }
.rarity-epic { background: rgba(168, 85, 247, 0.2); color: #c084fc; }
.rarity-legendary { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }

.card-desc {
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.5;
}

.reroll-container {
  display: flex;
  justify-content: center;
}

.btn-reroll {
  padding: 10px 24px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #f8fafc;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-reroll:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: #f59e0b;
}

.btn-reroll:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ==========================================================================
   TREASURE CHEST OPEN POPUP
   ========================================================================== */
.chest-card {
  border-color: rgba(245, 158, 11, 0.5);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 45px rgba(245, 158, 11, 0.4);
}

.chest-icon-anim {
  font-size: 58px;
  animation: chestBounce 0.6s infinite alternate;
}

@keyframes chestBounce {
  0% { transform: translateY(0); }
  100% { transform: translateY(-10px) scale(1.08); }
}

.chest-title {
  font-family: 'Cinzel', serif;
  font-size: 26px;
  font-weight: 900;
  color: #fbbf24;
  margin: 10px 0 16px 0;
}

.chest-rewards-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.reward-pill {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid #f59e0b;
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 800;
  color: #ffffff;
}

/* ==========================================================================
   PAUSE SCREEN
   ========================================================================== */
.pause-card {
  max-width: 460px;
  border-color: rgba(59, 130, 246, 0.4);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 40px rgba(59, 130, 246, 0.25);
}

/* ==========================================================================
   DEATH & VICTORY
   ========================================================================== */
.death-card {
  border-color: rgba(239, 68, 68, 0.3);
}

.death-icon { font-size: 46px; margin-bottom: 8px; }
.death-title { font-family: 'Cinzel', serif; font-size: 28px; font-weight: 900; color: #ef4444; }
.death-quote { font-size: 13px; font-style: italic; color: #94a3b8; margin: 8px 0 20px 0; }

.run-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.stat-box {
  background: rgba(10, 13, 20, 0.6);
  border-radius: 12px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.stat-num {
  font-family: 'Cinzel', serif;
  font-size: 20px;
  font-weight: 900;
  color: #f8fafc;
}

.stat-lbl {
  font-size: 10px;
  color: #64748b;
  font-weight: 700;
  text-transform: uppercase;
}

.action-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.victory-card {
  border-color: rgba(245, 158, 11, 0.4);
}

.victory-icon { font-size: 50px; margin-bottom: 8px; }
.victory-title {
  font-family: 'Cinzel', serif;
  font-size: 30px;
  font-weight: 900;
  background: linear-gradient(90deg, #f59e0b, #fbbf24, #f59e0b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.rank-badge {
  display: inline-block;
  font-family: 'Cinzel', serif;
  font-size: 18px;
  font-weight: 900;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.2);
  border: 2px solid #fbbf24;
  padding: 4px 18px;
  border-radius: 20px;
  margin: 10px 0;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.5);
}

/* ==========================================================================
   MOBILE RESPONSIVENESS
   ========================================================================== */
@media (max-width: 768px) {
  .hud-layer { padding: 10px; }
  .player-stats { padding: 6px 10px; }
  .bars-container { width: 110px; }
  .level-badge { width: 38px; height: 38px; }
  .lvl-number { font-size: 16px; }
  .weapon-power-card { width: 170px; padding: 6px 10px; }
  .wp-stats-row { display: none; }
  .cards-grid { grid-template-columns: 1fr; gap: 10px; }
  .upgrade-card { padding: 14px; flex-direction: row; gap: 12px; text-align: left; }
  .card-icon { font-size: 26px; margin-bottom: 0; }
  .boss-bar-container { width: 90%; }
  .skills-hud { display: none; }
}
