/*
 * 分享海报蒙层样式（共享层 · beta.308）
 *
 * 所有分享海报共用同一套蒙层样式
 * 设计参考活动详情页原有蒙层，统一视觉风格
 *
 * JS 中动态创建的 DOM 结构：
 *   .sp-overlay
 *     .sp-overlay-inner
 *       .sp-overlay-close
 *       .sp-overlay-loading
 *         .sp-loading-spinner
 *         .sp-loading-text
 *       .sp-overlay-img-wrap
 *         .sp-overlay-img
 *         .sp-overlay-tip
 *       .sp-overlay-actions
 *         .sp-overlay-btn
 *         .sp-overlay-btn
 */

/* ===== 蒙层 ===== */
.sp-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, 0.92);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 16px 16px 100px;
    box-sizing: border-box;
}

.sp-overlay-inner {
    width: 100%;
    max-width: 420px;
    position: relative;
    margin: 0 auto;
    padding-top: 8px;
}

/* ===== 关闭按钮（右上角） ===== */
.sp-overlay-close {
    position: absolute;
    top: -4px;
    right: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 28px;
    font-weight: 300;
    cursor: pointer;
    line-height: 1;
    z-index: 10;
    -webkit-tap-highlight-color: transparent;
}
.sp-overlay-close:active {
    color: #fff;
}

/* ===== 加载中 ===== */
.sp-overlay-loading {
    text-align: center;
    padding: 80px 20px;
    color: #fff;
}

.sp-loading-spinner {
    width: 60px;
    height: 60px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top-color: #fbbf24;
    border-radius: 50%;
    margin: 0 auto 20px;
    animation: sp-spin 0.8s linear infinite;
}

@keyframes sp-spin {
    to { transform: rotate(360deg); }
}

.sp-loading-text {
    font-size: 15px;
    color: #fff;
    margin-bottom: 12px;
}

/* ===== 海报图片 ===== */
.sp-overlay-img-wrap {
    text-align: center;
    padding: 10px 0 20px;
}

.sp-overlay-img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
    display: block;
    margin: 0 auto;
}

/* ===== 蒙层顶部文字提示 ===== */
.sp-overlay-top-tip {
    text-align: center;
    color: #fff;
    margin-bottom: 16px;
    padding-top: 32px;
}
.sp-overlay-top-tip .main {
    font-size: 16px;
    font-weight: 600;
}
.sp-overlay-top-tip .sub {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 4px;
}

/* ===== 底部提示 ===== */
.sp-overlay-tip {
    margin-top: 16px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    text-align: center;
    line-height: 1.6;
}

/* ===== 底部操作栏 ===== */
.sp-overlay-actions {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px;
    padding-bottom: calc(env(safe-area-inset-bottom, 0) + 16px);
    display: flex;
    gap: 12px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    z-index: 10;
}

.sp-overlay-btn {
    flex: 1;
    padding: 14px 16px;
    text-align: center;
    border-radius: 12px;
    font-size: 14px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    backdrop-filter: blur(8px);
    border: none;
    font-family: inherit;
}
.sp-overlay-btn:active {
    background: rgba(255, 255, 255, 0.28);
}
.sp-overlay-btn.primary {
    background: linear-gradient(135deg, #07C160 0%, #06ad56 100%);
}
.sp-overlay-btn.primary:active {
    background: #06ad56;
}
