/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 移动端性能优化 */
* {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* 允许文本选择的元素 */
.question-text,
.option-text,
.explanation,
input,
textarea {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #ffffff;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    touch-action: manipulation;
}

/* 移动端背景优化 */
@media (max-width: 768px) {
    body {
        background: #ffffff;
    }
}

/* 容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    width: 100%;
}

/* 移动端安全区域适配 */
@supports (padding: max(0px)) {
    .container {
        padding-left: max(20px, env(safe-area-inset-left));
        padding-right: max(20px, env(safe-area-inset-right));
    }
}

/* 页面切换 */
.page {
    display: none;
    min-height: 100vh;
}

.page.active {
    display: block;
}

/* 头部 */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.95);
    padding: 20px 30px;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    margin-bottom: 30px;
    position: sticky;
    top: 20px;
    z-index: 100;
}

.header h1 {
    color: #007bff;
    font-size: 2rem;
    font-weight: 700;
}

.header h1 i {
    margin-right: 10px;
}

.header-actions {
    display: flex;
    gap: 15px;
}

/* 按钮样式 */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    white-space: nowrap;
    min-height: 44px; /* iOS推荐的最小触摸目标 */
    justify-content: center;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn:active {
    transform: translateY(0);
    transition: transform 0.1s ease;
}

/* 移动端按钮优化 */
@media (max-width: 768px) {
    .btn {
        padding: 14px 20px;
        font-size: 16px; /* 防止iOS缩放 */
        min-height: 48px;
    }
}

.btn-primary {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-warning {
    background: #ffc107;
    color: #212529;
}

/* 搜索栏样式 */
.search-section {
    margin: 20px 0;
}

.search-container {
    position: relative;
    max-width: 500px;
    margin: 0 auto;
}

.search-input {
    width: 100%;
    padding: 12px 45px 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 25px;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    outline: none;
}

.search-input:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    pointer-events: none;
}

@media (max-width: 768px) {
    .search-section {
        margin: 15px 0;
        padding: 0 15px;
    }
    
    .search-input {
        font-size: 16px; /* 防止iOS缩放 */
    }
}

/* 退出确认对话框样式 */
.exit-confirm-modal {
    max-width: 480px;
}

.exit-message {
    text-align: center;
    padding: 20px 0;
}

.exit-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.exit-message p {
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 20px;
    font-weight: 500;
}

.exit-description {
    background: rgba(248, 249, 250, 0.8);
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
    text-align: left;
}

.desc-item {
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: #555;
    line-height: 1.4;
}

.desc-item:last-child {
    margin-bottom: 0;
}

.desc-item strong {
    color: #333;
}

.exit-footer {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    /* padding-top: 10px; */
    padding-bottom: 20px;
}

.exit-btn {
    min-width: 120px;
    padding: 10px 20px;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.exit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

@media (max-width: 768px) {
    .exit-footer {
        flex-direction: column;
        align-items: center;
    }
    
    .exit-btn {
        width: 100%;
        max-width: 200px;
    }
    
    .exit-description {
        padding: 12px;
    }
}

/* 主内容区域 */
.main-content {
    display: grid;
    gap: 30px;
}

/* 题库网格 */
/* .banks-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
} */
 .banks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); /* minmax() 值可以根据需要调整 */
    gap: 25px;
    padding: 0 20px; /* 保持左右内边距 */
}

@media (min-width: 769px) {
    .banks-grid {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
        gap: 30px;
        padding: 0; /* 在桌面端移除内边距 */
    }
}

@media (max-width: 768px) {
    .banks-grid {
        grid-template-columns: 1fr; /* 在移动端强制单列 */
        gap: 15px;
        padding: 0 15px;
    }
}

/* @media (min-width: 769px) {
    .banks-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 30px;
        padding: 0;
    }
}

@media (min-width: 1024px) {
    .banks-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 35px;
    }
}

@media (min-width: 1400px) {
    .banks-grid {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
        gap: 40px;
    }
} */



.bank-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    min-height: 220px;
    padding: 25px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    position: relative; /* 新增 */
}

.bank-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.bank-card:active {
    transform: translateY(-2px);
    transition: transform 0.1s ease;
}

/* 移动端题库卡片优化 */
@media (max-width: 768px) {
    .banks-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .bank-card {
        padding: 20px;
        margin-bottom: 0;
    }
    
    .bank-card:hover {
        transform: none;
    }
}

.bank-card h3 {
    color: #007bff;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.bank-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    color: #666;
    font-size: 14px;
    flex-wrap: wrap;
    gap: 10px;
}

.paused-indicator {
    background: #ffc107;
    color: #212529;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.bank-actions {
    display: flex;
    gap: 10px;
    position: absolute;
    left: 15px;      
    right: auto;    
    bottom: 10px;   
    justify-content: flex-start;
}

.bank-actions .btn {
    padding: 8px 16px;
    font-size: 12px;
}

/* 答题页面 */
.quiz-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.95);
    padding: 20px 30px;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    margin-bottom: 30px;
}

.quiz-info {
    flex: 1;
}

.quiz-info h2 {
    color: #007bff;
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.quiz-progress {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    color: #666;
    font-size: 14px;
}

.progress-bar {
    flex: 1;
    height: 6px;
    background: #e9ecef;
    border-radius: 3px;
    overflow: hidden;
    margin: 0 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #007bff, #0056b3);
    transition: width 0.3s ease;
}

.quiz-stats {
    display: flex;
    gap: 20px;
    color: #666;
    font-size: 14px;
}

.quiz-actions {
    display: flex;
    gap: 10px;
}

.practice-header {
    display: flex;
    align-items: center;
    gap: 20px;
    background: rgba(255, 255, 255, 0.95);
    padding: 20px 30px;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    margin-bottom: 30px;
}

.practice-info {
    flex: 1;
}

.practice-info h2 {
    color: #007bff;
    margin-bottom: 10px;
}

.practice-stats {
    display: flex;
    gap: 20px;
    color: #666;
    font-size: 14px;
}

/* 题目卡片 */
.question-container {
    margin-bottom: 30px;
}

.question-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.question-type {
    display: inline-block;
    background: #007bff;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 20px;
}

.question-text {
    font-size: 1.2rem;
    line-height: 1.8;
    margin-bottom: 25px;
    color: #333;
}

.options {
    display: grid;
    gap: 15px;
}

.option {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 15px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 15px;
    min-height: 60px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    user-select: none;
}

.option:hover {
    background: #e9ecef;
    border-color: #007bff;
}

.option:active {
    transform: scale(0.98);
    transition: transform 0.1s ease;
}

/* 移动端选项优化 */
@media (max-width: 768px) {
    .option {
        padding: 16px 18px;
        min-height: 64px;
        gap: 12px;
    }
    
    .option:hover {
        background: #f8f9fa;
        border-color: #e9ecef;
    }
}

.option.selected {
    background: #007bff;
    border-color: #007bff;
    color: white;
}

.option.correct {
    background: #28a745;
    border-color: #28a745;
    color: white;
}

.option.wrong {
    background: #dc3545;
    border-color: #dc3545;
    color: white;
}

.option-label {
    background: #007bff;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
}

.option.selected .option-label,
.option.correct .option-label,
.option.wrong .option-label {
    background: rgba(255, 255, 255, 0.2);
}

.option-text {
    flex: 1;
    font-size: 16px;
}

/* 解析 */
.explanation {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-left: 4px solid #007bff;
    border-radius: 0 8px 8px 0;
}

.explanation h4 {
    color: #007bff;
    margin-bottom: 10px;
}

/* 答案操作 */
.answer-actions {
    text-align: center;
}

/* 结果页面 */
.result-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    text-align: center;
}

.result-container h2 {
    color: #007bff;
    margin-bottom: 30px;
    font-size: 2rem;
}

.result-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-item {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid #007bff;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #007bff;
    margin-bottom: 5px;
}

.stat-label {
    color: #666;
    font-size: 14px;
}

.wrong-questions {
    margin: 30px 0;
    text-align: left;
}

.wrong-questions h3 {
    color: #dc3545;
    margin-bottom: 20px;
}

.wrong-question-item {
    background: #f8f9fa;
    border-left: 4px solid #dc3545;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 0 8px 8px 0;
}

.result-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

/* 历史记录 */
.history-list {
    display: grid;
    gap: 15px;
}

.history-item {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 20px;
    align-items: center;
}

.history-info h4 {
    color: #007bff;
    margin-bottom: 8px;
}

.history-details {
    display: flex;
    gap: 20px;
    color: #666;
    font-size: 14px;
}

.history-score {
    text-align: right;
}

.score-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #28a745;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 15px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 1px solid #e9ecef;
}

.modal-header h3 {
    color: #007bff;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-body {
    padding: 30px;
}

/* 表单 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #007bff;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 12px;
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 30px;
}

/* 模式选择 */
.mode-options {
    display: grid;
    gap: 15px;
}

.mode-option {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.mode-option:hover {
    background: #e9ecef;
    border-color: #007bff;
}

.mode-option i {
    font-size: 2rem;
    color: #007bff;
    margin-bottom: 10px;
}

.mode-option h4 {
    color: #333;
    margin-bottom: 8px;
}

.mode-option p {
    color: #666;
    font-size: 14px;
    margin: 0;
}

/* 无数据状态 */
.no-data {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.no-data i {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.no-data p {
    font-size: 1.1rem;
}

/* 加载状态 */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(5px);
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e9ecef;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 消息提示 */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #333;
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 3000;
    transform: translateX(400px);
    transition: transform 0.3s ease;
}

.toast.show {
    transform: translateX(0);
}

.toast.success {
    background: #28a745;
}

.toast.error {
    background: #dc3545;
}

.toast.warning {
    background: #ffc107;
    color: #212529;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
        padding: 20px;
        position: static;
        margin-bottom: 20px;
    }
    
    .header h1 {
        font-size: 1.6rem;
        margin-bottom: 0;
    }
    
    .header-actions {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .quiz-header,
    .practice-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
        padding: 20px;
    }
    
    .quiz-info h2,
    .practice-info h2 {
        font-size: 1.3rem;
        margin-bottom: 10px;
    }
    
    .quiz-stats,
    .practice-stats {
        justify-content: center;
        flex-wrap: wrap;
        gap: 15px;
        font-size: 14px;
    }
    
    .quiz-actions {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .question-card {
        padding: 20px;
        margin-bottom: 20px;
    }
    
    .question-text {
        font-size: 1.1rem;
        line-height: 1.6;
        margin-bottom: 20px;
    }
    
    .question-type {
        font-size: 11px;
        padding: 3px 10px;
    }
    
    .option-label {
        width: 28px;
        height: 28px;
        font-size: 13px;
        flex-shrink: 0;
    }
    
    .option-text {
        font-size: 15px;
        line-height: 1.4;
    }
    
    .result-container {
        padding: 25px 20px;
    }
    
    .result-container h2 {
        font-size: 1.6rem;
        margin-bottom: 25px;
    }
    
    .result-stats {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .stat-value {
        font-size: 1.8rem;
    }
    
    .result-actions {
        flex-direction: column;
        gap: 12px;
    }
    
    .history-item {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 15px;
        padding: 18px;
    }
    
    .history-details {
        justify-content: center;
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .modal-content {
        width: 95%;
        margin: 10px;
        max-height: 95vh;
    }
    
    .modal-header,
    .modal-body {
        padding: 20px;
    }
    
    .form-actions {
        flex-direction: column;
        gap: 12px;
    }
    
    .toast {
        right: 15px;
        left: 15px;
        transform: translateY(-100px);
        margin: 0 10px;
    }
    
    .toast.show {
        transform: translateY(0);
    }
    
    /* 进度条在移动端的优化 */
    .progress-bar {
        height: 8px;
        margin: 15px 0;
    }
    
    /* 模态框在移动端的优化 */
    .mode-options {
        gap: 12px;
    }
    
    .mode-option {
        padding: 18px 15px;
    }
    
    .mode-option i {
        font-size: 1.8rem;
        margin-bottom: 8px;
    }
    
    .mode-option h4 {
        font-size: 1rem;
        margin-bottom: 6px;
    }
    
    .mode-option p {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .header {
        padding: 15px;
        margin-bottom: 15px;
        border-radius: 12px;
    }
    
    .header h1 {
        font-size: 1.4rem;
    }
    
    .btn {
        padding: 12px 18px;
        font-size: 15px;
        min-height: 50px;
    }
    
    .bank-card {
        padding: 18px;
        border-radius: 12px;
    }
    
    .bank-card h3 {
        font-size: 1.2rem;
        margin-bottom: 12px;
    }
    
    .bank-info {
        font-size: 13px;
        gap: 8px;
    }
    
    .quiz-header,
    .practice-header {
        padding: 18px;
        border-radius: 12px;
    }
    
    .question-card {
        padding: 18px;
        border-radius: 12px;
    }
    
    .question-text {
        font-size: 1.05rem;
        line-height: 1.5;
        margin-bottom: 18px;
    }
    
    .option {
        padding: 14px 16px;
        border-radius: 8px;
        min-height: 58px;
        gap: 10px;
    }
    
    .option-text {
        font-size: 14px;
        line-height: 1.3;
    }
    
    .option-label {
        width: 26px;
        height: 26px;
        font-size: 12px;
    }
    
    .quiz-stats,
    .practice-stats {
        font-size: 13px;
        gap: 12px;
    }
    
    .result-container {
        padding: 20px 15px;
        border-radius: 12px;
    }
    
    .result-container h2 {
        font-size: 1.4rem;
        margin-bottom: 20px;
    }
    
    .stat-value {
        font-size: 1.6rem;
    }
    
    .stat-label {
        font-size: 13px;
    }
    
    .modal-content {
        width: 98%;
        margin: 5px;
        border-radius: 12px;
    }
    
    .modal-header,
    .modal-body {
        padding: 18px;
    }
    
    .form-group input,
    .form-group select {
        padding: 14px 16px;
        font-size: 16px; /* 防止iOS缩放 */
        border-radius: 8px;
    }
    
    .toast {
        margin: 0 5px;
        padding: 12px 16px;
        border-radius: 8px;
        font-size: 14px;
    }
}

/* 键盘快捷键提示 */
.keyboard-hint {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 12px;
    z-index: 1000;
    display: none;
}

.keyboard-hint.show {
    display: block;
}

@media (max-width: 768px) {
    .keyboard-hint {
        display: none !important;
    }
}

/* 移动端滚动优化 */
@media (max-width: 768px) {
    * {
        -webkit-overflow-scrolling: touch;
    }
    
    body {
        overflow-x: hidden;
    }
    
    .container {
        overflow-x: hidden;
    }
}

/* 移动端触摸反馈 */
@media (hover: none) and (pointer: coarse) {
    .btn:hover,
    .bank-card:hover,
    .option:hover,
    .mode-option:hover {
        transform: none;
        background: initial;
        border-color: initial;
        box-shadow: initial;
    }
    
    .btn:active {
        background: rgba(0, 0, 0, 0.1);
    }
}

/* 移动端专用样式 */
@media (max-width: 768px) {
    /* 防止横屏时内容过小 */
    @media (orientation: landscape) {
        .header h1 {
            font-size: 1.3rem;
        }
        
        .question-text {
            font-size: 1rem;
        }
        
        .btn {
            padding: 10px 16px;
            min-height: 40px;
        }
        
        .option {
            min-height: 50px;
            padding: 12px 16px;
        }
    }
    
    /* 改进的触摸目标 */
    .bank-actions .btn {
        min-height: 44px;
        padding: 10px 16px;
    }
    
    /* 更好的视觉层次 */
    .bank-card {
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    }
    
    .question-card {
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    }
    
    .result-container {
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    }
}

/* 动画效果 */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

/* 进度条 */
.progress-bar {
    width: 100%;
    height: 6px;
    background: #e9ecef;
    border-radius: 3px;
    overflow: hidden;
    margin: 10px 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* 题目编号显示 */
.question-number {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #007bff;
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.question-card {
    position: relative;
}

/* 题目导航样式 */
/* 答题页面布局 */
.quiz-layout {
    display: flex;
    gap: 20px;
    height: calc(100vh - 120px);
}

/* 左侧边栏 - 题目导航 */
.question-navigation-sidebar {
    width: 300px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    flex-shrink: 0;
}

/* 移动端导航按钮 */
.mobile-nav-toggle {
    padding: 10px 20px;
    text-align: center;
}

.mobile-only {
    display: none;
}

.nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.nav-header h4 {
    margin: 0;
    color: #333;
    font-size: 16px;
}

.nav-legend {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #666;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 2px;
    border: 1px solid #ddd;
}

.legend-color.unanswered {
    background: #fff;
}



.legend-color.correct {
    background: #28a745;
    border-color: #28a745;
}

.legend-color.wrong {
    background: #dc3545;
    border-color: #dc3545;
}

.question-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
    gap: 8px;
    overflow-y: auto;
}

.question-item {
    width: 40px;
    height: 40px;
    border: 2px solid #ddd;
    border-radius: 6px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #666;
}

.question-item:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.question-item.current {
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.3);
}

.question-item.correct {
    background: #28a745;
    border-color: #28a745;
    color: white;
}

.question-item.wrong {
    background: #dc3545;
    border-color: #dc3545;
    color: white;
}

.question-item.unanswered {
    background: #fff;
    border-color: #ddd;
    color: #666;
}



/* 主内容区域 */
.quiz-content {
    flex: 1;
    overflow-y: auto;
}

/* 移动端题目导航模态框 */
.mobile-nav-modal .modal-content {
    max-width: 90vw;
    max-height: 80vh;
}

.mobile-nav-content {
    padding: 0;
}

.mobile-legend {
    justify-content: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.mobile-grid {
    max-height: 50vh;
    grid-template-columns: repeat(auto-fill, minmax(45px, 1fr));
}

/* 响应式布局 */
.desktop-only {
    display: block;
}

@media (max-width: 768px) {
    .desktop-only {
        display: none !important;
    }
    
    .mobile-only {
        display: block !important;
    }
    
    .quiz-layout {
        flex-direction: column;
        height: auto;
    }
    
    .question-grid {
        grid-template-columns: repeat(auto-fill, minmax(35px, 1fr));
        gap: 6px;
    }
    
    .question-item {
        width: 35px;
        height: 35px;
        font-size: 11px;
    }
}

/* 上一题按钮样式调整 */
.answer-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.answer-actions .btn {
    flex: 1;
    min-width: 100px;
}

@media (max-width: 480px) {
    .answer-actions {
        flex-direction: column;
    }
    
    .answer-actions .btn {
        width: 100%;
    }
}