/**
 * WordPress Exam Plugin - Public Styles
 * 完整的全局样式系统，支持响应式和深色模式
 */

/* ==========================================================================
   1. CSS Variables / Design Tokens
   ========================================================================== */
:root {
    /* Primary Colors */
    --wp-exam-primary: #2271b1;
    --wp-exam-primary-hover: #135e96;
    --wp-exam-primary-light: #f0f6fc;
    --wp-exam-primary-dark: #0a4b7e;
    
    /* Secondary Colors */
    --wp-exam-secondary: #5048e5;
    --wp-exam-secondary-hover: #3730a3;
    --wp-exam-secondary-light: #eef2ff;
    
    /* Success Colors */
    --wp-exam-success: #22c55e;
    --wp-exam-success-hover: #16a34a;
    --wp-exam-success-light: #dcfce7;
    --wp-exam-success-dark: #15803d;
    
    /* Warning Colors */
    --wp-exam-warning: #f59e0b;
    --wp-exam-warning-hover: #d97706;
    --wp-exam-warning-light: #fef3c7;
    --wp-exam-warning-dark: #b45309;
    
    /* Error Colors */
    --wp-exam-error: #ef4444;
    --wp-exam-error-hover: #dc2626;
    --wp-exam-error-light: #fee2e2;
    --wp-exam-error-dark: #b91c1c;
    
    /* Neutral Colors */
    --wp-exam-text: #1f2937;
    --wp-exam-text-secondary: #6b7280;
    --wp-exam-text-muted: #9ca3af;
    --wp-exam-border: #e5e7eb;
    --wp-exam-border-light: #f3f4f6;
    --wp-exam-bg: #ffffff;
    --wp-exam-bg-secondary: #f9fafb;
    --wp-exam-bg-tertiary: #f3f4f6;
    
    /* Shadows */
    --wp-exam-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --wp-exam-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    --wp-exam-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --wp-exam-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --wp-exam-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    
    /* Border Radius */
    --wp-exam-radius-sm: 4px;
    --wp-exam-radius: 8px;
    --wp-exam-radius-md: 12px;
    --wp-exam-radius-lg: 16px;
    --wp-exam-radius-full: 9999px;
    
    /* Spacing */
    --wp-exam-space-1: 4px;
    --wp-exam-space-2: 8px;
    --wp-exam-space-3: 12px;
    --wp-exam-space-4: 16px;
    --wp-exam-space-5: 20px;
    --wp-exam-space-6: 24px;
    --wp-exam-space-8: 32px;
    --wp-exam-space-10: 40px;
    --wp-exam-space-12: 48px;
    --wp-exam-space-16: 64px;
    
    /* Typography */
    --wp-exam-font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    --wp-exam-font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    --wp-exam-font-size-xs: 0.75rem;
    --wp-exam-font-size-sm: 0.875rem;
    --wp-exam-font-size-base: 1rem;
    --wp-exam-font-size-lg: 1.125rem;
    --wp-exam-font-size-xl: 1.25rem;
    --wp-exam-font-size-2xl: 1.5rem;
    --wp-exam-font-size-3xl: 1.875rem;
    --wp-exam-font-size-4xl: 2.25rem;
    
    /* Transitions */
    --wp-exam-transition-fast: 150ms ease;
    --wp-exam-transition: 200ms ease;
    --wp-exam-transition-slow: 300ms ease;
    --wp-exam-transition-bounce: 300ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Dark Mode Variables */
@media (prefers-color-scheme: dark) {
    :root {
        --wp-exam-text: #f3f4f6;
        --wp-exam-text-secondary: #d1d5db;
        --wp-exam-text-muted: #9ca3af;
        --wp-exam-border: #374151;
        --wp-exam-border-light: #4b5563;
        --wp-exam-bg: #1f2937;
        --wp-exam-bg-secondary: #111827;
        --wp-exam-bg-tertiary: #374151;
        
        --wp-exam-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
        --wp-exam-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.4), 0 1px 2px -1px rgba(0, 0, 0, 0.3);
        --wp-exam-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
        --wp-exam-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -4px rgba(0, 0, 0, 0.3);
        --wp-exam-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
    }
}

/* ==========================================================================
   2. Base / Reset Styles
   ========================================================================== */
.wp-exam-container {
    font-family: var(--wp-exam-font-sans);
    font-size: var(--wp-exam-font-size-base);
    line-height: 1.6;
    color: var(--wp-exam-text);
    background-color: var(--wp-exam-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.wp-exam-container *,
.wp-exam-container *::before,
.wp-exam-container *::after {
    box-sizing: border-box;
}

/* ==========================================================================
   3. Exam List Styles
   ========================================================================== */
.wp-exam-list {
    margin: var(--wp-exam-space-6) 0;
    display: grid;
    gap: var(--wp-exam-space-5);
}

.wp-exam-item {
    background: var(--wp-exam-bg);
    border: 1px solid var(--wp-exam-border);
    border-radius: var(--wp-exam-radius-md);
    padding: var(--wp-exam-space-6);
    box-shadow: var(--wp-exam-shadow-sm);
    transition: all var(--wp-exam-transition);
    position: relative;
    overflow: hidden;
}

.wp-exam-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--wp-exam-primary);
    opacity: 0;
    transition: opacity var(--wp-exam-transition);
}

.wp-exam-item:hover {
    border-color: var(--wp-exam-primary);
    box-shadow: var(--wp-exam-shadow-md);
    transform: translateY(-2px);
}

.wp-exam-item:hover::before {
    opacity: 1;
}

.wp-exam-item h3 {
    margin: 0 0 var(--wp-exam-space-3) 0;
    color: var(--wp-exam-text);
    font-size: var(--wp-exam-font-size-xl);
    font-weight: 600;
}

.wp-exam-item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--wp-exam-space-4);
    margin-bottom: var(--wp-exam-space-4);
    font-size: var(--wp-exam-font-size-sm);
    color: var(--wp-exam-text-secondary);
}

.wp-exam-item-meta span {
    display: inline-flex;
    align-items: center;
    gap: var(--wp-exam-space-1);
}

.wp-exam-item-meta svg {
    width: 16px;
    height: 16px;
}

.wp-exam-item-description {
    color: var(--wp-exam-text-secondary);
    margin-bottom: var(--wp-exam-space-5);
    line-height: 1.7;
}

/* ==========================================================================
   4. Button Styles
   ========================================================================== */
.wp-exam-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--wp-exam-space-2);
    padding: var(--wp-exam-space-3) var(--wp-exam-space-5);
    font-family: inherit;
    font-size: var(--wp-exam-font-size-sm);
    font-weight: 500;
    line-height: 1.5;
    text-decoration: none;
    border: none;
    border-radius: var(--wp-exam-radius);
    cursor: pointer;
    transition: all var(--wp-exam-transition);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.wp-exam-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.3);
}

.wp-exam-btn:focus-visible {
    box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.5);
}

/* Primary Button */
.wp-exam-btn-primary {
    background: var(--wp-exam-primary);
    color: #ffffff;
}

.wp-exam-btn-primary:hover {
    background: var(--wp-exam-primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--wp-exam-shadow-md);
}

.wp-exam-btn-primary:active {
    transform: translateY(0);
    box-shadow: var(--wp-exam-shadow-sm);
}

/* Secondary Button */
.wp-exam-btn-secondary {
    background: var(--wp-exam-bg-tertiary);
    color: var(--wp-exam-text);
    border: 1px solid var(--wp-exam-border);
}

.wp-exam-btn-secondary:hover {
    background: var(--wp-exam-border);
    border-color: var(--wp-exam-border-light);
}

/* Success Button */
.wp-exam-btn-success {
    background: var(--wp-exam-success);
    color: #ffffff;
}

.wp-exam-btn-success:hover {
    background: var(--wp-exam-success-hover);
    transform: translateY(-1px);
    box-shadow: var(--wp-exam-shadow-md);
}

/* Danger Button */
.wp-exam-btn-danger {
    background: var(--wp-exam-error);
    color: #ffffff;
}

.wp-exam-btn-danger:hover {
    background: var(--wp-exam-error-hover);
    transform: translateY(-1px);
    box-shadow: var(--wp-exam-shadow-md);
}

/* Button Sizes */
.wp-exam-btn-sm {
    padding: var(--wp-exam-space-2) var(--wp-exam-space-3);
    font-size: var(--wp-exam-font-size-xs);
}

.wp-exam-btn-lg {
    padding: var(--wp-exam-space-4) var(--wp-exam-space-8);
    font-size: var(--wp-exam-font-size-base);
}

/* Button Loading State */
.wp-exam-btn.is-loading {
    color: transparent;
    pointer-events: none;
}

.wp-exam-btn.is-loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-top: -8px;
    margin-left: -8px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: wp-exam-spin 0.6s linear infinite;
}

.wp-exam-btn-primary.is-loading::after {
    border-color: #ffffff;
    border-right-color: transparent;
}

/* ==========================================================================
   5. Exam Attempt / Quiz Container
   ========================================================================== */
.wp-exam-attempt {
    background: var(--wp-exam-bg);
    border: 1px solid var(--wp-exam-border);
    border-radius: var(--wp-exam-radius-lg);
    padding: var(--wp-exam-space-8);
    box-shadow: var(--wp-exam-shadow);
}

.wp-exam-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--wp-exam-space-4);
    padding-bottom: var(--wp-exam-space-6);
    border-bottom: 1px solid var(--wp-exam-border);
    margin-bottom: var(--wp-exam-space-6);
}

.wp-exam-title {
    font-size: var(--wp-exam-font-size-2xl);
    font-weight: 700;
    color: var(--wp-exam-text);
    margin: 0;
}

/* Timer */
.wp-exam-timer {
    display: flex;
    align-items: center;
    gap: var(--wp-exam-space-2);
    font-size: var(--wp-exam-font-size-xl);
    font-weight: 700;
    color: var(--wp-exam-text);
    background: var(--wp-exam-bg-tertiary);
    padding: var(--wp-exam-space-3) var(--wp-exam-space-5);
    border-radius: var(--wp-exam-radius-full);
    transition: all var(--wp-exam-transition);
}

.wp-exam-timer svg {
    width: 20px;
    height: 20px;
}

.wp-exam-timer.is-warning {
    background: var(--wp-exam-warning-light);
    color: var(--wp-exam-warning-dark);
}

.wp-exam-timer.is-danger {
    background: var(--wp-exam-error-light);
    color: var(--wp-exam-error);
    animation: wp-exam-pulse 1s ease-in-out infinite;
}

/* Progress Bar */
.wp-exam-progress {
    margin-bottom: var(--wp-exam-space-6);
}

.wp-exam-progress-bar {
    height: 8px;
    background: var(--wp-exam-bg-tertiary);
    border-radius: var(--wp-exam-radius-full);
    overflow: hidden;
}

.wp-exam-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--wp-exam-primary), var(--wp-exam-secondary));
    border-radius: var(--wp-exam-radius-full);
    transition: width var(--wp-exam-transition-slow);
    position: relative;
}

.wp-exam-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: wp-exam-shimmer 2s infinite;
}

.wp-exam-progress-text {
    display: flex;
    justify-content: space-between;
    margin-top: var(--wp-exam-space-2);
    font-size: var(--wp-exam-font-size-sm);
    color: var(--wp-exam-text-secondary);
}

/* ==========================================================================
   6. Question Styles
   ========================================================================== */
.wp-exam-question {
    background: var(--wp-exam-bg);
    border: 1px solid var(--wp-exam-border);
    border-radius: var(--wp-exam-radius-md);
    padding: var(--wp-exam-space-6);
    margin-bottom: var(--wp-exam-space-5);
    transition: all var(--wp-exam-transition);
    position: relative;
}

.wp-exam-question:hover {
    border-color: var(--wp-exam-primary-light);
    box-shadow: var(--wp-exam-shadow-sm);
}

.wp-exam-question.is-answered {
    border-left: 3px solid var(--wp-exam-success);
}

.wp-exam-question-number {
    position: absolute;
    top: var(--wp-exam-space-4);
    right: var(--wp-exam-space-4);
    background: var(--wp-exam-bg-tertiary);
    padding: var(--wp-exam-space-1) var(--wp-exam-space-3);
    border-radius: var(--wp-exam-radius-full);
    font-size: var(--wp-exam-font-size-sm);
    font-weight: 600;
    color: var(--wp-exam-text-secondary);
}

.wp-exam-question-text {
    font-size: var(--wp-exam-font-size-lg);
    font-weight: 600;
    color: var(--wp-exam-text);
    margin-bottom: var(--wp-exam-space-5);
    padding-right: var(--wp-exam-space-12);
    line-height: 1.5;
}

/* Options */
.wp-exam-options {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: var(--wp-exam-space-3);
}

.wp-exam-options li {
    margin: 0;
}

.wp-exam-option {
    display: flex;
    align-items: flex-start;
    gap: var(--wp-exam-space-3);
    padding: var(--wp-exam-space-4);
    background: var(--wp-exam-bg-secondary);
    border: 2px solid var(--wp-exam-border);
    border-radius: var(--wp-exam-radius);
    cursor: pointer;
    transition: all var(--wp-exam-transition);
    position: relative;
}

.wp-exam-option:hover {
    background: var(--wp-exam-primary-light);
    border-color: var(--wp-exam-primary);
}

.wp-exam-option.is-selected {
    background: var(--wp-exam-primary-light);
    border-color: var(--wp-exam-primary);
}

.wp-exam-option input[type="radio"],
.wp-exam-option input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.wp-exam-option-indicator {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border: 2px solid var(--wp-exam-border);
    border-radius: 50%;
    background: var(--wp-exam-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--wp-exam-transition);
}

.wp-exam-option-indicator::after {
    content: '';
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--wp-exam-primary);
    transform: scale(0);
    transition: transform var(--wp-exam-transition-bounce);
}

.wp-exam-option.is-selected .wp-exam-option-indicator {
    border-color: var(--wp-exam-primary);
    background: var(--wp-exam-primary);
}

.wp-exam-option.is-selected .wp-exam-option-indicator::after {
    transform: scale(1);
    background: #ffffff;
}

.wp-exam-option-label {
    flex: 1;
    cursor: pointer;
    color: var(--wp-exam-text);
    line-height: 1.5;
    padding-top: 1px;
}

.wp-exam-option:hover .wp-exam-option-indicator {
    border-color: var(--wp-exam-primary);
}

/* ==========================================================================
   7. Form Styles
   ========================================================================== */
.wp-exam-form-group {
    margin-bottom: var(--wp-exam-space-5);
}

.wp-exam-form-label {
    display: block;
    margin-bottom: var(--wp-exam-space-2);
    font-size: var(--wp-exam-font-size-sm);
    font-weight: 500;
    color: var(--wp-exam-text);
}

.wp-exam-form-input,
.wp-exam-form-textarea,
.wp-exam-form-select {
    width: 100%;
    padding: var(--wp-exam-space-3) var(--wp-exam-space-4);
    font-family: inherit;
    font-size: var(--wp-exam-font-size-base);
    color: var(--wp-exam-text);
    background: var(--wp-exam-bg);
    border: 1px solid var(--wp-exam-border);
    border-radius: var(--wp-exam-radius);
    transition: all var(--wp-exam-transition);
}

.wp-exam-form-input:hover,
.wp-exam-form-textarea:hover,
.wp-exam-form-select:hover {
    border-color: var(--wp-exam-text-muted);
}

.wp-exam-form-input:focus,
.wp-exam-form-textarea:focus,
.wp-exam-form-select:focus {
    outline: none;
    border-color: var(--wp-exam-primary);
    box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.2);
}

.wp-exam-form-input.is-error,
.wp-exam-form-textarea.is-error,
.wp-exam-form-select.is-error {
    border-color: var(--wp-exam-error);
}

.wp-exam-form-input.is-error:focus,
.wp-exam-form-textarea.is-error:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

.wp-exam-form-input.is-valid,
.wp-exam-form-textarea.is-valid {
    border-color: var(--wp-exam-success);
}

.wp-exam-form-error {
    display: flex;
    align-items: center;
    gap: var(--wp-exam-space-1);
    margin-top: var(--wp-exam-space-2);
    font-size: var(--wp-exam-font-size-sm);
    color: var(--wp-exam-error);
}

.wp-exam-form-error svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* ==========================================================================
   8. Result Styles
   ========================================================================== */
.wp-exam-result {
    text-align: center;
    padding: var(--wp-exam-space-10);
    background: var(--wp-exam-bg);
    border: 1px solid var(--wp-exam-border);
    border-radius: var(--wp-exam-radius-lg);
    box-shadow: var(--wp-exam-shadow);
}

.wp-exam-result-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--wp-exam-space-6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: wp-exam-bounce-in 0.6s ease;
}

.wp-exam-result-icon.is-success {
    background: var(--wp-exam-success-light);
    color: var(--wp-exam-success);
}

.wp-exam-result-icon.is-fail {
    background: var(--wp-exam-error-light);
    color: var(--wp-exam-error);
}

.wp-exam-result-icon svg {
    width: 40px;
    height: 40px;
}

.wp-exam-result h2 {
    font-size: var(--wp-exam-font-size-3xl);
    font-weight: 700;
    color: var(--wp-exam-text);
    margin: 0 0 var(--wp-exam-space-4);
}

.wp-exam-score {
    font-size: var(--wp-exam-font-size-4xl);
    font-weight: 800;
    margin: var(--wp-exam-space-6) 0;
    line-height: 1;
}

.wp-exam-score.is-pass {
    color: var(--wp-exam-success);
}

.wp-exam-score.is-fail {
    color: var(--wp-exam-error);
}

.wp-exam-score-text {
    font-size: var(--wp-exam-font-size-base);
    color: var(--wp-exam-text-secondary);
    margin-bottom: var(--wp-exam-space-6);
}

.wp-exam-result-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: var(--wp-exam-space-4);
    margin: var(--wp-exam-space-8) 0;
    padding: var(--wp-exam-space-6);
    background: var(--wp-exam-bg-secondary);
    border-radius: var(--wp-exam-radius);
}

.wp-exam-result-stat {
    text-align: center;
}

.wp-exam-result-stat-value {
    font-size: var(--wp-exam-font-size-2xl);
    font-weight: 700;
    color: var(--wp-exam-primary);
}

.wp-exam-result-stat-label {
    font-size: var(--wp-exam-font-size-sm);
    color: var(--wp-exam-text-secondary);
}

/* ==========================================================================
   9. Toast / Notification Styles
   ========================================================================== */
.wp-exam-toast-container {
    position: fixed;
    top: var(--wp-exam-space-5);
    right: var(--wp-exam-space-5);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: var(--wp-exam-space-3);
    pointer-events: none;
}

.wp-exam-toast {
    display: flex;
    align-items: flex-start;
    gap: var(--wp-exam-space-3);
    padding: var(--wp-exam-space-4) var(--wp-exam-space-5);
    background: var(--wp-exam-bg);
    border: 1px solid var(--wp-exam-border);
    border-radius: var(--wp-exam-radius);
    box-shadow: var(--wp-exam-shadow-lg);
    min-width: 300px;
    max-width: 420px;
    pointer-events: auto;
    animation: wp-exam-slide-in-right 0.3s ease;
}

.wp-exam-toast.is-hiding {
    animation: wp-exam-slide-out-right 0.3s ease forwards;
}

.wp-exam-toast-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wp-exam-toast-icon svg {
    width: 14px;
    height: 14px;
}

.wp-exam-toast.is-success .wp-exam-toast-icon {
    background: var(--wp-exam-success);
    color: #ffffff;
}

.wp-exam-toast.is-error .wp-exam-toast-icon {
    background: var(--wp-exam-error);
    color: #ffffff;
}

.wp-exam-toast.is-warning .wp-exam-toast-icon {
    background: var(--wp-exam-warning);
    color: #ffffff;
}

.wp-exam-toast.is-info .wp-exam-toast-icon {
    background: var(--wp-exam-primary);
    color: #ffffff;
}

.wp-exam-toast-content {
    flex: 1;
}

.wp-exam-toast-title {
    font-weight: 600;
    color: var(--wp-exam-text);
    margin-bottom: var(--wp-exam-space-1);
}

.wp-exam-toast-message {
    font-size: var(--wp-exam-font-size-sm);
    color: var(--wp-exam-text-secondary);
    line-height: 1.5;
}

.wp-exam-toast-close {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    padding: 0;
    background: none;
    border: none;
    color: var(--wp-exam-text-muted);
    cursor: pointer;
    border-radius: var(--wp-exam-radius-sm);
    transition: all var(--wp-exam-transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.wp-exam-toast-close:hover {
    background: var(--wp-exam-bg-tertiary);
    color: var(--wp-exam-text);
}

.wp-exam-toast-close svg {
    width: 16px;
    height: 16px;
}

/* ==========================================================================
   10. Loading / Skeleton Styles
   ========================================================================== */
.wp-exam-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    border-radius: inherit;
}

@media (prefers-color-scheme: dark) {
    .wp-exam-loading-overlay {
        background: rgba(31, 41, 55, 0.8);
    }
}

.wp-exam-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--wp-exam-border);
    border-top-color: var(--wp-exam-primary);
    border-radius: 50%;
    animation: wp-exam-spin 0.8s linear infinite;
}

.wp-exam-skeleton {
    background: linear-gradient(
        90deg,
        var(--wp-exam-bg-tertiary) 25%,
        var(--wp-exam-border-light) 50%,
        var(--wp-exam-bg-tertiary) 75%
    );
    background-size: 200% 100%;
    animation: wp-exam-skeleton-loading 1.5s ease infinite;
    border-radius: var(--wp-exam-radius-sm);
}

.wp-exam-skeleton-text {
    height: 16px;
    margin-bottom: var(--wp-exam-space-2);
}

.wp-exam-skeleton-text:last-child {
    width: 60%;
}

.wp-exam-skeleton-title {
    height: 24px;
    width: 40%;
    margin-bottom: var(--wp-exam-space-4);
}

/* ==========================================================================
   11. Animations
   ========================================================================== */
@keyframes wp-exam-spin {
    to { transform: rotate(360deg); }
}

@keyframes wp-exam-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes wp-exam-shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

@keyframes wp-exam-bounce-in {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes wp-exam-slide-in-right {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes wp-exam-slide-out-right {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

@keyframes wp-exam-skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@keyframes wp-exam-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes wp-exam-fade-in-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wp-exam-fade-in {
    animation: wp-exam-fade-in 0.3s ease;
}

.wp-exam-fade-in-up {
    animation: wp-exam-fade-in-up 0.4s ease;
}

/* ==========================================================================
   12. Responsive Design
   ========================================================================== */

/* Tablet - 768px to 1024px */
@media (max-width: 1024px) {
    .wp-exam-attempt {
        padding: var(--wp-exam-space-6);
    }
    
    .wp-exam-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .wp-exam-timer {
        align-self: flex-end;
    }
}

/* Mobile - Up to 768px */
@media (max-width: 768px) {
    :root {
        --wp-exam-space-6: 16px;
        --wp-exam-space-8: 24px;
        --wp-exam-space-10: 32px;
    }
    
    .wp-exam-attempt {
        padding: var(--wp-exam-space-4);
        border-radius: var(--wp-exam-radius);
    }
    
    .wp-exam-title {
        font-size: var(--wp-exam-font-size-xl);
    }
    
    .wp-exam-timer {
        font-size: var(--wp-exam-font-size-base);
        padding: var(--wp-exam-space-2) var(--wp-exam-space-4);
    }
    
    .wp-exam-question {
        padding: var(--wp-exam-space-4);
    }
    
    .wp-exam-question-text {
        font-size: var(--wp-exam-font-size-base);
        padding-right: var(--wp-exam-space-8);
    }
    
    .wp-exam-question-number {
        top: var(--wp-exam-space-2);
        right: var(--wp-exam-space-2);
        font-size: var(--wp-exam-font-size-xs);
        padding: 2px var(--wp-exam-space-2);
    }
    
    .wp-exam-option {
        padding: var(--wp-exam-space-3);
    }
    
    .wp-exam-option-indicator {
        width: 20px;
        height: 20px;
    }
    
    .wp-exam-option-indicator::after {
        width: 8px;
        height: 8px;
    }
    
    .wp-exam-btn {
        width: 100%;
        justify-content: center;
    }
    
    .wp-exam-item {
        padding: var(--wp-exam-space-4);
    }
    
    .wp-exam-item h3 {
        font-size: var(--wp-exam-font-size-lg);
    }
    
    .wp-exam-result {
        padding: var(--wp-exam-space-6);
    }
    
    .wp-exam-score {
        font-size: var(--wp-exam-font-size-3xl);
    }
    
    .wp-exam-result-details {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .wp-exam-toast-container {
        left: var(--wp-exam-space-3);
        right: var(--wp-exam-space-3);
    }
    
    .wp-exam-toast {
        min-width: auto;
        max-width: none;
    }
}

/* Small Mobile - Up to 480px */
@media (max-width: 480px) {
    .wp-exam-item-meta {
        flex-direction: column;
        gap: var(--wp-exam-space-2);
    }
    
    .wp-exam-progress-text {
        flex-direction: column;
        gap: var(--wp-exam-space-1);
        align-items: flex-start;
    }
    
    .wp-exam-result-icon {
        width: 60px;
        height: 60px;
    }
    
    .wp-exam-result-icon svg {
        width: 30px;
        height: 30px;
    }
}

/* ==========================================================================
   13. Accessibility
   ========================================================================== */
@media (preduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

.wp-exam-btn:focus-visible,
.wp-exam-option:focus-within {
    outline: 2px solid var(--wp-exam-primary);
    outline-offset: 2px;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --wp-exam-border: #000000;
        --wp-exam-text: #000000;
        --wp-exam-bg: #ffffff;
    }
}

/* ==========================================================================
   14. Print Styles
   ========================================================================== */
@media print {
    .wp-exam-btn,
    .wp-exam-timer,
    .wp-exam-progress {
        display: none !important;
    }
    
    .wp-exam-attempt,
    .wp-exam-question {
        box-shadow: none !important;
        border: 1px solid #000 !important;
    }
    
    .wp-exam-option {
        border: 1px solid #000 !important;
        background: none !important;
    }
}
