/* 加载动画样式 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(2px);
}

.loading-overlay.show {
    display: flex;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.loading-content {
    background: white;
    padding: 30px 40px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    text-align: center;
    min-width: 200px;
}

.loading-content .loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(99, 102, 241, 0.2);
    border-top-color: var(--color-primary);
    margin: 0 auto 15px;
}

.loading-content .loading-text {
    color: var(--color-text-main);
    font-size: 14px;
    font-weight: 500;
    margin-top: 10px;
}

/* 进度条样式 */
.loading-content .progress-container {
    width: 100%;
    margin-top: 20px;
}

.loading-content .progress-bar-wrapper {
    width: 100%;
    height: 8px;
    background-color: rgba(99, 102, 241, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.loading-content .progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary), #818cf8);
    border-radius: 4px;
    transition: width 0.3s ease-out;
    width: 0%;
}

.loading-content .progress-text {
    font-size: 12px;
    color: var(--color-text-muted);
    text-align: center;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 按钮加载状态 */
.btn.loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* Toast 提示样式 */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10001;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
}

.toast {
    background: white;
    padding: 16px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    animation: slideInRight 0.3s ease-out;
    border-left: 4px solid;
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
}

.toast.hide {
    animation: slideOutRight 0.3s ease-out forwards;
}

.toast.success {
    border-left-color: var(--color-success);
}

.toast.error {
    border-left-color: var(--color-danger);
}

.toast.warning {
    border-left-color: var(--color-warning);
}

.toast.info {
    border-left-color: var(--color-primary);
}

.toast-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.toast.success .toast-icon {
    color: var(--color-success);
}

.toast.error .toast-icon {
    color: var(--color-danger);
}

.toast.warning .toast-icon {
    color: var(--color-warning);
}

.toast.info .toast-icon {
    color: var(--color-primary);
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    font-size: 14px;
    color: var(--color-text-main);
    margin-bottom: 4px;
}

.toast-message {
    font-size: 13px;
    color: var(--color-text-muted);
    line-height: 1.4;
}

.toast-close {
    background: none;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    font-size: 18px;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: color 0.2s;
}

.toast-close:hover {
    color: var(--color-text-main);
}

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

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

/* 响应式设计 */
@media (max-width: 768px) {
    .toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .toast {
        min-width: auto;
    }
}

