:root {
  --bg:    #2e3e4d;
  --panel: #4a5d6b;
  --light: #cadce6;
  --mid:   #9da6ad;
  --white: #eef2f5;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  width: 1920px;
  height: 1080px;
  overflow: hidden;
}

body {
  background: var(--bg);
  font-family: var(--font-primary, 'Barlow Condensed'), sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
}

#mapBg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  filter: brightness(0.55) saturate(0.85);
}

.overlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(46,62,77,0.45) 0%,
    rgba(46,62,77,0.2) 40%,
    rgba(46,62,77,0.2) 60%,
    rgba(46,62,77,0.7) 100%
  );
  z-index: 1;
}

.content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.top-label {
  position: absolute;
  top: 40px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.25em;
  color: rgba(202,220,230,0.5);
  text-transform: uppercase;
  white-space: nowrap;
}

.map-name-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.map-eyebrow {
  font-family: 'DM Mono', monospace;
  font-size: 13px;
  letter-spacing: 0.3em;
  color: rgba(202,220,230,0.6);
  text-transform: uppercase;
}

#mapName {
  font-size: clamp(5rem, 14vw, 11rem);
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 0.9;
  color: var(--white);
  text-align: center;
  text-shadow: 0 4px 40px rgba(0,0,0,0.6);
  transition: text-shadow 0.3s;
}

#mapName.locked {
  text-shadow:
    0 0 60px rgba(202,220,230,0.8),
    0 0 120px rgba(202,220,230,0.4),
    0 4px 40px rgba(0,0,0,0.6);
  animation: nameGlow 1.5s ease-out forwards;
}

@keyframes nameGlow {
  0%   { letter-spacing: 0.02em; }
  30%  { letter-spacing: 0.08em; }
  100% { letter-spacing: 0.04em; }
}

.speed-dots {
  display: flex;
  gap: 8px;
  margin-top: 32px;
}

.speed-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(202,220,230,0.2);
  transition: background 0.2s;
}

.speed-dot.active {
  background: var(--light);
  box-shadow: 0 0 8px rgba(202,220,230,0.6);
}

#lockFlash {
  position: fixed;
  inset: 0;
  background: rgba(202,220,230,0.15);
  z-index: 10;
  opacity: 0;
  pointer-events: none;
}

#lockFlash.flash {
  animation: flashAnim 0.6s ease-out forwards;
}

@keyframes flashAnim {
  0%   { opacity: 1; }
  100% { opacity: 0; }
}

#lockedFrame {
  position: fixed;
  inset: 20px;
  border: 2px solid rgba(202,220,230,0);
  border-radius: 4px;
  z-index: 3;
  pointer-events: none;
  transition: border-color 0.5s, box-shadow 0.5s;
}

#lockedFrame.show {
  border-color: rgba(202,220,230,0.5);
  box-shadow:
    inset 0 0 60px rgba(202,220,230,0.06),
    0 0 60px rgba(202,220,230,0.1);
}

.bottom-bar {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 20px;
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  color: rgba(202,220,230,0.35);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  white-space: nowrap;
}

.bottom-bar .divider {
  width: 1px;
  height: 12px;
  background: rgba(202,220,230,0.2);
}

#stateLabel {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: rgba(202,220,230,0.4);
  text-transform: uppercase;
  margin-top: 24px;
  min-height: 20px;
  transition: color 0.3s;
}

#stateLabel.spinning { color: rgba(202,220,230,0.5); }
#stateLabel.locked   { color: var(--light); }

.corner-tag {
  position: absolute;
  top: 38px;
  right: 40px;
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  color: rgba(202,220,230,0.25);
  text-transform: uppercase;
}