/**
 * 精美的弹出层样式
 */

/* Toast 提示框 */
.toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    z-index: 10000;
    min-width: 280px;
    max-width: 90%;
    background: var(--white, #FFFFFF);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    pointer-events: none;
}

.toast-container.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
}

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

.toast-success .toast-icon {
    color: #52c41a;
}

.toast-error .toast-icon {
    color: #ff4d4f;
}

.toast-warning .toast-icon {
    color: #faad14;
}

.toast-info .toast-icon {
    color: #1890ff;
}

.toast-message {
    flex: 1;
    font-size: 14px;
    color: var(--dark, #333333);
    line-height: 1.5;
    word-break: break-word;
}

/* Modal 对话框 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(4px);
}

.modal-overlay.show {
    opacity: 1;
}

.modal-container {
    background: var(--white, #FFFFFF);
    border-radius: 16px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.2);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    overflow: hidden;
}

.modal-overlay.show .modal-container {
    transform: scale(1) translateY(0);
}

.modal-header {
    padding: 24px 24px 16px;
    text-align: center;
}

.modal-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 32px;
}

.modal-icon-success {
    background: #f6ffed;
    color: #52c41a;
}

.modal-icon-error {
    background: #fff2f0;
    color: #ff4d4f;
}

.modal-icon-warning {
    background: #fffbe6;
    color: #faad14;
}

.modal-icon-info {
    background: #e6f7ff;
    color: #1890ff;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--dark, #333333);
    margin: 0;
}

.modal-body {
    padding: 0 24px 24px;
    text-align: center;
}

.modal-message {
    font-size: 14px;
    color: var(--gray, #777777);
    line-height: 1.6;
    margin: 0;
    word-break: break-word;
    white-space: pre-wrap;
}

.modal-footer {
    display: flex;
    gap: 12px;
    padding: 0 24px 24px;
}

.modal-btn {
    flex: 1;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
}

.modal-btn-cancel {
    background: var(--light-gray, #F5F5F5);
    color: var(--dark, #333333);
}

.modal-btn-cancel:hover {
    background: #e0e0e0;
}

.modal-btn-confirm {
    background: var(--primary, #FF7A50);
    color: white;
}

.modal-btn-confirm:hover {
    background: #FF6B3D;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 122, 80, 0.3);
}

.modal-btn:active {
    transform: translateY(0);
}

.modal-input {
    width: 100%;
    padding: 12px 16px;
    margin-top: 12px;
    border: 2px solid var(--light-gray, #E5E7EB);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.modal-input:focus {
    border-color: var(--primary, #FF7A50);
    box-shadow: 0 0 0 3px rgba(255, 122, 80, 0.1);
}

.modal-input::placeholder {
    color: var(--gray, #999999);
}

/* 响应式 */
@media (max-width: 480px) {
    .modal-container {
        max-width: 90%;
        margin: 20px;
    }
    
    .modal-header {
        padding: 20px 20px 12px;
    }
    
    .modal-body {
        padding: 0 20px 20px;
    }
    
    .modal-footer {
        padding: 0 20px 20px;
        flex-direction: column;
    }
    
    .modal-btn {
        width: 100%;
    }
}

