/* 自定义弹窗样式 */
.custom-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.custom-popup-overlay.show {
    opacity: 1;
    visibility: visible;
}

.custom-popup {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    max-width: 400px;
    width: 90%;
    max-height: 80%;
    overflow: hidden;
    transform: scale(0.8);
    transition: all 0.3s ease;
}

.custom-popup-overlay.show .custom-popup {
    transform: scale(1);
}

.custom-popup-header {
    padding: 20px 20px 10px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 12px;
}

.custom-popup-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
    color: white;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.2);
    background: linear-gradient(135deg, var(--icon-color-1), var(--icon-color-2));
    position: relative;
    overflow: hidden;
    text-align: center;
    line-height: 1;
    font-family: 'Arial', 'Helvetica', sans-serif;
    flex-shrink: 0;
}

.custom-popup-icon::before {
    content: '';
    position: absolute;
    top: 10%;
    left: 10%;
    width: 80%;
    height: 80%;
    background: linear-gradient(135deg, rgba(255,255,255,0.3), rgba(255,255,255,0.1));
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
}

.custom-popup-icon > * {
    position: relative;
    z-index: 2;
}

.custom-popup-icon.success {
    --icon-color-1: #28a745;
    --icon-color-2: #20c997;
    animation: successPulse 0.6s ease-out;
}

.custom-popup-icon.error {
    --icon-color-1: #dc3545;
    --icon-color-2: #fd7e14;
    animation: errorShake 0.6s ease-out;
}

.custom-popup-icon.warning {
    --icon-color-1: #ffc107;
    --icon-color-2: #fd7e14;
    color: white;
    animation: warningBounce 0.6s ease-out;
}

.custom-popup-icon.info {
    --icon-color-1: #17a2b8;
    --icon-color-2: #6f42c1;
    animation: infoPulse 0.6s ease-out;
}

/* 图标动画 */
@keyframes successPulse {
    0% { transform: scale(0.8); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

@keyframes errorShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-3px); }
    75% { transform: translateX(3px); }
}

@keyframes warningBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

@keyframes infoPulse {
    0% { transform: scale(0.9); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}

.custom-popup-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0;
    flex: 1;
}

.custom-popup-content {
    padding: 20px;
}

.custom-popup-message {
    color: #666;
    line-height: 1.5;
    margin: 0;
    font-size: 14px;
    text-align: left;
}

.custom-popup-footer {
    padding: 10px 20px 20px 20px;
    text-align: right;
}

.custom-popup-btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s ease;
}

.custom-popup-btn:hover {
    background: #0056b3;
}

.custom-popup-btn.success {
    background: #28a745;
}

.custom-popup-btn.success:hover {
    background: #1e7e34;
}

.custom-popup-btn.error {
    background: #dc3545;
}

.custom-popup-btn.error:hover {
    background: #c82333;
}

/* 简化版弹窗（类似layer.msg） - 无图标版本 */
.custom-msg {
    position: fixed;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    padding: 20px 28px;
    border-radius: 16px;
    z-index: 10000;
    font-size: 15px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    max-width: 650px;
    min-width: 380px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.custom-msg.show {
    opacity: 1;
    visibility: visible;
    animation: msgSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.custom-msg span {
    flex: 1;
    text-align: center;
    font-weight: 500;
}

/* 彩色消息的图标样式 */
.custom-msg.success .custom-msg-icon,
.custom-msg.error .custom-msg-icon,
.custom-msg.warning .custom-msg-icon,
.custom-msg.info .custom-msg-icon {
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.2);
}

@keyframes msgIconPop {
    0% { transform: scale(0.5); opacity: 0; }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes msgSlideIn {
    0% { 
        transform: translate(-50%, -70%) scale(0.85);
        opacity: 0;
    }
    60% { 
        transform: translate(-50%, -35%) scale(1.02);
        opacity: 0.9;
    }
    100% { 
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

.custom-msg.success {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.95), rgba(32, 201, 151, 0.95));
    color: white;
    border: 1px solid rgba(40, 167, 69, 0.2);
    box-shadow: 0 12px 40px rgba(40, 167, 69, 0.25);
}

.custom-msg.error {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.95), rgba(253, 126, 20, 0.95));
    color: white;
    border: 1px solid rgba(220, 53, 69, 0.2);
    box-shadow: 0 12px 40px rgba(220, 53, 69, 0.25);
}

.custom-msg.warning {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.95), rgba(253, 126, 20, 0.95));
    color: white;
    border: 1px solid rgba(255, 193, 7, 0.2);
    box-shadow: 0 12px 40px rgba(255, 193, 7, 0.25);
}

.custom-msg.info {
    background: linear-gradient(135deg, rgba(23, 162, 184, 0.95), rgba(111, 66, 193, 0.95));
    color: white;
    border: 1px solid rgba(23, 162, 184, 0.2);
    box-shadow: 0 12px 40px rgba(23, 162, 184, 0.25);
}

/* 响应式 */
@media (max-width: 768px) {
    .custom-popup {
        width: 95%;
        margin: 20px;
    }
    
    .custom-popup-header {
        padding: 16px 16px 8px 16px;
    }
    
    .custom-popup-icon {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }
    
    .custom-msg {
        max-width: 340px;
        min-width: 260px;
        font-size: 14px;
        padding: 18px 24px;
        top: 35%;
    }
    
    .custom-msg-icon {
        width: 22px;
        height: 22px;
        font-size: 13px;
    }
} 