* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

.action-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 12px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

html, body {
  font-family: 'Microsoft YaHei', 'PingFang SC', sans-serif;
  background: #0d0d1a;
  color: #fff;
  overflow: hidden;
  height: 100vh;
  height: 100dvh;
  width: 100vw;
}

.container {
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* 挡风玻璃区域 */
.windshield {
  width: 100%;
  height: 40%;
  background: linear-gradient(180deg, #0a0a18 0%, #151528 40%, #1e1e38 100%);
  position: relative;
  border-bottom: 3px solid #3a3b55;
  flex-shrink: 0;
}

.windshield::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.15) 0%, transparent 25%);
  pointer-events: none;
}

.road {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 95%;
  height: 70%;
  background: linear-gradient(180deg, #1a1a2e 0%, #252540 100%);
  -webkit-clip-path: polygon(18% 100%, 82% 100%, 62% 0%, 38% 0%);
  clip-path: polygon(18% 100%, 82% 100%, 62% 0%, 38% 0%);
  opacity: 0.5;
}

.road-line {
  position: absolute;
  bottom: 5%;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 50%;
  background: repeating-linear-gradient(to bottom, #e8b830 0, #e8b830 10px, transparent 10px, transparent 22px);
  opacity: 0.4;
}

.title-bar {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 14px;
  color: rgba(255,255,255,0.2);
  letter-spacing: 4px;
  pointer-events: none;  /* 可选 */
}

/* 仪表台区域 */
.dashboard-area {
  flex: 1;
  background: linear-gradient(180deg, #252640 0%, #16172a 50%, #1a1b30 100%);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.dash-shell {
  width: 90%;
  max-width: 420px;
  background: linear-gradient(180deg, #2a2b48, #1e1f35);
  border-radius: 20px;
  border: 2px solid #3a3b55;
  box-shadow: 0 8px 32px rgba(0,0,0,0.6), inset 0 1px 2px rgba(255,255,255,0.05);
  padding: 15px 15px 100px 15px;
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 15px;
}

.stalk-control {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  margin-top: 0%;
}

.dash-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.light-panel {
  background: rgba(0,0,0,0.3);
  border-radius: 12px;
  padding: 10px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.light-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.light-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(26,26,46,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,0.1);
  overflow: hidden;
  transition: all 0.3s;
}

.light-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: brightness(0.8);
}

.light-icon.active-glow .light-img {
  filter: brightness(1.5) drop-shadow(0 0 4px currentColor);
}

#ind-low-beam.active-glow .light-img {
  filter: brightness(2.2) drop-shadow(0 0 8px #40c040) drop-shadow(0 0 2px #40c040);
}

#ind-low-beam.active-glow {
  box-shadow: 0 0 16px rgba(64,192,64,0.5), 0 0 4px rgba(64,192,64,0.3);
  border-color: rgba(64,192,64,0.5);
}

#ind-high-beam.active-glow .light-img {
  filter: brightness(2.2) drop-shadow(0 0 8px #4080ff) drop-shadow(0 0 2px #4080ff);
}

#ind-high-beam.active-glow {
  box-shadow: 0 0 16px rgba(64,128,255,0.5), 0 0 4px rgba(64,128,255,0.3);
  border-color: rgba(64,128,255,0.5);
}

#ind-fog-front.active-glow .light-img {
  filter: brightness(1.5) drop-shadow(0 0 4px #40c040);
}

#ind-position.active-glow .light-img {
  filter: brightness(2.2) drop-shadow(0 0 8px #f0a030) drop-shadow(0 0 2px #f0a030);
}

#ind-position.active-glow {
  box-shadow: 0 0 16px rgba(240,160,48,0.5), 0 0 4px rgba(240,160,48,0.3);
  border-color: rgba(240,160,48,0.5);
}

.light-icon svg {
  width: 20px;
  height: 20px;
}

.light-icon.active-glow {
  box-shadow: 0 0 12px rgba(255,255,255,0.25);
  border-color: rgba(255,255,255,0.2);
}

.light-name {
  font-size: 10px;
  color: rgba(255,255,255,0.5);
}


@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.2; }
}

#turn-left {
  position: relative;
  left: -10px;
}

#turn-right {
  position: relative;
  left: 10px;
}

.turn-signals {
  display: flex;
  justify-content: center;
  gap: 100px;
  margin: 12px 0;
}

.turn-arrow {
  font-size: 28px;
  color: rgba(255,255,255,0.2);
  transition: all 0.2s;
}

.turn-arrow.active {
  color: #40c040;
  animation: blink 0.5s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.2; }
}

.gauges {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin: 12px 0;
}

.gauge {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, #181830, #0a0a16);
  border: 2px solid #3a3b55;
  position: relative;
  box-shadow: 0 0 8px rgba(0,0,0,0.5), inset 0 0 12px rgba(0,0,0,0.3);
}

.gauge-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #888;
  z-index: 5;
}

.gauge-needle {
  position: absolute;
  bottom: 50%;
  left: 50%;
  width: 2px;
  height: 35%;
  background: #e04040;
  transform-origin: bottom center;
  border-radius: 1px;
  z-index: 4;
}

.gauge-number {
  position: absolute;
  font-size: 7px;
  color: rgba(255,255,255,0.4);
}

.digital-display {
  width: 50px;
  height: 70px;
  background: #0a0a10;
  border-radius: 6px;
  border: 1px solid #222;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  box-shadow: inset 0 0 8px rgba(0,0,0,0.7);
}

.digital-time {
  font-size: 11px;
  color: #e04040;
  font-family: 'Courier New', monospace;
  text-shadow: 0 0 4px rgba(224,64,64,0.5);
}

.digital-speed {
  font-size: 16px;
  color: #e04040;
  font-family: 'Courier New', monospace;
  font-weight: bold;
  text-shadow: 0 0 6px rgba(224,64,64,0.6);
}

.digital-unit {
  font-size: 7px;
  color: #e04040;
  font-family: 'Courier New', monospace;
}

.controls {
  position: relative;
  width: 100%;
  margin-top: 15px;
}

.knob-control {
  position: absolute;
  left: 0%;
  top: 15px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.hazard-control {
  position: absolute;
  right: 30%;
  transform: translateX(50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.knob-container {
  width: 60px;
  height: 60px;
  position: relative;
}

.knob-base {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, #4a4b65, #282840);
  border: 2px solid #555;
  position: relative;
  box-shadow: 0 3px 12px rgba(0,0,0,0.5), inset 0 2px 4px rgba(255,255,255,0.08);
}

.knob-knob {
  width: 20%;
  height: 70%;
  background: linear-gradient(90deg, #555, #333, #555);
  border-radius: 20%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
  transition: transform 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.knob-knob::after {
  content: '';
  width: 3px;
  height: 10px;
  background: rgba(255,255,255,0.6);
  border-radius: 2px;
}

.knob-dot-group {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.knob-dot {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  transition: background 0.3s;
}

.knob-dot.active {
  background: rgba(255,255,255,0.8);
  box-shadow: 0 0 4px rgba(255,255,255,0.4);
}

.knob-dot-label {
  position: absolute;
  font-size: 8px;
  color: rgba(255,255,255,0.35);
  white-space: nowrap;
  transition: color 0.3s;
  cursor: pointer;
  pointer-events: auto;
}

.knob-dot-label:hover { color: rgba(255,255,255,0.6); }

.knob-dot-label.active {
  color: rgba(255,255,255,0.9) !important;
  text-shadow: 0 0 4px rgba(255,255,255,0.4) !important;
}

.knob-dot.d0 { top: 2px; left: 50%; transform: translateX(-50%); }
.knob-dot-label.d0 { top: -30px; left: 50%; transform: translateX(-50%); writing-mode: vertical-rl; }
.knob-dot.d45 { top: 8px; right: 8px; }
.knob-dot-label.d45 { top: -10px; right: -20px; transform: rotate(-45deg); }
.knob-dot.d90 { top: 50%; right: 2px; transform: translateY(-50%); }
.knob-dot-label.d90 { top: 50%; right: -32px; transform: translateY(-50%); }

.turn-stalk {
  width: 22px;
  height: 100px;
  background: linear-gradient(180deg, #3a3a50, #2a2a3e);
  border-radius: 4px;
  border: 1px solid #555;
  position: relative;
  box-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.stalk-arrow-up, .stalk-arrow-down {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  color: rgba(255,255,255,0.3);
  transition: color 0.2s;
  z-index: 5;
  cursor: pointer;
  pointer-events: auto;
}

.stalk-arrow-up { top: 2px; }
.stalk-arrow-down { bottom: 2px; }
.stalk-arrow-up:hover, .stalk-arrow-down:hover { color: rgba(255,255,255,0.6); }
.stalk-arrow-up.active { color: #40c040; }
.stalk-arrow-down.active { color: #40c040; }

.stalk-center-btn {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 16px;
  background: linear-gradient(135deg, #6a6a80, #4a4a5e);
  border: 1px solid #888;
  border-radius: 50%;
  cursor: grab;
  box-shadow: 0 1px 4px rgba(0,0,0,0.4);
  touch-action: none;
  z-index: 2;
  transition: box-shadow 0.15s;
}

.stalk-center-btn:active { cursor: grabbing; }
.stalk-center-btn.off-active { border-color: #ff4040; box-shadow: 0 0 4px rgba(255,64,64,0.4); }

.stalk-track-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  cursor: pointer;
  pointer-events: auto;
  z-index: 10;
}

.stalk-label { font-size: 9px; color: rgba(255,255,255,0.5); }

.beam-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

.beam-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  transition: all 0.2s;
  padding: 5px 8px;
  border-radius: 6px;
  background: rgba(0,0,0,0.2);
  border: 1px solid rgba(255,255,255,0.08);
  width: 65px;
  -webkit-tap-highlight-color: transparent;
  outline: none;
}

.beam-btn:active { background: rgba(0,0,0,0.2); }
.beam-btn:hover { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.15); }
.beam-btn.active { background: rgba(64,128,255,0.15); border-color: rgba(64,128,255,0.4); box-shadow: 0 0 8px rgba(64,128,255,0.3); }
.beam-btn.alternate-active { background: rgba(240,160,48,0.15); border-color: rgba(240,160,48,0.4); box-shadow: 0 0 8px rgba(240,160,48,0.3); }

.beam-icon { width: 28px; height: 28px; border-radius: 50%; background: rgba(26,26,46,0.8); display: flex; align-items: center; justify-content: center; border: 1px solid rgba(255,255,255,0.1); }
.beam-img { width: 100%; height: 100%; object-fit: contain; }
.alternate-img { filter: sepia(1) saturate(2) hue-rotate(-10deg); }
.beam-btn.alternate-active .alternate-img { animation: alternate-pulse 0.5s infinite; }

@keyframes alternate-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.beam-label { font-size: 9px; color: rgba(255,255,255,0.6); text-align: center; }
.beam-btn.active .beam-label { color: #4080ff; }
.beam-btn.alternate-active .beam-label { color: #f0a030; }

.hazard-control {
  position: absolute;
  right: 25%;
  top: 20px;
  transform: translateX(50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.hazard-btn {
  width: 55px;
  height: 38px;
  background: linear-gradient(180deg, #444, #2a2a2a);
  border-radius: 6px;
  border: 2px solid #555;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
  transition: all 0.2s;
}

.hazard-btn.active { border-color: #ff4040; box-shadow: 0 0 10px rgba(255,64,64,0.4); }
.hazard-triangle { width: 26px; height: 26px; }
.hazard-label { font-size: 9px; color: rgba(255,255,255,0.5); }

.light-effects-layer {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  z-index: 10;
}

.light-effect {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 0.8s ease;
  pointer-events: none;
}

.light-effect.active { opacity: 1; }

.light-effect.position-light {
  width: 115%;
  height: 15%;  /* 从 50% 改成 55%，比近光高一点 */
  background: radial-gradient(ellipse at 50% 100%, rgba(255, 170, 50, 0.45) 0%, rgba(255, 150, 30, 0.2) 20%, rgba(255, 130, 20, 0.06) 50%, transparent 75%);
}

.light-effect.low-beam-light {
  width: 95%;
  height: 38%;
  background: radial-gradient(ellipse at 50% 98%, rgba(210, 235, 255, 0.7) 0%, rgba(180, 215, 255, 0.35) 20%, rgba(150, 190, 240, 0.1) 50%, transparent 72%);
}


.light-effect.high-beam-light {
  width: 95%;
  height: 95%;
  background: radial-gradient(ellipse at 50% 100%, rgba(240, 248, 255, 0.9) 0%, rgba(220, 235, 255, 0.5) 10%, rgba(190, 215, 250, 0.25) 25%, rgba(150, 190, 240, 0.1) 45%, transparent 70%),
              radial-gradient(ellipse at 50% 100%, rgba(255, 255, 255, 0.4) 0%, transparent 30%);
}



.road.glow-on { opacity: 0.7; background: linear-gradient(180deg, #2a2a4e 0%, #353560 100%); }
.road-line.glow-on { opacity: 0.6; }

.version-tag {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 20;
  pointer-events: none;
  display: flex;
  gap: 12px;
}

.version-tag .v-col {
  writing-mode: vertical-rl;
  font-size: 14px;
  color: #fff;
  font-weight: 500;
  letter-spacing: 3px;
  line-height: 1.8;
  text-shadow: 0 0 6px rgba(255,255,255,0.3);
}

.mode-bar {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  gap: 6px;
  z-index: 30;
  pointer-events: auto;
}

.mode-btn {
  padding: 5px 12px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(0,0,0,0.35);
  color: rgba(255,255,255,0.55);
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
  white-space: nowrap;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  touch-action: manipulation;
}

.mode-btn:active { transform: scale(0.95); }
.mode-btn.active-mode { background: rgba(255,140,50,0.2); border-color: rgba(255,140,50,0.5); color: #ff8c32; box-shadow: 0 0 8px rgba(255,140,50,0.3); }
.mode-btn.settings-btn { background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.4); }
.mode-btn.settings-btn:hover { color: rgba(255,255,255,0.7); border-color: rgba(255,255,255,0.25); }

.question-area {
  position: absolute;
  top: 38%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  z-index: 15;
  pointer-events: none;
}

.question-text {
  font-size: 20px;
  color: #fff;
  text-shadow: 0 0 10px rgba(255,255,255,0.5);
  letter-spacing: 2px;
  opacity: 0;
  transition: opacity 0.4s;
  background: rgba(0,0,0,0.45);
  padding: 14px 24px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.question-text.show { opacity: 1; }

.question-sub {
  font-size: 13px;
  color: rgba(255,255,255,0.55);
  margin-top: 6px;
  letter-spacing: 1px;
  background: rgba(0,0,0,0.35);
  padding: 8px 18px;
  border-radius: 10px;
  display: inline-block;
}

.question-sub .missing-audio {
  color: #ff8888;
  font-style: italic;
}

.feedback-popup {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 22px;
  font-weight: bold;
  z-index: 16;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
  white-space: pre-line;
  text-align: center;
  max-width: 90%;
  background: rgba(0,0,0,0.55);
  padding: 12px 20px;
  border-radius: 12px;
}

.feedback-popup.show { opacity: 1; }
.feedback-popup.correct { color: #40c040; text-shadow: 0 0 12px rgba(64,192,64,0.6); }
.feedback-popup.wrong { color: #ff4040; text-shadow: 0 0 12px rgba(255,64,64,0.6); }

.progress-text {
  position: absolute;
  top: 44px;
  right: 12px;
  font-size: 12px;
  color: rgba(255,255,255,0.35);
  z-index: 20;
  pointer-events: none;
}

.exam-result-overlay {
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  background: rgba(0,0,0,0.7);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
}

.exam-result-overlay.show { display: flex; }

.exam-result-box {
  background: #232840;
  border-radius: 16px;
  padding: 28px;
  text-align: center;
  max-width: 320px;
  width: 85%;
  border: 1px solid rgba(255,255,255,0.1);
}

.exam-result-title { font-size: 22px; font-weight: bold; margin-bottom: 16px; }
.exam-result-score { font-size: 48px; font-weight: bold; margin: 12px 0; }
.exam-result-score.pass { color: #40c040; }
.exam-result-score.fail { color: #ff4040; }
.exam-result-detail { font-size: 14px; color: rgba(255,255,255,0.5); margin-bottom: 20px; }

.exam-result-btn {
  padding: 10px 30px;
  border-radius: 8px;
  border: none;
  background: linear-gradient(135deg, #ff8c32, #ff6644);
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  font-family: inherit;
}