/* 模态框样式 */

.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

/* 确认框样式 */
.modal.confirm {
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1001;
}

.modal.confirm .modal-content {
    background: linear-gradient(145deg, #1e293b, #0f172a);
    margin: auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 420px;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 
                0 0 0 1px rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: modalFadeIn 0.25s cubic-bezier(0.33, 1, 0.68, 1);
    overflow: hidden;
}

.modal.confirm .modal-header {
    background: linear-gradient(145deg, #1e293b, #0f172a);
    color: #f1f5f9;
    padding: 1.1rem 1.3rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.modal.confirm .modal-header h2 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.modal.confirm .modal-body {
    padding: 1.5rem 1.3rem;
    color: #e2e8f0;
    font-size: 1rem;
    line-height: 1.6;
    text-align: center;
}

.modal.confirm .modal-footer {
    padding: 1rem 1.3rem;
    background-color: rgba(30, 41, 59, 0.7);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* 提示框基础样式 */
.modal.notification {
    top: 25px;
    left: auto;
    right: 25px;
    width: auto;
    height: auto;
    background-color: transparent;
    z-index: 1002;
    display: block;
    align-items: unset;
    justify-content: unset;
    pointer-events: none;
}

.modal.notification .modal-content {
    background: linear-gradient(135deg, #1e3a8a, #1e40af);
    color: white;
    margin: 0 0 12px 0;
    padding: 0;
    border-radius: 10px;
    width: 320px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2),
                0 0 0 1px rgba(255, 255, 255, 0.05);
    animation: toastSlideIn 0.3s cubic-bezier(0.21, 1.02, 0.73, 1);
    position: relative;
    pointer-events: auto;
    border-left: 3px solid #3b82f6;
    transition: all 0.3s ease;
    overflow: hidden;
}

.modal.notification .modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent);
    z-index: 0;
}

.modal.notification .modal-header {
    background: linear-gradient(135deg, #1e3a8a, #1e40af);
    display: flex;
    align-items: center;
    padding: 0.8rem 1rem;
    position: relative;
    z-index: 1;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.modal.notification .modal-header h2 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    flex-grow: 1;
}

.modal.notification .modal-body {
    padding: 0.8rem 1rem;
    margin: 0;
    font-size: 0.9rem;
    color: #e2e8f0;
    line-height: 1.5;
    position: relative;
    z-index: 1;
}

/* 成功提示样式 */
.modal.notification.success .modal-content {
    background: linear-gradient(135deg, #065f46, #047857);
    border-left-color: #10b981;
}

.modal.notification.success .modal-header {
    background: linear-gradient(135deg, #065f46, #047857);
}

/* 错误提示样式 */
.modal.notification.error .modal-content {
    background: linear-gradient(135deg, #991b1b, #b91c1c);
    border-left-color: #ef4444;
}

.modal.notification.error .modal-header {
    background: linear-gradient(135deg, #991b1b, #b91c1c);
}

/* 警告提示样式 */
.modal.notification.warning .modal-content {
    background: linear-gradient(135deg, #92400e, #b45309);
    border-left-color: #f59e0b;
}

.modal.notification.warning .modal-header {
    background: linear-gradient(135deg, #92400e, #b45309);
}

/* 信息提示样式 */
.modal.notification.info .modal-content {
    background: linear-gradient(135deg, #1e3a8a, #1e40af);
    border-left-color: #3b82f6;
}

.modal.notification.info .modal-header {
    background: linear-gradient(135deg, #1e3a8a, #1e40af);
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 0.55rem 1.1rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
    min-width: 70px;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(-100%);
    transition: transform 0.4s ease;
}

.btn:hover::before {
    transform: translateX(0);
}

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

.btn-primary {
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
    color: white;
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.3);
}

.btn-secondary {
    background: linear-gradient(135deg, #64748b, #94a3b8);
    color: white;
    box-shadow: 0 4px 10px rgba(100, 116, 139, 0.3);
}

/* 动画 */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(100%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes toastSlideOut {
    to {
        opacity: 0;
        transform: translateX(100%) scale(0.9);
    }
}