/* ============================================================
 * 三种数学新题型（计算填空 / 最大最小填几 / 填相同数）公共样式
 * 2026-10-23
 * ============================================================ */

.hidden {
    display: none !important;
}

/* ============================================================
 * 题目区
 * ============================================================ */
.question-box {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 24px;
    padding: 40px 24px 30px;
    border: 2px solid #e2ecf6;
    text-align: center;
    margin-bottom: 24px;
}

.question-hint {
    color: #42a5f5;
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 12px;
    letter-spacing: 1px;
}

/* 题干（纯文本展示，空位用红框标记） */
.blank-display {
    margin: 24px auto 20px;
    font-size: 2.2rem;
    font-weight: 700;
    color: #0d2b3e;
    font-family: 'Courier New', 'Consolas', monospace;
    line-height: 1.7;
    text-align: center;
    word-break: break-all;
}

.blank-display .blank-hole {
    display: inline-block;
    min-width: 84px;
    height: 56px;
    margin: 0 4px;
    border-bottom: 3px solid #64b5f6;
    background: #f0f7ff;
    border-radius: 8px 8px 0 0;
    color: #0d47a1;
    font-size: 1.7rem;
    line-height: 56px;
    text-align: center;
    vertical-align: middle;
    transition: 0.15s;
}

.blank-display .blank-hole.filled {
    border-bottom-color: #1e88e5;
    background: #e3f2fd;
    box-shadow: 0 0 0 3px rgba(66, 165, 245, 0.18);
}

.blank-display .blank-hole.answer-reveal {
    color: #2e7d32;
    border-bottom-color: #2e7d32;
    background: #e8f5e9;
}

.blank-display .blank-hole.answer-wrong {
    color: #c62828;
    border-bottom-color: #c62828;
    background: #ffebee;
}

/* 隐藏输入框（接收键盘输入） */
.blank-hidden-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 1px;
    height: 1px;
}

/* 反馈 */
.feedback {
    min-height: 28px;
    margin: 10px 0 16px;
    font-size: 1.05rem;
    font-weight: 700;
}
.feedback.correct { color: #2e7d32; }
.feedback.wrong   { color: #c62828; }

/* ============================================================
 * 数字键盘
 * ============================================================ */
.number-pad {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 8px;
    margin: 0 auto 16px;
    max-width: 720px;
    padding: 0 10px;
}

.num-btn {
    flex: 1 1 0;
    min-width: 0;
    height: 56px;
    border: 2px solid #cfe4f7;
    background: #ffffff;
    color: #1e88e5;
    font-size: 1.35rem;
    font-weight: 800;
    font-family: inherit;
    border-radius: 14px;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    transition: all 0.08s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.num-btn:hover  { background: #f0f7ff; border-color: #64b5f6; }
.num-btn:active { background: #e3f2fd; border-color: #1e88e5; transform: scale(0.96); }

.num-btn-del {
    font-size: 0.95rem;
    gap: 6px;
    color: #e65100;
    border-color: #ffcc80;
    padding: 0 10px;
}
.num-btn-del:hover  { background: #fff8e1; border-color: #ffb74d; }
.num-btn-del:active { background: #ffe0b2; border-color: #e65100; }

#submitBtn,
#nextBtn {
    padding: 12px 44px;
    font-size: 1.05rem;
    border-radius: 40px;
    margin-top: 4px;
}

/* ============================================================
 * 进度与状态
 * ============================================================ */
.progress-bar {
    height: 14px;
    background: rgba(66, 165, 245, 0.12);
    border-radius: 40px;
    overflow: hidden;
    margin-top: 24px;
    margin-bottom: 18px;
}
.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #42a5f5, #1e88e5);
    border-radius: 40px;
    transition: width 0.3s ease;
}

.practice-meta {
    display: flex;
    justify-content: space-around;
    align-items: center;
    color: #52627a;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0 10px;
}
.practice-meta strong { color: #1e88e5; font-size: 1.05rem; }
.practice-meta .fa { margin-right: 4px; }

/* ============================================================
 * 结果区
 * ============================================================ */
.result-area {
    text-align: center;
    padding: 40px 20px 30px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 24px;
    border: 2px solid #e2ecf6;
}
.result-icon {
    font-size: 4rem;
    line-height: 1;
    margin-bottom: 16px;
}
.result-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: #0d2b3e;
    margin-bottom: 24px;
}
.result-stats {
    font-size: 1.05rem;
    line-height: 2.1;
    color: #0d2b3e;
    margin-bottom: 24px;
}
.result-stats .stat-label { color: #52627a; }
.result-stats .stat-value {
    color: #1e88e5;
    font-weight: 800;
    font-size: 1.15rem;
    margin-left: 4px;
}
.result-stats hr {
    border: none;
    border-top: 1px dashed #c5d8e8;
    margin: 20px auto;
    max-width: 60%;
}

/* ============================================================
 * 错题表
 * ============================================================ */
.wrong-list {
    margin: 24px auto;
    max-width: 760px;
    text-align: left;
}
.wrong-list h4 {
    font-size: 1.05rem;
    color: #c62828;
    margin-bottom: 10px;
    text-align: center;
}
.wrong-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(66, 165, 245, 0.08);
}
.wrong-table th,
.wrong-table td {
    padding: 10px 12px;
    text-align: center;
    border-bottom: 1px solid #eef4fb;
}
.wrong-table th {
    background: #f0f7ff;
    color: #1e88e5;
    font-weight: 700;
}
.wrong-table .q-text {
    text-align: left;
    font-family: 'Courier New', 'Consolas', monospace;
    font-weight: 600;
}
.wrong-table .correct-answer { color: #2e7d32; font-weight: 700; }
.wrong-table .wrong-answer   { color: #c62828; font-weight: 700; }

.result-btns {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 24px;
    flex-wrap: wrap;
}

/* ============================================================
 * 手机端（★ 必须限定 screen，避免污染打印）
 * ============================================================ */
@media screen and (max-width: 768px) {
    .question-box { padding: 30px 16px 24px; }
    .blank-display { font-size: 1.5rem; line-height: 1.8; }
    .blank-display .blank-hole {
        min-width: 64px;
        height: 44px;
        font-size: 1.3rem;
        line-height: 44px;
    }
    .number-pad { flex-wrap: wrap; gap: 6px; padding: 0 4px; }
    .num-btn {
        flex: 0 0 calc(16.666% - 6px);
        height: 52px;
        font-size: 1.25rem;
        border-radius: 12px;
    }
    .num-btn-del { font-size: 0.85rem; gap: 4px; }
    #submitBtn, #nextBtn { padding: 12px 36px; font-size: 1rem; }
    .practice-meta { font-size: 0.85rem; }
    .practice-meta strong { font-size: 0.95rem; }
    .result-icon { font-size: 3.2rem; }
    .result-title { font-size: 1.4rem; }
    .result-stats { font-size: 0.95rem; }
    .wrong-table th, .wrong-table td { padding: 8px 6px; font-size: 0.82rem; }
}

@media screen and (max-width: 380px) {
    .num-btn { flex: 0 0 calc(16.666% - 5px); height: 48px; font-size: 1.15rem; }
    .blank-display .blank-hole { min-width: 56px; height: 40px; font-size: 1.15rem; line-height: 40px; }
}