/* 弹出框前端样式 - 修复重叠问题 */
.multi-popup {
    position: fixed;
    z-index: 999999;
    max-width: 400px;
    border-radius: 12px;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.8);
    margin: 0; /* 确保没有外边距干扰 */
}

.multi-popup.active {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

/* 基础位置定义 - 使用默认位置但不设置具体坐标 */
.popup-position-top-right {
    top: 80px;
    right: 30px;
}

.popup-position-top-left {
    top: 80px;
    left: 30px;
}

.popup-position-bottom-right {
    bottom: 80px;
    right: 30px;
}

.popup-position-bottom-left {
    bottom: 80px;
    left: 30px;
}

.popup-position-center {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
}

.popup-position-center.active {
    transform: translate(-50%, -50%) scale(1);
}

.popup-content {
    padding: 0;
}

.popup-inner {
    padding: 25px;
    position: relative;
}

.popup-title {
    margin: 0 0 15px 0;
    font-size: 22px;
    font-weight: 600;
    line-height: 1.3;
    text-align: center;
    color: var(--title-color, #333);
}

.popup-message {
    font-size: 15px;
    line-height: 1.6;
    color: var(--content-color, #666);
}

.popup-message p {
    margin: 0 0 10px 0;
}

.popup-timer {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px dashed #ddd;
    font-size: 14px;
    color: #666;
    text-align: center;
}

/* 样式变体 */
.popup-style-default {
    background: var(--bg-color, #ffffff);
    color: #333333;
    border: 1px solid #e0e0e0;
}

.popup-style-blue {
    background: var(--bg-color, #e3f2fd);
    color: #0d47a1;
    border: 1px solid #bbdefb;
}

.popup-style-blue .popup-title {
    color: #1565c0;
}

.popup-style-green {
    background: var(--bg-color, #e8f5e9);
    color: #1b5e20;
    border: 1px solid #c8e6c9;
}

.popup-style-green .popup-title {
    color: #2e7d32;
}

.popup-style-red {
    background: var(--bg-color, #ffebee);
    color: #b71c1c;
    border: 1px solid #ffcdd2;
}

.popup-style-red .popup-title {
    color: #c62828;
}

.popup-style-purple {
    background: var(--bg-color, #f3e5f5);
    color: #4a148c;
    border: 1px solid #e1bee7;
}

.popup-style-purple .popup-title {
    color: #6a1b9a;
}

.popup-style-dark {
    background: var(--bg-color, #424242);
    color: #ffffff;
    border: 1px solid #616161;
}

.popup-style-dark .popup-title {
    color: #bb86fc;
}

.popup-style-glass {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .multi-popup {
        max-width: 90%;
        left: 5% !important;
        right: 5% !important;
        margin: 0 auto;
    }
    
    .popup-position-top-right,
    .popup-position-top-left,
    .popup-position-bottom-right,
    .popup-position-bottom-left {
        top: auto;
        bottom: 20px;
        left: 5% !important;
        right: 5% !important;
    }
    
    .popup-inner {
        padding: 20px;
    }
    
    .popup-title {
        font-size: 20px;
    }
}