* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Microsoft YaHei', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
    padding-top: 70px;
    padding-bottom: 20px;
}

/* 顶部标题栏 */
.top-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 模式指示器 */
.mode-indicator {
    font-size: 20px;
    font-weight: 700;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    letter-spacing: 1px;
}

/* 汉堡菜单按钮 */
.hamburger-menu {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    z-index: 1001;
}

.hamburger-menu:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.05);
}

.hamburger-menu span {
    display: block;
    width: 22px;
    height: 2.5px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger-menu.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* 侧边栏 */
.sidebar {
    position: fixed;
    top: 0;
    left: -350px;
    width: 350px;
    height: 100vh;
    background: white;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
    z-index: 1002;
    transition: left 0.3s ease;
    overflow-y: auto;
}

.sidebar.active {
    left: 0;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: sticky;
    top: 0;
    z-index: 10;
}

.sidebar-header h2 {
    margin: 0;
    font-size: 1.5em;
}

.close-sidebar {
    background: none;
    border: none;
    color: white;
    font-size: 2em;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: background 0.3s ease;
}

.close-sidebar:hover {
    background: rgba(255, 255, 255, 0.2);
}

.sidebar-content {
    padding: 20px;
}

.sidebar-section {
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 2px solid #f0f0f0;
}

.sidebar-section:last-child {
    border-bottom: none;
}

.sidebar-section h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.2em;
    font-weight: 600;
}

.sidebar-item {
    margin-bottom: 20px;
}

.sidebar-item>label {
    display: block;
    color: #2c3e50;
    font-weight: 500;
    margin-bottom: 10px;
}

.checkbox-group,
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.checkbox-label,
.radio-label {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    background: #f8f9fa;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: normal;
}

.checkbox-label:hover,
.radio-label:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    transform: translateX(3px);
}

.checkbox-label input,
.radio-label input {
    margin-right: 10px;
    cursor: pointer;
    width: 18px;
    height: 18px;
}

.checkbox-label span,
.radio-label span {
    font-size: 15px;
}

.number-input {
    width: 100%;
    padding: 10px 15px;
    border: 2px solid #e3e8ef;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
}

.number-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 侧边栏遮罩 */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(3px);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.8em;
}

.mode-content {
    display: none;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mode-content.active {
    display: block;
}

.question-container {
    margin: 20px 0;
    padding: 25px;
    border: none;
    border-radius: 15px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.question-container:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.question-title {
    font-weight: bold;
    margin-bottom: 20px;
    font-size: 20px;
    color: #2c3e50;
    line-height: 1.6;
}

.question-type-label {
    font-style: italic;
    color: #7f8c8d;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px dashed #ddd;
    font-size: 14px;
}

.options-list {
    list-style-type: none;
}

.option-item {
    margin: 12px 0;
    padding: 15px 20px;
    border: 2px solid #e3e8ef;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    font-size: 16px;
}

.option-item:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.option-item.selected {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.option-item.correct {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(17, 153, 142, 0.3);
}

.option-item.incorrect {
    background: linear-gradient(135deg, #eb3349 0%, #f45c43 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(235, 51, 73, 0.3);
}

/* 导航按钮 - 优化为均匀分布 */
.navigation {
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    margin-top: 25px;
    gap: 15px;
}

.btn {
    flex: 1;
    max-width: 200px;
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

.btn:disabled {
    background: linear-gradient(135deg, #cccccc 0%, #999999 100%);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    opacity: 0.6;
}

.secondary-btn {
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
}

.secondary-btn:hover {
    background: linear-gradient(135deg, #7f8c8d 0%, #6c7a7b 100%);
    transform: translateY(-2px);
}

.answer-feedback {
    margin-top: 20px;
    padding: 15px 20px;
    border-radius: 12px;
    font-weight: 500;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.correct {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border: 2px solid #c3e6cb;
}

.incorrect {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border: 2px solid #f5c6cb;
}

.exam-settings {
    margin-bottom: 20px;
    text-align: center;
}

.exam-timer {
    font-size: 24px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 20px;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.exam-time-display {
    font-size: 20px;
    margin: 15px 0;
    text-align: center;
    font-weight: 600;
    color: #2c3e50;
}

.result-container {
    margin-top: 20px;
}

.score-display {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 20px;
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.question-index-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 25px;
    padding: 20px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 15px;
}

.index-item {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.index-item:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.index-item.correct {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
}

.index-item.incorrect {
    background: linear-gradient(135deg, #eb3349 0%, #f45c43 100%);
    color: white;
}

.result-details {
    margin-top: 20px;
    padding: 25px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.multiple-option {
    display: flex;
    align-items: center;
    padding: 12px 18px;
    margin: 8px 0;
    background: white;
    border: 2px solid #e3e8ef;
    border-radius: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.multiple-option:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-color: #667eea;
    transform: translateX(5px);
}

.multiple-option input {
    margin-right: 12px;
    cursor: pointer;
    width: 18px;
    height: 18px;
}

.multiple-option label {
    cursor: pointer;
    font-size: 16px;
    flex: 1;
    margin: 0;
    user-select: none;
}

/* 多选题确认按钮 */
.confirm-multiple-btn {
    margin-top: 10px;
    width: 100%;
    max-width: 300px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    body {
        padding-top: 60px;
    }

    .top-header {
        height: 55px;
    }

    .mode-indicator {
        font-size: 18px;
    }

    .hamburger-menu {
        width: 40px;
        height: 40px;
        left: 10px;
    }

    .sidebar {
        width: 85%;
        max-width: 350px;
        left: -85%;
    }

    .container {
        padding: 15px;
    }

    h2 {
        font-size: 1.4em;
    }

    .mode-content {
        padding: 20px;
    }

    .question-container {
        padding: 20px;
    }

    .question-title {
        font-size: 18px;
    }

    .navigation {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .sidebar {
        width: 90%;
        left: -90%;
    }

    .mode-indicator {
        font-size: 16px;
    }
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}