/* ============================================================
   BBS Replica 覆盖样式：版面宽度收窄 + 新增组件（视频/附件/私信）
   在原主题 CSS 之后加载，仅覆盖必要属性
   ============================================================ */

/* ---- 版面宽度收窄（所有布局统一最大宽度，居中） ---- */
#container {
    min-width: 0 !important;
}
.wrapper {
    width: 96% !important;
    min-width: 0 !important;
    max-width: 1150px !important;
}

/* NetPen 主题（showthread 等）的内容区 */
#main-container .content {
    width: 96% !important;
    max-width: 1150px;
    margin-left: auto !important;
    margin-right: auto !important;
    float: none !important;
}
#main-container {
    max-width: 1210px;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 900px) {
    .wrapper,
    #main-container .content {
        width: 100% !important;
    }
}

/* ---- 首页公告条（原站内联样式收拢到此处） ---- */
.announce-box {
    margin: 10px auto;
    padding: 6px 18px;
    border: 1px solid #d8b94a;
    border-radius: 6px;
    background: #fff8e1;
    color: #4a3c00;
    text-align: center;
    font-size: 13px;
}
.announce-box .date {
    display: block;
    margin-top: 2px;
    color: #8a7a30;
    font-size: 11px;
}
.announce-box .announce-body {
    margin-top: 4px;
}
.announce-box a {
    color: #007fd0;
}
.announce-box a:hover {
    color: #ff7500;
}

/* ---- 分页条 ---- */
.pagination {
    margin: 10px 0;
}
.pagination .pages {
    margin-right: 6px;
}
.pagination .pagination_page,
.pagination .pagination_current {
    display: inline-block;
    min-width: 22px;
    padding: 3px 7px;
    margin: 0 2px 2px 0;
    text-align: center;
}
.pagination .pagination_current {
    background: #303f50;
    color: #fff;
    border-radius: 3px;
    font-weight: 700;
}
.pagination .pagination_sep {
    padding: 0 4px;
    color: #999;
}

/* ---- [video] 代码播放器 ---- */
.mycode_video {
    position: relative;
    width: 100%;
    max-width: 720px;
    margin: 8px 0;
    background: #000;
    border-radius: 4px;
    overflow: hidden;
}
.mycode_video iframe {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    border: 0;
}
.mycode_video video {
    display: block;
    width: 100%;
    max-height: 540px;
    height: auto;
}
.mycode_video_caption {
    font-size: 12px;
    color: #666;
    margin: 4px 0 8px;
}
.mycode_video_fallback {
    font-size: 12px;
    color: #7a8288;
    margin: 2px 0 8px;
}
.mycode_video_fallback a {
    color: #007fd0;
    text-decoration: underline;
}
.mycode_video_error {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    max-width: 720px;
    aspect-ratio: 16 / 9;
    max-height: 540px;
    background: #1c1f24;
    color: #aab3bd;
    font-size: 14px;
    border-radius: 4px;
    padding: 12px;
    text-align: center;
    box-sizing: border-box;
}
.mycode_video_error a {
    color: #7db4e8;
}
.mycode_video_error_icon {
    font-size: 18px;
    color: #e2574c;
}
/* 帖子里引用了已丢失的本地图：用一行灰字代替破图图标 */
.mycode_img_missing {
    display: inline-block;
    margin: 4px 0;
    padding: 6px 10px;
    background: #f5f6f7;
    border: 1px dashed #ccd2d8;
    border-radius: 3px;
    color: #8a929b;
    font-size: 12px;
}

/* ---- 帖子附件展示 ---- */
.attachment-block {
    margin: 10px 0 4px;
    padding: 8px 10px;
    border: 1px solid #dbe2e8;
    border-radius: 4px;
    background: #f7f9fa;
}
.attachment-block .attachment-title {
    font-weight: bold;
    font-size: 12px;
    color: #555;
    margin-bottom: 6px;
}
ul.attachment-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
ul.attachment-list li {
    padding: 4px 0;
    font-size: 13px;
    line-height: 1.5;
    border-bottom: 1px dashed #e4e9ed;
}
ul.attachment-list li:last-child {
    border-bottom: 0;
}
.attachment-image img {
    max-width: 100%;
    height: auto;
    border-radius: 3px;
    display: block;
    margin-top: 4px;
}
.attachment-video video {
    width: 100%;
    max-width: 720px;
    display: block;
    border-radius: 3px;
    margin-top: 4px;
}
.attachment-meta {
    color: #888;
    font-size: 12px;
}

/* ---- 投票 ---- */
.poll-bar {
    height: 10px;
    min-width: 2px;
    background: #4da6ff;
    border-radius: 3px;
    margin-bottom: 2px;
}
form.poll-vote label {
    cursor: pointer;
}

/* ---- 私信 ---- */
.pm-status-unread {
    font-weight: bold;
}
.pm-compose .textbox {
    width: 100%;
    box-sizing: border-box;
    padding: 6px 8px;
    border: 1px solid #ccc;
    border-radius: 3px;
}
