* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    padding-top: 140px; /* ⭐ 为固定标题留出空间 */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    overflow: hidden;
}

/* ⭐ 固定标题栏 */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* ⭐ 固定导航栏 */
.tabs {
    position: fixed;
    top: 80px; /* header 的高度 */
    left: 0;
    right: 0;
    z-index: 999;
    background: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding: 10px 30px;
}

/* ⭐ 主内容区域调整 */
main {
    margin-top: 140px; /* header + tabs 的高度 */
}

header h1 {
    font-size: 28px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info span {
    font-weight: bold;
}

/* 管理员联系方式样式 */
.admin-contact {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.15);
    padding: 8px 15px;
    border-radius: 8px;
    margin-left: 20px;
}

.admin-contact-label {
    font-size: 14px;
    font-weight: bold;
    color: white;
}

.admin-contact-phone {
    font-size: 16px;
    font-weight: bold;
    color: #ffd700;
    font-family: 'Arial', sans-serif;
    letter-spacing: 1px;
}

/* 按钮样式 */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
}

/* CSV 列映射配置样式 */
.mapping-grid {
    display: grid;
    gap: 10px;
    margin-bottom: 20px;
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 10px;
}

.mapping-header {
    display: grid;
    grid-template-columns: 80px 1fr 2fr 1.5fr;
    gap: 10px;
    padding: 12px;
    background: #495057;
    color: white;
    font-weight: bold;
    border-radius: 4px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.mapping-row {
    display: grid;
    grid-template-columns: 80px 1fr 2fr 1.5fr;
    gap: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
    align-items: center;
}

.mapping-row:nth-child(even) {
    background: #e9ecef;
}

.col-index {
    font-weight: bold;
    color: #495057;
}

.csv-header,
.csv-sample {
    width: 100%;
    padding: 8px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
}

.csv-header {
    font-weight: bold;
}

.csv-sample {
    background: #fff;
    color: #666;
}

.field-select {
    width: 100%;
    padding: 8px;
    border: 2px solid #dee2e6;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.field-select:hover {
    border-color: #adb5bd;
}

.field-select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-success:hover {
    background: #218838;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

/* 标签页 */
.tabs {
    display: flex;
    background: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
}

.tab-btn {
    flex: 1;
    padding: 15px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    color: #495057;
    transition: all 0.3s;
}

.tab-btn:hover {
    background: #e9ecef;
}

.tab-btn.active {
    background: white;
    color: #667eea;
    border-bottom: 3px solid #667eea;
}

/* 主内容区 */
main {
    padding: 30px;
    min-height: 500px;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.tab-content h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 24px;
}

/* 表单样式 */
.form-group {
    margin-bottom: 15px;
    display: flex;  /* 使用 flexbox 布局 */
    align-items: center;  /* 垂直居中对齐 */
}

.form-group label {
    display: inline-block;
    margin-bottom: 0;
    margin-right: 10px;
    font-weight: bold;
    color: #555;
    min-width: 80px;
    white-space: nowrap;  /* 防止标签换行 */
}

.form-group input,
.form-group select {
    flex: 1;  /* 占据剩余空间 */
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

/* 考试配置 */
.exam-config,
.practice-config {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 20px;
}

/* ⭐ 新增：题目搜索框样式 */
.practice-search {
    background: #f0f4ff;
    padding: 20px;
    border-radius: 8px;
    border: 2px solid #667eea;
}

.practice-search h3 {
    color: #667eea;
    font-size: 18px;
    margin-bottom: 15px;
}

#questionSearch {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #667eea;
    border-radius: 6px;
    font-size: 15px;
    transition: all 0.3s;
    background: white;
}

#questionSearch:focus {
    outline: none;
    border-color: #5568d3;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

#questionSearch::placeholder {
    color: #999;
}

#searchResults {
    margin-top: 15px;
}

#searchResults > div {
    background: white;
    border-radius: 6px;
    padding: 15px;
}

/* ⭐ 搜索结果题目选项样式 */
#searchResults .option-item {
    margin: 5px 0;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 4px;
    transition: all 0.2s;
}

#searchResults .option-item:hover {
    background: #e9ecef;
}

#searchResults .option-letter {
    color: #667eea;
    font-weight: bold;
    margin-right: 8px;
}

#searchResults .option-text {
    color: #444;
}

#searchResults .correct-answer {
    margin-top: 10px;
    padding: 10px;
    background: #e8f5e9;
    border-left: 4px solid #28a745;
    border-radius: 4px;
}

#searchResults .correct-answer strong {
    color: #28a745;
    margin-right: 8px;
}

#searchResults .correct-answer span {
    color: #155724;
    font-weight: bold;
}

.exam-info {
    background: #e7f3ff;
    padding: 20px;
    border-radius: 5px;
    border-left: 4px solid #667eea;
}

.exam-info h3 {
    margin-bottom: 10px;
    color: #667eea;
}

.exam-info ul {
    list-style-position: inside;
    line-height: 1.8;
}

/* 答题区域 */
.answer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #dee2e6;
}

.answer-header h2 {
    flex: 1;
}

.timer {
    flex: 0 0 auto;
    font-size: 20px;
    font-weight: bold;
    color: #dc3545;
    margin: 0 20px;
}

.question-item {
    background: #f8f9fa;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 5px;
    border-left: 4px solid #667eea;
}

.question-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.question-number {
    font-weight: bold;
    color: #667eea;
}

.question-score {
    background: #ffc107;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: bold;
}

.question-text {
    font-size: 16px;
    margin-bottom: 15px;
    line-height: 1.6;
}

.background-material {
    background: #fff3cd;
    padding: 10px;
    border-radius: 3px;
    margin-bottom: 15px;
    font-size: 14px;
    border: 1px solid #ffc107;
}

.question-image {
    max-width: 100%;
    margin: 10px 0;
    border: 1px solid #ddd;
    border-radius: 3px;
}

.options-list {
    list-style: none;
}

.options-list li {
    margin-bottom: 8px;
}

.options-list label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 8px;
    border-radius: 3px;
    transition: background 0.2s;
}

.options-list label:hover {
    background: #e9ecef;
}

.options-list input[type="radio"],
.options-list input[type="checkbox"] {
    margin-right: 10px;
}

.textarea-answer {
    width: 100%;
    min-height: 100px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    resize: vertical;
    font-family: inherit;
}

.textarea-answer:focus {
    outline: none;
    border-color: #667eea;
}

/* 选项列表样式 */
.options-list {
    list-style: none;
    margin-top: 15px;
}

.options-list li {
    margin-bottom: 10px;
    padding: 8px;
    border-radius: 5px;
    transition: background-color 0.2s;
}

.options-list li:hover {
    background-color: #f8f9fa;
}

.options-list label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
}

.options-list input[type="radio"],
.options-list input[type="checkbox"] {
    margin-right: 10px;
    cursor: pointer;
}

/* 提交答案按钮样式 */
.submit-answer-item {
    margin-top: 15px;
    margin-bottom: 10px;
}

.btn-submit-answer {
    width: 100%;
    padding: 12px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 5px rgba(102, 126, 234, 0.3);
}

.btn-submit-answer:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(102, 126, 234, 0.4);
}

.btn-submit-answer:active {
    transform: translateY(0);
}

/* 答案反馈样式 */
.answer-feedback {
    margin-top: 15px;
    padding: 12px;
    border-radius: 5px;
    border-left: 4px solid;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.answer-feedback.correct {
    background: #d4edda;
    border-left-color: #28a745;
    color: #155724;
}

.answer-feedback.wrong {
    background: #f8d7da;
    border-left-color: #dc3545;
    color: #721c24;
}

/* 随机练习 - 背景资料和图片按钮样式 */
.background-material-toggle,
.question-image-toggle {
    margin: 10px 0;
}

.btn-view-bg,
.btn-view-img {
    background: #6c757d;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.btn-view-bg:hover,
.btn-view-img:hover {
    background: #5a6268;
}

.background-material-content {
    margin-top: 10px;
    padding: 15px;
    background: #f8f9fa;
    border-left: 4px solid #6c757d;
    border-radius: 4px;
    animation: slideIn 0.3s ease;
}

.question-image-content {
    margin-top: 10px;
    max-width: 100%;
    height: auto;
    border: 2px solid #dee2e6;
    border-radius: 4px;
    animation: fadeIn 0.3s ease;
}

/* 考试模式 - 顶部背景资料和图片样式 */
.exam-materials-header {
    margin-bottom: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px solid #dee2e6;
}

.exam-background-section,
.exam-image-section {
    margin-bottom: 20px;
}

.exam-background-section:last-child,
.exam-image-section:last-child {
    margin-bottom: 0;
}

.exam-background-section h3,
.exam-image-section h3 {
    margin-bottom: 10px;
    color: #495057;
    font-size: 18px;
    border-bottom: 2px solid #6c757d;
    padding-bottom: 5px;
}

.exam-bg-item {
    padding: 10px;
    background: white;
    border-left: 4px solid #6c757d;
    margin-bottom: 10px;
    border-radius: 4px;
}

.exam-image-item {
    max-width: 100%;
    height: auto;
    border: 2px solid #dee2e6;
    border-radius: 4px;
    margin-right: 10px;
    margin-bottom: 10px;
}

/* 后台管理 */
.admin-panel {
    display: grid;
    gap: 20px;
}

.admin-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 5px;
}

.admin-section h3 {
    margin-bottom: 15px;
    color: #667eea;
}

.admin-section button {
    margin-right: 10px;
    margin-bottom: 10px;
}

/* 筛选栏 */
.filter-bar {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.filter-bar select {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

/* 表格样式 */
.questionsTable,
#usersTable {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

table th,
table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}

table th {
    background: #f8f9fa;
    font-weight: bold;
    color: #495057;
}

table tr:hover {
    background: #f8f9fa;
}

/* 考试模式 - 背景资料区域样式 */
.exam-background-material-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    color: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: left !important;  /* ⭐ 容器左对齐 */
}

/* 题目序号导航样式 */
.question-number-nav {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow-x: auto;  /* 允许横向滚动（小屏备用方案） */
    -webkit-overflow-scrolling: touch;  /* iOS 平滑滚动 */
}

.question-numbers-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);  /* 默认每行 10 个 */
    gap: 8px;
    min-width: 600px;  /* 保证最小宽度，触发滚动 */
}

.question-number-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    
    aspect-ratio: 1;  /* 保持正方形 */
    background: white;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    color: #495057;
    transition: all 0.2s ease;
    user-select: none;  /* 防止选中文本 */
    -webkit-tap-highlight-color: transparent;  /* 移除移动端点击高亮 */
}

.question-number-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.question-number-btn.answered {
    background: #28a745;
    border-color: #28a745;
    color: white;
}

.question-number-btn.answered:hover {
    background: #218838;
    border-color: #218838;
}

.question-number-btn.current {
    background: #007bff;
    border-color: #007bff;
    color: white;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.4);
}

/* 特殊行处理 - 41-45 题不再特殊处理，所有题目大小一致 */
/* .question-number-btn.special-row {
    grid-column: span 2;
} */

/* 使用 Grid 的自动流控制实现特定排列 */
/* 1-10: 第 1 行 */
/* 11-20: 第 2 行 */
/* 21-30: 第 3 行 */
/* 31-40: 第 4 行 */
/* 41-45: 第 5 行（与其他题目大小一致） */
/* 46-55: 第 6 行 */
/* 56-65: 第 7 行 */

/* 大屏设备优化（桌面端、平板） */
@media (min-width: 1024px) {
    .question-number-nav {
        padding: 15px;
    }
    
    .question-numbers-grid {
        grid-template-columns: repeat(10, 1fr);  /* 每行 10 个 */
        gap: 8px;
    }
    
    .question-number-btn {
        font-size: 14px;  /* 统一字体大小 */
        border-radius: 6px;
    }
}

/* 中等屏幕（平板横屏） */
@media (min-width: 768px) and (max-width: 1023px) {
    .question-numbers-grid {
        grid-template-columns: repeat(10, 1fr);  /* 每行 10 个 */
        gap: 6px;
    }
    
    /* 所有题目大小一致，不再特殊处理 */
}

/* 小屏设备（手机） */
@media (max-width: 767px) {
    .question-number-nav {
        padding: 10px;
        margin: 10px 0;
    }
    
    .question-numbers-grid {
        grid-template-columns: repeat(5, 1fr);  /* 每行 5 个 */
        gap: 6px;
        min-width: auto;  /* 取消最小宽度限制 */
    }
    
    .question-number-btn {
        font-size: 13px;
        border-width: 1.5px;
    }
    
    .question-number-btn.special-row {
        grid-column: span 1;  /* 手机端不再特殊处理 */
    }
    
    /* 手机端表单元素改为块级显示 */
    .form-group {
        display: block;  /* 手机端恢复块级布局 */
    }
    
    .form-group label {
        display: block;
        margin-right: 0;
        margin-bottom: 5px;
        min-width: auto;
        white-space: normal;  /* 允许换行 */
    }
    
    .form-group input,
    .form-group select {
        width: 100%;
    }
}

/* 超小屏设备（小手机） */
@media (max-width: 375px) {
    .question-numbers-grid {
        grid-template-columns: repeat(4, 1fr);  /* 每行 4 个 */
        gap: 5px;
    }
    
    .question-number-btn {
        font-size: 12px;
        padding: 8px 0;
    }
}

.exam-bg-header h4 {
    margin: 0 0 15px 0;
    font-size: 18px;
    color: white;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 10px;
}

.exam-bg-content {
    font-size: 14px;
    line-height: 1.8;
    white-space: normal;  /* ⭐ 改为 normal，不保留空格 */
    word-wrap: break-word;
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 5px;
    max-height: 400px;
    overflow-y: auto;
    text-align: left !important;  /* ⭐ 强制左对齐 */
    text-indent: 0 !important;  /* ⭐ 移除首行缩进 */
    margin-left: 0 !important;  /* ⭐ 移除左边距 */
    padding-left: 0 !important;  /* ⭐ 移除内边距，让文本贴边 */
}

.exam-image-container {
    margin-top: 15px;
    text-align: center;
}

.exam-background-image {
    max-width: 100%;
    height: auto;
    max-height: 500px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: transform 0.3s ease;
}

.exam-background-image:hover {
    transform: scale(1.02);
}

/* 审批表格容器 - 支持横向滚动（移动端适配） */
#approveTable {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch; /* iOS 平滑滚动 */
}

#approveTable table {
    min-width: 100%;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.approve-table {
    width: 100%;
    border-collapse: collapse;
}

/* 移动端优化 */
@media (max-width: 768px) {
    /* 用户审核页面整体布局优化 */
    #userApprove {
        padding: 10px;
    }
    
    #approveTable {
        overflow-x: scroll;
        margin: 10px 0;
    }
    
    .approve-table {
        min-width: 1200px; /* 强制表格保持足够宽度以显示所有列 */
        font-size: 13px;
    }
    
    /* 减小移动端表格内边距 */
    .approve-table th,
    .approve-table td {
        padding: 8px 5px;
        white-space: nowrap; /* 防止文字换行 */
    }
    
    /* 调整按钮大小 */
    .approve-table .btn-small {
        padding: 4px 8px;
        font-size: 12px;
        margin: 2px;
    }
    
    /* 优化表头背景 */
    .approve-table th {
        background: #f8f9fa;
        position: sticky;
        left: 0;
    }
    
    /* 优化返回按钮区域 */
    #backToAdminFromApprove {
        margin-bottom: 10px;
    }
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: white;
    margin: 10% auto;
    padding: 30px;
    border-radius: 10px;
    max-width: 500px;
    position: relative;
    animation: slideDown 0.3s;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-content-large {
    max-width: 900px;
    width: 90%;
}

.result-content {
    max-width: 700px;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
}

.close:hover {
    color: #333;
}

/* 结果展示 */
.result-section {
    margin-bottom: 20px;
    padding: 15px;
    border-radius: 5px;
}

.result-total {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    text-align: center;
    border-radius: 5px;
    margin-bottom: 20px;
}

.result-total h3 {
    font-size: 32px;
    margin-bottom: 10px;
}

.result-detail {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 10px;
}

.correct-answer {
    color: #28a745;
    font-weight: bold;
}

.wrong-answer {
    color: #dc3545;
    font-weight: bold;
}

/* 响应式 */
@media (max-width: 768px) {
    /* ⭐ 关键修复：调整 body 和 main 的上边距，避免内容被固定标题遮挡 */
    body {
        padding-top: 200px;  /* 增加上边距，适应垂直布局的 header + tabs */
    }
    
    main {
        margin-top: 0;  /* 移除 main 的上边距，由 body 控制 */
    }
    
    header {
        flex-direction: column;
        gap: 15px;
        padding: 15px 20px;  /* 减少内边距 */
    }
    
    header h1 {
        font-size: 22px;  /* 减小标题字体 */
    }
    
    .user-info {
        flex-wrap: wrap;  /* 允许换行 */
        justify-content: center;
        gap: 10px;
    }
    
    .admin-contact {
        margin-left: 0;  /* 移除左边距 */
        justify-content: center;
    }
    
    .tabs {
        top: auto;  /* 移除固定定位 */
        position: relative;
        flex-direction: column;
        padding: 10px 20px;
    }
    
    .tab-btn {
        border-bottom: 1px solid #dee2e6;
        width: 100%;  /* 按钮占满宽度 */
    }
    
    .filter-bar {
        flex-direction: column;
    }
    
    .answer-header {
        flex-direction: column;
        gap: 15px;
    }
    
    /* ⭐ 新增：移动端模态框调整，避免被固定标题遮挡 */
    .modal-content {
        margin: 220px auto 20px;  /* 上边距增加到 220px，避开更高的固定标题 */
        max-height: calc(100vh - 240px);  /* 最大高度为视口高度减去标题和边距 */
        width: 90%;  /* 宽度调整为 90% */
        padding: 20px;  /* 减少内边距 */
    }
    
    .modal-content h2 {
        font-size: 20px;  /* 减小标题字体 */
        margin-top: 0;
    }
    
    .form-group {
        margin-bottom: 12px;  /* 减少表单项间距 */
    }
    
    .form-group label {
        font-size: 14px;  /* 减小标签字体 */
    }
    
    .form-group input,
    .form-group select {
        font-size: 16px;  /* 增大输入框字体，方便触摸 */
        padding: 10px;  /* 增大内边距 */
    }
    
    /* ⭐ 新增：模拟考试配置区域优化 */
    .exam-config,
    .practice-config {
        flex-direction: column;  /* 垂直布局 */
    }
    
    .exam-config .form-group,
    .practice-config .form-group {
        width: 100%;  /* 占满宽度 */
    }
    
    /* ⭐ 新增：答题区域优化 */
    .answer-header h2 {
        font-size: 20px;  /* 减小标题字体 */
    }
    
    .timer {
        font-size: 16px;  /* 减小计时器字体 */
    }
}

/* 提示信息 */
.alert {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* 自定义确认框样式 */
.modal-confirm {
    max-width: 450px;
    animation: slideDown 0.3s ease-out;
}

.confirm-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 8px 8px 0 0;
}

.confirm-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: bold;
}

.confirm-body {
    padding: 25px 20px;
    background: white;
}

.confirm-body p {
    margin: 0;
    color: #333;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
}

.confirm-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 15px 20px;
    background: #f8f9fa;
    border-radius: 0 0 8px 8px;
}

.confirm-footer .btn {
    min-width: 80px;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
