/* ===================================================================
   「幻想乡OL」页游广告位样式（只在新闻页接入）
   -------------------------------------------------------------------
   设计取舍：
     - 放左下角：右下角已被「回到顶部」按钮占用（.back-top, right:20/bottom:20）
     - 小卡片、不铺满、不遮正文；z-index 1050 低于导航(9000)与回到顶部(1060)
     - 默认透明且 pointer-events:none，加 .is-in 才淡入 → 不会闪现或误点
     - 会场大屏、打印、prefers-reduced-motion 都有兜底
   =================================================================== */

.tho-ad {
    position: fixed;
    left: 18px;
    bottom: 18px;
    z-index: 1050;
    width: min(300px, calc(100vw - 36px));
    padding: 8px 8px 10px;
    background: #FFFFFF;
    border: 1px solid var(--lc-line, rgba(72, 153, 203, 0.25));
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(42, 95, 133, 0.18);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity .45s ease, transform .45s cubic-bezier(.2, .8, .2, 1);
    pointer-events: none;
}

.tho-ad.is-in {
    opacity: 1;
    transform: none;
    pointer-events: auto;
}

/* 正文之外的小字，明确标注这是广告 */
.tho-ad-label {
    font-size: 10px;
    line-height: 1;
    color: rgba(105, 104, 124, 0.75);
    letter-spacing: 1px;
    margin: 0 0 5px 3px;
}

.tho-ad-close {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 22px;
    height: 22px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(44, 53, 68, 0.18);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.92);
    color: #4A5163;
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
    transition: background .2s, color .2s;
}

.tho-ad-close:hover {
    background: #2C3544;
    color: #FFFFFF;
}

.tho-ad-link {
    display: block;
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    line-height: 0;
    border: 1px solid rgba(72, 153, 203, 0.22);
    transition: transform .25s var(--lc-ease, ease), box-shadow .25s ease;
}

.tho-ad-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(42, 95, 133, 0.22);
}

.tho-ad-link img {
    width: 100%;
    height: auto;
    display: block;
}

.tho-ad-cta {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 10px 10px 8px;
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.2;
    color: #FFFFFF;
    text-align: center;
    letter-spacing: 1px;
    background: linear-gradient(to top, rgba(20, 25, 35, 0.78), rgba(20, 25, 35, 0));
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

/* 手机：更窄一点、贴边留白更小，避免占掉太多可视区 */
@media (max-width: 576px) {
    .tho-ad {
        left: 12px;
        bottom: 12px;
        width: min(260px, calc(100vw - 24px));
        padding: 6px 6px 8px;
    }
    .tho-ad-cta { font-size: 0.76rem; padding: 8px 8px 7px; }
}

/* 会场大屏不投放（JS 也会跳过，这是双保险） */
html.tho-cast .tho-ad { display: none !important; }

/* 打印不投放 */
@media print {
    .tho-ad { display: none !important; }
}

/* 尊重「减少动态效果」：不做位移/淡入过渡 */
@media (prefers-reduced-motion: reduce) {
    .tho-ad { transition: none; transform: none; }
    .tho-ad-link { transition: none; }
}
