/* ============================================
   高级选配器 — 公路场景 + 光粒子 + 毛玻璃
   ============================================ */

:root {
    --bg: #050508;
    --blue: #2563eb;
    --blue-glow: #3b82f6;
    --cyan: #06b6d4;
    --gold: #e8a838;
    --white: #ffffff;
    --glass: rgba(255,255,255,0.06);
    --glass-border: rgba(255,255,255,0.1);
    --text: rgba(255,255,255,0.9);
    --text-dim: rgba(255,255,255,0.45);
    --font: 'Noto Sans SC', -apple-system, sans-serif;
    --font-tech: 'Orbitron', monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    height: 100vh;
    overflow: hidden;
    position: relative;
}

/* 星云背景层 — 多层叠加 */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse 70% 60% at 10% 15%, rgba(30, 60, 160, 0.35) 0%, transparent 65%),
        radial-gradient(ellipse 50% 50% at 85% 75%, rgba(20, 50, 140, 0.3) 0%, transparent 55%),
        radial-gradient(ellipse 80% 40% at 50% 95%, rgba(15, 35, 120, 0.25) 0%, transparent 50%),
        radial-gradient(ellipse 40% 40% at 65% 10%, rgba(40, 80, 180, 0.2) 0%, transparent 55%),
        radial-gradient(ellipse 30% 50% at 30% 60%, rgba(10, 40, 130, 0.18) 0%, transparent 60%);
}
body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse 35% 35% at 20% 30%, rgba(60, 100, 220, 0.12) 0%, transparent 70%),
        radial-gradient(ellipse 25% 25% at 75% 50%, rgba(50, 90, 200, 0.1) 0%, transparent 70%);
    animation: nebulaShift 20s ease-in-out infinite alternate;
}
@keyframes nebulaShift {
    0% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.05); }
    100% { opacity: 0.7; transform: scale(0.98); }
}

/* ====== Canvas 粒子层 ====== */
#particleCanvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

/* ====== 公路层（已隐藏） ====== */
.highway {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 45vh;
    z-index: 1;
    overflow: hidden;
    pointer-events: none;
    perspective: 800px;
}

.road {
    position: absolute;
    bottom: -20%;
    left: -10%;
    width: 120%;
    height: 100%;
    background: linear-gradient(160deg, transparent 0%, #0a1225 15%, #0d1830 50%, #0a1020 100%);
    transform: rotateX(68deg) rotateZ(-25deg);
    transform-origin: center bottom;
}

.road-line {
    position: absolute;
    width: 80px;
    height: 8px;
    background: rgba(255,255,255,0.12);
    border-radius: 4px;
    transform: rotate(-25deg);
    animation: roadDash 2s linear infinite;
}

/* 分散排列虚线 */
.road-line:nth-child(1) { left: 20%; animation-delay: 0s; }
.road-line:nth-child(2) { left: 30%; animation-delay: 0.25s; }
.road-line:nth-child(3) { left: 40%; animation-delay: 0.5s; }
.road-line:nth-child(4) { left: 50%; animation-delay: 0.75s; }
.road-line:nth-child(5) { left: 25%; animation-delay: 1.0s; }
.road-line:nth-child(6) { left: 35%; animation-delay: 1.25s; }
.road-line:nth-child(7) { left: 45%; animation-delay: 1.5s; }
.road-line:nth-child(8) { left: 55%; animation-delay: 1.75s; }

@keyframes roadDash {
    0% {
        top: -10%;
        opacity: 0;
        transform: rotate(-25deg) scale(0.3);
    }
    15% { opacity: 0.6; }
    85% { opacity: 0.15; }
    100% {
        top: 110%;
        opacity: 0;
        transform: rotate(-25deg) scale(1.5);
    }
}

.road-glow {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100%;
    background:
        radial-gradient(ellipse 70% 50% at 30% 90%, rgba(37,99,235,0.06) 0%, transparent 70%),
        radial-gradient(ellipse 50% 40% at 40% 95%, rgba(6,182,212,0.04) 0%, transparent 60%),
        linear-gradient(160deg, transparent 40%, rgba(255,255,255,0.015) 50%, transparent 60%);
    pointer-events: none;
}

/* ====== 顶部导航 ====== */
.config-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    height: 64px;
    background: rgba(5,5,8,0.85);
    backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--glass-border);
}
.nav-back {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 13px;
    transition: color 0.2s;
}
.nav-back:hover { color: var(--white); }
.nav-logo .logo-img { height: 30px; }

.nav-steps { display: flex; gap: 6px; }
.step-dot {
    font-size: 11px;
    color: var(--text-dim);
    padding: 6px 14px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
    border: 1px solid transparent;
}
.step-dot.active {
    background: var(--blue);
    color: var(--white);
    box-shadow: 0 0 20px rgba(37,99,235,0.4);
}
.step-dot.done { color: rgba(255,255,255,0.6); }
.step-dot.done::before { content: '✓ '; color: var(--cyan); }

/* ====== 车辆展示区 ====== */
.vehicle-stage {
    position: fixed;
    top: 64px;
    left: 0;
    width: 55%;
    height: calc(100vh - 64px);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.vehicle-wrapper {
    position: relative;
    width: 85%;
    max-width: 700px;
    animation: driveIn 1.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes driveIn {
    0% {
        transform: translateX(120%) scale(0.3);
        opacity: 0;
        filter: blur(8px);
    }
    40% {
        opacity: 1;
        filter: blur(2px);
    }
    100% {
        transform: translateX(0) scale(1);
        opacity: 1;
        filter: blur(0);
    }
}

.vehicle-img {
    width: 100%;
    height: auto;
    border-radius: 0;
    filter: drop-shadow(0 20px 60px rgba(37,99,235,0.15)) drop-shadow(0 0 40px rgba(6,182,212,0.08));
    transition: opacity 0.6s, transform 0.5s ease, filter 0.8s ease;
}

/* 倒影 */
.vehicle-reflection {
    position: relative;
    width: 85%;
    max-width: 700px;
    height: 80px;
    overflow: hidden;
    margin-top: -4px;
    opacity: 0.15;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,0.4) 0%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0.4) 0%, transparent 100%);
    animation: driveIn 1.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.reflection-img {
    width: 100%;
    transform: scaleY(-1);
    border-radius: 0;
    filter: blur(3px);
}

/* 车辆标签 */
.vehicle-label {
    position: absolute;
    bottom: 18%;
    left: 8%;
    animation: fadeUp 1s 1.5s both;
}
.label-en {
    display: block;
    font-family: var(--font-tech);
    font-size: 10px;
    letter-spacing: 4px;
    color: var(--cyan);
    text-transform: uppercase;
}
.label-zh {
    display: block;
    font-size: 28px;
    font-weight: 900;
    color: var(--white);
    text-shadow: 0 0 40px rgba(37,99,235,0.3);
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 配置标签 */
.config-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 16px;
    animation: fadeUp 1s 2s both;
}
.tag {
    background: var(--glass);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    color: var(--text);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s;
}

/* ====== 右侧毛玻璃面板 ====== */
.config-panel {
    position: fixed;
    top: 64px;
    right: 0;
    width: 45%;
    max-width: 520px;
    height: calc(100vh - 64px);
    z-index: 10;
    background: rgba(8,10,18,0.45);
    backdrop-filter: blur(24px) saturate(1.2);
    border-left: 1px solid rgba(255,255,255,0.08);
    box-shadow: -4px 0 30px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.panel-handle {
    width: 40px;
    height: 4px;
    background: rgba(255,255,255,0.15);
    border-radius: 2px;
    margin: 12px auto 0;
    display: none;
}

/* Step 内容 */
.config-step {
    display: none;
    flex: 1;
    overflow-y: auto;
    padding: 32px 32px 120px;
    animation: panelFade 0.4s ease;
}
.config-step.active { display: block; }

@keyframes panelFade {
    from { opacity: 0; transform: translateX(16px); }
    to { opacity: 1; transform: translateX(0); }
}

/* 滚动条 */
.config-step::-webkit-scrollbar { width: 4px; }
.config-step::-webkit-scrollbar-track { background: transparent; }
.config-step::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

.step-header {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 28px;
}
.step-number {
    font-family: var(--font-tech);
    font-size: 32px;
    font-weight: 900;
    color: var(--blue);
    line-height: 1;
    text-shadow: 0 0 30px rgba(37,99,235,0.4);
}
.step-header h2 {
    font-size: 22px;
    font-weight: 700;
}

/* ====== 车型卡片 ====== */
.type-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.type-option { cursor: pointer; }
.type-option input { display: none; }
.type-inner {
    border: 1.5px solid var(--glass-border);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s;
    background: var(--glass);
}
.type-inner img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    transition: transform 0.3s;
}
.type-name {
    display: block;
    padding: 8px 10px 0;
    font-size: 13px;
    font-weight: 700;
}
.type-desc {
    display: block;
    padding: 0 10px 8px;
    font-size: 10px;
    color: var(--text-dim);
}
.type-inner:hover {
    border-color: var(--blue);
    background: rgba(37,99,235,0.08);
}
.type-inner:hover img { transform: scale(1.05); }
.type-option input:checked + .type-inner {
    border-color: var(--blue);
    box-shadow: 0 0 24px rgba(37,99,235,0.2), inset 0 0 20px rgba(37,99,235,0.05);
}

/* ====== 配置组 ====== */
.config-group { margin-bottom: 24px; }
.group-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

/* 胶囊选项 */
.pill-row { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { cursor: pointer; }
.pill input { display: none; }
.pill span {
    display: inline-block;
    padding: 10px 20px;
    border: 1.5px solid var(--glass-border);
    border-radius: 28px;
    font-size: 13px;
    color: var(--text-dim);
    background: var(--glass);
    transition: all 0.25s;
    white-space: nowrap;
}
.pill span:hover {
    border-color: var(--blue);
    color: var(--text);
    background: rgba(37,99,235,0.08);
}
.pill input:checked + span {
    background: var(--blue);
    border-color: var(--blue);
    color: var(--white);
    box-shadow: 0 0 20px rgba(37,99,235,0.3);
}

/* ====== 颜色选择 ====== */
.color-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
}
.color-opt { cursor: pointer; text-align: center; }
.color-opt input { display: none; }
.swatch {
    display: block;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    margin: 0 auto 4px;
    border: 3px solid transparent;
    transition: all 0.25s;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}
.swatch.other {
    background: conic-gradient(#c1272d, #e88c00, #3b83bd, #1e5945, #c1272d);
    display: flex; align-items: center; justify-content: center;
    color: white; font-weight: 700; font-size: 14px;
}
.swatch:hover { transform: scale(1.15); }
.color-opt input:checked + .swatch {
    border-color: var(--cyan);
    transform: scale(1.15);
    box-shadow: 0 0 20px rgba(6,182,212,0.4);
}
.cname { font-size: 10px; color: var(--text-dim); }
.color-opt input:checked ~ .cname { color: var(--cyan); font-weight: 600; }

/* ====== 输入框 ====== */
.text-input, .text-area {
    width: 100%;
    padding: 12px 16px;
    background: var(--glass);
    border: 1.5px solid var(--glass-border);
    border-radius: 10px;
    color: var(--text);
    font-size: 14px;
    font-family: var(--font);
    outline: none;
    transition: border-color 0.2s;
    margin-top: 4px;
}
.text-input:focus, .text-area:focus {
    border-color: var(--blue);
    box-shadow: 0 0 16px rgba(37,99,235,0.15);
}
.text-input::placeholder, .text-area::placeholder { color: var(--text-dim); }
.text-area { min-height: 80px; resize: vertical; }
.hidden { display: none !important; }

/* ====== 摘要卡片 ====== */
.summary-card {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
}
.summary-card h3 {
    font-size: 14px;
    color: var(--cyan);
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--glass-border);
    font-family: var(--font-tech);
    letter-spacing: 1px;
}
.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    font-size: 13px;
}
.summary-row .label { color: var(--text-dim); }
.summary-row .value { font-weight: 600; }

/* ====== 底部按钮 ====== */
.panel-actions {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px 32px;
    background: rgba(8,10,18,0.6);
    backdrop-filter: blur(24px);
    border-top: 1px solid var(--glass-border);
    display: flex;
    gap: 12px;
}
.btn-prev, .btn-next, .btn-submit {
    padding: 14px 32px;
    border: none;
    border-radius: 28px;
    font-size: 14px;
    font-weight: 700;
    font-family: var(--font);
    cursor: pointer;
    transition: all 0.3s;
}
.btn-prev {
    background: transparent;
    color: var(--text-dim);
    border: 1.5px solid var(--glass-border);
}
.btn-prev:hover:not(:disabled) { border-color: var(--text-dim); color: var(--text); }
.btn-prev:disabled { opacity: 0.2; cursor: not-allowed; }
.btn-next {
    background: var(--blue);
    color: var(--white);
    flex: 1;
    box-shadow: 0 0 24px rgba(37,99,235,0.3);
}
.btn-next:hover { background: #1d4ed8; box-shadow: 0 0 40px rgba(37,99,235,0.5); }
.btn-submit {
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    color: var(--white);
    flex: 1;
    box-shadow: 0 0 30px rgba(6,182,212,0.3);
}
.btn-submit:hover { box-shadow: 0 0 50px rgba(6,182,212,0.5); }

/* ====== 弹窗 ====== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(12px);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
}
.modal-box {
    background: rgba(12,14,20,0.95);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 48px;
    text-align: center;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 0 80px rgba(37,99,235,0.15);
}
.modal-icon {
    width: 72px; height: 72px; border-radius: 50%;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    color: var(--white); font-size: 36px;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 0 40px rgba(6,182,212,0.4);
}
.modal-box h2 { font-size: 24px; margin-bottom: 12px; }
.modal-box p { color: var(--text-dim); font-size: 14px; margin-bottom: 6px; }
.modal-phone a { color: var(--cyan); text-decoration: none; font-weight: 700; }
.btn-back {
    display: inline-block;
    margin-top: 24px;
    padding: 14px 40px;
    background: var(--blue);
    color: var(--white);
    border-radius: 28px;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.2s;
    box-shadow: 0 0 20px rgba(37,99,235,0.3);
}
.btn-back:hover { box-shadow: 0 0 40px rgba(37,99,235,0.5); }

/* ====== 响应式 ====== */
@media (max-width: 1024px) {
    .vehicle-stage { display: none; }
    .config-panel {
        width: 100%;
        max-width: none;
        top: 64px;
        border-left: none;
    }
    .panel-handle { display: block; }
    .highway { height: 25vh; }
}

@media (max-width: 480px) {
    .nav-steps { display: none; }
    .config-nav { padding: 0 16px; }
    .config-step { padding: 24px 20px 140px; }
    .panel-actions { padding: 16px 20px; }
    .type-grid { grid-template-columns: 1fr; }
    .color-grid { grid-template-columns: repeat(4, 1fr); }
}
