/* 全局模态框样式 */
.global-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(4px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.global-modal {
    background: linear-gradient(145deg, #1e293b, #0f172a);
    border-radius: 24px;
    width: 90%;
    max-width: 420px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 215, 0, 0.3);
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-header {
    padding: 20px 24px 12px 24px;
    border-bottom: 1px solid rgba(255, 215, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
}

.modal-icon {
    font-size: 28px;
}

.modal-header h3 {
    flex: 1;
    color: #ffd700;
    font-size: 20px;
    font-weight: bold;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.modal-close:hover {
    background: rgba(255, 215, 0, 0.2);
    color: #ffd700;
}

.modal-body {
    padding: 20px 24px;
    color: #cbd5e1;
    line-height: 1.6;
}

.modal-footer {
    padding: 12px 24px 24px 24px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.modal-btn {
    padding: 10px 24px;
    border: none;
    border-radius: 40px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}

.modal-btn-primary {
    background: #ffd700;
    color: #1e293b;
}

.modal-btn-primary:hover {
    background: #f59e0b;
    transform: translateY(-2px);
}

.modal-btn-secondary {
    background: #334155;
    color: white;
}

.modal-btn-secondary:hover {
    background: #475569;
    transform: translateY(-2px);
}

.modal-btn-danger {
    background: #ef4444;
    color: white;
}

.modal-btn-danger:hover {
    background: #dc2626;
}

/* 测试结果模态框专用样式 */
.test-result-modal {
    max-width: 380px;
}

.test-result-content {
    text-align: center;
}

.final-rank-display {
    margin-bottom: 24px;
}

.final-rank-label {
    display: block;
    font-size: 14px;
    color: #94a3b8;
    margin-bottom: 8px;
}

.final-rank-value {
    display: block;
    font-size: 48px;
    font-weight: bold;
    color: #ffd700;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.rank-stars {
    margin-top: 8px;
    font-size: 20px;
    color: #ffd700;
}

.test-stats {
    display: flex;
    justify-content: space-around;
    gap: 16px;
    margin-top: 16px;
}

.stat-item {
    flex: 1;
    text-align: center;
    padding: 12px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
}

.stat-icon {
    display: block;
    font-size: 20px;
    margin-bottom: 4px;
}

.stat-label {
    display: block;
    font-size: 12px;
    color: #94a3b8;
    margin-bottom: 4px;
}

.stat-value {
    display: block;
    font-size: 24px;
    font-weight: bold;
}

.stat-value.correct {
    color: #22c55e;
}

.stat-value.wrong {
    color: #ef4444;
}

/* 响应式 */
@media (max-width: 480px) {
    .global-modal {
        width: 95%;
    }
    
    .test-stats {
        gap: 8px;
    }
    
    .stat-item {
        padding: 8px;
    }
    
    .stat-value {
        font-size: 20px;
    }
    
    .modal-btn {
        padding: 8px 16px;
        font-size: 13px;
    }
}