/* =========================================================
   英语学习平台 - 题目交互与题型专用样式表 (Quiz & Interaction CSS)
   依据手机屏幕比例 (16:9 ~ 20:9) 动态计算纵向布局，黄金分割排布
   ========================================================= */

/* 主答题区与交互区自适应弹性容器 */
#quizArea {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    justify-content: space-between;
}

/* 大富翁 10 连对纯粹进度条 */
.mono-streak-mount {
    background: #ffffff;
    border: 1.5px solid #bfdbfe;
    border-radius: 14px;
    padding: 10px 14px;
    margin: 6px 0 10px;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.08);
}
.mono-streak-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.88rem;
    font-weight: 800;
    color: #1e40af;
    margin-bottom: 6px;
}
.mono-streak-top strong {
    font-size: 1.15rem;
    color: #2563eb;
}
.mono-streak-tip-tag {
    font-size: 0.72rem;
    color: #059669;
    background: #ecfdf5;
    padding: 2px 6px;
    border-radius: 8px;
    font-weight: 700;
}
.mono-streak-track {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
}
.mono-streak-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #10b981);
    border-radius: 6px;
    transition: width 0.3s ease;
}

#quizInteraction {
    display: flex;
    flex-direction: column;
    flex: 1;
    justify-content: flex-end;
    min-height: 0;
}

/* ================= 核心题目展示卡片 ================= */
.question-card {
    background: linear-gradient(180deg, #ffffff 0%, var(--page-bg) 100%);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: clamp(10px, 1.8vh, 18px) clamp(12px, 3.5vw, 18px);
    margin: clamp(4px, 0.8vh, 8px) 0 clamp(8px, 1.6vh, 16px);
    text-align: center;
    box-shadow: var(--shadow-sm);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: clamp(84px, 14vh, 130px);
}

.card-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2px;
}

.unit-tag {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--primary);
    background: var(--primary-bg);
    padding: 2px 7px;
    border-radius: 5px;
    margin-bottom: 0;
}

.stem-voice-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: clamp(2px, 0.6vh, 6px) 0;
}

.question-stem {
    font-size: clamp(1.42rem, 4.2vw, 1.75rem);
    font-weight: 800;
    color: var(--text-main);
    word-break: break-word;
    margin: clamp(2px, 0.5vh, 6px) 0;
    letter-spacing: -0.5px;
}

.question-subtext {
    font-size: clamp(0.76rem, 1.8vw, 0.85rem);
    color: var(--text-muted);
    margin-top: clamp(1px, 0.4vh, 4px);
}

.audio-mini-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    color: #ffffff;
    border: none;
    font-size: 15px;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(79, 70, 229, 0.25);
    flex-shrink: 0;
    transition: transform 0.15s ease;
}
.audio-mini-btn:active { transform: scale(0.92); }
.audio-mini-btn.playing { animation: pulse-ring 1.2s infinite; }

/* 听力题大播放按钮 */
.audio-play-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: clamp(58px, 8.5vh, 70px);
    height: clamp(58px, 8.5vh, 70px);
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    color: #ffffff;
    border-radius: 50%;
    border: none;
    font-size: clamp(24px, 3.5vh, 28px);
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.3);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    margin: clamp(6px, 1.2vh, 14px) auto;
}
.audio-play-btn:active { transform: scale(0.92); }
.audio-play-btn.playing { animation: pulse-ring 1.2s infinite; }
@keyframes pulse-ring {
    0% { box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.6); }
    70% { box-shadow: 0 0 0 16px rgba(79, 70, 229, 0); }
    100% { box-shadow: 0 0 0 0 rgba(79, 70, 229, 0); }
}

/* 句子挖空高亮槽 */
.cloze-blank {
    display: inline-block;
    min-width: 70px;
    padding: 0 8px;
    margin: 0 4px;
    border-bottom: 3px solid var(--primary);
    color: var(--primary);
    font-weight: 800;
    text-align: center;
    animation: blink-border 1.5s infinite;
}

@keyframes blink-border {
    0%, 100% { border-color: var(--primary); }
    50% { border-color: #a5b4fc; }
}

/* ================= 4选1 选项卡片列表 ================= */
.options-list {
    display: flex;
    flex-direction: column;
    gap: clamp(9px, 1.6vh, 15px);
    margin-top: auto;
    margin-bottom: clamp(6px, 1.2vh, 14px);
    width: 100%;
}

.option-btn {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: clamp(48px, 6.8vh, 60px);
    padding: clamp(8px, 1.2vh, 12px) clamp(12px, 3vw, 16px);
    background: #ffffff;
    border: 1.5px solid var(--border-color);
    border-radius: 14px;
    font-size: clamp(0.96rem, 2.4vw, 1.06rem);
    font-weight: 600;
    color: var(--text-main);
    text-align: left;
    cursor: pointer;
    transition: all 0.15s ease;
    box-shadow: var(--shadow-sm);
    user-select: none;
    box-sizing: border-box;
}

.option-btn:active {
    transform: scale(0.98);
}

.option-letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: clamp(28px, 3.8vh, 32px);
    height: clamp(28px, 3.8vh, 32px);
    border-radius: 8px;
    background: var(--page-bg);
    color: var(--text-muted);
    font-size: clamp(0.85rem, 2vw, 0.92rem);
    font-weight: 700;
    margin-right: 12px;
    flex-shrink: 0;
    border: 1px solid var(--border-color);
}

.option-text {
    flex: 1;
    min-width: 0;
    word-break: normal;
    overflow-wrap: break-word;
    hyphens: auto;
    line-height: 1.38;
}

/* 状态样式 */
.option-btn.correct {
    background: var(--success-bg) !important;
    border-color: var(--success-border) !important;
    color: #065f46 !important;
}
.option-btn.correct .option-letter {
    background: var(--success);
    color: #ffffff;
    border-color: var(--success);
}

.option-btn.wrong {
    background: var(--danger-bg) !important;
    border-color: var(--danger-border) !important;
    color: #991b1b !important;
}
.option-btn.wrong .option-letter {
    background: var(--danger);
    color: #ffffff;
    border-color: var(--danger);
}

.option-btn:disabled {
    cursor: default;
    pointer-events: none;
}

/* ================= 单词拼写/填空交互区 (沉底自适应) ================= */
.input-area {
    display: flex;
    flex-direction: column;
    gap: clamp(8px, 1.2vh, 12px);
    margin-top: auto;
    margin-bottom: clamp(4px, 0.8vh, 8px);
    width: 100%;
}

.action-row {
    display: flex;
    gap: 10px;
}

.btn-primary {
    flex: 1;
    height: clamp(44px, 5.8vh, 48px);
    background: linear-gradient(135deg, #4f46e5, #4338ca);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 0.98rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(79, 70, 229, 0.3);
    transition: all 0.15s ease;
}
.btn-primary:active { transform: scale(0.98); }

.btn-outline {
    padding: 0 14px;
    height: clamp(44px, 5.8vh, 48px);
    background: #ffffff;
    border: 1.5px solid var(--border-color);
    color: var(--text-muted);
    border-radius: 12px;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
}
.btn-outline:active { background: #f1f5f9; }

/* 句子挖空选词 中文句意与考查词卡片 */
.cloze-chinese-card {
    margin-top: clamp(6px, 1vh, 10px);
    padding: clamp(8px, 1.2vh, 12px) 14px;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    text-align: left;
    display: none;
    flex-direction: column;
    gap: 4px;
    animation: fadeIn 0.25s ease-out;
}
.cloze-chinese-card .trans-sent { font-size: 0.95rem; color: #1e293b; line-height: 1.45; }
.cloze-chinese-card .trans-word { font-size: 0.85rem; color: #64748b; }
