/* ===== 62_Metro_Split - Metro分屏视图 ===== */
/* 配色: 主色#2D7DD2, 背景#F2F2F2, 表面#FFFFFF, 文字#262626, 选中#3B78D0 */
/* CSS前缀: .mp- */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --mp-primary: #2D7DD2;
    --mp-bg: #F2F2F2;
    --mp-surface: #FFFFFF;
    --mp-text: #262626;
    --mp-selected: #3B78D0;
    --mp-border: #E0E0E0;
    --mp-gray: #F8F8F8;
}

body.mp-body {
    font-family: 'Segoe UI', 'Noto Sans SC', sans-serif;
    background: var(--mp-bg);
    color: var(--mp-text);
    line-height: 1.6;
    overflow: hidden;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }

.mp-app {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* ===== 顶部命令栏 ===== */
.mp-commandbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    height: 56px;
    background: var(--mp-primary);
    color: #fff;
    flex-shrink: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.mp-cmd-left, .mp-cmd-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mp-cmd-center {
    flex: 1;
    max-width: 500px;
    margin: 0 24px;
}

.mp-logo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mp-logo-img { width: 28px; height: 28px; }
.mp-logo-text { font-size: 16px; font-weight: 600; white-space: nowrap; }

.mp-cmd-btn {
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    transition: background 0.2s;
}

.mp-cmd-btn:hover { background: rgba(255,255,255,0.15); }

.mp-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: #E74C3C;
    font-size: 10px;
    min-width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    padding: 0 4px;
}

.mp-search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.95);
    padding: 0 12px;
    height: 36px;
    color: #666;
}

.mp-search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 14px;
    font-family: inherit;
    background: transparent;
    color: var(--mp-text);
}

.mp-user-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px 4px 4px;
    background: rgba(255,255,255,0.15);
    transition: background 0.2s;
    cursor: pointer;
}

.mp-user-chip:hover { background: rgba(255,255,255,0.25); }

.mp-user-avatar { width: 28px; height: 28px; }
.mp-user-name { font-size: 13px; white-space: nowrap; }

/* ===== 分屏布局 ===== */
.mp-split {
    flex: 1;
    display: flex;
    overflow: hidden;
}

/* ===== 左侧导航 ===== */
.mp-sidebar {
    width: 220px;
    background: var(--mp-surface);
    border-right: 1px solid var(--mp-border);
    overflow-y: auto;
    flex-shrink: 0;
    transition: width 0.2s;
}

.mp-sidebar.mp-collapsed { width: 60px; }
.mp-sidebar.mp-collapsed .mp-nav-tile span { display: none; }

.mp-nav-tile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-left: 4px solid transparent;
    color: var(--mp-text);
    font-size: 14px;
    transition: all 0.2s;
    cursor: pointer;
}

.mp-nav-tile svg { flex-shrink: 0; color: #888; }

.mp-nav-tile:hover {
    background: var(--mp-gray);
}

.mp-nav-tile.mp-nav-active {
    background: rgba(45,125,210,0.1);
    border-left-color: var(--mp-selected);
    color: var(--mp-selected);
    font-weight: 600;
}

.mp-nav-tile.mp-nav-active svg { color: var(--mp-selected); }

/* ===== 右侧内容 ===== */
.mp-content {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.mp-banner {
    position: relative;
    height: 160px;
    overflow: hidden;
}

.mp-banner-img { width: 100%; height: 100%; object-fit: cover; }

.mp-banner-text {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px 32px;
    background: linear-gradient(transparent, rgba(0,0,0,0.6));
    color: #fff;
}

.mp-banner-text h1 { font-size: 24px; font-weight: 600; }
.mp-banner-text p { font-size: 13px; opacity: 0.9; }

.mp-content-body {
    display: grid;
    grid-template-columns: minmax(0,1fr) 280px;
    gap: 16px;
    padding: 20px;
    flex: 1;
    align-items: start;
}

.mp-main-col {
    min-width: 0;
    overflow: hidden;
    word-wrap: break-word;
}

.mp-section-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    padding-left: 8px;
    border-left: 4px solid var(--mp-primary);
}

/* ===== 板块卡片网格 ===== */
.mp-card-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.mp-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: var(--mp-surface);
    border: 1px solid var(--mp-border);
    transition: all 0.2s;
    flex-wrap: wrap;
}

.mp-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.mp-card-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.mp-card-info { flex: 1; min-width: 0; }
.mp-card-info h3 { font-size: 15px; font-weight: 600; margin-bottom: 2px; }
.mp-card-info p { font-size: 12px; color: #888; }

.mp-card-latest {
    width: 100%;
    font-size: 12px;
    color: #666;
    padding-top: 8px;
    border-top: 1px solid var(--mp-border);
    margin-top: 4px;
}

/* ===== 侧边栏卡片 ===== */
.mp-aside {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

.mp-aside-card {
    background: var(--mp-surface);
    border: 1px solid var(--mp-border);
    padding: 16px;
}

.mp-aside-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--mp-selected);
}

.mp-aside-text {
    font-size: 13px;
    color: #666;
    line-height: 1.8;
    margin-bottom: 4px;
}

.mp-aside-avatar {
    width: 56px;
    height: 56px;
    margin-bottom: 8px;
}

.mp-stat-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 6px 0;
    border-bottom: 1px solid var(--mp-border);
}
.mp-stat-row:last-child { border-bottom: none; }

.mp-stat-val { font-size: 20px; font-weight: 700; }
.mp-stat-lbl { font-size: 12px; color: #888; }

.mp-aside-list li {
    padding: 6px 0;
    border-bottom: 1px solid var(--mp-border);
}
.mp-aside-list li:last-child { border-bottom: none; }
.mp-aside-list a { font-size: 13px; color: #555; transition: color 0.2s; }
.mp-aside-list a:hover { color: var(--mp-selected); }

.mp-user-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.mp-user-mini {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
}

.mp-user-mini img { width: 28px; height: 28px; }

/* ===== 面包屑 ===== */
.mp-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 0 16px;
    font-size: 13px;
    color: #888;
}

.mp-breadcrumb a:hover { color: var(--mp-selected); }
.mp-crumb-current { color: var(--mp-text); font-weight: 600; }

/* ===== 板块信息条 ===== */
.mp-board-bar {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: var(--mp-surface);
    margin-bottom: 12px;
}

.mp-board-bar-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.mp-board-bar-info { flex: 1; }
.mp-board-bar-info h1 { font-size: 20px; font-weight: 600; }
.mp-board-bar-info p { font-size: 12px; color: #888; margin-top: 2px; }

.mp-new-post-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    transition: opacity 0.2s;
}

.mp-new-post-btn:hover { opacity: 0.85; }

/* ===== 帖子列表 ===== */
.mp-thread-list {
    background: var(--mp-surface);
    border: 1px solid var(--mp-border);
}

.mp-thread {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--mp-border);
    transition: background 0.2s;
}

.mp-thread:last-child { border-bottom: none; }
.mp-thread:hover { background: var(--mp-gray); }

.mp-thread-avatar { width: 40px; height: 40px; flex-shrink: 0; }

.mp-thread-body { flex: 1; min-width: 0; }

.mp-thread-title {
    font-size: 15px;
    font-weight: 500;
    color: var(--mp-text);
    display: block;
    margin-bottom: 4px;
}

.mp-thread-title:hover { color: var(--mp-selected); }

.mp-thread-meta {
    display: flex;
    gap: 14px;
    font-size: 12px;
    color: #999;
    flex-wrap: wrap;
}

.mp-thread-time { color: var(--mp-primary); }

.mp-thread-tag {
    font-size: 11px;
    color: #fff;
    padding: 3px 10px;
    font-weight: 600;
    flex-shrink: 0;
}

/* ===== 分页 ===== */
.mp-pagination {
    display: flex;
    gap: 4px;
    justify-content: center;
    padding: 20px 0;
    flex-wrap: wrap;
}

.mp-page {
    min-width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--mp-surface);
    border: 1px solid var(--mp-border);
    color: var(--mp-text);
    font-size: 14px;
    padding: 0 10px;
    transition: all 0.2s;
}

.mp-page:hover { border-color: var(--mp-primary); color: var(--mp-primary); }

.mp-page-active {
    background: var(--mp-primary);
    color: #fff;
    border-color: var(--mp-primary);
}

.mp-page-disabled { opacity: 0.4; pointer-events: none; }

.mp-page-ellipsis { line-height: 36px; color: #999; padding: 0 4px; }

/* ===== 帖子详情 ===== */
.mp-topic-head {
    padding: 16px;
    background: var(--mp-surface);
    margin-bottom: 12px;
}

.mp-topic-head h1 { font-size: 20px; font-weight: 600; margin-bottom: 6px; }

.mp-topic-meta {
    display: flex;
    gap: 14px;
    font-size: 12px;
    color: #888;
    flex-wrap: wrap;
}

.mp-post {
    background: var(--mp-surface);
    margin-bottom: 8px;
    border: 1px solid var(--mp-border);
}

.mp-post-op { border-left: 4px solid var(--mp-primary); }

.mp-post-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--mp-border);
}

.mp-post-avatar { width: 44px; height: 44px; }

.mp-post-author { flex: 1; }
.mp-post-author strong { display: block; font-size: 14px; }

.mp-post-role {
    display: inline-block;
    font-size: 11px;
    color: #fff;
    padding: 2px 8px;
    margin-top: 2px;
}

.mp-post-floor { font-size: 13px; color: #999; }

.mp-post-body {
    padding: 16px;
    font-size: 14px;
    line-height: 1.8;
    overflow: hidden;
    word-wrap: break-word;
}

.mp-post-body p { margin-bottom: 12px; }

.mp-post-img { max-width: 100%; margin-top: 8px; display: block; }

.mp-post-foot {
    display: flex;
    gap: 4px;
    padding: 10px 16px;
    border-top: 1px solid var(--mp-border);
}

.mp-act-btn {
    background: none;
    border: 1px solid var(--mp-border);
    color: #666;
    font-size: 13px;
    padding: 6px 14px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}

.mp-act-btn:hover {
    background: var(--mp-primary);
    color: #fff;
    border-color: var(--mp-primary);
}

/* ===== 回复框 ===== */
.mp-reply {
    background: var(--mp-surface);
    border: 1px solid var(--mp-border);
    padding: 16px;
    margin-top: 12px;
}

.mp-reply h3 { font-size: 15px; font-weight: 600; margin-bottom: 10px; }

.mp-reply textarea {
    width: 100%;
    min-height: 100px;
    padding: 10px;
    border: 2px solid var(--mp-border);
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    outline: none;
}

.mp-reply textarea:focus { border-color: var(--mp-primary); }

.mp-reply-bar {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 8px;
}

.mp-reply-tool {
    padding: 6px 12px;
    background: var(--mp-gray);
    border: 1px solid var(--mp-border);
    cursor: pointer;
    font-size: 13px;
    font-family: inherit;
}

.mp-reply-tool:hover { background: var(--mp-primary); color: #fff; }

.mp-reply-submit {
    margin-left: auto;
    color: #fff;
    border: none;
    padding: 8px 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}

.mp-reply-submit:hover { opacity: 0.85; }

/* ===== 搜索页 ===== */
.mp-filter-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.mp-filter-label { font-size: 13px; color: #888; margin-right: 4px; }

.mp-filter-chip {
    padding: 6px 14px;
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 13px;
    font-family: inherit;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.mp-filter-chip:hover { opacity: 0.85; }
.mp-filter-on { opacity: 1; outline: 3px solid var(--mp-selected); outline-offset: 1px; }

.mp-result-count { font-size: 13px; color: #888; margin-bottom: 12px; }

.mp-result-list { display: flex; flex-direction: column; gap: 8px; }

.mp-result {
    background: var(--mp-surface);
    border: 1px solid var(--mp-border);
    padding: 14px 16px;
    border-left: 4px solid var(--mp-primary);
    transition: box-shadow 0.2s;
}

.mp-result:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.06); }

.mp-result-cat {
    display: inline-block;
    font-size: 11px;
    color: #fff;
    padding: 2px 8px;
    margin-bottom: 6px;
}

.mp-result-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--mp-text);
    display: block;
    margin-bottom: 4px;
}

.mp-result-title:hover { color: var(--mp-selected); }

.mp-result-desc { font-size: 13px; color: #666; line-height: 1.6; margin-bottom: 6px; }

.mp-result-meta {
    display: flex;
    gap: 14px;
    font-size: 12px;
    color: #999;
}

.mp-hot-search {
    background: var(--mp-surface);
    border: 1px solid var(--mp-border);
    padding: 16px;
    margin-top: 16px;
}

.mp-hot-search h3 { font-size: 15px; font-weight: 600; margin-bottom: 10px; }

.mp-hot-tags { display: flex; gap: 6px; flex-wrap: wrap; }

.mp-hot-tag {
    padding: 6px 14px;
    color: #fff;
    font-size: 13px;
    transition: transform 0.2s;
}

.mp-hot-tag:hover { transform: scale(0.95); }

/* ===== 页脚 ===== */
.mp-footer {
    padding: 16px 20px;
    text-align: center;
    font-size: 12px;
    color: #999;
    border-top: 1px solid var(--mp-border);
    background: var(--mp-surface);
}

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
    .mp-content-body { grid-template-columns: minmax(0,1fr) 280px !important; }
    .mp-card-grid { grid-template-columns: 1fr; }
    .mp-sidebar { width: 60px; }
    .mp-sidebar .mp-nav-tile span { display: none; }
    .mp-cmd-center { display: none; }
}

@media (max-width: 760px) {
    .mp-content-body { grid-template-columns: 1fr !important; }
}

@media (max-width: 640px) {
    .mp-sidebar { display: none; }
    .mp-user-name { display: none; }
    .mp-banner { height: 100px; }
}

/* ===== CMS扩展样式 ===== */

/* ---------- 分页(CMS) ---------- */
.jv-pagination {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    padding: 20px 0;
    justify-content: center;
}
.jv-page-info {
    font-size: 13px;
    color: #888;
    margin-right: 12px;
}
.jv-pagination a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    background: var(--mp-surface);
    border: 1px solid var(--mp-border);
    color: var(--mp-text);
    transition: all 0.2s;
    text-decoration: none;
}
.jv-pagination a:hover {
    border-color: var(--mp-primary);
    color: var(--mp-primary);
}
.jv-pagination a.active {
    background: var(--mp-primary);
    border-color: var(--mp-primary);
    color: #fff;
    font-weight: 600;
}
.jv-pagination a.disabled {
    color: #999;
    border-color: var(--mp-border);
    cursor: not-allowed;
    pointer-events: none;
    opacity: 0.4;
}
.jv-page-dots {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    color: #999;
    font-size: 14px;
}

/* ---------- 评论区 ---------- */
.comment-section { margin-top: 0; }
.comment-form-area { margin-bottom: 20px; }
.comment-login-notice {
    background: var(--mp-surface);
    border: 1px solid var(--mp-border);
    padding: 20px;
    text-align: center;
}
.comment-list { display: flex; flex-direction: column; }
.comment-item {
    display: flex;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid var(--mp-border);
}
.comment-item:last-child { border-bottom: none; }
.comment-avatar {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: var(--mp-primary);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}
.comment-main { flex: 1; min-width: 0; }
.comment-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}
.comment-author { font-size: 14px; font-weight: 700; color: var(--mp-text); }
.comment-reply-to { font-size: 12px; color: #888; }
.comment-reply-to::before { content: '\2192'; margin-right: 3px; }
.comment-time { font-size: 12px; color: #888; margin-left: auto; }
.comment-content { font-size: 14px; color: var(--mp-text); line-height: 1.7; word-break: break-word; }
.comment-actions { margin-top: 8px; }
.comment-reply-btn {
    display: inline-flex;
    align-items: center;
    height: 26px;
    padding: 0 12px;
    border: none;
    background: transparent;
    color: #888;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}
.comment-reply-btn:hover { color: var(--mp-primary); }
.comment-reply-form { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.comment-reply-input {
    width: 100%;
    border: 1px solid var(--mp-border);
    padding: 10px 14px;
    font-size: 13px;
    line-height: 1.5;
    resize: vertical;
    min-height: 60px;
    font-family: inherit;
    background: var(--mp-gray);
    color: var(--mp-text);
    transition: border-color 0.2s;
    outline: none;
}
.comment-reply-input:focus { border-color: var(--mp-primary); }
.comment-reply-submit {
    align-self: flex-end;
    display: inline-flex;
    align-items: center;
    height: 32px;
    padding: 0 16px;
    border: 1px solid var(--mp-primary);
    background: var(--mp-primary);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.comment-reply-submit:hover { opacity: 0.85; }
.comment-reply-submit:disabled { opacity: 0.6; cursor: not-allowed; }
.comment-replies {
    margin-left: 52px;
    padding-left: 16px;
    border-left: 2px solid var(--mp-border);
    display: flex;
    flex-direction: column;
}
.comment-reply-item {
    display: flex;
    gap: 10px;
    padding: 12px 0;
    border-bottom: 1px solid var(--mp-border);
}
.comment-reply-item:last-child { border-bottom: none; }
.comment-reply-item .comment-avatar { width: 32px; height: 32px; font-size: 13px; }
.comment-reply-item .comment-author { font-size: 13px; }
.comment-reply-item .comment-content { font-size: 13px; }
.comment-empty { text-align: center; padding: 32px 16px; color: #888; font-size: 14px; }
.comment-empty p { margin: 0; }
.comment-load-more { display: flex; justify-content: center; padding: 16px 0; }
.comment-load-more-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    padding: 0 28px;
    border: 1px solid var(--mp-border);
    background: var(--mp-gray);
    color: #888;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.comment-load-more-btn:hover { border-color: var(--mp-primary); color: var(--mp-primary); }
.comment-submit-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.comment-char-count { font-size: 13px; color: #888; }

/* ===== 强制布局规则 ===== */
.mp-content-body {
    display: grid !important;
    grid-template-columns: minmax(0,1fr) 280px !important;
    gap: 16px !important;
    align-items: start !important;
}
.mp-main-col {
    min-width: 0 !important;
    overflow: hidden !important;
}
.mp-aside {
    min-width: 0 !important;
}
.mp-post-body,
.mp-result-desc,
.mp-thread-body {
    overflow: hidden;
    word-wrap: break-word;
}
.mp-post-body img,
.mp-result-desc img {
    max-width: 100%;
    height: auto;
}
.mp-post-body table {
    max-width: 100%;
    table-layout: fixed;
    word-wrap: break-word;
}
.mp-post-body pre,
.mp-post-body code {
    overflow-x: auto;
    max-width: 100%;
    word-wrap: break-word;
}

@media (max-width: 760px) {
    .mp-content-body {
        grid-template-columns: 1fr !important;
    }
}
