:root {
    --cyan: #00f7ff;
    --cyan-soft: rgba(0, 247, 255, 0.24);
    --magenta: #d400ff;
    --red: #ff245f;
    --green: #40ff8a;
    --yellow: #ffd84a;
    --panel: rgba(5, 10, 22, 0.86);
    --panel-strong: rgba(7, 14, 30, 0.96);
    --line: rgba(0, 247, 255, 0.35);
    --text: #eefcff;
    --muted: #7da8b0;
}

* {
    box-sizing: border-box;
    user-select: none;
    -webkit-user-drag: none;
}

html,
body {
    width: 100%;
    height: 100%;
    margin: 0;
    overflow: hidden;
    background: transparent;
    font-family: "Segoe UI", Arial, sans-serif;
}

body {
    color: var(--text);
}

.hidden {
    opacity: 0;
    visibility: hidden;
    transform: translateY(26px) scale(0.92);
}

.welcome-screen {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at center, rgba(0, 247, 255, 0.08), transparent 38%),
        linear-gradient(180deg, rgba(2, 4, 12, 0.96), rgba(1, 2, 8, 0.9));
    overflow: hidden;
    z-index: 20;
    transition: opacity 0.65s ease, visibility 0.65s ease;
}

.welcome-screen::before,
.welcome-screen::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.welcome-screen::before {
    background: repeating-linear-gradient(
        to bottom,
        transparent 0,
        transparent 3px,
        rgba(255, 255, 255, 0.018) 4px
    );
    animation: scan 7s linear infinite;
}

.welcome-screen::after {
    box-shadow: inset 0 0 130px #000;
}

.welcome-grid {
    position: absolute;
    inset: -30%;
    background-image:
        linear-gradient(rgba(0, 247, 255, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 247, 255, 0.08) 1px, transparent 1px);
    background-size: 42px 42px;
    transform: perspective(500px) rotateX(63deg) translateY(28%);
    animation: gridMove 4s linear infinite;
}

.welcome-content {
    position: relative;
    width: min(520px, 86vw);
    padding: 34px;
    border: 1px solid var(--line);
    background: rgba(3, 8, 18, 0.76);
    box-shadow:
        0 0 40px rgba(0, 247, 255, 0.11),
        inset 0 0 30px rgba(0, 247, 255, 0.045);
    clip-path: polygon(18px 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%, 0 18px);
    animation: bootIn 0.7s ease both;
}

.welcome-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    font-size: clamp(24px, 4vw, 42px);
    font-weight: 900;
    letter-spacing: 0.18em;
    text-shadow: 0 0 18px var(--cyan);
}

.logo-bracket {
    color: var(--magenta);
    text-shadow: 0 0 14px var(--magenta);
}

.welcome-subtitle {
    margin: 16px 0 26px;
    text-align: center;
    color: var(--muted);
    font-size: 12px;
    letter-spacing: 0.32em;
}

.loading-track {
    height: 6px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(0, 247, 255, 0.22);
}

.loading-bar {
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--cyan), var(--magenta), var(--red));
    box-shadow: 0 0 18px var(--cyan);
    animation: loadBar 2.7s cubic-bezier(.2,.8,.2,1) forwards;
}

.loading-status {
    display: flex;
    justify-content: space-between;
    margin-top: 12px;
    color: var(--cyan);
    font-family: Consolas, monospace;
    font-size: 10px;
    letter-spacing: 0.12em;
}

.speedometer {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 560px;
    min-height: 320px;
    padding: 18px;
    border: 1px solid var(--line);
    background:
        linear-gradient(135deg, rgba(0, 247, 255, 0.04), transparent 35%),
        var(--panel);
    box-shadow:
        0 0 30px rgba(0, 247, 255, 0.12),
        inset 0 0 35px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(6px);
    clip-path: polygon(16px 0, 100% 0, 100% calc(100% - 16px), calc(100% - 16px) 100%, 0 100%, 0 16px);
    transition:
        opacity 0.7s ease,
        transform 0.7s cubic-bezier(.2,.9,.2,1),
        visibility 0.7s ease;
    z-index: 10;
}

.speedometer.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.speedometer::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: repeating-linear-gradient(
        to bottom,
        transparent 0,
        transparent 4px,
        rgba(255, 255, 255, 0.012) 5px
    );
}

.hud-corner {
    position: absolute;
    width: 24px;
    height: 24px;
    border-color: var(--cyan);
    opacity: 0.8;
}

.hud-corner-tl { top: 7px; left: 7px; border-top: 2px solid; border-left: 2px solid; }
.hud-corner-tr { top: 7px; right: 7px; border-top: 2px solid; border-right: 2px solid; }
.hud-corner-bl { bottom: 7px; left: 7px; border-bottom: 2px solid; border-left: 2px solid; }
.hud-corner-br { bottom: 7px; right: 7px; border-bottom: 2px solid; border-right: 2px solid; }

.hud-header,
.hud-footer {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.hud-header {
    padding: 4px 6px 13px;
    border-bottom: 1px solid rgba(0, 247, 255, 0.18);
}

.hud-kicker,
.hud-footer,
.telemetry-heading span,
.odometer span,
.gear-box span {
    color: var(--muted);
    font-size: 9px;
    letter-spacing: 0.18em;
}

.engine-label {
    display: block;
    margin-top: 3px;
    font-family: Consolas, monospace;
    color: var(--red);
    font-size: 13px;
    letter-spacing: 0.12em;
}

.engine-label.online {
    color: var(--green);
    text-shadow: 0 0 12px rgba(64, 255, 138, 0.6);
}

.status-icons {
    display: flex;
    gap: 7px;
}

.status-icon {
    min-width: 50px;
    padding: 5px 7px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #536b74;
    text-align: center;
    font-family: Consolas, monospace;
    font-size: 9px;
    letter-spacing: 0.08em;
}

.status-icon.active {
    color: var(--cyan);
    border-color: var(--cyan);
    box-shadow: 0 0 12px rgba(0, 247, 255, 0.18);
}

.status-icon.danger {
    color: var(--red);
    border-color: var(--red);
}

.main-cluster {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 290px 1fr;
    gap: 15px;
    padding: 14px 0;
}

.gauge {
    position: relative;
    width: 280px;
    height: 250px;
    display: grid;
    place-items: center;
}

.gauge-svg {
    position: absolute;
    width: 250px;
    height: 250px;
    transform: rotate(135deg);
    filter: drop-shadow(0 0 10px rgba(0, 247, 255, 0.28));
}

.gauge-track,
.gauge-progress {
    fill: none;
    stroke-width: 10;
    stroke-linecap: round;
}

.gauge-track {
    stroke: rgba(255, 255, 255, 0.06);
    stroke-dasharray: 495 165;
}

.gauge-progress {
    stroke: url(#rpmGradient);
    stroke-dasharray: 0 660;
    transition: stroke-dasharray 0.12s linear;
}

.gauge-center {
    position: relative;
    z-index: 2;
    width: 190px;
    text-align: center;
}

.indicator-row {
    display: flex;
    justify-content: space-between;
    padding: 0 14px;
}

.turn-indicator {
    color: rgba(255, 255, 255, 0.13);
    font-size: 21px;
    transition: 0.2s ease;
}

.turn-indicator.active {
    color: var(--green);
    text-shadow: 0 0 15px var(--green);
    animation: blink 0.7s steps(1) infinite;
}

.speed-value {
    margin-top: 5px;
    font-family: Consolas, monospace;
    font-size: 62px;
    font-weight: 900;
    line-height: 0.92;
    letter-spacing: -0.06em;
    text-shadow: 0 0 18px rgba(0, 247, 255, 0.38);
}

.speed-unit {
    margin-top: 8px;
    color: var(--cyan);
    font-size: 11px;
    letter-spacing: 0.34em;
}

.gear-box {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 17px;
    padding: 6px 12px;
    border: 1px solid rgba(212, 0, 255, 0.34);
    background: rgba(212, 0, 255, 0.05);
}

.gear-box strong {
    color: var(--magenta);
    font-family: Consolas, monospace;
    font-size: 22px;
    text-shadow: 0 0 12px rgba(212, 0, 255, 0.7);
}

.telemetry {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
    padding-right: 8px;
}

.telemetry-card,
.odometer {
    padding: 9px 10px;
    border-left: 2px solid var(--cyan);
    background: rgba(255, 255, 255, 0.025);
}

.telemetry-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 7px;
}

.telemetry-heading strong {
    font-family: Consolas, monospace;
    font-size: 11px;
}

.meter {
    height: 5px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.07);
}

.meter-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--cyan), var(--magenta));
    box-shadow: 0 0 10px var(--cyan);
    transition: width 0.18s linear;
}

.rpm-fill {
    background: linear-gradient(90deg, var(--cyan), var(--magenta), var(--red));
}

.odometer strong {
    display: block;
    margin-top: 4px;
    font-family: Consolas, monospace;
    font-size: 14px;
    letter-spacing: 0.08em;
}

.hud-footer {
    padding: 10px 6px 2px;
    border-top: 1px solid rgba(0, 247, 255, 0.18);
    font-family: Consolas, monospace;
}

.signal {
    color: var(--green);
}

@keyframes loadBar {
    to { width: 100%; }
}

@keyframes bootIn {
    from { opacity: 0; transform: translateY(18px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes scan {
    from { transform: translateY(-8px); }
    to { transform: translateY(8px); }
}

@keyframes gridMove {
    from { background-position: 0 0, 0 0; }
    to { background-position: 0 42px, 42px 0; }
}

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

@media (max-width: 900px), (max-height: 600px) {
    .speedometer {
        right: 15px;
        bottom: 15px;
        transform-origin: bottom right;
        scale: 0.82;
    }
}

@media (max-width: 650px) {
    .speedometer {
        scale: 0.66;
    }
}


/* =========================================================
   COMPACT MODE — DESAIN CYBERPUNK LAMA, UKURAN KECIL
   ========================================================= */

.speedometer {
    right: 20px;
    bottom: 20px;
    width: 20vw;
    min-width: 280px;
    max-width: 390px;
    min-height: 245px;
    padding: 14px;
    transform-origin: bottom right;
}

.main-cluster {
    grid-template-columns: minmax(145px, 1.15fr) minmax(110px, 0.85fr);
    gap: 10px;
    padding: 10px 0;
}

.gauge {
    width: 100%;
    height: 185px;
}

.gauge-svg {
    width: 185px;
    height: 185px;
}

.gauge-center {
    width: 145px;
}

.speed-value {
    font-size: clamp(38px, 3vw, 52px);
}

.speed-unit {
    font-size: 9px;
}

.gear-box {
    margin-top: 10px;
    padding: 4px 9px;
}

.gear-box strong {
    font-size: 17px;
}

.telemetry {
    gap: 7px;
    padding-right: 2px;
}

.telemetry-card,
.odometer {
    padding: 7px 8px;
}

.telemetry-heading {
    margin-bottom: 5px;
}

.telemetry-heading strong,
.odometer strong {
    font-size: 10px;
}

.hud-header {
    padding-bottom: 9px;
}

.hud-footer {
    padding-top: 8px;
    font-size: 8px;
}

.status-icon {
    min-width: 42px;
    padding: 4px 5px;
    font-size: 8px;
}

/* Welcome sekarang memakai ukuran dan posisi yang sama dengan speedometer */
.welcome-screen {
    inset: auto 20px 20px auto;
    width: 20vw;
    min-width: 280px;
    max-width: 390px;
    min-height: 245px;
    height: auto;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 0;
    clip-path: polygon(
        16px 0,
        100% 0,
        100% calc(100% - 16px),
        calc(100% - 16px) 100%,
        0 100%,
        0 16px
    );
    box-shadow:
        0 0 30px rgba(0, 247, 255, 0.12),
        inset 0 0 35px rgba(0, 0, 0, 0.45);
}

.welcome-screen::after {
    box-shadow: inset 0 0 70px #000;
}

.welcome-grid {
    inset: -45%;
    background-size: 28px 28px;
}

.welcome-content {
    width: calc(100% - 28px);
    padding: 22px 18px;
    box-sizing: border-box;
}

.welcome-logo {
    gap: 8px;
    font-size: clamp(18px, 1.7vw, 26px);
    letter-spacing: 0.12em;
}

.welcome-subtitle {
    margin: 12px 0 18px;
    font-size: 8px;
    letter-spacing: 0.22em;
}

.loading-status {
    font-size: 8px;
}

.loading-track {
    height: 5px;
}

@media (max-width: 1000px) {
    .speedometer,
    .welcome-screen {
        width: 22vw;
        min-width: 270px;
    }
}

@media (max-width: 700px) {
    .speedometer,
    .welcome-screen {
        width: 300px;
        scale: 0.82;
        transform-origin: bottom right;
    }
}


/* === VEHICLE STATUS INDICATORS === */
.status-icons {
    gap: 5px;
    flex-wrap: nowrap;
}

.status-icon.icon-only {
    min-width: 29px;
    width: 29px;
    height: 29px;
    padding: 5px;
    display: inline-grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.025);
    color: rgba(125, 168, 176, 0.36);
}

.status-icon.icon-only svg {
    width: 17px;
    height: 17px;
    fill: currentColor;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.status-icon.icon-only .icon-line {
    fill: none;
}

.status-icon.icon-only.active {
    color: var(--green);
    border-color: rgba(64, 255, 138, 0.65);
    background: rgba(64, 255, 138, 0.07);
    box-shadow:
        0 0 10px rgba(64, 255, 138, 0.28),
        inset 0 0 9px rgba(64, 255, 138, 0.04);
}

#leftIndicatorTop.active,
#rightIndicatorTop.active {
    animation: topIndicatorBlink 0.72s steps(1) infinite;
}

#headlightIcon.active {
    color: var(--cyan);
    border-color: rgba(0, 247, 255, 0.72);
    background: rgba(0, 247, 255, 0.07);
    box-shadow: 0 0 12px rgba(0, 247, 255, 0.28);
}

#headlightIcon.high-beam {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.86);
    box-shadow:
        0 0 9px rgba(255, 255, 255, 0.65),
        0 0 18px rgba(0, 247, 255, 0.35);
}

#lockIcon.locked {
    color: var(--red);
    border-color: rgba(255, 36, 95, 0.72);
    background: rgba(255, 36, 95, 0.07);
    box-shadow: 0 0 12px rgba(255, 36, 95, 0.28);
}

#lockIcon.unlocked {
    color: var(--green);
    border-color: rgba(64, 255, 138, 0.58);
    background: rgba(64, 255, 138, 0.05);
}

#seatbeltIcon.active {
    color: var(--green);
}

#seatbeltIcon.danger {
    color: var(--red);
    border-color: rgba(255, 36, 95, 0.72);
    animation: seatbeltWarning 1s ease-in-out infinite;
}

@keyframes topIndicatorBlink {
    0%, 48% {
        opacity: 1;
        filter: drop-shadow(0 0 6px var(--green));
    }
    49%, 100% {
        opacity: 0.2;
        filter: none;
    }
}

@keyframes seatbeltWarning {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.45; }
}


/* === SMALLER STATUS INDICATORS === */
.status-icons {
    gap: 3px;
}

.status-icon.icon-only {
    min-width: 23px;
    width: 23px;
    height: 23px;
    padding: 4px;
}

.status-icon.icon-only svg {
    width: 13px;
    height: 13px;
}

@media (max-width: 1000px) {
    .status-icon.icon-only {
        min-width: 21px;
        width: 21px;
        height: 21px;
        padding: 3px;
    }

    .status-icon.icon-only svg {
        width: 12px;
        height: 12px;
    }
}


/* === TYRELL HAYWOOD WELCOME PROFILE === */
.welcome-character {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    text-align: left;
}

.welcome-avatar-wrap {
    position: relative;
    width: 92px;
    height: 132px;
    overflow: hidden;
    border: 1px solid rgba(0, 247, 255, 0.52);
    background:
        linear-gradient(180deg, rgba(0, 247, 255, 0.08), transparent),
        rgba(2, 6, 15, 0.88);
    clip-path: polygon(
        12px 0,
        100% 0,
        100% calc(100% - 12px),
        calc(100% - 12px) 100%,
        0 100%,
        0 12px
    );
    box-shadow:
        0 0 15px rgba(0, 247, 255, 0.2),
        inset 0 0 20px rgba(0, 247, 255, 0.06);
}

.welcome-avatar-wrap::before,
.welcome-avatar-wrap::after {
    content: "";
    position: absolute;
    z-index: 2;
    pointer-events: none;
}

.welcome-avatar-wrap::before {
    inset: 0;
    background:
        repeating-linear-gradient(
            to bottom,
            transparent 0,
            transparent 3px,
            rgba(255, 255, 255, 0.025) 4px
        );
}

.welcome-avatar-wrap::after {
    left: 8px;
    right: 8px;
    bottom: 7px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--cyan), transparent);
    box-shadow: 0 0 8px var(--cyan);
}

.welcome-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    transform: scale(1.08);
    filter:
        contrast(1.03)
        saturate(0.92)
        drop-shadow(0 0 8px rgba(0, 247, 255, 0.15));
}

.welcome-copy {
    min-width: 0;
}

.welcome-kicker {
    margin-bottom: 6px;
    color: var(--cyan);
    font-family: Consolas, monospace;
    font-size: 8px;
    letter-spacing: 0.2em;
}

.welcome-name {
    display: flex;
    flex-direction: column;
    line-height: 0.95;
    font-family: var(--font-digital, "Segoe UI", sans-serif);
    letter-spacing: 0.07em;
    text-shadow: 0 0 13px rgba(0, 247, 255, 0.3);
}

.welcome-name span {
    color: #ffffff;
    font-size: clamp(14px, 1.2vw, 20px);
    font-weight: 400;
}

.welcome-name strong {
    margin-top: 4px;
    color: var(--cyan);
    font-size: clamp(18px, 1.55vw, 26px);
    font-weight: 900;
}

.welcome-character .welcome-subtitle {
    margin: 11px 0 14px;
    text-align: left;
    font-size: 7px;
    letter-spacing: 0.17em;
}

.welcome-character .loading-status {
    gap: 8px;
    font-size: 7px;
}

@media (max-width: 700px) {
    .welcome-character {
        grid-template-columns: 82px minmax(0, 1fr);
        gap: 11px;
    }

    .welcome-avatar-wrap {
        width: 82px;
        height: 118px;
    }
}


/* =========================================================
   MINI MUSIC PLAYER
   ========================================================= */

.hud-footer {
    display: block;
}

.footer-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.music-player {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 7px;
    margin-top: 7px;
    padding-top: 7px;
    border-top: 1px solid rgba(0, 247, 255, 0.12);
}

.track-name {
    min-width: 0;
    overflow: hidden;
    color: var(--muted);
    font-family: Consolas, monospace;
    font-size: 7px;
    letter-spacing: 0.08em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.track-name.active {
    color: var(--cyan);
    text-shadow: 0 0 8px rgba(0, 247, 255, 0.34);
}

.music-controls {
    display: flex;
    align-items: center;
    gap: 3px;
}

.music-button {
    width: 21px;
    height: 21px;
    padding: 4px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(0, 247, 255, 0.18);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.025);
    color: rgba(238, 252, 255, 0.5);
    cursor: pointer;
    outline: none;
    transition:
        color 0.18s ease,
        border-color 0.18s ease,
        background 0.18s ease,
        box-shadow 0.18s ease,
        transform 0.12s ease;
}

.music-button:hover,
.music-button:focus-visible {
    color: var(--cyan);
    border-color: rgba(0, 247, 255, 0.62);
    background: rgba(0, 247, 255, 0.06);
    box-shadow: 0 0 9px rgba(0, 247, 255, 0.2);
}

.music-button:active {
    transform: scale(0.91);
}

.music-button svg {
    width: 12px;
    height: 12px;
    fill: currentColor;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.music-button .volume-wave {
    fill: none;
}

.music-main-button {
    color: var(--cyan);
    border-color: rgba(0, 247, 255, 0.45);
}

.music-main-button .stop-icon {
    display: none;
}

.music-main-button.playing {
    color: var(--magenta);
    border-color: rgba(212, 0, 255, 0.55);
    box-shadow: 0 0 9px rgba(212, 0, 255, 0.18);
}

.music-main-button.playing .play-icon {
    display: none;
}

.music-main-button.playing .stop-icon {
    display: block;
}

.music-button.muted {
    color: var(--red);
    border-color: rgba(255, 36, 95, 0.52);
}

@media (max-width: 700px) {
    .music-button {
        width: 20px;
        height: 20px;
    }

    .track-name {
        max-width: 92px;
    }
}
