/* 
 * 云朵信箱 - 美观提示框样式
 * 包含：引导提示、确认提示、成功提示、错误提示等
 */

/* 全局提示框样式 */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* 基础提示框样式 */
.custom-toast {
    min-width: 320px;
    max-width: 450px;
    padding: 16px 20px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    animation: slideIn 0.3s ease-out;
    cursor: pointer;
    transition: all 0.3s ease;
}

.custom-toast:hover {
    transform: translateX(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.custom-toast.closing {
    animation: slideOut 0.3s ease-in forwards;
}

/* 提示框图标 */
.toast-icon {
    font-size: 20px;
    line-height: 1;
    margin-top: 2px;
    flex-shrink: 0;
}

/* 提示框内容 */
.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 4px;
    line-height: 1.3;
}

.toast-message {
    font-size: 13px;
    line-height: 1.4;
    opacity: 0.9;
}

/* 关闭按钮 */
.toast-close {
    background: none;
    border: none;
    color: inherit;
    opacity: 0.7;
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.toast-close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.2);
}

/* 提示框类型 - 成功 */
.toast-success {
    background: linear-gradient(135deg, #56ab2f 0%, #a8e063 100%);
    color: white;
}

.toast-success .toast-icon {
    color: #fff;
}

/* 提示框类型 - 信息 */
.toast-info {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.toast-info .toast-icon {
    color: #fff;
}

/* 提示框类型 - 警告 */
.toast-warning {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.toast-warning .toast-icon {
    color: #fff;
}

/* 提示框类型 - 错误 */
.toast-error {
    background: linear-gradient(135deg, #eb3349 0%, #f45c43 100%);
    color: white;
}

.toast-error .toast-icon {
    color: #fff;
}

/* 提示框类型 - 默认 */
.toast-default {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: #333;
}

.toast-default .toast-icon {
    color: #667eea;
}

/* 引导提示框 - 底部固定 */
.guide-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 18px 24px;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.3);
    max-width: 90%;
    width: 500px;
    z-index: 9998;
    animation: slideUp 0.4s ease-out;
}

.guide-toast .guide-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.guide-toast .guide-icon {
    font-size: 24px;
    animation: bounce 2s infinite;
}

.guide-toast .guide-text {
    flex: 1;
}

.guide-toast .guide-title {
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 4px;
}

.guide-toast .guide-desc {
    font-size: 14px;
    opacity: 0.9;
    line-height: 1.4;
}

.guide-toast .guide-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.guide-toast .guide-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 600;
}

.guide-toast .guide-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.guide-toast .guide-btn.primary {
    background: white;
    color: #667eea;
}

/* 确认对话框 - 模态 */
.confirm-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
}

.confirm-box {
    background: white;
    border-radius: 20px;
    padding: 28px;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: scaleIn 0.3s ease-out;
}

.confirm-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.confirm-icon {
    font-size: 28px;
}

.confirm-title {
    font-size: 20px;
    font-weight: 700;
    color: #333;
}

.confirm-body {
    color: #666;
    line-height: 1.6;
    margin-bottom: 24px;
    font-size: 15px;
}

.confirm-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.confirm-btn {
    padding: 10px 20px;
    border-radius: 10px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
}

.confirm-btn-cancel {
    background: #f8f9fa;
    color: #666;
}

.confirm-btn-cancel:hover {
    background: #e9ecef;
    transform: translateY(-1px);
}

.confirm-btn-confirm {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.confirm-btn-confirm:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.confirm-btn-danger {
    background: linear-gradient(135deg, #eb3349 0%, #f45c43 100%);
    color: white;
}

.confirm-btn-danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(235, 51, 73, 0.3);
}

/* 操作成功提示 - 全屏覆盖 */
.success-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
}

.success-card {
    background: white;
    border-radius: 24px;
    padding: 40px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.3);
    animation: scaleIn 0.4s ease-out;
}

.success-icon {
    font-size: 64px;
    margin-bottom: 20px;
    animation: successPop 0.5s ease-out;
}

.success-title {
    font-size: 24px;
    font-weight: 800;
    color: #333;
    margin-bottom: 12px;
}

.success-message {
    color: #666;
    line-height: 1.6;
    margin-bottom: 24px;
    font-size: 15px;
}

.success-btn {
    background: linear-gradient(135deg, #56ab2f 0%, #a8e063 100%);
    color: white;
    border: none;
    padding: 12px 28px;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 15px;
}

.success-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(86, 171, 47, 0.3);
}

/* 工具提示 - 悬停显示 */
.tooltip-trigger {
    position: relative;
    cursor: help;
}

.tooltip-box {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    background: #333;
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s;
    z-index: 1000;
}

.tooltip-box::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #333;
}

.tooltip-trigger:hover .tooltip-box {
    opacity: 1;
    transform: translateX(-50%) translateY(-12px);
}

/* 动画定义 */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

@keyframes slideUp {
    from {
        transform: translateX(-50%) translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

@keyframes successPop {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* 响应式适配 */
@media (max-width: 768px) {
    .toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
    }
    
    .custom-toast {
        min-width: auto;
        max-width: 100%;
    }
    
    .guide-toast {
        bottom: 20px;
        width: calc(100% - 40px);
        max-width: none;
    }
    
    .confirm-box,
    .success-card {
        width: calc(100% - 40px);
        padding: 24px;
    }
}

/* 暗色模式适配 */
@media (prefers-color-scheme: dark) {
    .toast-default {
        background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
        color: #e2e8f0;
    }
    
    .confirm-box,
    .success-card {
        background: #1a202c;
        color: #e2e8f0;
    }
    
    .confirm-title,
    .success-title {
        color: #e2e8f0;
    }
    
    .confirm-body,
    .success-message {
        color: #a0aec0;
    }
}
