/* 通用模态框样式 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    backdrop-filter: blur(2px);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    border-radius: 16px;
    padding: 32px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    transform: scale(0.9) translateY(-20px);
    transition: transform 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-overlay.active .modal-content {
    transform: scale(1) translateY(0);
}

/* 模态框图标 */
.modal-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 32px;
}

.modal-icon.success {
    background-color: #d1fae5;
    color: #059669;
}

.modal-icon.error {
    background-color: #fee2e2;
    color: #dc2626;
}

.modal-icon.warning {
    background-color: #fef3c7;
    color: #d97706;
}

.modal-icon.info {
    background-color: #dbeafe;
    color: #2563eb;
}

.modal-icon.confirm {
    background-color: #e0e7ff;
    color: #4f46e5;
}

/* 模态框标题 */
.modal-title {
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 12px;
}

/* 模态框消息 */
.modal-message {
    font-size: 15px;
    color: #6b7280;
    margin-bottom: 24px;
    line-height: 1.5;
}

/* 模态框按钮容器 */
.modal-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

/* 模态框按钮 */
.modal-btn {
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    outline: none;
}

.modal-btn:active {
    transform: scale(0.98);
}

.modal-btn-primary {
    background-color: #7c3aed;
    color: white;
}

.modal-btn-primary:hover {
    background-color: #6d28d9;
}

.modal-btn-secondary {
    background-color: #e5e7eb;
    color: #374151;
}

.modal-btn-secondary:hover {
    background-color: #d1d5db;
}

.modal-btn-danger {
    background-color: #dc2626;
    color: white;
}

.modal-btn-danger:hover {
    background-color: #b91c1c;
}

/* 关闭按钮 */
.modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #f3f4f6;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    transition: all 0.2s ease;
    font-size: 18px;
}

.modal-close:hover {
    background-color: #e5e7eb;
    color: #1f2937;
}

/* 模态框容器需要 relative 定位来支持关闭按钮 */
.modal-container {
    position: relative;
}
