/**
 * 登科督学班管理系统 - 练习页样式（重构版）
 * 四视图：分类首页 / 答题页 / 报告页 / 解析页
 * 配色：蓝主色 #1E88E5，深蓝 #1565C0
 */

/* ===== 分类首页 ===== */

.dk-practice-cat-card {
    margin-bottom: 12px;
}

.dk-practice-cat-list {
    /* 无额外样式，子行由row控制 */
}

.dk-practice-cat-row {
    display: flex;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background 0.2s;
}

.dk-practice-cat-row:hover {
    background: #E3F2FD;
}

.dk-practice-cat-row:last-child {
    border-bottom: none;
}

.dk-practice-cat-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin-right: 10px;
    flex-shrink: 0;
}

.dk-practice-cat-name {
    flex: 1;
    font-size: 15px;
    font-weight: 500;
    color: #333;
}

.dk-practice-cat-count {
    font-size: 13px;
    color: #1E88E5;
    font-weight: 600;
    flex-shrink: 0;
}

.dk-practice-stats-card {
    margin-bottom: 12px;
}

.dk-practice-stat-value {
    font-weight: 600;
    color: #1E88E5;
}

/* ===== 答题页顶部栏 ===== */

.dk-practice-topbar {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 16px;
}

.dk-practice-topbar-back {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-right: 8px;
    font-size: 20px;
    color: #1E88E5;
}

.dk-practice-topbar-title {
    flex: 1;
    font-size: 16px;
    font-weight: 600;
    color: #1565C0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dk-practice-topbar-timer {
    font-size: 14px;
    font-weight: 600;
    color: #F44336;
    flex-shrink: 0;
    min-width: 48px;
    text-align: right;
}

/* ===== 题目区域 ===== */

.dk-practice-question-card {
    margin-bottom: 12px;
}

.dk-practice-question-type {
    font-size: 13px;
    color: #1E88E5;
    font-weight: 500;
    margin-bottom: 8px;
}

.dk-practice-question-content {
    font-size: 15px;
    line-height: 1.6;
    color: #333;
}

.dk-practice-options-card {
    margin-bottom: 12px;
}

/* ===== 选项 ===== */

.dk-practice-option {
    display: flex;
    align-items: flex-start;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s;
    background: #fafafa;
}

.dk-practice-option:hover {
    border-color: #1E88E5;
    background: #E3F2FD;
}

.dk-practice-option.dk-practice-option-selected {
    border-color: #1E88E5;
    background: #E3F2FD;
}

.dk-practice-option.dk-practice-option-correct {
    border-color: #4CAF50;
    background: #E8F5E9;
    cursor: default;
}

.dk-practice-option.dk-practice-option-wrong {
    border-color: #F44336;
    background: #FFEBEE;
    cursor: default;
}

.dk-practice-option-label {
    width: 24px;
    font-weight: 600;
    color: #1E88E5;
    margin-right: 8px;
    flex-shrink: 0;
}

.dk-practice-option.dk-practice-option-correct .dk-practice-option-label {
    color: #4CAF50;
}

.dk-practice-option.dk-practice-option-wrong .dk-practice-option-label {
    color: #F44336;
}

.dk-practice-option-content {
    font-size: 14px;
    line-height: 1.4;
}

/* ===== 判断题选项 ===== */

.dk-practice-judge-options {
    display: flex;
    gap: 12px;
}

.dk-practice-judge-option {
    flex: 1;
    padding: 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    text-align: center;
    font-size: 16px;
    transition: all 0.2s;
    background: #fafafa;
}

.dk-practice-judge-option:hover {
    border-color: #1E88E5;
    background: #E3F2FD;
}

.dk-practice-judge-option.dk-practice-option-selected {
    border-color: #1E88E5;
    background: #E3F2FD;
}

.dk-practice-judge-option.dk-practice-option-correct {
    border-color: #4CAF50;
    background: #E8F5E9;
    cursor: default;
}

.dk-practice-judge-option.dk-practice-option-wrong {
    border-color: #F44336;
    background: #FFEBEE;
    cursor: default;
}

/* ===== 提交按钮 ===== */

.dk-practice-submit-btn {
    width: 100%;
    padding: 12px 0;
    font-size: 16px;
    margin-bottom: 12px;
}

/* ===== 单题结果区 ===== */

.dk-practice-result-card {
    margin-bottom: 12px;
}

.dk-practice-result-row {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.dk-practice-result-row:last-of-type {
    border-bottom: none;
}

.dk-practice-result-label {
    font-size: 14px;
    color: #666;
    width: 70px;
    flex-shrink: 0;
}

.dk-practice-result-correct-label {
    color: #4CAF50;
    font-weight: 600;
}

.dk-practice-result-your-label {
    color: #666;
    font-weight: 600;
}

.dk-practice-result-your-correct {
    color: #4CAF50;
}

.dk-practice-result-your-wrong {
    color: #F44336;
}

.dk-practice-result-value {
    flex: 1;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.dk-practice-result-status {
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    padding: 10px 0;
}

/* ===== 解析卡片 ===== */

.dk-practice-analysis-card {
    margin-bottom: 12px;
}

.dk-practice-analysis-title {
    font-size: 14px;
    font-weight: 600;
    color: #1E88E5;
    margin-bottom: 8px;
}

.dk-practice-analysis-content {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    padding: 12px;
    background: #f5f5f5;
    border-radius: 6px;
}

/* ===== 下一题按钮 ===== */

.dk-practice-next-btn {
    width: 100%;
    padding: 12px 0;
    font-size: 16px;
    margin-bottom: 12px;
}

/* ===== 底部操作栏 ===== */

.dk-practice-bottom-bar {
    display: flex;
    gap: 10px;
    padding: 10px 0;
    margin-top: 8px;
}

.dk-practice-card-btn {
    flex: 1;
    padding: 10px 0;
    font-size: 14px;
    text-align: center;
}

.dk-practice-handin-btn {
    flex: 1;
    padding: 10px 0;
    font-size: 14px;
    text-align: center;
}

.dk-btn-outline {
    background: #fff;
    color: #1E88E5;
    border: 1px solid #1E88E5;
}

.dk-btn-outline:hover {
    background: #E3F2FD;
}

/* ===== 答题卡弹窗 ===== */

.dk-practice-card-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.4);
    z-index: 200;
}

.dk-practice-card-popup {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-width: 480px;
    margin: 0 auto;
    background: #fff;
    border-radius: 12px 12px 0 0;
    padding: 16px;
    z-index: 201;
    animation: dkSlideUp 0.3s ease;
}

@keyframes dkSlideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.dk-practice-card-popup-title {
    font-size: 16px;
    font-weight: 600;
    color: #1565C0;
    text-align: center;
    margin-bottom: 16px;
}

.dk-practice-card-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

.dk-card-item {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin: 0 auto;
}

.dk-card-item-unanswered {
    background: #E0E0E0;
    color: #999;
}

.dk-card-item-answered {
    background: #1E88E5;
    color: #fff;
}

.dk-card-item-correct {
    background: #4CAF50;
    color: #fff;
}

.dk-card-item-wrong {
    background: #F44336;
    color: #fff;
}

.dk-card-item-skip {
    background: #E0E0E0;
    color: #999;
}

.dk-practice-card-close-btn {
    width: 100%;
    padding: 10px 0;
    font-size: 14px;
}

/* ===== 练习报告 ===== */

.dk-report-score-card {
    text-align: center;
    padding: 24px 16px;
    margin-bottom: 12px;
}

.dk-report-score-big {
    font-size: 48px;
    font-weight: 700;
    color: #1E88E5;
    line-height: 1;
}

.dk-report-score-sub {
    font-size: 16px;
    color: #666;
    margin-top: 4px;
}

.dk-report-score-rate {
    font-size: 18px;
    font-weight: 600;
    color: #4CAF50;
    margin-top: 12px;
}

.dk-report-time-card {
    margin-bottom: 12px;
}

.dk-report-time-row {
    display: flex;
    align-items: center;
    padding: 12px 0;
}

.dk-report-time-label {
    flex: 1;
    font-size: 15px;
    color: #333;
}

.dk-report-time-value {
    font-size: 16px;
    font-weight: 600;
    color: #1E88E5;
}

.dk-report-cat-card {
    margin-bottom: 12px;
}

.dk-report-cat-row {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.dk-report-cat-row:last-child {
    border-bottom: none;
}

.dk-report-cat-name {
    flex: 1;
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

.dk-report-cat-rate {
    font-size: 14px;
    font-weight: 600;
    color: #4CAF50;
    width: 50px;
    text-align: right;
    flex-shrink: 0;
}

.dk-report-cat-count {
    font-size: 14px;
    color: #666;
    width: 60px;
    text-align: right;
    flex-shrink: 0;
}

.dk-report-card-card {
    margin-bottom: 12px;
}

.dk-report-card-grid {
    grid-template-columns: repeat(5, 1fr);
}

.dk-report-btns {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 16px;
}

.dk-report-next-btn {
    width: 100%;
    padding: 14px 0;
    font-size: 16px;
    background: #1E88E5;
    color: #fff;
    border: none;
    border-radius: 8px;
}

.dk-report-all-btn {
    width: 100%;
    padding: 14px 0;
    font-size: 16px;
}

.dk-report-wrong-btn {
    width: 100%;
    padding: 14px 0;
    font-size: 16px;
}

.dk-report-home-btn {
    width: 100%;
    padding: 14px 0;
    font-size: 16px;
}

/* ===== 解析页 ===== */

.dk-analysis-question-card {
    margin-bottom: 12px;
}

.dk-analysis-options-card {
    margin-bottom: 12px;
}

.dk-analysis-result-card {
    margin-bottom: 12px;
}

.dk-analysis-result-row {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.dk-analysis-result-row:last-of-type {
    border-bottom: none;
}

.dk-analysis-result-label {
    font-size: 14px;
    color: #666;
    width: 70px;
    flex-shrink: 0;
    font-weight: 600;
}

.dk-analysis-correct-label {
    color: #4CAF50;
}

.dk-analysis-your-label {
    color: #666;
}

.dk-analysis-result-value {
    flex: 1;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.dk-analysis-correct-value {
    color: #4CAF50;
}

.dk-analysis-wrong-value {
    color: #F44336;
}

.dk-analysis-skip-value {
    color: #999;
}

.dk-analysis-result-status {
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    padding: 10px 0;
}

.dk-analysis-analysis-card {
    margin-bottom: 16px;
}

.dk-analysis-nav-btns {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.dk-analysis-prev-btn,
.dk-analysis-next-btn {
    flex: 1;
    padding: 10px 0;
    font-size: 14px;
    text-align: center;
}

.dk-analysis-back-btn {
    width: 100%;
    padding: 12px 0;
    font-size: 16px;
    margin-bottom: 20px;
}

/* ===== 错题本 & 薄弱项样式（保留原有） ===== */

.dk-wrongbook-card {
    margin-bottom: 12px;
}

.dk-wrongbook-title {
    cursor: pointer;
    user-select: none;
}

.dk-wrongbook-toggle {
    font-size: 12px;
    color: #999;
    margin-left: 4px;
}

.dk-wrongbook-body {
    padding-top: 8px;
}

.dk-wrongbook-empty {
    text-align: center;
    color: #999;
    font-size: 14px;
    padding: 16px 0;
}

.dk-weakness-row {
    display: flex;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 13px;
}

.dk-weakness-row:last-child {
    border-bottom: none;
}

.dk-weakness-name {
    width: 70px;
    flex-shrink: 0;
    color: #333;
    font-weight: 500;
}

.dk-weakness-tag {
    display: inline-block;
    background: #F44336;
    color: #fff;
    font-size: 10px;
    padding: 1px 4px;
    border-radius: 3px;
    margin-left: 3px;
    vertical-align: middle;
}

.dk-weakness-bar-wrap {
    flex: 1;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    margin: 0 8px;
    overflow: hidden;
}

.dk-weakness-bar {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.dk-weakness-rate {
    width: 40px;
    flex-shrink: 0;
    text-align: right;
    font-weight: 600;
    color: #333;
}

.dk-weakness-count {
    width: 65px;
    flex-shrink: 0;
    text-align: right;
    color: #999;
}

.dk-wrongbook-item {
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
}

.dk-wrongbook-item:last-child {
    border-bottom: none;
}

.dk-wrongbook-item-header {
    display: flex;
    gap: 8px;
    margin-bottom: 6px;
}

.dk-wrongbook-item-type {
    display: inline-block;
    background: #FFF3E0;
    color: #FF9800;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 3px;
}

.dk-wrongbook-item-cat {
    display: inline-block;
    background: #E3F2FD;
    color: #1E88E5;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 3px;
}

.dk-wrongbook-item-content {
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    margin-bottom: 6px;
}

.dk-wrongbook-item-my {
    font-size: 13px;
    color: #666;
    margin-bottom: 2px;
}

.dk-wrongbook-item-correct {
    font-size: 13px;
    color: #666;
    margin-bottom: 4px;
}

.dk-wrongbook-item-analysis {
    font-size: 13px;
    color: #666;
    padding: 8px;
    background: #f5f5f5;
    border-radius: 4px;
    line-height: 1.4;
    margin-top: 4px;
}

.dk-practice-back {
    cursor: pointer;
}

/* ===== 树形分类（二级分类） ===== */
.dk-cat-tree-node { margin-bottom: 4px; }
.dk-cat-tree-header { display: flex; align-items: center; padding: 12px 14px; background: #fff; border-radius: 8px; cursor: pointer; transition: background 0.2s; }
.dk-cat-tree-header:hover { background: #E3F2FD; }
.dk-cat-tree-arrow { width: 20px; font-size: 14px; color: #1E88E5; text-align: center; flex-shrink: 0; }
.dk-cat-tree-arrow-leaf { color: #999; font-size: 10px; }
.dk-cat-tree-name { flex: 1; font-size: 15px; color: #333; font-weight: 500; }
.dk-cat-tree-count { font-size: 13px; color: #999; }
.dk-cat-tree-children { padding: 4px 0 4px 28px; display: none; }
.dk-cat-tree-child { display: flex; align-items: center; padding: 10px 14px; background: #FAFAFA; border-radius: 6px; cursor: pointer; margin-bottom: 4px; transition: background 0.2s; }
.dk-cat-tree-child:hover { background: #E3F2FD; }
.dk-cat-tree-child-name { flex: 1; font-size: 14px; color: #333; }
.dk-cat-tree-child-count { font-size: 12px; color: #999; }
