/* ==========================================================
   BASE
========================================================== */
html, body {
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: #ffffff;
    font-family: 'Oxanium', sans-serif;
}

#viewer {
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

/* ==========================================================
   CAR + HUD
========================================================== */

.car-stage {
    width: 90%;
    height: calc(100vh - 420px);
    margin: 0 auto;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* LOGO */
.wp-logo {
    position: absolute;
    top: 40px;
    left: 40px;
    width: 240px;
    z-index: 300;
    pointer-events: none;
}

/* MAIN CAR - MUST BE BELOW EVERYTHING */
.car-img {
    width: 75%;
    z-index: 0;
    position: relative;
    transition: opacity .35s ease-in-out;
}
.car-img.fade-out { opacity: 0; }

.new-image-reveal {
    opacity: 0;
    animation: reveal .6s ease forwards;
}

@keyframes reveal {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

/* HUD layers — NEVER block UI */
.scan-overlay,
.scan-line,
.wire-overlay,
.glitch-overlay {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 75%;
    height: auto;
    transform: translate(-50%, -50%);
    opacity: 0;
    pointer-events: none !important;
    z-index: 200;
}

/* HUD animations */
.scan-overlay.screen-noise {
    opacity: .25;
    animation: noiseFlick .12s steps(2) infinite;
}
@keyframes noiseFlick {
    0% { opacity: .15; }
    50% { opacity: .25; }
    100% { opacity: .15; }
}

/* Wireframe longer fade */
.wire-overlay.glitch-burst {
    animation: wireFade 1.2s ease-out;
}
@keyframes wireFade {
    0% { opacity: 0; }
    15% { opacity: .9; }
    50% { opacity: .6; }
    80% { opacity: .25; }
    100% { opacity: 0; }
}

/* Teal glitch — max 25%, flicker + jitter */
.glitch-overlay.glitch-hit {
    animation: tealGlitch .45s ease-out;
}

@keyframes tealGlitch {
    0%   { opacity: 0; transform: translate(-50%, -50%); }
    20%  { opacity: .25; transform: translate(-50.2%, -50.3%); }
    40%  { opacity: .15; transform: translate(-49.9%, -50.1%); }
    60%  { opacity: .25; transform: translate(-50.1%, -49.8%); }
    80%  { opacity: .10; transform: translate(-50.0%, -50.2%); }
    100% { opacity: 0; transform: translate(-50%, -50%); }
}

/* Scanline */
.scan-line.sweep {
    opacity: 1;
    animation: sweepLine .8s cubic-bezier(.4,0,.2,1) forwards;
}
@keyframes sweepLine {
    0% { top: -20%; opacity: 0; }
    20% { opacity: 1; }
    100% { top: calc(100% - 80px); opacity: 0; }
}

/* ==========================================================
   TITLE
========================================================== */

.car-title {
    position: relative;
    z-index: 500;
    text-align: center;
    font-size: 34px;
    margin-top: 10px;
    color: #444;
    text-shadow: 0 0 6px #fff, 0 0 15px #fff;
}

/* ==========================================================
   SEARCH + INFO
========================================================== */

.action-row {
    width: 90%;
    margin: 15px auto 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 600;
    position: relative;
}

.search-field {
    width: 260px;
    background: #e6e6e6;
    border-radius: 6px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
}

.search-field input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 14px;
    color: #333;
}

.search-icon {
    cursor: pointer;
}

.info-right-block {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.colour-info-btn {
    padding: 10px 16px;
    background: rgba(0,0,0,0.65);
    color: #fff;
    font-size: 13px;
    border-radius: 6px;
    text-decoration: none;
}

.generated-note {
    font-size: 11px;
    color: #777;
    margin-top: 5px;
}

/* ==========================================================
   SCROLLBAR + TRIANGLES
========================================================== */

.scroll-wrapper {
    width: 100%;
    margin-top: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 18px;
    position: relative;
    z-index: 600;
}

/* New triangle buttons */
.scroll-arrow {
    width: 34px;
    height: 34px;
    background: #dcdcdc;
    border-radius: 4px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 18px;
    cursor: pointer;
    user-select: none;
}
.scroll-arrow:hover {
    background: #c5c5c5;
}

.scroll-rail {
    width: 70%;
    height: 8px;
    background: #ccc;
    border-radius: 4px;
    position: relative;
}

.scroll-knob {
    width: 30px;
    height: 30px;
    background: #0076ff;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
}

/* ==========================================================
   THUMBS (closer to scroll bar)
========================================================== */

.thumb-strip {
    margin-top: 10px;      /* ← dichter bij scrollbalk */
    padding: 10px 20px;    /* ← thumbnails hoger */
    display: flex;
    gap: 35px;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    position: relative;
    z-index: 600;
}

.thumb {
    width: 180px;
    text-align: center;
}

.thumb img {
    width: 180px;
    transition: .25s;
}
.thumb.active img {
    outline: 5px solid #0076ff;
}

.thumb-code {
    font-size: 13px;
    color: #444;
    margin-top: 5px;
}

.thumb-name {
    font-size: 11px;
    color: #777;
}

/* ==========================================================
   MOBILE
========================================================== */

@media (max-width: 768px) {

    .car-stage {
        height: calc(100vh - 500px);
    }

    .action-row {
        flex-direction: column;
        gap: 15px;
    }

    .scroll-wrapper {
        gap: 8px;
    }
}
