@import url('https://fonts.googleapis.com/css2?family=Sarabun:wght@400;700;800&family=Orbitron:wght@500;700;900&display=swap');

:root {
  --gold: #FFD050;
  --deep-gold: #C8900A;
  --red: #E8312A;
  --bg: #03030b;
  --purple: #1A0A3A;
  --neon-cyan: #00F5FF;
  --neon-pink: #FF2D78;
  --neon-green: #39FF14;
  --glow-cyan: 0 0 10px rgba(0, 245, 255, 0.6), 0 0 20px rgba(0, 245, 255, 0.3);
  --glow-pink: 0 0 10px rgba(255, 45, 120, 0.6), 0 0 20px rgba(255, 45, 120, 0.3);
  --glow-gold: 0 0 10px rgba(255, 208, 80, 0.6), 0 0 20px rgba(255, 208, 80, 0.3);
}

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

.hidden {
  display: none !important;
}

html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

body {
  background: #020205;
  color: #fff;
  font-family: 'Sarabun', sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* PHONE FRAME */
.phone {
  width: 375px;
  height: 812px;
  background: var(--bg);
  border-radius: 40px;
  border: 4px solid #1c1c28;
  overflow: hidden;
  position: relative;
  box-shadow: 0 0 60px rgba(0, 245, 255, 0.1), 0 0 0 8px #0f0f15;
  display: flex;
  flex-direction: column;
}

/* STARFIELD & BACKGROUNDS */
.bg-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.starfield {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}

.star {
  position: absolute;
  background: white;
  border-radius: 50%;
  animation: fall linear infinite;
}

@keyframes fall {
  from { transform: translateY(-10px); }
  to { transform: translateY(830px); }
}

.nebula {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 200px 300px at 80% 20%, rgba(138,43,226,0.2) 0%, transparent 70%),
    radial-gradient(ellipse 180px 200px at 10% 60%, rgba(0,100,200,0.15) 0%, transparent 70%),
    radial-gradient(ellipse 150px 150px at 50% 80%, rgba(200,30,60,0.1) 0%, transparent 70%);
  z-index: 0;
  pointer-events: none;
}

/* GAME CANVAS */
#game-canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  cursor: pointer;
}

.game-area {
  position: relative;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

.game-area * {
  pointer-events: auto;
}

/* SCENE / SCREEN SYSTEM */
.screen {
  position: absolute;
  inset: 0;
  z-index: 20;
  background: rgba(5, 5, 15, 0.95);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 20px;
  transition: opacity 0.3s ease, transform 0.3s ease;
  overflow-y: auto;
}

.screen.hidden {
  opacity: 0;
  pointer-events: none;
  transform: scale(1.05);
  display: none !important;
}

/* TITLE SCREEN */
.title-screen {
  justify-content: space-between;
  background: radial-gradient(circle at 50% 30%, #15082a, var(--bg) 80%);
}

.title-logo-container {
  margin-top: 60px;
  text-align: center;
}

.title-logo {
  font-family: 'Orbitron', monospace;
  font-size: 42px;
  font-weight: 900;
  color: #fff;
  letter-spacing: 6px;
  text-shadow: 0 0 10px var(--neon-cyan), 0 0 30px rgba(0, 245, 255, 0.5);
  animation: logoGlow 2.5s ease-in-out infinite alternate;
}

.title-sublogo {
  font-family: 'Sarabun', sans-serif;
  font-size: 14px;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: 8px;
  margin-top: -5px;
  text-shadow: 0 0 5px var(--gold);
}

@keyframes logoGlow {
  from { text-shadow: 0 0 10px var(--neon-cyan), 0 0 30px rgba(0, 245, 255, 0.3); }
  to { text-shadow: 0 0 20px var(--neon-cyan), 0 0 50px rgba(0, 245, 255, 0.6), 0 0 80px rgba(0, 245, 255, 0.8); }
}

.title-artwork {
  width: 180px;
  height: 180px;
  margin: 20px 0;
  position: relative;
  animation: floatArtwork 4s ease-in-out infinite;
}

@keyframes floatArtwork {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(3deg); }
}

.menu-buttons {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 40px;
}

.btn {
  width: 100%;
  height: 54px;
  border-radius: 27px;
  border: 2px solid var(--neon-cyan);
  background: rgba(0, 245, 255, 0.05);
  color: #fff;
  font-family: 'Orbitron', 'Sarabun', sans-serif;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 2px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.2s ease;
  text-shadow: 0 0 5px var(--neon-cyan);
  box-shadow: 0 0 15px rgba(0, 245, 255, 0.1);
}

.btn:active {
  transform: scale(0.95);
  background: rgba(0, 245, 255, 0.2);
  box-shadow: 0 0 25px rgba(0, 245, 255, 0.4);
}

.btn-gold {
  border-color: var(--gold);
  background: rgba(255, 208, 80, 0.05);
  color: var(--gold);
  text-shadow: 0 0 5px var(--gold);
  box-shadow: 0 0 15px rgba(255, 208, 80, 0.1);
}

.btn-gold:active {
  background: rgba(255, 208, 80, 0.2);
  box-shadow: 0 0 25px rgba(255, 208, 80, 0.4);
}

.btn-endless {
  border-color: var(--neon-pink);
  background: rgba(255, 45, 120, 0.05);
  color: var(--neon-pink);
  text-shadow: 0 0 5px var(--neon-pink);
  box-shadow: 0 0 15px rgba(255, 45, 120, 0.1);
}

.btn-endless:active {
  background: rgba(255, 45, 120, 0.2);
  box-shadow: 0 0 25px rgba(255, 45, 120, 0.4);
}

/* HUD TOP */
.hud-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 30px 20px 10px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  z-index: 10;
  background: linear-gradient(to bottom, rgba(3, 3, 11, 0.95) 0%, transparent 100%);
  pointer-events: none;
}

.score-block {
  text-align: left;
  pointer-events: auto;
}

.score-label {
  font-family: 'Orbitron', monospace;
  font-size: 10px;
  color: var(--neon-cyan);
  letter-spacing: 3px;
  opacity: 0.7;
  text-shadow: 0 0 5px var(--neon-cyan);
}

.score-value {
  font-family: 'Orbitron', monospace;
  font-size: 26px;
  font-weight: 900;
  color: white;
  line-height: 1;
  text-shadow: 0 0 15px rgba(0, 245, 255, 0.7);
}

.stage-badge {
  background: linear-gradient(135deg, var(--gold), var(--deep-gold));
  border-radius: 20px;
  padding: 6px 14px;
  font-family: 'Orbitron', monospace;
  font-size: 10px;
  font-weight: 800;
  color: #0f0a00;
  letter-spacing: 1px;
  box-shadow: 0 0 10px rgba(255, 208, 80, 0.3);
  pointer-events: auto;
}

.lives {
  display: flex;
  gap: 4px;
  margin-top: 6px;
}

.heart {
  font-size: 14px;
  filter: drop-shadow(0 0 4px #ff2d78);
  transition: transform 0.2s ease;
}

.heart.empty {
  opacity: 0.15;
  filter: grayscale(1);
}

/* WAVE INDICATOR */
.wave-indicator {
  position: absolute;
  top: 92px;
  left: 20px;
  display: flex;
  align-items: center;
  gap: 5px;
  pointer-events: none;
}

.wave-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  transition: all 0.3s ease;
}

.wave-dot.active {
  background: var(--neon-cyan);
  box-shadow: 0 0 8px var(--neon-cyan);
  transform: scale(1.2);
}

.wave-dot.done {
  background: var(--gold);
  box-shadow: 0 0 5px var(--gold);
}

/* COMBO MULTIPLIER */
.multiplier {
  position: absolute;
  top: 92px;
  right: 20px;
  font-family: 'Orbitron', monospace;
  font-size: 11px;
  color: var(--gold);
  text-align: right;
  animation: pulse 1s ease-in-out infinite;
  pointer-events: none;
}

.multiplier span {
  font-size: 22px;
  font-weight: 900;
  display: block;
  text-shadow: 0 0 10px var(--gold);
  line-height: 0.9;
}

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

/* COMBO TEXT / TITLE MESSAGE */
.combo-text {
  position: absolute;
  top: 290px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Orbitron', monospace;
  font-size: 12px;
  color: var(--neon-cyan);
  letter-spacing: 3px;
  white-space: nowrap;
  text-shadow: 0 0 10px var(--neon-cyan);
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
  z-index: 5;
}

.combo-text.show {
  opacity: 0.9;
  transform: translateX(-50%) scale(1.1);
}

/* BOSS HP BAR */
.boss-hud {
  position: absolute;
  top: 130px;
  left: 50%;
  transform: translateX(-50%);
  width: 220px;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 5;
}

.boss-hud.active {
  opacity: 1;
}

.boss-name {
  font-family: 'Orbitron', 'Sarabun', sans-serif;
  font-size: 9px;
  color: var(--neon-pink);
  letter-spacing: 2px;
  text-shadow: 0 0 8px var(--neon-pink);
  margin-bottom: 4px;
}

.boss-hp-bar-outer {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  border: 1px solid rgba(255, 45, 120, 0.2);
  overflow: hidden;
}

.boss-hp-bar {
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #ff2d78, #ff6b35);
  border-radius: 3px;
  box-shadow: 0 0 8px rgba(255, 45, 120, 0.6);
  transition: width 0.1s linear;
}

/* HUD BOTTOM (CONTROLS & GAUGES) */
.hud-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 175px;
  background: linear-gradient(to top, rgba(3, 3, 11, 0.98) 70%, transparent 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding-bottom: 24px;
  z-index: 10;
  pointer-events: none;
}

/* POWER GAUGE (FURY) */
.power-section {
  width: 100%;
  padding: 0 28px;
  margin-bottom: 10px;
  pointer-events: auto;
}

.power-label {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  color: rgba(255, 255, 255, 0.4);
  font-family: 'Orbitron', monospace;
  letter-spacing: 2px;
  margin-bottom: 4px;
}

.power-label strong {
  color: var(--gold);
  text-shadow: 0 0 5px var(--gold);
}

.power-bar-outer {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  border: 1px solid rgba(255, 208, 80, 0.15);
  overflow: hidden;
}

.power-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--deep-gold), var(--gold));
  border-radius: 4px;
  box-shadow: 0 0 8px rgba(255, 208, 80, 0.4);
  position: relative;
  overflow: hidden;
  transition: width 0.1s ease-out;
}

.power-bar.full {
  background: linear-gradient(90deg, var(--gold), #fff);
  box-shadow: 0 0 15px var(--gold), 0 0 5px #fff;
  animation: barFlicker 0.4s infinite alternate;
}

@keyframes barFlicker {
  from { opacity: 0.8; }
  to { opacity: 1; }
}

.power-bar::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  animation: shimmer 2s linear infinite;
}

@keyframes shimmer {
  to { left: 200%; }
}

/* TAP CONTROL ROW */
.controls-row {
  display: flex;
  align-items: center;
  gap: 20px;
  position: relative;
  pointer-events: auto;
}

/* SKILL LISTS */
.skill-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.skill-btn {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  position: relative;
  cursor: pointer;
  transition: all 0.2s ease;
}

.skill-btn.ready {
  border-color: rgba(0, 245, 255, 0.35);
  background: rgba(0, 245, 255, 0.05);
  box-shadow: 0 0 8px rgba(0, 245, 255, 0.15);
}

.skill-btn.ready:active {
  transform: scale(0.9);
  background: rgba(0, 245, 255, 0.15);
  box-shadow: 0 0 15px rgba(0, 245, 255, 0.4);
}

.skill-btn.cooldown {
  opacity: 0.35;
  cursor: not-allowed;
}

.skill-cd {
  position: absolute;
  bottom: 2px;
  right: 4px;
  font-family: 'Orbitron', monospace;
  font-size: 7px;
  font-weight: bold;
  color: var(--neon-cyan);
}

.skill-btn.ready .skill-cd {
  color: var(--neon-green);
  font-size: 6px;
  letter-spacing: 0.5px;
}

/* MAIN BIG BUTTON */
.tap-btn-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-ring {
  position: absolute;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 1.5px dashed rgba(255, 208, 80, 0.25);
  animation: ringRotate 15s linear infinite;
  pointer-events: none;
}

.btn-ring.fury-ready {
  border-color: var(--gold);
  border-style: solid;
  animation-duration: 4s;
  box-shadow: 0 0 15px rgba(255, 208, 80, 0.4);
}

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

.tap-btn {
  width: 82px;
  height: 82px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #2a1806, #090306);
  border: 3px solid var(--gold);
  box-shadow:
    0 0 0 5px rgba(255, 208, 80, 0.08),
    0 0 25px rgba(255, 208, 80, 0.25),
    inset 0 0 15px rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  cursor: pointer;
  position: relative;
  transition: all 0.15s ease;
}

.tap-btn:active, .tap-btn.active {
  transform: scale(0.94);
  box-shadow:
    0 0 0 3px rgba(255, 208, 80, 0.05),
    0 0 15px rgba(255, 208, 80, 0.15),
    inset 0 0 25px rgba(0,0,0,0.8);
  border-color: var(--deep-gold);
}

.tap-btn.fury-full {
  animation: btnFuryPulse 1s infinite alternate;
  border-color: #fff;
}

@keyframes btnFuryPulse {
  0% { transform: scale(1); box-shadow: 0 0 20px var(--gold); }
  100% { transform: scale(1.05); box-shadow: 0 0 35px var(--gold), 0 0 10px #fff; }
}

.btn-icon {
  font-size: 26px;
  line-height: 1;
  filter: drop-shadow(0 0 6px rgba(255, 208, 80, 0.7));
  transition: transform 0.2s ease;
}

.btn-text {
  font-family: 'Orbitron', monospace;
  font-size: 8px;
  color: var(--gold);
  letter-spacing: 2px;
  margin-top: 2px;
  opacity: 0.8;
}

/* THAI RUNES DECORATIONS */
.thai-rune {
  position: absolute;
  font-size: 10px;
  color: rgba(255, 208, 80, 0.1);
  font-family: 'Sarabun', sans-serif;
  font-weight: 700;
  pointer-events: none;
  letter-spacing: 3px;
  z-index: 2;
}

/* GARAGE / SHIP SHOP SCREEN */
.garage-screen {
  background: radial-gradient(circle at 50% 10%, #0d0c24 0%, var(--bg) 90%);
  justify-content: flex-start;
}

.garage-title {
  font-family: 'Orbitron', monospace;
  font-size: 24px;
  font-weight: 900;
  color: var(--gold);
  letter-spacing: 4px;
  text-shadow: 0 0 8px var(--gold);
  margin-bottom: 20px;
}

.currency-bar {
  display: flex;
  gap: 15px;
  background: rgba(255, 255, 255, 0.05);
  padding: 6px 16px;
  border-radius: 15px;
  font-family: 'Orbitron', monospace;
  font-size: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 20px;
}

.currency-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.ship-slider {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 20px;
}

.ship-display-box {
  width: 180px;
  height: 180px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(0, 245, 255, 0.2);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin-bottom: 15px;
  box-shadow: inset 0 0 20px rgba(0, 245, 255, 0.05);
}

.ship-display-canvas {
  width: 150px;
  height: 150px;
}

.ship-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0, 245, 255, 0.1);
  border: 1px solid var(--neon-cyan);
  color: var(--neon-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
  font-family: monospace;
  font-weight: bold;
}

.ship-nav-btn:active {
  background: rgba(0, 245, 255, 0.3);
}

.ship-nav-left { left: -45px; }
.ship-nav-right { right: -45px; }

.ship-info {
  text-align: center;
  width: 100%;
}

.ship-name {
  font-family: 'Sarabun', sans-serif;
  font-weight: 800;
  font-size: 20px;
  color: #fff;
  margin-bottom: 5px;
}

.ship-desc {
  font-size: 11px;
  color: rgba(255,255,255,0.6);
  min-height: 32px;
  padding: 0 10px;
  line-height: 1.4;
}

.ship-stats {
  width: 100%;
  margin-top: 15px;
  background: rgba(255, 255, 255, 0.03);
  padding: 12px 15px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.stat-row:last-child {
  margin-bottom: 0;
}

.stat-label {
  font-size: 10px;
  color: rgba(255,255,255,0.5);
  font-family: 'Orbitron', 'Sarabun', sans-serif;
}

.stat-bar-outer {
  width: 120px;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
}

.stat-bar-inner {
  height: 100%;
  background: var(--neon-cyan);
  box-shadow: 0 0 5px var(--neon-cyan);
  border-radius: 3px;
  width: 50%;
}

.ship-actions {
  width: 100%;
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ROGUELIKE UPGRADE SCREEN */
#upgrade-screen {
  background: rgba(5, 5, 12, 0.98);
  justify-content: center;
}

.upgrade-header {
  text-align: center;
  margin-bottom: 30px;
}

.upgrade-header h2 {
  font-family: 'Orbitron', monospace;
  font-size: 22px;
  color: var(--gold);
  text-shadow: 0 0 10px var(--gold);
  letter-spacing: 3px;
  margin-bottom: 5px;
}

.upgrade-header p {
  font-size: 12px;
  color: rgba(255,255,255,0.5);
}

.upgrade-options {
  display: flex;
  flex-direction: column;
  gap: 15px;
  width: 100%;
  max-width: 300px;
}

.upgrade-card {
  background: rgba(15, 12, 5, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1.5px solid rgba(255, 208, 80, 0.25);
  border-radius: 16px;
  padding: 18px 16px;
  display: flex;
  align-items: center;
  gap: 15px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.upgrade-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 208, 80, 0.6);
  box-shadow: 0 8px 25px rgba(255, 208, 80, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  background: rgba(25, 20, 8, 0.7);
}

.upgrade-card:active {
  transform: scale(0.97) translateY(0);
  background: rgba(255, 208, 80, 0.12);
  border-color: var(--gold);
  box-shadow: 0 2px 10px rgba(255, 208, 80, 0.3);
}

.upgrade-card-icon {
  font-size: 28px;
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.1));
}

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

.upgrade-card-title {
  font-family: 'Sarabun', sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: #fff;
  margin-bottom: 2px;
}

.upgrade-card-desc {
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  line-height: 1.3;
}

.btn-reroll {
  flex: 1;
  background: linear-gradient(135deg, #7b2cbf, #3a0ca3);
  border: 1.5px solid var(--neon-cyan);
  color: #fff;
  font-family: 'Orbitron', 'Montserrat', sans-serif;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 0 10px rgba(123, 44, 191, 0.4);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-shadow: 0 0 4px #00f5ff;
}

.btn-reroll:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(0, 245, 255, 0.6), 0 0 10px rgba(123, 44, 191, 0.8);
  filter: brightness(1.2);
}

.btn-reroll:active {
  transform: scale(0.95) translateY(0);
}

.btn-skip {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.7);
  font-family: 'Orbitron', 'Montserrat', sans-serif;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-skip:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.15);
}

.btn-skip:active {
  transform: scale(0.95);
}

/* Rarity Upgrades Stylings */
.upgrade-card.rarity-common {
  border-color: rgba(255, 208, 80, 0.25);
  background: rgba(15, 12, 5, 0.6);
}

.upgrade-card.rarity-rare {
  border-color: rgba(0, 245, 255, 0.4);
  background: rgba(5, 15, 20, 0.75);
  box-shadow: 0 0 10px rgba(0, 245, 255, 0.1);
}
.upgrade-card.rarity-rare:hover {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 20px rgba(0, 245, 255, 0.25);
}

.upgrade-card.rarity-epic {
  border-color: rgba(255, 45, 120, 0.5);
  background: rgba(20, 5, 15, 0.75);
  box-shadow: 0 0 12px rgba(255, 45, 120, 0.15);
}
.upgrade-card.rarity-epic:hover {
  border-color: var(--neon-pink);
  box-shadow: 0 0 22px rgba(255, 45, 120, 0.3);
}

.upgrade-card.rarity-legendary {
  border-color: var(--gold);
  background: rgba(25, 20, 5, 0.85);
  box-shadow: 0 0 15px rgba(255, 208, 80, 0.25);
  animation: cardLegendaryPulse 2s infinite alternate ease-in-out;
}
.upgrade-card.rarity-legendary:hover {
  border-color: #fff;
  box-shadow: 0 0 28px rgba(255, 208, 80, 0.5), 0 0 8px #fff;
}

@keyframes cardLegendaryPulse {
  0% { box-shadow: 0 0 10px rgba(255, 208, 80, 0.2); }
  100% { box-shadow: 0 0 20px rgba(255, 208, 80, 0.45); }
}

/* GAME OVER & VICTORY SCREEN */
.game-over-screen, .victory-screen {
  justify-content: center;
  text-align: center;
}

.result-title {
  font-family: 'Orbitron', 'Sarabun', sans-serif;
  font-size: 38px;
  font-weight: 900;
  letter-spacing: 4px;
  margin-bottom: 10px;
}

.game-over-screen .result-title {
  color: var(--red);
  text-shadow: 0 0 15px rgba(232, 49, 42, 0.7);
}

.victory-screen .result-title {
  color: var(--gold);
  text-shadow: 0 0 15px rgba(255, 208, 80, 0.7);
}

.result-sub {
  font-size: 14px;
  color: rgba(255,255,255,0.6);
  margin-bottom: 40px;
}

.stats-panel {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 20px;
  width: 100%;
  max-width: 280px;
  margin-bottom: 40px;
  text-align: left;
}

.stats-panel h3 {
  font-family: 'Orbitron', sans-serif;
  font-size: 12px;
  color: var(--neon-cyan);
  margin-bottom: 15px;
  letter-spacing: 2px;
  text-align: center;
  border-bottom: 1px solid rgba(0, 245, 255, 0.1);
  padding-bottom: 8px;
}

.result-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 13px;
}

.result-row:last-child {
  margin-bottom: 0;
  font-weight: bold;
  border-top: 1px dashed rgba(255,255,255,0.1);
  padding-top: 10px;
}

.result-label {
  color: rgba(255,255,255,0.5);
}

.result-val {
  font-family: 'Orbitron', monospace;
}

.result-val.highlight {
  color: var(--gold);
}

/* FLOATING EFFECTS */
.sparkle-particle {
  position: absolute;
  pointer-events: none;
  background: white;
  border-radius: 50%;
  animation: sparkleAnim 0.6s ease-out forwards;
}

@keyframes sparkleAnim {
  0% { transform: translate(0,0) scale(1); opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) scale(0); opacity: 0; }
}

/* SHAKE ANIMATION */
@keyframes screenShake {
  0%, 100% { transform: translate(0, 0); }
  10%, 30%, 50%, 70%, 90% { transform: translate(-4px, -2px); }
  20%, 40%, 60%, 80% { transform: translate(4px, 2px); }
}

.shake {
  animation: screenShake 0.4s ease-out;
}

/* RESPONSIVE FULL SCREEN OVERRIDES FOR MOBILE DEVICES */
.phone.mobile-fullscreen {
  width: 100%;
  height: 100%;
  height: 100dvh;
  border-radius: 0;
  border: none;
  box-shadow: none;
}

/* PHASE 6 FURY GAUGE & TAP BUTTON POLISH */
.charge-ring-svg {
  position: absolute;
  width: 96px;
  height: 96px;
  transform: rotate(-90deg); /* Start from top */
  pointer-events: none;
  z-index: 1;
}

.power-bar.pulse-subtle {
  animation: pulseSubtle 1.2s infinite alternate ease-in-out;
}

.power-bar.pulse-strong {
  animation: pulseStrong 0.6s infinite alternate ease-in-out;
}

@keyframes pulseSubtle {
  0% { box-shadow: 0 0 4px rgba(255, 208, 80, 0.4); filter: brightness(1); }
  100% { box-shadow: 0 0 10px rgba(255, 208, 80, 0.75); filter: brightness(1.15); }
}

@keyframes pulseStrong {
  0% { box-shadow: 0 0 6px rgba(255, 208, 80, 0.6); filter: brightness(1); }
  100% { box-shadow: 0 0 20px rgba(255, 208, 80, 1), 0 0 8px #fff; filter: brightness(1.3); }
}

/* PHASE 8 MINI MISSION HUD (UPGRADED TO V1) */
.mission-hud {
  position: absolute;
  top: 132px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  font-family: 'Orbitron', 'Sarabun', sans-serif;
  font-size: 11px; /* Improved from 8px for mobile readability */
  padding: 6px 12px;
  background: rgba(15, 10, 30, 0.85); /* Glassmorphic dark slate */
  border: 1.5px solid rgba(0, 245, 255, 0.4); /* Neon cyan border default */
  border-radius: 8px; /* Smooth rounded corners */
  width: 260px;
  color: #fff;
  box-shadow: 0 0 10px rgba(0, 245, 255, 0.25);
  pointer-events: none;
  z-index: 10;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 6px;
  letter-spacing: 0.5px;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.mission-title {
  color: var(--neon-cyan);
  font-weight: bold;
  text-shadow: 0 0 5px rgba(0, 245, 255, 0.5);
}

.mission-text {
  opacity: 0.95;
  font-weight: bold;
}

.mission-hud.completed {
  border-color: var(--neon-green);
  box-shadow: 0 0 12px rgba(57, 255, 20, 0.5);
  background: rgba(5, 22, 12, 0.9);
}

.mission-hud.completed .mission-title {
  color: var(--neon-green);
  text-shadow: 0 0 6px var(--neon-green);
}

.mission-hud.failed {
  border-color: var(--neon-pink);
  box-shadow: 0 0 12px rgba(255, 45, 120, 0.5);
  background: rgba(22, 5, 12, 0.9);
}

.mission-hud.failed .mission-title {
  color: var(--neon-pink);
  text-shadow: 0 0 6px var(--neon-pink);
}

/* WEAPON STYLE BADGE V1 */
.weapon-badge {
  display: inline-block;
  font-family: 'Orbitron', 'Sarabun', sans-serif;
  font-size: 8px;
  font-weight: bold;
  color: var(--neon-cyan);
  background: rgba(0, 245, 255, 0.1);
  border: 1px solid rgba(0, 245, 255, 0.35);
  border-radius: 4px;
  padding: 2px 6px;
  margin-top: 4px;
  text-shadow: 0 0 5px var(--neon-cyan);
  box-shadow: 0 0 5px rgba(0, 245, 255, 0.15);
  letter-spacing: 1px;
  transition: all 0.2s ease-in-out;
  pointer-events: none;
}

/* DRONE ASSIST BADGE V1 */
.drone-badge {
  display: inline-block;
  font-family: 'Orbitron', 'Sarabun', sans-serif;
  font-size: 8px;
  font-weight: bold;
  color: var(--neon-green);
  background: rgba(57, 255, 20, 0.1);
  border: 1px solid rgba(57, 255, 20, 0.35);
  border-radius: 4px;
  padding: 2px 6px;
  margin-top: 4px;
  text-shadow: 0 0 5px var(--neon-green);
  box-shadow: 0 0 5px rgba(57, 255, 20, 0.15);
  letter-spacing: 1px;
  transition: all 0.2s ease-in-out;
  pointer-events: none;
}

/* ==================================================
   GLOBAL BOTTOM NAVIGATION
   ================================================== */
.bottom-nav {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 62px;
  background: rgba(3, 3, 11, 0.96);
  border-top: 1.5px solid rgba(0, 245, 255, 0.25);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 100;
  padding: 0 10px 6px 10px; /* offset slightly for bottom bar safe area */
  box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.bottom-nav.hidden {
  opacity: 0;
  transform: translateY(65px);
  pointer-events: none;
}

.nav-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.45);
  font-family: 'Orbitron', 'Sarabun', sans-serif;
  font-size: 9px;
  font-weight: 700;
  cursor: pointer;
  width: 20%;
  height: 100%;
  transition: all 0.2s ease;
  gap: 4px;
}

.nav-tab .tab-icon {
  font-size: 18px;
  transition: transform 0.2s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

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

.nav-tab.active {
  color: var(--neon-cyan);
  text-shadow: var(--glow-cyan);
}

.nav-tab.active .tab-icon {
  filter: drop-shadow(0 0 6px var(--neon-cyan));
  transform: scale(1.15);
}

/* ==================================================
   JOURNEY MAP STAGES SCREEN
   ================================================== */
.world-header {
  width: 100%;
  background: rgba(12, 8, 26, 0.85);
  border: 1.5px solid rgba(255, 208, 80, 0.25);
  border-radius: 14px;
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: inset 0 0 10px rgba(255, 208, 80, 0.15), 0 0 15px rgba(0,0,0,0.4);
  margin-bottom: 12px;
}

.world-header-left {
  text-align: left;
}

.world-nav-btn {
  background: transparent;
  border: none;
  color: var(--gold);
  cursor: pointer;
  font-size: 14px;
  padding: 4px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s, opacity 0.15s, text-shadow 0.15s;
  text-shadow: 0 0 4px var(--gold);
}

.world-nav-btn:active {
  transform: scale(0.85);
}

.world-nav-btn:disabled {
  opacity: 0.15;
  cursor: not-allowed;
  text-shadow: none;
}

.world-num {
  font-family: 'Orbitron', monospace;
  font-size: 13px;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: 2px;
  text-shadow: 0 0 6px rgba(255, 208, 80, 0.5);
}

.world-name {
  font-family: 'Sarabun', sans-serif;
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
}

.world-subtitle {
  font-family: 'Orbitron', monospace;
  font-size: 8px;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 1px;
}

.world-progress-badge {
  font-family: 'Orbitron', monospace;
  background: rgba(0, 245, 255, 0.12);
  border: 1px solid rgba(0, 245, 255, 0.4);
  color: var(--neon-cyan);
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: bold;
  text-shadow: 0 0 5px var(--neon-cyan);
  box-shadow: 0 0 8px rgba(0, 245, 255, 0.1);
}

/* MAP VIEWPORT */
.map-scroll-container {
  width: 100%;
  height: 480px;
  position: relative;
  background: radial-gradient(circle at 50% 50%, rgba(12, 6, 30, 0.7) 0%, rgba(2, 2, 7, 0.95) 100%);
  border: 1px solid rgba(0, 245, 255, 0.18);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.95), 0 0 20px rgba(0, 245, 255, 0.05);
}

.path-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.nodes-container {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

/* STAGE NODES */
.stage-node {
  position: absolute;
  width: 54px;
  height: 54px;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
  pointer-events: auto;
  transition: transform 0.2s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

.stage-node-inner {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Orbitron', monospace;
  font-weight: 800;
  font-size: 13px;
  position: relative;
  transition: all 0.25s ease;
}

/* Node State - Locked */
.stage-node.locked {
  opacity: 0.45;
  filter: grayscale(0.85);
  cursor: not-allowed;
}

.stage-node.locked .stage-node-inner {
  background: #0d0d16;
  border: 2px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.3);
}

.stage-node.locked::after {
  content: '🔒';
  position: absolute;
  font-size: 9px;
  bottom: -3px;
  right: -3px;
  background: #06060c;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,0.15);
}

/* Node State - Unlocked & Completed */
.stage-node.unlocked .stage-node-inner,
.stage-node.completed .stage-node-inner {
  background: radial-gradient(circle at 35% 35%, #052c4a, #001222);
  border: 2px solid var(--neon-cyan);
  color: var(--neon-cyan);
  box-shadow: 0 0 10px rgba(0, 245, 255, 0.35), inset 0 0 6px rgba(0, 245, 255, 0.25);
  text-shadow: 0 0 4px var(--neon-cyan);
}

.stage-node.unlocked:active,
.stage-node.completed:active {
  transform: translate(-50%, -50%) scale(0.9);
}

/* Node State - Completed (Checkmark icon overlay) */
.stage-node.completed::after {
  content: '✓';
  position: absolute;
  font-size: 10px;
  font-weight: 900;
  bottom: -3px;
  right: -3px;
  background: #001222;
  color: var(--neon-green);
  border-radius: 50%;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--neon-green);
  box-shadow: 0 0 6px rgba(57, 255, 20, 0.3);
}

/* Node State - Current Level (Glow Gold Pulse) */
.stage-node.current .stage-node-inner {
  background: radial-gradient(circle at 35% 35%, #4a3400, #241400);
  border: 2.5px solid var(--gold);
  color: var(--gold);
  box-shadow: 0 0 15px var(--gold), inset 0 0 8px var(--gold);
  text-shadow: 0 0 5px var(--gold);
  animation: nodePulse 1.4s infinite alternate;
}

.stage-node.current:active {
  transform: translate(-50%, -50%) scale(0.9);
}

@keyframes nodePulse {
  from {
    transform: scale(1.0);
    box-shadow: 0 0 12px var(--gold), inset 0 0 6px var(--gold);
  }
  to {
    transform: scale(1.12);
    box-shadow: 0 0 24px var(--gold), 0 0 10px rgba(255, 208, 80, 0.4), inset 0 0 10px var(--gold);
  }
}

/* Elite Nodes (Diamond Rotated Node with crimson/pink neon) */
.stage-node.elite .stage-node-inner {
  border-radius: 10px;
  transform: rotate(45deg);
}

.stage-node.elite .stage-node-inner span {
  transform: rotate(-45deg);
  display: inline-block;
}

.stage-node.elite.unlocked .stage-node-inner,
.stage-node.elite.completed .stage-node-inner {
  border-color: var(--neon-pink);
  color: var(--neon-pink);
  background: radial-gradient(circle at 35% 35%, #460d21, #1e030c);
  box-shadow: 0 0 15px rgba(255, 45, 120, 0.45), inset 0 0 8px rgba(255, 45, 120, 0.3);
  text-shadow: 0 0 5px var(--neon-pink);
}

.stage-node.elite.current .stage-node-inner {
  border-color: var(--neon-pink);
  color: var(--neon-pink);
  background: radial-gradient(circle at 35% 35%, #590a2a, #280211);
  box-shadow: 0 0 22px var(--neon-pink), inset 0 0 10px var(--neon-pink);
  text-shadow: 0 0 6px var(--neon-pink);
  animation: eliteNodePulse 1.4s infinite alternate;
}

@keyframes eliteNodePulse {
  from {
    transform: rotate(45deg) scale(1.0);
    box-shadow: 0 0 12px var(--neon-pink), inset 0 0 6px var(--neon-pink);
  }
  to {
    transform: rotate(45deg) scale(1.12);
    box-shadow: 0 0 24px var(--neon-pink), 0 0 10px rgba(255, 45, 120, 0.4), inset 0 0 10px var(--neon-pink);
  }
}

/* Boss Nodes (Horizontal Wide Banner Card with Crimson Neon) */
.stage-node.boss {
  width: 80% !important;
  height: 64px !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(20, 2, 8, 0.95), rgba(40, 4, 16, 0.95));
  border: 2px solid var(--neon-pink);
  box-shadow: 0 0 15px rgba(255, 45, 120, 0.35), inset 0 0 8px rgba(255, 45, 120, 0.2);
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  color: #fff;
  z-index: 6;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.stage-node.boss:active {
  transform: translate(-50%, -50%) scale(0.97) !important;
}

.stage-node.boss.locked {
  opacity: 0.5;
  filter: grayscale(0.85);
  cursor: not-allowed;
  border-color: rgba(255, 255, 255, 0.15);
  background: linear-gradient(135deg, rgba(12, 12, 18, 0.95), rgba(22, 22, 28, 0.95));
  box-shadow: none;
}

.stage-node.boss.current {
  border-color: var(--neon-pink);
  box-shadow: 0 0 20px rgba(255, 45, 120, 0.6), inset 0 0 10px rgba(255, 45, 120, 0.3);
  animation: bossBannerPulse 1.4s infinite alternate;
}

@keyframes bossBannerPulse {
  from {
    transform: translate(-50%, -50%) scale(1.0);
    box-shadow: 0 0 12px rgba(255, 45, 120, 0.4), inset 0 0 6px rgba(255, 45, 120, 0.2);
  }
  to {
    transform: translate(-50%, -50%) scale(1.03);
    box-shadow: 0 0 24px rgba(255, 45, 120, 0.8), inset 0 0 12px rgba(255, 45, 120, 0.4);
  }
}

.boss-warning-pulse {
  animation: warningPulse 1s infinite alternate;
}

@keyframes warningPulse {
  from { opacity: 0.6; }
  to { opacity: 1; }
}

/* Reward Nodes (Green glow chest node) */
.stage-node.reward.unlocked .stage-node-inner,
.stage-node.reward.completed .stage-node-inner {
  border-color: var(--neon-green);
  color: var(--neon-green);
  background: radial-gradient(circle at 35% 35%, #0d461a, #031e08);
  box-shadow: 0 0 15px rgba(57, 255, 20, 0.45), inset 0 0 8px rgba(57, 255, 20, 0.3);
  text-shadow: 0 0 5px var(--neon-green);
}

.stage-node.reward.current .stage-node-inner {
  border-color: var(--neon-green);
  color: var(--neon-green);
  background: radial-gradient(circle at 35% 35%, #0f5921, #022807);
  box-shadow: 0 0 22px var(--neon-green), inset 0 0 10px var(--neon-green);
  text-shadow: 0 0 6px var(--neon-green);
  animation: rewardNodePulse 1.4s infinite alternate;
}

@keyframes rewardNodePulse {
  from {
    transform: scale(1.0);
    box-shadow: 0 0 12px var(--neon-green), inset 0 0 6px var(--neon-green);
  }
  to {
    transform: scale(1.12);
    box-shadow: 0 0 24px var(--neon-green), 0 0 10px rgba(57, 255, 20, 0.4), inset 0 0 10px var(--neon-green);
  }
}

/* Challenge Nodes (Gold/yellow glow lightning node) */
.stage-node.challenge.unlocked .stage-node-inner,
.stage-node.challenge.completed .stage-node-inner {
  border-color: var(--gold);
  color: var(--gold);
  background: radial-gradient(circle at 35% 35%, #4a3400, #241400);
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.45), inset 0 0 8px rgba(255, 215, 0, 0.3);
  text-shadow: 0 0 5px var(--gold);
}

.stage-node.challenge.current .stage-node-inner {
  border-color: var(--gold);
  color: var(--gold);
  background: radial-gradient(circle at 35% 35%, #5c4100, #2e1a00);
  box-shadow: 0 0 22px var(--gold), inset 0 0 10px var(--gold);
  text-shadow: 0 0 6px var(--gold);
  animation: nodePulse 1.4s infinite alternate; /* Reuses nodePulse */
}

/* 3-star Completed Sparkle Overlay */
.stage-node.completed.stars3::before {
  content: '';
  position: absolute;
  top: -6px;
  left: -6px;
  right: -6px;
  bottom: -6px;
  border-radius: 50%;
  border: 1.5px dashed var(--gold);
  box-shadow: 0 0 8px var(--gold);
  animation: starSparkle 6s linear infinite;
  pointer-events: none;
  z-index: 4;
}

@keyframes starSparkle {
  0% {
    transform: rotate(0deg) scale(1);
    opacity: 0.4;
  }
  50% {
    transform: rotate(180deg) scale(1.06);
    opacity: 0.85;
  }
  100% {
    transform: rotate(360deg) scale(1);
    opacity: 0.4;
  }
}

.stage-node.completed.stars3 .stage-node-inner::before {
  content: '✦';
  position: absolute;
  color: var(--gold);
  font-size: 14px;
  text-shadow: 0 0 6px var(--gold);
  top: -7px;
  left: 6px;
  animation: sparkleTwinkle 2.2s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes sparkleTwinkle {
  from {
    transform: scale(0.6) rotate(0deg);
    opacity: 0.3;
  }
  to {
    transform: scale(1.2) rotate(180deg);
    opacity: 1;
  }
}

/* Recommended Ship Button Style declarations */
.btn-strategy {
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  cursor: pointer;
  border-radius: 8px;
}

.btn-strategy:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

.btn-strategy:disabled {
  cursor: not-allowed;
}

/* Owned & Active State (Glowing Green) */
.btn-strategy.active-recommended {
  background: rgba(57, 255, 20, 0.12) !important;
  border: 1.5px solid var(--neon-green) !important;
  color: var(--neon-green) !important;
  box-shadow: 0 0 12px rgba(57, 255, 20, 0.25) !important;
  text-shadow: 0 0 4px var(--neon-green) !important;
  opacity: 1 !important;
}

/* Unowned/Locked State (Dim / Red borders) */
.btn-strategy.locked-recommended {
  background: rgba(255, 45, 120, 0.04) !important;
  border: 1.5px solid rgba(255, 45, 120, 0.25) !important;
  color: rgba(255, 255, 255, 0.35) !important;
  opacity: 0.65 !important;
}

/* Flow Dash Animation for SVG Path */
@keyframes pathFlow {
  to {
    stroke-dashoffset: -12;
  }
}

/* ==================================================
   STAGE DETAILS PANEL DRAWER
   ================================================== */
.stage-detail-panel {
  position: absolute;
  bottom: 80px; /* stay above bottom nav bar */
  left: 16px;
  right: 16px;
  background: rgba(5, 5, 20, 0.95);
  border: 1.5px solid var(--neon-cyan);
  border-radius: 16px;
  padding: 16px 20px;
  z-index: 110;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.85), var(--glow-cyan);
  transform: translateY(0);
  transition: all 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.15);
}

.stage-detail-panel.hidden {
  opacity: 0;
  transform: translateY(160px);
  pointer-events: none;
}

.stage-detail-close {
  position: absolute;
  top: 10px;
  right: 12px;
  font-size: 14px;
  cursor: pointer;
  color: rgba(255,255,255,0.55);
  transition: color 0.2s;
  padding: 4px;
}

.stage-detail-close:hover {
  color: #fff;
}

.stage-detail-header {
  border-bottom: 1px solid rgba(0, 245, 255, 0.2);
  padding-bottom: 6px;
  margin-bottom: 8px;
}

.stage-detail-num {
  font-family: 'Orbitron', monospace;
  font-size: 10px;
  color: var(--gold);
  font-weight: 800;
  letter-spacing: 1px;
}

.stage-detail-title {
  font-family: 'Sarabun', sans-serif;
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  margin-top: 1px;
}

.stage-detail-body {
  margin-bottom: 12px;
}

.stage-detail-desc {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.4;
  margin-bottom: 6px;
}

.stage-detail-status {
  font-size: 10px;
  font-weight: bold;
}

/* ==================================================
   PLACEHOLDER SCREENS (RANK & PROFILE)
   ================================================== */
.placeholder-screen-content {
  margin-top: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 24px 20px;
  border: 1.5px dashed rgba(255, 208, 80, 0.3);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.015);
  width: 100%;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.placeholder-icon {
  font-size: 44px;
  margin-bottom: 12px;
  filter: drop-shadow(0 0 8px var(--gold));
  animation: floatArtwork 3s ease-in-out infinite;
}

.placeholder-title {
  font-family: 'Orbitron', 'Sarabun', sans-serif;
  font-size: 18px;
  font-weight: bold;
  color: var(--gold);
  margin-bottom: 8px;
  letter-spacing: 1px;
  text-shadow: 0 0 5px var(--gold);
}

.placeholder-desc {
  font-size: 12px;
  color: rgba(255,255,255,0.65);
  line-height: 1.6;
}

/* ==================================================
   WORLD SUMMARY PANEL
   ================================================== */
.world-summary-panel {
  width: 100%;
  background: rgba(8, 5, 20, 0.75);
  border: 1px solid rgba(0, 245, 255, 0.15);
  border-radius: 12px;
  padding: 8px 12px;
  margin-bottom: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6), inset 0 0 10px rgba(0, 245, 255, 0.05);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.summary-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 25%;
}

.summary-label {
  font-size: 8px;
  color: rgba(255, 255, 255, 0.45);
  font-family: 'Sarabun', sans-serif;
  margin-bottom: 2px;
}

.summary-value {
  font-family: 'Orbitron', monospace;
  font-size: 11px;
  font-weight: 800;
  color: var(--neon-cyan);
  text-shadow: 0 0 4px rgba(0, 245, 255, 0.4);
}

.summary-motivation {
  font-size: 9px;
  color: var(--gold);
  text-align: center;
  font-family: 'Sarabun', sans-serif;
  letter-spacing: 0.5px;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
  padding-top: 4px;
  margin-top: 2px;
  text-shadow: 0 0 3px rgba(255, 208, 80, 0.2);
}

/* ==================================================
   STAGE NODE DECORATIONS
   ================================================== */
.stage-node-stars {
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 1.5px;
  pointer-events: none;
  z-index: 6;
}

.stage-node-stars .star-icon {
  font-size: 8px;
  color: rgba(255, 255, 255, 0.15);
  line-height: 1;
}

.stage-node-stars .star-icon.filled {
  color: var(--gold);
  filter: drop-shadow(0 0 2px var(--gold));
}

.stage-node-rank {
  position: absolute;
  top: -4px;
  right: -4px;
  font-family: 'Orbitron', monospace;
  font-size: 8px;
  font-weight: 900;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 6;
  border: 1px solid #111;
  box-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

.rank-badge-splus {
  background: linear-gradient(135deg, #fff, var(--gold));
  color: #000;
  border-color: var(--gold) !important;
  box-shadow: 0 0 6px var(--gold) !important;
}

.rank-badge-s {
  background: var(--gold);
  color: #000;
  border-color: var(--deep-gold) !important;
  box-shadow: 0 0 4px var(--gold) !important;
}

.rank-badge-a {
  background: var(--neon-cyan);
  color: #000;
  border-color: #0088cc !important;
  box-shadow: 0 0 4px var(--neon-cyan) !important;
}

.rank-badge-b {
  background: #fff;
  color: #000;
}

.rank-badge-c {
  background: #555;
  color: #fff;
}

/* ==================================================
   UPGRADED DETAIL DRAWER STATS
   ================================================== */
.detail-status-badge {
  font-family: 'Orbitron', monospace;
  font-size: 8px;
  font-weight: 900;
  padding: 2px 6px;
  border-radius: 4px;
  text-shadow: 0 0 3px rgba(0,0,0,0.5);
  letter-spacing: 0.5px;
}

.status-badge-locked {
  background: #222;
  color: #777;
  border: 1px solid #333;
}

.status-badge-new {
  background: var(--neon-cyan);
  color: #000;
  box-shadow: 0 0 6px var(--neon-cyan);
}

.status-badge-cleared {
  background: var(--gold);
  color: #000;
  box-shadow: 0 0 6px var(--gold);
}

.status-badge-perfect {
  background: var(--neon-pink);
  color: #fff;
  box-shadow: 0 0 8px var(--neon-pink);
}

.detail-stats-grid {
  display: flex;
  gap: 12px;
  background: rgba(255, 255, 255, 0.03);
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  margin-top: 8px;
  width: 100%;
}

.detail-stat-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.detail-stat-label {
  font-size: 8px;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 2px;
  font-family: 'Sarabun', sans-serif;
}

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

.detail-stars .star-icon {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.15);
  line-height: 1;
}

.detail-stars .star-icon.filled {
  color: var(--gold);
  filter: drop-shadow(0 0 3px var(--gold));
}

.detail-rank-val {
  font-family: 'Orbitron', monospace;
  font-size: 13px;
  font-weight: 900;
  color: var(--neon-cyan);
  line-height: 1;
}

.detail-score-val {
  font-family: 'Orbitron', monospace;
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}

/* ==================================================
   GARUDA FLEET SELECT SCREEN & CAROUSEL
   ================================================== */
.ship-carousel {
  width: 100%;
  display: flex;
  flex-direction: row;
  overflow-x: auto;
  gap: 12px;
  padding: 8px 16px;
  box-sizing: border-box;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  flex-shrink: 0;
}

.ship-carousel::-webkit-scrollbar {
  display: none;
}

.ship-carousel-card {
  flex: 0 0 84px;
  height: 96px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  scroll-snap-align: start;
  position: relative;
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-sizing: border-box;
}

.ship-carousel-card.active-card {
  border-color: var(--card-glow-color, var(--gold));
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 0 0 15px var(--card-glow-color-alpha, rgba(255, 208, 80, 0.3));
  transform: scale(1.05);
}

.ship-carousel-card.locked-card {
  opacity: 0.5;
  filter: grayscale(0.65);
}

.ship-carousel-card-icon {
  font-size: 26px;
  margin-bottom: 4px;
}

.ship-carousel-card-name {
  font-size: 9px;
  font-weight: 700;
  font-family: 'Orbitron', 'Montserrat', sans-serif;
  color: rgba(255, 255, 255, 0.7);
  max-width: 78px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ship-carousel-card-equipped-tag {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--neon-green);
  color: #000;
  font-size: 8px;
  font-weight: 900;
  font-family: 'Orbitron', sans-serif;
  padding: 1px 4px;
  border-radius: 4px;
  box-shadow: 0 0 6px rgba(57, 255, 20, 0.4);
}

/* Ship details panel */
.ship-detail-card {
  width: 92%;
  border-radius: 16px;
  background: rgba(12, 6, 25, 0.75);
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.02), 0 10px 25px rgba(0, 0, 0, 0.4);
  padding: 14px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 10px;
  backdrop-filter: blur(10px);
  margin: 0 auto;
}

.ship-detail-name-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.ship-detail-names {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.ship-detail-title-en {
  font-family: 'Orbitron', sans-serif;
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 0 8px rgba(255,255,255,0.2);
}

.ship-detail-title-th {
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 1px;
}

.ship-detail-playstyle {
  font-family: 'Orbitron', sans-serif;
  font-size: 10px;
  font-weight: 700;
  background: rgba(255, 215, 0, 0.1);
  color: var(--gold);
  border: 1px solid var(--gold);
  padding: 2px 8px;
  border-radius: 6px;
  text-shadow: 0 0 4px rgba(255, 215, 0, 0.3);
}

.ship-detail-desc {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.4;
  text-align: left;
  background: rgba(255, 255, 255, 0.02);
  border-left: 3px solid var(--theme-color, var(--neon-cyan));
  padding: 6px 10px;
  border-radius: 0 8px 8px 0;
}

.ship-detail-abilities {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}

.ship-ability-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ship-ability-header {
  font-size: 10px;
  font-family: 'Orbitron', sans-serif;
  font-weight: 800;
  color: var(--theme-color, var(--neon-cyan));
}

.ship-ability-desc {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.85);
}

.ship-detail-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  text-align: left;
  background: rgba(0, 0, 0, 0.2);
  padding: 8px 10px;
  border-radius: 8px;
}

.ship-stat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
  font-family: 'Orbitron', sans-serif;
  color: rgba(255, 255, 255, 0.65);
}

.ship-stat-bars-container {
  display: flex;
  gap: 2px;
}

.ship-stat-bar-tick {
  width: 9px;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 1px;
}

.ship-stat-bar-tick.active-tick {
  background: var(--theme-color, var(--neon-cyan));
  box-shadow: 0 0 6px var(--theme-color-alpha, rgba(0, 245, 255, 0.3));
}

.ship-detail-action-row {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}

/* ==================================================
   M5: SHIP UPGRADE PANEL
   ================================================== */
.ship-upgrade-panel {
  width: 100%;
  margin-top: 6px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 10px 10px 6px 10px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.upgrade-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2px;
}

.upgrade-panel-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.upgrade-panel-mat {
  font-family: 'Orbitron', monospace;
  font-size: 11px;
  font-weight: 700;
  color: #ffd050;
  text-shadow: 0 0 5px rgba(255,208,80,0.5);
}

.upgrade-branch-tabs {
  display: flex;
  gap: 5px;
  margin-bottom: 4px;
}

.upgrade-branch-tab {
  flex: 1;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 6px;
  font-family: 'Sarabun', 'Orbitron', sans-serif;
  font-size: 10px;
  font-weight: 700;
  color: rgba(255,255,255,0.5);
  padding: 5px 2px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.upgrade-branch-tab:hover {
  background: rgba(255,255,255,0.08);
}

.upgrade-branch-tab.active-tab {
  background: rgba(255,255,255,0.08);
  font-weight: 900;
  box-shadow: 0 0 6px rgba(255,255,255,0.08);
}

.upgrade-node-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.upgrade-node-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 8px;
  padding: 7px 8px;
  transition: background 0.2s;
}

.upgrade-node-row.node-maxed {
  border-color: rgba(255,208,80,0.2);
  background: rgba(255,208,80,0.04);
}

.upgrade-node-icon {
  font-size: 20px;
  flex-shrink: 0;
  width: 26px;
  text-align: center;
}

.upgrade-node-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
  text-align: left;
  min-width: 0;
}

.upgrade-node-name {
  font-family: 'Sarabun', sans-serif;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.upgrade-node-en {
  font-size: 9px;
  color: rgba(255,255,255,0.4);
  font-weight: 400;
}

.upgrade-node-desc {
  font-family: 'Sarabun', sans-serif;
  font-size: 10px;
  color: rgba(255,255,255,0.55);
  line-height: 1.3;
}

.upgrade-pips {
  display: flex;
  gap: 3px;
  margin-top: 3px;
}

.upgrade-pip {
  width: 10px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255,255,255,0.12);
  display: inline-block;
  transition: all 0.2s;
}

.upgrade-pip.pip-filled {
  /* background and box-shadow applied inline per ship color */
}

.upgrade-node-action {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.upgrade-buy-btn {
  font-family: 'Orbitron', monospace;
  font-size: 10px;
  font-weight: 800;
  background: rgba(57, 255, 20, 0.1);
  border: 1.5px solid var(--neon-green);
  color: var(--neon-green);
  text-shadow: 0 0 4px var(--neon-green);
  border-radius: 6px;
  padding: 5px 8px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.upgrade-buy-btn:hover:not(:disabled) {
  background: rgba(57, 255, 20, 0.2);
  box-shadow: 0 0 8px rgba(57,255,20,0.3);
}

.upgrade-buy-btn.upgrade-btn-disabled,
.upgrade-buy-btn:disabled {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.3);
  text-shadow: none;
  cursor: not-allowed;
}

.upgrade-maxed-tag {
  font-family: 'Orbitron', monospace;
  font-size: 9px;
  font-weight: 900;
  color: #ffd050;
  text-shadow: 0 0 4px rgba(255,208,80,0.5);
  background: rgba(255,208,80,0.1);
  border: 1px solid rgba(255,208,80,0.3);
  border-radius: 4px;
  padding: 4px 6px;
  white-space: nowrap;
}

/* Upgrades State Visual Overrides */
.upgrade-node-row.node-available {
  background: rgba(57, 255, 20, 0.04);
  border-color: rgba(57, 255, 20, 0.25);
  box-shadow: 0 0 5px rgba(57, 255, 20, 0.05);
}
.upgrade-node-row.node-available:hover {
  background: rgba(57, 255, 20, 0.07);
  border-color: rgba(57, 255, 20, 0.4);
}

.upgrade-node-row.node-insufficient {
  background: rgba(255, 136, 0, 0.02);
  border-color: rgba(255, 136, 0, 0.15);
}
.upgrade-node-row.node-insufficient:hover {
  background: rgba(255, 136, 0, 0.05);
  border-color: rgba(255, 136, 0, 0.25);
}

.upgrade-node-row.node-locked,
.upgrade-node-row.node-blocked {
  background: rgba(255, 255, 255, 0.01);
  border-color: rgba(255, 255, 255, 0.04);
  opacity: 0.55;
}
.upgrade-node-row.node-locked:hover,
.upgrade-node-row.node-blocked:hover {
  opacity: 0.85;
  background: rgba(255, 255, 255, 0.03);
}

/* Button overrides for locked & insufficient states */
.upgrade-buy-btn.upgrade-btn-insufficient {
  background: rgba(255, 136, 0, 0.08);
  border-color: #ff8800;
  color: #ff8800;
  text-shadow: 0 0 4px rgba(255, 136, 0, 0.5);
}
.upgrade-buy-btn.upgrade-btn-insufficient:hover {
  background: rgba(255, 136, 0, 0.15);
  box-shadow: 0 0 8px rgba(255, 136, 0, 0.3);
}

.upgrade-buy-btn.upgrade-btn-locked {
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.4);
  text-shadow: none;
}
.upgrade-buy-btn.upgrade-btn-locked:hover {
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.6);
  border-color: rgba(255, 255, 255, 0.2);
}

/* ==================================================
   M3 STAGE SELECT MAP VISUAL REDESIGN STYLES
   ================================================== */
#stages-screen {
  background: radial-gradient(circle at center, #050410 0%, #010105 100%) !important;
}

/* Content column centering & safe area constraint */
.journey-map-column {
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

/* A. Premium World Header */
.premium-world-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-bottom: 10px;
  box-sizing: border-box;
  padding: 0 4px;
}

.premium-world-header .world-header-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.premium-world-header .world-count-label {
  font-family: 'Orbitron', sans-serif;
  font-size: 9px;
  font-weight: 700;
  color: var(--neon-cyan);
  letter-spacing: 1px;
  text-shadow: 0 0 4px rgba(0, 245, 255, 0.3);
  margin-bottom: 2px;
}

.premium-world-header .world-title-thai {
  font-family: 'Sarabun', sans-serif;
  font-size: 18px;
  font-weight: 800;
  color: var(--gold);
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.4);
  margin: 0;
  line-height: 1.2;
}

.premium-world-header .world-title-eng {
  font-family: 'Orbitron', sans-serif;
  font-size: 8px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 1px;
}

.premium-world-header .gem-currency-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(20, 15, 35, 0.6);
  border: 1px solid rgba(255, 215, 0, 0.25);
  padding: 5px 12px;
  border-radius: 14px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.premium-world-header .gem-pill-icon {
  font-size: 12px;
}

.premium-world-header .gem-pill-amount {
  font-family: 'Orbitron', sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
}

/* B. World Selector Tabs */
.world-tabs-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px 10px 2px;
  margin-bottom: 8px;
  width: 100%;
  scrollbar-width: none;
}

.world-tabs-row::-webkit-scrollbar {
  display: none;
}

.world-tab-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 14px;
  background: rgba(20, 15, 35, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.5);
  font-family: 'Sarabun', sans-serif;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease-out;
  white-space: nowrap;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.world-tab-pill:hover:not(.locked) {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.world-tab-pill.active {
  background: rgba(255, 215, 0, 0.1);
  border: 1.2px solid var(--gold);
  color: var(--gold);
  text-shadow: 0 0 4px rgba(255, 215, 0, 0.3);
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.15), inset 0 0 4px rgba(255, 215, 0, 0.1);
}

.world-tab-pill.locked {
  opacity: 0.35;
  cursor: not-allowed;
  background: rgba(10, 10, 15, 0.4);
  border-color: rgba(255, 255, 255, 0.02);
  color: rgba(255, 255, 255, 0.3);
}

.tab-pill-icon {
  font-size: 11px;
}

/* C. World Progress Bar */
.premium-progress-container {
  width: 100%;
  background: rgba(15, 10, 30, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 10px;
  padding: 6px 12px;
  margin-bottom: 10px;
  box-sizing: border-box;
}

.progress-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.progress-status-label {
  font-family: 'Sarabun', sans-serif;
  font-size: 10px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.6);
}

.progress-percentage-label {
  font-family: 'Orbitron', sans-serif;
  font-size: 10px;
  font-weight: 700;
  color: var(--gold);
  text-shadow: 0 0 4px rgba(255, 215, 0, 0.3);
}

.premium-progress-bar-track {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 2px;
  overflow: hidden;
}

.premium-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #ffd700, #ff8c00);
  border-radius: 2px;
  box-shadow: 0 0 6px rgba(255, 215, 0, 0.5);
  transition: width 0.4s ease-out;
}

/* D. Section Title Divider */
.world-section-divider {
  display: flex;
  align-items: center;
  width: 100%;
  margin: 2px 0 10px 0;
}

.world-section-divider .divider-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 215, 0, 0), rgba(255, 215, 0, 0.2), rgba(255, 215, 0, 0));
}

.world-section-divider .divider-text {
  font-family: 'Orbitron', 'Sarabun', sans-serif;
  font-size: 10px;
  font-weight: 700;
  color: var(--gold);
  text-shadow: 0 0 5px rgba(255, 215, 0, 0.3);
  padding: 0 8px;
  letter-spacing: 0.5px;
}

/* E. Map Scroll Container Adjustments */
.map-scroll-container {
  height: 520px;
  margin-top: 4px;
}

/* Alternate Stage Style Overrides */
/* Completed node gets gold ring */
.stage-node.completed .stage-node-inner {
  background: radial-gradient(circle at 35% 35%, #332200, #130c00) !important;
  border: 1.8px solid var(--gold) !important;
  color: var(--gold) !important;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.3), inset 0 0 5px rgba(255, 215, 0, 0.2) !important;
  text-shadow: 0 0 3px var(--gold) !important;
}

.stage-node.completed::after {
  background: #130c00 !important;
  color: var(--neon-green) !important;
  border: 1.5px solid var(--neon-green) !important;
}

/* Current node gets cyan glowing ring */
.stage-node.current .stage-node-inner {
  background: radial-gradient(circle at 35% 35%, #05263f, #000c17) !important;
  border: 2.2px solid var(--neon-cyan) !important;
  color: var(--neon-cyan) !important;
  box-shadow: 0 0 15px var(--neon-cyan), inset 0 0 8px var(--neon-cyan) !important;
  text-shadow: 0 0 5px var(--neon-cyan) !important;
  animation: currentPulseAnim 1.4s infinite alternate !important;
}

@keyframes currentPulseAnim {
  from {
    transform: scale(1.0);
    box-shadow: 0 0 10px var(--neon-cyan), inset 0 0 5px var(--neon-cyan);
  }
  to {
    transform: scale(1.1);
    box-shadow: 0 0 20px var(--neon-cyan), 0 0 8px rgba(0, 245, 255, 0.3), inset 0 0 8px var(--neon-cyan);
  }
}

/* Locked node gets dark grey ring */
.stage-node.locked .stage-node-inner {
  background: #06060c !important;
  border: 1.8px solid rgba(255, 255, 255, 0.08) !important;
  color: rgba(255, 255, 255, 0.15) !important;
}

/* F. Symmetrical Info Blocks beside Nodes */
.node-info-block {
  position: absolute;
  width: 140px;
  transform: translateY(-50%);
  pointer-events: none;
  z-index: 4;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

.node-info-block.info-block-right {
  left: 45%;
  text-align: left;
  align-items: flex-start;
}

.node-info-block.info-block-left {
  left: 11%;
  text-align: right;
  align-items: flex-end;
}

.info-stage-title {
  font-family: 'Sarabun', sans-serif;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,0.95);
  margin-bottom: 1px;
}

.info-stage-desc {
  font-family: 'Sarabun', sans-serif;
  font-size: 8px;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.2;
  text-shadow: 0 1px 3px rgba(0,0,0,0.95);
}

.info-best-score {
  font-family: 'Orbitron', sans-serif;
  font-size: 8px;
  font-weight: 700;
  color: var(--gold);
  text-shadow: 0 0 3px rgba(255, 215, 0, 0.3);
}

/* Play Label Pill "เล่นต่อ" */
.play-indicator {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 245, 255, 0.95);
  border: 1px solid #fff;
  color: #020208;
  font-family: 'Sarabun', sans-serif;
  font-size: 8px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 8px;
  box-shadow: 0 0 8px var(--neon-cyan);
  white-space: nowrap;
  animation: playLabelPulse 1.2s infinite alternate;
  z-index: 10;
  pointer-events: none;
}

@keyframes playLabelPulse {
  from {
    transform: translateX(-50%) scale(1.0);
    box-shadow: 0 0 6px var(--neon-cyan);
  }
  to {
    transform: translateX(-50%) scale(1.08);
    box-shadow: 0 0 14px var(--neon-cyan), 0 0 4px #fff;
  }
}

/* Recommended Ship Badges */
.rec-ship-pill {
  font-family: 'Orbitron', 'Sarabun', sans-serif;
  font-size: 8px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 6px;
  border: 1px solid;
  letter-spacing: 0.2px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.4);
  display: inline-block;
  white-space: nowrap;
  margin-top: 2px;
}

.rec-ship-pill.phoenix {
  color: #ff2d78;
  border-color: rgba(255, 45, 120, 0.35);
  background: rgba(255, 45, 120, 0.08);
}
.rec-ship-pill.garuda {
  color: #ffd700;
  border-color: rgba(255, 215, 0, 0.35);
  background: rgba(255, 215, 0, 0.08);
}
.rec-ship-pill.naga {
  color: #00f5ff;
  border-color: rgba(0, 245, 255, 0.35);
  background: rgba(0, 245, 255, 0.08);
}
.rec-ship-pill.hasadee {
  color: #ff7f50;
  border-color: rgba(255, 127, 80, 0.35);
  background: rgba(255, 127, 80, 0.08);
}
.rec-ship-pill.nontok {
  color: #c0c0c0;
  border-color: rgba(192, 192, 192, 0.35);
  background: rgba(192, 192, 192, 0.08);
}
.rec-ship-pill.indra {
  color: #b432ff;
  border-color: rgba(180, 50, 255, 0.35);
  background: rgba(180, 50, 255, 0.08);
}

.rec-ship-pill.not-owned {
  opacity: 0.45;
  filter: grayscale(0.4);
}

/* Premium Boss Banner Redesign overrides */
.stage-node.boss {
  width: 90% !important;
  max-width: 325px !important;
  height: 58px !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  background: linear-gradient(135deg, rgba(28, 4, 12, 0.94), rgba(48, 6, 22, 0.94)) !important;
  border: 1.5px solid var(--neon-pink) !important;
  box-shadow: 0 0 15px rgba(255, 45, 120, 0.35), inset 0 0 6px rgba(255, 45, 120, 0.2) !important;
  border-radius: 12px !important;
  padding: 0 12px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  z-index: 6;
  box-sizing: border-box !important;
}

.stage-node.boss.locked {
  background: linear-gradient(135deg, rgba(12, 12, 18, 0.95), rgba(20, 20, 25, 0.95)) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  box-shadow: none !important;
  opacity: 0.65 !important;
}

.stage-node.boss.current {
  animation: bossBannerPulseAnim 1.4s infinite alternate !important;
  border-color: #ff1266 !important;
  box-shadow: 0 0 20px rgba(255, 18, 102, 0.5), inset 0 0 8px rgba(255, 18, 102, 0.3) !important;
}

@keyframes bossBannerPulseAnim {
  from {
    transform: translate(-50%, -50%) scale(1.0);
    box-shadow: 0 0 12px rgba(255, 18, 102, 0.4), inset 0 0 6px rgba(255, 18, 102, 0.2);
  }
  to {
    transform: translate(-50%, -50%) scale(1.03);
    box-shadow: 0 0 22px rgba(255, 18, 102, 0.7), inset 0 0 10px rgba(255, 18, 102, 0.35);
  }
}

.stage-node.boss .boss-left {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  pointer-events: none;
}

.stage-node.boss .boss-avatar {
  font-size: 20px;
  filter: drop-shadow(0 0 4px var(--neon-pink));
}

.stage-node.boss .boss-info-col {
  display: flex;
  flex-direction: column;
  pointer-events: none;
}

.stage-node.boss .boss-badge {
  font-family: 'Orbitron', sans-serif;
  font-size: 7.5px;
  font-weight: 700;
  color: var(--neon-pink);
  letter-spacing: 0.5px;
  text-shadow: 0 0 3px rgba(255, 45, 120, 0.4);
}

.stage-node.boss .boss-name-thai {
  font-family: 'Sarabun', sans-serif;
  font-size: 11.5px;
  font-weight: 800;
  color: #fff;
  line-height: 1.15;
}

.stage-node.boss .boss-hp-condition {
  font-family: 'Orbitron', 'Sarabun', sans-serif;
  font-size: 8px;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 1px;
}

.stage-node.boss .boss-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  pointer-events: none;
}

.stage-node.boss .boss-lock-icon {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.4);
}

.stage-node.boss .boss-status-pill {
  font-family: 'Orbitron', sans-serif;
  font-size: 7.5px;
  font-weight: 800;
  padding: 1.5px 5px;
  border-radius: 4px;
  letter-spacing: 0.2px;
}

.stage-node.boss .boss-status-pill.completed {
  background: rgba(57, 255, 20, 0.12);
  border: 1px solid var(--neon-green);
  color: var(--neon-green);
  text-shadow: 0 0 3px rgba(57, 255, 20, 0.3);
}

.stage-node.boss .boss-status-pill.ready {
  background: rgba(255, 45, 120, 0.12);
  border: 1px solid var(--neon-pink);
  color: var(--neon-pink);
  text-shadow: 0 0 3px rgba(255, 45, 120, 0.3);
}

.boss-stars {
  position: static !important;
  transform: none !important;
  margin-top: 2px !important;
}

.boss-rank-badge {
  top: -8px !important;
  right: -8px !important;
}

/* Previous World Strip styling */
.previous-world-strip {
  width: 100%;
  margin-top: 14px;
  margin-bottom: 8px;
  box-sizing: border-box;
}

.world-strip-prev-divider {
  height: 1px;
  background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,0.08), rgba(255,255,255,0));
  margin-bottom: 8px;
}

.world-strip-prev-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: 'Sarabun', sans-serif;
  font-size: 10px;
  font-weight: 700;
  color: var(--gold);
  text-shadow: 0 0 4px rgba(255, 215, 0, 0.2);
}

.world-strip-prev-content .check-icon {
  color: var(--neon-green);
  font-weight: bold;
  text-shadow: 0 0 3px var(--neon-green);
}

/* --- BOSS REWARDS CHOICE WORKFLOW V1 --- */
.boss-reward-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(12, 10, 30, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 12px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

.boss-reward-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0) 100%);
  pointer-events: none;
}

.boss-reward-card:hover {
  transform: translateY(-2px);
  background: rgba(24, 20, 50, 0.7);
}

.boss-reward-card.rarity-common {
  border-color: rgba(0, 245, 255, 0.3);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3), inset 0 0 10px rgba(0, 245, 255, 0.05);
}
.boss-reward-card.rarity-common:hover {
  border-color: #00f5ff;
  box-shadow: 0 6px 16px rgba(0, 245, 255, 0.2), inset 0 0 15px rgba(0, 245, 255, 0.1);
}

.boss-reward-card.rarity-rare {
  border-color: rgba(0, 255, 102, 0.3);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3), inset 0 0 10px rgba(0, 255, 102, 0.05);
}
.boss-reward-card.rarity-rare:hover {
  border-color: #00ff66;
  box-shadow: 0 6px 16px rgba(0, 255, 102, 0.2), inset 0 0 15px rgba(0, 255, 102, 0.1);
}

.boss-reward-card.rarity-epic {
  border-color: rgba(255, 45, 120, 0.3);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3), inset 0 0 10px rgba(255, 45, 120, 0.05);
}
.boss-reward-card.rarity-epic:hover {
  border-color: #ff2d78;
  box-shadow: 0 6px 16px rgba(255, 45, 120, 0.2), inset 0 0 15px rgba(255, 45, 120, 0.1);
}

.boss-reward-card.rarity-legendary {
  border-color: rgba(255, 208, 80, 0.3);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3), inset 0 0 10px rgba(255, 208, 80, 0.05);
}
.boss-reward-card.rarity-legendary:hover {
  border-color: #ffd050;
  box-shadow: 0 6px 20px rgba(255, 208, 80, 0.25), inset 0 0 20px rgba(255, 208, 80, 0.15);
}

.boss-reward-icon-container {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 24px;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.boss-reward-info-container {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  text-align: left;
}

.boss-reward-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2px;
}

.boss-reward-name {
  font-family: 'Orbitron', 'Sarabun', sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: #ffffff;
}

.boss-reward-badge {
  font-size: 8px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.boss-reward-badge.badge-common {
  background: rgba(0, 245, 255, 0.15);
  color: #00f5ff;
  border: 1px solid rgba(0, 245, 255, 0.3);
}
.boss-reward-badge.badge-rare {
  background: rgba(0, 255, 102, 0.15);
  color: #00ff66;
  border: 1px solid rgba(0, 255, 102, 0.3);
}
.boss-reward-badge.badge-epic {
  background: rgba(255, 45, 120, 0.15);
  color: #ff2d78;
  border: 1px solid rgba(255, 45, 120, 0.3);
}
.boss-reward-badge.badge-legendary {
  background: rgba(255, 208, 80, 0.15);
  color: #ffd050;
  border: 1px solid rgba(255, 208, 80, 0.3);
}

.boss-reward-desc {
  font-family: 'Sarabun', sans-serif;
  font-size: 9px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.3;
}

.boss-reward-meta-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 3px;
}

.boss-reward-amount,
.boss-reward-type {
  font-family: 'Orbitron', 'Montserrat', sans-serif;
  font-size: 8px;
  line-height: 1;
  color: var(--gold);
  opacity: 0.9;
  text-transform: uppercase;
}

.boss-reward-fallback-message {
  color: rgba(255, 255, 255, 0.74);
  font-size: 11px;
  line-height: 1.35;
  text-align: center;
  padding: 8px 4px;
}

.boss-reward-fallback-btn {
  width: 100%;
  min-height: 42px;
  font-size: 12px;
}

.boss-reward-card.selected-claim {
  transform: scale(1.02);
  pointer-events: none;
}
.boss-reward-card.selected-claim.rarity-common { border-color: #00f5ff; box-shadow: 0 0 15px rgba(0, 245, 255, 0.4); }
.boss-reward-card.selected-claim.rarity-rare { border-color: #00ff66; box-shadow: 0 0 15px rgba(0, 255, 102, 0.4); }
.boss-reward-card.selected-claim.rarity-epic { border-color: #ff2d78; box-shadow: 0 0 15px rgba(255, 45, 120, 0.4); }
.boss-reward-card.selected-claim.rarity-legendary { border-color: #ffd050; box-shadow: 0 0 20px rgba(255, 208, 80, 0.5); }

.boss-reward-card.dimmed {
  opacity: 0.3;
  filter: grayscale(80%);
  pointer-events: none;
  transform: scale(0.98);
}

.btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
  border-color: rgba(255, 255, 255, 0.1) !important;
  box-shadow: none !important;
}

/* --- REWARD FEEDBACK TOAST SYSTEM --- */
.reward-toast-container {
  position: fixed;
  left: 50%;
  bottom: 120px; /* center-lower area above bottom navigation */
  transform: translate(-50%, 0);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  z-index: 10000;
  pointer-events: none; /* Make sure it doesn't block clicks */
}

.reward-toast {
  background: rgba(10, 8, 20, 0.93);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1.5px solid var(--neon-cyan);
  box-shadow: 0 0 15px rgba(0, 245, 255, 0.25), inset 0 0 10px rgba(0, 245, 255, 0.15);
  border-radius: 12px;
  padding: 12px 20px;
  min-width: 220px;
  max-width: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-sizing: border-box;
  animation: rewardToastAnim 1.6s cubic-bezier(0.25, 1, 0.5, 1) forwards;
  pointer-events: none;
}

.reward-toast.error-toast {
  border-color: #ff4a4a;
  box-shadow: 0 0 15px rgba(255, 74, 74, 0.25), inset 0 0 10px rgba(255, 74, 74, 0.15);
}

.reward-toast-title {
  font-family: 'Orbitron', 'Sarabun', sans-serif;
  font-size: 13px;
  font-weight: 800;
  color: var(--gold);
  text-shadow: 0 0 6px rgba(255, 208, 80, 0.4);
  margin-bottom: 6px;
  letter-spacing: 0.5px;
}

.reward-toast.error-toast .reward-toast-title {
  color: #ff4a4a;
  text-shadow: 0 0 6px rgba(255, 74, 74, 0.4);
}

.reward-toast-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
}

.reward-toast-line {
  font-family: 'Orbitron', 'Sarabun', sans-serif;
  font-size: 11.5px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.reward-toast-line.gem-line {
  color: var(--neon-green);
  text-shadow: 0 0 4px rgba(57, 255, 20, 0.25);
}

.reward-toast-line.red-gem-line {
  color: #ff2d78;
  text-shadow: 0 0 4px rgba(255, 45, 120, 0.25);
}

.reward-toast-line.material-line {
  color: var(--gold);
  text-shadow: 0 0 4px rgba(255, 208, 80, 0.25);
}

@keyframes rewardToastAnim {
  0% {
    opacity: 0;
    transform: scale(0.8) translateY(20px);
  }
  15% {
    opacity: 1;
    transform: scale(1.0) translateY(0);
  }
  80% {
    opacity: 1;
    transform: scale(1.0) translateY(-10px);
  }
  100% {
    opacity: 0;
    transform: scale(0.9) translateY(-30px);
  }
}

/* Mobile Performance Mode Overrides */
body.mobile-perf,
body.mobile-perf * {
  animation: none !important;
  transition: none !important;
  box-shadow: none !important;
  text-shadow: none !important;
}

