/* ================================================================
   海报生成 / 预览 共享样式（poster.css）
   被 /、/free/、/vip-system/modules/health/ 等页引用
   依赖：FontAwesome（海报按钮图标）、poster.js（Canvas 生成）
   ================================================================ */

/* ===== 海报生成 Loading ===== */
.poster-loading {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9998;
    padding: 16px 32px;
    background: rgba(15, 10, 26, 0.92);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 12px;
    color: #fff;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    animation: posterLoadingIn 0.2s ease;
}
@keyframes posterLoadingIn {
    from { opacity: 0; transform: translate(-50%, -50%) scale(0.9); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* ===== 海报预览弹窗 ===== */
.poster-preview-modal {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.poster-preview-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.poster-preview-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.poster-preview-container {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    height: 100%;
    padding: 20px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.poster-preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 420px;
    padding: 12px 0 16px;
    flex-shrink: 0;
}
.poster-preview-header h3 {
    color: #fff;
    font-size: 18px;
    font-weight: 600;
}
.poster-preview-close {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.poster-preview-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.poster-preview-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 420px;
    min-height: 0;
    padding: 8px 0;
}

.poster-preview-image {
    width: 100%;
    max-width: 375px;
    max-height: calc(100vh - 220px);
    border-radius: 16px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
    object-fit: contain;
}

.poster-preview-footer {
    width: 100%;
    max-width: 420px;
    padding: 16px 0 24px;
    text-align: center;
    flex-shrink: 0;
}

.poster-preview-tip {
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.poster-preview-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.poster-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
    border: none;
    border-radius: 24px;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.35);
}
.poster-download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(139, 92, 246, 0.5);
}

.poster-close-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    color: rgba(255, 255, 255, 0.75);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}
.poster-close-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

/* 海报入口按钮（生成海报图标）在所有视口可见，并悬浮于客服图标上方 */
.float-poster-btn {
    display: flex !important;
}
