:root {
    --primary: #2563eb;
    --bg: #f8fafc;
    --card-bg: #ffffff;
    --text: #1e293b;
    --border: #e2e8f0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    margin: 0;
    padding: 20px;
}

.container {
    max-width: 1200px; /* 增加宽度以容纳双栏 */
    margin: 0 auto;
}

h1 { text-align: center; margin-bottom: 30px; color: #0f172a; }

/* --- 核心布局：Grid 系统 --- */
.layout-grid {
    display: grid;
    grid-template-columns: 350px 1fr; /* 左侧固定350px，右侧自适应 */
    gap: 20px;
    align-items: start; /* 顶部对齐 */
}

/* 手机端适配：变成单列 */
@media (max-width: 768px) {
    .layout-grid {
        grid-template-columns: 1fr;
    }
}

.card {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border);
    margin-bottom: 20px;
}

.right-panel .card {
    height: 100%; /* 让右侧卡片充满高度 */
    min-height: 200px;
}

h3 { margin-top: 0; border-bottom: 1px solid #eee; padding-bottom: 10px; margin-bottom: 15px; font-size: 1.1rem; color: #334155; }

/* 输入控件样式 */
.ai-section { background: #eff6ff; border-color: #bfdbfe; }
.ai-input-wrapper { display: flex; gap: 8px; }

.btn-ai {
    background: var(--primary); color: white; border: none; padding: 10px 15px; 
    border-radius: 6px; cursor: pointer; white-space: nowrap; font-weight: 500;
}
.btn-ai:disabled { background: #94a3b8; }

.input-group { display: flex; gap: 10px; margin-bottom: 15px; }
.input-field { flex: 1; }
.input-field label { display: block; font-size: 0.85rem; color: #64748b; margin-bottom: 5px; }
input { width: 100%; padding: 10px; border: 1px solid #cbd5e1; border-radius: 6px; box-sizing: border-box; }

.btn-calc {
    width: 100%; background: #0f172a; color: white; border: none; padding: 14px; 
    border-radius: 8px; font-size: 1.1rem; font-weight: bold; cursor: pointer; transition: 0.2s;
}
.btn-calc:hover { background: #334155; transform: translateY(-1px); }

/* 3D 视图样式 */
.three-view {
    width: 100%;
    height: 200px; /* 加大高度 */
    background: #f1f5f9;
    border-radius: 8px;
    border: 1px dashed #cbd5e1;
    position: relative;
    overflow: hidden;
    margin-bottom: 5px;
}

.placeholder-text {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    text-align: center; color: #94a3b8; font-size: 0.9rem; pointer-events: none;
}

.view-hint { text-align: center; font-size: 0.8rem; color: #94a3b8; margin-top: 5px; margin-bottom: 15px; }

/* 结果样式优化 */
.result-details {
    background: #f0fdf4; border: 1px solid #bbf7d0; 
    padding: 20px; border-radius: 8px; margin-bottom: 20px; text-align: center;
}
.big-text { font-size: 1rem; color: #166534; margin: 0; }
.highlight-box { font-size: 1.5rem; font-weight: 800; color: #15803d; margin: 10px 0; }
.res-note { color: #15803d; font-size: 0.9rem; opacity: 0.9; }

/* 列表样式 */
ul { padding: 0; list-style: none; }
li { padding: 10px; border-bottom: 1px solid #f1f5f9; display: flex; justify-content: space-between; align-items: center; }
.status-badge { padding: 4px 10px; border-radius: 20px; font-size: 0.8rem; font-weight: bold; }
.status-fit { background: #dcfce7; color: #166534; }
.status-fail { background: #fee2e2; color: #991b1b; }