/* ============================================================
   初中英语语法重构 · 交互与转化组件样式 components.css
   ============================================================ */

/* ===== 1. 练习题组件 ===== */
.quiz-block {
    background: #fff;
    border: 1.5px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px 22px;
    margin: 20px 0;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}
.quiz-block:hover {
    border-color: #b3d4ff;
    box-shadow: 0 4px 12px rgba(41,128,185,0.08);
}
.quiz-block .quiz-q {
    font-size: 16px;
    font-weight: bold;
    color: var(--primary, #2c3e50);
    margin-bottom: 12px;
    line-height: 1.65;
}
.quiz-block .quiz-opts {
    font-size: 14.5px;
    color: #475569;
    margin-bottom: 16px;
    line-height: 1.6;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
}
.quiz-block .quiz-opts span {
    margin-right: 0;
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
}
.quiz-block .quiz-opts span:hover {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #1d4ed8;
}
.quiz-block .quiz-opts span.opt-selected {
    background: #dbeafe;
    border-color: #3b82f6;
    color: #1d4ed8;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.15);
}

.reveal-btn {
    background: var(--accent, #f1c40f);
    border: none;
    padding: 10px 22px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
    color: var(--primary, #2c3e50);
    box-shadow: 0 2px 6px rgba(241,196,15,0.3);
    transition: all 0.15s;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.reveal-btn:hover {
    background: var(--accent-hover, #e6b800);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(241,196,15,0.4);
}
.answer-box {
    display: none;
    margin-top: 14px;
    animation: fadeIn 0.2s ease-out;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== 2. 考前救命小抄 V2 (出版级轻量浅色可打印网格) ===== */
.cheatsheet-v2 {
    margin: 40px 0 26px;
    background: #fffdf5;
    border: 2px solid #f1c40f;
    border-radius: 14px;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0,0,0,0.06);
    color: #2c3e50;
}
.cheatsheet-v2-header {
    background: linear-gradient(135deg, #fff3c4, #fff8df);
    border-bottom: 2px solid #f1c40f;
    padding: 16px 22px 14px;
}
.cheatsheet-v2-title {
    font-size: 19px;
    font-weight: 900;
    color: #2c3e50;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.cheatsheet-v2-subtitle {
    font-size: 13px;
    color: #7d6608;
    line-height: 1.6;
}
.cheatsheet-v2-body {
    padding: 18px 20px 20px;
}
.cheat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.cheat-card {
    background: #fff;
    border: 1.5px solid #e8e8e8;
    border-left: 5px solid #3498db;
    border-radius: 10px;
    padding: 13px 14px;
    break-inside: avoid;
    page-break-inside: avoid;
}
.cheat-card.core    { border-left-color: #e74c3c; }
.cheat-card.method  { border-left-color: #2980b9; }
.cheat-card.trap    { border-left-color: #e67e22; }
.cheat-card.example { border-left-color: #27ae60; }
.cheat-card.memory  { border-left-color: #8e44ad; }
.cheat-card.exam    { border-left-color: #16a085; }

.cheat-card h4 {
    font-size: 15px;
    font-weight: 900;
    color: #1a252f;
    margin-bottom: 7px;
    line-height: 1.45;
}
.cheat-card p {
    font-size: 13.5px;
    color: #444;
    line-height: 1.65;
    margin: 4px 0;
}
.cheat-card ul {
    padding-left: 18px;
    margin: 6px 0 0;
}
.cheat-card li {
    font-size: 13.5px;
    color: #444;
    line-height: 1.65;
    margin: 3px 0;
}
.cheat-rule {
    display: inline-block;
    background: #fff3c4;
    color: #7d6608;
    font-weight: 900;
    padding: 2px 6px;
    border-radius: 5px;
}
.cheat-good { color: #1e8449; font-weight: 900; }
.cheat-bad  { color: #c0392b; font-weight: 900; text-decoration: line-through; }
.cheat-note {
    background: #f8f9fa;
    border: 1px dashed #d0d0d0;
    border-radius: 8px;
    padding: 8px 10px;
    margin-top: 8px;
    font-size: 12.5px !important;
    color: #666 !important;
    line-height: 1.5;
}
.cheatsheet-v2-footer {
    margin-top: 14px;
    background: #f8f9fa;
    border: 1.5px dashed #d0d0d0;
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 13.5px;
    line-height: 1.7;
    color: #333;
}
.cheatsheet-v2-footer strong { color: #c0392b; }

/* ===== 3. 加餐判定表 & 流程图组件 ===== */
.judge-flow {
    background: #fff;
    border: 2px solid #b2dfdb;
    border-radius: 12px;
    overflow: hidden;
    margin: 18px 0;
}
.judge-flow-row {
    display: grid;
    grid-template-columns: 140px 1fr 1fr;
    border-bottom: 1px solid #e0f2f1;
}
.judge-flow-row:last-child { border-bottom: none; }
.judge-flow-row > div {
    padding: 12px 14px;
    font-size: 14px;
    line-height: 1.65;
    border-right: 1px solid #e0f2f1;
}
.judge-flow-row > div:last-child { border-right: none; }
.judge-flow-head > div {
    background: #16a085;
    color: #fff;
    font-weight: 900;
    font-size: 14px;
}

/* 4. 迷你通关检测网格 */
.mini-check-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 16px 0;
}
.mini-check {
    background: #fff;
    border: 1.5px solid #ffd8a8;
    border-radius: 10px;
    padding: 14px 16px;
    font-size: 14px;
    line-height: 1.65;
}
.mini-check strong { color: #d35400; }

/* 5. 句子自查体检单流程 */
.position-flow {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 18px 0;
    border-radius: 12px;
    overflow: hidden;
    border: 1.5px solid #d8b4fe;
}
.pf-item {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid #e8daef;
}
.pf-item:last-child { border-bottom: none; }
.pf-num {
    background: #8e44ad;
    color: #fff;
    font-weight: 900;
    font-size: 16px;
    min-width: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.pf-body {
    padding: 14px 18px;
    flex: 1;
    background: #fff;
}
.pf-body:nth-child(even) { background: #faf5ff; }
.pf-body h4 {
    font-size: 15px;
    font-weight: 900;
    color: #5b2c6f;
    margin-bottom: 4px;
}
.pf-body p {
    font-size: 13.5px;
    color: #555;
    line-height: 1.65;
    margin: 0;
}

/* 6. 方法卡片 */
.method-card {
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 16px 18px;
    margin: 12px 0;
    display: flex;
    gap: 14px;
    align-items: flex-start;
}
.method-card .step-num {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 16px;
    flex-shrink: 0;
}
.method-card .step-body h4 {
    font-size: 15px;
    font-weight: 900;
    margin-bottom: 4px;
    color: #2c3e50;
}
.method-card .step-body p {
    font-size: 13.5px;
    color: #555;
    line-height: 1.6;
    margin: 0;
}
.step-blue   .step-num { background: #ebf5fb; color: #2980b9; }
.step-orange .step-num { background: #fef9e7; color: #e67e22; }
.step-green  .step-num { background: #eafaf1; color: #27ae60; }

/* 7. 转化与完课悬念引导大盒子 */
.cta-box {
    margin-top: 42px;
    padding: 32px 28px;
    background: #fff8f0;
    border: 2px dashed #e67e22;
    border-radius: 14px;
    text-align: center;
    box-shadow: 0 6px 20px rgba(230,126,34,0.08);
}
.cta-box h3 {
    color: #d35400;
    font-size: 22px;
    margin-bottom: 14px;
    font-weight: 900;
}
.cta-box p {
    font-size: 15px;
    color: #555;
    line-height: 1.8;
    margin-bottom: 22px;
    text-align: left;
}
.cta-btn {
    background: linear-gradient(135deg, #e67e22, #d35400);
    color: #fff;
    display: inline-block;
    padding: 13px 36px;
    border-radius: 30px;
    font-weight: bold;
    font-size: 16px;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(230,126,34,0.35);
    transition: transform 0.2s, box-shadow 0.2s;
}
.cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(230,126,34,0.45);
}

/* ===== 响应式适配 ===== */
@media (max-width: 680px) {
    .quiz-block { padding: 16px 16px; }
    .quiz-block .quiz-q { font-size: 15px; }
    .quiz-block .quiz-opts span { display: block; margin-right: 0; margin-bottom: 6px; }
    .reveal-btn { width: 100%; text-align: center; justify-content: center; }
    
    .cheatsheet-v2 { margin: 30px 0 20px; border-radius: 12px; }
    .cheatsheet-v2-header { padding: 14px 16px 12px; }
    .cheatsheet-v2-title { font-size: 17px; }
    .cheatsheet-v2-body { padding: 14px 14px 16px; }
    .cheat-grid { grid-template-columns: 1fr; gap: 10px; }
    .cheat-card { padding: 12px 12px; }
    
    .judge-flow-row { grid-template-columns: 1fr; }
    .judge-flow-row > div { border-right: none; border-bottom: 1px solid #e0f2f1; }
    .judge-flow-row > div:last-child { border-bottom: none; }
    
    .mini-check-list { grid-template-columns: 1fr; }
    
    .cta-box { padding: 24px 16px; }
    .cta-box h3 { font-size: 19px; }
    .cta-btn { width: 100%; text-align: center; padding: 12px 20px; }
}
