/* DRIFTFORGE: CITY OF SLIDE - Master CSS Design System */
:root {
  --bg-dark: #0A0D14;
  --panel-bg: rgba(18, 24, 38, 0.75);
  --border-color: rgba(0, 240, 255, 0.25);
  --neon-cyan: #00F0FF;
  --neon-magenta: #FF0055;
  --neon-yellow: #FFE600;
  --neon-green: #00FF66;
  --text-main: #FFFFFF;
  --text-muted: #8A99B5;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

body, html {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg-dark);
  color: var(--text-main);
}

#canvas-container {
  width: 100vw;
  height: 100vh;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
}

/* Glassmorphism Styling */
.glass {
  background: var(--panel-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
}

.glow-border {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.3);
}

.neon-cyan { color: var(--neon-cyan); text-shadow: 0 0 10px rgba(0, 240, 255, 0.5); }
.neon-magenta { color: var(--neon-magenta); text-shadow: 0 0 10px rgba(255, 0, 85, 0.5); }
.neon-yellow { color: var(--neon-yellow); text-shadow: 0 0 10px rgba(255, 230, 0, 0.5); }

.flex-center {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hidden { display: none !important; }

/* Main Menu Screen */
.menu-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 10;
  background: radial-gradient(circle at center, rgba(10,13,20,0.4) 0%, rgba(10,13,20,0.85) 100%);
}

.menu-card {
  width: 480px;
  padding: 2.5rem;
  text-align: center;
}

.game-title {
  font-size: 2.8rem;
  font-weight: 900;
  letter-spacing: 2px;
}

.game-subtitle {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 4px;
  margin-top: -5px;
}

.tagline {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 6px;
  margin-bottom: 1.8rem;
}

.menu-nav-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.menu-btn {
  padding: 0.85rem 1.2rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.menu-btn:hover {
  background: rgba(0, 240, 255, 0.15);
  border-color: var(--neon-cyan);
  transform: translateX(4px);
}

.menu-btn.primary-neon {
  background: linear-gradient(90deg, rgba(0,240,255,0.2), rgba(255,0,85,0.2));
  border-color: var(--neon-cyan);
}

.menu-footer {
  margin-top: 1.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* In-Game HUD Overlay */
#hud-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 5;
  pointer-events: none;
  padding: 1.5rem;
}

.hud-panel {
  position: absolute;
  padding: 1rem 1.4rem;
}

#hud-top-left { top: 1.5rem; left: 1.5rem; }
#hud-top-right { top: 1.5rem; right: 1.5rem; }
#hud-dashboard { bottom: 1.5rem; right: 1.5rem; min-width: 220px; }

.speedometer-num {
  font-size: 2.2rem;
  font-weight: 900;
}

.gear-num {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-muted);
}

.rpm-bar-bg {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 6px;
}

.rpm-bar-fill {
  height: 100%;
  width: 20%;
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-magenta));
  transition: width 0.05s linear;
}

/* Floating Center Drift Score Meter */
#hud-drift-center {
  position: absolute;
  top: 32%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.drift-score-text {
  font-size: 3rem;
  font-weight: 900;
  color: var(--neon-yellow);
  text-shadow: 0 0 20px rgba(255, 230, 0, 0.8);
}

.multiplier-badge {
  display: inline-block;
  background: var(--neon-magenta);
  color: #FFF;
  padding: 0.3rem 0.8rem;
  font-weight: 900;
  font-size: 1.2rem;
  border-radius: 20px;
  margin-top: 4px;
}

.feedback-banner {
  position: absolute;
  top: 20%;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.8rem;
  font-weight: 900;
  padding: 0.5rem 1.5rem;
  background: rgba(0, 0, 0, 0.7);
  border-radius: 8px;
  border: 1px solid var(--neon-cyan);
}

/* Modal Overlays */
.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 20;
  background: rgba(10, 13, 20, 0.85);
}

.modal-box {
  width: 600px;
  max-height: 85vh;
  padding: 2rem;
  overflow-y: auto;
}

.wide-modal { width: 900px; }

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.8rem;
}

.close-modal-btn {
  background: none;
  border: none;
  color: #FFF;
  font-size: 2rem;
  cursor: pointer;
}

/* Grids */
.level-grid, .car-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

.level-card, .dealership-card {
  padding: 1.2rem;
  border-radius: 8px;
}

.action-btn {
  padding: 0.6rem 1.2rem;
  font-weight: 700;
  border-radius: 6px;
  border: none;
  cursor: pointer;
}

.primary-btn { background: var(--neon-cyan); color: #000; }
.danger-btn { background: var(--neon-magenta); color: #FFF; }

.garage-container-layout {
  display: flex;
  gap: 1.5rem;
}

.garage-sidebar {
  width: 220px;
  border-right: 1px solid var(--border-color);
  padding-right: 1rem;
}

.garage-mod-categories {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1rem;
}

.mod-tab-btn {
  padding: 0.6rem;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  color: #FFF;
  border-radius: 6px;
  cursor: pointer;
  text-align: left;
}

.mod-tab-btn.active {
  border-color: var(--neon-cyan);
  background: rgba(0, 240, 255, 0.15);
}
