/* --- 最终版：深蓝灰配色 + 精细组件 --- */

:root {
    /* 复用 styles.css 的深蓝灰体系 */
    --bg-page: #0f172a;       /* 页面背景 */
    --bg-card: #1e293b;       /* 卡片背景 */
    --bg-input: #0b1222;      /* 输入框背景 */
    
    --text-main: #f8fafc;     /* 主文字 */
    --text-sub: #94a3b8;      /* 副文字 */
    
    --primary: #3b82f6;       /* 科技蓝 */
    --primary-hover: #2563eb;
    
    --border: 1px solid rgba(148,163,184,0.1);
    --shadow-card: 0 10px 30px rgba(0,0,0,0.3);
    
    --radius: 12px;
}

body {
    background-color: var(--bg-page);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
}

/* 顶部导航适配 */
.navbar {
    display: flex;           /* 启用 Flex 布局 */
    justify-content: space-between; /* 这一行其实是关键，但如果有 spacer div，这行可有可无 */
    background: rgba(15, 23, 42, 0.8);
    align-items: center;     /* 垂直居中 */
    backdrop-filter: blur(12px);
    border-bottom: var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    height: 70px;            /* 给个固定高度更好看 */
    padding: 0 20px;         /* 左右留白 */

}

.container-fluid {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.request-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 40px;
    align-items: start;
}

/* --- 左侧卡片 (Glassmorphism Dark) --- */
.glass-card {
    background: var(--bg-card);
    border-radius: 16px;
    box-shadow: var(--shadow-card);
    padding: 40px;
    border: var(--border);
    position: relative;
    min-height: 600px;
}

/* 标题渐变色 (保留上一版的好看设计) */
.header-area h1 {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, #fff 0%, #94a3b8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
}
.header-area p { color: var(--text-sub); font-size: 15px; }

/* --- 表单组件 (新版结构 + 旧版配色) --- */
.input-group { margin-bottom: 24px; }
.input-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-sub);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.custom-input {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-input); /* 深色背景 */
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: var(--radius);
    font-size: 15px;
    color: var(--text-main);
    transition: all 0.2s;
}
.custom-input:focus {
    background: var(--bg-input);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
    outline: none;
}

/* 分段选择器 (Segmented Control) - 深色版 */
.radio-group {
    background: var(--bg-input);
    padding: 10px;
    border-radius: var(--radius);
    border: 1px solid rgba(255,255,255,0.05);
    display: flex;
}
.radio-option { flex: 1; }
.radio-option label {
    display: block;
    text-align: center;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-sub);
    transition: all 0.2s;
}
/* 选中态：稍微亮一点的背景 + 蓝色文字 */
.radio-option input:checked + label {
    background: var(--bg-card); /* 类似悬浮效果 */
    color: var(--primary);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* 提交按钮：恢复上一版的蓝色渐变 */
.action-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.5);
}

/* --- 右侧状态栏 (新版结构 + 深色背景) --- */
.status-panel {
    background: var(--bg-card); /* 恢复有背景的卡片 */
    border-radius: 16px;
    padding: 30px;
    border: var(--border);
    position: sticky;
    top: 100px;
}

.panel-title {
    color: var(--text-main);
    font-size: 16px;
    font-weight: 700;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding-bottom: 15px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 时间轴 */
.timeline-track {
    border-left: 2px solid rgba(255,255,255,0.05);
    padding-left: 24px;
    margin-left: 6px;
}

.timeline-node {
    position: relative;
    margin-bottom: 35px;
}

/* 节点样式 (深色适配) */
.node-dot {
    width: 14px;
    height: 14px;
    background: var(--bg-card);
    border: 2px solid var(--text-sub);
    border-radius: 50%;
    position: absolute;
    left: -32px; /* 线宽2 + padding 24 + 半径7 = 33 */
    top: 4px;
    transition: all 0.3s;
    z-index: 2;
}

.node-content h4 {
    font-size: 15px;
    margin: 0 0 4px 0;
    color: var(--text-sub);
    transition: color 0.3s;
}
.node-content p { font-size: 12px; color: #64748b; margin: 0; }

/* 激活态 (蓝色呼吸灯) */
.timeline-node.active .node-dot {
    border-color: var(--primary);
    background: var(--primary);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
    transform: scale(1.2);
}
.timeline-node.active h4 { color: var(--text-main); font-weight: 700; }
.timeline-node.active p { color: var(--text-sub); }

/* 完成态 (绿色) */
.timeline-node.completed .node-dot {
    border-color: var(--success);
    background: var(--success); /* 绿色实心 */
}
.timeline-node.completed h4 { color: var(--success); }
.method-cards{
    margin-top:10px;
}
/* --- 结果页元素 --- */
.price-card {
    background: rgba(59, 130, 246, 0.05); /* 淡淡的蓝底 */
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    flex: 1; /* 撑满高度 */
    display: flex;
    flex-direction: column;
    justify-content: center; /* 垂直居中 */
    align-items: center;     /* 水平居中 */
    min-height: 450px;       /* 给个最小高度，显得大气 */



}
.price-val {
    font-size: 32px;
    font-weight: 800;
    color: var(--primary); /* 蓝色文字 */
    letter-spacing: -1px;
}
.price-label {
    color: var(--text-sub);
    font-size: 24px;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 5px;
}
.price-val span {
    font-variant-numeric: tabular-nums; /* 等宽数字，防止滚动时抖动 */
    display: inline-block;
    min-width: 30px; /* 占位防止跳动 */
}
/* 价格计算中动画 */
.price-loading {
    font-size: 16px;
    color: var(--text-sub);
    letter-spacing: 2px;
    font-family: 'Consolas', monospace;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    height: 60px; /* 占位高度，防止跳动 */
}
.price-real{
    font-size: 32px;
    font-weight: 800;
    color: var(--success); /* 蓝色文字 */
    letter-spacing: -1px;

}
.prcie-real span{
    font-variant-numeric: tabular-nums; /* 等宽数字，防止滚动时抖动 */
    display: inline-block;
    min-width: 30px; /* 占位防止跳动 */ 
}
/* 跳动的小点 */
.typing-dots {
    display: flex; /* 关键：必须是 flex 才能横排 */
    gap: 2px;
}
.typing-dots span {
    animation: type-bounce 1.4s infinite ease-in-out both;
    font-size: 30px;
    color: var(--primary);
}

.typing-dots span:nth-child(1) { animation-delay: -0.32s; }
.typing-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes type-bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

.fade-in-up {
    animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    opacity: 0; /* 初始不可见 */
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 动态布局容器 */
.result-dynamic-layout {
    display: flex;
    align-items: stretch; /* 关键：拉伸等高 */
    justify-content: center; /* 初始居中 */
    align-items: flex-start;
    gap: 0; /* 初始无间距 */
    transition: all 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
    margin-top: 40px;
}

/* 左侧价格卡片 */
.price-box-wrapper {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 500px;
    transition: all 0.6s ease;
}

/* 激活状态：变为两栏 */
.result-dynamic-layout.split-view {
    justify-content: space-between;
    gap: 40px;
}

.result-dynamic-layout.split-view .price-box-wrapper {
    width: 45%; /* 左侧变窄 */
    max-width: none;
}

/* 右侧面板：初始隐藏 */
.trade-options-panel {
    width: 0;
    opacity: 0;
    overflow: hidden;
    transform: translateX(50px);
    transition: all 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
    white-space: nowrap; /* 防止文字换行 */
}

/* 激活状态：右侧展开 */
.result-dynamic-layout.split-view .trade-options-panel {
    width: 50%;
    opacity: 1;
    transform: translateX(0);
    overflow: visible;
    display: flex;
    flex-direction: column;
    min-height: 450px;
}

/* --- 交易方式卡片样式 --- */
.method-card {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.2s;
    position: relative;
}
.method-card:hover { border-color: var(--primary); }
.method-card.active {
    background: rgba(59, 130, 246, 0.1);
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
}
.m-icon { font-size: 24px; color: var(--text-sub); }
.method-card.active .m-icon { color: var(--primary); }
.m-title { color: var(--text-main); font-weight: 600; font-size: 15px; }
.m-desc { color: var(--text-sub); font-size: 12px; }
.m-check { 
    margin-left: auto; 
    color: var(--primary); 
    opacity: 0; 
    transform: scale(0); 
    transition: all 0.2s; 
}
.method-card.active .m-check { opacity: 1; transform: scale(1); }

/* 底部结算 */
.trade-footer {
    border-top: 1px solid var(--border);
    padding-top: 20px;
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.tf-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    color: var(--text-main);
}
.tf-price {
    font-size: 24px;
    font-weight: 800;
    color: var(--success);
}
.tf-tip { font-size: 12px; color: var(--text-sub); margin-bottom: 20px;flex:1; }
.price-tip{
    font-size: 14px;
    color: var(--text-sub);
}
.tf-actions { display: flex; gap: 15px; }
.btn-confirm {
    flex: 2;
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}
.btn-cancel {
    flex: 1;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-sub);
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
}

/* --- 场景4：订单履约 --- */
.order-summary-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 30px;
}
.os-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
}
.os-row:last-child { margin-bottom: 0; }
.os-label { color: var(--text-sub); }
.os-val { color: var(--text-main); font-weight: 500; }
.os-val.price { color: var(--primary); font-family: 'Consolas', monospace; font-size: 16px; }
.os-val.status { color: #f59e0b; } /* 黄色状态 */

/* 动态区 */
.step-panel { animation: fadeIn 0.5s; text-align: center; }

.processing-anim {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.spinner {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px solid rgba(59, 130, 246, 0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
.p-icon { font-size: 30px; color: var(--primary); }

@keyframes spin { 100% { transform: rotate(360deg); } }

.step-title { font-size: 18px; margin-bottom: 10px; color: var(--text-main); }
.step-desc { font-size: 13px; color: var(--text-sub); margin-bottom: 10px; }

/* 骨架屏 */
.skeleton-gallery {
    display: flex;
    gap: 10px;
    justify-content: center;
    opacity: 0.5;
}
.sk-img {
    width: 80px;
    height: 80px;
    background: var(--bg-input);
    border-radius: 8px;
    animation: pulse 1.5s infinite;
}

/* 质检报告 */
.qc-header {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    padding: 10px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}
.qc-gallery {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 10px;
    margin-bottom: 20px;
    justify-content: center;
}
.qc-img {
    width: 100px;
    height: 100px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid var(--border);
    cursor: zoom-in;
}

.qc-report {
    text-align: left;
    background: var(--bg-input);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 40px;
}
.qc-img-placeholder{color: var(--text-sub);}
.qc-report h4 { margin: 0 0 5px; font-size: 14px; color: var(--text-main); }
.qc-report p { margin: 0; font-size: 13px; color: var(--text-sub); }

.qc-actions { display: flex; gap: 15px; width: 60%;margin-left: auto;}
.btn-confirm-ship {
    flex: 2;
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}
.btn-cancel-order {
    flex: 1;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-sub);
    cursor: pointer;
    border-radius: 8px;
}

/* 底部计时器 */
.timer-footer {
    margin-top: 40px;
    border-top: 1px solid var(--border);
    padding-top: 20px;
    color: var(--text-sub);
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}
#elapsed-time {
    font-family: 'Consolas', monospace;
    color: var(--text-main);
    font-weight: bold;
}

/* 缩略图样式 */
.thumb-img {
    width: 100%;
    height: 80px; /* 固定高度 */
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    opacity: 0.6;
    border: 2px solid transparent;
    transition: all 0.2s;
}

.thumb-img:hover {
    opacity: 1;
}

.thumb-img.active {
    opacity: 1;
    border-color: var(--primary); /* 选中高亮 */
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.3);
}

/* 滚动条美化 (针对 WebKit 浏览器) */
#qc-thumbs::-webkit-scrollbar {
    width: 4px;
}
#qc-thumbs::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.05);
}
#qc-thumbs::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 2px;
}


/* 控制台日志 (黑客风) */
#console-logs {
    background: #000;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 15px;
    font-family: monospace;
    font-size: 12px;
    line-height: 1.6;
    color: #4ade80; /* 绿色文字 */
}

@media (max-width: 900px) {
    .request-layout { grid-template-columns: 1fr; }
    .status-panel { order: -1; margin-bottom: 30px; }
}