/* Import font */
@import url('https://fonts.googleapis.com/css2?family=Roboto+Condensed:wght@700&display=swap');

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

#ui-container {
    position: absolute;
    bottom: 20px;
    right: 20px;
}

#speedometer-container {
    display: flex;
    align-items: flex-end;
    gap: 30px;
}

/* Cluster tengah (lingkaran speed & RPM) */
#speed-cluster {
    width: 200px;
    height: 200px;
    background-color: rgba(15, 23, 42, 0.8);
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.3);
}

/* Info kecepatan (angka dan satuan) */
.speed-info {
    display: flex;
    align-items: baseline;
    line-height: 1;
    position: relative; /* Untuk positioning gear */
}

#speed-display {
    font-size: 60px;
    font-weight: 700;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.7);
}

#speed-unit {
    font-size: 20px;
    font-weight: 700;
    margin-left: 8px;
    color: rgba(255, 255, 255, 0.7);
}

/* BARU: Style untuk Gear Display */
#gear-display {
    position: absolute;
    top: 0;
    right: -25px; /* Posisikan di kanan atas angka speed */
    font-size: 28px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

/* RPM Arc (Setengah Lingkaran) */
.rpm-arc {
    position:absolute;
    width: 100%;
    height: 100%;
    transform: rotateX(360deg);
    transform-origin:right;
    pointer-events: none;
}

#rpm-arc-path {
    fill: none;
    stroke: #0ea5e9;
    stroke-width: 8;
    stroke-dasharray: 251.2;
    stroke-dashoffset: 251.2;
    transition: stroke-dashoffset 0.1s linear;
}

/* Bar Status (Fuel & Health) */
.status-bar {
    width: 25px;
    height: 150px;
    background-color: rgba(15, 23, 42, 0.8);
    border-radius: 20px;
    padding: 5px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(100, 116, 139, 0.5);
}

.bar-fill {
    width: 100%;
    border-radius: 15px;
    transition: height 0.5s ease-out;
}

#fuel-bar-fill {
    background-color: #f59e0b;
}

#health-bar-fill {
    background: linear-gradient(to top, #ef4444, #f59e0b, #22c55e);
}

.status-bar .icon {
    width: 20px;
    height: 20px;
    fill: rgba(255, 255, 255, 0.6);
    position: absolute;
    top: 10px;
}

/* Indikator (Sein, Lampu, dll) */
.indicator {
    width: 24px;
    height: 24px;
    fill: #8190a7;
    transition: all 0.2s ease-in-out;
}

.indicator.active {
    fill: white;
}

.turn-signals {
    position: absolute;
    bottom: 25px;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 45px;
    box-sizing: border-box;
}

.turn-signals .indicator.active {
    animation: blink 0.5s infinite;
}

@keyframes blink {
    0%, 100% { fill: #f59e0b; text-shadow: 0 0 15px #f59e0b; }
    50% { fill: #475569; text-shadow: none; }
}

.top-indicators {
    display: flex;
    gap: 15px;
    padding: 8px 15px;
    background-color: rgba(15, 23, 42, 0.8);
    border-radius: 20px;
    border: 1px solid rgba(100, 116, 139, 0.5);
    margin-bottom: 10px; /* Jarak antara indikator atas dan speedometer */
    align-self: flex-end; /* Posisikan di ujung kanan container */
}

#belt-indicator.active {
    fill: #ef4444;
    filter: drop-shadow(0 0 5px #ef4444);
}

#engine-indicator.active {
    fill: #f59e0b;
    filter: drop-shadow(0 0 5px #f59e0b);
}

#light-indicator.active {
    fill: #38bdf8;
    filter: drop-shadow(0 0 5px #38bdf8);
}