/* ===== 统一测试案例详情页 /case/{id}.html ===== */
.cs-wrap { margin-top: 12px; }

.cs-crumb {
    margin: 16px 0 8px;
    font-size: 0.85rem;
    color: var(--text-muted, #888);
}
.cs-crumb a { color: var(--text-muted, #888); text-decoration: none; }
.cs-crumb a:hover { color: var(--sun-red, #eb1313); }
.cs-crumb .sep { margin: 0 6px; color: #ccc; }
.cs-crumb .cur { color: var(--text-secondary, #444); font-weight: 600; }

.cs-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 24px;
    align-items: start;
    margin-bottom: 40px;
}

/* 主内容 */
.cs-main { min-width: 0; }

.cs-head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 18px 20px;
    background: linear-gradient(135deg, #fff 0%, #fff6f6 100%);
    border: 1px solid #f0d9d9;
    border-radius: 14px;
}
.cs-type-badge {
    background: var(--sun-red, #eb1313);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 999px;
    white-space: nowrap;
}
.cs-title {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--text-primary, #222);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cs-test-btn {
    flex: 0 0 auto;
    background: var(--sun-red, #eb1313);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.92rem;
    padding: 9px 16px;
    border-radius: 999px;
    transition: transform .15s ease, box-shadow .15s ease;
}
.cs-test-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(235,19,19,.28); }

.cs-card {
    margin-top: 18px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 14px;
    padding: 18px 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,.03);
}
.cs-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary, #222);
    margin-bottom: 12px;
    padding-left: 10px;
    border-left: 4px solid var(--sun-red, #eb1313);
}
.cs-params {
    font-size: 0.95rem;
    line-height: 1.9;
    color: var(--text-secondary, #555);
}
.cs-content {
    font-size: 0.98rem;
    line-height: 1.95;
    color: var(--text-secondary, #444);
    word-break: break-word;
}
.cs-content p { margin: 0 0 12px; }
.cs-content h1, .cs-content h2, .cs-content h3 { color: var(--text-primary, #222); margin: 18px 0 10px; }
.cs-content ul, .cs-content ol { padding-left: 22px; margin: 0 0 12px; }
.cs-content table { border-collapse: collapse; width: 100%; margin: 0 0 12px; }
.cs-content th, .cs-content td { border: 1px solid #e5e5e5; padding: 6px 10px; }
.cs-content strong, .cs-content b { color: var(--text-primary, #222); }

.cs-tip {
    margin-top: 16px;
    font-size: 0.85rem;
    color: var(--text-muted, #888);
    background: #faf7f2;
    border: 1px dashed #e6dcc8;
    border-radius: 10px;
    padding: 12px 14px;
}

/* 右侧栏 */
.cs-side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 16px; }

.cs-side-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 14px;
    padding: 14px 16px;
    box-shadow: 0 2px 10px rgba(0,0,0,.03);
}
.cs-side-title {
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--text-primary, #222);
    margin-bottom: 10px;
}
.cs-side-list { list-style: none; margin: 0; padding: 0; }
.cs-side-list li { margin-bottom: 9px; }
.cs-side-list li:last-child { margin-bottom: 0; }
.cs-side-list a {
    display: block;
    font-size: 0.86rem;
    color: var(--text-secondary, #555);
    text-decoration: none;
    padding: 7px 10px;
    border-radius: 8px;
    background: #fafafa;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: background .15s ease, color .15s ease;
}
.cs-side-list a:hover { background: #fff0f0; color: var(--sun-red, #eb1313); }

.cs-tool-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}
.cs-tool-item {
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    font-size: 0.82rem;
    color: var(--text-secondary, #555);
    background: #fafafa;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    padding: 8px 9px;
    overflow: hidden;
}
.cs-tool-item:hover { background: #fff0f0; color: var(--sun-red, #eb1313); }
.cs-tool-icon { font-size: 1rem; }
.cs-tool-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 响应式：窄屏时右侧栏移到下方 */
@media (max-width: 980px) {
    .cs-layout { grid-template-columns: 1fr; }
    .cs-side { position: static; flex-direction: column; }
}
@media (max-width: 560px) {
    .cs-title { font-size: 1.2rem; white-space: normal; }
    .cs-test-btn { width: 100%; text-align: center; }
    .cs-head { padding: 14px; }
}
