* {
    user-select: none;
    user-drag: none;
}
:root {
    --bg-color: #1a1a1a;
    --display-bg: #101010;
    --text-color: #e0e0e0;
    --primary-color: #00ffff;
    --accent-color: #ff4757;
    --indicator-off: #444;
    --indicator-on: #00ff00;
    --headlight-on: #f7b731;
    --highbeam-on: #3498db;
    --seatbelt-off: #ff4757;
    --engine-on: #f1c40f;
    --font-digital: 'Orbitron', sans-serif;
    --font-standard: 'Roboto', sans-serif;
}

body {
    background-color: transparent !important;
    font-family: var(--font-standard);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 1rem;
    box-sizing: border-box;
}


.dashboard-container {
    position: fixed;
    bottom: -10%;
    right: -10%;
    width: 100%;
    max-width: 800px;
    border-radius: 50px;
    background-color: rgba(0, 0, 0, 0.418);
    backdrop-filter: blur(1px);
    padding: 2rem;
    display: grid;
    grid-template-columns: 0.5fr 3fr 0.5fr;
    grid-template-rows: auto 1fr auto;
    gap: 1rem 2rem;
    grid-template-areas:
        "indicators-left speedometer indicators-right"
        "rpm speedometer stats"
        "gear speedometer stats";
    overflow: hidden;
    transform: scale(0.4);
}

.dashboard-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url(MISIDE_3.png);
    background-size: cover;
    background-position: center;
    opacity: 0.7;
    z-index: -1;
}



.speedometer {
    grid-area: speedometer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    border-left: 4px solid #4444448c;
    border-right: 4px solid #4444448c;
}

.speed-display {
    font-family: var(--font-digital);
    font-size: clamp(4rem, 15vw, 10rem);
    font-weight: 700;
    line-height: 1;
    color: var(--text-color);
    transition: color 0.3s;
}

.speed-unit {
    font-family: var(--font-digital);
    font-size: clamp(1rem, 4vw, 2rem);
    color: #ffffff;
}


.rpm-gauge {
    grid-area: rpm;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.rpm-label {
    font-size: 2em;
    text-align: center;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.rpm-bar-container {
    display: flex;
    flex-direction: column-reverse;
    gap: 4px;
    height: 200px;
}

.rpm-segment {
    flex-grow: 1;
    background-color: #333;
    border-radius: 2px;
    transition: background-color 0.1s;
}

.rpm-segment.active {
    background-color: var(--primary-color);
}

.rpm-segment.danger {
    background-color: var(--accent-color);
}


.gear-display {
    grid-area: gear;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.gear-value {
    font-family: var(--font-digital);
    font-size: 4rem;
    font-weight: 700;
}

.gear-label {
    font-size: 1.5rem;
    text-transform: uppercase;
    color: #ffffff;
}


.indicators-left { grid-area: indicators-left; text-align: right; }
.indicators-right { grid-area: indicators-right; text-align: left; }

.indicator {
    display: inline-block;
    font-size: 2.5rem;
    opacity: 0.2;
    transition: opacity 0.3s, color 0.3s;
}

.indicator.blinking {
    opacity: 1;
    color: var(--indicator-on);
    animation: blink 1s step-start infinite;
}

@keyframes blink {
    50% { opacity: 0.2; }
}


.stats {
    grid-area: stats;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    gap: 1rem;
}

.stat-bar {
    width: 100%;
}

.stat-label {
    display: flex;
    justify-content: space-between;
    font-size: 2em;
    margin-bottom: 0.3rem;
}

.bar-background {
    background-color: #333;
    border-radius: 5px;
    height: 12px;
    overflow: hidden;
}

.bar-foreground {
    height: 100%;
    width: 0;
    border-radius: 5px;
    transition: width 0.5s ease-out;
}

#fuel-bar { background: linear-gradient(90deg, #f39c12, #f1c40f); }
#health-bar { background: linear-gradient(90deg, #e74c3c, #2ecc71); }


.icon-indicators {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

.icon {
    width: 75px;
    height: 75px;
    fill: var(--text-color);
    stroke: #e0e0e0;
    transition: fill 0.3s;
}

.icon.active {
    fill: var(--text-color);
}

#headlights-icon.low-beam { fill: var(--headlight-on); }
#headlights-icon.high-beam { fill: var(--highbeam-on); }
#seatbelt-icon.active { fill: var(--seatbelt-off); stroke: var(--seatbelt-off); }
#engine-icon.active { fill: var(--engine-on); stroke: var(--engine-on); }


@media (max-width: 650px) {
    .dashboard-container {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        gap: 1.5rem;
        grid-template-areas:
            "speedometer"
            "indicators"
            "rpm"
            "stats"
            "gear";
        padding: 1rem;
    }
    .speedometer {
        border: none;
        padding: 0;
    }
    .indicators-left, .indicators-right {
        grid-area: indicators;
        display: flex;
        justify-content: space-between;
        width: 100%;
    }
    .rpm-gauge {
        align-items: center;
    }
    .rpm-bar-container {
        flex-direction: row;
        width: 100%;
        height: 20px;
    }
    .rpm-segment {
        flex-grow: 1;
    }
}

/* ===================== RADIO CONTAINER ===================== */
.radio-container {
    position: absolute;
    bottom: 325px;
    right: 10px;
    width: 280px;
    height: 120px;
    border-radius: 10px;
    z-index: 25000;
    display: flex;
    flex-direction: column;
    padding: 8px;
    box-sizing: border-box;
    backdrop-filter: blur(5px);

    /* Tambahkan gambar + overlay */
    background-image: 
        url("radio.jpg"), /* file kamu */
        radial-gradient(rgba(0,0,0,0.2), rgba(255,255,255,0.1));
    background-size: cover;
    background-position: center;
}


/* Radio Info Box */
.radio-info-box {
    position: absolute;
    top: -25px;
    left: 0;
    width: 100%;
    height: 20px;
    background-color: rgba(241, 196, 15, 0.2);
    border: 1px solid var(--engine-on);
    border-radius: 3px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 25001;
    animation: pulse 2s infinite;
}

.info-content {
    display: flex;
    align-items: center;
    justify-content: center;
}

.info-text {
    font-family: var(--font-cyber);
    font-size: 0.6rem;
    color: var(--engine-on);
    font-weight: bold;
    text-shadow: 0 0 3px rgba(241, 196, 15, 0.7);
}

/* Radio Header */
.radio-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 5px;
}

.radio-title {
    font-family: var(--font-cyber);
    font-size: 0.7rem;
    color: var(--cyber-cyan);
    text-shadow: 0 0 5px var(--cyber-cyan-glow);
    font-weight: bold;
    margin-bottom: 2px;
}

.radio-station-name {
    font-family: var(--font-cyber);
    font-size: 0.6rem;
    color: var(--cyber-yellow);
    text-shadow: 0 0 5px var(--cyber-yellow-glow);
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
    height: 14px;
}

/* Radio Controls */
.radio-controls {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
}

.station-navigation {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
}

.nav-button, .play-pause-button {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--cyber-cyan);
    border-radius: 50%;
    color: var(--cyber-cyan);
    font-family: var(--font-cyber);
    width: 30px;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    outline: none;
    font-size: 12px;
    transition: all 0.2s ease;
    padding: 0;
}

.nav-button:hover, .play-pause-button:hover {
    background: rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 8px var(--cyber-cyan-glow);
    transform: scale(1.05);
}

.play-pause-button {
    width: 35px;
    height: 35px;
    font-size: 14px;
}

.nav-button:active, .play-pause-button:active {
    transform: scale(0.95);
}

/* Volume Control */
.volume-control {
    display: flex;
    align-items: center;
    gap: 8px;
}

.volume-label {
    font-family: var(--font-cyber);
    font-size: 0.6rem;
    color: var(--cyber-cyan);
    text-shadow: 0 0 3px var(--cyber-cyan-glow);
    min-width: 50px;
}

.volume-slider {
    flex: 1;
    height: 4px;
    -webkit-appearance: none;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 2px;
    outline: none;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--cyber-cyan);
    cursor: pointer;
    box-shadow: 0 0 3px var(--cyber-cyan-glow);
}

.volume-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--cyber-cyan);
    cursor: pointer;
    box-shadow: 0 0 3px var(--cyber-cyan-glow);
    border: none;
}

/* Radio Status */
.radio-status {
    font-family: var(--font-cyber);
    font-size: 0.55rem;
    color: var(--cyber-yellow);
    text-align: center;
    text-shadow: 0 0 3px var(--cyber-yellow-glow);
    padding: 2px;
    border: 1px solid var(--cyber-yellow);
    border-radius: 3px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Pulse animation */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(241, 196, 15, 0.4);
    }
    70% {
        box-shadow: 0 0 0 3px rgba(241, 196, 15, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(241, 196, 15, 0);
    }
}
