/* ==========================================================================
   Dashboard, Windshield & Car Console Styles
   ========================================================================== */

/* Rearview Mirror */
#rearview {
    position: absolute;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    width: 260px;
    height: 85px;
    background: var(--dash-base);
    border: 2px solid #111;
    border-bottom: 5px solid #0a0a0a;
    border-radius: 12px 12px 25px 25px;
    z-index: 15;
    box-shadow: 0 20px 30px rgba(0,0,0,0.8), inset 0 2px 5px rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
}

#rearview-glass {
    width: 96%;
    height: 86%;
    background: #050505;
    border-radius: 8px 8px 18px 18px;
    position: relative;
    box-shadow: inset 0 0 10px #000;
    overflow: hidden;
}

#rv-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

#rearview-glass::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(rgba(255,255,255,0.08), transparent 60%);
    border-radius: inherit;
    pointer-events: none;
}

/* Dashboard Bottom Shell */
#dashboard-wrapper {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 22vh;
    min-height: 150px;
    max-height: 220px;
    z-index: 10;
}

.dash-body {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--dash-base);
    border-top: 4px solid #111;
    box-shadow: 0 -15px 50px rgba(0,0,0,0.9);
}

.dash-body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--plastic-texture);
    pointer-events: none;
    opacity: 0.8;
}

.dash-body::after {
    content: '';
    position: absolute;
    top: 100%;
    left: -50vw;
    width: 200vw;
    height: 100vh;
    background: var(--dash-base);
    pointer-events: none;
}

.dash-rim {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 25px;
    background: linear-gradient(180deg, var(--dash-highlight) 0%, var(--dash-base) 100%);
    border-bottom: 2px solid #0a0a0a;
}

/* Center Radio Panel */
.console-center-anchor {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 12;
}

.console-panel {
    background: #111;
    border-radius: 8px 8px 0 0;
    border: 2px solid #050505;
    border-bottom: none;
    border-top: 2px solid #2a2a2a;
    box-shadow: inset 0 5px 15px rgba(0,0,0,0.8), 0 -5px 15px rgba(0,0,0,0.8);
    display: flex;
    flex-direction: row;
    align-items: center; 
    padding: 10px 15px;
    position: relative;
    height: 90%;
}

/* Climate Module */
.climate-module {
    position: absolute;
    right: 100%;
    margin-right: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    width: 220px;
    gap: 10px;
    background: #111;
    border-radius: 8px;
    border: 2px solid #050505;
    border-top: 2px solid #2a2a2a;
    padding: 10px;
    box-shadow: inset 0 5px 15px rgba(0,0,0,0.8), 0 5px 15px rgba(0,0,0,0.8);
}

.ac-vents-container {
    width: 100%;
    height: 36px;
    background: #0a0a0a;
    border-radius: 4px;
    border: 1px solid #000;
    border-bottom: 2px solid #222;
    display: flex;
    justify-content: space-between;
    padding: 4px;
    box-shadow: inset 0 5px 10px #000;
}

.ac-vent {
    width: 48%;
    height: 100%;
    background: #000;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    padding: 2px 0;
    position: relative;
}

.ac-slat {
    width: 100%;
    height: 2px;
    background: linear-gradient(180deg, #333, #111);
    border-bottom: 1px solid #000;
}

.ac-dial {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: -2px;
    width: 10px;
    height: 100%;
    background: linear-gradient(90deg, #111, #333, #111);
    border: 1px solid #000;
    border-radius: 2px;
}

.climate-controls {
    width: 100%;
    background: #151515;
    border-radius: 4px;
    border: 1px solid #050505;
    padding: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: inset 0 2px 5px rgba(255,255,255,0.05);
}

.climate-dial-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.climate-dial {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #333, #111);
    border: 2px solid #000;
    position: relative;
    box-shadow: 0 3px 5px #000;
}

.climate-dial::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 50%;
    width: 2px;
    height: 5px;
    background: #fff;
    transform: translateX(-50%);
}

.climate-buttons { display: flex; gap: 4px; }
.c-btn {
    width: 18px;
    height: 12px;
    background: #111;
    border: 1px solid #000;
    border-top: 1px solid #333;
    border-radius: 2px;
    position: relative;
}
.c-btn.active::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 2px;
    background: #0f0;
    box-shadow: 0 0 4px #0f0;
}

/* Radio Module */
.radio-unit {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
    width: 280px;
}

.radio-top-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.radio-lcd-bezel {
    flex-grow: 1;
    height: 32px;
    background: #050505;
    border: 2px inset #111;
    border-radius: 2px;
    padding: 2px 4px;
    display: flex;
    align-items: center;
}

.radio-lcd {
    width: 100%;
    height: 100%;
    background: #1a0800;
    font-family: 'VT323', monospace;
    color: var(--lcd-color);
    font-size: 1.3rem;
    text-shadow: 0 0 5px var(--lcd-color);
    display: flex;
    align-items: center;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 0 10px #000;
}

.radio-lcd::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(transparent 50%, rgba(0,0,0,0.3) 50%);
    background-size: 100% 4px;
    pointer-events: none;
}

@keyframes scrollLcd {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

.lcd-text { white-space: nowrap; }
.lcd-scrolling { display: inline-block; animation: scrollLcd 5s linear infinite; }

.tape-deck {
    width: 100px;
    height: 20px;
    background: #050505;
    flex-shrink: 0;
    border: 2px solid #000;
    border-bottom: 2px solid #222;
    border-radius: 2px;
    position: relative;
}

.tape-deck::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 5px;
    right: 5px;
    height: 2px;
    background: #000;
    transform: translateY(-50%);
    border-radius: 2px;
}

.radio-controls-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.knob-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.knob-label {
    font-size: 0.4rem;
    color: #888;
    font-weight: bold;
    text-transform: uppercase;
}

.radio-knob {
    width: 28px;
    height: 28px;
    background: radial-gradient(circle at 30% 30%, #333, #050505);
    border-radius: 50%;
    border: 1px solid #000;
    box-shadow: 0 4px 6px rgba(0,0,0,0.8), inset 0 1px 2px rgba(255,255,255,0.1);
    position: relative;
    cursor: pointer;
    transition: transform 0.1s;
    touch-action: none;
}

.radio-knob::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 50%;
    width: 2px;
    height: 5px;
    background: #ff3300;
    transform: translateX(-50%);
    border-radius: 1px;
    box-shadow: 0 0 3px #ff3300;
}

.radio-buttons-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 2px;
}

.radio-btn {
    height: 14px;
    min-width: 26px;
    background: linear-gradient(180deg, #2a2a2a, #111);
    border: 1px solid #000;
    border-radius: 2px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
    font-size: 0.5rem;
    box-shadow: 0 2px 2px #000;
}

.radio-btn:active {
    transform: translateY(1px);
    box-shadow: 0 0px 1px #000;
    background: #111;
}

.radio-btn.led-active {
    color: #ff3300;
    text-shadow: 0 0 5px #ff3300;
}

/* Steering Wheel */
@keyframes gentleTurn {
    0% { transform: rotate(0deg); }
    25% { transform: rotate(6deg); }
    50% { transform: rotate(-3deg); }
    75% { transform: rotate(4deg); }
    100% { transform: rotate(0deg); }
}

#steering-wheel {
    position: absolute;
    left: calc(50% + 200px);
    bottom: -80px;
    width: 400px;
    height: 400px;
    border: 35px solid #111;
    box-shadow: inset 0 15px 25px rgba(0,0,0,0.9), inset 0 -5px 15px rgba(255,255,255,0.05), 0 15px 35px rgba(0,0,0,0.9), 0 0 0 1px #000;
    border-radius: 50%;
    z-index: 20;
    background: transparent;
    animation: gentleTurn 4s ease-in-out infinite;
}

#steering-wheel::before {
    content: '';
    position: absolute;
    top: -35px;
    left: -35px;
    right: -35px;
    bottom: -35px;
    border-radius: 50%;
    border: 35px solid transparent;
    background-image: var(--plastic-texture);
    pointer-events: none;
    opacity: 0.5;
    -webkit-mask: radial-gradient(transparent 58%, black 60%);
    mask: radial-gradient(transparent 58%, black 60%);
}

#steering-wheel-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 140px;
    height: 140px;
    background: radial-gradient(circle at 40% 30%, #2a2a2a, #0a0a0a);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 -4px 10px rgba(0,0,0,1), 0 10px 20px rgba(0,0,0,0.9);
    border: 2px solid #151515;
}

#steering-wheel-center::after {
    content: '';
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid #0a0a0a;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.8);
}

.steering-spoke {
    position: absolute;
    background: linear-gradient(to bottom, #1a1a1a, #050505);
    box-shadow: 0 10px 15px rgba(0,0,0,0.8);
}

#spoke-left {
    top: 50%;
    left: -10px;
    width: 100px;
    height: 50px;
    transform: translateY(-50%);
    border-radius: 10px 0 0 10px;
}

#spoke-right {
    top: 50%;
    right: -10px;
    width: 100px;
    height: 50px;
    transform: translateY(-50%);
    border-radius: 0 10px 10px 0;
}

#spoke-bottom {
    bottom: -10px;
    left: 50%;
    width: 60px;
    height: 110px;
    transform: translateX(-50%);
    background: linear-gradient(to right, #050505, #222, #050505);
    border-radius: 0 0 10px 10px;
}

/* Hanging Maneki-Neko */
@keyframes sway {
    0% { transform: translateX(-50%) rotate(5deg); }
    50% { transform: translateX(-50%) rotate(-5deg); }
    100% { transform: translateX(-50%) rotate(5deg); }
}

#hanging-cat {
    position: absolute;
    top: 70px;
    left: 50%;
    z-index: 14;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    transform-origin: top center;
    animation: sway 4s ease-in-out infinite;
    cursor: pointer;
}

@keyframes catGlow {
    0%, 100% { filter: drop-shadow(0 0 4px rgba(240, 45, 32, 0.4)); }
    50% { filter: drop-shadow(0 0 12px rgba(240, 45, 32, 0.9)); }
}

#hanging-cat .string {
    width: 2px;
    height: 60px;
    background: #222;
    box-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

#hanging-cat .cat-icon {
    font-size: 2.5rem;
    line-height: 1;
    margin-top: -2px;
    transition: transform 0.2s;
    animation: catGlow 2s infinite ease-in-out;
}

#hanging-cat:hover .cat-icon {
    transform: scale(1.15) rotate(-5deg);
    filter: drop-shadow(0 0 16px rgba(240, 45, 32, 1));
}

/* Windshield Crack (Blog 2 Link) */
#windshield-crack {
    position: absolute;
    top: 38%;
    left: 22%;
    z-index: 14;
    display: flex;
    align-items: center;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.25s ease, filter 0.25s ease;
}

@keyframes crackPulse {
    0%, 100% {
        filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.5));
    }
    50% {
        filter: drop-shadow(0 0 10px rgba(240, 45, 32, 0.85)) drop-shadow(0 0 3px rgba(255, 255, 255, 0.9));
    }
}

#windshield-crack .crack-svg {
    width: 58px;
    height: 58px;
    animation: crackPulse 3.5s infinite ease-in-out;
    transition: transform 0.25s ease, filter 0.25s ease;
}

#windshield-crack:hover .crack-svg {
    transform: scale(1.15) rotate(-2deg);
    filter: drop-shadow(0 0 16px rgba(240, 45, 32, 1)) drop-shadow(0 0 4px #ffffff);
}

#windshield-crack .crack-badge {
    font-family: 'Caveat', cursive, sans-serif;
    font-size: 21px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.88);
    letter-spacing: 0.03em;
    text-shadow: 0 0 3px rgba(255, 255, 255, 0.9), 0 0 10px rgba(255, 255, 255, 0.4), 0 0 16px rgba(240, 45, 32, 0.35);
    background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0) 75%);
    border: none;
    padding: 2px 10px;
    transform: translateY(-50%) rotate(-3deg);
    white-space: nowrap;
    transition: all 0.25s ease;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 7px;
}

#windshield-crack:hover .crack-badge {
    color: #ffffff;
    text-shadow: 0 0 4px #ffffff, 0 0 12px rgba(255, 255, 255, 0.85), 0 0 22px rgba(240, 45, 32, 0.85);
    transform: translateY(-50%) rotate(-1deg) scale(1.06);
}

#windshield-crack .crack-badge .crack-arrow {
    font-size: 22px;
    line-height: 1;
    display: inline-block;
    transition: transform 0.2s ease;
}

#windshield-crack:hover .crack-badge .crack-arrow {
    transform: translateX(-4px);
}

/* Mobile Responsiveness for Dashboard */
@media (max-width: 768px) {
    #windshield-crack {
        top: 28%;
        left: 10%;
    }
    #windshield-crack .crack-svg {
        width: 48px;
        height: 48px;
    }
    #steering-wheel {
        width: 260px;
        height: 260px;
        border-width: 22px;
        left: auto;
        right: -100px;
        bottom: -40px;
    }
    #steering-wheel-center {
        width: 90px;
        height: 90px;
    }
}
