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

:root {
    --sat: env(safe-area-inset-top, 0px);
    --sab: env(safe-area-inset-bottom, 0px);
    --sal: env(safe-area-inset-left, 0px);
    --sar: env(safe-area-inset-right, 0px)
}

html,
body {
    width: 100vw;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    overflow-y: auto;
    background-color: #041021;
    color: #f6eee2;
    font-family: "Plus Jakarta Sans", sans-serif
}

body {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto minmax(132px, auto) auto auto;
    align-content: stretch
}

body>header,
body>div:not(.film-grain):not(#sky-layer) {
    min-width: 0;
    width: 100%
}

.truck-title-shadow {
    text-shadow: 0 2px 0 #8b1e22, 0 4px 0 #5c1215, 0 6px 0 #2b080a, 0 10px 24px rgba(0, 0, 0, 0.75), 0 0 35px rgba(224, 109, 40, 0.4)
}

.truck-sub-shadow {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9), 0 2px 8px rgba(0, 0, 0, 0.6)
}

.glass-player {
    position: relative;
    overflow: hidden;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0.045) 42%, rgba(5, 8, 18, 0.72) 100%), linear-gradient(135deg, rgba(35, 18, 32, 0.78) 0%, rgba(8, 10, 22, 0.9) 100%);
    backdrop-filter: blur(30px) saturate(210%);
    -webkit-backdrop-filter: blur(30px) saturate(210%);
    border: 1px solid rgba(246, 238, 226, 0.24);
    box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.08) inset, 0 1px 0 rgba(255, 255, 255, 0.25) inset, 0 0 28px -4px rgba(226, 108, 36, 0.15);
    transition: all 0.3s ease
}

.glass-player::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(circle at 12% 0%, rgba(244, 196, 99, 0.26), transparent 34%), linear-gradient(120deg, rgba(255, 255, 255, 0.18), transparent 28% 72%, rgba(255, 255, 255, 0.08));
    opacity: 0.7;
    mix-blend-mode: screen
}

.glass-player>* {
    position: relative;
    z-index: 1
}

.glass-player:hover {
    border-color: rgba(244, 196, 99, 0.3);
    box-shadow: 0 24px 60px -10px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.12) inset, 0 1px 0 rgba(255, 255, 255, 0.35) inset, 0 0 35px -2px rgba(226, 108, 36, 0.25)
}

.glass-pill {
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.15)
}

.glass-button {
    background: rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.18);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1)
}

.glass-button:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(244, 196, 99, 0.5);
    color: #fff;
    box-shadow: 0 6px 18px rgba(226, 108, 36, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.35);
    transform: translateY(-1px)
}

.glass-button:active {
    transform: scale(0.95)
}

.glass-play-btn {
    background: linear-gradient(135deg, #fef08a 0%, #f4c463 50%, #e26c24 100%);
    color: #1a0608;
    border: 1.5px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 0 24px rgba(226, 108, 36, 0.55), 0 4px 12px rgba(0, 0, 0, 0.5), inset 0 1px 2px rgba(255, 255, 255, 0.9);
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1)
}

.glass-play-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 0 32px rgba(244, 196, 99, 0.75), 0 6px 18px rgba(0, 0, 0, 0.6), inset 0 1px 2px rgba(255, 255, 255, 1)
}

.glass-play-btn:active {
    transform: scale(0.94)
}

.glass-play-btn.is-playing {
    animation: pulseHalo 2s infinite ease-in-out
}

@keyframes pulseHalo {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(226, 108, 36, 0.55), inset 0 1px 2px rgba(255, 255, 255, 0.9)
    }

    50% {
        box-shadow: 0 0 34px rgba(244, 196, 99, 0.85), inset 0 1px 2px rgba(255, 255, 255, 0.9)
    }
}

@keyframes twinkle {

    0%,
    100% {
        opacity: 0.2;
        transform: scale(0.8)
    }

    50% {
        opacity: 1;
        transform: scale(1.2);
        box-shadow: 0 0 8px rgba(255, 255, 255, 0.8)
    }
}

@keyframes horn-glow-pulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(234, 179, 8, 0)
    }

    50% {
        box-shadow: 0 0 18px 6px rgba(234, 179, 8, 0.45)
    }
}

.film-grain {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 99;
    opacity: 0.045;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E")
}

.headlight-cone {
    background: radial-gradient(ellipse at left bottom, rgba(255, 245, 190, 0.42) 0%, rgba(255, 220, 140, 0.18) 35%, rgba(224, 109, 40, 0.06) 65%, transparent 80%);
    filter: blur(14px);
    pointer-events: none
}

.glass-range-slider {
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.15);
    height: 5px;
    border-radius: 9999px;
    outline: none;
    transition: all 0.2s;
    cursor: pointer
}

.glass-range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: #f4c463;
    border: 2px solid #fff;
    box-shadow: 0 0 8px rgba(244, 196, 99, 0.8);
    cursor: pointer;
    transition: transform 0.15s ease
}

.glass-range-slider::-webkit-slider-thumb:hover {
    transform: scale(1.25)
}

.glass-range-slider::-moz-range-thumb {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: #f4c463;
    border: 2px solid #fff;
    box-shadow: 0 0 8px rgba(244, 196, 99, 0.8);
    cursor: pointer
}

@keyframes roadDash {
    0% {
        stroke-dashoffset: 0
    }

    100% {
        stroke-dashoffset: -120
    }
}

.animated-road-line {
    animation: roadDash 1.2s linear infinite
}

.animated-road-line-idle {
    animation: roadDash 4s linear infinite
}

@keyframes spinWheel {
    from {
        transform: rotate(0deg)
    }

    to {
        transform: rotate(360deg)
    }
}

.spin-wheel-active {
    animation: spinWheel 0.7s linear infinite
}

.spin-wheel-idle {
    animation: spinWheel 3.5s linear infinite
}

@keyframes truckSuspension {

    0%,
    100% {
        transform: translateY(0px)
    }

    50% {
        transform: translateY(-2.8px)
    }
}

.truck-suspension-playing {
    animation: truckSuspension 1.3s ease-in-out infinite
}

.truck-suspension-idle {
    animation: truckSuspension 3s ease-in-out infinite
}

@keyframes eqBar1 {

    0%,
    100% {
        height: 3px
    }

    50% {
        height: 16px
    }
}

@keyframes eqBar2 {

    0%,
    100% {
        height: 14px
    }

    50% {
        height: 4px
    }
}

@keyframes eqBar3 {

    0%,
    100% {
        height: 6px
    }

    50% {
        height: 18px
    }
}

@keyframes eqBar4 {

    0%,
    100% {
        height: 12px
    }

    50% {
        height: 3px
    }
}

.eq-bar-1 {
    animation: eqBar1 0.75s ease-in-out infinite
}

.eq-bar-2 {
    animation: eqBar2 0.95s ease-in-out infinite 0.15s
}

.eq-bar-3 {
    animation: eqBar3 0.85s ease-in-out infinite 0.3s
}

.eq-bar-4 {
    animation: eqBar4 1.05s ease-in-out infinite 0.45s
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(4, 10, 24, 0.82);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: modalFadeIn 0.25s ease-out
}

.modal-backdrop.active {
    display: flex
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.98)
    }

    to {
        opacity: 1;
        transform: scale(1)
    }
}

.custom-scroll::-webkit-scrollbar {
    width: 5px
}

.custom-scroll::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 9999px
}

.custom-scroll::-webkit-scrollbar-thumb {
    background: rgba(244, 196, 99, 0.35);
    border-radius: 9999px
}

.custom-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(244, 196, 99, 0.6)
}

.compact-hero-title {
    font-size: clamp(4.4rem, 8.2vw, 7rem) !important;
    line-height: 0.92 !important;
    letter-spacing: 0 !important
}

#highway-stage {
    min-height: clamp(168px, 29dvh, 252px) !important
}

#highway-stage>div:first-child {
    height: clamp(4.25rem, 8dvh, 5rem) !important
}

#truck-container {
    width: clamp(370px, 31vw, 500px) !important;
    bottom: 0.85rem !important
}

@media(max-height:920px) and (min-width:641px) {
    header {
        padding-top: max(0.55rem, var(--sat)) !important
    }

    .compact-hero-title {
        font-size: clamp(4rem, 7vw, 5.7rem) !important
    }

    #highway-stage {
        min-height: clamp(150px, 26dvh, 220px) !important
    }

    #truck-container {
        width: clamp(340px, 28vw, 455px) !important
    }

    .glass-player {
        padding: 0.9rem !important
    }
}

@media(max-height:760px) and (min-width:641px) {
    .compact-hero-title {
        font-size: clamp(3.25rem, 6vw, 4.7rem) !important
    }

    .compact-hide-small,
    #slogan-sub {
        display: none !important
    }

    #highway-stage {
        min-height: clamp(126px, 22dvh, 180px) !important
    }

    #truck-container {
        width: clamp(300px, 25vw, 390px) !important
    }
}

@media(max-width:640px) {

    html,
    body {
        overflow-x: hidden;
        overflow-y: auto
    }

    body {
        grid-template-rows: auto auto minmax(122px, 1fr) auto
    }

    .compact-hero-title {
        font-size: clamp(3.15rem, 16vw, 4.7rem) !important
    }

    .glass-player {
        border-radius: 1.25rem;
        box-shadow: 0 16px 34px -8px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.26) inset
    }

    #highway-stage {
        min-height: clamp(122px, 24dvh, 190px)
    }

    #truck-container {
        right: -7%;
        width: min(330px, 94vw)
    }

    .modal-backdrop {
        align-items: flex-end;
        padding: 0.75rem;
        padding-bottom: max(0.75rem, var(--sab))
    }
}

@media(max-height:680px) {
    .compact-hero-title {
        font-size: 2.75rem !important;
        line-height: 1 !important
    }

    .compact-hero-slogan {
        font-size: 0.95rem !important
    }

    .compact-hide-small {
        display: none !important
    }
}

#youtube-player-wrap iframe {
    width: 200px !important;
    height: 200px !important
}

.channel-btn {
    border: 1px solid rgba(255, 255, 255, .12);
    background: rgba(255, 255, 255, .06);
    color: rgba(246, 238, 226, .82);
    border-radius: 999px;
    padding: .38rem .7rem;
    font-family: "Baloo 2", cursive;
    font-size: .72rem;
    font-weight: 700;
    transition: .2s ease;
    cursor: pointer;
    backdrop-filter: blur(12px)
}

.channel-btn:hover {
    background: rgba(255, 255, 255, .12);
    transform: translateY(-1px)
}

.channel-btn.active {
    color: #fff7df;
    border-color: rgba(244, 196, 99, .65);
    background: rgba(226, 108, 36, .24);
    box-shadow: 0 0 18px rgba(244, 196, 99, .12)
}

.playlist-browser {
    min-height: min(68dvh, 620px)
}

#horn-youtube-player {
    position: fixed;
    width: 160px;
    height: 90px;
    left: -10000px;
    top: -10000px;
    opacity: .001;
    pointer-events: none
}

@media(max-width:640px) {
    .channel-btn {
        font-size: .64rem;
        padding: .3rem .55rem
    }

    .playlist-browser {
        min-height: 55dvh
    }
}

/* ===== NEW FEATURE STYLES ===== */
.weather-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 5;
    opacity: 0;
    transition: opacity 1.2s ease
}

.weather-overlay.active {
    opacity: 1
}

.rain-layer {
    background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' xmlns='http://www.w3.org/2000/svg'%3E%3Cline x1='10' y1='0' x2='6' y2='12' stroke='%23a5c4d4' stroke-width='1' opacity='0.4'/%3E%3C/svg%3E");
    background-size: 40px 80px;
    animation: rainFall 0.6s linear infinite
}

@keyframes rainFall {
    0% {
        background-position: 0 0
    }

    100% {
        background-position: 0 80px
    }
}

.fog-layer {
    background: rgba(200, 210, 220, 0.35);
    backdrop-filter: blur(8px)
}

.golden-tint {
    background: rgba(255, 160, 60, 0.15);
    mix-blend-mode: overlay
}

@keyframes sway {

    0%,
    100% {
        transform: rotate(-6deg)
    }

    50% {
        transform: rotate(6deg)
    }
}

.nimbu-sway-playing {
    animation: sway 0.8s ease-in-out infinite;
    transform-origin: top center
}

.nimbu-sway-idle {
    animation: sway 2.5s ease-in-out infinite;
    transform-origin: top center
}

.tab-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(246, 238, 226, 0.7);
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.12)
}

.tab-btn.active {
    background: rgba(226, 108, 36, 0.3);
    border-color: rgba(244, 196, 99, 0.5);
    color: #f4c463
}

.song-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.8rem;
    border-radius: 0.75rem;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s
}

.song-row:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1)
}

.song-row.is-current {
    background: linear-gradient(90deg, rgba(127, 29, 29, 0.6), rgba(120, 53, 15, 0.5));
    border-color: rgba(244, 196, 99, 0.5)
}

.song-index-box {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 0.35rem;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 800;
    flex-shrink: 0
}

.song-row.is-current .song-index-box {
    background: #f4c463;
    color: #12080a
}

.ambient-toggle {
    width: 2.25rem;
    height: 1.25rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.15);
    position: relative;
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.2)
}

.ambient-toggle::after {
    content: '';
    position: absolute;
    top: 1px;
    left: 1px;
    width: 0.9rem;
    height: 0.9rem;
    border-radius: 50%;
    background: #fff;
    transition: all 0.3s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3)
}

.ambient-toggle.on {
    background: rgba(244, 196, 99, 0.5);
    border-color: rgba(244, 196, 99, 0.7)
}

.ambient-toggle.on::after {
    left: calc(100% - 1.05rem)
}

.weather-btn {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.65rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    cursor: pointer;
    transition: all 0.2s
}

.weather-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px)
}

.weather-btn.active {
    background: rgba(226, 108, 36, 0.3);
    border-color: rgba(244, 196, 99, 0.5)
}

.paint-input {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 0.5rem;
    padding: 0.4rem 0.6rem;
    color: #f6eee2;
    font-family: "Baloo 2", cursive;
    font-size: 0.85rem;
    width: 100%;
    outline: none
}

.paint-input:focus {
    border-color: rgba(244, 196, 99, 0.5)
}

.shortcut-key {
    display: inline-block;
    padding: 0.15rem 0.4rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 0.35rem;
    font-family: "JetBrains Mono", monospace;
    font-size: 0.65rem;
    color: #f4c463;
    margin-right: 0.4rem
}

.timer-badge {
    font-size: 0.6rem;
    padding: 0.15rem 0.4rem;
    border-radius: 999px;
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.3)
}

.song-row {
    cursor: pointer;
}

.song-row:hover {
    background: rgba(255, 255, 255, .08);
}

.song-row.is-current {
    border-color: rgba(244, 196, 99, .45);
    background: rgba(226, 108, 36, .16);
}




/* Keep sky + highway artwork only in the top viewport area */
#sky-layer {
    position: fixed !important;
    inset: 0;
    height: 100dvh;
    max-height: 100vh;
    pointer-events: none;
    z-index: 0;
}

#highway-stage {
    position: relative;
    z-index: 10;
}

/* Solid cover for SEO so no background text shows through */
#about-truck-music {
    position: relative;
    z-index: 40;
    margin-top: 2rem;
    background: #041021;
    padding-top: 1.5rem;
}

#about-truck-music .glass-player {
    background: rgba(8, 12, 24, 0.97) !important;
    backdrop-filter: blur(24px);
    border: 1px solid rgba(246, 238, 226, 0.15);
}