* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

:root {
    --vh: 1vh;
}

/* 章节选择页面 */
.chapter-select-page {
    display: none;
    min-height: calc(var(--vh, 1vh) * 100);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 0;
}

.chapter-select-container {
    min-height: calc(var(--vh, 1vh) * 100);
    display: flex;
    flex-direction: column;
}

.chapter-select-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 16px 16px 16px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.chapter-select-header h1 {
    font-size: 18px;
    margin: 0 0 8px 0;
    font-weight: 600;
}

.chapter-select-subtitle {
    font-size: 13px;
    opacity: 0.9;
    margin: 0;
}

.wrong-questions-card {
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
    color: white;
}

.wrong-questions-card .chapter-count {
    color: rgba(255, 255, 255, 0.9);
}

/* 移动端章节选择列表 */
.chapter-list {
    flex: 1;
    padding: 0;
    background: white;
    overflow-y: auto;
}

.chapter-item {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
}

.chapter-item:active {
    background: #f8f9fa;
    transform: scale(0.98);
}

.chapter-item.simple {
    padding: 14px 16px;
}

.chapter-item-content {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.chapter-item h3 {
    font-size: 15px;
    color: #333;
    margin: 0;
    font-weight: 600;
}

.chapter-item-count {
    font-size: 13px;
    color: #666;
    margin: 0;
}

.reset-btn-small {
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 20px;
    color: white;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
    display: inline-block;
    flex-shrink: 0;
}

.reset-btn-small:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* 答题页面 */
.container {
    display: block;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: calc(var(--vh, 1vh) * 100);
    padding: 20px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

@media (min-width: 1400px) {
    .container {
        max-width: 1600px;
    }

    .chapter-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.back-btn {
    display: none;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 20px;
    color: white;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
    flex-shrink: 0;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateX(-3px);
}

.back-text {
    display: none;
}

header h1 {
    font-size: 18px;
    margin: 0;
    font-weight: 600;
}

.controls {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: nowrap;
    flex-shrink: 0;
}

.toggle-switch {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    user-select: none;
}

.toggle-switch input {
    display: none;
}

.toggle-switch .slider {
    width: 42px;
    height: 22px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 11px;
    position: relative;
    transition: all 0.3s;
    flex-shrink: 0;
}

.toggle-switch .slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: all 0.3s;
}

.toggle-switch input:checked + .slider {
    background: #4CAF50;
}

.toggle-switch input:checked + .slider::before {
    transform: translateX(20px);
}

.toggle-switch .label-text {
    color: white;
    font-size: 13px;
    white-space: nowrap;
}

.main-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

/* 顶部章节导航栏 */
.chapter-nav-bar {
    background: white;
    border-bottom: 1px solid #e0e0e0;
    padding: 0 20px;
    display: flex;
    gap: 5px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-shrink: 0;
}

.chapter-nav-bar::-webkit-scrollbar {
    height: 4px;
}

.chapter-nav-bar::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.chapter-nav-bar::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 2px;
}

.nav-tab {
    padding: 16px 24px;
    cursor: pointer;
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
    font-weight: 500;
    white-space: nowrap;
    color: #666;
}

.nav-tab:hover {
    color: #333;
    background: #f8f9fa;
}

.nav-tab.active {
    color: #667eea;
    border-bottom-color: #667eea;
    background: #f0f3ff;
}

.nav-tab.wrong-tab {
    color: #f44336;
}

.nav-tab.wrong-tab.active {
    color: #f44336;
    border-bottom-color: #f44336;
    background: #ffebee;
}

.question-area {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}

.stats-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.stats-bar span {
    font-size: 16px;
    color: #333;
    font-weight: 500;
}

#questionContainer {
    min-height: 300px;
}

.question-card {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.question-type {
    display: inline-block;
    padding: 5px 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px;
    font-size: 13px;
    margin-bottom: 15px;
}

.question-score {
    display: inline-block;
    padding: 5px 15px;
    background: #ff9800;
    color: white;
    border-radius: 15px;
    font-size: 13px;
    margin-left: 10px;
}

.question-text {
    font-size: 18px;
    line-height: 1.8;
    color: #333;
    margin-bottom: 25px;
    font-weight: 500;
}

.options-list {
    list-style: none;
    margin-bottom: 25px;
}

.option-item {
    padding: 15px 20px;
    margin-bottom: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 12px;
    user-select: none;
}

.option-item:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

/* 移动端触摸反馈 */
@media (hover: none) and (pointer: coarse) {
    .option-item:active {
        transform: scale(0.98);
        opacity: 0.9;
    }
}

.option-item.selected {
    border-color: #667eea;
    background: #f0f3ff;
}

.option-item.correct {
    border-color: #4CAF50;
    background: #e8f5e9;
}

.option-item.wrong {
    border-color: #f44336;
    background: #ffebee;
}

.option-item .option-label {
    width: 30px;
    height: 30px;
    border: 2px solid #ccc;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    flex-shrink: 0;
}

.option-item.selected .option-label {
    border-color: #667eea;
    background: #667eea;
    color: white;
}

.option-item.correct .option-label {
    border-color: #4CAF50;
    background: #4CAF50;
    color: white;
}

.option-item.wrong .option-label {
    border-color: #f44336;
    background: #f44336;
    color: white;
}

.option-item .option-content {
    flex: 1;
    font-size: 15px;
    line-height: 1.6;
}

.confirm-btn {
    width: 100%;
    padding: 12px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 20px;
    margin-bottom: 20px;
}

.confirm-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.confirm-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.result-box {
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 12px;
    animation: slideDown 0.3s ease-in;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.result-box.correct {
    background: #e8f5e9;
    border-left: 3px solid #4CAF50;
}

.result-box.wrong {
    background: #ffebee;
    border-left: 3px solid #f44336;
}

.result-title {
    font-size: 15px;
    font-weight: bold;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.result-box.correct .result-title {
    color: #4CAF50;
}

.result-box.wrong .result-title {
    color: #f44336;
}

.result-score {
    font-size: 15px;
    color: #666;
}

.analysis-box {
    background: #fff9c4;
    border-left: 3px solid #ff9800;
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 12px;
    animation: slideDown 0.3s ease-in;
}

.analysis-title {
    font-size: 15px;
    font-weight: bold;
    color: #ff9800;
    margin-bottom: 8px;
}

.analysis-content {
    font-size: 15px;
    line-height: 1.6;
    color: #555;
}

.nav-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

.nav-btn {
    padding: 12px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.nav-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.nav-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.progress-panel {
    background: #f8f9fa;
    padding: 25px;
    border-left: 1px solid #e0e0e0;
}

.progress-panel h3 {
    font-size: 18px;
    margin-bottom: 20px;
    color: #333;
}

.chapter-progress {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.chapter-stat {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.chapter-stat .chapter-name {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.stat-bar {
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.stat-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s;
}

.stat-score {
    font-size: 12px;
    color: #888;
    text-align: right;
}

.reset-btn {
    width: 100%;
    padding: 12px;
    margin-top: 20px;
    background: #f44336;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.reset-btn:hover {
    background: #d32f2f;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.empty-icon {
    font-size: 80px;
    margin-bottom: 20px;
}

.empty-state h3 {
    font-size: 24px;
    color: #333;
    margin-bottom: 10px;
}

.empty-state p {
    font-size: 16px;
    color: #888;
    margin-bottom: 30px;
}

.back-to-home {
    padding: 12px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
}

.back-to-home:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

@media (max-width: 768px) {
    /* 章节选择页面优化 */
    .chapter-select-page {
        padding: 0;
    }

    .chapter-select-container {
        min-height: 100vh;
    }

    .chapter-select-header {
        padding: 20px 15px;
    }

    .chapter-list {
        padding: 0;
    }

    .chapter-item {
        padding: 14px 15px;
    }

    .chapter-item.simple {
        padding: 12px 15px;
    }

    .chapter-item h3 {
        font-size: 14px;
    }

    .chapter-item-count {
        font-size: 12px;
    }

    .select-container {
        padding-top: 30px;
    }

    .select-header h1 {
        font-size: 24px;
    }

    .select-subtitle {
        font-size: 14px;
    }

    .chapter-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .chapter-card {
        padding: 25px 20px;
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }

    .chapter-icon {
        font-size: 40px;
        margin-bottom: 0;
    }

    .chapter-card h2 {
        font-size: 18px;
    }

    /* 答题页面优化 */
    body {
        padding: 0;
    }

    .container {
        border-radius: 0;
        box-shadow: none;
    }

    header {
        padding: 12px 15px;
    }

    header h1 {
        font-size: 16px;
    }

    .controls {
        gap: 10px;
    }

    .toggle-switch .label-text {
        font-size: 12px;
    }
        justify-content: space-between;
    }

    .toggle-switch .label-text {
        font-size: 12px;
    }

    .toggle-switch .slider {
        width: 44px;
        height: 24px;
    }

    .toggle-switch .slider::before {
        width: 20px;
        height: 20px;
    }

    .toggle-switch input:checked + .slider::before {
        transform: translateX(20px);
    }

    .question-area {
        padding: 15px;
    }

    .stats-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding-bottom: 12px;
        margin-bottom: 20px;
    }

    .stats-bar span {
        font-size: 14px;
    }

    .question-type {
        font-size: 12px;
        padding: 4px 12px;
        margin-bottom: 12px;
    }

    .question-score {
        font-size: 12px;
        padding: 4px 12px;
        margin-left: 8px;
    }

    .question-text {
        font-size: 16px;
        line-height: 1.7;
        margin-bottom: 20px;
    }

    .option-item {
        padding: 14px 15px;
        margin-bottom: 10px;
        border-radius: 8px;
    }

    .option-item .option-label {
        width: 28px;
        height: 28px;
        font-size: 13px;
    }

    .option-item .option-content {
        font-size: 14px;
        line-height: 1.6;
    }

    .confirm-btn {
        padding: 14px 20px;
        font-size: 15px;
        margin-top: 15px;
    }

    .result-box,
    .analysis-box {
        padding: 15px;
        margin-bottom: 15px;
        border-radius: 8px;
    }

    .result-title,
    .analysis-title {
        font-size: 16px;
    }

    .result-score,
    .analysis-content {
        font-size: 13px;
    }

    .nav-buttons {
        gap: 12px;
        margin-top: 20px;
    }

    .nav-btn {
        padding: 12px 25px;
        font-size: 14px;
        flex: 1;
    }

    .progress-panel {
        padding: 20px 15px;
    }

    .progress-panel h3 {
        font-size: 16px;
        margin-bottom: 15px;
    }

    .chapter-progress {
        gap: 12px;
    }

    .chapter-stat .chapter-name {
        font-size: 13px;
    }

    .stat-bar {
        height: 6px;
    }

    .stat-score {
        font-size: 11px;
    }

    .reset-btn {
        padding: 12px;
        font-size: 13px;
        border-radius: 8px;
    }
}

@media (max-width: 480px) {
    /* 章节选择页面 */
    .select-container {
        padding-top: 20px;
    }

    .select-header h1 {
        font-size: 20px;
        margin-bottom: 10px;
    }

    .select-subtitle {
        font-size: 13px;
    }

    .chapter-card {
        padding: 20px 15px;
    }

    .chapter-icon {
        font-size: 36px;
    }

    .chapter-card h2 {
        font-size: 16px;
    }

    .chapter-count {
        font-size: 13px;
    }

    /* 章节列表窄屏优化 */
    .chapter-item {
        padding: 12px 12px;
    }

    .chapter-item.simple {
        padding: 10px 12px;
    }

    .chapter-item h3 {
        font-size: 13px;
    }

    .chapter-item-count {
        font-size: 11px;
    }

    .chapter-select-header h1 {
        font-size: 18px;
    }

    .chapter-select-subtitle {
        font-size: 12px;
    }

    .reset-btn-small {
        font-size: 12px;
        padding: 6px 14px;
    }

    /* 特别致谢页面样式 */
    .thanks-content {
        max-width: 800px;
        margin: 0 auto;
        padding: 40px 20px;
    }

    .thanks-header {
        text-align: center;
        margin-bottom: 40px;
    }

    .thanks-header h2 {
        color: #333;
        font-size: 2.5em;
        margin-bottom: 10px;
        background: linear-gradient(45deg, #667eea, #764ba2);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }

    .thanks-subtitle {
        color: #666;
        font-size: 1.2em;
    }

    .thanks-section {
        margin-bottom: 40px;
    }

    .person-card {
        background: white;
        border-radius: 15px;
        padding: 30px;
        margin-bottom: 30px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
        border: 1px solid rgba(102, 126, 234, 0.1);
    }

    .person-header {
        display: flex;
        align-items: center;
        margin-bottom: 20px;
    }

    .person-avatar {
        width: 60px;
        height: 60px;
        border-radius: 50%;
        background: linear-gradient(135deg, #667eea, #764ba2);
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
        font-size: 1.5em;
        font-weight: bold;
        margin-right: 20px;
    }

    .person-info h3 {
        color: #333;
        margin-bottom: 5px;
        font-size: 1.5em;
    }

    .person-info .title {
        color: #667eea;
        font-weight: 600;
    }

    .person-content {
        line-height: 1.8;
        color: #555;
        text-align: justify;
    }

    .highlight {
        background: linear-gradient(120deg, #ffd700 0%, #ffd700 100%);
        background-repeat: no-repeat;
        background-size: 100% 0.3em;
        background-position: 0 88%;
        font-weight: 600;
        color: #333;
    }

    .thanks-summary {
        background: rgba(102, 126, 234, 0.05);
        border-radius: 15px;
        padding: 30px;
        border-left: 5px solid #667eea;
    }

    .thanks-summary h3 {
        color: #333;
        margin-bottom: 20px;
        font-size: 1.3em;
    }

    .thanks-summary p {
        line-height: 1.8;
        color: #555;
        margin-bottom: 15px;
        text-align: justify;
    }

    @media (max-width: 768px) {
        .thanks-content {
            padding: 20px 15px;
        }

        .thanks-header h2 {
            font-size: 2em;
        }

        .person-header {
            flex-direction: column;
            text-align: center;
        }

        .person-avatar {
            margin-right: 0;
            margin-bottom: 15px;
        }

        .person-card {
            padding: 20px;
        }

        .thanks-summary {
            padding: 20px;
        }
    }

    /* 移动端特别致谢页面样式 */
    .mobile-thanks-content {
        padding: 20px 15px;
    }

    .mobile-thanks-header {
        text-align: center;
        margin-bottom: 30px;
    }

    .mobile-thanks-header h2 {
        color: #333;
        font-size: 1.8em;
        margin-bottom: 10px;
        background: linear-gradient(45deg, #667eea, #764ba2);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }

    .mobile-thanks-subtitle {
        color: #666;
        font-size: 1em;
    }

    .mobile-thanks-section {
        margin-bottom: 30px;
    }

    .mobile-person-card {
        background: white;
        border-radius: 12px;
        padding: 20px;
        margin-bottom: 20px;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
        border: 1px solid rgba(102, 126, 234, 0.1);
    }

    .mobile-person-header {
        display: flex;
        align-items: center;
        margin-bottom: 15px;
    }

    .mobile-person-avatar {
        width: 50px;
        height: 50px;
        border-radius: 50%;
        background: linear-gradient(135deg, #667eea, #764ba2);
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
        font-size: 1.2em;
        font-weight: bold;
        margin-right: 15px;
    }

    .mobile-person-info h3 {
        color: #333;
        margin-bottom: 5px;
        font-size: 1.2em;
    }

    .mobile-person-info .mobile-title {
        color: #667eea;
        font-weight: 600;
        font-size: 0.9em;
    }

    .mobile-person-content {
        line-height: 1.6;
        color: #555;
        text-align: justify;
        font-size: 0.95em;
    }

    .mobile-highlight {
        background: linear-gradient(120deg, #ffd700 0%, #ffd700 100%);
        background-repeat: no-repeat;
        background-size: 100% 0.2em;
        background-position: 0 88%;
        font-weight: 600;
        color: #333;
    }

    .mobile-thanks-summary {
        background: rgba(102, 126, 234, 0.05);
        border-radius: 12px;
        padding: 20px;
        border-left: 4px solid #667eea;
    }

    .mobile-thanks-summary h3 {
        color: #333;
        margin-bottom: 15px;
        font-size: 1.1em;
    }

    .mobile-thanks-summary p {
        line-height: 1.6;
        color: #555;
        margin-bottom: 12px;
        text-align: justify;
        font-size: 0.95em;
    }

    /* 答题页面 */
    header {
        padding: 10px 12px;
        flex-wrap: wrap;
    }

    header h1 {
        font-size: 14px;
    }

    .header-left {
        flex: 1;
        min-width: 150px;
    }

    .controls {
        gap: 8px;
        flex-wrap: wrap;
    }

    .toggle-switch .label-text {
        font-size: 12px;
        display: none;
    }

    .question-text {
        font-size: 15px;
    }

    .option-item {
        padding: 12px 12px;
    }

    .option-item .option-content {
        font-size: 13px;
    }

    .nav-btn {
        padding: 12px 20px;
        font-size: 13px;
    }

    .stats-bar span {
        font-size: 13px;
    }
}

@media (max-width: 360px) {
    header {
        padding: 8px 10px;
        flex-wrap: wrap;
    }

    header h1 {
        font-size: 13px;
    }

    .header-left {
        flex: 1;
        min-width: 120px;
    }

    .controls {
        gap: 6px;
    }

    .toggle-switch .slider {
        width: 36px;
        height: 20px;
    }

    .toggle-switch .slider::before {
        width: 16px;
        height: 16px;
    }

    .toggle-switch input:checked + .slider::before {
        transform: translateX(16px);
    }

    .reset-btn-small {
        padding: 5px 10px;
        font-size: 12px;
    }

    .question-area {
        padding: 10px;
    }

    .nav-item {
        padding: 8px 12px;
        font-size: 13px;
    }

    /* 极窄屏章节列表优化 */
    .chapter-item {
        padding: 10px 10px;
    }

    .chapter-item.simple {
        padding: 8px 10px;
    }

    .chapter-item h3 {
        font-size: 12px;
    }

    .chapter-item-count {
        font-size: 10px;
    }

    .chapter-select-header {
        padding: 15px 10px;
    }

    .chapter-select-header h1 {
        font-size: 16px;
        margin-bottom: 6px;
    }
    }

    .option-item {
        padding: 10px 10px;
    }
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
    .option-item {
        padding: 16px 18px;
    }

    .nav-btn,
    .confirm-btn,
    .reset-btn {
        min-height: 48px;
    }

    .toggle-switch .slider {
        min-height: 48px;
    }

    .chapter-card {
        padding: 25px 20px;
        min-height: 60px;
    }

    .back-btn {
        padding: 10px 20px;
        min-height: 48px;
    }
}

/* 横屏模式优化 */
@media (max-height: 500px) and (orientation: landscape) {
    header {
        padding: 15px;
    }

    header h1 {
        font-size: 18px;
        margin-bottom: 10px;
    }

    .controls {
        gap: 10px;
    }

    .chapter-nav {
        padding: 5px 10px;
    }

    .nav-item {
        padding: 8px 12px;
        font-size: 13px;
    }

    .question-area {
        padding: 15px;
    }

    .question-text {
        font-size: 15px;
        margin-bottom: 15px;
    }

    .option-item {
        padding: 10px 12px;
        margin-bottom: 8px;
    }

    .result-box,
    .analysis-box {
        padding: 12px;
        margin-bottom: 12px;
    }
}

/* 窄屏适配 - 适用于平板和窄屏笔记本 */
@media (max-width: 900px) {
    .question-area {
        padding: 20px;
        max-width: 100%;
    }
    
    .stats-bar span {
        font-size: 14px;
    }
    
    .question-text {
        font-size: 16px;
    }
    
    .option-item {
        padding: 12px 15px;
    }
    
    .option-content {
        font-size: 13px;
    }
}

/* 超窄屏适配 - 适用于小平板和宽屏手机横屏 */
@media (max-width: 600px) {
    .question-area {
        padding: 15px;
        max-width: 100%;
    }
    
    .stats-bar span {
        font-size: 13px;
    }
    
    .question-text {
        font-size: 15px;
        line-height: 1.5;
    }
    
    .option-item {
        padding: 10px 12px;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .option-label {
        margin-top: 0;
    }
    
    .option-content {
        font-size: 12px;
        line-height: 1.4;
    }
    
    .nav-buttons {
        flex-direction: column;
        gap: 8px;
    }
    
    .nav-btn {
        width: 100%;
    }
}

/* 极窄屏适配 - 适用于手机横屏 */
@media (max-width: 480px) {
    header {
        padding: 10px 15px;
    }
    
    header h1 {
        font-size: 16px;
    }
    
    .controls {
        flex-direction: column;
        gap: 8px;
        align-items: flex-end;
    }
    
    .chapter-nav-bar {
        padding: 0 10px;
    }
    
    .nav-tab {
        padding: 12px 16px;
        font-size: 12px;
    }
    
    .question-area {
        padding: 10px;
    }
    
    .stats-bar {
        margin-bottom: 15px;
        padding-bottom: 10px;
    }
    
    .stats-bar span {
        font-size: 12px;
    }
    
    .question-text {
        font-size: 14px;
        margin-bottom: 12px;
    }
    
    .option-item {
        padding: 8px 10px;
        margin-bottom: 6px;
    }
    
    .result-box,
    .analysis-box {
        padding: 10px;
        margin-bottom: 10px;
        font-size: 12px;
    }
}
