/* 复刻站补充样式（主体来自原站 Discuz 模板 style_10_common.css / forum_index.css） */

.adtext { padding: 0 5px; text-align: center; overflow: hidden; }
.adtext a { display: block; height: 20px; line-height: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adbg img { display: block; }

#sllph ol { list-style: decimal; }
#sllph li { position: relative; }
#sllph li:before { content: none; }

.remen li a { display: inline-block; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }

#focus_con .focus_item { padding: 8px 0; border-bottom: 1px dashed #CDCDCD; }
#focus_con .focus_item img { width: 100%; height: auto; }
#focus_con .focus_item p { margin-top: 5px; line-height: 20px; height: 40px; overflow: hidden; }

.oll .x li { width: 19.9%; }

/* 通用页面（会员中心 / 搜索 / VIP 等）沿用 Discuz 表格风格 */
.dz_table { width: 100%; background: #FFF; }
.dz_table th { background: #e4e4e4; padding: 8px 10px; font-weight: 700; }
.dz_table td { padding: 8px 10px; border-top: 1px solid #e4e4e4; }
.dz_table tr:hover td { background: #F7FBFF; }
.dz_block { background: #FFF; margin-bottom: 10px; }
.dz_block .bm_h { padding: 0 10px; height: 43px; background: #e4e4e4; line-height: 42px; font-size: 16px; font-weight: 700; }
.dz_block .bm_c { padding: 10px; }
.dz_form input.px, .dz_form textarea { width: 300px; }
.dz_form .dz_row { margin-bottom: 10px; }
.dz_form label { display: inline-block; width: 80px; }

/* ===== 广告位 & 公告（默认隐藏，有数据时 .active 才显示）===== */
.ad-slot,
.announcement {
    display: none;
    width: 100%;
}
.ad-slot.active,
.announcement.active {
    display: block;
}
/* 广告：居中、限制最大宽度，不占满整行，避免喧宾夺主 */
.ad-slot {
    text-align: center;
    margin: 8px auto;
}
.ad-slot .ad-link {
    display: inline-block;
    text-decoration: none;
    position: relative;
    max-width: 1100px;
}
.ad-slot .ad-link img {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    max-height: 320px;
    object-fit: contain;
}
/* 广告角标 */
.ad-slot .ad-tag {
    position: absolute;
    top: 2px;
    left: 2px;
    background: rgba(0,0,0,0.5);
    color: #fff;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 2px;
    line-height: 1.4;
}
/* ===== 不同广告位的呈现方式 ===== */
/* 头部横幅 / 内容区广告：居中，稍微放大 */
.ad-slot[data-ad-position="header_banner"] .ad-link,
.ad-slot[data-ad-position="content_top"] .ad-link,
.ad-slot[data-ad-position="content_middle"] .ad-link,
.ad-slot[data-ad-position="content_bottom"] .ad-link,
.ad-slot[data-ad-position="footer"] .ad-link {
    max-width: 1200px;
}
.ad-slot[data-ad-position="header_banner"],
.ad-slot[data-ad-position="content_top"],
.ad-slot[data-ad-position="content_middle"],
.ad-slot[data-ad-position="content_bottom"] {
    max-width: 1240px;
    width: calc(100% - 32px);
    margin: 22px auto;
}
.ad-slot[data-ad-position="footer"] {
    max-width: 1240px;
    width: calc(100% - 32px);
    margin: 12px auto 0;
}
.ad-slot[data-ad-position="footer"] .ad-link img { max-height: 260px; }
/* 头部横幅：整行通栏，宽度撑满，高度按图片比例自适应 */
.ad-slot[data-ad-position="header_banner"] .ad-link {
    display: block;
    width: 100%;
    max-width: 1240px;
}
.ad-slot[data-ad-position="header_banner"] .ad-link img {
    width: 100%;
    max-width: 100%;
    max-height: none;
    height: auto;
}
/* 侧边栏广告：宽屏时固定在页面左右两侧 */
.ad-slot[data-ad-position^="sidebar_"] {
    position: fixed;
    width: 220px;
    z-index: 40;
    margin: 0;
}
.ad-slot[data-ad-position^="sidebar_"].active {
    display: block;
}
.ad-slot[data-ad-position^="sidebar_"] .ad-link {
    max-width: 220px;
}
.ad-slot[data-ad-position^="sidebar_"] .ad-link img {
    max-height: 420px;
}
.ad-slot[data-ad-position="sidebar_1"].active { left: 16px; top: 180px; }
.ad-slot[data-ad-position="sidebar_2"].active { right: 16px; top: 180px; }
.ad-slot[data-ad-position="sidebar_3"].active { right: 16px; top: 580px; }
@media (max-width: 1500px) {
    .ad-slot[data-ad-position^="sidebar_"].active { display: none; }
}
/* 浮动广告：右下角固定 */
.ad-slot[data-ad-position="floating"].active {
    display: block;
    position: fixed;
    right: 18px;
    bottom: 18px;
    width: auto;
    max-width: 320px;
    z-index: 900;
    margin: 0;
}
.ad-slot[data-ad-position="floating"] .ad-link { max-width: 320px; }
.ad-slot[data-ad-position="floating"] .ad-link img { max-height: 320px; }
/* 弹窗广告：居中遮罩层 */
.ad-slot[data-ad-position="popup"].active {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    inset: 0;
    width: 100%;
    margin: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 9999;
}
.ad-slot[data-ad-position="popup"] .ad-link { max-width: 760px; }
.ad-slot[data-ad-position="popup"] .ad-link img { max-height: 85vh; }
/* 移动端：避免广告图过高 */
@media (max-width: 768px) {
    .ad-slot .ad-link img { max-height: 200px; }
    .ad-slot[data-ad-position="popup"] .ad-link { max-width: 92vw; }
    .ad-slot[data-ad-position="floating"] { max-width: 180px; }
    .ad-slot[data-ad-position="floating"] .ad-link { max-width: 180px; }
}
/* 浮动 / 弹窗广告的关闭按钮 */
.ad-slot .ad-close {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 24px;
    height: 24px;
    line-height: 22px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    z-index: 10;
    padding: 0;
}
.ad-slot[data-ad-position="popup"] .ad-close {
    position: fixed;
    top: 24px;
    right: 28px;
    width: 36px;
    height: 36px;
    line-height: 34px;
    font-size: 22px;
}
.ad-slot .ad-close:hover { background: rgba(0, 0, 0, 0.85); }

/* 公告顶部条：紧凑 */
.announcement[data-announcement-type='top_bar'].active {
    background: #fff8e1;
    border-bottom: 1px solid #ffe082;
    padding: 3px 12px;
    font-size: 12px;
    line-height: 1.5;
    color: #6d4c00;
}
.ann-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.ann-item .ann-title {
    font-weight: bold;
    margin-right: 6px;
}
/* 公告弹窗：更小更紧凑 */
.ann-mask {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}
.ann-modal {
    background: #fff;
    border-radius: 8px;
    padding: 16px;
    max-width: 320px;
    width: 88%;
    box-shadow: 0 6px 24px rgba(0,0,0,0.18);
}
.ann-modal h3 {
    margin: 0 0 8px;
    font-size: 15px;
}
.ann-modal .ann-content {
    font-size: 13px;
    line-height: 1.5;
    color: #444;
}
.ann-modal .ann-close {
    margin-top: 12px;
    padding: 5px 16px;
    border: none;
    background: #3f63b4;
    color: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
}
/* 侧栏公告：紧凑 */
.announcement[data-announcement-type='sidebar'].active {
    padding: 6px 10px;
    font-size: 12px;
    background: #f5f5f5;
    border-radius: 4px;
    color: #555;
}
