* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
    color: #fff;
    padding: 30px;
    text-align: center;
}

header h1 {
    font-size: 28px;
    margin-bottom: 10px;
}

header .subtitle {
    font-size: 14px;
    opacity: 0.9;
}

main {
    padding: 30px;
}

.section {
    animation: fadeIn 0.3s ease;
}

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

.hidden {
    display: none !important;
}

.start-card {
    text-align: center;
    padding: 40px 20px;
}

.start-card h2 {
    font-size: 24px;
    color: #333;
    margin-bottom: 30px;
}

.info-box {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
}

.info-item {
    display: flex;
    justify-content: center;
    padding: 12px 0;
    border-bottom: 1px solid #e9ecef;
}

.info-item:last-child {
    border-bottom: none;
}

.info-item .label {
    font-weight: bold;
    color: #5a67d8;
    margin-right: 10px;
}

.info-item .value {
    color: #666;
}

.btn {
    padding: 14px 40px;
    font-size: 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
}

.btn-primary {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
    color: #fff;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(90, 103, 216, 0.4);
}

.btn-secondary {
    background: #e9ecef;
    color: #495057;
}

.btn-secondary:hover {
    background: #dee2e6;
}

.btn-secondary:disabled {
    background: #f1f3f5;
    color: #adb5bd;
    cursor: not-allowed;
}

.btn-success {
    background: linear-gradient(135deg, #38a169 0%, #2f855a 100%);
    color: #fff;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(56, 161, 105, 0.4);
}

.exam-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 25px;
}

.progress-info {
    font-size: 16px;
    color: #333;
}

.progress-info .separator {
    margin: 0 8px;
    color: #adb5bd;
}

.timer {
    font-size: 18px;
    font-weight: bold;
    color: #5a67d8;
}

.timer-label {
    font-weight: normal;
    color: #666;
}

.question-container {
    min-height: 300px;
    padding: 20px 0;
}

.question-box {
    background: #fff;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
}

.question-type {
    display: inline-block;
    padding: 4px 12px;
    background: #5a67d8;
    color: #fff;
    border-radius: 20px;
    font-size: 12px;
    margin-bottom: 15px;
}

.question-text {
    font-size: 18px;
    color: #333;
    line-height: 1.6;
    margin-bottom: 20px;
}

.options-list {
    list-style: none;
}

.option-item {
    padding: 15px 20px;
    margin-bottom: 10px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.option-item:hover {
    border-color: #5a67d8;
    background: #f0f4ff;
}

.option-item.selected {
    border-color: #5a67d8;
    background: #e8ebff;
}

.option-item.correct {
    border-color: #38a169;
    background: #c6f6d5;
}

.option-item.wrong {
    border-color: #e53e3e;
    background: #fed7d7;
}

.option-label {
    font-weight: bold;
    color: #5a67d8;
    margin-right: 10px;
}

.fill-input {
    width: 100%;
    padding: 15px;
    font-size: 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    transition: border-color 0.2s ease;
}

.fill-input:focus {
    outline: none;
    border-color: #5a67d8;
}

.fill-input.correct {
    border-color: #38a169;
    background: #c6f6d5;
}

.fill-input.wrong {
    border-color: #e53e3e;
    background: #fed7d7;
}

.navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-top: 1px solid #e9ecef;
}

.question-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    max-width: 500px;
}

.nav-btn {
    width: 32px;
    height: 32px;
    border: 2px solid #e9ecef;
    background: #fff;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
}

.nav-btn:hover {
    border-color: #5a67d8;
}

.nav-btn.current {
    border-color: #5a67d8;
    background: #5a67d8;
    color: #fff;
}

.nav-btn.answered {
    background: #c6f6d5;
    border-color: #38a169;
}

.submit-area {
    text-align: center;
    padding: 20px 0;
}

.result-card {
    text-align: center;
    padding: 30px;
}

.result-card h2 {
    font-size: 24px;
    color: #333;
    margin-bottom: 30px;
}

.score-display {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.score-item {
    background: #f8f9fa;
    padding: 20px 30px;
    border-radius: 12px;
}

.score-item.total {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
    color: #fff;
}

.score-label {
    display: block;
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.score-item.total .score-label {
    color: rgba(255, 255, 255, 0.9);
}

.score-value {
    font-size: 36px;
    font-weight: bold;
    color: #5a67d8;
}

.score-item.total .score-value {
    color: #fff;
}

.score-total {
    font-size: 18px;
    color: #adb5bd;
}

.score-item.total .score-total {
    color: rgba(255, 255, 255, 0.8);
}

.time-used {
    font-size: 16px;
    color: #666;
    margin-bottom: 30px;
}

.result-card .btn {
    margin: 5px;
}

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

.analysis-header h2 {
    font-size: 22px;
    color: #333;
}

.analysis-tabs {
    display: flex;
    gap: 10px;
}

.tab-btn {
    padding: 10px 25px;
    border: 2px solid #e9ecef;
    background: #fff;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.tab-btn:hover {
    border-color: #5a67d8;
}

.tab-btn.active {
    border-color: #5a67d8;
    background: #5a67d8;
    color: #fff;
}

.analysis-container {
    max-height: 500px;
    overflow-y: auto;
    padding-right: 10px;
}

.analysis-item {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
}

.analysis-question {
    font-size: 16px;
    color: #333;
    margin-bottom: 15px;
    line-height: 1.6;
}

.analysis-answer {
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 10px;
}

.analysis-answer.correct {
    background: #c6f6d5;
    border-left: 4px solid #38a169;
}

.analysis-answer.wrong {
    background: #fed7d7;
    border-left: 4px solid #e53e3e;
}

.answer-label {
    font-weight: bold;
    margin-right: 8px;
}

.analysis-text {
    background: #e8ebff;
    padding: 15px;
    border-radius: 8px;
    font-size: 14px;
    color: #555;
    line-height: 1.6;
}

.analysis-text strong {
    color: #5a67d8;
}

.analysis-footer {
    display: flex;
    justify-content: center;
    gap: 15px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
    margin-top: 20px;
}

footer {
    background: #f8f9fa;
    padding: 20px;
    text-align: center;
    color: #666;
    font-size: 14px;
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

@media (max-width: 600px) {
    body {
        padding: 10px;
    }

    header {
        padding: 20px;
    }

    header h1 {
        font-size: 22px;
    }

    main {
        padding: 20px;
    }

    .score-display {
        flex-direction: column;
        align-items: center;
    }

    .navigation {
        flex-direction: column;
        gap: 15px;
    }

    .question-nav {
        max-width: 100%;
    }

    .analysis-header {
        flex-direction: column;
        align-items: flex-start;
    }
}
