/* =========================================================
   VOXEL DEMOLITION 3D - CYBER ARENA EDITION STYLESHEET
   ========================================================= */

:root {
  --bg-dark: #0a0c14;
  --bg-card: #151928;
  --bg-card-alt: #1c2237;
  --primary: #ffd32a; /* Gold / Credits */
  --secondary: #a55eea; /* Purple / Nanocores */
  --cyan: #00d2d3;
  --danger: #ff5252;
  --success: #2ecc71;
  --text-white: #f5f6fa;
  --text-muted: #8b9bb4;
  --border-glow: rgba(0, 210, 211, 0.3);
  --font-main: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

body {
  background: #040508;
  font-family: var(--font-main);
  color: var(--text-white);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* =========================================================
   MOBILE DEVICE WRAPPER & BEZEL
   ========================================================= */
.mobile-wrapper {
  width: 100%;
  max-width: 440px;
  height: 96vh;
  max-height: 880px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.device-bezel {
  width: 100%;
  height: 100%;
  background: var(--bg-dark);
  border-radius: 40px;
  border: 4px solid #252a3d;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85), 0 0 35px rgba(0, 210, 211, 0.2);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

/* Top Mobile Status Bar */
.mobile-status-bar {
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  z-index: 50;
  background: rgba(10, 12, 20, 0.85);
  backdrop-filter: blur(5px);
}

.notch-speaker {
  width: 70px;
  height: 5px;
  background: #232738;
  border-radius: 10px;
}

/* =========================================================
   HEADER: LEVEL MILESTONE PROGRESS & CURRENCIES
   ========================================================= */
.game-header {
  height: 56px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(21, 25, 40, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 40;
  gap: 8px;
}

.header-level-section {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.header-level-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, #3867d6, #4b7bec);
  padding: 3px 8px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(75, 123, 236, 0.4);
}

.lvl-label {
  font-size: 9px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.8);
}

.lvl-number {
  font-size: 13px;
  font-weight: 900;
  color: #fff;
}

.level-progress-wrapper {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  max-width: 140px;
}

.level-progress-track {
  width: 100%;
  height: 7px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  overflow: hidden;
}

.level-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #4b7bec, #00d2d3);
  transition: width 0.4s ease-out;
}

.level-milestone-txt {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  font-weight: 700;
  color: var(--text-muted);
}

.next-reward-tag {
  color: var(--primary);
  font-size: 8px;
}

.header-currencies {
  display: flex;
  align-items: center;
  gap: 6px;
}

.currency-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(10, 12, 20, 0.8);
  padding: 4px 9px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-weight: 800;
  font-size: 12px;
}

.credits-pill {
  border-color: rgba(255, 211, 42, 0.35);
  color: var(--primary);
}

.nanocores-pill {
  border-color: rgba(165, 94, 234, 0.35);
  color: var(--secondary);
}

.icon-btn {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 13px;
  color: #fff;
  transition: transform 0.15s;
}

.icon-btn:active {
  transform: scale(0.9);
}

/* =========================================================
   3D CANVAS & COMBAT HUD
   ========================================================= */
.canvas-container {
  flex: 1;
  width: 100%;
  position: relative;
  background: #000;
  overflow: hidden;
}

canvas.webgl-canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
  outline: none;
}

/* Ingame Combat HUD */
.ingame-hud {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 12px;
  z-index: 20;
}

/* Top Target Health Bar */
.target-card {
  background: rgba(15, 18, 30, 0.88);
  backdrop-filter: blur(10px);
  padding: 10px 14px;
  border-radius: 18px;
  border: 1px solid rgba(0, 210, 211, 0.35);
  pointer-events: auto;
  box-shadow: 0 6px 20px rgba(0,0,0,0.6);
}

.target-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 800;
}

.target-name {
  color: var(--cyan);
  letter-spacing: 0.5px;
}

.target-pct {
  color: var(--primary);
}

.destruction-bar-bg {
  width: 100%;
  height: 10px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  overflow: hidden;
}

.destruction-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #ff9f43, #ee5253, #2ecc71);
  transition: width 0.2s ease-out;
}

.collapse-hint {
  font-size: 9px;
  color: #ff9f43;
  margin-top: 4px;
  font-weight: 700;
  text-align: center;
}

/* Dynamic Crosshair */
.crosshair {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 32px;
  height: 32px;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.cross-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border: 2px dashed rgba(0, 210, 211, 0.7);
  border-radius: 50%;
  animation: rotateCross 8s linear infinite;
}

@keyframes rotateCross {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.cross-dot {
  width: 5px;
  height: 5px;
  background: #ff5252;
  border-radius: 50%;
  box-shadow: 0 0 8px #ff5252;
}

.camera-hint {
  text-align: center;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.7);
  text-shadow: 0 2px 4px rgba(0,0,0,0.9);
  pointer-events: none;
  background: rgba(0,0,0,0.4);
  padding: 4px 10px;
  border-radius: 12px;
  align-self: center;
}

/* Bottom Combat HUD */
.combat-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(15, 18, 30, 0.92);
  backdrop-filter: blur(8px);
  padding: 8px 14px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  pointer-events: auto;
}

.equipped-weapon-badge {
  display: flex;
  align-items: center;
  gap: 8px;
}

.weapon-ico {
  font-size: 22px;
}

.weapon-subinfo {
  display: flex;
  flex-direction: column;
}

.weapon-lbl {
  font-size: 11px;
  font-weight: 900;
  color: #fff;
}

.weapon-type-lbl {
  font-size: 9px;
  color: var(--cyan);
  font-weight: 600;
}

.ammo-counter-card {
  text-align: center;
}

.ammo-label {
  font-size: 8px;
  color: var(--text-muted);
  font-weight: 800;
  letter-spacing: 0.5px;
}

.ammo-numbers {
  font-size: 18px;
  font-weight: 900;
}

.ammo-current {
  color: var(--primary);
}

.ammo-max {
  color: var(--text-muted);
  font-size: 12px;
}

.combat-home-btn {
  background: #23283c;
  border: none;
  color: #fff;
  border-radius: 12px;
  width: 36px;
  height: 36px;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* =========================================================
   SCREEN VIEWS (LOBBY, WEAPONS, SHOP, ETC.)
   ========================================================= */
.screen-view {
  position: absolute;
  top: 82px;
  bottom: 64px;
  left: 0;
  right: 0;
  background: var(--bg-dark);
  z-index: 30;
  display: none;
  flex-direction: column;
  overflow-y: auto;
  padding: 14px;
  animation: fadeIn 0.2s ease;
}

.screen-view.active {
  display: flex;
}

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

.screen-inner {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.screen-title-bar h2 {
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 0.5px;
  color: #fff;
}

.screen-sub {
  font-size: 10px;
  color: var(--text-muted);
}

/* =========================================================
   LOBBY SCREEN & 3D HOLOGRAM STAGE
   ========================================================= */
.lobby-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: center;
  padding-bottom: 10px;
}

.game-logo {
  margin-top: 4px;
}

.logo-sub {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--cyan);
}

.logo-main {
  font-size: 34px;
  font-weight: 900;
  letter-spacing: 2px;
  background: linear-gradient(135deg, #ffd32a, #ff9f43, #ff5252);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 4px 20px rgba(255, 159, 67, 0.4);
}

.badge-tag {
  display: inline-block;
  background: rgba(0, 210, 211, 0.15);
  border: 1px solid var(--cyan);
  color: var(--cyan);
  font-size: 9px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 10px;
}

/* 3D Hologram Mission Card */
.mission-preview-card {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid rgba(0, 210, 211, 0.25);
  border-radius: 20px;
  padding: 12px 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  position: relative;
  overflow: hidden;
}

.mission-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  text-align: left;
}

.mission-title {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--text-muted);
}

.mission-name {
  font-size: 16px;
  font-weight: 800;
  color: #fff;
}

.mission-difficulty {
  font-size: 10px;
  background: rgba(46, 204, 113, 0.2);
  color: #2ecc71;
  padding: 2px 8px;
  border-radius: 8px;
  font-weight: 800;
}

/* 3D Hologram Stage Canvas Container */
.hologram-stage {
  width: 100%;
  height: 120px;
  margin: 8px 0;
  position: relative;
  background: radial-gradient(circle at center, rgba(0, 210, 211, 0.15), transparent 70%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hologram-stage canvas {
  width: 100% !important;
  height: 100% !important;
}

.hologram-scanline {
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(0, 210, 211, 0) 50%, rgba(0, 210, 211, 0.08) 50%);
  background-size: 100% 4px;
  pointer-events: none;
}

.hologram-label {
  position: absolute;
  bottom: 2px;
  right: 6px;
  font-size: 8px;
  color: var(--cyan);
  font-weight: 800;
  letter-spacing: 1px;
}

.mission-reward-row {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 6px;
}

/* Hero Attack Button */
.play-hero-btn {
  width: 82%;
  max-width: 270px;
  height: 60px;
  background: linear-gradient(135deg, #ffd32a, #ff9f43);
  border: none;
  border-radius: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  cursor: pointer;
  position: relative;
  box-shadow: 0 8px 30px rgba(255, 159, 67, 0.5), inset 0 2px 2px rgba(255, 255, 255, 0.5);
  transition: transform 0.15s;
}

.play-hero-btn:active {
  transform: scale(0.96);
}

.play-pulse {
  position: absolute;
  inset: -4px;
  border-radius: 34px;
  border: 2px solid var(--primary);
  opacity: 0.6;
  animation: pulseHero 2s infinite;
}

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

.play-icon {
  font-size: 22px;
  color: #111;
}

.play-text {
  font-size: 20px;
  font-weight: 900;
  color: #111;
  letter-spacing: 1.5px;
}

/* Equipped Banner */
.equipped-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: var(--bg-card-alt);
  padding: 8px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.eq-icon {
  font-size: 24px;
}

.eq-details {
  text-align: left;
  flex: 1;
  margin-left: 10px;
}

.eq-label {
  font-size: 9px;
  color: var(--text-muted);
}

.eq-name {
  font-size: 12px;
  font-weight: 800;
  color: var(--primary);
}

.change-weapon-shortcut {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: var(--cyan);
  font-size: 10px;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 8px;
  cursor: pointer;
}

/* =========================================================
   WEAPONS ARSENAL SCREEN
   ========================================================= */
.weapons-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding-bottom: 20px;
}

.weapon-card {
  background: var(--bg-card);
  border-radius: 18px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
}

.weapon-card.active-weapon {
  border-color: var(--primary);
  background: rgba(255, 211, 42, 0.06);
}

.weapon-card.locked {
  opacity: 0.6;
  filter: grayscale(0.5);
}

.weapon-preview-box {
  width: 90px;
  height: 80px;
  margin: 4px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.weapon-spin-icon {
  font-size: 40px;
  animation: floatWeapon 3s ease-in-out infinite;
}

@keyframes floatWeapon {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-4px) rotate(5deg); }
}

.w-badge-360 {
  position: absolute;
  bottom: 0;
  right: 0;
  font-size: 8px;
  background: rgba(0,0,0,0.6);
  padding: 1px 5px;
  border-radius: 6px;
  color: var(--cyan);
}

.w-card-name {
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 2px;
}

.w-card-stats {
  font-size: 9px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.equip-btn {
  width: 100%;
  padding: 6px 0;
  border: none;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
  background: var(--bg-card-alt);
  color: #fff;
}

.equip-btn.equipped {
  background: var(--primary);
  color: #111;
}

.w-lock-tag {
  font-size: 9px;
  color: var(--danger);
  font-weight: 700;
}

/* =========================================================
   SHOP SCREEN & 3D CHESTS
   ========================================================= */
.daily-gift-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, rgba(46, 204, 113, 0.2), rgba(21, 25, 40, 0.95));
  border: 1px solid var(--success);
  border-radius: 18px;
  padding: 10px 12px;
}

.daily-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.gift-icon {
  font-size: 26px;
}

.gift-title {
  font-size: 12px;
  font-weight: 800;
}

.gift-desc {
  font-size: 9px;
  color: var(--text-muted);
}

.claim-gift-btn {
  background: var(--success);
  border: none;
  padding: 6px 10px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 900;
  color: #fff;
  cursor: pointer;
}

.chests-row {
  display: flex;
  gap: 8px;
}

.chest-card {
  flex: 1;
  background: var(--bg-card);
  border-radius: 16px;
  padding: 10px 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
}

.chest-card.featured {
  border-color: var(--primary);
  background: rgba(255, 211, 42, 0.06);
}

.badge-rec {
  position: absolute;
  top: -8px;
  background: var(--primary);
  color: #111;
  font-size: 8px;
  font-weight: 900;
  padding: 2px 6px;
  border-radius: 6px;
}

.chest-visual-box {
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chest-3d-icon {
  font-size: 34px;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.6));
  animation: floatChest 3s ease-in-out infinite;
}

@keyframes floatChest {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-4px) scale(1.04); }
}

.chest-name {
  font-size: 11px;
  font-weight: 800;
  margin-bottom: 2px;
}

.chest-loot {
  font-size: 8px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.open-chest-btn {
  width: 100%;
  padding: 6px 0;
  border: none;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
  background: var(--primary);
  color: #111;
}

.quantum-btn {
  background: var(--secondary);
  color: #fff;
}

.iap-section {
  margin-top: 6px;
}

.section-heading {
  font-size: 11px;
  font-weight: 800;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.iap-row {
  display: flex;
  gap: 8px;
}

.iap-card {
  flex: 1;
  background: var(--bg-card);
  border-radius: 14px;
  padding: 8px 4px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.iap-icon {
  font-size: 13px;
  font-weight: 800;
  color: var(--secondary);
}

.iap-name {
  font-size: 9px;
  color: var(--text-muted);
}

.buy-iap-btn {
  background: #3867d6;
  border: none;
  padding: 4px 8px;
  border-radius: 8px;
  color: #fff;
  font-weight: 800;
  font-size: 10px;
  cursor: pointer;
}

/* =========================================================
   UPGRADES SCREEN
   ========================================================= */
.upgrades-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.upgrade-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  border-radius: 16px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.upg-icon {
  font-size: 26px;
}

.upg-details {
  flex: 1;
}

.upg-name {
  font-size: 11px;
  font-weight: 800;
  margin-bottom: 2px;
}

.upg-stats {
  font-size: 9px;
  color: var(--cyan);
  margin-bottom: 4px;
}

.upg-bar {
  width: 100%;
  height: 5px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
}

.upg-progress {
  height: 100%;
  background: var(--primary);
}

.upg-buy-btn {
  background: var(--primary);
  border: none;
  border-radius: 12px;
  padding: 6px 10px;
  font-weight: 900;
  font-size: 10px;
  color: #111;
  cursor: pointer;
}

/* =========================================================
   QUESTS SCREEN
   ========================================================= */
.quests-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.quest-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  border-radius: 14px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.quest-title {
  font-size: 11px;
  font-weight: 800;
}

.quest-desc {
  font-size: 9px;
  color: var(--text-muted);
}

.quest-progress-txt {
  font-size: 9px;
  color: var(--cyan);
  margin-top: 2px;
  font-weight: 700;
}

.quest-claim-btn {
  background: var(--bg-card-alt);
  border: none;
  border-radius: 10px;
  padding: 5px 10px;
  font-weight: 800;
  font-size: 10px;
  color: #fff;
}

.quest-claim-btn:not([disabled]) {
  background: var(--success);
  cursor: pointer;
}

/* =========================================================
   MODALS: VICTORY & 3D CHEST OPENING
   ========================================================= */
.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(4, 5, 8, 0.88);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  animation: fadeIn 0.25s ease;
}

.modal-card {
  width: 100%;
  max-width: 340px;
  background: var(--bg-card);
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 18px 14px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85);
  text-align: center;
}

.victory-card {
  border-color: rgba(255, 211, 42, 0.4);
}

.win-ribbon {
  display: inline-block;
  background: var(--primary);
  color: #111;
  font-size: 10px;
  font-weight: 900;
  padding: 3px 10px;
  border-radius: 10px;
  letter-spacing: 1px;
}

.win-stars {
  font-size: 22px;
  margin: 4px 0;
}

.level-complete-txt {
  font-size: 16px;
  font-weight: 900;
  margin-bottom: 10px;
}

.win-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  background: rgba(0, 0, 0, 0.35);
  padding: 8px 4px;
  border-radius: 12px;
  margin-bottom: 10px;
}

.win-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-lbl {
  font-size: 8px;
  color: var(--text-muted);
  font-weight: 700;
}

.stat-val {
  font-size: 10px;
  font-weight: 900;
}

/* ELEVATOR NEEDLE GAUGE MULTIPLIER */
.multiplier-container {
  background: #0f121d;
  border-radius: 18px;
  padding: 10px 8px;
  border: 1px solid rgba(0, 210, 211, 0.3);
  margin-bottom: 12px;
}

.multiplier-title {
  font-size: 10px;
  font-weight: 900;
  color: var(--cyan);
  margin-bottom: 2px;
}

.gauge-wrapper {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 135px;
}

#gaugeCanvas {
  display: block;
}

.gauge-center-readout {
  position: absolute;
  bottom: 8px;
  font-size: 18px;
  font-weight: 900;
  color: var(--primary);
  text-shadow: 0 0 10px rgba(255, 211, 42, 0.5);
}

.gauge-stop-btn {
  width: 100%;
  padding: 9px 0;
  background: linear-gradient(135deg, #ee5253, #ff3838);
  border: none;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 900;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(238, 82, 83, 0.4);
}

.gauge-stop-btn:active {
  transform: scale(0.96);
}

.multiplier-result {
  font-size: 9px;
  color: var(--text-muted);
  margin-top: 4px;
  font-weight: 700;
}

/* Victory Actions */
.win-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.win-btn {
  width: 100%;
  padding: 10px 0;
  border-radius: 14px;
  border: none;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.next-level-btn {
  background: linear-gradient(135deg, #ffd32a, #ff9f43);
  color: #111;
  box-shadow: 0 4px 15px rgba(255, 159, 67, 0.3);
}

.lobby-btn {
  background: var(--bg-card-alt);
  color: #fff;
}

.ad-bonus-btn {
  background: linear-gradient(135deg, #00d2d3, #0984e3);
  color: #fff;
}

/* 3D CHEST ANIMATION STAGE */
.chest-anim-stage {
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin-bottom: 6px;
}

.chest-beams {
  position: absolute;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, rgba(255, 211, 42, 0.5) 0%, transparent 70%);
  animation: pulseBeams 1.5s ease-in-out infinite;
}

@keyframes pulseBeams {
  0%, 100% { transform: scale(0.9); opacity: 0.5; }
  50% { transform: scale(1.2); opacity: 0.9; }
}

.chest-box-3d {
  font-size: 54px;
  position: relative;
  animation: chestOpenBurst 0.8s ease-out forwards;
}

@keyframes chestOpenBurst {
  0% { transform: scale(0.6) rotate(-10deg); }
  60% { transform: scale(1.2) rotate(5deg); }
  100% { transform: scale(1) rotate(0deg); }
}

.loot-cards-container {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 16px 0;
}

.loot-card {
  width: 75px;
  height: 105px;
  background: linear-gradient(135deg, #1f2538, #2c334d);
  border-radius: 14px;
  border: 2px solid var(--primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  animation: flipCardIn 0.6s ease;
}

@keyframes flipCardIn {
  from { transform: rotateY(90deg) scale(0.8); opacity: 0; }
  to { transform: rotateY(0) scale(1); opacity: 1; }
}

.loot-card-icon {
  font-size: 26px;
}

.loot-card-val {
  font-size: 11px;
  font-weight: 900;
  color: var(--primary);
}

.loot-claim-btn {
  background: var(--primary);
  border: none;
  border-radius: 14px;
  padding: 9px 22px;
  font-weight: 900;
  font-size: 12px;
  color: #111;
  cursor: pointer;
}

/* Defeat / Out of Ammo */
.defeat-card {
  border-color: rgba(255, 82, 82, 0.4);
}

.defeat-icon {
  font-size: 34px;
}

.defeat-card h2 {
  font-size: 16px;
  font-weight: 900;
  color: var(--danger);
  margin: 4px 0;
}

.defeat-card p {
  font-size: 10px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.defeat-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.defeat-btn {
  width: 100%;
  padding: 10px 12px;
  border-radius: 14px;
  border: none;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.nanocore-refill-btn {
  background: linear-gradient(135deg, #8854d0, #a55eea);
  color: #fff;
}

.btn-subtext {
  font-size: 8px;
  opacity: 0.8;
  font-weight: 600;
  display: block;
}

.ad-refill-btn {
  background: linear-gradient(135deg, #2ecc71, #27ae60);
  color: #fff;
}

.defeat-sub-actions {
  display: flex;
  gap: 6px;
}

.sub-action-btn {
  flex: 1;
  background: var(--bg-card-alt);
  border: none;
  padding: 8px 0;
  border-radius: 10px;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

/* =========================================================
   BOTTOM NAVIGATION
   ========================================================= */
.bottom-nav-bar {
  height: 64px;
  background: rgba(18, 22, 34, 0.96);
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 4px;
  z-index: 50;
}

.nav-tab {
  flex: 1;
  background: none;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
  color: var(--text-muted);
  transition: color 0.15s, transform 0.15s;
}

.nav-tab:active {
  transform: scale(0.92);
}

.nav-tab.active {
  color: var(--cyan);
}

.nav-icon {
  font-size: 18px;
}

.nav-text {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

/* Center Elevated Home Button */
.nav-tab.nav-home {
  position: relative;
  top: -12px;
}

.home-icon-circle {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #ffd32a, #ff9f43);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(255, 159, 67, 0.5), 0 0 0 4px var(--bg-dark);
}

.home-icon-circle .nav-icon {
  font-size: 22px;
  color: #111;
}

.nav-tab.nav-home.active .nav-text {
  color: var(--primary);
}

@media (max-width: 480px) {
  .mobile-wrapper {
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
  }
  .device-bezel {
    border-radius: 0;
    border: none;
  }
}
