/* ServiceNow CSA Exam Mode Styles */

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--servicenow-blue) 0%, #0052a3 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    animation: fadeOut 1s ease-in-out 2s forwards;
}

.loading-container {
    text-align: center;
    color: white;
}

.servicenow-logo {
    margin-bottom: 30px;
}

.logo-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: white;
    margin: 0 auto 15px;
    position: relative;
    animation: logoSpin 2s ease-in-out infinite;
}

.logo-circle::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    background: var(--servicenow-blue);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.logo-text {
    font-size: 1.5em;
    font-weight: 600;
    letter-spacing: 2px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid white;
    border-radius: 50%;
    margin: 20px auto;
    animation: spin 1s linear infinite;
}

.loading-text {
    font-size: 1em;
    opacity: 0.9;
    margin-top: 15px;
}

@keyframes logoSpin {
    0%, 100% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.1); }
}

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

@keyframes fadeOut {
    to { 
        opacity: 0; 
        visibility: hidden; 
    }
}

/* ServiceNow Official Colors */
:root {
    --servicenow-blue: #0066CC;
    --servicenow-light-blue: #E6F2FF;
    --servicenow-green: #00CC73;
    --servicenow-orange: #FF9500;
    --servicenow-red: #E60026;
    --servicenow-grey: #5A6B73;
    --servicenow-light-grey: #F5F5F5;
    --servicenow-dark-grey: #2D3E50;
    --servicenow-border: #E0E0E0;
}

/* Hover effects for exam button */
.btn-exam:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(238, 90, 36, 0.4) !important;
}

/* ServiceNow style interface */
body {
    font-family: 'Source Sans Pro', 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, var(--servicenow-light-grey) 0%, #f8f9fa 100%);
    color: var(--servicenow-dark-grey);
    min-height: 100vh;
}

.container {
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0, 102, 204, 0.12);
    margin: 20px auto;
    max-width: 1200px;
    padding: 40px;
    animation: slideIn 0.8s ease-out;
    position: relative;
    overflow: hidden;
}

.container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--servicenow-blue), var(--servicenow-green), var(--servicenow-orange), var(--servicenow-blue));
    background-size: 400% 100%;
    animation: gradientShift 6s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

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

.header {
    background: linear-gradient(135deg, var(--servicenow-blue), #004499);
    color: white;
    padding: 25px 40px;
}

.header h1 {
    font-size: 2.2em;
    font-weight: 300;
    margin-bottom: 8px;
}

.header p {
    font-size: 1em;
    opacity: 0.9;
    font-weight: 300;
}

/* 双语显示样式 */
.question-en {
    margin-bottom: 15px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 5px;
    border-left: 3px solid #007bff;
}

.question-zh {
    padding: 10px;
    background: #fff3cd;
    border-radius: 5px;
    border-left: 3px solid #ffc107;
}

.option-en {
    margin-bottom: 8px;
    color: #495057;
}

.option-zh {
    color: #856404;
    font-style: italic;
}

/* 考试模式专用样式 */

/* 考试准备界面 */
.exam-preparation {
    display: block;
}

.exam-info {
    padding: 30px;
}

.exam-details {
    margin-bottom: 30px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #2196F3;
}

.info-item strong {
    color: #495057;
}

.info-item span {
    font-weight: 600;
    color: #2196F3;
}

.exam-rules {
    margin-bottom: 30px;
}

.exam-rules h3 {
    color: #dc3545;
    margin-bottom: 15px;
    font-size: 1.2em;
}

.exam-rules ul {
    list-style: none;
    padding: 0;
}

.exam-rules li {
    padding: 10px 0;
    padding-left: 25px;
    position: relative;
    border-bottom: 1px solid #e9ecef;
}

.exam-rules li:before {
    content: "⚠️";
    position: absolute;
    left: 0;
    top: 10px;
}

.exam-rules li:last-child {
    border-bottom: none;
}

.exam-settings {
    margin-bottom: 30px;
}

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

.setting-group {
    display: flex;
    flex-direction: column;
}

.setting-group label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #495057;
}

.confirmation {
    margin-bottom: 30px;
    padding: 20px;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
}

.checkbox-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: 600;
    color: #856404;
}

.checkbox-container input[type="checkbox"] {
    margin-right: 10px;
    transform: scale(1.2);
}

/* 考试进行界面 */
.exam-container {
    display: none;
    min-height: 100vh;
    background: var(--servicenow-light-grey);
}

.exam-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    background: var(--servicenow-blue);
    color: white;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.exam-title {
    font-size: 1.3em;
    font-weight: 400;
}

.exam-timer {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.15);
    padding: 8px 20px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.timer-label {
    font-size: 0.85em;
    font-weight: 300;
}

.timer-display {
    font-size: 1.3em;
    font-weight: 600;
    font-family: 'Roboto Mono', 'Courier New', monospace;
    letter-spacing: 1px;
}

.timer-display.warning {
    color: var(--servicenow-orange);
    animation: pulse 1s infinite;
}

.timer-display.danger {
    color: var(--servicenow-red);
    animation: pulse 0.5s infinite;
}

.exam-progress {
    font-size: 1em;
    font-weight: 400;
}

/* Animation for timer warnings */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* ServiceNow-style buttons */
button {
    font-family: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 8px;
    padding: 12px 24px;
    font-weight: 600;
    font-size: 0.95em;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

button:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--servicenow-blue), #0052a3);
    color: white;
    box-shadow: 0 4px 16px rgba(0, 102, 204, 0.3);
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #0052a3, #003d7a);
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(0, 102, 204, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--servicenow-grey), #495057);
    color: white;
    box-shadow: 0 4px 16px rgba(90, 107, 115, 0.3);
}

.btn-secondary:hover:not(:disabled) {
    background: linear-gradient(135deg, #495057, #343a40);
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(90, 107, 115, 0.4);
}

.btn-warning {
    background: linear-gradient(135deg, var(--servicenow-orange), #e6850e);
    color: white;
    box-shadow: 0 4px 16px rgba(255, 149, 0, 0.3);
}

.btn-warning:hover:not(:disabled) {
    background: linear-gradient(135deg, #e6850e, #cc7300);
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(255, 149, 0, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, var(--servicenow-red), #cc001f);
    color: white;
    box-shadow: 0 4px 16px rgba(230, 0, 38, 0.3);
}

.btn-danger:hover:not(:disabled) {
    background: linear-gradient(135deg, #cc001f, #a60019);
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(230, 0, 38, 0.4);
}

.btn-info {
    background: linear-gradient(135deg, var(--servicenow-light-blue), #cce7ff);
    border: 2px solid var(--servicenow-blue);
    color: var(--servicenow-blue);
    box-shadow: 0 4px 16px rgba(0, 102, 204, 0.2);
}

.btn-info:hover:not(:disabled) {
    background: linear-gradient(135deg, #b3d9ff, #99ccff);
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(0, 102, 204, 0.3);
}

.btn-success {
    background: linear-gradient(135deg, var(--servicenow-green), #00a85a);
    color: white;
    box-shadow: 0 4px 16px rgba(0, 204, 115, 0.3);
}

.btn-success:hover:not(:disabled) {
    background: linear-gradient(135deg, #00a85a, #008a47);
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(0, 204, 115, 0.4);
}

/* Disabled button styles */
button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

button:disabled::before {
    display: none;
}

/* Button focus states for accessibility */
button:focus {
    outline: 2px solid var(--servicenow-blue);
    outline-offset: 2px;
}

button:focus:not(:focus-visible) {
    outline: none;
}

/* Navigation buttons with icons */
.btn-with-icon {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.btn-prev {
    padding-left: 16px;
    padding-right: 20px;
}

.btn-next {
    padding-left: 20px;
    padding-right: 16px;
}

.btn-icon {
    font-size: 1.2em;
    font-weight: bold;
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
}

.btn-text {
    font-weight: 600;
    transition: transform 0.3s ease;
}

/* Hover animations for navigation buttons */
.btn-prev:hover .btn-icon {
    transform: translateX(-3px);
    animation: slideLeft 0.6s ease infinite alternate;
}

.btn-next:hover .btn-icon {
    transform: translateX(3px);
    animation: slideRight 0.6s ease infinite alternate;
}

.btn-prev:hover .btn-text {
    transform: translateX(2px);
}

.btn-next:hover .btn-text {
    transform: translateX(-2px);
}

@keyframes slideLeft {
    0% { transform: translateX(-3px); }
    100% { transform: translateX(-6px); }
}

@keyframes slideRight {
    0% { transform: translateX(3px); }
    100% { transform: translateX(6px); }
}

/* Enhanced button styles */
.btn-with-icon:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 102, 204, 0.3);
}

.exam-progress-bar {
    height: 8px;
    background: #e9ecef;
    position: relative;
    overflow: visible;
}

.exam-progress-bar .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #28a745, #20c997);
    transition: width 0.3s ease;
}

.progress-markers {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.progress-marker {
    width: 3px;
    height: 16px;
    background: #6c757d;
    position: relative;
    top: -4px;
}

.progress-marker.current {
    background: #2196F3;
    height: 20px;
    top: -6px;
}

/* 题目导航 */
.question-navigator {
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.navigator-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    cursor: pointer;
    background: #e9ecef;
}

.navigator-header:hover {
    background: #dee2e6;
}

.nav-toggle {
    background: rgba(0, 102, 204, 0.1);
    border: 1px solid rgba(0, 102, 204, 0.2);
    border-radius: 6px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-toggle:hover {
    background: rgba(0, 102, 204, 0.15);
    border-color: rgba(0, 102, 204, 0.3);
    transform: scale(1.05);
}

.toggle-icon {
    font-size: 1.4em;
    font-weight: bold;
    color: var(--servicenow-blue);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    line-height: 1;
}

.nav-toggle.collapsed .toggle-icon {
    transform: rotate(-90deg);
}

.navigator-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 10px;
    padding: 20px 30px;
    max-height: 200px;
    overflow-y: auto;
    transition: max-height 0.3s ease;
}

.navigator-grid.collapsed {
    max-height: 0;
    padding: 0 30px;
    overflow: hidden;
}

.nav-question {
    width: 52px;
    height: 52px;
    border: 2px solid #dee2e6;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.nav-question::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s ease;
}

.nav-question:hover::before {
    left: 100%;
}

.nav-question:hover {
    border-color: var(--servicenow-blue);
    transform: scale(1.08) translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 102, 204, 0.3);
}

.nav-question.current {
    background: linear-gradient(145deg, var(--servicenow-blue), #0052a3);
    color: white;
    border-color: var(--servicenow-blue);
    box-shadow: 0 6px 20px rgba(0, 102, 204, 0.4);
}

.nav-question.answered {
    background: linear-gradient(145deg, var(--servicenow-green), #00a85a);
    color: white;
    border-color: var(--servicenow-green);
    box-shadow: 0 4px 16px rgba(0, 204, 115, 0.3);
}

.nav-question.flagged {
    background: linear-gradient(145deg, var(--servicenow-orange), #e6850e);
    color: white;
    border-color: var(--servicenow-orange);
    position: relative;
    animation: flagPulse 2s ease-in-out infinite;
}

@keyframes flagPulse {
    0%, 100% { box-shadow: 0 4px 16px rgba(255, 149, 0, 0.3); }
    50% { box-shadow: 0 6px 24px rgba(255, 149, 0, 0.5); }
}

.nav-question.flagged::after {
    content: "🚩";
    position: absolute;
    top: -5px;
    right: -5px;
    font-size: 0.7em;
}

/* 题目内容 */
.exam-question {
    padding: 30px;
    min-height: 500px;
}

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

.question-type {
    background: #2196F3;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9em;
}

.question-status {
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9em;
    border: 2px solid #dee2e6;
    color: #6c757d;
}

.question-status.answered {
    background: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

.question-status.flagged {
    background: #fff3cd;
    color: #856404;
    border-color: #ffeaa7;
}

.exam-question .question-text {
    font-size: 1.15em;
    line-height: 1.7;
    margin-bottom: 30px;
    color: #2c3e50;
    padding: 25px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 12px;
    border-left: 5px solid var(--servicenow-blue);
    box-shadow: 0 3px 12px rgba(0, 102, 204, 0.1);
}

.exam-question .options-container {
    margin-bottom: 25px;
}

.exam-question .option {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
    padding: 18px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(to right, #ffffff, #f8f9fa);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.exam-question .option:hover {
    border-color: var(--servicenow-blue);
    background: linear-gradient(to right, #e3f2fd, #f0f8ff);
    transform: translateX(5px);
    box-shadow: 0 4px 16px rgba(33, 150, 243, 0.15);
}

.exam-question .option.selected {
    border-color: var(--servicenow-blue);
    background: linear-gradient(to right, #e3f2fd, #f0f8ff);
    box-shadow: 0 4px 16px rgba(33, 150, 243, 0.2);
}

.exam-question .option input[type="radio"],
.exam-question .option input[type="checkbox"] {
    margin-right: 15px;
    margin-top: 3px;
    transform: scale(1.2);
}

.exam-question .option-text {
    flex: 1;
    line-height: 1.5;
    color: #212529;
}

.question-notes {
    margin-top: 25px;
}

.question-notes textarea {
    width: 100%;
    min-height: 80px;
    padding: 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    resize: vertical;
    font-family: inherit;
    font-size: 14px;
}

.question-notes textarea:focus {
    outline: none;
    border-color: #2196F3;
}

/* 考试导航 */
.exam-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    position: sticky;
    bottom: 0;
}

.nav-left, .nav-right {
    display: flex;
    gap: 15px;
}

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

/* 考试概览界面 */
.exam-overview {
    display: none;
    padding: 30px;
    background: white;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    z-index: 1000;
}

.overview-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e9ecef;
}

.overview-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 20px;
}

.stat-item {
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 0.9em;
    color: #6c757d;
    margin-bottom: 5px;
}

.stat-value {
    display: block;
    font-size: 2em;
    font-weight: 700;
    color: #2196F3;
}

.overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.overview-question {
    width: 60px;
    height: 60px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    background: white;
    position: relative;
}

.overview-question:hover {
    transform: scale(1.1);
}

.overview-question.answered {
    background: #28a745;
    color: white;
    border-color: #28a745;
}

.overview-question.flagged::after {
    content: "🚩";
    position: absolute;
    top: -8px;
    right: -8px;
    font-size: 0.8em;
}

.overview-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
}

/* 考试结果界面 */
.exam-results {
    display: none;
    padding: 30px;
}

.results-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 102, 204, 0.1);
    position: relative;
    overflow: hidden;
}

.results-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--servicenow-blue), var(--servicenow-green), var(--servicenow-blue));
}

.exam-score {
    font-size: 5em;
    font-weight: 800;
    margin: 25px 0;
    background: linear-gradient(135deg, var(--servicenow-green), #00a85a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: scoreCountUp 2s ease-out;
    text-shadow: 0 4px 8px rgba(0, 204, 115, 0.3);
}

.exam-score.fail {
    background: linear-gradient(135deg, var(--servicenow-red), #cc001f);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 4px 8px rgba(230, 0, 38, 0.3);
}

@keyframes scoreCountUp {
    from {
        transform: scale(0.5);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.pass-status {
    font-size: 1.6em;
    font-weight: 700;
    padding: 20px 40px;
    border-radius: 30px;
    display: inline-block;
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #155724;
    box-shadow: 0 6px 20px rgba(21, 87, 36, 0.2);
    animation: statusSlideIn 1s ease-out 0.5s both;
}

.pass-status.fail {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    color: #721c24;
    box-shadow: 0 6px 20px rgba(114, 28, 36, 0.2);
}

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

.results-details {
    margin-bottom: 40px;
}

.score-breakdown {
    margin-bottom: 30px;
}

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

.breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #6c757d;
}

.breakdown-item.correct {
    border-left-color: #28a745;
}

.breakdown-item.wrong {
    border-left-color: #dc3545;
}

.breakdown-label {
    font-weight: 600;
    color: #495057;
}

.breakdown-value {
    font-size: 1.5em;
    font-weight: 700;
    color: #2196F3;
}

.performance-analysis {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
}

.analysis-chart {
    height: 200px;
    background: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    margin-top: 20px;
}

.results-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

/* 答案解析界面 */
.exam-review {
    display: none;
    padding: 30px;
}

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

.review-filters {
    display: flex;
    gap: 10px;
}

.filter-btn {
    padding: 10px 20px;
    border: 2px solid #dee2e6;
    background: white;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    border-color: #2196F3;
}

.filter-btn.active {
    background: #2196F3;
    color: white;
    border-color: #2196F3;
}

.review-content {
    margin-bottom: 30px;
}

.review-question {
    margin-bottom: 30px;
    padding: 25px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    background: white;
}

.review-question.wrong {
    border-left: 4px solid #dc3545;
    background: #fff5f5;
}

.review-question.correct {
    border-left: 4px solid #28a745;
    background: #f0fff4;
}

.review-question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.review-question-number {
    font-weight: 700;
    color: #495057;
}

.review-result {
    padding: 5px 15px;
    border-radius: 15px;
    font-weight: 600;
    font-size: 0.9em;
}

.review-result.correct {
    background: #d4edda;
    color: #155724;
}

.review-result.wrong {
    background: #f8d7da;
    color: #721c24;
}

.review-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
}

/* 模态框 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-dialog {
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    max-width: 500px;
    width: 90%;
}

.modal-content {
    padding: 30px;
    text-align: center;
}

.modal-content h3 {
    margin-bottom: 15px;
    color: #495057;
}

.modal-content p {
    margin-bottom: 25px;
    color: #6c757d;
    line-height: 1.5;
}

.modal-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .exam-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .exam-navigation {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav-left, .nav-center, .nav-right {
        justify-content: center;
    }
    
    .overview-stats {
        flex-direction: column;
        gap: 15px;
    }
    
    .results-actions, .review-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .results-actions button, .review-actions button {
        width: 100%;
        max-width: 300px;
    }
}

/* 打印样式 */
@media print {
    .exam-header, .exam-navigation, .question-navigator {
        display: none !important;
    }
    
    .exam-container {
        display: block !important;
    }
    
    .exam-question {
        break-inside: avoid;
    }
}
