@font-face {
  font-family: 'DS-Digital';
  src: url('fonts/ds-digital.ttf') format('truetype');
}

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

body {
  font-family: 'Arial', sans-serif;
  background: transparent;
  color: white;
  overflow: hidden;
}

.speedometer-container {
  position:absolute;
  bottom: 30px;
  right: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.gauges-container {
  display: flex;
  flex-direction: row;
  gap: 5px;
  align-items:flex-end;
  margin-top: -20px;
}

.gauge {
  position: relative;
}

.gauge.speed { 
  width: 220px; height: 220px; 
  margin-bottom: -30x;
  margin-top: -20px;

}
.gauge.rpm { width: 130px; height: 130px; }

.gauge-circle {
  width: 100%; height: 100%;
  border-radius: 50%;
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  border: 3px solid #0f3460;
  position: relative;
  box-shadow: 0 0 20px rgba(15, 52, 96, 0.5);
}

.gauge-needle {
  position: absolute;
  top: 50%; left: 50%;
  background: linear-gradient(to top, #ff6b6b, #ff8e8e);
  transform-origin: bottom center;
  transform: translate(-50%, -100%) rotate(0deg);
  border-radius: 2px;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
  transition: transform 0.3s ease;
}

.gauge.speed .gauge-needle { width: 4px; height: 85px; }
.gauge.rpm .gauge-needle { width: 2px; height: 45px; }

.gauge-center {
  position: absolute;
  top: 50%; left: 50%;
  background: #ff6b6b;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 8px rgba(255, 107, 107, 0.8);
}

.gauge.speed .gauge-center,
.gauge.rpm .gauge-center {
  width: 20px;
  height: 20px;
}

.gauge-label {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-weight: bold;
  color: #64b5f6;
}

.gauge.speed .gauge-label { bottom: 35px; font-size: 14px; }
.gauge.rpm .gauge-label { bottom: 15px; font-size: 10px; }

.gear-box {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  border: 2px solid #64b5f6;
  border-radius: 8px;
  width: 50px; height: 70px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'DS-Digital', monospace;
  font-size: 50px;
  color: #64b5f6;
  box-shadow: 0 0 10px rgba(100, 181, 246, 0.3);
}

.inside-gauge {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: -10px;
}

.inside-gauge .indicator {
  width: 25px;
  height: 20px;
  font-size: 14px;
  border-radius: 5px;
  background: #16213e;
  color: #ff9800;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #16213e;
}

.inside-gauge .indicator.active {
  background: #ff9800;
  color: white;
  box-shadow: 0 0 15px rgba(255, 152, 0, 0.8);
  animation: blink 1s infinite;
}

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

.bars-status-wrapper {
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  justify-content: center;
  gap: 20px;
  flex-direction: row-reverse;
}

.bars-container {
  display: flex;
  flex-direction: row;
  gap: 10px;
}

.bar-item {
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  border: 2px solid #0f3460;
  border-radius: 8px;
  padding: 8px;
  width: 30px;
  height: 120px;
  box-shadow: 0 0 10px rgba(15, 52, 96, 0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.bar-label {
  font-size: 9px;
  color: #64b5f6;
  margin-bottom: 8px;
  writing-mode: vertical-rl;
  text-orientation: mixed;
}

.bar-background {
  background: #2a2a3e;
  width: 12px;
  height: 80px;
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  flex-direction: column-reverse;
}

.bar-fill {
  width: 100%;
  border-radius: 4px;
  transition: height 0.3s ease;
}

.fuel-bar {
  background: #ff6b6b;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

.health-bar {
  background: #ff6b6b;
  box-shadow: 0 0 10px rgba(255, 107, 107, 0.8);
}

.bar-value {
  font-size: 8px;
  color: white;
  text-align: center;
  margin-top: 5px;
  writing-mode: vertical-rl;
  text-orientation: mixed;
}

.status-box {
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  border: 2px solid #0f3460;
  border-radius: 10px;
  padding: 10px 15px;
  box-shadow: 0 0 15px rgba(15, 52, 96, 0.3);
  display: flex;
  gap: 20px;
  align-items: center;
}

.status-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
}

.status-icon {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
}

.engine-on { background: #4caf50; color: white; }
.engine-off { background: #f44336; color: white; }
.seatbelt-on { background: #4caf50; color: white; }
.seatbelt-off { background: #f44336; color: white; }
.lights-off { background: #666; color: white; }
.lights-on { background: #ffeb3b; color: black; }
.lights-high { background: #2196f3; color: white; }

.gauge-marks {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
}

.gauge-mark {
  position: absolute;
  width: 2px;
  height: 10px;
  background: #0f3460;
  transform-origin: center bottom;
}

.gear-box.glow,
.gauge-marks.glow,
.gauge-label.glow {
  color: #ffeb3b;
  text-shadow: 0 0 10px #ffeb3b, 0 0 20px #ffeb3b;
}

/* Membuat status box di atas */
.status-box-wrapper {
  position: absolute;
  bottom: 270px;  /* naikkan agar berada tepat di atas speedometer */
  right: 100px;   /* sesuaikan posisi horizontal, bisa atur lebih atau kurang */
  z-index: 10;
}

/* Membuat kontainer gauges + bar vertikal berdampingan */
.main-panel {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 25px;
}

/* Bar vertikal (fuel & health) di sisi kanan */
.vertical-bars {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.main-panel {
  position: absolute;
  bottom: 30px;
  right: 20px;
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  justify-content: center;
  gap: 8px;
}

#welcomeScreen {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(10, 15, 30, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1s ease;
}

#welcomeScreen.show {
  opacity: 1;
  pointer-events: all;
}

.welcome-text {
  font-family: 'Share Tech Mono', monospace;
  color: #ffeb3b;
  font-size: 40px;
  text-shadow: 0 0 20px #ffeb3b, 0 0 40px #ffeb3b;
  animation: fadeText 3s ease forwards;
}

@keyframes fadeText {
  0% { opacity: 0; transform: scale(0.9); }
  100% { opacity: 1; transform: scale(1); }
}

.gauge.rpm .gauge-marks.glow,
.gauge.rpm .gauge-label.glow {
  color: #ffeb3b;
  text-shadow: 0 0 10px #ffeb3b, 0 0 20px #ffeb3b;
}

