@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;600;700;800&display=swap');

/* ================================
   CSS 变量系统
   ================================ */

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

:root {
    /* ===== 背景色系统 ===== */
    --bg: #faf8f5;
    --bg-card: #ffffff;
    --bg-card-hover: #fdf8f6;
    --bg-input: #f3f0ee;

    /* ===== 文字颜色系统 ===== */
    --text: #1a1412;
    --text-secondary: #6b5e58;
    --text-tertiary: #9a8d86;

    /* ===== 边框系统 ===== */
    --border: #e5e0dc;
    --border-light: #f0ebe8;

    /* ===== 品牌色系统 (勃艮第红) ===== */
    --brand: #722f37;
    --brand-light: rgba(114, 47, 55, 0.1);
    --brand-gradient: linear-gradient(135deg, #722f37, #8b3a62);

    /* ===== 功能色系统 ===== */
    --success: #16a34a;
    --success-bg: #f0fdf4;
    --warning: #ea580c;
    --warning-bg: #fff7ed;
    --error: #dc2626;
    --error-bg: #fef2f2;

    /* ===== 阴影系统 (暖色调) ===== */
    --shadow-sm: 0 1px 3px rgba(26, 20, 18, 0.06), 0 1px 2px rgba(26, 20, 18, 0.04);
    --shadow-md: 0 4px 12px rgba(26, 20, 18, 0.08), 0 2px 4px rgba(26, 20, 18, 0.04);
    --shadow-lg: 0 12px 24px rgba(26, 20, 18, 0.10), 0 4px 8px rgba(26, 20, 18, 0.06);
    --shadow-xl: 0 20px 40px rgba(26, 20, 18, 0.12), 0 8px 16px rgba(26, 20, 18, 0.08);

    /* ===== 圆角 ===== */
    --radius: 20px;
    --radius-sm: 14px;
    --radius-xs: 10px;
}

@media (prefers-color-scheme: dark) {
    :root {
        /* ===== 背景色系统 ===== */
        --bg: #0f0d0c;
        --bg-card: #181412;
        --bg-card-hover: #1f1a17;
        --bg-input: #25201d;

        /* ===== 文字颜色系统 ===== */
        --text: #f0e8e4;
        --text-secondary: #8a7b74;
        --text-tertiary: #6b5e58;

        /* ===== 边框系统 ===== */
        --border: #2e2824;
        --border-light: #25201d;

        /* ===== 品牌色系统 ===== */
        --brand: #b87790;
        --brand-light: rgba(184, 119, 144, 0.12);
        --brand-gradient: linear-gradient(135deg, #b87790, #d4a574);

        /* ===== 功能色系统 ===== */
        --success: #4ade80;
        --success-bg: #14532d;
        --warning: #fb923c;
        --warning-bg: #4c2d16;
        --error: #f87171;
        --error-bg: #451a1a;

        /* ===== 阴影系统 ===== */
        --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2);
        --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.35), 0 2px 4px rgba(0, 0, 0, 0.25);
        --shadow-lg: 0 12px 24px rgba(0, 0, 0, 0.4), 0 4px 8px rgba(0, 0, 0, 0.3);
        --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.45), 0 8px 16px rgba(0, 0, 0, 0.35);
    }
}

body {
    font-family: "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ================================
   布局容器
   ================================ */

.container {
    max-width: 1050px;
    margin: 0 auto;
    padding: 32px 24px 96px;
}

/* ================================
   Header 导航栏
   ================================ */

.site-header {
    background: rgba(255, 255, 255, 0.82);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
}

.header-inner {
    max-width: 1050px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.site-logo {
    flex-shrink: 0;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--text);
}

.site-logo:hover {
    color: var(--brand);
}

.header-nav {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
    order: 1;
}

.header-search {
    margin-left: auto;
    width: 320px;
    flex-shrink: 0;
    display: flex;
    gap: 8px;
    order: 2;
}

.nav-link {
    padding: 8px 16px;
    border-radius: var(--radius-xs);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.nav-link:hover {
    color: var(--text);
    background: var(--bg-input);
}

.nav-link.active {
    color: var(--text);
    background: var(--bg-input);
    font-weight: 600;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--brand);
}

/* 汉堡按钮 */
.hamburger-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    padding: 8px;
    margin-left: auto;
    background: none;
    border: none;
    cursor: pointer;
    border-radius: var(--radius-xs);
    transition: background 0.15s ease;
}

.hamburger-btn:hover {
    background: var(--bg-input);
}

.hamburger-btn span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text);
    border-radius: 1px;
    transition: all 0.3s ease;
}

.hamburger-btn span + span {
    margin-top: 4px;
}

.hamburger-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger-btn.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* 移动端菜单 */
.mobile-menu {
    /* PC端正常显示 */
}

/* 搜索框 */

.search-input {
    width: auto;
    flex: 1;
    height: 40px;
    padding: 0 16px 0 40px;
    border: 1px solid transparent;
    border-radius: 100px;
    background: var(--bg-input);
    color: var(--text);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 14px center;
    background-size: 16px;
}

.search-input::placeholder {
    color: var(--text-tertiary);
}

.search-input:hover {
    border-color: var(--border);
    background-color: var(--bg-card);
    box-shadow: var(--shadow-sm);
}

.search-input:focus {
    border-color: var(--brand);
    background-color: var(--bg-card);
    box-shadow: 0 0 0 3px var(--brand-light), var(--shadow-sm);
}

/* 搜索按钮 */
.search-btn {
    flex-shrink: 0;
    height: 40px;
    padding: 0 20px;
    border: none;
    border-radius: 100px;
    background: var(--brand-gradient);
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-btn:hover {
    box-shadow: 0 4px 16px rgba(114, 47, 55, 0.3);
    transform: translateY(-1px);
}

.search-btn:active {
    transform: translateY(0);
    box-shadow: none;
}

@media (prefers-color-scheme: dark) {
    .search-btn {
        background: var(--brand-gradient);
    }

    .search-btn:hover {
        box-shadow: 0 4px 16px rgba(184, 119, 144, 0.4);
    }
}

@media (prefers-color-scheme: dark) {
    .site-header {
        background: rgba(24, 20, 18, 0.82);
    }

    .search-input {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2371717a' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E");
    }
}

/* ================================
   Footer
   ================================ */

.site-footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    padding: 28px 24px;
    text-align: center;
    box-shadow: 0 -4px 12px rgba(26, 20, 18, 0.03);
}

@media (prefers-color-scheme: dark) {
    .site-footer {
        box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.2);
    }
}

.footer-link {
    font-size: 14px;
    color: var(--text-secondary);
    transition: color 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.footer-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--brand);
    transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.footer-link:hover {
    color: var(--brand);
}

.footer-link:hover::after {
    width: 100%;
}

/* ================================
    页面头部 (Page Header)
    ================================ */

.page-header {
    margin-bottom: 36px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
    position: relative;
}

.page-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 80px;
    height: 2px;
    background: linear-gradient(90deg, var(--brand), transparent);
    border-radius: 1px;
}

.page-header-top {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 12px;
}

.page-header-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
}

.page-header-text {
    flex: 1;
    min-width: 0;
}

.page-label {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--brand);
    margin-bottom: 10px;
    background: var(--brand-light);
    padding: 4px 10px;
    border-radius: 6px;
}

.page-title {
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -0.4px;
    line-height: 1.3;
    color: var(--text);
    margin-bottom: 0;
    background: linear-gradient(135deg, var(--text) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

@media (prefers-color-scheme: dark) {
    .page-title {
        background: linear-gradient(135deg, var(--text) 0%, var(--text-secondary) 100%);
        -webkit-background-clip: text;
        background-clip: text;
    }
}

.page-header-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 4px;
}

.meta-item {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

.page-stats {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.stat-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-card);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-pill:hover {
    border-color: var(--brand);
    box-shadow: 0 0 0 2px var(--brand-light);
}

.stat-pill strong {
    color: var(--text);
    font-weight: 700;
}

/* ================================
   徽章 (Badges)
   ================================ */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 600;
    flex-shrink: 0;
}

.badge svg {
    width: 10px;
    height: 10px;
}

.badge-video {
    background: var(--error-bg);
    color: var(--error);
}

.badge-img {
    background: var(--success-bg);
    color: var(--success);
}

/* ================================
   INDEX - 版块卡片
   ================================ */

.forum-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.forum-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
    position: relative;
}

.forum-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--brand-gradient);
    background-size: 200% 100%;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: var(--radius) var(--radius) 0 0;
}

.forum-card:hover {
    box-shadow: var(--shadow-lg);
    border-color: transparent;
    transform: translateY(-3px);
}

.forum-card:hover::before {
    opacity: 1;
}

.forum-card.empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    color: var(--text-tertiary);
    font-size: 15px;
    font-weight: 500;
}

.forum-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 26px 28px 22px;
    border-bottom: 1px solid var(--border-light);
    background: linear-gradient(180deg, var(--bg-card-hover) 0%, transparent 100%);
}

.forum-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.forum-header-text {
    flex: 1;
    min-width: 0;
}

.forum-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.2px;
}

.forum-count {
    font-size: 13px;
    color: var(--text-tertiary);
    margin-top: 2px;
}

/* 版块内帖子列表 */
.forum-thread-list {
    padding: 8px 16px;
}

.forum-thread-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 12px;
    border-radius: var(--radius-xs);
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.forum-thread-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: var(--brand);
    border-radius: 2px;
    transition: height 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.forum-thread-item:hover {
    background: var(--bg-card-hover);
}

.forum-thread-item:hover::before {
    height: 60%;
}

.forum-thread-index {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-tertiary);
    background: var(--border-light);
}

.forum-thread-item:hover .forum-thread-index {
    color: #ffffff;
}

.forum-thread-content {
    flex: 1;
    min-width: 0;
}

.forum-thread-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
    margin-bottom: 6px;
}

.forum-thread-title {
    flex: 1;
    min-width: 0;
    font-size: 15px;
    font-weight: 500;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.15s ease;
}

.forum-thread-item:hover .forum-thread-title {
    color: var(--text-secondary);
}

.forum-thread-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: var(--text-tertiary);
}

.forum-thread-author {
    font-weight: 500;
    color: var(--text-secondary);
}

.forum-thread-time::before {
    content: "·";
    margin-right: 12px;
    color: var(--text-tertiary);
}

.empty-icon {
    width: 48px;
    height: 48px;
    margin-right: 16px;
    opacity: 0.3;
}

/* 版块头部链接 */
a.forum-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 24px 28px 20px;
    border-bottom: 1px solid var(--border-light);
    text-decoration: none;
    color: inherit;
    transition: background 0.15s ease;
}

a.forum-header:hover {
    background: var(--bg-card-hover);
}

/* 查看更多链接 */
.forum-view-more {
    padding: 16px 28px;
    border-top: 1px solid var(--border-light);
    text-align: center;
    background: linear-gradient(180deg, transparent 0%, var(--bg-card-hover) 100%);
}

.forum-view-more a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 6px 14px;
    border-radius: var(--radius-xs);
}

.forum-view-more a:hover {
    color: var(--brand);
    background: var(--brand-light);
}

/* ================================
   LIST - 帖子列表
   ================================ */

.thread-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.thread-card {
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.thread-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-sm);
    box-shadow: inset 0 0 0 1px var(--brand);
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}

.thread-card:hover {
    border-color: transparent;
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.thread-card:hover::after {
    opacity: 1;
}

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

.thread-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    overflow: hidden;
    min-width: 0;
    width: 100%;
}

.thread-title {
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    flex: 1 1 0;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

.badge-group {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.thread-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 13px;
    color: var(--text-secondary);
}

.thread-meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.thread-meta-item > span:empty {
    display: none;
}

.thread-meta-icon {
    width: 14px;
    height: 14px;
    opacity: 0.5;
}

.thread-pages {
    background: var(--bg-input);
    padding: 2px 10px;
    border-radius: 6px;
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

.thread-time {
    color: var(--text-tertiary);
    font-size: 13px;
}

.thread-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    margin-left: 24px;
}

/* 分页 */
.pagination-wrapper {
    margin-top: 48px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: var(--radius-xs);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-card);
    border: 1px solid var(--border);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.page-btn:hover {
    border-color: var(--brand);
    color: var(--brand);
    background: var(--bg-card);
    box-shadow: 0 0 0 2px var(--brand-light);
    transform: translateY(-1px);
}

.page-btn.active {
    background: var(--brand-gradient);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(114, 47, 55, 0.3);
}

.page-btn.disabled {
    color: var(--text-tertiary);
    pointer-events: none;
    border-color: var(--border-light);
    background: var(--bg-input);
    opacity: 0.5;
    box-shadow: none;
}

.page-ellipsis {
    color: var(--text-tertiary);
    padding: 0 8px;
    font-size: 14px;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 80px 24px;
    color: var(--text-tertiary);
}

.empty-state-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    opacity: 0.3;
}

/* ================================
   THREAD - 帖子详情
   ================================ */

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    margin-bottom: 24px;
    border-radius: var(--radius-xs);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--bg-card);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.back-link:hover {
    color: var(--brand);
    border-color: var(--brand);
    background: var(--bg-card);
    box-shadow: 0 0 0 2px var(--brand-light);
    transform: translateX(-2px);
}

.back-link svg {
    width: 16px;
    height: 16px;
}

.thread-header {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 36px 32px;
    margin-bottom: 24px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.thread-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--brand-gradient);
    border-radius: var(--radius) var(--radius) 0 0;
}

.thread-header h1 {
    font-size: 28px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.4px;
    margin-bottom: 18px;
    line-height: 1.35;
}

.thread-header .forum-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    margin-bottom: 12px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
    color: var(--brand);
    background: var(--brand-light);
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
}

.thread-header .forum-badge:hover {
    border-color: var(--brand);
    box-shadow: 0 0 0 2px var(--brand-light);
}

.thread-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 14px;
    color: var(--text-secondary);
}

.thread-stat {
    display: flex;
    align-items: center;
    gap: 6px;
}

.thread-stat svg {
    width: 16px;
    height: 16px;
    opacity: 0.5;
}

.thread-stat-value {
    font-weight: 600;
    color: var(--text);
}

/* 帖子卡片 */
.post-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    margin-bottom: 16px;
    border: 1px solid var(--border);
    overflow: hidden;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
}

.post-card:hover {
    box-shadow: var(--shadow-md);
    border-color: transparent;
}

.post-card.subject {
    border: 1.5px solid var(--brand);
    box-shadow: 0 0 0 3px var(--brand-light), var(--shadow-sm);
}

.post-card.subject:hover {
    box-shadow: 0 0 0 3px var(--brand-light), var(--shadow-md);
}

.post-header {
    display: flex;
    align-items: center;
    padding: 18px 24px;
    background: linear-gradient(180deg, var(--bg-card-hover) 0%, var(--bg-input) 100%);
    border-bottom: 1px solid var(--border);
    gap: 12px;
}

.post-avatar {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, #fdf2f4, #fce7e9);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
    color: var(--brand);
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(114, 47, 55, 0.2);
}

.post-card.subject .post-avatar {
    background: var(--error-bg);
    color: var(--error);
}

.post-author-info {
    flex: 1;
    min-width: 0;
}

.post-author {
    font-weight: 600;
    font-size: 15px;
    color: var(--text);
}

.post-card.subject .post-author::after {
    content: 'OP';
    display: inline-block;
    margin-left: 8px;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    background: var(--error-bg);
    color: var(--error);
}

.post-time {
    font-size: 13px;
    color: var(--text-tertiary);
    margin-top: 2px;
}

.post-likes {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border-radius: var(--radius-xs);
    background: var(--error-bg);
    font-size: 13px;
    font-weight: 600;
    color: var(--error);
}

.post-likes svg {
    width: 14px;
    height: 14px;
}

/* 0点赞 - 灰色 */
.post-likes.zero {
    background: var(--bg-input);
    color: var(--text-tertiary);
}

@media (prefers-color-scheme: dark) {
    .post-likes.zero {
        background: var(--bg-input);
        color: var(--text-tertiary);
    }
}

.reply-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 6px;
    background: var(--bg-input);
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-left: 8px;
}

.post-body {
    padding: 28px 24px;
    font-size: 16px;
    color: var(--text);
    word-break: break-word;
    line-height: 1.75;
}

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

.post-body strong {
    font-weight: 600;
    color: var(--text);
}

.post-body a {
    color: var(--brand);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.post-body a:hover {
    opacity: 0.8;
}

.post-media {
    margin: 16px 0;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.post-media img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius-sm);
}

.post-media video {
    max-width: 100%;
    border-radius: var(--radius-sm);
}

.post-body blockquote {
    margin: 16px 0;
    padding: 14px 18px;
    border-left: 3px solid var(--brand);
    background: linear-gradient(90deg, var(--brand-light) 0%, transparent 100%);
    color: var(--text-secondary);
    border-radius: 0 var(--radius-xs) var(--radius-xs) 0;
    font-size: 15px;
}

.post-body pre {
    margin: 16px 0;
    padding: 16px;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    overflow-x: auto;
    font-size: 14px;
    line-height: 1.5;
}

.post-body pre code {
    font-family: "SF Mono", "Fira Code", "Fira Mono", Menlo, Consolas, monospace;
    color: var(--text);
}

.post-body ul {
    margin: 12px 0;
    padding-left: 24px;
}

.post-body li {
    margin-bottom: 6px;
}

/* 回帖分隔线 */
.reply-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
}

.reply-divider::before,
.reply-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.reply-divider span {
    font-size: 12px;
    color: var(--text-tertiary);
}

/* 暂无回帖提示 */
.no-replies {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 20px;
    color: var(--text-tertiary);
    font-size: 14px;
}

.no-replies svg {
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
    opacity: 0.4;
}

/* ================================
   点评 (Comments)
   ================================ */

.post-comments {
    padding: 20px 24px;
    border-top: 1px solid var(--border-light);
    background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg) 100%);
}

.comments-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.comments-header svg {
    width: 14px;
    height: 14px;
    opacity: 0.6;
}

.comment-item {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 10px 14px;
    margin-bottom: 6px;
    border-radius: var(--radius-xs);
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    font-size: 14px;
    line-height: 1.5;
    flex-wrap: wrap;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.comment-item:hover {
    border-color: var(--border);
    box-shadow: var(--shadow-sm);
}

.comment-item:last-child {
    margin-bottom: 0;
}

.comment-author {
    font-weight: 600;
    color: var(--text);
    flex-shrink: 0;
}

.comment-content {
    flex: 1;
    min-width: 0;
    color: var(--text);
    word-break: break-word;
}

.comment-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    font-size: 12px;
    color: var(--text-tertiary);
}

.comment-time {
    color: var(--text-tertiary);
}

.comment-likes {
    color: var(--warning);
    font-weight: 500;
}

/* ================================
   响应式设计
   ================================ */

@media (max-width: 768px) {
    .container {
        padding: 24px 16px 64px;
    }

    .header-inner {
        padding: 12px 16px;
        gap: 12px;
        position: relative;
    }

    .site-logo {
        font-size: 18px;
    }

    /* 移动端显示汉堡按钮 */
    .hamburger-btn {
        display: flex;
    }

    /* 移动端隐藏搜索框和导航 (默认状态) */
    .header-search,
    .header-nav {
        display: none;
    }

    /* 菜单打开状态 - 显示搜索框和导航，导航在上，搜索在下 */
    .header-inner.menu-open {
        flex-wrap: wrap;
    }

    .header-inner.menu-open .header-nav {
        display: flex;
        position: relative;
        top: auto;
        width: 100%;
        order: 3;
        flex-direction: column;
        gap: 4px;
        padding: 8px 16px;
        background: var(--bg-card);
    }

    .header-inner.menu-open .header-search {
        display: flex;
        flex-direction: row;
        position: relative;
        top: auto;
        width: 100%;
        max-width: 100%;
        order: 4;
        padding: 12px 16px;
        background: var(--bg-card);
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow-lg);
        box-sizing: border-box;
        overflow: hidden;
        gap: 8px;
    }

    .header-inner.menu-open .search-input {
        padding: 0 12px 0 36px;
        font-size: 13px;
        background-position: 10px center;
        background-size: 14px;
        width: 100%;
    }

    .header-inner.menu-open .search-btn {
        padding: 0 12px;
        font-size: 13px;
        white-space: nowrap;
        flex-shrink: 0;
        text-align: center;
    }

    .header-inner.menu-open .nav-link {
        padding: 12px 16px;
        width: 100%;
        text-align: left;
    }

    .header-inner.menu-open .nav-link.active::after {
        bottom: 50%;
        left: 8px;
        top: auto;
        transform: translateY(50%);
    }

    .page-title {
        font-size: 28px;
    }

    .forum-header {
        padding: 20px 20px 16px;
    }

    .forum-name {
        font-size: 18px;
    }

    .forum-icon {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }

    .forum-thread-list {
        padding: 4px 12px 8px;
    }

    .forum-thread-item {
        padding: 12px 8px;
    }

    .forum-thread-title {
        font-size: 14px;
    }

    .forum-thread-index {
        display: none;
    }

    .thread-card {
        flex-direction: row;
        align-items: center;
        padding: 16px;
        gap: 12px;
    }

    .thread-title-row {
        flex-wrap: nowrap;
    }

    .thread-actions {
        margin-left: 0;
    }

    .thread-meta {
        flex-wrap: wrap;
        gap: 12px;
    }

    .pagination-wrapper {
        gap: 4px;
    }

    .page-btn {
        min-width: 36px;
        height: 36px;
        font-size: 13px;
    }

    .thread-header {
        padding: 20px 16px;
        border-radius: var(--radius-sm);
    }

    .thread-header h1 {
        font-size: 20px;
    }

    .post-header {
        padding: 12px 16px;
        flex-wrap: wrap;
    }

    .post-avatar {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }

    .post-body {
        padding: 16px;
        font-size: 16px;
    }

    .post-likes {
        padding: 4px 10px;
        font-size: 12px;
    }

    .thread-stats {
        gap: 12px;
        font-size: 13px;
    }

    .thread-list .hide-mobile {
        display: inline;
    }

    .hide-mobile {
        display: none;
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 24px;
    }

    .stat-pill {
        font-size: 12px;
        padding: 5px 10px;
    }

    .forum-header {
        padding: 16px 16px 14px;
    }

    .forum-name {
        font-size: 16px;
    }

    .thread-title {
        font-size: 15px;
        max-width: 100% !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }

    .thread-meta-item {
        font-size: 12px;
    }

    .thread-header h1 {
        font-size: 18px;
    }

    .post-author {
        font-size: 14px;
    }

    .post-time {
        font-size: 12px;
    }
}

@media (max-width: 768px) {
    .post-comments {
        padding: 12px 16px 16px;
    }

    .comment-item {
        padding: 8px 10px;
        font-size: 13px;
    }
}

/* ================================
   作者链接样式
   ================================ */

.author-link {
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.author-link:hover {
    color: var(--brand);
}

/* ================================
   友情链接
   ================================ */

.friend-links {
    margin: 32px 0 24px;
    padding: 24px;
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}

.friend-links-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--brand);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.friend-links-title::before {
    content: '';
    width: 4px;
    height: 18px;
    background: var(--brand);
    border-radius: 2px;
}

.friend-links-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.friend-link-item {
    display: inline-block;
    padding: 6px 14px;
    font-size: 13px;
    color: var(--text-secondary);
    background: var(--bg-input);
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.friend-link-item:hover {
    color: #fff;
    background: var(--brand);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(114, 47, 55, 0.2);
}

@media (max-width: 640px) {
    .friend-links {
        margin: 24px 0 16px;
        padding: 18px;
    }

    .friend-links-title {
        font-size: 15px;
        margin-bottom: 12px;
    }

    .friend-links-grid {
        gap: 8px;
    }

    .friend-link-item {
        font-size: 12px;
        padding: 5px 12px;
    }
}

/* =========================================
   横幅广告 (hengfu)
   ========================================= */
.main-feature-section {
    width: 100%;
    max-width: 1050px;
    margin: 0 auto;
    padding: 0 24px;
}

.main-feature-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
}

.main-feature-item {
    display: block;
    width: 100%;
    line-height: 0;
    overflow: hidden;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    transition: border-color 0.2s ease;
}

.main-feature-item:hover {
    border-color: var(--border-light);
}

.main-feature-item img {
    display: block;
    width: 100%;
    height: calc(var(--feature-pc-base, 80px) * var(--feature-scale, 100) / 100);
    object-fit: fill;
}

/* 横幅广告移动端适配 */
@media (max-width: 768px) {
    .main-feature-section {
        padding: 0 16px;
        max-width: 100%;
        overflow-x: hidden;
    }

    .main-feature-item img {
        height: calc(var(--feature-mobile-base, 60px) * var(--feature-scale, 100) / 100);
    }
}


/* =========================================
   底飘广告（bottom-ad），仅移动端显示
   高度由行内 CSS 变量 --main-bottom-height 控制
   ========================================= */
.main-bottom-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: #fff;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
    height: var(--main-bottom-height, 80px);
    line-height: 0;
}

.main-bottom-link {
    display: block;
    width: 100%;
    height: 100%;
}

.main-bottom-img {
    width: 100%;
    height: var(--main-bottom-height, 80px);
    object-fit: fill;
    display: block;
}

.main-bottom-close {
    position: absolute;
    top: 0;
    right: 0;
    width: 28px;
    height: 28px;
    background: rgba(0, 0, 0, 0.4);
    color: #fff;
    border: none;
    font-size: 18px;
    line-height: 28px;
    cursor: pointer;
    padding: 0;
    border-radius: 0 0 0 6px;
    z-index: 10;
}

@media (max-width: 768px) {
    .main-bottom-bar {
        display: block;
    }

    body {
        padding-bottom: var(--main-bottom-height, 0px);
    }
}

