/* style.css - 测试用例评级工具样式 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
}

body {
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
    padding: 20px;
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* 头部样式 */
header {
    text-align: center;
    padding: 25px;
    background: linear-gradient(135deg, #4b6cb7 0%, #182848 100%);
    color: white;
    border-radius: 12px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

h1 {
    font-size: 2.4rem;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 20px;
}

/* 模式切换器 */
.mode-switcher {
    background: rgba(255, 255, 255, 0.15);
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 12px 25px;
    border-radius: 50px;
    backdrop-filter: blur(10px);
    margin-top: 10px;
}

#standardMode {
    padding: 8px 15px;
    border-radius: 6px;
    border: none;
    font-weight: 600;
    background-color: white;
    color: #2c3e50;
    cursor: pointer;
}

.mode-hint {
    font-size: 0.9rem;
    opacity: 0.85;
    font-style: italic;
}

/* 主内容区布局 */
.main-content {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.assessment-panel,
.result-panel {
    background-color: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    flex: 1;
    min-width: 300px;
}

/* 输入区域 */
.input-section {
    margin-bottom: 30px;
}

.input-section label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 1.1rem;
}

.input-section input {
    width: 100%;
    padding: 14px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.input-section input:focus {
    border-color: #3498db;
    outline: none;
}

/* 评估维度 */
.dimension {
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 1px solid #eee;
}

.dimension-title {
    font-size: 1.25rem;
    color: #2c3e50;
    margin-bottom: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.criteria-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.criterion {
    flex: 1 1 calc(50% - 12px);
    min-width: 200px;
    padding: 15px;
    background-color: #f8fafc;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: flex-start;
}

.criterion:hover {
    background-color: #e8f4fc;
    border-color: #3498db;
    transform: translateY(-3px);
}

.criterion.selected {
    background-color: #e1f0fa;
    border-color: #2980b9;
    font-weight: 600;
}

.criterion input {
    margin-right: 12px;
    margin-top: 3px;
    transform: scale(1.2);
    cursor: pointer;
}

.criterion-text {
    font-size: 1rem;
    line-height: 1.5;
}

/* 快速模板 */
.quick-templates {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px dashed #ddd;
}

.quick-templates h3 {
    margin-bottom: 15px;
    color: #2c3e50;
}

.template-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.template-btn {
    padding: 10px 18px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.2s;
    flex: 1;
    min-width: 120px;
}

.template-btn:hover {
    background-color: #2980b9;
}

/* 结果面板 */
.result-box {
    text-align: center;
    padding: 30px 25px;
    background: linear-gradient(to bottom right, #f8f9fa, #eef2f7);
    border-radius: 12px;
    margin-top: 20px;
    border: 1px solid #e1e8ed;
}

.level-badge {
    display: inline-block;
    font-size: 2.8rem;
    font-weight: 800;
    padding: 18px 35px;
    border-radius: 12px;
    margin: 20px 0;
    color: white;
    letter-spacing: 1px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.level-p0 { background: linear-gradient(135deg, #e74c3c, #c0392b); }
.level-p1 { background: linear-gradient(135deg, #e67e22, #d35400); }
.level-p2 { background: linear-gradient(135deg, #f1c40f, #f39c12); color: #2c3e50; }
.level-p3 { background: linear-gradient(135deg, #2ecc71, #27ae60); }

.level-description {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: #2c3e50;
    font-weight: 600;
}

.test-scenario {
    font-size: 1rem;
    color: #555;
    background-color: rgba(236, 240, 241, 0.7);
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
    text-align: left;
    line-height: 1.7;
}

.ratio-hint {
    margin-top: 20px;
    font-size: 0.9rem;
    color: #7f8c8d;
    font-style: italic;
    padding: 10px;
    background-color: rgba(255, 255, 255, 0.6);
    border-radius: 6px;
}

/* 操作按钮 */
.action-buttons {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.action-buttons button {
    flex: 1;
    padding: 16px;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

#saveCase {
    background-color: #2ecc71;
    color: white;
}

#saveCase:hover {
    background-color: #27ae60;
}

#clearAll {
    background-color: #95a5a6;
    color: white;
}

#clearAll:hover {
    background-color: #7f8c8d;
}

/* 用例列表 */
.case-list {
    margin-top: 35px;
}

.case-list h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #eee;
}

#caseListContainer {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 10px;
}

.case-item {
    padding: 18px;
    margin-bottom: 15px;
    border-radius: 10px;
    background-color: #f8f9fa;
    border-left: 5px solid #3498db;
    transition: transform 0.2s;
}

.case-item:hover {
    transform: translateX(5px);
    background-color: #f0f7ff;
}

.case-item.p0 { border-left-color: #e74c3c; }
.case-item.p1 { border-left-color: #e67e22; }
.case-item.p2 { border-left-color: #f1c40f; }
.case-item.p3 { border-left-color: #2ecc71; }

.case-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.case-name {
    font-weight: 700;
    font-size: 1.1rem;
    color: #2c3e50;
}

.case-level {
    padding: 4px 12px;
    border-radius: 20px;
    color: white;
    font-weight: 700;
    font-size: 0.9rem;
}

.case-details {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.5;
}

.empty-hint {
    text-align: center;
    color: #95a5a6;
    padding: 40px 20px;
    font-style: italic;
}

/* 页脚 */
footer {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e1e8ed;
}

.footer-note {
    font-size: 0.9rem;
    color: #7f8c8d;
    line-height: 1.7;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

/* 响应式调整 */
@media (max-width: 1100px) {
    .main-content {
        flex-direction: column;
    }
    .assessment-panel,
    .result-panel {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .criterion {
        flex: 1 1 100%;
    }
    .template-btn {
        min-width: 100%;
    }
    .action-buttons {
        flex-direction: column;
    }
    h1 {
        font-size: 2rem;
    }
    .level-badge {
        font-size: 2.2rem;
        padding: 15px 25px;
    }
}