/* ═══════════════════════════════════════════════════════════════════
   冠词快答 a/an/the Rapid Fire (E4) — /chs/English/ArticleSprint
   主色：深紫 #701a75 → #a21caf。英语学习中心的卡片里这一档深紫还空着，
   和听写的赭褐、最小对立对的橄榄绿、重音的靛蓝分得开。
   ═══════════════════════════════════════════════════════════════════ */

/* ── 等级选择 ─────────────────────────────────────────────────────── */
.as-level-btn {
    border: 2px solid var(--bs-border-color);
    background: var(--bs-body-bg);
    color: var(--bs-body-color);
    border-radius: 0.5rem;
    padding: 0.4rem 0.9rem;
    font-weight: 600;
    line-height: 1.2;
    transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

.as-level-btn:hover {
    border-color: #a21caf;
}

.as-level-btn.active {
    background: #701a75;
    border-color: #701a75;
    color: #fff;
}

/* ── 计时条 ───────────────────────────────────────────────────────── */
.as-timer {
    height: 0.6rem;
    background: var(--bs-secondary-bg);
    border-radius: 1rem;
    overflow: hidden;
}

.as-timer-bar {
    height: 100%;
    width: 100%;
    background: #a21caf;
    /* 每 100ms 更新一次，过渡时间要短于间隔，否则条会滞后于秒数。 */
    transition: width 0.1s linear;
}

.as-time {
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1;
    color: #701a75;
    font-variant-numeric: tabular-nums;
}

.as-time-low {
    color: #dc3545;
}

/* ── 题目 ─────────────────────────────────────────────────────────── */
.as-sentence {
    font-size: clamp(1.15rem, 4.5vw, 1.6rem);
    font-weight: 600;
    line-height: 1.7;
    min-height: 4.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    flex-wrap: wrap;
}

.as-blank {
    display: inline-block;
    min-width: 3.2rem;
    margin: 0 0.15rem;
    padding: 0 0.3rem;
    border-bottom: 3px solid #a21caf;
    text-align: center;
}

.as-blank-filled {
    color: #a21caf;
    font-weight: 700;
}

/* ── 四个选项 ─────────────────────────────────────────────────────── */
.as-choices {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.5rem;
    max-width: 34rem;
    margin: 0 auto;
}

.as-choice {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.1rem;
    padding: 0.85rem 0.25rem;
    border: 2px solid #f5d0fe;
    background: var(--bs-body-bg);
    color: var(--bs-body-color);
    border-radius: 0.7rem;
    cursor: pointer;
    transition: transform 0.1s, background-color 0.12s, border-color 0.12s;
}

.as-choice:hover:not(:disabled) {
    border-color: #a21caf;
    transform: translateY(-2px);
}

.as-choice:disabled {
    cursor: default;
}

.as-choice-main {
    font-size: clamp(1.1rem, 4.5vw, 1.5rem);
    font-weight: 700;
    line-height: 1.1;
}

.as-choice-hint {
    font-size: 0.72rem;
    opacity: 0.7;
}

.as-choice-num {
    position: absolute;
    top: 0.25rem;
    left: 0.35rem;
    font-size: 0.65rem;
    opacity: 0.45;
}

.as-choice-correct {
    background: #198754;
    border-color: #198754;
    color: #fff;
}

.as-choice-wrong {
    background: #dc3545;
    border-color: #dc3545;
    color: #fff;
    opacity: 0.85;
}

/* ── 答错时闪出的一行规则 ─────────────────────────────────────────── */
.as-flash {
    background: rgba(162, 28, 175, 0.09);
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    line-height: 1.5;
}

.as-flash-answer {
    font-weight: 700;
    color: #701a75;
}

/* ── 结算 ─────────────────────────────────────────────────────────── */
.as-review-sentence {
    font-weight: 600;
}

.as-review-yours {
    color: #b02a37;
    font-weight: 600;
}

.as-review-rule {
    opacity: 0.9;
}

.as-review-note {
    color: #701a75;
}

.as-details summary {
    cursor: pointer;
}

/* ── 深色模式 ─────────────────────────────────────────────────────── */
[data-bs-theme="dark"] .as-time { color: #f0abfc; }
[data-bs-theme="dark"] .as-time.as-time-low { color: #ea868f; }
[data-bs-theme="dark"] .as-blank { border-bottom-color: #f0abfc; }
[data-bs-theme="dark"] .as-blank-filled { color: #f0abfc; }
[data-bs-theme="dark"] .as-choice { border-color: #6b3a70; }
[data-bs-theme="dark"] .as-choice:hover:not(:disabled) { border-color: #f0abfc; }
[data-bs-theme="dark"] .as-flash { background: rgba(240, 171, 252, 0.14); }
[data-bs-theme="dark"] .as-flash-answer { color: #f0abfc; }
[data-bs-theme="dark"] .as-review-note { color: #f0abfc; }
[data-bs-theme="dark"] .as-review-yours { color: #ea868f; }
[data-bs-theme="dark"] .as-level-btn.active { background: #a21caf; border-color: #a21caf; }
[data-bs-theme="dark"] .as-timer-bar { background: #d946ef; }
