/* Fonts are bundled locally via fonts/fonts.css (loaded in index.html) — fully offline */

/* ═══════════════════════════════════════════
   RESET & VARIABLES
═══════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:       #03000a;
  --bg2:      #0a0020;
  --bg3:      #13003a;
  --purple:   #8800ff;
  --purple2:  #6600cc;
  --purple3:  #cc66ff;
  --purple4:  #aa44ee;
  --yellow:   #ffdd88;
  --yellow2:  #ffaa22;
  --red:      #ff2244;
  --cyan:     #00ffcc;
  --green:    #00ff88;
  --grey:     #332255;
  --grey2:    #221144;
  --text:     #ccaaff;
  --text2:    #886699;
  --white:    #ffffff;

  --glow-p:   0 0 18px rgba(136,0,255,0.7);
  --glow-y:   0 0 14px rgba(255,200,50,0.6);
  --glow-r:   0 0 14px rgba(255,30,60,0.7);
  --glow-c:   0 0 12px rgba(0,255,200,0.5);

  --card-bg:  rgba(12, 0, 30, 0.92);
  --card-border: rgba(136, 0, 255, 0.3);
  --radius:   14px;
  --radius-sm: 8px;
  --trans:    0.28s cubic-bezier(0.4,0,0.2,1);
}

/* ═══════════════════════════════════════════
   CUSTOM SCROLLBAR
═══════════════════════════════════════════ */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--purple2); border-radius: 3px; }
* { scrollbar-width: thin; scrollbar-color: var(--purple2) var(--bg); }

/* ═══════════════════════════════════════════
   BASE
═══════════════════════════════════════════ */
html, body {
  height: 100vh;            /* fallback */
  height: 100dvh;          /* modern mobile */
  height: var(--app-height, 100dvh); /* JS-controlled exact */
  width: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: 'Rajdhani', Arial, sans-serif;
  font-weight: 500;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
  position: fixed;
  inset: 0;
  overscroll-behavior: none;
}

/* ═══════════════════════════════════════════
   SCREEN SYSTEM
═══════════════════════════════════════════ */
.screen {
  position: fixed;
  inset: 0;
  height: var(--app-height, 100dvh);
  display: none;
  flex-direction: column;
  background: var(--bg);
  overflow: hidden;
  z-index: 1;
}
.screen.active { display: flex; }
.overlay { z-index: 50; background: rgba(3,0,10,0.82); backdrop-filter: blur(4px); justify-content: center; align-items: center; }

/* ═══════════════════════════════════════════
   LOADING SCREEN
═══════════════════════════════════════════ */
#s-loading { justify-content: center; align-items: center; }

#loading-bg {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  z-index: 0;
}

.loading-wrap {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 32px;
}

.loading-icon-wrap {
  width: 90px;
  height: 108px;
  filter: drop-shadow(0 0 18px rgba(136,0,255,0.8));
  animation: loading-bob 2s ease-in-out infinite;
}
.loading-thief-svg { width: 100%; height: 100%; }

@keyframes loading-bob {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.loading-title {
  font-family: 'Orbitron', sans-serif;
  font-weight: 900;
  font-size: clamp(32px, 8vw, 48px);
  text-align: center;
  letter-spacing: 4px;
  line-height: 1.15;
  background: linear-gradient(135deg, #cc66ff 0%, #ffffff 50%, #8800ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
}

.loading-tagline {
  font-size: 14px;
  color: var(--text2);
  letter-spacing: 3px;
  text-transform: uppercase;
}

.loading-bar-wrap {
  position: relative;
  width: min(320px, 80vw);
  height: 4px;
  background: var(--grey2);
  border-radius: 2px;
  overflow: visible;
  margin-top: 8px;
}

.loading-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--purple2), var(--purple3));
  border-radius: 2px;
  transition: width 0.3s ease;
}

.loading-bar-glow {
  position: absolute;
  top: -3px;
  left: 0;
  width: 0%;
  height: 10px;
  background: linear-gradient(90deg, transparent, rgba(204,102,255,0.8), transparent);
  border-radius: 5px;
  transition: width 0.3s ease;
  pointer-events: none;
}

.loading-status {
  font-size: 12px;
  color: var(--text2);
  letter-spacing: 1px;
}

/* ═══════════════════════════════════════════
   MAIN MENU
═══════════════════════════════════════════ */
#s-main { justify-content: flex-end; }

#menu-canvas {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  z-index: 0;
}

.menu-overlay {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 60px 24px 40px;
}

.menu-logo-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  animation: fadeSlideUp 0.6s ease both;
}

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

.menu-logo-icon {
  width: 80px;
  height: 96px;
  filter: drop-shadow(0 0 24px rgba(136,0,255,0.9));
  animation: logo-pulse 3s ease-in-out infinite;
}
.menu-logo-icon svg { width: 100%; height: 100%; }

@keyframes logo-pulse {
  0%,100% { filter: drop-shadow(0 0 20px rgba(136,0,255,0.8)); }
  50%      { filter: drop-shadow(0 0 40px rgba(204,102,255,1.0)); }
}

.menu-title {
  font-family: 'Orbitron', sans-serif;
  font-weight: 900;
  font-size: clamp(36px, 10vw, 56px);
  text-align: center;
  line-height: 1.1;
  letter-spacing: 6px;
  color: white;
  text-shadow: 0 0 30px rgba(136,0,255,0.8), 0 0 60px rgba(136,0,255,0.4);
}
.menu-title span {
  background: linear-gradient(135deg, #cc66ff, #ffffff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.menu-tagline {
  font-size: 14px;
  color: rgba(204,102,255,0.7);
  letter-spacing: 4px;
  text-transform: uppercase;
}

.menu-buttons {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 100%;
  max-width: 320px;
  animation: fadeSlideUp 0.6s 0.2s ease both;
}

.btn-play {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 18px 32px;
  background: linear-gradient(135deg, #6600cc, #aa00ff);
  border: none;
  border-radius: 50px;
  color: white;
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 3px;
  cursor: pointer;
  box-shadow: 0 0 30px rgba(136,0,255,0.6), inset 0 1px 0 rgba(255,255,255,0.2);
  transition: var(--trans);
  position: relative;
  overflow: hidden;
}
.btn-play::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent);
  border-radius: inherit;
}
.btn-play:active { transform: scale(0.96); box-shadow: 0 0 15px rgba(136,0,255,0.4); }

.btn-play-icon {
  font-size: 20px;
  line-height: 1;
}

.menu-secondary-row {
  display: flex;
  gap: 12px;
  width: 100%;
}

.btn-menu-sm {
  flex: 1;
  padding: 13px 10px;
  background: rgba(136,0,255,0.12);
  border: 1px solid rgba(136,0,255,0.35);
  border-radius: var(--radius);
  color: var(--text);
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 1px;
  cursor: pointer;
  transition: var(--trans);
  backdrop-filter: blur(8px);
}
.btn-menu-sm:active { background: rgba(136,0,255,0.3); border-color: var(--purple3); }

.menu-footer {
  font-size: 12px;
  color: var(--text2);
  letter-spacing: 2px;
  animation: fadeSlideUp 0.6s 0.35s ease both;
}

/* ═══════════════════════════════════════════
   SCREEN HEADER (shared)
═══════════════════════════════════════════ */
.screen-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  padding-top: calc(16px + env(safe-area-inset-top, 0px));
  background: rgba(3,0,10,0.95);
  border-bottom: 1px solid rgba(136,0,255,0.2);
  flex-shrink: 0;
  position: relative;
  z-index: 2;
}
.screen-header::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--purple), transparent);
}

.screen-header h2 {
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 3px;
  color: white;
}

.hdr-back {
  width: 40px; height: 40px;
  background: rgba(136,0,255,0.15);
  border: 1px solid rgba(136,0,255,0.3);
  border-radius: 50%;
  color: var(--purple3);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: var(--trans);
  flex-shrink: 0;
}
.hdr-back:active { background: rgba(136,0,255,0.4); }

.hdr-right {
  width: 40px;
  display: flex; justify-content: flex-end; align-items: center;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════
   SAVE SLOTS SCREEN
═══════════════════════════════════════════ */
.saves-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px 20px;
  overflow-y: auto;
}

.save-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 20px;
  cursor: pointer;
  transition: var(--trans);
  position: relative;
  overflow: hidden;
}
.save-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 4px; height: 100%;
  background: var(--purple);
  border-radius: 0 0 0 var(--radius);
  opacity: 0.6;
}
.save-card.has-save::before { opacity: 1; background: linear-gradient(180deg, var(--purple3), var(--purple)); }
.save-card.empty-save::before { background: var(--grey); opacity: 0.4; }

.save-card:active { transform: scale(0.98); border-color: var(--purple3); }

.save-slot-num {
  font-family: 'Orbitron', sans-serif;
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--text2);
  margin-bottom: 8px;
}

.save-slot-name {
  font-family: 'Orbitron', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: white;
  margin-bottom: 6px;
}

.save-slot-progress {
  font-size: 13px;
  color: var(--text2);
  margin-bottom: 10px;
}

.save-slot-stars {
  display: flex;
  align-items: center;
  gap: 6px;
}
.save-slot-star-val {
  font-family: 'Orbitron', sans-serif;
  font-size: 13px;
  color: var(--yellow);
}

.save-progress-bar {
  height: 3px;
  background: var(--grey2);
  border-radius: 2px;
  margin-top: 10px;
  overflow: hidden;
}
.save-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--purple2), var(--purple3));
  border-radius: 2px;
}

.save-new-indicator {
  font-size: 13px;
  color: var(--text2);
  display: flex;
  align-items: center;
  gap: 8px;
}
.save-new-indicator .plus-icon {
  width: 28px; height: 28px;
  background: rgba(136,0,255,0.2);
  border: 1px dashed rgba(136,0,255,0.4);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  color: var(--purple3);
}

.save-delete-hint {
  position: absolute;
  top: 10px; right: 14px;
  font-size: 10px;
  color: rgba(255,34,68,0.5);
  letter-spacing: 1px;
}

.saves-hint {
  text-align: center;
  font-size: 12px;
  color: var(--text2);
  padding: 12px 20px 20px;
  letter-spacing: 1px;
}

/* ═══════════════════════════════════════════
   NEW GAME SCREEN
═══════════════════════════════════════════ */
.newgame-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 28px;
  gap: 24px;
}

.ng-thief-preview {
  width: 100px; height: 120px;
  filter: drop-shadow(0 0 24px rgba(136,0,255,0.8));
  animation: loading-bob 2.5s ease-in-out infinite;
}
.ng-thief-preview svg { width: 100%; height: 100%; }

.ng-form { width: 100%; max-width: 320px; }

.ng-label {
  display: block;
  font-family: 'Orbitron', sans-serif;
  font-size: 11px;
  letter-spacing: 3px;
  color: var(--text2);
  margin-bottom: 10px;
}

.ng-input {
  width: 100%;
  padding: 16px 20px;
  background: rgba(136,0,255,0.08);
  border: 1px solid rgba(136,0,255,0.35);
  border-radius: var(--radius);
  color: white;
  font-family: 'Orbitron', sans-serif;
  font-size: 16px;
  letter-spacing: 2px;
  outline: none;
  transition: var(--trans);
  touch-action: auto;
}
.ng-input::placeholder { color: var(--text2); font-family: 'Rajdhani', sans-serif; letter-spacing: 1px; }
.ng-input:focus { border-color: var(--purple3); background: rgba(136,0,255,0.15); box-shadow: 0 0 18px rgba(136,0,255,0.2); }

.ng-start { max-width: 320px; }

.ng-slot-label {
  font-size: 12px;
  color: var(--text2);
  letter-spacing: 1px;
}

/* ═══════════════════════════════════════════
   ZONES MAP SCREEN
═══════════════════════════════════════════ */
.zones-progress-wrap {
  padding: 14px 20px 10px;
  background: rgba(3,0,10,0.6);
  border-bottom: 1px solid rgba(136,0,255,0.1);
  flex-shrink: 0;
}

.zones-progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#zones-total-stars {
  font-family: 'Orbitron', sans-serif;
  font-size: 14px;
  color: var(--yellow);
  text-shadow: var(--glow-y);
}

#zones-level-info {
  font-size: 13px;
  color: var(--text2);
  letter-spacing: 1px;
}

.zones-map-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.zones-map {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.zone-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 18px 20px;
  cursor: pointer;
  transition: var(--trans);
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
  overflow: hidden;
}
.zone-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--card-border), transparent);
}
.zone-card.unlocked { cursor: pointer; }
.zone-card.unlocked:active { transform: scale(0.98); border-color: var(--purple3); box-shadow: 0 0 20px rgba(136,0,255,0.2); }
.zone-card.locked { opacity: 0.45; cursor: not-allowed; }

.zone-card-num {
  font-family: 'Orbitron', sans-serif;
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--text2);
  flex-shrink: 0;
  width: 24px;
}

.zone-card-icon {
  font-size: 28px;
  flex-shrink: 0;
}

.zone-card-info { flex: 1; }

.zone-card-name {
  font-family: 'Orbitron', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: white;
  margin-bottom: 4px;
}

.zone-card-desc {
  font-size: 12px;
  color: var(--text2);
  letter-spacing: 0.5px;
}

.zone-card-stars {
  font-family: 'Orbitron', sans-serif;
  font-size: 13px;
  color: var(--yellow);
  flex-shrink: 0;
  text-align: right;
}

.zone-card-lock {
  font-size: 20px;
  flex-shrink: 0;
  opacity: 0.5;
}

.zone-card-progress-bar {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: var(--grey2);
}
.zone-card-progress-fill {
  height: 100%;
  border-radius: 0;
  transition: width 0.6s ease;
}

/* ═══════════════════════════════════════════
   LEVEL SELECT SCREEN
═══════════════════════════════════════════ */
.zone-header { }
.level-hdr-center { text-align: center; }
#level-select-zone-num { font-size: 11px; color: var(--text2); letter-spacing: 2px; }

.zone-star-count {
  font-family: 'Orbitron', sans-serif;
  font-size: 13px;
  color: var(--yellow);
  text-shadow: var(--glow-y);
  white-space: nowrap;
  width: auto !important;
}

.zone-story-bar {
  padding: 12px 20px;
  background: rgba(136,0,255,0.07);
  border-bottom: 1px solid rgba(136,0,255,0.12);
  flex-shrink: 0;
}
#zone-story-text {
  font-size: 13px;
  color: var(--text2);
  font-style: italic;
  letter-spacing: 0.5px;
}

.levels-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 20px;
  overflow-y: auto;
  align-content: start;
}

.level-cell {
  aspect-ratio: 1;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  transition: var(--trans);
  position: relative;
  overflow: hidden;
}
.level-cell.lv-unlocked:active { transform: scale(0.93); border-color: var(--purple3); box-shadow: var(--glow-p); }
.level-cell.lv-locked { opacity: 0.35; cursor: not-allowed; }
.level-cell.lv-current { border-color: var(--purple); box-shadow: 0 0 12px rgba(136,0,255,0.4); }
.level-cell.lv-complete { border-color: rgba(0,255,136,0.3); }

.level-cell-num {
  font-family: 'Orbitron', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: white;
}

.level-cell-stars {
  font-size: 11px;
  color: var(--yellow);
  line-height: 1;
}
.level-cell-stars .s-off { opacity: 0.2; }

.level-cell-lock { font-size: 18px; opacity: 0.4; }

.level-cell-boss {
  position: absolute;
  top: 4px; right: 4px;
  font-size: 10px;
  background: rgba(255,34,68,0.2);
  color: var(--red);
  padding: 1px 4px;
  border-radius: 3px;
  font-family: 'Orbitron', sans-serif;
  letter-spacing: 0.5px;
}

/* ═══════════════════════════════════════════
   GAME SCREEN
═══════════════════════════════════════════ */
.game-screen { background: #000; position: relative; }

/* Canvas fills entire screen */
#game-canvas {
  position: fixed;
  top: 0; left: 0;
  z-index: 10;
  touch-action: none;
  cursor: none;
}

/* Top HUD — slim bar over canvas */
.g-hud-top {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 8px 12px 0 0;
  z-index: 20;
  pointer-events: none;
}
.g-hud-top button { pointer-events: all; }

.g-zone-label { font-family: 'Orbitron', sans-serif; font-size: 9px; color: rgba(180,120,255,0.9); letter-spacing: 2px; text-transform: uppercase; text-align:right; }
.g-level-label { display:none; }

/* center cluster — pushed right of minimap */
.g-hud-center {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  margin-right: auto; margin-left: 134px;
}

.g-timer-row { display:flex; align-items:center; gap:4px; justify-content:flex-end; }
.g-timer-icon { font-size: 13px; filter: saturate(0.6); }

.g-status-wrap {
  display: flex; align-items: center; gap: 5px;
  padding: 4px 10px;
  background: rgba(0,0,0,0.5);
  border-radius: 20px;
  border: 1px solid rgba(0,255,136,0.25);
  transition: var(--trans);
}
.g-status-wrap.danger { border-color: rgba(255,34,68,0.6); background: rgba(255,34,68,0.1); }

.g-status-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green); box-shadow: 0 0 6px rgba(0,255,136,0.8);
  animation: dot-pulse 2s ease-in-out infinite;
}
.g-status-dot.danger-dot { background: var(--red); box-shadow: 0 0 8px rgba(255,34,68,1); animation: dot-blink 0.4s ease infinite; }

@keyframes dot-pulse { 0%,100%{opacity:1} 50%{opacity:0.4} }
@keyframes dot-blink { 0%,100%{opacity:1} 50%{opacity:0.1} }

.g-status-text { font-family: 'Orbitron', sans-serif; font-size: 9px; color: var(--green); letter-spacing: 2px; }
.g-status-text.danger-text { color: var(--red); }

/* Inline collect bar */
.g-collect-inline {
  display: flex; align-items: center; gap: 10px;
}
.g-ci {
  font-family: 'Orbitron', sans-serif;
  font-size: 10px;
  letter-spacing: 1px;
  color: rgba(200,180,255,0.85);
}
.g-ci.gem  { color: #00ffcc; text-shadow: 0 0 6px rgba(0,255,200,0.6); }
.g-ci.key  { color: var(--yellow); text-shadow: 0 0 6px rgba(255,200,0,0.6); }
.g-ci.lives { font-size: 11px; }

/* Timer + zone (right cluster) */
.g-hud-right { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.g-timer {
  font-family: 'Orbitron', sans-serif; font-size: 18px; font-weight: 700;
  color: white; text-align: right; text-shadow: 0 0 8px rgba(136,0,255,0.4);
}
.g-timer.urgent { color: var(--red); text-shadow: var(--glow-r); animation: dot-blink 0.7s ease infinite; }

.g-pause-btn {
  width: 40px; height: 40px;
  background: rgba(10,0,30,0.8);
  border: 1.5px solid rgba(136,0,255,0.5);
  border-radius: 10px;
  color: var(--purple3); font-size: 16px;
  cursor: pointer; pointer-events: all;
  display: flex; align-items: center; justify-content: center;
  transition: var(--trans);
  box-shadow: 0 0 12px rgba(136,0,255,0.25);
}
.g-pause-btn:active { background: rgba(136,0,255,0.5); transform: scale(0.94); }

/* Float texts */
.g-floats { position: fixed; inset: 0; z-index: 25; pointer-events: none; }
.float-text {
  position: absolute;
  font-family: 'Orbitron', sans-serif; font-size: 13px; font-weight: 700;
  pointer-events: none; white-space: nowrap;
  animation: float-up 0.85s ease both;
}
@keyframes float-up {
  0%   { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-45px) scale(0.75); }
}

/* ═══════════════════════════════════════════
   OVERLAY CARDS (Pause / Complete / Game Over)
═══════════════════════════════════════════ */
.ov-card {
  background: var(--card-bg);
  border: 1px solid rgba(136,0,255,0.35);
  border-radius: 20px;
  padding: 32px 28px;
  width: min(360px, 90vw);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  box-shadow: 0 0 60px rgba(136,0,255,0.2), inset 0 1px 0 rgba(255,255,255,0.05);
  position: relative;
  overflow: hidden;
  animation: card-pop 0.3s cubic-bezier(0.34,1.56,0.64,1) both;
}
@keyframes card-pop {
  from { opacity: 0; transform: scale(0.85) translateY(20px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.ov-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(204,102,255,0.5), transparent);
}

.ov-zone-tag {
  font-family: 'Orbitron', sans-serif;
  font-size: 10px;
  letter-spacing: 3px;
  color: var(--text2);
  text-transform: uppercase;
}

.ov-title {
  font-family: 'Orbitron', sans-serif;
  font-weight: 900;
  font-size: 28px;
  color: white;
  letter-spacing: 4px;
  text-align: center;
  text-shadow: 0 0 20px rgba(136,0,255,0.5);
}

/* Pause card */
.pause-stats {
  font-size: 13px;
  color: var(--text2);
  text-align: center;
  line-height: 1.8;
  letter-spacing: 1px;
}

/* Complete card */
.comp-title { color: var(--green); text-shadow: 0 0 20px rgba(0,255,136,0.5); }

.stars-row {
  display: flex;
  gap: 16px;
  align-items: center;
}
.star-big {
  font-size: 40px;
  color: var(--grey);
  text-shadow: none;
  transition: all 0.4s cubic-bezier(0.34,1.56,0.64,1);
}
.star-big.earned {
  color: var(--yellow);
  text-shadow: 0 0 20px rgba(255,220,50,0.8);
  transform: scale(1.2);
}

.comp-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 20px;
  width: 100%;
}
.comp-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}
.comp-stat-label { color: var(--text2); }
.comp-stat-val { color: white; font-family: 'Orbitron', sans-serif; font-size: 12px; }

/* Game Over card */
.gameover-card { border-color: rgba(255,34,68,0.35); }
.go-title { color: var(--red); text-shadow: var(--glow-r); }

.go-spotlight-anim {
  position: absolute;
  top: -60px; left: 50%;
  transform: translateX(-50%);
  width: 200px; height: 200px;
  background: radial-gradient(ellipse, rgba(255,200,100,0.15), transparent 70%);
  pointer-events: none;
}

.go-sub {
  font-size: 14px;
  color: var(--text2);
  text-align: center;
  letter-spacing: 0.5px;
}

.go-stats { font-size: 13px; color: var(--text2); text-align: center; line-height: 1.8; }

/* OV Buttons */
.ov-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.btn-ov-main {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, var(--purple2), var(--purple));
  border: none;
  border-radius: 50px;
  color: white;
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 2px;
  cursor: pointer;
  box-shadow: 0 0 20px rgba(136,0,255,0.4);
  transition: var(--trans);
}
.btn-ov-main:active { transform: scale(0.97); }

.btn-ov-sec {
  width: 100%;
  padding: 13px;
  background: rgba(136,0,255,0.12);
  border: 1px solid rgba(136,0,255,0.3);
  border-radius: 50px;
  color: var(--text);
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 1px;
  cursor: pointer;
  transition: var(--trans);
}
.btn-ov-sec:active { background: rgba(136,0,255,0.25); }

.btn-ov-danger {
  width: 100%;
  padding: 13px;
  background: rgba(255,34,68,0.1);
  border: 1px solid rgba(255,34,68,0.3);
  border-radius: 50px;
  color: rgba(255,100,120,0.9);
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 1px;
  cursor: pointer;
  transition: var(--trans);
}
.btn-ov-danger:active { background: rgba(255,34,68,0.25); }

/* ═══════════════════════════════════════════
   SETTINGS SCREEN
═══════════════════════════════════════════ */
.settings-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 12px 14px;
  padding-bottom: calc(36px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  gap: 8px;
  touch-action: pan-y;
}

.sett-section {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
}

.sett-section-title {
  padding: 9px 14px;
  font-family: 'Orbitron', sans-serif;
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--text2);
  background: rgba(136,0,255,0.07);
  border-bottom: 1px solid rgba(136,0,255,0.12);
}

.sett-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  border-bottom: 1px solid rgba(136,0,255,0.06);
}
.sett-row:last-child { border-bottom: none; }

.sett-label {
  font-size: 14px;
  color: var(--text);
}

/* Toggle Switch */
.tog { position: relative; display: inline-flex; cursor: pointer; }
.tog input { opacity: 0; width: 0; height: 0; position: absolute; }
.tog-track {
  width: 46px; height: 26px;
  background: var(--grey2);
  border-radius: 13px;
  position: relative;
  transition: var(--trans);
  border: 1px solid rgba(136,0,255,0.2);
}
.tog input:checked + .tog-track {
  background: var(--purple);
  border-color: var(--purple3);
  box-shadow: 0 0 10px rgba(136,0,255,0.4);
}
.tog-thumb {
  position: absolute;
  top: 2px; left: 2px;
  width: 20px; height: 20px;
  background: white;
  border-radius: 50%;
  transition: var(--trans);
  box-shadow: 0 1px 4px rgba(0,0,0,0.4);
}
.tog input:checked + .tog-track .tog-thumb { transform: translateX(20px); }

/* Skins Grid */
.skins-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 11px;
}

.skin-card {
  background: rgba(136,0,255,0.08);
  border: 1px solid rgba(136,0,255,0.2);
  border-radius: var(--radius-sm);
  padding: 9px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: var(--trans);
}
.skin-card:active { transform: scale(0.95); }
.skin-card.skin-selected { border-color: var(--purple3); background: rgba(136,0,255,0.2); box-shadow: 0 0 12px rgba(136,0,255,0.3); }
.skin-card.skin-locked { opacity: 0.4; cursor: not-allowed; }

.skin-icon { font-size: 24px; }
.skin-name { font-size: 10px; color: var(--text2); text-align: center; letter-spacing: 0.5px; font-family: 'Orbitron', sans-serif; }
.skin-unlock-at { font-size: 9px; color: rgba(255,34,68,0.7); }

/* Danger zone */
.sett-danger-zone .sett-section-title { color: rgba(255,100,100,0.7); background: rgba(255,34,68,0.05); }
.btn-reset-data {
  width: calc(100% - 36px);
  margin: 14px 18px;
  padding: 12px;
  background: rgba(255,34,68,0.08);
  border: 1px solid rgba(255,34,68,0.3);
  border-radius: var(--radius-sm);
  color: rgba(255,100,120,0.8);
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 1px;
  cursor: pointer;
  transition: var(--trans);
}
.btn-reset-data:active { background: rgba(255,34,68,0.2); }

/* ═══════════════════════════════════════════
   UPGRADES SCREEN
═══════════════════════════════════════════ */
.hdr-upgrade-btn {
  background: rgba(136,0,255,0.15);
  border: 1px solid rgba(136,0,255,0.3);
  border-radius: 50%;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  cursor: pointer;
  color: white;
  transition: var(--trans);
}
.hdr-upgrade-btn:active { background: rgba(136,0,255,0.4); }

.mp-counter {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: 'Orbitron', sans-serif;
  font-size: 12px;
  color: var(--cyan);
  width: auto !important;
  text-shadow: var(--glow-c);
}

.upgrades-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.upgrade-branch {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  overflow: hidden;
}

.upgrade-branch-title {
  padding: 13px 18px;
  font-family: 'Orbitron', sans-serif;
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--purple3);
  background: rgba(136,0,255,0.09);
  border-bottom: 1px solid rgba(136,0,255,0.12);
  display: flex; align-items: center; gap: 8px;
}

.upgrade-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(136,0,255,0.06);
  cursor: pointer;
  transition: var(--trans);
}
.upgrade-item:last-child { border-bottom: none; }
.upgrade-item:active { background: rgba(136,0,255,0.08); }
.upgrade-item.maxed { opacity: 0.5; cursor: default; }
.upgrade-item.cant-afford { opacity: 0.6; }

.upgrade-icon { font-size: 22px; flex-shrink: 0; }
.upgrade-info { flex: 1; }
.upgrade-name { font-size: 15px; color: white; margin-bottom: 2px; font-weight: 700; }
.upgrade-desc { font-size: 12px; color: var(--text2); }
.upgrade-right { text-align: right; flex-shrink: 0; }
.upgrade-level { font-family: 'Orbitron', sans-serif; font-size: 10px; color: var(--text2); margin-bottom: 4px; }
.upgrade-level .ul-cur { color: var(--purple3); }
.upgrade-cost {
  font-family: 'Orbitron', sans-serif;
  font-size: 12px;
  color: var(--cyan);
  display: flex; align-items: center; gap: 3px;
}
.upgrade-cost.maxed-label { color: var(--green); }

/* ═══════════════════════════════════════════
   UTILITY CONFIRM DIALOG
═══════════════════════════════════════════ */
.confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(3,0,10,0.85);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadein 0.2s ease both;
}
@keyframes fadein { from { opacity:0 } to { opacity:1 } }

.confirm-card {
  background: var(--card-bg);
  border: 1px solid rgba(255,34,68,0.4);
  border-radius: 20px;
  padding: 28px 24px;
  width: min(320px, 86vw);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  animation: card-pop 0.25s cubic-bezier(0.34,1.56,0.64,1) both;
}
.confirm-title { font-family: 'Orbitron', sans-serif; font-size: 16px; color: var(--red); letter-spacing: 2px; }
.confirm-msg { font-size: 14px; color: var(--text2); text-align: center; line-height: 1.6; }
.confirm-btns { display: flex; gap: 10px; width: 100%; }
.confirm-yes {
  flex: 1; padding: 13px;
  background: rgba(255,34,68,0.15);
  border: 1px solid rgba(255,34,68,0.4);
  border-radius: 50px;
  color: var(--red);
  font-family: 'Orbitron', sans-serif;
  font-size: 12px; letter-spacing: 1px;
  cursor: pointer; transition: var(--trans);
}
.confirm-yes:active { background: rgba(255,34,68,0.3); }
.confirm-no {
  flex: 1; padding: 13px;
  background: rgba(136,0,255,0.12);
  border: 1px solid rgba(136,0,255,0.3);
  border-radius: 50px;
  color: var(--text);
  font-family: 'Orbitron', sans-serif;
  font-size: 12px; letter-spacing: 1px;
  cursor: pointer; transition: var(--trans);
}
.confirm-no:active { background: rgba(136,0,255,0.25); }

/* ═══════════════════════════════════════════
   CONTROL SETTINGS + LAYOUT EDITOR
═══════════════════════════════════════════ */
.sett-row-col { flex-direction: column; align-items: stretch; gap: 8px; }
.sett-row-btn { padding: 8px 14px; }

/* Segmented toggle (Joystick / D-Pad) */
.seg-toggle {
  display: flex; gap: 0; width: 100%;
  background: rgba(10,0,30,0.6);
  border: 1px solid rgba(136,0,255,0.3);
  border-radius: 10px; overflow: hidden; padding: 3px;
}
.seg-opt {
  flex: 1; padding: 9px 6px;
  background: transparent; border: none;
  color: var(--text2); font-family: 'Orbitron', sans-serif;
  font-size: 11px; letter-spacing: 1px; cursor: pointer;
  border-radius: 8px; transition: var(--trans);
}
.seg-opt.seg-active {
  background: linear-gradient(135deg, var(--purple2), var(--purple));
  color: #fff; box-shadow: 0 0 14px rgba(136,0,255,0.5);
}

.btn-customize, .btn-reset-layout {
  width: 100%; padding: 11px;
  border-radius: 9px; cursor: pointer;
  font-family: 'Orbitron', sans-serif; font-size: 11px; letter-spacing: 1px;
  transition: var(--trans);
}
.btn-customize {
  background: linear-gradient(135deg, rgba(136,0,255,0.25), rgba(204,102,255,0.15));
  border: 1px solid rgba(136,0,255,0.5); color: #fff;
  box-shadow: 0 0 12px rgba(136,0,255,0.2);
}
.btn-customize:active { transform: scale(0.97); background: rgba(136,0,255,0.4); }
.btn-reset-layout {
  background: rgba(136,0,255,0.08); border: 1px solid rgba(136,0,255,0.25);
  color: var(--text2);
}
.btn-reset-layout:active { background: rgba(136,0,255,0.2); }

/* Layout Editor */
.layout-editor {
  background: radial-gradient(ellipse at 50% 40%, #16082e 0%, #050010 100%);
  overflow: hidden; touch-action: none;
}
.layout-grid-bg {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(136,0,255,0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(136,0,255,0.07) 1px, transparent 1px);
  background-size: 34px 34px;
  pointer-events: none;
}
.layout-hint {
  position: absolute; top: 24px; left: 50%; transform: translateX(-50%);
  width: 86%; max-width: 360px; text-align: center;
  font-size: 13px; color: var(--text); letter-spacing: 0.5px;
  background: rgba(10,0,30,0.85); border: 1px solid rgba(136,0,255,0.3);
  padding: 12px 16px; border-radius: 12px;
  box-shadow: 0 0 20px rgba(0,0,0,0.5);
}
.layout-chip {
  position: absolute; transform: translate(-50%,-50%);
  width: 76px; height: 76px; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  background: radial-gradient(circle at 40% 35%, rgba(136,0,255,0.4), rgba(40,0,90,0.6));
  border: 2px dashed rgba(180,120,255,0.8);
  box-shadow: 0 0 20px rgba(136,0,255,0.4);
  cursor: grab; touch-action: none; user-select: none;
  z-index: 5;
}
.layout-chip.dragging { cursor: grabbing; border-style: solid; box-shadow: 0 0 30px rgba(204,102,255,0.8); transform: translate(-50%,-50%) scale(1.08); }
.chip-icon { font-size: 26px; line-height: 1; }
.chip-name { font-family: 'Orbitron', sans-serif; font-size: 8px; letter-spacing: 1px; color: #fff; }

.layout-actions {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 10px; z-index: 6;
}
.btn-layout-save, .btn-layout-reset, .btn-layout-cancel {
  padding: 14px 20px; border-radius: 50px; cursor: pointer;
  font-family: 'Orbitron', sans-serif; font-size: 12px; letter-spacing: 1px;
  transition: var(--trans); border: none;
}
.btn-layout-save {
  background: linear-gradient(135deg, #00aa55, #00ff88); color: #001a0d;
  font-weight: 700; box-shadow: 0 0 18px rgba(0,255,136,0.5);
}
.btn-layout-save:active { transform: scale(0.95); }
.btn-layout-reset {
  background: rgba(136,0,255,0.2); border: 1px solid rgba(136,0,255,0.5); color: #fff;
}
.btn-layout-cancel {
  background: rgba(255,34,68,0.15); border: 1px solid rgba(255,34,68,0.4); color: #ff6680;
}

/* Toast */
.toast {
  position: fixed; bottom: 40px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: rgba(10,0,30,0.95); border: 1px solid rgba(136,0,255,0.5);
  color: #fff; padding: 12px 22px; border-radius: 50px;
  font-family: 'Orbitron', sans-serif; font-size: 12px; letter-spacing: 1px;
  box-shadow: 0 0 24px rgba(136,0,255,0.4);
  opacity: 0; transition: all 0.3s ease; z-index: 200; pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ═══════════════════════════════════════════
   LEVEL INTRO (cinematic)
═══════════════════════════════════════════ */
.intro-screen { justify-content: center; align-items: center; overflow: hidden; }
.intro-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 50% 35%, rgba(136,0,255,0.18) 0%, transparent 60%),
    radial-gradient(ellipse at 50% 80%, rgba(255,200,80,0.06) 0%, transparent 50%),
    #04000d;
}
.intro-bg::after {
  content:''; position:absolute; inset:0;
  background-image:
    linear-gradient(rgba(136,0,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(136,0,255,0.05) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse at 50% 50%, black 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 50%, black 0%, transparent 75%);
}
.intro-content {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 32px; text-align: center;
  animation: introIn 0.6s cubic-bezier(0.2,0.8,0.2,1) both;
}
@keyframes introIn { from{opacity:0;transform:translateY(24px) scale(0.96)} to{opacity:1;transform:none} }
.intro-zone-tag {
  font-family:'Orbitron',sans-serif; font-size:11px; letter-spacing:4px;
  color: rgba(180,130,255,0.9);
}
.intro-icon {
  font-size: 64px; line-height:1;
  filter: drop-shadow(0 0 24px rgba(136,0,255,0.7));
  animation: introFloat 3s ease-in-out infinite;
}
@keyframes introFloat { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-8px)} }
.intro-name {
  font-family:'Orbitron',sans-serif; font-weight:900; font-size:clamp(34px,9vw,52px);
  letter-spacing:5px; color:#fff;
  text-shadow: 0 0 30px rgba(136,0,255,0.7);
}
.intro-divider {
  width: 120px; height:2px; margin: 4px 0;
  background: linear-gradient(90deg, transparent, var(--purple3), transparent);
}
.intro-objective {
  font-family:'Orbitron',sans-serif; font-size:13px; letter-spacing:2px;
  color: var(--cyan); text-shadow:0 0 10px rgba(0,255,200,0.4);
}
.intro-story {
  font-size:15px; color:var(--text2); max-width:340px; line-height:1.5;
  font-style:italic;
}
.intro-begin-btn {
  margin-top:18px; padding:16px 40px;
  background: linear-gradient(135deg, var(--purple2), var(--purple));
  border:none; border-radius:50px; color:#fff;
  font-family:'Orbitron',sans-serif; font-weight:700; font-size:15px; letter-spacing:2px;
  cursor:pointer; box-shadow:0 0 28px rgba(136,0,255,0.5);
  transition: var(--trans);
}
.intro-begin-btn:active { transform:scale(0.96); }

/* Boss variant */
.intro-content.intro-boss .intro-name { color:#ff3a55; text-shadow:0 0 30px rgba(255,40,70,0.8); animation: bossShake 0.5s ease; }
.intro-content.intro-boss .intro-icon { filter: drop-shadow(0 0 24px rgba(255,40,70,0.8)); }
.intro-content.intro-boss .intro-zone-tag { color:#ff6680; }
.intro-content.intro-boss .intro-begin-btn {
  background: linear-gradient(135deg,#aa0022,#ff2a44); box-shadow:0 0 28px rgba(255,40,70,0.6);
}
@keyframes bossShake { 0%,100%{transform:translateX(0)} 20%{transform:translateX(-6px)} 40%{transform:translateX(6px)} 60%{transform:translateX(-4px)} 80%{transform:translateX(4px)} }

/* ═══════════════════════════════════════════
   DEVELOPER CREDIT + TRIBUTE
═══════════════════════════════════════════ */
.tribute-heart { filter: drop-shadow(0 0 7px rgba(255,40,70,0.85)); }

/* Loading screen tribute */
.loading-tribute {
  position: absolute; bottom: 28px; left: 0; right: 0;
  text-align: center;
  font-family: 'Rajdhani', sans-serif; font-size: 13px; letter-spacing: 1.5px;
  color: rgba(220,210,255,0.55);
  animation: tributeFade 2.5s ease both;
  z-index: 2;
}
@keyframes tributeFade { 0%{opacity:0} 40%{opacity:0} 100%{opacity:1} }

/* Main menu footer */
.menu-footer { display: flex; flex-direction: column; align-items: center; gap: 9px; }
.menu-feats { font-size: 12px; color: var(--text2); letter-spacing: 2px; }
.menu-dev-credit {
  display: flex; align-items: center; gap: 6px;
  font-family: 'Rajdhani', sans-serif; font-size: 12px;
  color: rgba(180,160,220,0.7); letter-spacing: 0.5px;
}
.menu-dev-credit a {
  color: var(--purple3); text-decoration: none; font-weight: 600;
  transition: var(--trans);
}
.menu-dev-credit a:active { color: #fff; }
.menu-tribute-btn {
  background: none; border: none; cursor: pointer;
  font-family: 'Rajdhani', sans-serif; font-size: 12.5px; letter-spacing: 1px;
  color: rgba(225,215,255,0.65);
  padding: 6px 14px; border-radius: 20px;
  border: 1px solid rgba(220,210,255,0.12);
  transition: var(--trans);
}
.menu-tribute-btn:active { background: rgba(255,255,255,0.05); color: #fff; }

/* Settings About box */
.sett-about .sett-section-title { color: rgba(180,160,255,0.85); }
.about-box { padding: 12px 14px; display: flex; flex-direction: column; gap: 11px; }
.about-game {
  font-family: 'Orbitron', sans-serif; font-size: 16px; font-weight: 700;
  color: #fff; letter-spacing: 2px;
}
.about-ver { font-size: 10px; color: var(--text2); letter-spacing: 1px; }
.about-dev { display: flex; flex-direction: column; gap: 4px; }
.about-label { font-size: 11px; color: var(--text2); letter-spacing: 1px; }
.about-name {
  font-family: 'Orbitron', sans-serif; font-size: 15px; color: var(--purple3);
  letter-spacing: 1px;
}
.about-link {
  font-size: 13px; color: var(--cyan); text-decoration: none;
  letter-spacing: 0.5px; margin-top: 2px;
}
.about-tribute {
  margin-top: 4px; padding: 14px 16px; cursor: pointer;
  background: linear-gradient(135deg, rgba(255,255,255,0.04), rgba(180,150,255,0.05));
  border: 1px solid rgba(220,210,255,0.18);
  border-radius: 12px; text-align: center;
  transition: var(--trans);
}
.about-tribute:active { background: rgba(255,255,255,0.07); }
.about-tribute-line {
  font-family: 'Rajdhani', sans-serif; font-weight: 600; font-size: 15px;
  color: rgba(235,228,255,0.9); letter-spacing: 0.8px;
}
.about-tribute-sub {
  font-size: 11px; color: rgba(180,165,220,0.6); letter-spacing: 1px; margin-top: 4px;
}

/* ═══ DEDICATED TRIBUTE SCREEN ═══ */
.tribute-screen { justify-content: center; align-items: center; overflow: hidden; }
#tribute-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.tribute-content {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center;
  text-align: center; padding: 40px 32px;
  animation: tributeContentIn 1.2s ease both;
}
@keyframes tributeContentIn { from{opacity:0; transform:translateY(20px)} to{opacity:1; transform:none} }
.tribute-big-heart {
  font-size: 60px; line-height: 1;
  filter: drop-shadow(0 0 26px rgba(255,40,70,0.7));
  animation: heartBeat 3.5s ease-in-out infinite;
}
@keyframes heartBeat {
  0%,100%{transform:scale(1)} 15%{transform:scale(1.12)} 30%{transform:scale(1)}
}
.tribute-main-line {
  margin-top: 18px;
  font-family: 'Rajdhani', sans-serif; font-size: 16px; letter-spacing: 2px;
  color: rgba(210,200,240,0.7);
}
.tribute-maa {
  font-family: 'Orbitron', sans-serif; font-weight: 900; font-size: 56px;
  letter-spacing: 6px; margin: 6px 0 4px;
  background: linear-gradient(135deg, #ffffff, #d8c8ff, #ffffff);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  text-shadow: 0 0 40px rgba(220,210,255,0.4);
}
.tribute-date {
  font-family: 'Orbitron', sans-serif; font-size: 13px; letter-spacing: 4px;
  color: rgba(200,185,245,0.75);
}
.tribute-divider {
  width: 100px; height: 1px; margin: 22px 0;
  background: linear-gradient(90deg, transparent, rgba(220,210,255,0.6), transparent);
}
.tribute-message {
  font-family: 'Rajdhani', sans-serif; font-size: 16px; line-height: 1.9;
  color: rgba(225,218,245,0.82); max-width: 340px; letter-spacing: 0.4px;
}
.tribute-signature {
  margin-top: 26px;
  font-family: 'Rajdhani', sans-serif; font-style: italic; font-size: 15px;
  color: rgba(200,185,245,0.7); letter-spacing: 0.5px;
}
.tribute-back-btn {
  margin-top: 34px; padding: 12px 28px;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(220,210,255,0.25);
  border-radius: 50px; color: rgba(235,228,255,0.9);
  font-family: 'Rajdhani', sans-serif; font-size: 14px; letter-spacing: 1px;
  cursor: pointer; transition: var(--trans);
}
.tribute-back-btn:active { background: rgba(255,255,255,0.12); }

/* ═══════════════════════════════════════════
   SCROLL & SAFE-AREA FIXES (mobile)
═══════════════════════════════════════════ */
.saves-list, .zones-map-scroll, .levels-grid, .upgrades-scroll, .settings-scroll {
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px)) !important;
}
/* keep menu / overlay clear of notches */
.menu-overlay { padding-top: calc(60px + env(safe-area-inset-top, 0px)); padding-bottom: calc(40px + env(safe-area-inset-bottom, 0px)); }
.g-hud-top { padding-top: max(22px, calc(8px + env(safe-area-inset-top, 0px))); }
