/* =========================================================
   PARKING MASTER — ENHANCED EDITION
   Main Styling & Glassmorphic UI System
   ========================================================= */

:root {
  --bg-dark: #07090e;
  --bg-panel: rgba(13, 17, 26, 0.85);
  --bg-panel-solid: #0d111a;
  --bg-card: rgba(22, 29, 44, 0.75);
  --bg-card-hover: rgba(33, 44, 66, 0.85);
  --border-subtle: rgba(255, 255, 255, 0.1);
  --border-highlight: rgba(255, 255, 255, 0.2);
  --border-gold: rgba(245, 166, 35, 0.6);
  --border-neon: rgba(46, 213, 115, 0.8);
  
  --primary-gold: #f5a623;
  --primary-gold-gradient: linear-gradient(135deg, #ffb300, #f57c00);
  --primary-amber: #ffa502;
  --accent-neon-green: #2ed573;
  --accent-cyan: #00d2d3;
  --accent-blue: #1e90ff;
  --accent-purple: #9b59b6;
  --accent-red: #ff4757;
  
  --text-main: #f1f2f6;
  --text-muted: #8395a7;
  --text-dark: #2f3542;
  
  --font-main: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-tech: 'Rajdhani', 'Outfit', -apple-system, sans-serif;
  --font-emoji: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', 'Segoe UI Symbol', sans-serif;
  
  --glass-blur: blur(16px);
  --box-shadow-card: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 1px 1px rgba(255, 255, 255, 0.08);
  --box-shadow-gold: 0 0 25px rgba(245, 166, 35, 0.35);
  --box-shadow-green: 0 0 25px rgba(46, 213, 115, 0.4);
  --transition-fast: 0.18s cubic-bezier(0.25, 1, 0.5, 1);
  --transition-normal: 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Universal Sleek Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(10, 14, 24, 0.6);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(0, 210, 211, 0.6), rgba(9, 132, 227, 0.7));
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-cyan);
}
.custom-tabs::-webkit-scrollbar,
.no-scrollbar::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}
.custom-tabs, .no-scrollbar {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

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

.hidden {
  display: none !important;
}

html, body {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-main);
  font-size: 14px;
}

/* Main Wrapper */
#game-app {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

/* 3D Canvas */
#canvas-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  background: radial-gradient(circle at 50% 30%, #151d2f 0%, #060911 100%);
}

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

/* =========================================================
   Top Portal Header (browsersgames.pk)
   ========================================================= */
#site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 28px;
  background: rgba(4, 6, 10, 0.9);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 50;
  font-size: 11px;
  letter-spacing: 1px;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #ffb300;
  text-decoration: none;
  font-weight: 700;
  font-family: var(--font-tech);
}
.brand-link:hover {
  color: #fff;
}
.brand-dot {
  width: 6px;
  height: 6px;
  background: var(--accent-neon-green);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--accent-neon-green);
}
.game-tag {
  color: var(--text-muted);
  font-size: 10px;
}
.icon-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
}
.icon-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

/* =========================================================
   Top Global Game Status Bar
   ========================================================= */
#top-status-bar {
  position: absolute;
  top: 36px;
  left: 20px;
  right: 20px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 40;
  pointer-events: auto;
}

.logo-box {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.logo-title {
  font-family: var(--font-tech);
  font-size: 22px;
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: 2px;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}
.logo-sub {
  color: var(--primary-amber);
}
.logo-badge {
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 2.5px;
  color: var(--accent-cyan);
  margin-top: 3px;
}

.player-profile-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  padding: 6px 16px;
  border-radius: 30px;
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: var(--transition-fast);
}
.player-profile-badge:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-highlight);
}
.avatar-ring {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1e90ff, #70a1ff);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  border: 2px solid rgba(255, 255, 255, 0.4);
}
.player-name {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}
.player-level-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}
.level-label {
  font-size: 11px;
  color: var(--primary-gold);
  font-weight: 800;
}
.xp-bar-bg {
  width: 70px;
  height: 5px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
  overflow: hidden;
}
.xp-bar-fill {
  height: 100%;
  background: var(--accent-cyan);
  box-shadow: 0 0 6px var(--accent-cyan);
}

.currency-group {
  display: flex;
  align-items: center;
  gap: 10px;
}
.currency-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--border-subtle);
  font-family: var(--font-tech);
  font-size: 15px;
  font-weight: 700;
}
.currency-icon {
  font-size: 16px;
}
.coins-chip .currency-value {
  color: #ffcf40;
}
.gems-chip .currency-value {
  color: #00d2d3;
}
.add-currency-btn {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  margin-left: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}
.add-currency-btn:hover {
  background: var(--primary-gold);
  color: #000;
}
.gear-btn, .wheel-btn {
  width: 36px;
  height: 36px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 50%;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}
.gear-btn:hover {
  border-color: #fff;
  transform: rotate(45deg);
}
.wheel-btn:hover {
  border-color: var(--primary-gold);
  transform: scale(1.1);
}

/* Screens */
.game-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-normal), visibility var(--transition-normal);
}
.game-screen.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Left Navigation Sidebar */
.left-nav-sidebar {
  position: absolute;
  top: 110px;
  left: 20px;
  width: 180px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 20;
}

.nav-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: rgba(16, 22, 34, 0.7);
  backdrop-filter: var(--glass-blur);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  color: var(--text-muted);
  font-family: var(--font-tech);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1.5px;
  cursor: pointer;
  text-align: left;
  transition: all var(--transition-fast);
  overflow: hidden;
}
.nav-btn::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: transparent;
  transition: var(--transition-fast);
}
.nav-btn:hover {
  color: #fff;
  background: rgba(30, 42, 64, 0.85);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateX(4px);
}
.nav-btn:hover::before {
  background: var(--primary-gold);
}

.nav-btn.primary-btn {
  background: var(--primary-gold-gradient);
  color: #000;
  font-weight: 800;
  box-shadow: var(--box-shadow-gold);
  border: none;
  font-size: 15px;
}
.nav-btn.primary-btn:hover {
  transform: translateX(6px) scale(1.02);
  color: #000;
}
.badge-notify {
  margin-left: auto;
  background: var(--accent-red);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 10px;
}

/* Bottom Featured Cards */
.bottom-featured-cards {
  position: absolute;
  bottom: 24px;
  left: 20px;
  right: 20px;
  display: flex;
  gap: 16px;
  z-index: 20;
}

.feature-card {
  flex: 1;
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--box-shadow-card);
  transition: var(--transition-fast);
  cursor: pointer;
}
.feature-card:hover {
  border-color: var(--border-highlight);
  background: var(--bg-card-hover);
  transform: translateY(-3px);
}

.card-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}
.gift-box { background: linear-gradient(135deg, #ff4757, #ff6b81); }
.challenge-box { background: linear-gradient(135deg, #f5a623, #f7b731); }
.trophy-box { background: linear-gradient(135deg, #2ed573, #1e90ff); }

.card-content { flex: 1; }
.card-title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--text-muted);
}
.card-subtitle {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  margin: 2px 0 4px 0;
}
.card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}
.reward-pill {
  font-size: 11px;
  font-weight: 700;
  color: #ffcf40;
}
.progress-pill {
  font-size: 11px;
  color: var(--text-muted);
}

.progress-bar-wrap {
  position: relative;
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 4px;
}
.progress-bar-fill {
  height: 100%;
  background: var(--primary-gold-gradient);
  border-radius: 4px;
}
.progress-text {
  position: absolute;
  right: 0;
  top: -16px;
  font-size: 10px;
  font-weight: 700;
  color: var(--primary-gold);
}

.btn-action-green {
  background: linear-gradient(135deg, #2ed573, #26af5f);
  color: #fff;
  border: none;
  font-family: var(--font-tech);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 8px 18px;
  border-radius: 6px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(46, 213, 115, 0.35);
  transition: var(--transition-fast);
}
.btn-action-green:hover {
  transform: scale(1.05);
  box-shadow: var(--box-shadow-green);
}
.btn-arrow-next {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border-subtle);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition-fast);
}
.btn-arrow-next:hover {
  background: var(--primary-gold);
  color: #000;
}

/* Modals */
.modal-screen {
  background: rgba(5, 7, 12, 0.7);
  backdrop-filter: var(--glass-blur);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
}

.screen-modal-box {
  width: 100%;
  max-width: 960px;
  height: 85vh;
  max-height: 600px;
  background: rgba(14, 19, 30, 0.92);
  border: 1px solid var(--border-highlight);
  border-radius: 16px;
  box-shadow: var(--box-shadow-card);
  display: flex;
  flex-direction: column;
  padding: 20px 24px;
  position: relative;
  overflow: hidden;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 16px;
}
.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 16px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #ffffff;
  font-family: var(--font-tech);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1px;
  cursor: pointer;
  pointer-events: auto;
  z-index: 100;
  transition: all 0.2s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  flex-shrink: 0;
}
.btn-back:hover {
  background: var(--primary-gold);
  color: #000;
  border-color: var(--primary-gold);
  box-shadow: 0 0 18px rgba(245, 166, 35, 0.6);
  transform: translateX(-3px);
}
.btn-back .back-arrow {
  font-size: 16px;
}
.modal-title {
  font-family: var(--font-tech);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 2px;
  color: #fff;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.2);
}
.modal-header-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.modal-subtag {
  font-family: var(--font-tech);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--accent-cyan);
}
.modal-header-currencies {
  display: flex;
  gap: 8px;
}

/* =========================================================
   Daily Challenge Dual-Card Grid Layout
   ========================================================= */
.daily-challenge-box {
  max-width: 980px;
  height: 82vh;
  max-height: 620px;
  background: radial-gradient(circle at 50% 0%, rgba(26, 38, 64, 0.94) 0%, rgba(10, 14, 24, 0.96) 100%);
  border: 1.5px solid rgba(0, 210, 211, 0.35);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(0, 210, 211, 0.15);
}

.challenge-main-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 20px;
  flex: 1;
  overflow-y: auto;
  padding-bottom: 6px;
}

/* Left Hero Feature Card */
.challenge-hero-card {
  background: linear-gradient(145deg, rgba(20, 28, 48, 0.75), rgba(12, 17, 30, 0.85));
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}
.challenge-hero-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #00d2d3, #ffd32a, #ff4757);
}

.challenge-hero-badge-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-bottom: 14px;
}
.badge-live-pulse {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(46, 213, 115, 0.15);
  border: 1px solid rgba(46, 213, 115, 0.4);
  color: #2ed573;
  font-family: var(--font-tech);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
  padding: 4px 10px;
  border-radius: 20px;
}
.pulse-dot {
  width: 7px;
  height: 7px;
  background: #2ed573;
  border-radius: 50%;
  box-shadow: 0 0 8px #2ed573;
  animation: pulse-glow 1.5s infinite;
}
@keyframes pulse-glow {
  0% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.7; }
}

.badge-difficulty {
  font-family: var(--font-tech);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 4px 10px;
  border-radius: 20px;
}
.badge-difficulty.hard {
  background: rgba(255, 71, 87, 0.15);
  border: 1px solid rgba(255, 71, 87, 0.4);
  color: #ff4757;
}

.challenge-hero-icon-showcase {
  margin: 8px 0 14px 0;
}
.hero-icon-ring {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #2ed573 0%, #10ac84 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  border: 3px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 0 25px rgba(46, 213, 115, 0.45), 0 8px 20px rgba(0, 0, 0, 0.6);
  animation: icon-float 3s ease-in-out infinite alternate;
}
@keyframes icon-float {
  0% { transform: translateY(0); }
  100% { transform: translateY(-6px); }
}

.challenge-hero-title {
  font-family: var(--font-tech);
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 1.5px;
  color: #ffffff;
  margin-bottom: 6px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}
.challenge-hero-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 16px;
  max-width: 320px;
}

.challenge-spec-pills {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  width: 100%;
  justify-content: center;
}
.spec-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  color: #fff;
}
.spec-pill .spec-icon { font-size: 14px; }

.challenge-timer-card {
  margin-top: auto;
  width: 100%;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 10px;
}
.timer-card-label {
  display: block;
  font-family: var(--font-tech);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: var(--primary-gold);
  margin-bottom: 4px;
}
.timer-digit-box {
  font-family: var(--font-tech);
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 3px;
  color: #ffffff;
  text-shadow: 0 0 10px var(--accent-cyan);
}

/* Right Action & Rewards Card */
.challenge-action-card {
  background: linear-gradient(145deg, rgba(20, 28, 48, 0.75), rgba(12, 17, 30, 0.85));
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}
.card-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.section-title {
  font-family: var(--font-tech);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #ffffff;
}
.section-badge {
  font-family: var(--font-tech);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.5px;
  background: rgba(245, 166, 35, 0.2);
  border: 1px solid var(--primary-gold);
  color: var(--primary-gold);
  padding: 2px 8px;
  border-radius: 4px;
}

.challenge-rewards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}
.reward-box {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: all 0.25s ease;
}
.reward-box:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
}
.reward-icon-circle {
  font-size: 22px;
  margin-bottom: 6px;
}
.reward-amount {
  display: block;
  font-family: var(--font-tech);
  font-size: 15px;
  font-weight: 900;
  color: #ffffff;
}
.gold-reward .reward-amount { color: #ffd32a; text-shadow: 0 0 8px rgba(255, 211, 42, 0.4); }
.gem-reward .reward-amount { color: #70a1ff; text-shadow: 0 0 8px rgba(112, 161, 255, 0.4); }
.xp-reward .reward-amount { color: #2ed573; text-shadow: 0 0 8px rgba(46, 213, 115, 0.4); }
.reward-label {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--text-muted);
}

.challenge-instructions-box {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 18px;
}
.instruct-title {
  font-family: var(--font-tech);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--primary-gold);
  margin-bottom: 6px;
}
.instruct-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.instruct-list li {
  font-size: 12px;
  color: #ced6e0;
  display: flex;
  align-items: center;
  gap: 6px;
}
.instruct-bullet {
  font-family: var(--font-tech);
  font-size: 10px;
  font-weight: 900;
  color: var(--accent-cyan);
}

.btn-play-challenge-hero {
  margin-top: auto;
  width: 100%;
  height: 52px;
  background: linear-gradient(135deg, #ff9f1a 0%, #eb4d4b 100%);
  border: none;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #ffffff;
  font-family: var(--font-tech);
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 2px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(235, 77, 75, 0.45);
  transition: all 0.25s ease;
}
.btn-play-challenge-hero:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 12px 30px rgba(235, 77, 75, 0.65), 0 0 20px rgba(255, 159, 26, 0.5);
  background: linear-gradient(135deg, #ffa801 0%, #ff3838 100%);
}
.btn-cta-arrow {
  font-size: 18px;
  transition: transform 0.2s ease;
}
.btn-play-challenge-hero:hover .btn-cta-arrow {
  transform: translateX(4px);
}

/* =========================================================
   Showroom Transparent Overlays for Garage, Customize & Upgrades
   ========================================================= */
#screen-garage.modal-screen,
#screen-customize.modal-screen,
#screen-upgrades.modal-screen {
  background: transparent;
  backdrop-filter: none;
  padding: 0;
  pointer-events: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
}

#screen-garage .screen-modal-box.garage-box {
  background: transparent;
  border: none;
  box-shadow: none;
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
  max-height: 100vh;
  padding: 0;
  pointer-events: none;
  position: relative;
}

#screen-garage .modal-header {
  position: absolute;
  top: 14px;
  left: 24px;
  right: 24px;
  background: rgba(13, 17, 26, 0.88);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 10px 18px;
  pointer-events: auto;
  z-index: 50;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

#screen-garage .garage-middle-split {
  position: absolute;
  top: 76px;
  left: 24px;
  right: 24px;
  bottom: 120px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  pointer-events: none;
}

#screen-garage .car-status-banner {
  background: rgba(13, 17, 26, 0.88);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 14px 20px;
  pointer-events: auto;
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.7);
  max-width: 320px;
}

#screen-garage .car-stats-panel {
  background: rgba(13, 17, 26, 0.88);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 16px 20px;
  pointer-events: auto;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.75);
  width: 360px;
}

#screen-garage .car-carousel-container {
  position: absolute;
  bottom: 14px;
  left: 24px;
  right: 24px;
  background: rgba(13, 17, 26, 0.88);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 10px 16px;
  pointer-events: auto;
  z-index: 50;
  box-shadow: 0 -4px 25px rgba(0, 0, 0, 0.7);
}

/* Floating Right-Side Drawers for Customize & Upgrades */
#screen-upgrades .screen-modal-box.upgrades-box,
#screen-customize .screen-modal-box.customize-box {
  position: absolute;
  right: 24px;
  top: 76px;
  bottom: 24px;
  width: 440px;
  max-width: calc(100vw - 48px);
  height: auto;
  max-height: none;
  background: rgba(11, 15, 25, 0.95);
  backdrop-filter: blur(24px);
  border: 1.5px solid rgba(0, 210, 211, 0.35);
  border-radius: 18px;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.9), 0 0 25px rgba(0, 210, 211, 0.12);
  display: flex;
  flex-direction: column;
  padding: 16px 18px;
  pointer-events: auto;
  overflow: hidden;
  z-index: 50;
}

#screen-upgrades .modal-header,
#screen-customize .modal-header {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

#screen-upgrades .modal-header-currencies,
#screen-customize .modal-header-currencies {
  display: none !important;
}

#screen-upgrades .upgrades-list {
  flex: 1;
  overflow-y: auto;
  padding-right: 4px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#screen-customize .custom-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 12px;
}

#screen-customize .custom-options-area {
  flex: 1;
  overflow-y: auto;
  padding-right: 4px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 12px;
}

/* Color Swatches Grid */
.paint-palette-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  padding: 8px 4px;
}
.paint-swatch {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 12px;
  cursor: pointer;
  border: 2px solid rgba(255, 255, 255, 0.15);
  transition: all 0.2s ease;
  position: relative;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}
.paint-swatch:hover {
  transform: scale(1.1);
  border-color: #fff;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.6);
}
.paint-swatch.active {
  border: 2.5px solid #00d2d3;
  transform: scale(1.12);
  box-shadow: 0 0 15px rgba(0, 210, 211, 0.7);
}
.paint-swatch.active::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  text-shadow: 0 0 4px rgba(0, 0, 0, 0.9);
}

.chapter-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  overflow-x: auto;
}
.tab-chip {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-family: var(--font-tech);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  transition: var(--transition-fast);
  white-space: nowrap;
}
.tab-chip:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}
.tab-chip.active {
  background: var(--primary-gold-gradient);
  color: #000;
  border-color: transparent;
  box-shadow: 0 0 15px rgba(245, 166, 35, 0.4);
}

.level-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-gap: 12px;
  flex: 1;
  overflow-y: auto;
  padding: 4px;
}

.level-card {
  background: rgba(20, 27, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
  position: relative;
}
.level-card:hover:not(.locked) {
  background: rgba(35, 48, 75, 0.9);
  border-color: var(--primary-gold);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}
.level-card.locked {
  opacity: 0.45;
  cursor: not-allowed;
  background: rgba(12, 16, 25, 0.5);
}
.level-card-num {
  font-family: var(--font-tech);
  font-size: 22px;
  font-weight: 800;
  color: #fff;
}
.level-card-stars {
  display: flex;
  gap: 3px;
  margin: 4px 0;
  font-size: 13px;
  color: #57606f;
}
.level-card-stars .star-active {
  color: #f5a623;
  text-shadow: 0 0 6px rgba(245, 166, 35, 0.8);
}
.level-card-meta {
  font-size: 10px;
  color: var(--text-muted);
  font-family: var(--font-tech);
}
.level-card-lock {
  font-size: 20px;
  color: var(--text-muted);
  margin-top: 4px;
}

.pagination-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  cursor: pointer;
}
.dot.active {
  width: 22px;
  border-radius: 4px;
  background: var(--primary-gold);
}

/* Garage */
.garage-middle-split {
  flex: 1;
  position: relative;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.car-status-banner {
  position: absolute;
  top: 10px;
  left: 10px;
}
.current-car-name {
  font-family: var(--font-tech);
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 2px;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}
.car-tier-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--accent-cyan);
}

.car-stats-panel {
  width: 280px;
  background: rgba(16, 22, 36, 0.85);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 16px;
  z-index: 10;
}
.stats-panel-title {
  font-family: var(--font-tech);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--primary-gold);
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 6px;
}

.stat-row { margin-bottom: 10px; }
.stat-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 3px;
}
.stat-value {
  color: #fff;
  font-family: var(--font-tech);
}
.stat-bar-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
}
.stat-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s ease;
}
.speed-fill { background: linear-gradient(90deg, #ff4757, #ff6b81); }
.accel-fill { background: linear-gradient(90deg, #ffa502, #ffc048); }
.handling-fill { background: linear-gradient(90deg, #2ed573, #7bed9f); }
.braking-fill { background: linear-gradient(90deg, #00d2d3, #70a1ff); }

.garage-action-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
}

.btn-primary-action {
  background: var(--primary-gold-gradient);
  color: #000;
  border: none;
  font-family: var(--font-tech);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 1.5px;
  padding: 10px;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(245, 166, 35, 0.35);
  transition: var(--transition-fast);
}
.btn-primary-action:hover {
  transform: scale(1.02);
  box-shadow: var(--box-shadow-gold);
}
.btn-secondary-action {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  color: #fff;
  font-family: var(--font-tech);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition-fast);
}
.btn-secondary-action:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: #fff;
}



.car-carousel-container {
  height: 96px;
  display: flex;
  align-items: center;
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 8px 6px;
  border-top: 1px solid var(--border-subtle);
  margin-top: 10px;
  scrollbar-width: thin;
  scrollbar-color: rgba(245, 166, 35, 0.5) rgba(0, 0, 0, 0.2);
}
.car-carousel-container::-webkit-scrollbar {
  height: 6px;
}
.car-carousel-container::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.25);
  border-radius: 3px;
}
.car-carousel-container::-webkit-scrollbar-thumb {
  background: rgba(245, 166, 35, 0.5);
  border-radius: 3px;
}
.car-carousel-container::-webkit-scrollbar-thumb:hover {
  background: var(--primary-gold);
}
.car-card-thumb {
  min-width: 130px;
  height: 70px;
  background: rgba(20, 27, 42, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
  padding: 6px;
  position: relative;
}
.car-card-thumb:hover {
  background: rgba(32, 43, 67, 0.9);
  border-color: rgba(255, 255, 255, 0.3);
}
.car-card-thumb.active {
  border-color: var(--primary-gold);
  background: rgba(245, 166, 35, 0.15);
  box-shadow: 0 0 12px rgba(245, 166, 35, 0.3);
}
.car-card-thumb.locked { opacity: 0.5; }
.thumb-car-icon { font-size: 22px; }
.thumb-car-name {
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  margin-top: 3px;
  font-family: var(--font-tech);
}
.thumb-lock-badge {
  font-size: 10px;
  color: var(--primary-gold);
}

/* Customizer */
.custom-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.custom-tab {
  flex: 1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-family: var(--font-tech);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition-fast);
}
.custom-tab:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}
.custom-tab.active {
  background: var(--primary-gold-gradient);
  color: #000;
  border-color: transparent;
  font-weight: 800;
}

.custom-options-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-bottom: 12px;
}
.color-swatches-grid {
  display: flex;
  align-items: center;
  gap: 12px;
  overflow-x: auto;
  padding: 10px 4px;
}
.color-swatch {
  width: 46px;
  height: 46px;
  border-radius: 8px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: #fff;
  transition: var(--transition-fast);
}
.color-swatch:hover {
  transform: scale(1.1);
  border-color: #fff;
}
.color-swatch.active {
  border-color: #fff;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.6);
  transform: scale(1.15);
}

/* Customizer Option Grids & Cards */
.custom-list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
  overflow-y: auto;
  max-height: 280px;
  padding: 6px 2px;
}

.option-card-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 12px 14px;
  cursor: pointer;
  transition: var(--transition-fast);
}
.option-card-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--primary-gold);
}
.option-card-btn.active {
  background: rgba(245, 166, 35, 0.15);
  border-color: var(--primary-gold);
  box-shadow: 0 0 12px rgba(245, 166, 35, 0.35);
}
.option-title {
  font-family: var(--font-tech);
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 2px;
}
.option-desc {
  font-size: 11px;
  color: var(--text-muted);
}
.section-sub-title {
  font-family: var(--font-tech);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--primary-gold);
  margin-bottom: 8px;
}

/* Vanity License Plate Styling */
.plate-customizer-box {
  padding: 10px 4px;
}
.vanity-plate-card {
  display: inline-block;
  min-width: 220px;
  height: 90px;
  border-radius: 8px;
  border: 3px solid #fff;
  padding: 8px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.6);
  text-align: center;
}
.vanity-plate-card.california {
  background: #111116;
  border-color: #333;
  color: #e5b124;
}
.vanity-plate-card.california .plate-state {
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
  color: #e5b124;
}
.vanity-plate-card.california .plate-letters {
  font-family: var(--font-tech);
  font-size: 34px;
  font-weight: 900;
  letter-spacing: 4px;
  color: #e5b124;
}
.vanity-plate-card.neon {
  background: #0a101d;
  border-color: #00d2d3;
  color: #00d2d3;
  box-shadow: 0 0 20px rgba(0, 210, 211, 0.4);
}
.vanity-plate-card.neon .plate-state {
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
  color: #00d2d3;
}
.vanity-plate-card.neon .plate-letters {
  font-family: var(--font-tech);
  font-size: 34px;
  font-weight: 900;
  letter-spacing: 4px;
  color: #00d2d3;
  text-shadow: 0 0 10px rgba(0, 210, 211, 0.8);
}
.vanity-plate-card.euro {
  background: #ffffff;
  border-color: #1e3799;
  color: #111;
}
.vanity-plate-card.euro .plate-state {
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
  color: #1e3799;
}
.vanity-plate-card.euro .plate-letters {
  font-family: var(--font-tech);
  font-size: 34px;
  font-weight: 900;
  letter-spacing: 4px;
  color: #111;
}
.vanity-plate-card.gold {
  background: #1b1404;
  border-color: #d4af37;
  color: #d4af37;
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
}
.vanity-plate-card.gold .plate-state {
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
  color: #d4af37;
}
.vanity-plate-card.gold .plate-letters {
  font-family: var(--font-tech);
  font-size: 34px;
  font-weight: 900;
  letter-spacing: 4px;
  color: #d4af37;
  text-shadow: 0 0 10px rgba(212, 175, 55, 0.8);
}
.vanity-plate-card.tokyo {
  background: #f5f6fa;
  border-color: #2f3640;
  color: #192a56;
}
.vanity-plate-card.tokyo .plate-state {
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
  color: #2f3640;
}
.vanity-plate-card.tokyo .plate-letters {
  font-family: var(--font-tech);
  font-size: 34px;
  font-weight: 900;
  letter-spacing: 4px;
  color: #192a56;
}
.vanity-plate-card.carbon {
  background: #121418;
  border-color: #353b48;
  color: #dcdde1;
  box-shadow: 0 0 16px rgba(0, 0, 0, 0.7);
}
.vanity-plate-card.carbon .plate-state {
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
  color: #718093;
}
.vanity-plate-card.carbon .plate-letters {
  font-family: var(--font-tech);
  font-size: 34px;
  font-weight: 900;
  letter-spacing: 4px;
  color: #f5f6fa;
}
.plate-text-field {
  flex: 1;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  color: #fff;
  font-family: var(--font-tech);
  font-size: 16px;
  font-weight: 700;
  padding: 8px 14px;
  text-transform: uppercase;
}
.plate-text-field:focus {
  outline: none;
  border-color: var(--primary-gold);
  box-shadow: 0 0 10px rgba(245, 166, 35, 0.3);
}

/* Upgrades */
.upgrades-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
}
.upgrade-item-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.upgrade-info {
  display: flex;
  align-items: center;
  gap: 14px;
}
.upgrade-icon-box {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}
.upgrade-title {
  font-family: var(--font-tech);
  font-size: 15px;
  font-weight: 800;
  color: #fff;
}
.upgrade-desc {
  font-size: 11px;
  color: var(--text-muted);
}
.upgrade-pips-row {
  display: flex;
  gap: 4px;
  margin-top: 4px;
}
.upgrade-pip {
  width: 14px;
  height: 6px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
}
.upgrade-pip.filled {
  background: var(--accent-neon-green);
  box-shadow: 0 0 6px var(--accent-neon-green);
}
.btn-buy-upgrade {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  color: #ffcf40;
  font-family: var(--font-tech);
  font-size: 14px;
  font-weight: 800;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition-fast);
}
.btn-buy-upgrade:hover:not(:disabled) {
  background: var(--primary-gold);
  color: #000;
}
.btn-buy-upgrade:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Lucky Wheel Modal */
.wheel-modal-card {
  max-width: 400px;
  text-align: center;
}
.wheel-canvas-container {
  display: flex;
  justify-content: center;
  margin: 16px 0;
}
.wheel-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Settings */
.settings-box {
  max-width: 840px;
  height: 85vh;
  max-height: 640px;
  background: radial-gradient(circle at 50% 0%, rgba(24, 34, 56, 0.96) 0%, rgba(8, 12, 22, 0.98) 100%);
  border: 1.5px solid rgba(0, 210, 211, 0.35);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85), 0 0 35px rgba(0, 210, 211, 0.12);
  display: flex;
  flex-direction: column;
}

.settings-scroll-area {
  overflow-y: auto;
  padding-right: 6px;
  flex: 1;
}
.settings-group {
  background: rgba(20, 28, 48, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 14px;
}
.settings-group-title {
  font-family: var(--font-tech);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--primary-gold);
  margin-bottom: 12px;
}
.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.setting-row:last-child {
  border-bottom: none;
}
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}
.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.2);
  transition: .3s;
  border-radius: 24px;
}
.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}
input:checked + .slider { background-color: var(--accent-neon-green); }
input:checked + .slider:before { transform: translateX(20px); }
.slider-range { width: 140px; accent-color: var(--primary-gold); }
.select-field {
  background: #151d2f;
  color: #fff;
  border: 1px solid var(--border-subtle);
  padding: 6px 12px;
  border-radius: 6px;
  font-family: var(--font-main);
  outline: none;
}

.controls-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-gap: 8px;
}
.control-key-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}
.key-badge {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-tech);
  font-weight: 700;
  color: var(--primary-gold);
}

.settings-hint {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 10px;
  line-height: 1.4;
}
.save-mgmt-group {
  border-color: rgba(0, 210, 211, 0.3);
  background: rgba(0, 210, 211, 0.05);
}
.save-actions-row {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}
.save-actions-row .btn-secondary-action {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 14px;
  font-size: 12px;
}
.save-status-badge {
  margin-top: 10px;
  padding: 8px 12px;
  background: rgba(46, 213, 115, 0.15);
  border: 1px solid var(--accent-neon-green);
  color: var(--accent-neon-green);
  border-radius: 6px;
  font-size: 12px;
  font-family: var(--font-tech);
  font-weight: 700;
  text-align: center;
}
.text-danger {
  color: var(--accent-red) !important;
}

.danger-group { border-color: rgba(255, 71, 87, 0.3); text-align: center; }
.danger-group .settings-hint { margin-bottom: 12px; }
.btn-danger {
  background: rgba(255, 71, 87, 0.2);
  border: 1px solid var(--accent-red);
  color: var(--accent-red);
  font-family: var(--font-tech);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition-fast);
}
.btn-danger:hover { background: var(--accent-red); color: #fff; }

.btn-danger-outline {
  background: transparent;
  border: 1px solid rgba(255, 71, 87, 0.5);
  color: var(--accent-red);
  font-family: var(--font-tech);
  font-size: 13px;
  font-weight: 800;
  padding: 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition-fast);
}
.btn-danger-outline:hover { background: var(--accent-red); color: #fff; }

/* =========================================================
   Missions & Achievements Modern 2-Column Responsive Grid
   ========================================================= */
.achievements-box, .missions-box {
  max-width: 1040px;
  height: 88vh;
  max-height: 680px;
  background: radial-gradient(circle at 50% 0%, rgba(24, 34, 56, 0.98) 0%, rgba(8, 12, 22, 0.99) 100%);
  border: 1.5px solid rgba(0, 210, 211, 0.35);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85), 0 0 35px rgba(0, 210, 211, 0.12);
  display: flex;
  flex-direction: column;
}

/* Achievements Top Hero Banner */
.achievements-top-banner {
  background: linear-gradient(135deg, rgba(30, 42, 70, 0.85), rgba(16, 24, 40, 0.95));
  border: 1px solid rgba(255, 211, 42, 0.35);
  border-radius: 14px;
  padding: 12px 18px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  flex-shrink: 0;
}
.achieve-banner-left {
  display: flex;
  align-items: center;
  gap: 14px;
}
.achieve-trophy-circle {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffd32a 0%, #d48806 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 15px rgba(255, 211, 42, 0.4);
}
.achieve-banner-title {
  font-family: var(--font-main);
  font-size: 14px;
  font-weight: 800;
  color: #ffd32a;
  letter-spacing: 0.5px;
}
.achieve-banner-sub {
  font-family: var(--font-main);
  font-size: 11.5px;
  color: #94a3b8;
  margin-top: 2px;
}
.achieve-banner-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  min-width: 220px;
}
.achieve-progress-bar-wrap {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  overflow: hidden;
}
.achieve-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #ffd32a, #ff9f1a);
  box-shadow: 0 0 10px #ffd32a;
  transition: width 0.4s ease;
}
.achieve-stat-text {
  font-family: var(--font-main);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #ffffff;
}

/* Achievements 2-Column Responsive Grid */
.achievements-grid-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 4px 8px 16px 2px;
  flex: 1;
  min-height: 0;
}

.achievement-grid-card {
  min-height: 92px;
  height: auto;
  background: linear-gradient(145deg, rgba(22, 32, 54, 0.88), rgba(12, 18, 30, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
  flex-shrink: 0;
}
.achievement-grid-card:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 210, 211, 0.5);
  background: linear-gradient(145deg, rgba(28, 42, 70, 0.92), rgba(16, 24, 40, 0.98));
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 15px rgba(0, 210, 211, 0.15);
}
.achievement-grid-card.unlocked {
  border-color: rgba(46, 213, 115, 0.4);
  background: linear-gradient(145deg, rgba(18, 40, 30, 0.8), rgba(10, 22, 18, 0.9));
}
.achievement-grid-card.unlocked::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 3.5px;
  background: #2ed573;
}

.achieve-card-icon-box {
  width: 48px;
  min-width: 48px;
  max-width: 48px;
  height: 48px;
  min-height: 48px;
  max-height: 48px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  overflow: visible;
}
.achieve-icon {
  font-family: var(--font-emoji), var(--font-main);
  font-size: 24px;
  line-height: 1;
}
.achieve-check-dot {
  position: absolute;
  bottom: -4px;
  right: -4px;
  width: 18px;
  height: 18px;
  background: #2ed573;
  color: #000;
  font-size: 11px;
  font-weight: 900;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #0a101d;
}

.achieve-card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.achieve-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 2px;
}
.achieve-card-title {
  font-family: var(--font-main);
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.badge-achieve-unlocked {
  font-family: var(--font-main);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #2ed573;
  background: rgba(46, 213, 115, 0.16);
  border: 1px solid rgba(46, 213, 115, 0.45);
  padding: 3px 8px;
  border-radius: 6px;
  white-space: nowrap;
}
.badge-achieve-reward {
  font-family: var(--font-main);
  font-size: 11px;
  font-weight: 700;
  color: #ffd32a;
  background: rgba(255, 211, 42, 0.12);
  border: 1px solid rgba(255, 211, 42, 0.35);
  padding: 3px 8px;
  border-radius: 6px;
  white-space: nowrap;
}
.achieve-card-desc {
  font-family: var(--font-main);
  font-size: 11.5px;
  color: #94a3b8;
  line-height: 1.35;
  margin: 3px 0 6px 0;
}
.achieve-card-footer {
  margin-top: auto;
}
.achieve-status-tag {
  font-family: var(--font-main);
  font-size: 10.5px;
  font-weight: 700;
}
.tag-complete { color: #2ed573; }
.tag-pending { color: #64748b; }

/* Missions Top Banner & 2-Column Grid */
.missions-top-banner {
  background: linear-gradient(135deg, rgba(20, 36, 60, 0.85), rgba(12, 20, 36, 0.95));
  border: 1px solid rgba(0, 210, 211, 0.35);
  border-radius: 14px;
  padding: 12px 18px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  flex-shrink: 0;
}
.missions-banner-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.missions-banner-title {
  font-family: var(--font-tech);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #ffffff;
}
.missions-banner-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.missions-reset-label {
  font-family: var(--font-tech);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--primary-gold);
}
.missions-reset-timer {
  font-family: var(--font-tech);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 1.5px;
  color: var(--accent-cyan);
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(0, 210, 211, 0.3);
  padding: 3px 8px;
  border-radius: 6px;
}

.missions-category-tabs {
  margin-bottom: 14px;
}

.missions-grid-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 4px 8px 16px 2px;
  flex: 1;
  min-height: 0;
}

.mission-grid-card {
  min-height: 92px;
  height: auto;
  background: linear-gradient(145deg, rgba(22, 32, 54, 0.88), rgba(12, 18, 30, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  box-sizing: border-box;
  flex-shrink: 0;
}
.mission-grid-card:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 210, 211, 0.5);
  background: linear-gradient(145deg, rgba(28, 42, 70, 0.92), rgba(16, 24, 40, 0.98));
}
.mission-grid-card.completed {
  border-color: rgba(46, 213, 115, 0.45);
  background: linear-gradient(145deg, rgba(18, 40, 30, 0.8), rgba(10, 22, 18, 0.9));
}

.mission-card-icon-box {
  width: 48px;
  min-width: 48px;
  max-width: 48px;
  height: 48px;
  min-height: 48px;
  max-height: 48px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-emoji), var(--font-main);
  font-size: 24px;
  flex-shrink: 0;
}
.mission-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.mission-card-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.mission-card-top-row .mission-title {
  font-family: var(--font-main);
  font-size: 13.5px;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mission-progress-label {
  font-family: var(--font-main);
  font-size: 11px;
  font-weight: 800;
  color: var(--accent-cyan);
}

.mission-prog-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 3px;
  overflow: hidden;
}
.mission-prog-fill {
  height: 100%;
  background: linear-gradient(90deg, #00d2d3, #2ed573);
  box-shadow: 0 0 8px #00d2d3;
  transition: width 0.3s ease;
}

.mission-card-bottom-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 4px;
}
.mission-rewards-chips {
  display: flex;
  align-items: center;
  gap: 6px;
}
.reward-pill {
  font-family: var(--font-main);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
}
.reward-pill.gold {
  color: #ffd32a;
  background: rgba(255, 211, 42, 0.12);
  border: 1px solid rgba(255, 211, 42, 0.35);
}
.reward-pill.gem {
  color: #00d2d3;
  background: rgba(0, 210, 211, 0.12);
  border: 1px solid rgba(0, 210, 211, 0.35);
}

.mission-action-area {
  display: flex;
  align-items: center;
}

.btn-claim-mission {
  background: linear-gradient(135deg, #2ed573, #10ac84);
  color: #03140a;
  font-family: var(--font-main);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  padding: 5px 12px;
  cursor: pointer;
  box-shadow: 0 0 15px rgba(46, 213, 115, 0.45);
  transition: all 0.2s ease;
  animation: pulse-claim 1.5s infinite alternate ease-in-out;
}
.btn-claim-mission:hover {
  transform: scale(1.06);
  box-shadow: 0 0 22px rgba(46, 213, 115, 0.75);
  background: linear-gradient(135deg, #38ef7d, #11998e);
  color: #000;
}
@keyframes pulse-claim {
  0% { transform: scale(1); box-shadow: 0 0 10px rgba(46, 213, 115, 0.4); }
  100% { transform: scale(1.04); box-shadow: 0 0 20px rgba(46, 213, 115, 0.7); }
}

.claimed-badge {
  font-family: var(--font-main);
  font-size: 10.5px;
  font-weight: 800;
  color: #2ed573;
  background: rgba(46, 213, 115, 0.15);
  border: 1px solid rgba(46, 213, 115, 0.4);
  padding: 3px 8px;
  border-radius: 6px;
}
.mission-pending-tag {
  font-family: var(--font-main);
  font-size: 10px;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 0.5px;
}

/* =========================================================
   Driver Profile & Career Dossier Screen
   ========================================================= */
.profile-box {
  max-width: 1040px;
  height: 85vh;
  max-height: 640px;
  background: radial-gradient(circle at 50% 0%, rgba(24, 34, 56, 0.96) 0%, rgba(8, 12, 22, 0.98) 100%);
  border: 1.5px solid rgba(0, 210, 211, 0.35);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85), 0 0 35px rgba(0, 210, 211, 0.12);
  display: flex;
  flex-direction: column;
}

.profile-dual-grid {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 16px;
  flex: 1;
  overflow-y: auto;
  padding-right: 4px;
}

/* Left: Driver Identity Card */
.profile-identity-card {
  background: linear-gradient(145deg, rgba(20, 28, 48, 0.8), rgba(12, 16, 28, 0.9));
  border: 1px solid rgba(0, 210, 211, 0.25);
  border-radius: 16px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.profile-avatar-row {
  display: flex;
  align-items: center;
  gap: 16px;
}
.profile-avatar-circle {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #00d2d3 0%, #0984e3 100%);
  border: 2.5px solid #ffffff;
  box-shadow: 0 0 20px rgba(0, 210, 211, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  flex-shrink: 0;
}
.profile-identity-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.profile-callsign-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}
.profile-callsign-field {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(0, 210, 211, 0.4);
  color: #ffffff;
  font-family: var(--font-tech);
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 1.5px;
  padding: 4px 10px;
  border-radius: 6px;
  outline: none;
  width: 140px;
}
.profile-callsign-field:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 10px rgba(0, 210, 211, 0.4);
}
.btn-save-callsign {
  background: #2ed573;
  color: #000;
  border: none;
  font-weight: 900;
  font-size: 13px;
  padding: 5px 9px;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition-fast);
}
.btn-save-callsign:hover { transform: scale(1.1); }
.profile-driver-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--primary-gold);
  letter-spacing: 1px;
}
.profile-level-badge {
  display: inline-flex;
  font-family: var(--font-tech);
  font-size: 11px;
  font-weight: 900;
  color: #00d2d3;
  background: rgba(0, 210, 211, 0.12);
  border: 1px solid rgba(0, 210, 211, 0.3);
  padding: 2px 8px;
  border-radius: 4px;
  width: fit-content;
}

.profile-xp-section {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 10px 12px;
}
.profile-xp-header {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-tech);
  font-size: 10px;
  font-weight: 800;
  color: #a4b0be;
  margin-bottom: 6px;
}
.profile-xp-bar-track {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
}
.profile-xp-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #00d2d3, #2ed573);
  box-shadow: 0 0 8px #00d2d3;
  transition: width 0.4s ease;
}

.profile-license-card {
  background: linear-gradient(135deg, rgba(255, 211, 42, 0.12), rgba(255, 159, 26, 0.05));
  border: 1px solid rgba(255, 211, 42, 0.35);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.license-badge-icon {
  font-size: 28px;
  flex-shrink: 0;
}
.license-tier-title {
  font-family: var(--font-tech);
  font-size: 12px;
  font-weight: 900;
  color: #ffd32a;
  letter-spacing: 1px;
}
.license-tier-desc {
  font-size: 10px;
  color: var(--text-muted);
  line-height: 1.3;
  margin-top: 2px;
}

.profile-avatar-picker {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.avatar-picker-label {
  font-family: var(--font-tech);
  font-size: 10px;
  font-weight: 800;
  color: #a4b0be;
  letter-spacing: 1px;
}
.avatar-picker-options {
  display: flex;
  gap: 8px;
}
.avatar-opt-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}
.avatar-opt-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}
.avatar-opt-btn.active {
  background: rgba(0, 210, 211, 0.2);
  border-color: #00d2d3;
  box-shadow: 0 0 10px rgba(0, 210, 211, 0.4);
}

/* Right: Career Performance Card */
.profile-stats-card {
  background: linear-gradient(145deg, rgba(20, 28, 48, 0.8), rgba(12, 16, 28, 0.9));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.profile-stats-title {
  font-family: var(--font-tech);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 1.5px;
  color: #ffffff;
  margin-bottom: 12px;
}

.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.profile-stat-box {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 12px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: var(--transition-fast);
}
.profile-stat-box:hover {
  border-color: rgba(0, 210, 211, 0.4);
  transform: translateY(-2px);
}
.stat-box-icon {
  font-size: 22px;
  flex-shrink: 0;
}
.stat-box-body {
  display: flex;
  flex-direction: column;
}
.stat-box-num {
  font-family: var(--font-tech);
  font-size: 15px;
  font-weight: 900;
  color: #ffffff;
}
.stat-box-label {
  font-family: var(--font-tech);
  font-size: 9px;
  font-weight: 700;
  color: var(--accent-cyan);
  letter-spacing: 0.8px;
}

.profile-action-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.profile-nav-btn {
  flex: 1;
  padding: 10px 8px;
  border-radius: 8px;
  font-family: var(--font-tech);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.25s ease;
  text-align: center;
}
.profile-nav-btn.primary {
  background: linear-gradient(135deg, #ffd32a, #ff9f1a);
  border: none;
  color: #000;
  box-shadow: 0 4px 15px rgba(255, 211, 42, 0.35);
}
.profile-nav-btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 211, 42, 0.55);
}
.profile-nav-btn.secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
}
.profile-nav-btn.secondary:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: var(--accent-cyan);
}

/* Modals */
.game-modal {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(3, 5, 9, 0.85);
  backdrop-filter: var(--glass-blur);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-card {
  width: 100%;
  max-width: 440px;
  background: rgba(16, 22, 34, 0.95);
  border: 1px solid var(--border-highlight);
  border-radius: 16px;
  box-shadow: var(--box-shadow-card);
  padding: 26px 28px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.modal-card-title {
  font-family: var(--font-tech);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 2px;
  color: #fff;
  margin-bottom: 8px;
}
.modal-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.modal-btn-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Victory & Trajectory Box */
.victory-card {
  background: radial-gradient(circle at 50% 0%, rgba(28, 38, 62, 0.96) 0%, rgba(10, 14, 24, 0.98) 100%);
  border: 1.5px solid rgba(245, 166, 35, 0.6);
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9), 0 0 35px rgba(245, 166, 35, 0.25);
  padding: 24px;
}
.victory-title {
  font-family: var(--font-main);
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 1px;
  color: #ffcf40;
  text-shadow: 0 0 20px rgba(245, 166, 35, 0.6);
  margin-bottom: 4px;
}
.stars-row {
  display: flex;
  justify-content: center;
  gap: 10px;
  font-size: 32px;
  color: #f5a623;
  margin: 8px 0 16px 0;
  text-shadow: 0 0 12px rgba(245, 166, 35, 0.85);
}
.victory-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}
.v-stat-box {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 10px 12px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
}
.v-stat-lbl {
  font-family: var(--font-main);
  font-size: 10px;
  color: #94a3b8;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.v-stat-val {
  font-family: var(--font-main);
  font-size: 17px;
  font-weight: 800;
  color: #fff;
  margin-top: 2px;
}
.highlight-green { color: #2ed573 !important; }

.trajectory-preview-box {
  background: rgba(8, 12, 20, 0.85);
  border: 1px solid rgba(0, 210, 211, 0.25);
  border-radius: 10px;
  padding: 8px 10px;
  margin-bottom: 14px;
}
.traj-lbl {
  font-family: var(--font-main);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: var(--accent-cyan);
  display: block;
  margin-bottom: 4px;
}
#trajectory-canvas {
  width: 100%;
  height: 60px;
  display: block;
}

.victory-rewards-row {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 18px;
}
.v-reward-pill {
  background: rgba(255, 211, 42, 0.12);
  border: 1px solid rgba(255, 211, 42, 0.35);
  padding: 6px 14px;
  border-radius: 20px;
  font-family: var(--font-main);
  font-size: 13px;
  font-weight: 800;
  color: #ffcf40;
}
.bonus-pill {
  background: rgba(255, 71, 87, 0.15);
  color: #ff4757;
  border-color: rgba(255, 71, 87, 0.4);
}
.victory-buttons-row {
  display: flex;
  gap: 10px;
}
.victory-buttons-row button {
  flex: 1;
  padding: 12px;
  border-radius: 10px;
  font-family: var(--font-main);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.failed-card {
  background: radial-gradient(circle at 50% 0%, rgba(45, 20, 26, 0.96) 0%, rgba(12, 8, 14, 0.98) 100%);
  border: 1.5px solid rgba(255, 71, 87, 0.55);
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9), 0 0 35px rgba(255, 71, 87, 0.25);
  padding: 24px;
}
.failed-title {
  font-family: var(--font-main);
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 1px;
  color: var(--accent-red);
  text-shadow: 0 0 20px rgba(255, 71, 87, 0.6);
}
.fail-reason-badge {
  background: rgba(255, 71, 87, 0.15);
  border: 1px solid rgba(255, 71, 87, 0.3);
  color: #ff6b81;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 4px 12px;
  border-radius: 4px;
  margin: 10px 0 20px 0;
  display: inline-block;
}

/* Photo Mode */
.photo-mode-bar {
  position: absolute;
  left: 20px;
  right: 20px;
  background: rgba(14, 19, 30, 0.85);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 150;
}
.top-photo-bar { top: 20px; }
.bottom-photo-bar { bottom: 20px; }
.photo-title {
  font-family: var(--font-tech);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: #fff;
}
.photo-filters { display: flex; gap: 8px; }

/* Loading */
.loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 50% 40%, #151f33 0%, #05080e 100%);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease;
}
.loading-overlay.hidden { opacity: 0; pointer-events: none; }
.loading-content { text-align: center; max-width: 360px; }
.loading-logo {
  font-family: var(--font-tech);
  font-size: 42px;
  font-weight: 900;
  letter-spacing: 4px;
  color: #fff;
  line-height: 0.9;
}
.loading-logo span { color: var(--primary-gold); }
.loading-edition {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 4px;
  color: var(--accent-cyan);
  margin: 8px 0 24px 0;
}
.loading-bar-wrap {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 10px;
}
.loading-bar-fill {
  height: 100%;
  background: var(--primary-gold-gradient);
  box-shadow: 0 0 10px var(--primary-gold);
  transition: width 0.3s ease;
}
.loading-status-text {
  font-size: 11px;
  font-family: var(--font-tech);
  letter-spacing: 1px;
  color: var(--text-muted);
}
.btn-start-game {
  margin-top: 18px;
  background: var(--primary-gold-gradient);
  color: #000;
  border: none;
  font-family: var(--font-tech);
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 2px;
  padding: 12px 32px;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: var(--box-shadow-gold);
}

.toast-popup {
  position: absolute;
  top: 70px;
  right: 20px;
  background: rgba(16, 22, 34, 0.95);
  border: 1px solid var(--primary-gold);
  border-radius: 8px;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--box-shadow-gold);
  z-index: 500;
}
.toast-icon { font-size: 24px; }
.toast-title { font-size: 12px; font-weight: 800; color: var(--primary-gold); }
.toast-desc { font-size: 11px; color: #fff; }

.debug-panel {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: rgba(0, 0, 0, 0.85);
  border: 1px solid #333;
  color: #00ff00;
  font-family: monospace;
  font-size: 11px;
  padding: 6px 10px;
  border-radius: 4px;
  z-index: 999;
  pointer-events: none;
}
.debug-title { font-weight: bold; color: #ffb300; margin-bottom: 2px; }
.hidden { display: none !important; }

/* =========================================================
   10-Stage Level Selection & Pre-Level Briefing Styles
   ========================================================= */
.chapter-tabs-wrapper {
  width: 100%;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 14px;
}
.chapter-tabs-wrapper::-webkit-scrollbar {
  height: 5px;
}
.chapter-tabs-wrapper::-webkit-scrollbar-thumb {
  background: rgba(0, 210, 211, 0.45);
  border-radius: 3px;
}
.chapter-tabs {
  display: flex;
  gap: 8px;
  width: max-content;
}
.tab-chip {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #a4b0be;
  font-family: var(--font-tech);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}
.tab-chip:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}
.tab-chip.active {
  background: linear-gradient(135deg, #00d2d3, #0984e3);
  color: #fff;
  border-color: #00d2d3;
  box-shadow: 0 0 15px rgba(0, 210, 211, 0.4);
}
.chip-star-badge {
  background: rgba(0, 0, 0, 0.4);
  padding: 2px 6px;
  border-radius: 12px;
  font-size: 10px;
  color: #ffd32a;
}

.level-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  overflow-y: auto;
  padding: 4px 6px 16px 2px;
  flex: 1;
  min-height: 0;
}
.level-card {
  background: linear-gradient(145deg, rgba(22, 32, 54, 0.88), rgba(12, 18, 30, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.25, 1, 0.5, 1);
  min-height: 110px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}
.level-card:hover {
  transform: translateY(-4px) scale(1.03);
  border-color: #00d2d3;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6), 0 0 16px rgba(0, 210, 211, 0.35);
  background: linear-gradient(145deg, rgba(30, 44, 74, 0.95), rgba(16, 24, 42, 0.98));
}
.level-card.completed {
  border-color: rgba(46, 213, 115, 0.5);
  background: linear-gradient(145deg, rgba(18, 40, 32, 0.8), rgba(10, 22, 18, 0.9));
}
.level-card.locked {
  opacity: 0.42;
  cursor: not-allowed;
  filter: grayscale(0.85);
}
.level-card.locked:hover {
  transform: none;
  box-shadow: none;
  border-color: rgba(255, 255, 255, 0.12);
  background: linear-gradient(145deg, rgba(20, 28, 48, 0.8), rgba(12, 17, 30, 0.9));
}
.level-card-num {
  font-family: var(--font-main);
  font-size: 22px;
  font-weight: 900;
  color: #fff;
  letter-spacing: 0.5px;
  text-shadow: 0 0 10px rgba(0, 210, 211, 0.3);
}
.level-card-lock {
  font-size: 22px;
  margin: 6px 0;
}
.level-card-name {
  font-family: var(--font-main);
  font-size: 11px;
  color: #cbd5e1;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 125px;
  margin: 4px 0;
}
.level-card-stars {
  font-size: 15px;
  color: #475569;
  margin: 2px 0;
}
.level-card-stars .star-active {
  color: #ffd32a;
  text-shadow: 0 0 8px rgba(255, 211, 42, 0.7);
}
.level-card-meta {
  font-size: 10px;
  color: var(--accent-cyan);
  font-family: var(--font-main);
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* Pre-Level Mission Briefing Modal */
.briefing-card {
  max-width: 520px;
  background: radial-gradient(circle at 50% 10%, rgba(20, 32, 56, 0.98) 0%, rgba(8, 12, 22, 0.98) 100%);
  border: 1.5px solid rgba(0, 210, 211, 0.5);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.9), 0 0 35px rgba(0, 210, 211, 0.25);
  border-radius: 20px;
  padding: 24px 28px;
  text-align: center;
}
.briefing-stage-badge {
  display: inline-block;
  background: rgba(0, 210, 211, 0.15);
  border: 1px solid rgba(0, 210, 211, 0.4);
  color: #00d2d3;
  font-family: var(--font-tech);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 2px;
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 8px;
}
.briefing-level-title {
  font-family: var(--font-tech);
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 1.5px;
  color: #ffffff;
  margin: 0 0 4px 0;
  text-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}
.briefing-subtitle {
  font-size: 12px;
  color: #a4b0be;
  margin-bottom: 16px;
}
.briefing-specs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
.briefing-spec-item {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
.briefing-spec-item .spec-label {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--text-muted);
}
.briefing-spec-item .spec-value {
  font-family: var(--font-tech);
  font-size: 13px;
  font-weight: 800;
  color: #ffffff;
}
.briefing-reward-banner {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 211, 42, 0.25);
  border-radius: 10px;
  padding: 8px 14px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  margin-bottom: 20px;
}
.brief-rew-item {
  font-family: var(--font-tech);
  font-size: 12px;
  font-weight: 800;
  color: #ffd32a;
}
.highlight-cyan {
  color: #00d2d3 !important;
}
.briefing-action-row {
  display: flex;
  gap: 12px;
}
.briefing-action-row button {
  flex: 1;
  height: 46px;
  font-size: 14px;
}
.pulse-glow {
  background: linear-gradient(135deg, #00d2d3 0%, #0984e3 100%) !important;
  box-shadow: 0 0 20px rgba(0, 210, 211, 0.5) !important;
}
.pulse-glow:hover {
  box-shadow: 0 0 30px rgba(0, 210, 211, 0.8) !important;
  transform: translateY(-2px) scale(1.02);
}
