@charset "UTF-8";

/* =========================================
   1. 基础布局 (Base Layout)
   ========================================= */
body {
    font-family: "Hiragino Kaku Gothic ProN", "Meiryo", "Helvetica Neue", Arial, sans-serif;
    background-color: #f0f4f8; /* 浅灰蓝背景，护眼 */
    color: #333;
    line-height: 1.6;
    /* ★★★ 宽屏适配 ★★★ */
    max-width: 1400px; 
    width: 95%;
    margin: 0 auto;
    padding: 20px;
    padding-top: 80px; /* 为顶部计时器留出空间 */
}

.container {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    margin-bottom: 50px;
    /* ★★★ 修复关键：防止内容溢出被裁剪 ★★★ */
    overflow: visible !important; 
}

h1 {
    color: #2c3e50;
    text-align: center;
    border-bottom: 2px solid #edf2f7;
    padding-bottom: 20px;
    margin-bottom: 30px;
    font-weight: 700;
}

/* =========================================
   2. 计时器与导航栏 (Timer & Nav)
   ========================================= */
#timer-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: #2c3e50;
    color: white;
    padding: 15px 0;
    display: flex;
    justify-content: center; /* 让中间的计时器居中 */
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    z-index: 1000;
    transition: background-color 0.5s;
}

/* 返回主页按钮样式 */
#home-btn {
    position: absolute; /* 绝对定位在左侧 */
    left: 20px;
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    font-size: 1em;
    display: flex;
    align-items: center;
    padding: 5px 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    transition: background 0.2s;
}

#home-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

#timer-display {
    font-family: "Courier New", Courier, monospace;
    letter-spacing: 2px;
    font-size: 1.4em;
    font-weight: bold;
    margin: 0 15px;
}

#timer-btn {
    background: #27ae60;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: bold;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.2s;
}

#timer-btn:hover {
    transform: scale(1.05);
    background: #219150;
}

/* =========================================
   3. 题目通用样式 (Question Cards)
   ========================================= */
.part-title, .section-header {
    background: #4a5568;
    color: white;
    padding: 8px 15px;
    border-radius: 6px;
    margin: 40px 0 20px 0;
    font-size: 1.1em;
    font-weight: bold;
    display: inline-block;
}

.question-group {
    margin-bottom: 50px;
    border-bottom: 2px dashed #ccc;
    padding-bottom: 30px;
}
.question-group:last-child {
    border-bottom: none;
}

.question-card {
    background: white;
    padding: 20px;
    margin-top: 15px;
    margin-bottom: 20px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    transition: transform 0.2s;
}

/* 阅读题卡片左侧装饰条 */
.question-card.reading-mode {
    border-left: 5px solid #3498db;
    border-top: 1px solid #eee;
    border-right: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.question-card:hover {
    border-color: #cbd5e0;
}

.question-text {
    font-weight: bold;
    margin-bottom: 15px;
    color: #2c5282;
    font-size: 1.1em;
}

/* 关键词高亮 (Vocab) */
.target-word {
    font-weight: bold;
    text-decoration: underline;
    text-decoration-color: #3182ce;
    text-decoration-thickness: 3px;
    color: #2c5282;
    font-size: 1.1em;
    padding: 0 2px;
}

/* 用法题单词大字 (Vocab) */
.usage-word-box {
    text-align: center;
    background: #2b6cb0;
    color: white;
    font-size: 1.6em;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-weight: bold;
}

/* =========================================
   4. 选项样式 (Options)
   ========================================= */
.options {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 15px;
}

.options li { margin-bottom: 0; }

.options label {
    display: flex;
    align-items: center;
    padding: 15px;
    background: #f7fafc;
    border: 1px solid #edf2f7;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    height: 100%; /* 确保同一行等高 */
    font-size: 1.05em;
}

.options label:hover {
    background: #ebf8ff;
    border-color: #bee3f8;
}

.options input[type="radio"] {
    margin-right: 15px;
    transform: scale(1.3);
}

/* 响应式：长选项单列，排序题四列 */
.options.full-width { grid-template-columns: 1fr; }
.options.sorting-options { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 800px) {
    .options, .options.sorting-options { grid-template-columns: 1fr; }
}

/* =========================================
   5. 阅读文章样式 (Reading Passage)
   ========================================= */
.passage-card {
    background-color: #fffbf0; /* 米黄色护眼 */
    border: 1px solid #e6dbb9;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    font-size: 1.15em;
    line-height: 1.9;
    position: relative;
    text-align: justify;
    
    /* ★★★ 修复关键：防止标签被切 ★★★ */
    overflow: visible !important; 
    /* 增加顶部外边距，给标签留出位置 */
    margin-top: 40px; 
}

.passage-card::before {
    content: "読解文";
    position: absolute;
    /* 调整位置 */
    top: -16px; 
    left: 20px;
    
    background: #d35400;
    color: white;
    padding: 4px 15px;
    font-size: 0.9em;
    line-height: 1.2;
    border-radius: 4px;
    font-weight: bold;
    box-shadow: 0 3px 6px rgba(0,0,0,0.15);
    z-index: 100; /* 确保在最上层 */
    white-space: nowrap;
}

.passage-title {
    text-align: center; font-weight: bold; font-size: 1.4em; margin-bottom: 15px; color: #8d6e63;
}

.marker {
    display: inline-block; background: #e67e22; color: white; font-weight: bold; padding: 0 6px; border-radius: 4px; margin: 0 3px; font-size: 0.9em; vertical-align: middle;
}

/* 模拟通知/邮件框 */
.notice-box {
    border: 2px solid #333; padding: 25px; background: white; font-family: sans-serif; margin: 15px 0;
}
.notice-title {
    text-align: center; font-weight: bold; font-size: 1.3em; margin-bottom: 20px; text-decoration: underline;
}
.email-header {
    background: #eee; padding: 15px; border-radius: 5px; margin-bottom: 15px; font-size: 0.95em; font-family: monospace;
}

/* =========================================
   6. 表格样式 (Table) - 核心考点复原
   ========================================= */
.table-container {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    font-size: 1em;
    background: #fff;
    min-width: 500px;
}

.data-table th, .data-table td {
    border: 1px solid #000; /* 黑色边框 */
    padding: 12px 15px;
    text-align: center;
    vertical-align: middle;
}

.data-table th {
    background: #f0f0f0;
    font-weight: bold;
}

.data-table td:first-child {
    text-align: left; /* 名字列靠左 */
    font-weight: bold;
}

.circle { font-size: 1.4em; color: #27ae60; font-weight:bold; } /* ○ */
.cross { font-size: 1.4em; color: #c0392b; font-weight:bold; } /* × */

/* =========================================
   7. 结果与反馈 (Results)
   ========================================= */
.result-box {
    display: none;
    margin-top: 15px;
    padding: 20px;
    background: #e8f5e9;
    border: 1px solid #c8e6c9;
    border-radius: 5px;
    color: #2e7d32;
}

.result-box.error {
    background: #fff5f5;
    border-color: #ffcdd2;
    color: #c62828;
}

.expl {
    font-size: 0.95em;
    margin-top: 10px;
    color: #4a5568;
    line-height: 1.6;
}

.expl-text {
    margin-top: 5px; font-size: 0.95em; color: #555;
}

/* 交卷与分数板 */
#submit-btn {
    display: block;
    width: 100%;
    padding: 18px;
    background-color: #3182ce;
    color: white;
    font-size: 1.3em;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 50px;
    font-weight: bold;
    box-shadow: 0 4px 6px rgba(50, 50, 93, 0.11), 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: all 0.2s;
}

#submit-btn:hover {
    background-color: #2b6cb0;
    transform: translateY(-1px);
    box-shadow: 0 7px 14px rgba(50, 50, 93, 0.1), 0 3px 6px rgba(0, 0, 0, 0.08);
}

#score-board {
    display: none;
    text-align: center;
    margin-bottom: 40px;
    padding: 30px;
    background: #2d3748;
    color: white;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* =========================================
   8. 特殊布局：左右分栏 (Split Layout)
   ========================================= */
@media (min-width: 992px) {
    .question-group.split-layout {
        display: grid;
        grid-template-columns: 48% 48%;
        gap: 4%;
        align-items: start;
    }

    .question-group.split-layout .passage-card {
        position: sticky;
        top: 100px;
        max-height: 85vh;
        overflow-y: auto;
        margin-bottom: 0;
        border-right: 5px solid #e6dbb9;
    }
}

/* 分栏模式下，强制选项单列 */
.question-group.split-layout .options {
    grid-template-columns: 1fr !important; 
}

.question-group.split-layout .options label {
    padding: 10px 15px;
}

/* =========================================
   9. 主页样式 (Index Page)
   ========================================= */
.hero-section {
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
    color: white;
    border-radius: 12px 12px 0 0;
    margin: -40px -40px 40px -40px;
}

.hero-title { font-size: 2.5em; margin: 0; font-weight: 800; letter-spacing: 2px; text-shadow: 0 2px 4px rgba(0,0,0,0.2); }
.hero-subtitle { font-size: 1.2em; margin-top: 10px; color: #ecf0f1; font-weight: normal; opacity: 0.9; }

.exam-group { margin-bottom: 60px; }
.group-title {
    border-left: 6px solid #3498db;
    padding-left: 15px;
    font-size: 1.6em;
    color: #2c3e50;
    margin-bottom: 25px;
    font-weight: 800;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.exam-entry-card {
    background: #fff;
    border: 1px solid #eaeaea;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    text-decoration: none;
    display: block;
    color: inherit;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.exam-entry-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
    border-color: #3498db;
}

.subject-icon { font-size: 3.5em; margin-bottom: 20px; display: block; transition: transform 0.3s; }
.exam-entry-card:hover .subject-icon { transform: scale(1.1); }

.subject-name { font-size: 1.4em; font-weight: bold; color: #2c3e50; display: block; margin-bottom: 8px; }
.exam-info { font-size: 0.95em; color: #7f8c8d; display: block; }

.tag {
    position: absolute; top: 15px; right: 15px; font-size: 0.8em; padding: 4px 10px; border-radius: 20px; font-weight: bold;
}
.tag.full { background: #e8f5e9; color: #2e7d32; border: 1px solid #c8e6c9; }
.tag.new { background: #ffebee; color: #c62828; border: 1px solid #ffcdd2; }

.footer {
    text-align: center; margin-top: 60px; font-size: 0.9em; color: #95a5a6; border-top: 1px solid #eee; padding-top: 30px;
}
.footer a { color: #3498db; text-decoration: none; font-weight: bold; }
