/* ================= 全局基础 ================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: #f7f9fc;
    color: #1e293b;
    line-height: 1.6;
}

/* ================= NAV & FOOTER ================= */
header {
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(12px);
    background: rgba(255, 255, 255, .9);
    border-bottom: 1px solid #edf2f7;
}

.nav {
    max-width: 1000px;
    margin: auto;
    padding: 18px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo { font-size: 30px; font-weight: 800; color: #2563eb; }
nav { display: flex; gap: 35px; align-items: center; }
nav a { color: #475569; text-decoration: none; font-weight: 600; }
.login { background: #2563eb; color: #fff; padding: 11px 22px; border-radius: 10px; }

footer {
    margin-top: 80px;
    background: #0f172a;
    color: #94a3b8;
    text-align: center;
    padding: 35px;
}

/* ================= 首页模块 ================= */
.hero { max-width: 1000px; margin: auto; padding: 90px 30px 80px; display: grid; grid-template-columns: 1fr 400px; gap: 70px; align-items: center; }
.hero h1 { font-size: 56px; line-height: 1.05; margin-bottom: 25px; }
.hero p { color: #64748b; font-size: 19px; line-height: 1.8; max-width: 620px; }
.buttons { display: flex; gap: 18px; margin-top: 40px; }
button { border: none; cursor: pointer; border-radius: 14px; padding: 16px 28px; font-size: 16px; font-weight: 700; }
.primary { background: #2563eb; color: white; }
.secondary { background: white; border: 1px solid #dbe5f1; }
.hero-box { height: 420px; border-radius: 30px; background: linear-gradient(135deg, #2563eb, #4f8cff); display: flex; justify-content: center; align-items: center; color: white; font-size: 150px; box-shadow: 0 35px 80px rgba(37, 99, 235, .28); }

.container { max-width: 1000px; margin: auto; padding: 20px 30px 80px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 28px; }
.card {
    background:#fff;
    border-radius:28px;
    border:1px solid #e8eef7;
    padding:36px;
    box-shadow:0 8px 20px rgba(15,23,42,.04),0 2px 6px rgba(15,23,42,.03);
    transition:all .25s ease;
    display:flex;
    flex-direction:column;
    min-height:360px;
}

.card:hover {
    transform:translateY(-10px);
    border-color:rgba(37,99,235,.25);
    box-shadow:0 25px 50px rgba(37,99,235,.12);
}

.card-content {
    flex:1;
}

.card .icon {
    width:64px;
    height:64px;
    border-radius:18px;
    background:#eff6ff;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:34px;
    margin-bottom:24px;
}

.card h3 {
    font-size:26px;
    font-weight:750;
    letter-spacing:-.5px;
    color:#0f172a;
    margin-bottom:14px;
}

.card p {
    color:#64748b;
    font-size:15px;
    line-height:1.7;
    margin-bottom:28px;
    min-height:50px;
}

/* State tags */
.card .state-preview {
    display:flex;
    flex-wrap:wrap;
    gap:10px;
    margin-top:auto;
    margin-bottom:28px;
}

.card .state-link {
    display:inline-flex;
    align-items:center;
    padding:7px 14px;
    background:#f1f5f9;
    border:1px solid #e2e8f0;
    border-radius:999px;
    color:#475569;
    font-size:13px;
    font-weight:600;
    text-decoration:none;
    transition:.2s;
}

.card .state-link:hover {
    background:#eff6ff;
    border-color:#bfdbfe;
    color:#2563eb;
    transform:translateY(-2px);
}

/* Bottom CTA */
.card .button-view-all {
    display:flex;
    justify-content:center;
    align-items:center;
    padding:14px 20px;
    border-radius:14px;
    background:linear-gradient(135deg,#2563eb,#4f8cff);
    color:#fff;
    font-size:15px;
    font-weight:700;
    text-decoration:none;
    transition:.25s;
}

.card .button-view-all:hover {
    transform:translateY(-2px);
    box-shadow:0 12px 25px rgba(37,99,235,.25);
}

.quiz-header {
  margin-bottom: 20px;
}
/* ================= Quiz 页面专用 ================= */
.quiz-wrapper { max-width: 800px; padding-top: 40px; }
.quiz-card { margin-bottom: 20px; padding: 28px; border-radius:14px; border:2px solid #cbd5e1;}
.options-list { list-style: none; margin-top: 15px; }
.options-list li { margin-bottom: 10px;background: #f8fafc; border-radius: 8px; }
.ad-slot { 
    background: #f1f5f9; 
    border: 2px dashed #cbd5e1; 
    min-height: 250px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    margin: 30px 0;
    border-radius: 12px;
}
.quiz-actions { margin-top: 30px; text-align: center; }

/* ================= 响应式 ================= */
@media(max-width: 900px) {
    .hero { grid-template-columns: 1fr; text-align: center; }
    .hero-box { height: 280px; }
    .hero h1 { font-size: 46px; }
    .grid { grid-template-columns: 1fr; }
}

/* 考试列表链接样式 */
.exam-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 20px 0;
}

.option-label:has(input:checked){
    background:#eff6ff;
    border-color:#2563eb;
    box-shadow:0 0 0 3px rgba(37,99,235,.12);
    border-radius: 8px;
}

.test-link {
    display: block;
    padding: 12px 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    text-decoration: none;
    color: #2563eb;
    font-weight: 600;
    font-size: 14px;
    transition: 0.2s;
}

.test-link:hover {
    background: #eff6ff;
    border-color: #bfdbfe;
    transform: translateX(5px);
}

/* 确保 stats 栏在底部 */
.stats {
    display: flex;
    gap: 15px;
    margin-top: 15px;
    color: #64748b;
    font-size: 13px;
    border-top: 1px solid #f1f5f9;
    padding-top: 15px;
}

/* ================= 弹窗 Modal 核心样式 ================= */
.modal {
    display: none; /* 默认隐藏 */
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.6); /* 暗色半透明遮罩 */
    backdrop-filter: blur(4px); /* 现代感毛玻璃背景 */
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: #fff;
    padding: 30px;
    border-radius: 24px;
    width: 90%;
    max-width: 480px;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: modalSlideUp 0.25s ease-out;
}

/* 弹出时的顺滑向上一体化动画 */
@keyframes modalSlideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* 关闭按钮 */
.close-btn {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 28px;
    font-weight: bold;
    color: #94a3b8;
    cursor: pointer;
    transition: 0.2s;
    line-height: 1;
}

.close-btn:hover {
    color: #1e293b;
}

/* 确保弹窗内的卡片没有多余的阴影和边框，完美贴合容器 */
.modal-content .card {
    box-shadow: none !important;
    padding: 0 !important;
    border-radius: 0 !important;
    transform: none !important;
}

.state-link {
    font-size: 13px;
    color: #475569;
    text-decoration: none;
    padding: 6px 10px;
    background: #f8fafc;
    border-radius: 6px;
    transition: 0.2s;
}

.state-link:hover {
    color: #2563eb;
    background: #eff6ff;
}

.section-title {
    max-width:720px;
    margin-bottom:30px;
    margin-top:45px;
}

.section-badge {
    display:inline-block;
    padding:6px 14px;
    margin-bottom:16px;
    border-radius:999px;
    background:#eff6ff;
    color:#2563eb;
    font-size:13px;
    font-weight:700;
}

.section-title h2 {
    font-size:38px;
    line-height:1.2;
    letter-spacing:-.8px;
    color:#0f172a;
    margin-bottom:14px;
}

.section-title p {
    color:#64748b;
    font-size:17px;
    line-height:1.7;
    max-width:650px;
}

.quiz-card.correct {
    border-left:5px solid #22c55e;
}

.quiz-card.wrong {
    border-left:5px solid #ef4444;
}

.option-label {
    display:flex;
    gap:10px;
    align-items:center;
    cursor:pointer;
    padding:6px;
}

.answer-result {
    margin-top:20px;
    padding:18px;
    background:#f8fafc;
    border-radius:14px;
}

.answer-status {
    font-weight:700;
    margin-bottom:10px;
}

.answer-result{
    display:none;
    flex-direction:column;
    gap:10px;
    margin-top:20px;
    padding:18px;
    background:#f8fafc;
    border-radius:14px;
}

.quiz-card.correct{
    border-left:5px solid #22c55e;
}

.quiz-card.wrong{
    border-left:5px solid #ef4444;
}

.answer-status{
    font-weight:700;
}

.correct-answer{
    color:#16a34a;
}

.explanation{
    color:#475569;
}

.modal{
    display:none;
    position:fixed;
    z-index:2000;
    inset:0;
    background:rgba(15,23,42,.55);
    backdrop-filter:blur(5px);
    align-items:center;
    justify-content:center;
}

.modal-content{
    background:white;
    width:90%;
    max-width:520px;
    padding:35px;
    border-radius:24px;
    text-align:center;
}

.result-ad{
    min-height:250px;
    margin:25px 0;
}

.options-list li.correct{
    border: 2px solid #28a745; /* 绿色边框 */
}


.options-list li.wrong {
    border: 2px solid #dc3545; /* 红色边框 */
}
