body {
  margin: 0;
  overflow: hidden;
  background: #000;
  font-family: 'Orbitron', sans-serif;
}

#gameCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw !important;
  height: 100vh !important;
  display: block;
  z-index: 1;
  outline: none;
  background: #000;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border: none;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

.screen {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(10, 20, 30, 0.95);
  backdrop-filter: blur(8px);
  z-index: 1000;
  color: #00ffd0;
}

.screen h1{
  text-align: center;
  font-size: 3em;
  margin-top: 0.5rem;
  text-shadow: 0 0 20px rgba(0, 255, 208, 0.5);
}

.screen h2 {
  font-size: 3em;
  margin-top: 10.5rem;
  text-shadow: 0 0 20px rgba(0, 255, 208, 0.5);
}

#levelSelectScreen {
  display: none;
}

#levelSelectScreen h2{
  margin-bottom: 8px;
}

#gameUI {
  display: none;
}

/* ============================================ */
/* BUTTON STYLES - CONSOLIDATED                */
/* ============================================ */

button {
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-family: 'Orbitron', sans-serif;
}

.primary-btn {
  background: linear-gradient(45deg, #00ffd0, #00ccaa);
  color: #000;
  padding: 15px 40px;
  font-size: 1.1em;
  box-shadow: 0 4px 15px rgba(0, 255, 208, 0.3);
}

.primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 255, 208, 0.4);
}

.danger-btn {
  background: rgba(255, 50, 50, 0.9);
  color: white;
  padding: 15px 30px;
  font-size: 1em;
  box-shadow: 0 4px 15px rgba(255, 50, 50, 0.3);
}

.danger-btn:hover {
  background: rgba(255, 70, 70, 0.9);
  transform: translateY(-2px);
}

#playBtn, #levelSelectBtn, #leaderboardBtn {
  background: #00ffd0;
  color: #000;
  border: none;
  padding: 12px 30px;
  font-size: 1.1em;
  font-weight: bold;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
  margin: 10px;
}

#playBtn:hover, #levelSelectBtn:hover, #leaderboardBtn:hover {
  background: #00ccaa;
  transform: scale(1.05);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ============================================ */
/* SCORING AND HUD                             */
/* ============================================ */

#scoring {
  position: fixed;
  top: 20px;
  left: 20px;
  color: #00ffd0;
  font-size: 24px;
  font-weight: 700;
  text-shadow: 0 0 10px rgba(0, 255, 208, 0.5);
  z-index: 100;
  background: rgba(16, 32, 48, 0.8);
  padding: 16px 24px;
  border-radius: 16px;
  backdrop-filter: blur(4px);
}

#score span, #coins span {
  color: #fff;
}

.coin-pulse {
  animation: coinPulse 0.3s ease-out;
}

#hudOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 50;
  font-family: 'Orbitron', monospace;
}

.hud-panel {
  position: absolute;
  background: rgba(0, 20, 40, 0.8);
  border: 1px solid #00ffd0;
  border-radius: 4px;
  padding: 12px;
  backdrop-filter: blur(4px);
  box-shadow: 0 0 20px rgba(0, 255, 208, 0.3);
}

.panel-header {
  color: #00ffd0;
  font-size: 11px;
  font-weight: bold;
  margin-bottom: 8px;
  border-bottom: 1px solid #00ffd0;
  padding-bottom: 4px;
}

.top-left {
  top: 80px;
  left: 20px;
  width: 200px;
}

.pilot-info {
  margin-bottom: 12px;
}

.pilot-name {
  color: #fff;
  font-size: 14px;
  font-weight: bold;
}

.pilot-id, .pilot-rank {
  color: #00ffd0;
  font-size: 10px;
}

.status-bars {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.status-bars .status-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 9px;
  color: #00ffd0;
}

.bar {
  flex: 1;
  height: 6px;
  background: rgba(0, 255, 208, 0.2);
  border: 1px solid #00ffd0;
}

.fill {
  height: 100%;
  background: #00ffd0;
  transition: width 0.3s;
}

.hull-fill { width: 98%; }
.fuel-fill { width: 74%; background: #ffaa00; }
.sys-fill { width: 100%; }

.top-right {
  top: 20px;
  right: 20px;
  width: 180px;
}

.mission-info {
  margin-bottom: 12px;
}

.mission-item {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  margin-bottom: 4px;
}

.label {
  color: #00ffd0;
}

.value {
  color: #fff;
}

.threat-high {
  color: #ff4444;
  text-shadow: 0 0 5px #ff4444;
}

.radar-container {
  display: flex;
  justify-content: center;
}

#radarCanvas {
  border: 1px solid #00ffd0;
  border-radius: 50%;
}

.bottom-left {
  bottom: 20px;
  left: 20px;
  width: 320px;
}

#navGraph {
  border: 1px solid #00ffd0;
  background: rgba(0, 20, 40, 0.5);
}

.nav-data {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: #00ffd0;
  margin-top: 6px;
}

.bottom-right {
  bottom: 20px;
  right: 20px;
  width: 200px;
}

.system-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.sys-item {
  display: flex;
  flex-direction: column;
  font-size: 9px;
}

.sys-label {
  color: #00ffd0;
}

.sys-value {
  color: #fff;
  font-weight: bold;
}

.warning-panel {
  border-top: 1px solid #00ffd0;
  padding-top: 8px;
}

.warning-item {
  font-size: 8px;
  color: #ffaa00;
  margin-bottom: 2px;
}

.center-hud {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.crosshair {
  width: 40px;
  height: 40px;
  border: 2px solid #00ffd0;
  border-radius: 50%;
  position: relative;
  opacity: 0.7;
}

.crosshair::before,
.crosshair::after {
  content: '';
  position: absolute;
  background: #00ffd0;
}

.crosshair::before {
  width: 20px;
  height: 2px;
  top: 19px;
  left: 10px;
}

.crosshair::after {
  width: 2px;
  height: 20px;
  top: 10px;
  left: 19px;
}

.speed-indicator {
  position: absolute;
  top: 60px;
  left: -30px;
  text-align: center;
  font-size: 10px;
  color: #00ffd0;
}

.speed-value {
  font-size: 16px;
  font-weight: bold;
  color: #fff;
}

/* ============================================ */
/* GAME OVER AND OVERLAYS                      */
/* ============================================ */

#gameOver {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.9);
  padding: 2rem 3rem;
  border-radius: 16px;
  text-align: center;
  color: #fff;
  backdrop-filter: blur(10px);
  border: 2px solid #00ffd0;
  display: none;
  z-index: 9997;
}

#gameOver h1 {
  color: #ff3860;
  margin: 0 0 1rem;
  font-size: 2.5em;
}

.game-over-buttons {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 2rem;
}

#authOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.9);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

#authBox {
  background: #1a1a1a;
  padding: 2rem;
  border-radius: 10px;
  text-align: center;
  border: 2px solid #00ffd0;
  box-shadow: 0 0 20px rgba(0, 255, 208, 0.3);
}

#authBox button {
  margin-top: 1rem;
}

#usernameInput {
  padding: 12px;
  font-size: 1.2rem;
  margin-bottom: 1rem;
  width: 250px;
}

/* ============================================ */
/* FIXED LEADERBOARD OVERLAY                   */
/* ============================================ */

#leaderboardOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.9);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  overflow: auto;
  padding: 20px;
  box-sizing: border-box;
}

/* Desktop Layout - Side by Side */
@media (min-width: 769px) {
  #leaderboardOverlay {
    flex-direction: row;
    gap: 30px;
    align-items: flex-start;
    justify-content: center;
  }
}

/* Mobile Layout - Stack Vertically */
@media (max-width: 768px) {
  #leaderboardOverlay {
    flex-direction: column;
    padding: 15px;
    gap: 15px;
    align-items: center;
  }
}

.leaderboard-panel {
  background: rgba(20, 30, 60, 0.95);
  border: 2px solid #00ffd0;
  border-radius: 15px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  min-height: 250px;
  max-height: 400px;
}

/* Desktop Panel Sizing - Side by Side */
@media (min-width: 769px) {
  .leaderboard-panel {
    width: 40vw;
    height: 450vw;
    flex: none;
  }
}

/* Mobile Panel Sizing */
@media (max-width: 768px) {
  .leaderboard-panel {
    width: 80vw;
    height: 0%;
    flex: none;
  }
}

.leaderboard-header {
  color: #00ffd0;
  font-size: 18px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid #00ffd0;
}

.leaderboard-list {
  list-style: none;
  padding: 0;
  margin: 0;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.leaderboard-entry {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: rgba(0, 255, 255, 0.1);
  border-radius: 6px;
  border-left: 3px solid transparent;
  transition: all 0.3s ease;
  min-height: 35px;
}

.leaderboard-entry:hover {
  background: rgba(0, 255, 255, 0.2);
  transform: translateX(3px);
}

.leaderboard-entry .rank {
  font-weight: bold;
  color: #00ffd0;
  min-width: 35px;
  font-size: 13px;
}

.leaderboard-entry .player-name {
  flex: 1;
  margin: 0 10px;
  color: #ffffff;
  font-size: 13px;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

.leaderboard-entry .score {
  color: #00ff00;
  font-weight: bold;
  font-size: 13px;
  min-width: 70px;
  text-align: right;
}

.leaderboard-entry.gold {
  border-left-color: #FFD700;
  background: linear-gradient(90deg, rgba(255, 215, 0, 0.1), rgba(0, 255, 255, 0.1));
}

.leaderboard-entry.silver {
  border-left-color: #C0C0C0;
  background: linear-gradient(90deg, rgba(192, 192, 192, 0.1), rgba(0, 255, 255, 0.1));
}

.leaderboard-entry.bronze {
  border-left-color: #CD7F32;
  background: linear-gradient(90deg, rgba(205, 127, 50, 0.1), rgba(0, 255, 255, 0.1));
}

.no-scores {
  text-align: center;
  color: #888;
  padding: 20px 10px;
  font-style: italic;
}

/* Fixed Back Button Positioning */
#closeLeaderboardBtn {
  position: fixed;
  background: #ff4444;
  color: white;
  border: none;
  padding: 12px 25px;
  border-radius: 16px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  z-index: 10001;
  transition: all 0.3s ease;
}

/* Desktop Back Button */
@media (min-width: 769px) {
  #closeLeaderboardBtn {
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 30px);
    max-width: 250px;
  }
}

/* Mobile Back Button */
@media (max-width: 768px) {
  #closeLeaderboardBtn {
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 30px);
    max-width: 250px;
  }
}

#closeLeaderboardBtn:hover {
  background: #ff6666;
  transform: scale(1.03);
}

@media (max-width: 768px) {
  #closeLeaderboardBtn:hover {
    transform: translateX(-50%) scale(1.03);
  }
}

.leaderboard-list::-webkit-scrollbar {
  width: 6px;
}

.leaderboard-list::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 3px;
}

.leaderboard-list::-webkit-scrollbar-thumb {
  background: rgba(0, 255, 255, 0.5);
  border-radius: 3px;
}

.leaderboard-list::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 255, 255, 0.7);
}

/* ============================================ */
/* LEVEL SELECT INTERFACE                       */
/* ============================================ */

.level-slider-container {
  position: relative;
  width: 100%;
  max-width: 80vw;
  max-height: 90vw;
  display: flex;
  align-items: center;
  gap: 20px;
}

.level-slider {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  width: 100%;
  padding: 20px 100px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #00ffd0 #0a1420;
}

.level-slider::-webkit-scrollbar {
  height: 10px;
  background: rgba(0,255,208,0.05);
}

.level-slider::-webkit-scrollbar-thumb {
  background: #00ffd0;
  border-radius: 5px;
}

.level-card {
  flex: 0 0 300px;
  background: rgba(0, 20, 40, 0.8);
  border: 2px solid transparent;
  border-radius: 12px;
  padding: 0;
  scroll-snap-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
  opacity: 0.6;
  transform: scale(0.9);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.level-card.active {
  border-color: #00ffd0;
  opacity: 1;
  transform: scale(1);
  box-shadow: 0 0 30px rgba(0, 255, 208, 0.4);
}

.card-image {
  width: 100%;
  height: 180px;
  overflow: hidden;
  border-radius: 10px 10px 0 0;
  position: relative;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.level-card:hover .card-image img {
  transform: scale(1.05);
}

.card-content {
  padding: 20px;
  text-align: center;
}

.card-content h3 {
  color: #00ffd0;
  font-size: 1.2em;
  margin: 0 0 10px 0;
  letter-spacing: 1px;
  text-shadow: 0 0 10px rgba(0, 255, 208, 0.5);
}

.difficulty-stars {
  display: flex;
  justify-content: center;
  gap: 5px;
  margin: 10px 0;
}

.star {
  color: #666;
  font-size: 1.2em;
  transition: color 0.3s ease;
}

.star.filled {
  color: #ffd700;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.level-description {
  color: #ccc;
  font-size: 0.9em;
  margin: 10px 0 0 0;
  line-height: 1.4;
}

.slider-nav {
  background: rgba(0, 255, 208, 0.1);
  border: 2px solid #00ffd0;
  color: #00ffd0;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 1.5em;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
}

.slider-nav:hover {
  background: rgba(0, 255, 208, 0.2);
  transform: scale(1.1);
  box-shadow: 0 0 20px rgba(0, 255, 208, 0.3);
}

.slider-nav:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.slider-pagination {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding-bottom: 45vh;
}

.pagination-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.pagination-dot.active {
  background: #00ffd0;
  border-color: #00ffd0;
  box-shadow: 0 0 15px rgba(0, 255, 208, 0.5);
}

.pagination-dot:hover {
  background: rgba(0, 255, 208, 0.7);
}

.level-actions {
  position: fixed;
  bottom: 60px;
  left: 10px;
  right: 10px;
  display: flex;
  gap: 20px;
  justify-content: center;
}

.select-btn {
  background: linear-gradient(45deg, #00ffd0, #00ccaa);
  color: #000;
  border: none;
  padding: 15px 40px;
  font-size: 1.2em;
  font-weight: bold;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 4px 15px rgba(0, 255, 208, 0.3);
}

.select-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 255, 208, 0.4);
}

.back-btn {
  background: transparent;
  color: #00ffd0;
  border: 2px solid #00ffd0;
  padding: 15px 30px;
  font-size: 1.1em;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
}

.back-btn:hover {
  background: rgba(0, 255, 208, 0.1);
  transform: translateY(-2px);
}

/* ============================================ */
/* LOADING SCREEN                              */
/* ============================================ */

.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  font-family: 'Orbitron', monospace;
  color: #00ffd0;
}

.loading-container {
  text-align: center;
  position: relative;
  padding: 3rem;
  background: rgba(0, 255, 208, 0.05);
  border: 2px solid rgba(0, 255, 208, 0.3);
  border-radius: 12px;
  backdrop-filter: blur(10px);
  box-shadow: 0 0 30px rgba(0, 255, 208, 0.2);
}

.mission-title {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  text-shadow: 0 0 15px rgba(0, 255, 208, 0.8);
  letter-spacing: 2px;
  animation: glow 2s ease-in-out infinite alternate;
}

.mission-status {
  font-size: 1rem;
  margin-bottom: 2rem;
  color: #00ccaa;
}

.progress-ring-container {
  position: relative;
  margin: 2rem auto;
}

.progress-ring {
  transform: rotate(-90deg);
}

.progress-ring-bg {
  fill: none;
  stroke: rgba(0, 255, 208, 0.2);
  stroke-width: 4;
}

.progress-ring-fill {
  fill: none;
  stroke: #00ffd0;
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 565.48;
  stroke-dashoffset: 565.48;
  transition: stroke-dashoffset 0.3s ease;
  filter: drop-shadow(0 0 10px #00ffd0);
}

.progress-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.progress-percentage {
  font-size: 2rem;
  font-weight: bold;
  text-shadow: 0 0 10px rgba(0, 255, 208, 0.8);
}

.progress-label {
  font-size: 0.8rem;
  color: #00ccaa;
  margin-top: 0.5rem;
}

.system-status {
  margin-top: 2rem;
  text-align: left;
}

.system-status .status-item {
  display: flex;
  align-items: center;
  margin-bottom: 0.8rem;
  padding: 0.5rem;
  background: rgba(0, 255, 208, 0.1);
  border-left: 3px solid transparent;
  transition: all 0.3s ease;
}

.system-status .status-item.active {
  border-left-color: #00ffd0;
  background: rgba(0, 255, 208, 0.2);
}

.status-icon {
  margin-right: 1rem;
  color: #666;
  transition: color 0.3s ease;
}

.system-status .status-item.active .status-icon {
  color: #00ffd0;
  animation: statusPulse 1s infinite;
}

.status-text {
  flex: 1;
}

.status-indicator {
  font-size: 0.8rem;
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
  background: rgba(102, 102, 102, 0.3);
}

.system-status .status-item.active .status-indicator {
  background: rgba(0, 255, 208, 0.3);
  color: #00ffd0;
}

.scanning-line {
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #00ffd0, transparent);
  animation: scan 3s linear infinite;
}

/* ============================================ */
/* ANIMATIONS                                   */
/* ============================================ */

@keyframes coinPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

@keyframes glow {
  from { text-shadow: 0 0 15px rgba(0, 255, 208, 0.8); }
  to { text-shadow: 0 0 25px rgba(0, 255, 208, 1), 0 0 35px rgba(0, 255, 208, 0.8); }
}

@keyframes statusPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes scan {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* ============================================ */
/* MOBILE RESPONSIVE DESIGN                    */
/* ============================================ */

@media only screen and (max-width: 768px) {
   .screen h2 {
    text-align: center !important;
    width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    font-size: 2em !important;
    margin-bottom: 1rem !important;
  }

  #levelSelectScreen h2 {
    font-size: 1.8em !important;
    margin-top:0;
    margin-bottom: 3rem !important;
  }

  .loading-container, #gameOver {
    max-width: 90vw;
    box-sizing: border-box;
  }

  .hud-panel {
    font-size: 10px !important;
    padding: 4px 6px !important;
    max-width: 35vw !important;
    box-sizing: border-box;
    opacity: 0.85 !important;
    backdrop-filter: blur(3px) !important;
  }

  .hud-panel.top-right {
    top: 5px !important;
    right: 5px !important;
    width: 32vw !important;
  }

  .hud-panel.top-left {
    top: 60px !important;
    left: 5px !important;
    width: 30vw !important;
  }

  .center-hud {
    transform: translate(-50%, -50%) scale(0.5) !important;
    opacity: 0.8 !important;
  }

  #scoring {
    top: 5px !important;
    left: 5px !important;
    font-size: 16px !important;
    padding: 8px 10px !important;
    max-width: 40vw !important;
    box-sizing: border-box;
    backdrop-filter: blur(2px) !important;
  }

  .hud-panel.bottom-left,
  .hud-panel.bottom-right {
    display: none !important;
  }

  .radar-container {
    width: 60px !important;
    height: 60px !important;
  }

  #radarCanvas {
    width: 60px !important;
    height: 60px !important;
  }

  .mission-info {
    margin-bottom: 6px !important;
  }

  .mission-item {
    font-size: 8px !important;
    margin-bottom: 2px !important;
  }

  .pilot-info {
    margin-bottom: 6px !important;
  }

  .pilot-name {
    font-size: 10px !important;
  }

  .pilot-id, .pilot-rank {
    font-size: 7px !important;
  }

  .status-bars .status-item {
    font-size: 7px !important;
    gap: 4px !important;
  }

  .bar {
    height: 4px !important;
  }

  .leaderboard-header {
    font-size: 16px;
    margin-bottom: 10px;
  }
  
  .leaderboard-entry .rank,
  .leaderboard-entry .player-name,
  .leaderboard-entry .score {
    font-size: 12px;
  }

  .level-actions {
    position: fixed;
    bottom: 60px;
    left: 10px;
    right: 10px;
    padding: 8px;
    z-index: 9000;
    border-radius: 8px;
  }
  
  .back-btn, .select-btn {
    padding: 10px 16px;
    font-size: 0.9em;
    white-space: normal;
    height: unset;
    min-height: 38px;
  }

  .level-slider-container {
    position: relative;
    width: 100%;
    max-width: 80vw;
    max-height: 90vw;
    display: flex;
    align-items: center;
    align-items: center;
    gap: 20px;
  }

  .level-card {
    flex: 0 0 55vw;
    max-width: 80vw;
    transform: scale(0.9);
  }

  .level-card.active {
    transform: scale(0.95);
  }

  .card-image {
    max-height: 20vh;
  }

  .card-content {
    padding: 15px;
  }

  .card-content h3 {
    font-size: 1em;
  }

  .slider-nav {
    width: 35px;
    height: 35px;
    font-size: 1em;
  }

  .slider-pagination {
    margin: 0px 0;
    padding-bottom: 20vh;
  }

  .pagination-dot {
    width: 10px;
    height: 10px;
  }

  button, .slider-nav {
    min-height: 40px;
    min-width: 40px;
  }

  button, .primary-btn, .danger-btn, .back-btn, .select-btn {
    white-space: normal;
    height: auto;
    min-height: 38px;
  }

  .loading-container {
    padding: 1.2rem 0.5rem;
    margin: 0.5rem;
    max-width: 96vw;
  }

  #gameOver {
    width: 94vw;
    padding: 1.2rem 0.5rem;
    font-size: 1.1em;
  }

  .level-description {
    font-size: 0.8em;
    margin: 8px 0 0 0;
  }

  .difficulty-stars {
    margin: 8px 0;
  }

  .star {
    font-size: 1em;
  }
}
