/* ========== 分享海报弹窗组件样式 (前缀 _sposter- 避免冲突) ========== */

/* 遮罩层 */
._sposter-modal-mask {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    pointer-events: none;
}

/* 弹窗主体 */
._sposter-modal-main {
    width: 86%;
    max-width: 400px;
    background-color: #ffffff;
    border-radius: 20px;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(40px) scale(0.96);
    transition: all 0.35s cubic-bezier(0.2, 0.9, 0.4, 1.2);
    opacity: 0;
    position: relative;
    max-height: 90vh;
}

/* 激活状态 */
._sposter-modal-mask._sposter-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

._sposter-modal-mask._sposter-active ._sposter-modal-main {
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* 关闭动画 */
._sposter-modal-mask._sposter-closing {
    opacity: 0;
    visibility: hidden;
    background-color: rgba(0, 0, 0, 0);
    transition: all 0.25s ease;
}

._sposter-modal-mask._sposter-closing ._sposter-modal-main {
    transform: translateY(30px) scale(0.96);
    opacity: 0;
}

/* 弹窗内容滚动区域 */
._sposter-modal-content {
    padding: 24px 24px 16px 24px;
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
    scrollbar-width: thin;
}

._sposter-modal-content::-webkit-scrollbar {
    width: 4px;
}

._sposter-modal-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

._sposter-modal-content::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}

/* 海报区域 - 永远是正方形 */
._sposter-poster-area {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #eaeaea;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.02);
    /* 正方形：宽度100%，高度等于宽度 */
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;

    cursor: zoom-in;
}

._sposter-poster-image {
    display: block;
    width: auto;
    height: 100%;
    max-width: none;
    max-height: 100%;
    object-fit: contain;
    transition: opacity 0.2s;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
    cursor: zoom-in;
}

/* 图片加载占位效果 */
._sposter-img-loading {
    opacity: 0.6;
    background: #eef2f5;
}

._sposter-img-loaded {
    opacity: 1;
}

._sposter-img-error {
    opacity: 0.5;
    object-fit: contain;
}

/* 推广文案区域 */
._sposter-intro-area {
    font-size: 13px;
    line-height: 1.5;
    background: #f9fbfd;
    padding: 14px 16px;
    border-radius: 20px;
    text-align: left;
    transition: all 0.2s;
    word-break: break-word;
    text-align: center;
    color: var(--text-color-7);
}

._sposter-intro-area * {
    color: inherit;
    font-size: inherit;
}

._sposter-intro-area a,
._sposter-intro-text a {
    font-size: inherit;
    color: #2f80ed;
    text-decoration: none;
    font-weight: 500;
    background: transparent;
    padding: 0 2px;
    border-radius: 8px;
    transition: background 0.2s;
    cursor: pointer;
    text-decoration: underline;
    font-size: inherit;
}

._sposter-intro-area a:active,
._sposter-intro-text a:active {
    background-color: rgba(47, 128, 237, 0.08);
}

._sposter-intro-area:empty {
    display: none;
}

/* 底部按钮区域 */
._sposter-actions {
    padding: 8px 24px 24px 24px;
    border-top: none;
    background: #ffffff;
}

._sposter-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 52px;
    background: var(--primary-btn-bg);
    color: var(--primary-btn-text-color);
    border: none;
    border-radius: 44px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px;
}

._sposter-btn:hover {
    opacity: 0.7;
}

._sposter-btn:active {
    transform: scale(0.97);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

._sposter-btn:disabled {
    opacity: 0.65;
    transform: none;
    cursor: wait;
}

/* 右上角关闭按钮 */
._sposter-close-icon {
    position: absolute;
    top: 14px;
    right: 18px;
    width: 32px;
    height: 32px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 300;
    color: #5f6b7a;
    cursor: pointer;
    border: none;
    backdrop-filter: blur(4px);
    transition: all 0.2s;
    z-index: 12;
    line-height: 1;
    font-family: system-ui;
}

._sposter-close-icon:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #1a2632;
}

/* 移动端适配 */
@media (max-width: 768px) {
    ._sposter-modal-main {
        width: 90%;
        max-width: 400px;
        max-height: 92vh;
        border-radius: 28px;
    }
    ._sposter-modal-content {
        padding: 20px 20px 12px 20px;
        gap: 18px;
    }
    ._sposter-intro-area {
        padding: 12px 14px;
        font-size: 14px;
    }
    ._sposter-actions {
        padding: 6px 20px 22px 20px;
    }
    ._sposter-btn {
        height: 48px;
        font-size: 15px;
    }
    ._sposter-close-icon {
        top: 12px;
        right: 14px;
        width: 30px;
        height: 30px;
        font-size: 22px;
        background: rgba(255, 255, 255, 0.7);
    }
}

@media (max-width: 480px) {
    ._sposter-modal-main {
        width: 92%;
        max-height: 94vh;
    }
    ._sposter-modal-content {
        padding: 18px 16px 10px 16px;
        gap: 16px;
    }
    ._sposter-intro-area {
        padding: 10px 12px;
        font-size: 13.5px;
        line-height: 1.45;
    }
    ._sposter-btn {
        height: 46px;
        font-size: 14px;
    }
    ._sposter-close-icon {
        top: 10px;
        right: 12px;
    }
}