/* ==========================================================================
   Cannon Blast — Studio-Grade Cartoon Arcade Stylesheet
   Clean Crisp Typography (8-dir outline shadows, zero blurry stroke),
   Unified Glossy UI, Responsive Portrait & Landscape Adaptation
   ========================================================================== */

:root {
  --font-display: 'Nunito', 'Rubik', 'Arial Rounded MT Bold', 'Segoe UI', 'Trebuchet MS', system-ui, -apple-system, sans-serif;
  --navy-top: #145cb8;
  --navy-bot: #093573;
  --navy-border: #051e45;
  --wood-dark: #5e2c09;
  --wood-mid: #9e5318;
  --gold: #ffd938;
  --gold-deep: #f29605;
  --green-top: #74ec26;
  --green-bot: #239e0c;
  --blue-top: #3db8ff;
  --blue-bot: #0b6ce3;
  --orange-top: #ffc130;
  --orange-bot: #e36607;
  --red-top: #ff5e5e;
  --red-bot: #c71616;
  --panel-bg: linear-gradient(180deg, #fffaf0 0%, #ffefc7 100%);
  --panel-border: #7c3c0e;
  --outline-dark: 0 2px 0 #07224a, 0 -1px 0 #07224a, 2px 0 0 #07224a, -2px 0 0 #07224a, 1.5px 1.5px 0 #07224a, -1.5px 1.5px 0 #07224a;
  --outline-brown: 0 2.5px 0 #4d2103, 0 -1px 0 #4d2103, 2px 0 0 #4d2103, -2px 0 0 #4d2103, 1.5px 1.5px 0 #4d2103, -1.5px 1.5px 0 #4d2103;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
}

*, *::before, *::after {
  box-sizing: border-box;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #1a8bff;
  font-family: var(--font-display);
  color: #ffffff;
  touch-action: none;
  -webkit-font-smoothing: antialiased;
}

.app-shell {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

#game-canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: crosshair;
}

.hidden {
  display: none !important;
}

/* ==========================================================================
   Overlay Screens & Panels
   ========================================================================== */

.screen.overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 20;
  padding: calc(12px + var(--safe-top)) calc(12px + var(--safe-right)) calc(12px + var(--safe-bottom)) calc(12px + var(--safe-left));
}

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

.modal-backdrop {
  background: rgba(6, 25, 58, 0.64);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.panel {
  background: var(--panel-bg);
  border: 5px solid var(--panel-border);
  border-radius: 30px;
  box-shadow:
    0 10px 0 #4d2204,
    0 22px 44px rgba(0, 0, 0, 0.48),
    inset 0 4px 0 #ffffff,
    inset 0 -4px 0 rgba(160, 96, 24, 0.2);
  color: #4f2508;
  position: relative;
}

/* Loading Screen */
.loading-panel {
  width: min(370px, 90vw);
  padding: 28px 26px;
  text-align: center;
}

.loading-logo {
  width: min(280px, 76vw);
  height: auto;
  display: block;
  margin: 0 auto 10px;
  animation: floatBob 2.4s ease-in-out infinite;
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.28));
}

.subtitle {
  margin: 0 0 14px;
  font-size: 0.96rem;
  font-weight: 800;
  color: #7c4214;
}

.progress-track {
  width: 100%;
  height: 18px;
  background: #dec596;
  border: 3px solid #6b380c;
  border-radius: 999px;
  overflow: hidden;
  box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.22);
}

.progress-fill {
  height: 100%;
  background: linear-gradient(180deg, #7cf22e 0%, #27a40d 100%);
  border-radius: 999px;
  transition: width 0.15s ease;
}

.loading-pct {
  display: inline-block;
  margin-top: 8px;
  font-weight: 900;
  font-size: 0.95rem;
  color: #6b380c;
}

/* ==========================================================================
   Home Screen
   ========================================================================== */

#screen-home {
  background: radial-gradient(circle at 50% 34%, rgba(255, 255, 255, 0.08), rgba(6, 30, 74, 0.44));
}

.home-layout {
  width: min(520px, 94vw);
  height: min(720px, 94vh);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
}

.home-top-bar {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.home-top-actions {
  display: flex;
  gap: 10px;
}

.home-hero {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.home-logo-img {
  width: clamp(250px, 68vw, 410px);
  max-height: 36vh;
  object-fit: contain;
  animation: floatBob 2.8s ease-in-out infinite;
  filter: drop-shadow(0 12px 18px rgba(5, 24, 56, 0.42));
}

.hero-tagline {
  margin: 4px 0 0;
  padding: 6px 18px;
  background: linear-gradient(180deg, var(--navy-top) 0%, var(--navy-bot) 100%);
  border: 3px solid var(--navy-border);
  border-radius: 999px;
  font-size: clamp(0.8rem, 2.4vw, 0.96rem);
  font-weight: 900;
  letter-spacing: 0.4px;
  color: #fff6c9;
  text-shadow: 0 2px 0 #051c42;
  box-shadow: 0 4px 0 rgba(5, 24, 56, 0.42), inset 0 2px 0 rgba(255, 255, 255, 0.25);
}

.home-actions {
  width: min(320px, 88vw);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.home-footer-stats {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.stat-chip {
  background: linear-gradient(180deg, rgba(16, 78, 160, 0.92) 0%, rgba(8, 43, 98, 0.92) 100%);
  border: 3px solid var(--navy-border);
  border-radius: 18px;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 146px;
  box-shadow: 0 4px 0 rgba(4, 18, 46, 0.45), inset 0 2px 0 rgba(255, 255, 255, 0.22);
}

.stat-chip-icon {
  width: 34px;
  height: 34px;
  object-fit: contain;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.35));
}

.stat-chip-text {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.stat-label {
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.7px;
  color: #a8d8ff;
}

.stat-val {
  font-size: 1.12rem;
  font-weight: 900;
  color: var(--gold);
  text-shadow: 0 2px 0 #07224a;
}

/* ==========================================================================
   Pills & Glossy Buttons
   ========================================================================== */

.pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(180deg, rgba(18, 84, 168, 0.92) 0%, rgba(9, 48, 108, 0.94) 100%);
  border: 3px solid var(--navy-border);
  border-radius: 999px;
  padding: 4px 16px 4px 6px;
  box-shadow: 0 4px 0 rgba(5, 22, 52, 0.48), inset 0 2px 0 rgba(255, 255, 255, 0.25);
  font-size: clamp(1rem, 2.8vw, 1.32rem);
  font-weight: 900;
  color: #ffffff;
  text-shadow: var(--outline-dark);
  letter-spacing: 0.3px;
}

.pill-icon {
  width: clamp(30px, 6vw, 38px);
  height: clamp(30px, 6vw, 38px);
  object-fit: contain;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.38));
}

.img-icon-btn {
  background: none;
  border: none;
  padding: 0;
  width: clamp(46px, 9vw, 56px);
  height: clamp(46px, 9vw, 56px);
  cursor: pointer;
  transition: transform 0.12s cubic-bezier(0.3, 1.5, 0.5, 1), filter 0.12s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.img-icon-btn img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 4px 5px rgba(0, 0, 0, 0.38));
}

.img-icon-btn.sm {
  width: 46px;
  height: 46px;
}

.img-icon-btn.lg {
  width: 66px;
  height: 66px;
}

.img-icon-btn:hover {
  transform: scale(1.08);
  filter: brightness(1.08);
}

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

.img-icon-btn.pulse {
  animation: pulseScale 1.4s ease-in-out infinite;
}

.modal-close-btn {
  position: absolute;
  top: -16px;
  right: -16px;
  width: 48px;
  height: 48px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: transform 0.12s ease;
  z-index: 3;
}

.modal-close-btn img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 4px 5px rgba(0, 0, 0, 0.4));
}

.modal-close-btn:hover {
  transform: scale(1.1);
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 24px;
  border-radius: 22px;
  border: 3.5px solid #1b4d05;
  font-family: var(--font-display);
  font-size: clamp(1.02rem, 3vw, 1.22rem);
  font-weight: 900;
  letter-spacing: 0.7px;
  color: #ffffff;
  text-shadow: 0 2.5px 0 rgba(0, 0, 0, 0.45), 0 0 2px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  transition: transform 0.12s ease, filter 0.12s ease;
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.36), inset 0 4px 0 rgba(255, 255, 255, 0.46), inset 0 -3px 0 rgba(0, 0, 0, 0.14);
}

.cta-btn.full {
  width: 100%;
}

.cta-btn.sm-btn {
  padding: 10px 18px;
  font-size: 0.94rem;
}

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

.cta-btn:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.36), inset 0 2px 0 rgba(255, 255, 255, 0.3);
}

.cta-green {
  background: linear-gradient(180deg, var(--green-top) 0%, var(--green-bot) 100%);
  border-color: #165904;
}

.cta-blue {
  background: linear-gradient(180deg, var(--blue-top) 0%, var(--blue-bot) 100%);
  border-color: #063c88;
}

.cta-orange {
  background: linear-gradient(180deg, var(--orange-top) 0%, var(--orange-bot) 100%);
  border-color: #823102;
}

.cta-red {
  background: linear-gradient(180deg, var(--red-top) 0%, var(--red-bot) 100%);
  border-color: #6b0808;
}

.cta-img-icon {
  width: 32px;
  height: 32px;
  object-fit: contain;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.35));
}

/* ==========================================================================
   In-Game HUD (Sleek, Zero-Clutter, Matches Reference Layout)
   ========================================================================== */

.hud {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 10;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: calc(10px + var(--safe-top)) calc(12px + var(--safe-right)) calc(12px + var(--safe-bottom)) calc(12px + var(--safe-left));
}

.hud-top {
  width: min(680px, 100%);
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.hud-left, .hud-right {
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: auto;
}

.hud-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.level-badge {
  background: linear-gradient(180deg, #1b72db 0%, #0a3c85 100%);
  border: 3px solid #05214d;
  border-radius: 20px;
  padding: 4px 22px 6px;
  text-align: center;
  box-shadow: 0 5px 0 rgba(4, 20, 50, 0.52), inset 0 2.5px 0 rgba(255, 255, 255, 0.32);
  min-width: 112px;
}

.level-badge-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #d8eeff;
  text-shadow: 0 1.5px 0 #05214d;
  line-height: 1.05;
}

.level-badge-num {
  display: block;
  font-size: clamp(1.3rem, 3.8vw, 1.7rem);
  font-weight: 900;
  color: var(--gold);
  text-shadow: var(--outline-brown);
  line-height: 1.1;
}

.targets-progress-bar {
  position: relative;
  width: 116px;
  height: 17px;
  background: rgba(6, 28, 68, 0.86);
  border: 2.5px solid #041b42;
  border-radius: 999px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.32);
}

.targets-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #ff9914 0%, #ffe033 100%);
  transition: width 0.25s ease;
}

.targets-progress-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 900;
  color: #ffffff;
  text-shadow: 0 1.5px 2px #000000;
}

.hud-status-banner {
  align-self: center;
  margin-top: 6px;
  background: linear-gradient(180deg, rgba(16, 82, 168, 0.94) 0%, rgba(8, 43, 98, 0.94) 100%);
  border: 2.5px solid var(--gold);
  border-radius: 999px;
  padding: 6px 18px;
  font-size: 0.86rem;
  font-weight: 900;
  letter-spacing: 0.3px;
  color: #fff7cc;
  text-shadow: 0 1.5px 0 #06214c;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  animation: popIn 0.2s ease;
}

/* Bottom Power-up Bar */
.hud-bottom {
  width: min(680px, 100%);
  margin: 0 auto;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 0 4px;
}

.powerup-group {
  display: flex;
  gap: clamp(8px, 2vw, 14px);
  pointer-events: auto;
}

.pu-btn {
  position: relative;
  width: clamp(58px, 12.5vw, 76px);
  height: clamp(58px, 12.5vw, 76px);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: transform 0.14s cubic-bezier(0.3, 1.5, 0.5, 1), filter 0.14s ease;
}

.pu-btn img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 5px 5px rgba(0, 0, 0, 0.44));
}

.pu-btn:hover:not(:disabled) {
  transform: translateY(-4px) scale(1.06);
}

.pu-btn:active:not(:disabled) {
  transform: scale(0.92);
}

.pu-btn.armed {
  transform: translateY(-7px) scale(1.1);
  filter: drop-shadow(0 0 14px #ffe033) brightness(1.12);
}

.pu-btn:disabled {
  opacity: 0.45;
  filter: grayscale(0.7);
  cursor: not-allowed;
}

.pu-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 24px;
  height: 24px;
  padding: 0 5px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ff4242 0%, #c40a0a 100%);
  border: 2.5px solid #ffffff;
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 5px rgba(0, 0, 0, 0.42);
}

/* ==========================================================================
   Level Select Panel
   ========================================================================== */

.levels-panel {
  width: min(680px, 95vw);
  height: min(86vh, 720px);
  display: flex;
  flex-direction: column;
  padding: 16px 18px;
  gap: 10px;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.panel-title-wrap {
  text-align: center;
}

.panel-title {
  margin: 0;
  font-size: clamp(1.3rem, 4vw, 1.7rem);
  font-weight: 900;
  color: #5b2806;
  letter-spacing: 0.6px;
}

.panel-sub {
  font-size: 0.86rem;
  font-weight: 900;
  color: #a15818;
}

.chapter-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.chapter-tab {
  flex: 1 0 auto;
  padding: 8px 13px;
  border-radius: 14px;
  border: 2.5px solid #b88240;
  background: #f5dfb0;
  color: #6b370b;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 900;
  cursor: pointer;
  transition: all 0.14s ease;
}

.chapter-tab.active {
  background: linear-gradient(180deg, var(--blue-top) 0%, var(--blue-bot) 100%);
  border-color: #063d86;
  color: #ffffff;
  text-shadow: 0 1.5px 0 #063d86;
  box-shadow: 0 3px 0 #063d86;
}

.chapter-banner {
  background: rgba(140, 74, 20, 0.12);
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 0.82rem;
  font-weight: 800;
  color: #6b370b;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.levels-grid {
  flex: 1;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(78px, 1fr));
  gap: 10px;
  padding: 4px 2px 8px;
  align-content: start;
}

.level-tile {
  position: relative;
  aspect-ratio: 1 / 1.06;
  border-radius: 18px;
  border: 3px solid #094596;
  background: linear-gradient(180deg, #45c2ff 0%, #1070e3 100%);
  box-shadow: 0 5px 0 #083573, inset 0 2.5px 0 rgba(255, 255, 255, 0.45);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  transition: transform 0.12s ease, filter 0.12s ease;
  color: #ffffff;
  font-family: var(--font-display);
}

.level-tile:hover:not(.locked) {
  transform: translateY(-2px);
  filter: brightness(1.08);
}

.level-tile:active:not(.locked) {
  transform: translateY(2px);
}

.level-tile.current {
  background: linear-gradient(180deg, var(--green-top) 0%, var(--green-bot) 100%);
  border-color: #165904;
  box-shadow: 0 5px 0 #165904, inset 0 2.5px 0 rgba(255, 255, 255, 0.45);
}

.level-tile.locked {
  background: linear-gradient(180deg, #b6bec9 0%, #838d9c 100%);
  border-color: #525c6b;
  box-shadow: 0 4px 0 #454d59;
  cursor: not-allowed;
  opacity: 0.78;
}

.level-tile-num {
  font-size: 1.4rem;
  font-weight: 900;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.38);
  line-height: 1;
}

.level-tile-stars {
  display: flex;
  gap: 2px;
}

.level-tile-stars img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.level-lock-label {
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 0.5px;
  color: #eef3f8;
}

/* ==========================================================================
   Modals (Pause, Victory, Failure, Settings)
   ========================================================================== */

.modal-panel {
  width: min(392px, 92vw);
  padding: 28px 24px 22px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: popIn 0.22s cubic-bezier(0.25, 1.35, 0.5, 1);
}

.ribbon-header {
  margin: -48px auto 4px;
  padding: 10px 30px;
  border-radius: 20px;
  font-size: 1.32rem;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 0.9px;
  text-shadow: 0 2.5px 0 rgba(0, 0, 0, 0.42);
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.32), inset 0 3.5px 0 rgba(255, 255, 255, 0.44);
}

.ribbon-header.green {
  background: linear-gradient(180deg, var(--green-top) 0%, var(--green-bot) 100%);
  border: 3.5px solid #155704;
}

.ribbon-header.blue {
  background: linear-gradient(180deg, var(--blue-top) 0%, var(--blue-bot) 100%);
  border: 3.5px solid #063c88;
}

.ribbon-header.red {
  background: linear-gradient(180deg, var(--red-top) 0%, var(--red-bot) 100%);
  border: 3.5px solid #6b0808;
}

.modal-sub {
  margin: -4px 0 2px;
  font-size: 0.94rem;
  font-weight: 800;
  color: #7c4414;
}

.modal-icon-row {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 4px 0;
}

.star-rating-row {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 12px;
  margin: 2px 0;
}

.rating-star {
  width: 60px;
  height: 60px;
  object-fit: contain;
  filter: drop-shadow(0 4px 4px rgba(0, 0, 0, 0.28));
  transition: transform 0.3s cubic-bezier(0.3, 1.6, 0.5, 1);
}

.rating-star.center {
  width: 74px;
  height: 74px;
  margin-bottom: 6px;
}

.rating-star.earned {
  transform: scale(1.1);
}

.score-breakdown {
  background: rgba(140, 74, 20, 0.11);
  border: 2.5px solid rgba(140, 74, 20, 0.25);
  border-radius: 18px;
  padding: 11px 15px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.breakdown-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.96rem;
  font-weight: 800;
  color: #6b380c;
}

.breakdown-row.highlight {
  padding-top: 7px;
  border-top: 2px dashed rgba(140, 74, 20, 0.28);
  color: #b85800;
  font-size: 1.08rem;
}

.reward-banner {
  background: linear-gradient(180deg, #fff1a8 0%, #ffd859 100%);
  border: 2.5px solid #b56c00;
  border-radius: 14px;
  padding: 8px 12px;
  font-size: 0.88rem;
  font-weight: 900;
  color: #633000;
}

/* Settings */
.settings-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-weight: 800;
  font-size: 0.95rem;
  color: #5b2806;
}

.setting-control {
  display: flex;
  align-items: center;
  gap: 8px;
}

.setting-control input[type="range"] {
  width: 118px;
  accent-color: #1680f0;
}

.range-val {
  min-width: 38px;
  text-align: right;
  font-size: 0.86rem;
  font-weight: 900;
  color: #8c4a14;
}

.toggle-switch {
  width: 22px;
  height: 22px;
  accent-color: #2aa810;
  cursor: pointer;
}

.controls-hint {
  background: rgba(140, 74, 20, 0.11);
  border-radius: 14px;
  padding: 9px 12px;
  font-size: 0.79rem;
  font-weight: 800;
  line-height: 1.4;
  color: #6b370b;
  text-align: left;
}

.settings-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.settings-actions .cta-btn {
  flex: 1;
}

/* ==========================================================================
   Responsive Landscape Adaptation
   ========================================================================== */

@media (orientation: landscape) and (max-height: 540px) {
  .home-layout {
    flex-direction: row;
    flex-wrap: wrap;
    width: min(760px, 95vw);
    height: auto;
    gap: 12px;
    justify-content: space-around;
  }
  .home-top-bar {
    flex-basis: 100%;
  }
  .home-logo-img {
    width: 220px;
  }
  .hud-top, .hud-bottom {
    width: 100%;
    max-width: 100%;
  }
  .pu-btn {
    width: 54px;
    height: 54px;
  }
  .level-badge {
    padding: 2px 14px;
    min-width: 90px;
  }
}

@media (min-width: 900px) and (orientation: landscape) {
  .hud-top, .hud-bottom {
    width: min(860px, 96vw);
  }
}

/* Animations */
@keyframes floatBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

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

@keyframes popIn {
  0% { transform: scale(0.84); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.ammo-pill.low-ammo {
  border-color: #ff3b3b;
  background: linear-gradient(180deg, rgba(186, 26, 26, 0.94) 0%, rgba(110, 10, 10, 0.94) 100%);
  animation: pulseScale 0.85s ease-in-out infinite;
}
