/* 首页弹窗样式 */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}

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

.popup-container {
    background: #2a2a2a;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    color: white;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* 弹窗头部 */
.popup-header {
    padding: 20px;
    border-bottom: 1px solid #444;
    position: relative;
}

.popup-countdown {
    font-size: 18px;
    font-weight: 500;
    color: white;
    margin: 0;
}

.popup-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    color: #999;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    transition: color 0.3s ease;
}

.popup-close:hover {
    color: white;
}

/* 弹窗内容 */
.popup-content {
    padding: 20px;
}

.popup-save-tip {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-bottom: 20px;
    color: #ccc;
    font-size: 14px;
    transition: all 0.3s ease;
    border-radius: 8px;
    padding: 8px 12px;
    margin: -8px -12px 12px 0;
}

.popup-save-tip:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #4CAF50;
    transform: scale(1.05);
}

.popup-save-tip svg {
    width: 20px;
    height: 20px;
    margin-right: 8px;
    fill: #ccc;
}

.popup-info-item {
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
}

.popup-info-label {
    color: #ccc;
    min-width: 80px;
    font-size: 14px;
    margin-right: 15px;
    flex-shrink: 0;
}

.popup-info-value {
    color: white;
    font-size: 14px;
    word-break: break-all;
    flex: 1;
}

.popup-info-value.primary {
    color: #ff6b35;
    font-weight: 500;
}

.popup-info-value.highlight {
    color: #4CAF50;
    text-decoration: underline;
    cursor: pointer;
}

.popup-info-value.highlight:hover {
    color: #66BB6A;
}

/* 警告文本 */
.popup-warning {
    margin: 15px 0;
    padding: 0;
    font-size: 14px;
}

.popup-warning-line {
    color: #ff4444;
    margin-bottom: 5px;
}

.popup-save-instruction {
    color: #ccc;
    margin-bottom: 5px;
}

.popup-save-instruction .highlight {
    color: #ff6b35;
    font-weight: 500;
}

/* 链接按钮区域 */
.popup-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin: 20px 0;
}

.popup-link-button {
    background: #d4691a;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    word-break: break-all;
}

.popup-link-button:hover {
    background: #b8591a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212, 105, 26, 0.3);
}

/* 底部操作按钮 */
.popup-footer {
    padding: 20px;
    border-top: 1px solid #444;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.popup-ad-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 20px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 3px 15px rgba(102, 126, 234, 0.3);
    border: none;
    cursor: pointer;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.popup-ad-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.popup-ad-button:hover::before {
    left: 100%;
}

.popup-ad-button:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
    text-decoration: none;
    color: white;
}

.popup-close-button {
    background: #ff6b35;
    color: white;
    border: none;
    border-radius: 25px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.popup-close-button:hover {
    background: #e55a2b;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

/* 移动端适配 */
@media (max-width: 768px) {
    .popup-container {
        width: 95%;
        max-height: 90vh;
    }
    
    .popup-header,
    .popup-content,
    .popup-footer {
        padding: 15px;
    }
    
    .popup-buttons {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .popup-footer {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    
    .popup-ad-button {
        
        padding: 15px 20px;
        font-size: 16px;
        font-weight: 600;
        order: 1;
        background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
        box-shadow: 0 4px 20px rgba(79, 172, 254, 0.3);
        border-radius: 25px;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
    }
    
    .popup-ad-button:hover {
        background: linear-gradient(135deg, #3d8bfe 0%, #00d4fe 100%);
        box-shadow: 0 6px 25px rgba(79, 172, 254, 0.4);
    }
    
    .popup-close-button {
        width: 100%;
        padding: 15px 20px;
        font-size: 15px;
        order: 2;
        background: #6c757d;
        border-radius: 25px;
        opacity: 0.85;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
    }
    
    .popup-close-button:hover {
        background: #5a6268;
        opacity: 1;
        transform: translateY(-1px);
        box-shadow: 0 3px 12px rgba(108, 117, 125, 0.3);
    }
}