/* ═════════════════════════════════════════════════════════════════
   CORVETTE C8 STINGRAY — LUXURY SHOWROOM CONFIGURATOR CSS
   Architecture: True 3D Virtual Camera · Zero-Gap Frame Accurate
   Aesthetic: American Supercar Luxury · Precision Glassmorphism
   ═════════════════════════════════════════════════════════════════ */

:root {
    --bg-black: #08090d;
    --corvette-red: #e61e2b;
    --corvette-red-glow: rgba(230, 30, 43, 0.45);
    --corvette-amber: #ff9d00;
    --corvette-blue: #0088ff;
    --glass-bg: rgba(14, 17, 24, 0.72);
    --glass-bg-hover: rgba(22, 28, 40, 0.85);
    --glass-border: rgba(255, 255, 255, 0.12);
    --glass-border-active: rgba(230, 30, 43, 0.8);
    --text-white: #ffffff;
    --text-muted: #8c93a4;
    --text-dim: #5a6275;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-heading: 'Montserrat', sans-serif;
}

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

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: var(--bg-black);
    font-family: var(--font-sans);
    color: var(--text-white);
    -webkit-user-select: none;
    user-select: none;
}

/* ── ORIENTATION LOCK (Mobile Portrait Modal) ─────────────────── */
.orientation-lock {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #05060a;
    z-index: 999999;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 24px;
}

@media (max-width: 900px) and (orientation: portrait) {
    .orientation-lock {
        display: flex;
    }
}

.orientation-content h2 {
    font-family: var(--font-heading);
    font-weight: 800;
    letter-spacing: 2px;
    margin: 20px 0 10px;
    font-size: 1.35rem;
}

.orientation-content p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.rotate-device-icon {
    animation: rotatePhone 2.4s infinite ease-in-out;
}

@keyframes rotatePhone {
    0%, 20% { transform: rotate(0deg); }
    50%, 80% { transform: rotate(90deg); }
    100% { transform: rotate(0deg); }
}

/* ── PRELOADER ───────────────────────────────────────────────── */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #08090d;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.preloader-content {
    text-align: center;
    width: 90%;
    max-width: 480px;
}

.preloader-badge {
    font-size: 0.72rem;
    letter-spacing: 4px;
    color: var(--corvette-red);
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 12px;
}

.brand-text {
    font-family: var(--font-heading);
    font-size: 2.6rem;
    font-weight: 900;
    letter-spacing: 5px;
    line-height: 1.1;
    color: #ffffff;
    text-transform: uppercase;
}

.brand-text span {
    color: var(--corvette-red);
}

.sub-brand {
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 4px;
    color: var(--text-muted);
    margin-top: 6px;
    margin-bottom: 28px;
    text-transform: uppercase;
}

.progress-bar-container {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 0 15px rgba(230, 30, 43, 0.25);
}

.progress-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #ff3b47, var(--corvette-red));
    transition: width 0.15s ease-out;
}

.progress-text {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--corvette-red);
    margin-top: 14px;
}

.loading-label {
    font-size: 0.72rem;
    letter-spacing: 2.5px;
    color: var(--text-dim);
    text-transform: uppercase;
    margin-top: 8px;
}

/* ── 3D VIRTUAL CAMERA STAGE & GIMBAL ───────────────────────── */
.camera-viewport {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    perspective: 1200px;
    perspective-origin: 50% 50%;
    overflow: hidden;
    z-index: 1;
}

.camera-rig {
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), filter 0.8s ease;
    will-change: transform, filter;
}

.vcamera-stage {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    will-change: transform;
}

.empty-scene-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.cinematic-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    pointer-events: none;
    z-index: 2;
    transition: opacity 0.25s ease;
    will-change: opacity;
}

.cinematic-video.active {
    opacity: 1;
    z-index: 4;
}

/* WebGL Dust Particles Canvas */
.gl-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 6;
}

/* Cinematic Vignette */
.vignette-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at center, transparent 45%, rgba(6, 8, 12, 0.7) 100%);
    pointer-events: none;
    z-index: 8;
}

/* ── HUD OVERLAY ─────────────────────────────────────────────── */
.hud-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 20;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 24px 32px;
    box-sizing: border-box;
    transition: opacity 0.6s ease;
}

/* ── TOP BAR ─────────────────────────────────────────────────── */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    pointer-events: auto;
    width: 100%;
    gap: 16px;
}

.top-bar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 10px 18px;
    border-radius: 999px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.brand-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--corvette-red);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 4px;
    letter-spacing: 1.5px;
}

.brand-title {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 2px;
    color: var(--text-white);
    text-transform: uppercase;
}

.brand-subtitle {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 1.5px;
    padding-left: 6px;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
}

/* Top Telemetry Specs Ticker */
.top-specs-ticker {
    display: flex;
    align-items: center;
    gap: 18px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 10px 22px;
    border-radius: 999px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.spec-item {
    font-size: 0.78rem;
    letter-spacing: 1px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.spec-item strong {
    font-family: var(--font-heading);
    font-weight: 800;
    color: #ffffff;
    font-size: 0.9rem;
}

.spec-sep {
    color: rgba(255, 255, 255, 0.2);
    font-size: 0.75rem;
}

.top-bar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-pill-action {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: var(--text-white);
    padding: 10px 18px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.25s ease;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.btn-pill-action:hover {
    background: var(--glass-bg-hover);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.btn-pill-cta {
    background: linear-gradient(135deg, #ff2e3b, #b3101c);
    border: 1px solid rgba(255, 100, 110, 0.4);
    color: #ffffff;
    padding: 10px 22px;
    border-radius: 999px;
    font-family: var(--font-heading);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 2px;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.25s ease;
    box-shadow: 0 8px 24px var(--corvette-red-glow);
}

.btn-pill-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(230, 30, 43, 0.6);
    filter: brightness(1.1);
}

/* Sound Bars Animation */
.sound-bars {
    display: flex;
    align-items: flex-end;
    gap: 2.5px;
    height: 12px;
}

.s-bar {
    width: 2.5px;
    height: 3px;
    background: var(--text-muted);
    border-radius: 1px;
    transition: height 0.2s ease, background 0.2s ease;
}

.sound-bars.active .s-bar {
    background: var(--corvette-red);
    animation: barBounce 1s infinite alternate ease-in-out;
}

.sound-bars.active .s-bar:nth-child(1) { animation-delay: 0.0s; height: 10px; }
.sound-bars.active .s-bar:nth-child(2) { animation-delay: 0.2s; height: 14px; }
.sound-bars.active .s-bar:nth-child(3) { animation-delay: 0.4s; height: 7px; }

@keyframes barBounce {
    0% { height: 3px; }
    100% { height: 13px; }
}

/* ── FLOATING CONTEXT MICRO-CAPSULE CONTAINER ─────────────────── */
.floating-context-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    pointer-events: auto;
    margin-top: auto;
    margin-bottom: 14px;
}

.context-pill-menu {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    padding: 7px 14px;
    border-radius: 999px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
}

.pill-context-title {
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 2px;
    color: var(--corvette-red);
    text-transform: uppercase;
    padding-right: 8px;
    border-right: 1px solid rgba(255, 255, 255, 0.15);
}

.pill-sub-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid transparent;
    color: var(--text-muted);
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.pill-sub-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.pill-sub-btn.active {
    background: rgba(230, 30, 43, 0.2);
    border-color: var(--corvette-red);
    color: #fff;
    box-shadow: 0 0 16px rgba(230, 30, 43, 0.35);
}

.sub-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--text-dim);
}

.pill-sub-btn.active .sub-dot {
    background: var(--corvette-red);
    box-shadow: 0 0 8px var(--corvette-red);
}

/* Guidance Ticker */
.guidance-line {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(8, 10, 15, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 6px 16px;
    border-radius: 999px;
    font-size: 0.72rem;
    letter-spacing: 2px;
    color: var(--text-muted);
    text-transform: uppercase;
}

.guidance-pulse-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--corvette-red);
    box-shadow: 0 0 8px var(--corvette-red);
    animation: guidancePulse 1.8s infinite ease-in-out;
}

@keyframes guidancePulse {
    0%, 100% { opacity: 0.4; transform: scale(0.9); }
    50% { opacity: 1; transform: scale(1.3); }
}

/* ── BOTTOM NAVIGATION DOCK ──────────────────────────────────── */
.bottom-nav-dock {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    pointer-events: auto;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    padding: 8px 12px;
    border-radius: 999px;
    margin: 0 auto;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
    max-width: 95vw;
    overflow-x: auto;
}

.dock-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    padding: 10px 18px;
    border-radius: 999px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
}

.dock-num {
    font-family: var(--font-heading);
    font-size: 0.68rem;
    font-weight: 800;
    color: var(--text-dim);
    letter-spacing: 1px;
    transition: color 0.25s ease;
}

.dock-label {
    font-size: 0.76rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.dock-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    transform: translateY(-2px);
}

.dock-btn:hover .dock-num {
    color: var(--corvette-red);
}

.dock-btn.active {
    background: rgba(230, 30, 43, 0.16);
    border-color: var(--glass-border-active);
    color: #ffffff;
    box-shadow: 0 0 20px rgba(230, 30, 43, 0.35);
}

.dock-btn.active .dock-num {
    color: var(--corvette-red);
}

/* Pulsing hint on empty garage arrival */
.dock-btn.pulse-anim {
    animation: arrivalPulse 1.8s infinite ease-in-out;
    border-color: var(--corvette-red);
    color: #ffffff;
}

@keyframes arrivalPulse {
    0%, 100% {
        box-shadow: 0 0 12px rgba(230, 30, 43, 0.4);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 24px rgba(230, 30, 43, 0.85);
        transform: scale(1.04);
    }
}

/* ── MODALS (TELEMETRY & COMMISSION) ─────────────────────────── */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
    pointer-events: auto;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(4, 5, 8, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.modal-panel {
    position: relative;
    width: 90%;
    max-width: 680px;
    background: rgba(16, 19, 28, 0.92);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 36px 40px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8), 0 0 40px rgba(230, 30, 43, 0.2);
    transform: scale(0.95);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    max-height: 85vh;
    overflow-y: auto;
}

.modal-overlay.active .modal-panel {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 28px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-badge {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 2.5px;
    color: var(--corvette-red);
    text-transform: uppercase;
}

.modal-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 2px;
    color: #ffffff;
    margin-top: 4px;
    text-transform: uppercase;
}

.modal-close-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-muted);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all 0.2s ease;
}

.modal-close-btn:hover {
    background: var(--corvette-red);
    color: #fff;
    border-color: var(--corvette-red);
}

/* Specs Grid */
.specs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 28px;
}

.specs-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.specs-card-label {
    font-size: 0.68rem;
    letter-spacing: 1.5px;
    color: var(--text-dim);
    text-transform: uppercase;
    font-weight: 600;
}

.specs-card-value {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    color: #ffffff;
}

.specs-card-desc {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Commission Form */
.form-group {
    margin-bottom: 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-label {
    font-size: 0.72rem;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
}

.form-input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 12px 16px;
    color: #ffffff;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    outline: none;
    transition: border-color 0.2s ease;
}

.form-input:focus {
    border-color: var(--corvette-red);
}

.form-summary-card {
    background: rgba(230, 30, 43, 0.08);
    border: 1px solid rgba(230, 30, 43, 0.25);
    border-radius: 10px;
    padding: 14px 18px;
    margin-bottom: 22px;
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.form-summary-card strong {
    color: #fff;
}

.btn-submit-commission {
    width: 100%;
    background: linear-gradient(135deg, #ff2e3b, #b3101c);
    border: none;
    color: #ffffff;
    padding: 14px 24px;
    border-radius: 8px;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 8px 24px var(--corvette-red-glow);
    transition: all 0.25s ease;
}

.btn-submit-commission:hover {
    filter: brightness(1.15);
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(230, 30, 43, 0.6);
}

/* ── RESPONSIVE MEDIA QUERIES ────────────────────────────────── */
@media (max-width: 1024px) {
    .hud-overlay {
        padding: 16px 20px;
    }
    .top-specs-ticker {
        display: none;
    }
    .bottom-nav-dock {
        gap: 6px;
        padding: 6px 10px;
    }
    .dock-btn {
        padding: 8px 12px;
    }
}
