/*!
 * happiness-exam.css —— 防诈知识考试页专属样式
 * 依赖：happiness.css（变量 / 导航 / breadcrumb / 页脚）
 */

/* ============================ 页面容器（与首页一致：1400px 居中，两侧 20px 留白） ============================ */
.hx-page-wrap {
    max-width: var(--container);
    margin: 24px auto 56px;
    padding: 0 20px;
}

/* ── Banner 基础外观（背景由 .exam-banner 覆盖） ── */
.page-banner {
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 44px 40px;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}

/* ── 统计卡片 ── */
.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}
.stat-item {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 22px 20px;
    text-align: center;
    box-shadow: var(--shadow-card);
    transition: all .3s;
}
.stat-item:hover { border-color: #a5b4fc; transform: translateY(-2px); }
.stat-item .val { font-size: 28px; font-weight: 800; color: var(--primary); }
.stat-item .lbl { font-size: 13px; color: var(--text-secondary); margin-top: 4px; }
.stat-item .lbl i { margin-right: 4px; }

/* ============================ Banner ============================ */
.exam-banner {
    background: linear-gradient(135deg, #0f2c5c 0%, #2563eb 55%, #6a11cb 100%);
    border-color: rgba(255, 255, 255, .12);
}
.exam-banner .banner-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
.exam-banner h1 {
    color: #fff;
    font-size: 38px;
    margin: 10px 0 12px;
    letter-spacing: 2px;
}
.exam-banner h1 span { color: #ffd166; }
.exam-banner .banner-text p {
    color: rgba(255, 255, 255, .88);
    max-width: 720px;
    font-size: 15px;
}
.exam-banner .banner-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 14px;
    border-radius: 20px;
    background: rgba(255, 255, 255, .14);
    color: #ffe9a8;
    font-size: 13px;
    backdrop-filter: blur(4px);
}
.exam-banner .banner-badge .dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: #ffd166;
    box-shadow: 0 0 0 4px rgba(255, 209, 102, .25);
}
.exam-shield {
    flex: none;
    width: 150px; height: 150px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.35), rgba(255,255,255,.05) 60%);
    border: 2px dashed rgba(255, 255, 255, .35);
    font-size: 64px;
    color: #ffd166;
    animation: shieldFloat 3.2s ease-in-out infinite;
}
@keyframes shieldFloat {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-10px); }
}

/* ============================ 主体布局 ============================ */
.exam-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 24px;
    margin: 24px 0 40px;
    align-items: start;
}
@media (max-width: 992px) {
    .exam-layout { grid-template-columns: 1fr; }
    .exam-shield { display: none; }
    .hx-page-wrap { margin-top: 16px; padding: 0 12px; }
    .page-banner { padding: 30px 22px; }
    .stats-row { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}
@media (max-width: 560px) {
    .stats-row { grid-template-columns: 1fr; }
}

.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-title);
    margin: 28px 0 16px;
}
.section-title i { color: var(--danger); font-size: 18px; }
.section-title .en {
    font-size: 12px; font-weight: 400; color: var(--text-light);
    letter-spacing: 1px; margin-left: 2px;
}

/* ============================ 防诈知识卡 ============================ */
.fraud-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}
@media (max-width: 640px) {
    .fraud-grid { grid-template-columns: 1fr; }
}
.fraud-card {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-color);
    border-top: 3px solid var(--danger);
    transition: transform .2s ease, box-shadow .2s ease;
}
.fraud-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-card);
}
.fraud-card .fc-head {
    display: flex; align-items: center; gap: 10px;
    font-size: 16px; font-weight: 700; color: var(--text-title);
    margin-bottom: 8px;
}
.fraud-card .fc-head i {
    width: 34px; height: 34px; flex: none;
    display: flex; align-items: center; justify-content: center;
    border-radius: 9px;
    background: rgba(255, 71, 87, .1);
    color: var(--danger);
    font-size: 15px;
}
.fraud-card .fc-trick { color: var(--text-secondary); font-size: 13.5px; margin-bottom: 10px; }
.fraud-card .fc-tip {
    font-size: 13px;
    color: #b45309;
    background: #fffbeb;
    border: 1px dashed #fcd34d;
    border-radius: 8px;
    padding: 8px 12px;
}
.fraud-card .fc-tip b { color: #92400e; }

/* ============================ 考试机（侧栏） ============================ */
.exam-terminal {
    position: sticky;
    top: 16px;
    background: #fff;
    border-radius: 16px;
    box-shadow: var(--shadow-card);
    overflow: hidden;
    border: 1px solid var(--border-color);
}
.et-bar {
    padding: 14px 20px;
    background: var(--gradient);
    color: #fff;
    display: flex; align-items: center; gap: 10px;
    font-weight: 700; font-size: 16px;
}
.et-bar .et-no {
    margin-left: auto;
    font-size: 12px; font-weight: 400;
    background: rgba(255,255,255,.2);
    padding: 3px 10px; border-radius: 12px;
}
.et-body { padding: 22px 20px; }

/* 开始态 */
.et-intro p { color: var(--text-secondary); font-size: 14px; margin-bottom: 14px; }
.et-rules { list-style: none; margin: 0 0 18px; }
.et-rules li {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 0;
    font-size: 14px; color: var(--text-primary);
    border-bottom: 1px dashed var(--border-color);
}
.et-rules li:last-child { border-bottom: none; }
.et-rules i { color: var(--success); width: 18px; text-align: center; }
.et-name {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    font-size: 14px;
    margin-bottom: 14px;
    outline: none;
    transition: border-color .2s;
}
.et-name:focus { border-color: var(--primary); }

.btn-exam {
    width: 100%;
    border: none;
    cursor: pointer;
    padding: 13px 18px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    background: var(--gradient);
    transition: filter .2s, transform .1s;
}
.btn-exam:hover { filter: brightness(1.08); }
.btn-exam:active { transform: scale(.98); }
.btn-exam.ghost {
    background: #fff;
    color: var(--primary);
    border: 1.5px solid var(--primary);
    margin-top: 10px;
}
.btn-exam:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
}

/* 答题态 */
.q-progress {
    height: 6px; border-radius: 3px;
    background: #eef2f7; overflow: hidden;
    margin-bottom: 6px;
}
.q-progress i {
    display: block; height: 100%;
    background: var(--gradient);
    border-radius: 3px;
    transition: width .3s ease;
}
.q-meta { font-size: 12.5px; color: var(--text-light); margin-bottom: 14px; }
.q-stem { font-size: 16px; font-weight: 700; color: var(--text-title); line-height: 1.6; margin-bottom: 16px; }
.q-options { display: flex; flex-direction: column; gap: 10px; }
.q-opt {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 14px;
    border: 1.5px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    transition: all .15s ease;
    background: #fff;
}
.q-opt:hover { border-color: var(--primary); background: var(--primary-light); }
.q-opt .opt-key {
    width: 26px; height: 26px; flex: none;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: #f1f5f9;
    color: var(--text-secondary);
    font-size: 13px; font-weight: 700;
}
.q-opt.selected { border-color: var(--primary); background: var(--primary-light); }
.q-opt.selected .opt-key { background: var(--primary); color: #fff; }
.q-opt.correct { border-color: var(--success); background: rgba(46, 204, 113, .1); }
.q-opt.correct .opt-key { background: var(--success); color: #fff; }
.q-opt.wrong { border-color: var(--danger); background: rgba(255, 71, 87, .08); }
.q-opt.wrong .opt-key { background: var(--danger); color: #fff; }
.q-opt.locked { cursor: default; }

.q-nav { display: flex; gap: 10px; margin-top: 18px; }
.q-nav .btn-exam { width: auto; flex: 1; padding: 11px; font-size: 14px; }
.q-dots { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.q-dots span {
    width: 26px; height: 26px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 7px;
    background: #f1f5f9;
    font-size: 12px;
    color: var(--text-light);
}
.q-dots span.done { background: var(--primary); color: #fff; }

/* 成绩态 */
.score-ring {
    width: 150px; height: 150px;
    margin: 4px auto 14px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    position: relative;
}
.score-ring::before {
    content: '';
    position: absolute;
    inset: 12px;
    background: #fff;
    border-radius: 50%;
}
.score-ring .score-num {
    position: relative; z-index: 1;
    text-align: center;
}
.score-ring .score-num b { font-size: 38px; display: block; line-height: 1.1; }
.score-ring .score-num small { font-size: 12px; color: var(--text-light); }
.score-ring.pass { background: conic-gradient(var(--success) var(--pct), #e8f5e9 0); }
.score-ring.pass b { color: var(--success-deep); }
.score-ring.fail { background: conic-gradient(var(--danger) var(--pct), #fde8e8 0); }
.score-ring.fail b { color: var(--danger); }
.result-verdict { text-align: center; font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.result-sub { text-align: center; font-size: 13px; color: var(--text-secondary); margin-bottom: 16px; }

.wrong-list { margin: 14px 0 4px; max-height: 240px; overflow-y: auto; }
.wrong-item {
    background: var(--bg-soft);
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 8px;
    font-size: 13px;
}
.wrong-item .wi-q { font-weight: 700; color: var(--text-title); margin-bottom: 4px; }
.wrong-item .wi-row { color: var(--text-secondary); line-height: 1.55; }
.wrong-item .wi-row.ok { color: var(--success-deep); }
.wrong-item .wi-row.no { color: var(--danger); }
.wrong-item .wi-an { color: #92400e; background: #fffbeb; border-radius: 6px; padding: 5px 8px; margin-top: 5px; }

/* 电子证书 */
.cert-card {
    margin-top: 16px;
    border-radius: 12px;
    padding: 22px 18px 18px;
    text-align: center;
    color: #4a3208;
    background:
        linear-gradient(135deg, #fff8e1 0%, #ffe9a8 55%, #f6d365 100%);
    border: 2px solid #d4a72c;
    box-shadow: inset 0 0 0 4px rgba(255,255,255,.55), 0 6px 18px rgba(212,167,44,.35);
    position: relative;
    overflow: hidden;
}
.cert-card::before,
.cert-card::after {
    content: '\f023';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    font-size: 90px;
    color: rgba(180, 130, 20, .08);
}
.cert-card::before { top: -18px; left: -14px; }
.cert-card::after  { bottom: -24px; right: -10px; }
.cert-card .cert-seal {
    width: 64px; height: 64px; margin: 0 auto 8px;
    border-radius: 50%;
    border: 2px solid #c0392b;
    color: #c0392b;
    display: flex; align-items: center; justify-content: center;
    font-size: 24px;
    background: rgba(255,255,255,.45);
    transform: rotate(-10deg);
}
.cert-card .cert-ttl { font-size: 13px; letter-spacing: 3px; color: #8a6210; }
.cert-card .cert-name { font-size: 24px; font-weight: 800; margin: 6px 0 2px; }
.cert-card .cert-desc { font-size: 12.5px; color: #6b4c10; line-height: 1.6; }
.cert-card .cert-no {
    margin-top: 10px; font-size: 11.5px; color: #8a6210;
    border-top: 1px dashed rgba(138,98,16,.45);
    padding-top: 8px;
}

/* 96110 提示条 */
.sos-strip {
    margin: 8px 0 34px;
    border-radius: var(--radius-lg);
    padding: 18px 24px;
    background: linear-gradient(90deg, #7f1d1d, #b91c1c);
    color: #fff;
    display: flex; align-items: center; gap: 18px;
    flex-wrap: wrap;
    box-shadow: 0 8px 22px rgba(185, 28, 28, .28);
}
.sos-strip i { font-size: 34px; color: #fecaca; }
.sos-strip .sos-txt b { font-size: 17px; display: block; }
.sos-strip .sos-txt span { font-size: 13px; color: rgba(255,255,255,.82); }
.sos-strip .sos-num {
    margin-left: auto;
    font-size: 30px; font-weight: 800; letter-spacing: 3px;
    color: #ffe4e6;
}
@media (max-width: 640px) {
    .sos-strip .sos-num { margin-left: 0; font-size: 24px; }
}
