/* 刷题系统样式 - 移动端优先,兼容 IE9+ / 360 双核 */
* {
    margin: 0;
    padding: 0;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    font-size: 16px;
}

body {
    font-family: "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
    background: #f0f2f5;
    color: #333;
    font-size: 16px;
    line-height: 1.5;
}

#app {
    max-width: 750px;
    margin: 0 auto;
    padding: 0 12px 50px;
}

.page-title {
    text-align: center;
    font-size: 1.25rem;
    padding: 20px 0 4px;
}

.sub {
    text-align: center;
    color: #999;
    font-size: 0.78rem;
    margin-top: 4px;
}

.loading,
.errbox {
    text-align: center;
    color: #888;
    padding: 40px 10px;
    line-height: 1.8;
}

.errbox {
    color: #ff4d4f;
}

/* ---------- 卡片 ---------- */
.card {
    background: #fff;
    border-radius: 8px;
    padding: 14px 16px;
    margin-top: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    overflow-wrap: break-word;
    word-break: break-all;
}

.card h3 {
    font-size: 1.02rem;
    margin-bottom: 4px;
}

.card .desc {
    color: #888;
    font-size: 0.8rem;
    line-height: 1.5;
}

.bank-card,
.mode-card,
.exam-card {
    cursor: pointer;
}

.mode-card .m-head {
    font-size: 1rem;
    font-weight: bold;
}

.mode-card .desc {
    color: #999;
    font-size: 0.78rem;
    margin-top: 2px;
}

.wrong-tip {
    color: #ff4d4f;
    font-size: 0.75rem;
    margin-top: 4px;
}

.mode-row {
    margin-top: 10px;
    overflow: hidden; /* 清除 .enter-btn 浮动,防止溢出卡片 */
}

.num {
    width: 70px;
    padding: 7px 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.9rem;
    margin-left: 8px;
}

.enter-btn {
    display: inline-block;
    float: right;
    padding: 7px 18px;
    background: #1890ff;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 0.9rem;
    cursor: pointer;
}

.enter-btn.gray {
    background: #d9d9d9;
    color: #888;
}

.exam-card {
    border: 1px solid #ffd591;
    background: #fffbe6;
}

/* ---------- 链接 ---------- */
.backlink {
    color: #1890ff;
    font-size: 0.82rem;
    display: inline-block;
    margin-top: 14px;
    text-decoration: none;
}

/* ---------- 刷题页 ---------- */
.top {
    font-size: 0.85rem;
    color: #666;
    padding: 14px 2px 0;
    line-height: 1.8;
}

.top .score {
    color: #ff4d4f;
    font-weight: bold;
}

.top .timer {
    color: #1890ff;
    font-weight: bold;
}

/* ---------- 考试操作按钮 ---------- */
.submit-top {
    float: right;
    width: 112px;
    padding: 9px 0;
    background: #ff4d4f;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: bold;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(255, 77, 79, 0.35);
}

.submit-top:active {
    background: #d9363e;
}

/* 离开考试:蓝底白字(沿用 .btn 默认样式),与交卷同宽、左对齐,下移一个按钮位 */
.btn.quit-btn {
    width: 112px;
    margin-top: 58px; /* 14px 常规间距 + 约一个按钮高度 */
    text-align: center;
    white-space: nowrap;
}

.mode-tag {
    display: inline-block;
    background: #e6f7ff;
    color: #1890ff;
    border: 1px solid #91d5ff;
    border-radius: 3px;
    font-size: 0.7rem;
    padding: 0 6px;
    margin-left: 4px;
}

.q-head {
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 8px;
}

.badge {
    font-size: 0.7rem;
    color: #fff;
    background: #1890ff;
    border-radius: 10px;
    padding: 1px 8px;
    margin-right: 8px;
    display: inline-block;
    vertical-align: 2px;
}

.opt {
    padding: 10px 12px;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    margin-top: 8px;
    line-height: 1.6;
    cursor: pointer;
    font-size: 0.95rem;
}

.opt.active {
    border-color: #1890ff;
    background: #e6f7ff;
}

.opt.right {
    border-color: #52c41a;
    background: #f6ffed;
}

.opt.wrongsel {
    border-color: #ff4d4f;
    background: #fff1f0;
}

.res {
    margin-top: 12px;
    padding: 8px 10px;
    border-radius: 4px;
    font-size: 0.85rem;
    line-height: 1.5;
}

.res.ok {
    color: #52c41a;
    border: 1px solid #b7eb8f;
    background: #f6ffed;
}

.res.no {
    color: #ff4d4f;
    border: 1px solid #ffa39e;
    background: #fff1f0;
}

.ans {
    margin-top: 10px;
    font-size: 0.92rem;
    white-space: pre-line;
}

.analysis {
    margin-top: 6px;
    font-size: 0.85rem;
    color: #666;
    line-height: 1.6;
    white-space: pre-line;
}

/* ---------- 按钮 ---------- */
.btn {
    display: block;
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    margin-top: 14px;
    background: #1890ff;
    color: #fff;
    cursor: pointer;
}

.btn.gray {
    background: #f0f0f0;
    color: #666;
}

.btn.green {
    background: #52c41a;
}

.btn[disabled] {
    background: #c9c9c9;
    color: #eee;
}

.btnrow {
    margin-top: 14px;
    text-align: center;
    font-size: 0;
}

.btnrow .btn {
    display: inline-block;
    width: 48%;
    font-size: 1rem;
    margin-top: 0;
}

.btnrow .btn:first-child {
    margin-right: 4%;
}

/* ---------- 成绩单 ---------- */
.result-score {
    text-align: center;
    padding: 10px 0 4px;
}

.result-score .big {
    font-size: 2.6rem;
    font-weight: bold;
    color: #1890ff;
}

.result-score .pass {
    color: #52c41a;
}

.result-score .fail {
    color: #ff4d4f;
}

.result-meta {
    text-align: center;
    color: #666;
    font-size: 0.85rem;
    line-height: 2;
}

.review-title {
    font-size: 0.95rem;
    font-weight: bold;
    margin-top: 20px;
}

.review-item {
    border-top: 1px solid #f0f0f0;
    padding-top: 8px;
    margin-top: 8px;
    font-size: 0.85rem;
    line-height: 1.7;
}

.review-item .r-ans {
    color: #ff4d4f;
}

.review-item .r-right {
    color: #52c41a;
}

/* ---------- 登录 ---------- */
.login-card {
    max-width: 340px;
    margin: 46px auto 0;
    padding: 28px 24px;
    text-align: center;
}

.login-input {
    width: 100%;
    padding: 12px;
    font-size: 1.4rem;
    text-align: center;
    letter-spacing: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 6px;
}

.login-input:focus {
    border-color: #1890ff;
    outline: none;
}

.login-err {
    color: #ff4d4f;
    font-size: 0.8rem;
    height: 22px;
    line-height: 22px;
    margin-top: 6px;
}

/* ---------- toast ---------- */
#toast {
    position: fixed;
    left: 50%;
    top: 45%;
    -webkit-transform: translate(-50%, -50%);
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    padding: 10px 18px;
    border-radius: 6px;
    font-size: 0.9rem;
    max-width: 80%;
    text-align: center;
    display: none;
    z-index: 99;
}

/* ---------- admin 页 ---------- */
.admin-box textarea {
    width: 100%;
    height: 260px;
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 10px;
    font-size: 0.85rem;
    font-family: inherit;
    line-height: 1.6;
}

.admin-box label {
    display: block;
    margin-top: 12px;
    font-size: 0.85rem;
    color: #555;
}

.admin-box input[type=text] {
    width: 100%;
    padding: 9px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.9rem;
    margin-top: 4px;
}

.stats {
    margin-top: 14px;
    font-size: 0.85rem;
    line-height: 1.9;
    color: #555;
}

.stats b {
    color: #1890ff;
}

.stats .warn {
    color: #ff9900;
}

.snippet {
    width: 100%;
    height: 120px;
    background: #fafafa;
    border: 1px dashed #ccc;
    border-radius: 6px;
    padding: 10px;
    font-size: 0.8rem;
    font-family: Consolas, Monaco, monospace;
    margin-top: 8px;
    line-height: 1.6;
}

.help {
    font-size: 0.8rem;
    color: #888;
    line-height: 1.8;
    margin-top: 10px;
}
