/* ==========================================================================
   ORBITAL STRIKE — High Performance Casual Sports Mobile WebApp Stylesheet
   Pure CSS (No Tailwind) — Glassmorphism, Neon Sports Gradients & Micro-interactions
   ========================================================================== */

:root {
  --primary-orange: #ff5e00;
  --primary-orange-light: #ff7e26;
  --primary-orange-dark: #d64a00;
  --secondary-cyan: #00d2ff;
  --secondary-cyan-glow: rgba(0, 210, 255, 0.45);
  --accent-gold: #ffbe0b;
  --accent-gold-glow: rgba(255, 190, 11, 0.4);
  --accent-emerald: #00f076;
  --accent-danger: #ff3366;
  
  --bg-dark-base: #060b17;
  --panel-bg: rgba(10, 18, 38, 0.72);
  --panel-bg-dense: rgba(7, 13, 29, 0.88);
  --panel-border: rgba(255, 255, 255, 0.12);
  --panel-border-bright: rgba(255, 255, 255, 0.28);
  --panel-glow-orange: rgba(255, 94, 0, 0.25);
  
  --text-main: #ffffff;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'Space Grotesk', monospace;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 26px;
  --radius-full: 9999px;

  --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.45);
  --shadow-btn: 0 4px 20px rgba(255, 94, 0, 0.4);
  --shadow-btn-hover: 0 6px 26px rgba(255, 94, 0, 0.6);
  --shadow-cyan: 0 4px 18px rgba(0, 210, 255, 0.35);

  --transition-fast: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Base Reset & Mobile Container */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}

html {
  width: 100%;
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

body {
  width: 100%;
  min-height: 100%;
  min-height: 100dvh;
  margin: 0;
  padding: 0;
  background-color: var(--bg-dark-base);
  background: #060b17 url('bg.jpg') center top / cover no-repeat;
  font-family: var(--font-display);
  color: var(--text-main);
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  position: relative;
  -webkit-font-smoothing: antialiased;
  touch-action: pan-y;
}

/* App Wrapper: Centered mobile-first max-width: 480px with full scroll support */
#app-container {
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  position: relative;
  background: #060b17 url('bg.jpg') center top / cover no-repeat;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.7);
  overflow-x: hidden;
  overflow-y: visible;
}

#app-container::before {
  content: '';
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: 100vh;
  height: 100dvh;
  background: linear-gradient(180deg, rgba(6, 11, 23, 0.2) 0%, rgba(5, 10, 20, 0.35) 100%);
  pointer-events: none;
  z-index: 1;
}

/* Global Header & Screens Stack */
#global-header {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
}

#screens-wrapper {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  width: 100%;
  position: relative;
  z-index: 2;
  overflow-x: hidden;
  overflow-y: visible;
}

/* ==========================================================================
   GLOBAL HEADER
   ========================================================================== */

#global-header {
  height: 64px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(8, 14, 30, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--panel-border);
  z-index: 50;
  position: sticky;
  top: 0;
}

.brand-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: transform var(--transition-fast);
}

.brand-badge:active {
  transform: scale(0.96);
}

.brand-logo-img {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  box-shadow: 0 2px 10px rgba(255, 94, 0, 0.35);
  border: 1px solid rgba(255, 190, 11, 0.4);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.brand-title {
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  background: linear-gradient(135deg, #ffffff 40%, #a5b4fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-sub {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: var(--primary-orange);
}

.header-resources {
  display: flex;
  align-items: center;
  gap: 8px;
}

.resource-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  border: 1px solid var(--panel-border);
  background: rgba(13, 24, 48, 0.6);
  backdrop-filter: blur(8px);
}

.stars-pill {
  color: var(--accent-gold);
  border-color: rgba(255, 190, 11, 0.3);
}

.stars-pill .pill-icon {
  width: 14px;
  height: 14px;
  filter: drop-shadow(0 0 5px var(--accent-gold-glow));
}

.coins-pill {
  color: #ffda79;
  border-color: rgba(255, 218, 121, 0.3);
}

.coins-pill .pill-icon {
  width: 15px;
  height: 15px;
  color: #f7b731;
}

.icon-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--panel-border);
  color: var(--text-main);
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.icon-btn:active {
  transform: scale(0.92);
  background: rgba(255, 255, 255, 0.16);
}

.icon-btn svg {
  width: 18px;
  height: 18px;
}

/* ==========================================================================
   SCREENS WRAPPER & SECTIONS
   ========================================================================== */

#screens-wrapper {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  width: 100%;
  position: relative;
  z-index: 2;
  overflow: visible;
}

.screen-section {
  display: none;
  flex-direction: column;
  width: 100%;
  min-height: calc(100dvh - 64px);
  padding: 16px;
  padding-bottom: 70px;
  box-sizing: border-box;
  animation: fadeInScreen var(--transition-normal) ease forwards;
}

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

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

/* Glassmorphic Panel Component */
.glass-panel {
  background: var(--panel-bg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-glass);
}

.glass-card {
  background: rgba(13, 23, 48, 0.65);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  transition: all var(--transition-normal);
}

.glass-card:hover, .glass-card:active {
  background: rgba(18, 32, 66, 0.8);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

/* ==========================================================================
   1. HOME SCREEN
   ========================================================================== */

.home-hero-card {
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  margin-bottom: 18px;
  border-color: rgba(255, 94, 0, 0.25);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.home-hero-card::before {
  content: '';
  position: absolute;
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
  width: 220px;
  height: 120px;
  background: radial-gradient(ellipse at center, rgba(255, 94, 0, 0.35) 0%, transparent 70%);
  pointer-events: none;
}

.hero-trophy-wrapper {
  position: relative;
  width: 110px;
  height: 110px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-trophy-img {
  width: 100px;
  height: 100px;
  object-fit: contain;
  border-radius: var(--radius-md);
  filter: drop-shadow(0 8px 24px rgba(255, 140, 0, 0.55));
  position: relative;
  z-index: 2;
}

.glow-pulse {
  animation: pulseGlow 3s ease-in-out infinite;
}

@keyframes pulseGlow {
  0%, 100% {
    transform: scale(1);
    filter: drop-shadow(0 6px 20px rgba(255, 140, 0, 0.5));
  }
  50% {
    transform: scale(1.04);
    filter: drop-shadow(0 10px 30px rgba(255, 160, 30, 0.8));
  }
}

.hero-halo {
  position: absolute;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 120, 0, 0.25) 0%, transparent 65%);
  z-index: 1;
}

.hero-title {
  font-size: 1.85rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  line-height: 1.1;
  margin-bottom: 6px;
  background: linear-gradient(135deg, #ffffff 30%, #ffd8a8 70%, #ff7300 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 2px 14px rgba(255, 94, 0, 0.3);
}

.hero-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* CTA Primary Button with Sporty Glowing Gradient */
.btn-primary {
  width: 100%;
  max-width: 320px;
  height: 52px;
  background: linear-gradient(135deg, #ff7a18 0%, #ff4b00 50%, #e63900 100%);
  border: none;
  border-radius: var(--radius-full);
  color: #ffffff;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-btn);
  transition: all var(--transition-normal);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-btn-hover);
}

.btn-primary:active {
  transform: translateY(1px) scale(0.98);
}

.btn-glow {
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: btnShimmer 3.2s infinite;
}

@keyframes btnShimmer {
  0% { left: -100%; }
  40%, 100% { left: 100%; }
}

.btn-svg-icon {
  width: 22px;
  height: 22px;
}

/* Secondary Button */
.btn-secondary {
  height: 44px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--panel-border-bright);
  border-radius: var(--radius-full);
  color: #ffffff;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

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

.btn-secondary:active {
  transform: scale(0.97);
}

.btn-secondary svg {
  width: 18px;
  height: 18px;
}

/* Menu Grid */
.menu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 18px;
}

.menu-card {
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  position: relative;
  cursor: pointer;
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
}

.menu-card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.menu-card-icon svg {
  width: 24px;
  height: 24px;
}

.levels-icon-bg {
  background: linear-gradient(135deg, rgba(0, 210, 255, 0.25), rgba(0, 110, 255, 0.15));
  color: var(--secondary-cyan);
  border: 1px solid rgba(0, 210, 255, 0.4);
}

.shop-icon-bg {
  background: linear-gradient(135deg, rgba(255, 94, 0, 0.25), rgba(255, 40, 0, 0.15));
  color: var(--primary-orange);
  border: 1px solid rgba(255, 94, 0, 0.4);
}

.achievements-icon-bg {
  background: linear-gradient(135deg, rgba(255, 190, 11, 0.25), rgba(255, 120, 0, 0.15));
  color: var(--accent-gold);
  border: 1px solid rgba(255, 190, 11, 0.4);
}

.how-icon-bg {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.25), rgba(99, 102, 241, 0.15));
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.4);
}

.menu-card-title {
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.2;
}

.menu-card-desc {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 3px;
  font-weight: 500;
}

.menu-card-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-muted);
}

.skin-badge {
  color: var(--primary-orange-light);
  border-color: rgba(255, 94, 0, 0.3);
}

.notification-badge {
  background: var(--accent-danger);
  color: white;
  width: 20px;
  height: 20px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  border: none;
  animation: pulseBadge 1.8s infinite;
}

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

/* Statistics Panel */
.stats-panel {
  padding: 18px;
  margin-bottom: 24px;
}

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

.panel-title {
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.panel-tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--accent-emerald);
  background: rgba(0, 240, 118, 0.12);
  border: 1px solid rgba(0, 240, 118, 0.3);
  padding: 2px 7px;
  border-radius: var(--radius-full);
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.stat-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-family: var(--font-mono);
  font-size: 1.45rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.1;
  background: linear-gradient(135deg, #ffffff 40%, #fed7aa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 4px;
}

/* ==========================================================================
   2. LEVELS SCREEN
   ========================================================================== */

.screen-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  margin-bottom: 16px;
}

.btn-back {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: var(--text-main);
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: transform var(--transition-fast);
}

.btn-back:active {
  transform: scale(0.94);
}

.btn-back svg {
  width: 18px;
  height: 18px;
}

.screen-title {
  font-size: 1.1rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  background: linear-gradient(135deg, #ffffff 50%, #fed7aa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.levels-summary-pill {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--secondary-cyan);
  background: rgba(0, 210, 255, 0.1);
  border: 1px solid rgba(0, 210, 255, 0.3);
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.levels-container {
  width: 100%;
  padding-bottom: 40px;
  overflow: visible;
}

.levels-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}

.level-card {
  aspect-ratio: 1 / 1;
  background: rgba(13, 23, 48, 0.6);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: all var(--transition-normal);
}

.level-card.unlocked {
  background: rgba(16, 30, 60, 0.75);
  border-color: rgba(255, 255, 255, 0.2);
}

.level-card.unlocked:hover, .level-card.unlocked:active {
  transform: translateY(-2px);
  border-color: var(--primary-orange);
  box-shadow: 0 4px 16px rgba(255, 94, 0, 0.3);
}

.level-card.active-play {
  border-color: var(--primary-orange);
  background: linear-gradient(135deg, rgba(255, 94, 0, 0.25), rgba(16, 30, 60, 0.9));
  box-shadow: 0 0 16px rgba(255, 94, 0, 0.5);
  animation: pulseCard 2s infinite;
}

@keyframes pulseCard {
  0%, 100% { box-shadow: 0 0 10px rgba(255, 94, 0, 0.4); }
  50% { box-shadow: 0 0 20px rgba(255, 94, 0, 0.8); }
}

.level-card.locked {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(0.6);
}

.level-num {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 4px;
}

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

.star-mini {
  font-size: 0.65rem;
  color: #334155;
}

.star-mini.earned {
  color: var(--accent-gold);
  filter: drop-shadow(0 0 3px var(--accent-gold-glow));
}

.lock-mini-icon {
  width: 16px;
  height: 16px;
  color: var(--text-dim);
}

/* ==========================================================================
   3. GAMEPLAY SCREEN & ARENA
   ========================================================================== */

#screen-game {
  padding: 10px 14px;
  justify-content: space-between;
}

.game-hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  margin-bottom: 8px;
}

.icon-hud-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--panel-border);
  color: var(--text-main);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform var(--transition-fast);
}

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

.icon-hud-btn svg {
  width: 18px;
  height: 18px;
}

.hud-center-info {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hud-level-label {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #ffffff;
}

.hud-stars-display {
  display: flex;
  gap: 4px;
  margin-top: 2px;
}

.hud-star {
  font-size: 0.85rem;
  color: #334155;
  transition: all var(--transition-fast);
}

.hud-star.active {
  color: var(--accent-gold);
  filter: drop-shadow(0 0 6px var(--accent-gold));
  transform: scale(1.15);
}

.hud-shots-container {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.hud-shots-label {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 3px;
}

.hud-shots-balls {
  display: flex;
  gap: 5px;
}

.hud-ball-token {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff7a18, #ff3700);
  box-shadow: 0 0 6px rgba(255, 94, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.5);
  transition: all var(--transition-fast);
}

.hud-ball-token.spent {
  background: rgba(255, 255, 255, 0.1);
  box-shadow: none;
  border-color: rgba(255, 255, 255, 0.2);
}

/* Score & Combo Ticker Bar */
.game-ticker-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
  margin-bottom: 6px;
  min-height: 24px;
}

.ticker-score {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--secondary-cyan);
}

.ticker-combo {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--accent-gold);
  background: rgba(255, 190, 11, 0.15);
  padding: 2px 10px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 190, 11, 0.4);
  animation: bounceIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes bounceIn {
  0% { transform: scale(0.6); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.combo-flame {
  font-size: 0.9rem;
}

/* Game Canvas & Arena */
.game-canvas-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 420 / 540;
  max-height: calc(100vh - 200px);
  background: rgba(5, 10, 24, 0.92);
  border: 2px solid rgba(0, 210, 255, 0.3);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6), inset 0 0 25px rgba(0, 210, 255, 0.1);
  touch-action: none;
  margin: 0 auto;
}

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

.aim-hint-overlay {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
  opacity: 0.75;
  transition: opacity 0.3s;
}

.aim-hint-overlay.hidden {
  opacity: 0;
}

.aim-hint-pulse {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px dashed rgba(255, 255, 255, 0.5);
  margin-bottom: 6px;
  animation: aimPulse 2s infinite ease-out;
}

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

.aim-hint-overlay span {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.7);
  text-shadow: 0 1px 4px black;
}

/* Game Bottom Bar */
.game-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  padding: 0 4px;
}

.restart-btn {
  height: 38px;
  padding: 0 16px;
  font-size: 0.85rem;
}

.targets-remaining-chip {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
  background: rgba(13, 23, 48, 0.6);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--panel-border);
}

.targets-remaining-chip strong {
  color: var(--accent-emerald);
  font-size: 1rem;
}

/* ==========================================================================
   4. ACHIEVEMENTS SCREEN
   ========================================================================== */

.achievements-list-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 30px;
}

.achievement-card {
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
}

.achieve-icon-box {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-md);
  background: rgba(255, 190, 11, 0.12);
  border: 1px solid rgba(255, 190, 11, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.achieve-icon-box.completed {
  background: linear-gradient(135deg, rgba(255, 190, 11, 0.35), rgba(255, 120, 0, 0.2));
  box-shadow: 0 0 14px rgba(255, 190, 11, 0.3);
}

.achieve-details {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.achieve-name {
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.2;
}

.achieve-desc {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.achieve-progress-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.achieve-progress-bar {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.achieve-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--secondary-cyan), var(--accent-emerald));
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
}

.achieve-progress-text {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 700;
}

.achieve-action-area {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.achieve-reward-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 800;
  color: #ffda79;
}

.btn-claim {
  padding: 6px 14px;
  background: linear-gradient(135deg, #ff7a18, #ff3b00);
  border: none;
  border-radius: var(--radius-full);
  color: white;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(255, 94, 0, 0.4);
  transition: transform var(--transition-fast);
}

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

.btn-claim.claimed {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-dim);
  cursor: default;
  box-shadow: none;
}

/* ==========================================================================
   5. SKINS SHOP SCREEN
   ========================================================================== */

.shop-grid-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding-bottom: 30px;
}

.skin-card {
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
}

.skin-preview-sphere {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  margin-bottom: 12px;
  position: relative;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4);
}

.skin-name {
  font-size: 0.95rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.skin-trail-desc {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  min-height: 28px;
}

.skin-btn {
  width: 100%;
  height: 38px;
  font-size: 0.8rem;
  font-weight: 800;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.skin-btn.btn-equipped {
  background: rgba(0, 240, 118, 0.15);
  border: 1px solid rgba(0, 240, 118, 0.4);
  color: var(--accent-emerald);
  cursor: default;
}

.skin-btn.btn-equip {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.skin-btn.btn-equip:hover {
  background: rgba(255, 255, 255, 0.2);
}

.skin-btn.btn-buy {
  background: linear-gradient(135deg, #ff7a18, #ff3b00);
  color: white;
  box-shadow: 0 2px 10px rgba(255, 94, 0, 0.35);
}

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

/* ==========================================================================
   MODALS & OVERLAYS
   ========================================================================== */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3, 7, 18, 0.42);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 14px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  animation: modalFadeIn 0.25s ease forwards;
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-glass-card {
  width: 100%;
  max-width: 420px;
  max-height: calc(100dvh - 24px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  margin: auto;
  background: rgba(9, 16, 38, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius-xl);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.65), 0 0 25px rgba(255, 94, 0, 0.25);
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  animation: modalZoomIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes modalZoomIn {
  from { transform: scale(0.88); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-title {
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
}

.modal-buttons-column {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.modal-btn {
  width: 100%;
  height: 48px;
}

/* Welcome Modal */
.welcome-modal-card {
  padding: 14px 14px 16px;
  max-height: 92dvh;
  box-sizing: border-box;
}

.welcome-header {
  margin-bottom: 8px;
}

.welcome-logo-badge {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  margin-bottom: 4px;
  filter: drop-shadow(0 4px 14px rgba(255, 140, 0, 0.55));
  object-fit: cover;
}

.welcome-title {
  font-size: 1.12rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  color: #ffffff;
  line-height: 1.15;
}

.welcome-desc {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.welcome-steps-carousel {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  margin-bottom: 10px;
  flex-shrink: 1;
}

.welcome-step-card {
  padding: 7px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  position: relative;
  border-radius: var(--radius-md);
  background: rgba(14, 25, 52, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.welcome-step-icon {
  font-size: 1.3rem;
  line-height: 1;
  flex-shrink: 0;
}

.welcome-step-content {
  flex: 1;
  min-width: 0;
}

.step-num-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--primary-orange);
  background: rgba(255, 94, 0, 0.15);
  border: 1px solid rgba(255, 94, 0, 0.3);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step-title {
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: #ffffff;
  line-height: 1.2;
}

.step-body {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 1px;
  line-height: 1.2;
}

.welcome-continue-btn {
  width: 100% !important;
  min-height: 50px !important;
  height: 50px !important;
  font-size: 1.1rem !important;
  font-weight: 900 !important;
  letter-spacing: 0.06em !important;
  background: linear-gradient(135deg, #ff7a18 0%, #ff4b00 50%, #e63900 100%) !important;
  box-shadow: 0 4px 22px rgba(255, 94, 0, 0.75) !important;
  border-radius: var(--radius-full) !important;
  color: white !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  cursor: pointer !important;
  border: none !important;
  flex-shrink: 0 !important;
  margin-top: 4px !important;
  position: relative !important;
  z-index: 20 !important;
  visibility: visible !important;
  opacity: 1 !important;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.welcome-continue-btn:active {
  transform: scale(0.97);
}

.welcome-continue-btn svg {
  width: 22px;
  height: 22px;
}

/* Pause Modal */
.modal-stats-row {
  display: flex;
  gap: 20px;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.modal-stats-row strong {
  color: #ffffff;
}

/* Victory Modal */
.victory-trophy-banner {
  margin-bottom: 10px;
}

.victory-trophy-img {
  width: 80px;
  height: 80px;
  object-fit: contain;
}

.victory-title {
  font-size: 1.6rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  background: linear-gradient(135deg, #ffffff 40%, #ffd8a8 70%, #ff5e00 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 6px;
}

.victory-stars-row {
  display: flex;
  gap: 12px;
  font-size: 2.4rem;
  color: #334155;
  margin-bottom: 16px;
}

.win-star.earned {
  color: var(--accent-gold);
  filter: drop-shadow(0 0 12px var(--accent-gold));
  animation: starPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes starPop {
  0% { transform: scale(0.2); opacity: 0; }
  70% { transform: scale(1.3); }
  100% { transform: scale(1); opacity: 1; }
}

.victory-score-breakdown {
  width: 100%;
  padding: 14px;
  border-radius: var(--radius-md);
  margin-bottom: 6px;
}

.breakdown-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-family: var(--font-mono);
}

.breakdown-row.total-row {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 8px;
  margin-top: 8px;
  font-size: 0.95rem;
  font-weight: 800;
  color: #ffffff;
}

.coins-reward-row {
  color: #ffda79;
  font-weight: 800;
  font-size: 0.95rem;
  margin-top: 4px;
}

/* Defeat Modal */
.defeat-icon-wrapper {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: rgba(255, 51, 102, 0.15);
  border: 1px solid rgba(255, 51, 102, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.defeat-svg-icon {
  width: 36px;
  height: 36px;
  color: var(--accent-danger);
}

.defeat-title {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--accent-danger);
  margin-bottom: 6px;
}

.defeat-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 12px;
}

/* Toast Notifications */
.toast-popup {
  position: fixed;
  top: 76px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(13, 24, 50, 0.92);
  border: 1px solid var(--accent-gold);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 16px var(--accent-gold-glow);
  padding: 10px 20px;
  border-radius: var(--radius-full);
  z-index: 200;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 800;
  color: #ffffff;
  pointer-events: none;
  animation: toastSlideDown 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes toastSlideDown {
  from { transform: translate(-50%, -20px); opacity: 0; }
  to { transform: translate(-50%, 0); opacity: 1; }
}

/* Utility Hidden */
.hidden {
  display: none !important;
}

/* Responsive fine-tuning for smaller mobile screens */
@media (max-height: 680px) {
  #global-header {
    height: 56px;
  }
  .home-hero-card {
    padding: 16px 14px;
    margin-bottom: 12px;
  }
  .hero-trophy-wrapper {
    width: 80px;
    height: 80px;
    margin-bottom: 8px;
  }
  .hero-trophy-img {
    width: 72px;
    height: 72px;
  }
  .hero-title {
    font-size: 1.5rem;
  }
  .game-canvas-wrapper {
    aspect-ratio: 420 / 500;
  }
}
