:root {
    --primary: #2563eb;
    --bg: #f8fafc;
    --text: #1e293b;
    --text-light: #64748b;
    --border: #e2e8f0;
    --card-bg: #ffffff;
    --green: #dcfce7; --green-text: #166534;
    --blue: #dbeafe; --blue-text: #1e40af;
    --yellow: #fef9c3; --yellow-text: #854d0e;
    --red: #fee2e2; --red-text: #991b1b;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { font-family: 'Inter', -apple-system, sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; -webkit-font-smoothing: antialiased; }

/* 顶部固定导航 */
.top-nav { position: fixed; top: 0; left: 0; width: 100%; height: 64px; background: rgba(255,255,255,0.95); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; padding: 0 40px; z-index: 1000; }
.top-nav .logo { font-family: 'Nunito', sans-serif; font-size: 1.4rem; font-weight: 900; color: #0f172a; }
.nav-links { display: flex; gap: 30px; }
.nav-links a { text-decoration: none; color: var(--text-light); font-weight: 500; font-size: 0.95rem; transition: color 0.2s; }
.nav-links a:hover { color: var(--primary); }

/* 布局：左侧悬浮 + 右侧内容 */
.layout-container { display: flex; max-width: 1300px; margin: 64px auto 0; position: relative; }
.left-sidebar { width: 250px; flex-shrink: 0; }
.sidebar-inner { position: sticky; top: 100px; padding: 30px 20px 30px 40px; }
.sidebar-title { font-size: 0.75rem; font-weight: 700; color: #94a3b8; letter-spacing: 1px; margin-bottom: 15px; }
.sidebar-nav { display: flex; flex-direction: column; gap: 2px; border-left: 2px solid var(--border); }
.sidebar-nav a { text-decoration: none; color: var(--text-light); font-size: 0.9rem; padding: 8px 15px; margin-left: -2px; border-left: 2px solid transparent; transition: all 0.2s; }
.sidebar-nav a:hover { color: var(--text); }
.sidebar-nav a.active { color: var(--primary); font-weight: 600; border-left-color: var(--primary); background: #eff6ff; border-radius: 0 4px 4px 0; }

.main-content { flex-grow: 1; padding: 20px 40px 100px; max-width: 1000px; }
.section { padding-top: 60px; padding-bottom: 60px; }

/* 超级花哨的圆润大标题 */
.page-title { 
    font-family: 'Nunito', sans-serif;
    font-size: 2.6rem; 
    font-weight: 900; 
    margin-bottom: 30px; 
    line-height: 1.25;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 40%, #ec4899 80%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
    text-shadow: 0 4px 20px rgba(236, 72, 153, 0.1);
}

/* 卡片通用 */
.abstract-box, .radar-desc-box, .case-desc-box, .fig-box, .field-descriptions, .case-script, .audio-panel { 
    background: var(--card-bg); padding: 30px; border-radius: 16px; border: 1px solid var(--border); margin-bottom: 25px; box-shadow: 0 4px 20px -2px rgba(0,0,0,0.03); 
}
h2, h3 { font-family: 'Nunito', sans-serif; color: #0f172a; }
.abstract-box h2 { font-size: 1.6rem; margin-bottom: 20px; font-weight: 800; }
.abstract-box p { font-size: 1.05rem; margin-bottom: 20px; color: #334155; }
.contribution-list { background: #f8fafc; padding: 24px; border-radius: 12px; border-left: 4px solid var(--primary); }
.contribution-list h4 { margin-bottom: 16px; font-size: 1.1rem; }
.contribution-list ul { padding-left: 20px; }
.contribution-list li { margin-bottom: 12px; font-size: 0.95rem; color: #475569; }

/* 图文框前置说明 */
.fig-desc h3 { margin-bottom: 10px; font-size: 1.2rem; color: #1e293b; }
.fig-desc p { font-size: 0.95rem; color: #475569; margin-bottom: 20px; line-height: 1.7; }
.fig-box img { width: 100%; height: auto; border-radius: 8px; }

.desc-text { font-size: 1.05rem; color: #334155; margin-bottom: 20px; }
.field-descriptions ul { padding-left: 20px; }
.field-descriptions li { margin-bottom: 10px; font-size: 0.95rem; }
.field-descriptions ul ul { margin-top: 10px; }
.field-descriptions code { background: #f1f5f9; padding: 2px 6px; border-radius: 4px; font-family: 'JetBrains Mono', monospace; font-size: 0.85rem; color: #0f172a; }
.json-container { background: #1e293b; padding: 24px; border-radius: 12px; overflow-x: auto; box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1); margin-bottom: 20px; }
.json-container pre { margin: 0; }
.json-container code { font-family: 'JetBrains Mono', monospace; font-size: 0.85rem; color: #e2e8f0; line-height: 1.5; }

/* 下拉框美化 */
.controls { display: flex; align-items: center; margin-bottom: 25px; gap: 15px; flex-wrap: wrap; }
select { 
    padding: 10px 20px; font-size: 0.95rem; border-radius: 8px; border: 1px solid #cbd5e1; background-color: #fff; outline: none; font-family: inherit; cursor: pointer; 
    box-shadow: 0 2px 4px rgba(0,0,0,0.02); transition: border-color 0.2s; appearance: none; padding-right: 32px; background-repeat: no-repeat; background-position: right 12px top 50%; background-size: 10px auto;
}
select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1); }

/* 表格 */
.table-wrapper { overflow-x: auto; background: var(--card-bg); border-radius: 16px; border: 1px solid var(--border); box-shadow: 0 4px 20px -2px rgba(0,0,0,0.03); }
table { width: 100%; border-collapse: collapse; text-align: center; }
th, td { padding: 16px; border-bottom: 1px solid var(--border); }
th { background: #f8fafc; font-weight: 600; color: #475569; font-size: 0.95rem; cursor: pointer; user-select: none; transition: background 0.2s; }
th:hover { background: #f1f5f9; }
th::after { content: " ↕"; font-size: 0.8rem; color: #94a3b8; }
tr:last-child td { border-bottom: none; }
.bold-best { font-weight: 700; background: rgba(0,0,0,0.04); }
td:first-child { font-weight: 600; text-align: left; }

tr.bg-green td { background-color: var(--green); color: var(--green-text); }
tr.bg-blue td { background-color: var(--blue); color: var(--blue-text); }
tr.bg-yellow td { background-color: var(--yellow); color: var(--yellow-text); }
tr.bg-red td { background-color: var(--red); color: var(--red-text); }

.legend { margin-top: 25px; display: flex; gap: 20px; font-size: 0.9rem; align-items: center; color: var(--text-light); flex-wrap: wrap; }
.badge { display: inline-block; width: 14px; height: 14px; border-radius: 4px; margin-right: 6px; vertical-align: middle; }
.bg-green { background: var(--green); border: 1px solid var(--green-text); }
.bg-blue { background: var(--blue); border: 1px solid var(--blue-text); }
.bg-yellow { background: var(--yellow); border: 1px solid var(--yellow-text); }
.bg-red { background: var(--red); border: 1px solid var(--red-text); }

/* 雷达图说明 */
.radar-desc-box h3, .case-desc-box h3 { font-size: 1.3rem; margin-bottom: 10px; color: #1e293b; }
.radar-desc-box p, .case-desc-box p { font-size: 0.95rem; color: #475569; line-height: 1.7; }
.radar-controls { display: flex; gap: 20px; align-items: flex-start; background: var(--card-bg); padding: 20px; border-radius: 12px; border: 1px solid var(--border); margin-bottom: 20px; }
.checkbox-group { display: flex; flex-wrap: wrap; gap: 10px; max-height: 150px; overflow-y: auto; }
.checkbox-label { display: flex; align-items: center; gap: 6px; font-size: 0.9rem; cursor: pointer; background: #f1f5f9; padding: 6px 12px; border-radius: 6px; border: 1px solid transparent; transition: all 0.2s; }
.checkbox-label:hover { background: #e2e8f0; }
.checkbox-label input:checked + span { font-weight: 600; color: var(--primary); }
.checkbox-label:has(input:checked) { background: #e0e7ff; border-color: #a5b4fc; }




/* ========== CASE STUDY 双栏布局 ========== */
.case-layout {
    display: grid;
    grid-template-columns: 450px 1fr; /* 左侧固定450px，右侧自适应 */
    gap: 30px;
    align-items: start;
}

/* --- 左侧栏 --- */
.case-sidebar {
    position: sticky;
    top: 100px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    background: var(--card-bg);
    padding: 24px;
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: 0 4px 20px -2px rgba(0,0,0,0.03);
}
/* 侧边栏滚动条美化 */
.case-sidebar::-webkit-scrollbar { width: 6px; }
.case-sidebar::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }

.script-block {
    background: #f8fafc;
    padding: 16px;
    border-radius: 12px;
    border: 1px solid var(--border);
    margin-bottom: 16px;
}
.script-block h4 {
    font-size: 1rem;
    color: #0f172a;
    margin-bottom: 12px;
    font-family: 'Nunito', sans-serif;
}
.script-block p {
    font-size: 0.95rem;
    color: #334155;
    line-height: 1.6;
}
.script-block .char-list {
    list-style-type: disc;
    padding-left: 20px;
    margin: 0;
}
.script-block .char-list li {
    font-size: 0.95rem;
    margin-bottom: 8px;
    color: #334155;
    line-height: 1.5;
}

/* 滚动的 Turns 容器 */
.turns-scroll-container {
    max-height: 300px;
    overflow-y: auto;
    padding-right: 8px;
}
.turns-scroll-container::-webkit-scrollbar { width: 6px; }
.turns-scroll-container::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }

.turn-item {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
}
.turn-item-header {
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 8px;
    font-size: 1rem;
}
.turn-item-text {
    font-size: 0.95rem;
    color: #1e293b;
    margin-bottom: 10px;
}
.turn-item-context {
    font-size: 0.85rem;
    color: #475569;
    background: #f1f5f9;
    padding: 10px;
    border-radius: 6px;
    border-left: 3px solid var(--primary);
}

/* --- 右侧栏 --- */
.models-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}
.model-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.02);
    display: flex;
    flex-direction: column;
}
.model-card-header {
    text-align: center;
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: 1.3rem;
    color: var(--primary);
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 2px solid #eff6ff;
}
.model-audio-wrapper { margin-bottom: 15px; }
.model-scores {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 15px;
}
.score-item {
    background: #f8fafc;
    padding: 10px 4px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.score-item strong {
    color: #475569;
    margin-bottom: 6px;
    font-size: 0.75rem;
    white-space: nowrap;
}
.winner-tag {
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    width: 100%;
    text-align: center;
}
.win-model { background: #dcfce7; color: #166534; }
.win-gt { background: #fee2e2; color: #991b1b; }
.win-tie { background: #f1f5f9; color: #64748b; }

/* 折叠面板 */
details {
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid var(--border);
    overflow: hidden;
    margin-top: auto;
}
details summary {
    cursor: pointer;
    padding: 12px;
    font-weight: 600;
    color: #475569;
    font-size: 0.9rem;
    background: #f1f5f9;
    list-style: none;
    text-align: center;
}
details summary::-webkit-details-marker { display: none; }



.details-content { padding: 15px; border-top: 1px solid var(--border); }
.details-content h4 { margin-bottom: 10px; color: var(--primary); font-size: 0.9rem; }
.reasoning-block {
    margin-bottom: 10px;
    background: #fff;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    font-size: 0.8rem;
    line-height: 1.5;
}

/* 折叠框美化 */
.reasoning-details {
    margin-top: 15px;
}
.reasoning-details summary {
    cursor: pointer;
    padding: 10px 15px;
    background: #eff6ff;
    color: var(--primary);
    font-weight: 600;
    border-radius: 8px;
    text-align: center;
    list-style: none;
    font-size: 0.9rem;
    transition: background 0.2s;
}
.reasoning-details summary:hover {
    background: #dbeafe;
}
.reasoning-details summary::-webkit-details-marker {
    display: none;
}
.reasoning-details summary::after {
    content: " ▼";
    font-size: 0.8rem;
}
.reasoning-details[open] summary::after {
    content: " ▲";
}
.reasoning-details .details-content {
    background: #fff;
    padding: 15px;
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 8px 8px;
}

/* 确保详情折叠框干净整洁 */
.reasoning-details {
    margin-top: 15px;
}
.reasoning-details summary {
    cursor: pointer;
    padding: 10px 15px;
    background: #eff6ff;
    color: var(--primary);
    font-weight: 600;
    border-radius: 8px;
    text-align: center;
    list-style: none;
    font-size: 0.9rem;
    transition: background 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}
.reasoning-details summary:hover {
    background: #dbeafe;
}
.reasoning-details summary::-webkit-details-marker {
    display: none;
}
.reasoning-details summary::after {
    content: "▼";
    font-size: 0.75rem;
}
.reasoning-details[open] summary::after {
    content: "▲";
}
.reasoning-details .details-content {
    background: #fff;
    padding: 15px;
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 8px 8px;
}
