/* Shared styles across pages (index.html, content.html) */

/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: system-ui,-apple-system,Segoe UI,Rototo,Helvetica,Arial,sans-serif;
    font-size: 14px;
    color: #181C1F;
    line-height: 1.6;
    padding-top: 60px; /* 为固定顶部栏留出空间 */
    background-color: #f6f7f8;
}

/* 顶部固定栏 */
.top-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background-color: #ffffff;
    border-bottom: 1px solid #e0e0e0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.header-container {
    max-width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 20px;
    gap: 16px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-link {
    display: flex;
    align-items: center;
}

.logo {
    height: 40px;
    width: auto;
}

.header-center {
    flex: 1;
    max-width: 600px;
    margin: 0 auto;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.header-search-form{
    width: 100%;
    position: relative;
    display: flex;
    align-items: center;
}

.search-box i {
    position: absolute;
    left: 15px;
    color: #999;
    font-size: 14px;
}

.search-input {
    width: 100%;
    padding: 10px 15px 10px 40px;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    font-size: 14px;
    background-color: #f5f5f5;
    transition: background-color 0.2s, border-color 0.2s;
}

.search-input:focus {
    outline: none;
    background-color: #ffffff;
    border-color: #ff6600;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Mobile search icon (hidden on desktop) */
.header-mobile-search-btn{
    display: none;
}

/* Mobile search overlay */
.mobile-search-overlay{
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1200;
    display: none;
}
.mobile-search-overlay.show{
    display: block;
}
.mobile-search-bar{
    position: relative;
    height: 60px;
    background: #ffffff;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    padding: 0 12px;
}
.mobile-search-form{
    width: 100%;
    position: relative;
    display: flex;
    align-items: center;
}
.mobile-search-form i{
    position: absolute;
    left: 15px;
    color: #999;
    font-size: 14px;
}
.mobile-search-input{
    width: 100%;
    padding: 10px 44px 10px 40px;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    font-size: 14px;
    background-color: #f5f5f5;
    transition: background-color 0.2s, border-color 0.2s;
}
.mobile-search-input:focus{
    outline: none;
    background-color: #ffffff;
    border-color: #ff6600;
}
.mobile-search-close{
    position: absolute;
    right: 6px;
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    color: #666;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.mobile-search-close:hover{
    background: #f5f5f5;
}
.mobile-search-backdrop{
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.35);
}
body.no-scroll{
    overflow: hidden;
}

/* ===================================
   已登录状态 - 导航按钮
   =================================== */

/* 通用导航按钮样式 */
.header-nav-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 10px;
    background: none;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    position: relative;
}

.header-nav-btn:hover {
    background-color: #f5f5f5;
    color: #181C1F;
}

.header-nav-btn i {
    font-size: 16px;
}

.header-nav-btn .btn-text {
    font-size: 13px;
    font-weight: 500;
}

/* 创建按钮 */
.header-create-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
}

.header-create-btn:hover {
    background: linear-gradient(135deg, #5568d3 0%, #63408b 100%);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(102, 126, 234, 0.3);
}

.header-create-btn i {
    font-size: 15px;
}

/* 通知徽章 */
.notification-badge {
    position: absolute;
    top: 4px;
    right: 8px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: #dc3545;
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* ===================================
   用户菜单（下拉式）
   =================================== */

.header-user-menu {
    position: relative;
}

.user-menu-trigger {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px 6px 6px;
    background: none;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
}

.user-menu-trigger:hover {
    background-color: #f5f5f5;
}

.user-menu-trigger .user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #7c3aed 0%, #a78bfa 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 16px;
    overflow: hidden;
}

.user-menu-trigger .user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-menu-trigger .user-name {
    font-size: 14px;
    font-weight: 500;
    color: #181C1F;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-menu-trigger .dropdown-icon {
    font-size: 12px;
    color: #666;
    transition: transform 0.3s;
}

.user-menu-trigger.active .dropdown-icon {
    transform: rotate(180deg);
}

/* 下拉菜单 */
.user-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 240px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.user-dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    padding: 14px;
}

.dropdown-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar-large {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #7c3aed 0%, #a78bfa 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 24px;
    overflow: hidden;
    flex-shrink: 0;
}

.user-avatar-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dropdown-user-text {
    flex: 1;
    min-width: 0;
}

.dropdown-username {
    font-size: 14px;
    font-weight: 600;
    color: #181C1F;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dropdown-user-email {
    font-size: 12px;
    color: #666;
    margin-top: 2px;
}

.dropdown-divider {
    height: 1px;
    background: #e0e0e0;
    margin: 6px 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    color: #181C1F;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.2s;
    cursor: pointer;
}

.dropdown-item:hover {
    background-color: #f5f5f5;
}

.dropdown-item i {
    width: 18px;
    font-size: 16px;
    color: #666;
    text-align: center;
}

.dropdown-item span {
    flex: 1;
}

.dropdown-item.logout-item {
    color: #dc3545;
}

.dropdown-item.logout-item i {
    color: #dc3545;
}

.dropdown-item.logout-item:hover {
    background-color: #fff5f5;
}

/* ===================================
   未登录状态
   =================================== */

.header-guest {
    display: flex;
    align-items: center;
}

.header-guest-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.header-guest-login {
    font-size: 14px;
    font-weight: 600;
    color: #111;
    text-decoration: none;
    padding: 6px 4px;
}

.header-guest-login:hover {
    color: #ff7a1a;
}

.header-guest-register {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    padding: 0 14px;
    border-radius: 999px;
    background: #ff5a1f;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 2px 6px rgba(255, 90, 31, 0.25);
}

.header-guest-register:hover {
    background: #ff4a10;
    color: #fff;
}

/* ===================================
   Password visibility toggle (eye button)
   =================================== */
.password-field {
    position: relative;
}

.password-field input {
    padding-right: 44px !important;
}

.password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: #999;
    cursor: pointer;
    padding: 6px;
    line-height: 1;
}

.password-toggle:hover {
    color: #333;
}

.header-guest-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px 6px 6px;
    background: none;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
}

.header-guest-trigger:hover {
    background-color: #f5f5f5;
    border-color: #FF7A1A;
}

.guest-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 18px;
}

.guest-text {
    font-size: 14px;
    font-weight: 500;
    color: #666;
}

.header-guest-trigger:hover .guest-avatar {
    background: linear-gradient(135deg, #FF7A1A 0%, #FF8A00 100%);
    color: #ffffff;
}

.header-guest-trigger:hover .guest-text {
    color: #FF7A1A;
}

/* ===================================
   响应式布局
   =================================== */

/* 平板屏幕 */
@media (max-width: 992px) {
    .header-nav-btn .btn-text {
        display: none;
    }
    
    .header-nav-btn {
        padding: 8px;
        width: 40px;
        height: 40px;
        justify-content: center;
    }
    
    .user-menu-trigger .user-name {
        display: none;
    }
    
    .user-menu-trigger {
        padding: 6px;
    }
}

/* 手机屏幕 */
@media (max-width: 768px) {
    .header-container {
        gap: 8px;
        padding: 0 12px;
        justify-content: space-between; /* 使用 space-between 实现左右分离，不依赖 flex: 1 占位 */
    }
    
    /* 隐藏搜索框 */
    .header-center {
        display: none;
    }

    /* 显示移动端搜索图标（大小跟右侧按钮一致） */
    .header-mobile-search-btn{
        display: flex;
        width: 35px;
        height: 35px;
        padding: 8px;
        justify-content: center;
    }
    
    /* 左侧保持自然宽度 */
    .header-left {
        flex: 0 0 auto;
    }
    
    .search-input {
        font-size: 13px;
        padding: 8px 12px 8px 36px;
    }
    
    .header-nav-btn {
        width: 35px;
        height: 35px;
    }
    
    .user-dropdown-menu {
        width: 220px;
    }
}



/* 主容器 */
.main-container {
    display: flex;
    min-height: calc(100vh - 60px);
}

/* 左侧菜单 */
.sidebar {
    position: fixed;
    left: 0;
    top: 60px;
    bottom: 0;
    width: 180px;
    background-color: #ffffff;
    overflow-y: auto;
    transition: transform 0.3s ease;
    z-index: 100;
    border-right: 1px solid #e0e0e0;
}

.sidebar.hidden {
    transform: translateX(-100%);
}

/* 菜单切换按钮 */
.sidebar-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    cursor: pointer;
    color: #666;
    font-size: 16px;
    transition: background-color 0.2s, color 0.2s;
}

.sidebar-toggle:hover {
    background-color: #f5f5f5;
    color: #ff6600;
}

/* 固定在左侧菜单右边界那条线上（不随内容区居中移动） */
.sidebar-toggle-edge {
    position: fixed;
    top: 96px; /* 60px header + 36px 视觉间距 */
    left: 180px; /* 与 .sidebar 宽度一致 */
    transform: translateX(-50%); /* 按钮中心压在分割线上 */
    z-index: 1003;
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 999px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.sidebar-toggle-edge:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

/* 当侧边栏隐藏时，按钮贴到屏幕左边缘 */
.sidebar.hidden ~ .sidebar-toggle-edge {
    left: 0;
    transform: translateX(50%);
    border-left: none;
}

.sidebar-nav {
    padding: 16px 0 16px 16px;
}

.nav-section {
    margin-bottom: 16px;
}

.nav-section-title {
    font-size: 14px;
    font-weight: 400;
    color: #21272A;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0 5px 0px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    transition: color 0.2s;
}

.nav-section-title:hover {
    color: #4a5b6e;
}

.nav-section-text {
    flex: 1;
}

.nav-section-toggle {
    font-size: 12px;
    color: #5a6b7e;
    transition: transform 0.3s ease, color 0.2s;
}

.nav-section-title:hover .nav-section-toggle {
    color: #4a5b6e;
}

.nav-section.collapsed .nav-section-toggle {
    transform: rotate(180deg);
}

.nav-section.collapsed .nav-list {
    display: none;
}

.nav-list {
    list-style: none;
}

.nav-list li {
    margin: 0;
    height: 40px;
}

/* 频道列表项 */
.channel-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    padding: 0 20px;
}

.channel-item .nav-link {
    flex: 1;
    min-width: 0;
}

.channel-follow-btn {
    padding: 4px 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.2s, opacity 0.2s;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 4px;
}

.channel-follow-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    opacity: 0.9;
}

.channel-follow-btn:active:not(:disabled) {
    transform: translateY(0);
}

.channel-follow-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.channel-follow-btn i {
    font-size: 11px;
}

.channel-followed {
    padding: 4px 10px;
    background: #e8f5e9;
    color: #2e7d32;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 4px;
}

.channel-followed i {
    font-size: 11px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 20px;
    height: 40px;
    color: #21272A;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.2s;
    line-height: 1.5;
}

.nav-link:hover {
    background-color: #f5f5f5;
}

.nav-link i {
    width: 20px;
    text-align: center;
    color: #666;
}

.nav-divider {
    height: 1px;
    background-color: #e0e0e0;
    margin: 12px 10px;
}

/* 右侧内容区 */
.content-area {
    flex: 1;
    margin-left: 180px;
    display: flex;
    gap: 0;
    transition: margin-left 0.3s ease;
    max-width: calc(100% - 180px);
    min-height: calc(100vh - 60px);
}

.sidebar.hidden ~ .content-area {
    margin-left: 0;
    max-width: 100%;
}

/* 主内容区 */
.main-content {
    flex: 1;
    padding: 14px 18px;
    min-width: 0;
}

/* 右侧边栏 */
.right-sidebar {
    width: 300px;
    min-width: 300px;
    display: flex;
    padding: 16px 0;
    background-color: transparent;
}

/* 右侧列表部分 */
.right-list-section {
    width: 300px;
    margin-top: 12px;
    background-color: #f3f5f7;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 0;
    overflow-y: auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    font-size: 12px;
}

/* 右侧列表区块 */
.right-list-block {
    padding: 14px;
}

/* 右侧区块之间的分割线 */
.right-list-block-divider {
    height: 1px;
    background-color: #e0e0e0;
    margin: 0 14px;
}

.right-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.right-list-header h3 {
    font-size: 12px;
    font-weight: 600;
    color: #181C1F;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.right-list-header h3 i {
    color: #ff6600;
    font-size: 12px;
}

/* 社区书签部分 */
.bookmark-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bookmark-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background-color: #ffffff;
    border-radius: 6px;
    text-decoration: none;
    color: #181C1F;
    font-size: 12px;
    transition: background-color 0.2s;
}

.bookmark-item:hover {
    background-color: #f0f0f0;
}

.bookmark-item i {
    font-size: 10px;
    color: #999;
}

/* 规则部分 */
.rules-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rule-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    font-size: 12px;
    color: #181C1F;
}

.rule-number {
    font-weight: 600;
    min-width: 16px;
}

.rule-text {
    flex: 1;
}

.rule-item i {
    font-size: 10px;
    color: #999;
    margin-left: auto;
}

/* 推荐的子版块部分 */
.subreddit-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.subreddit-item {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #181C1F;
    padding: 6px 0;
}

.subreddit-item:hover .subreddit-name {
    color: #ff6600;
}

.subreddit-name{
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

.subreddit-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #000000;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    flex-shrink: 0;
}

.subreddit-icon-orange {
    background-color: #ff6600;
}

.subreddit-info {
    flex: 1;
    min-width: 0;
}

.subreddit-name {
    font-size: 12px;
    font-weight: 600;
    color: #181C1F;
    margin-bottom: 2px;
}

.subreddit-members {
    font-size: 11px;
    color: #666;
}

/* 内容工具栏（通用） */
.content-toolbar {
    margin-bottom: 10px;
    padding: 0;
    padding-bottom: 8px;
    border-bottom: 1px solid #e0e0e0;
}

.toolbar-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 下拉菜单按钮（预留） */
.dropdown {
    position: relative;
}

.dropdown-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: none;
    border: none;
    color: #666;
    font-size: 14px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.dropdown-btn:hover {
    background-color: #f5f5f5;
}

.dropdown-btn i {
    font-size: 10px;
    color: #999;
}

/* 通用操作按钮（帖子/内容页操作区复用） */
.post-action {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: none;
    border: none;
    color: #666;
    font-size: 12px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s, color 0.2s;
}

.post-action:hover {
    background-color: #f5f5f5;
    color: #181C1F;
}

.post-action i {
    font-size: 14px;
}

.post-action.liked {
    color: #ff6600;
}

/* 响应式设计 */

/* 第二步：隐藏右侧边栏（当窗口宽度小于1200px时） */
@media (max-width: 1200px) {
    .right-sidebar {
        display: none;
    }

    .content-area {
        max-width: 100%;
    }
}

/* 第三步：隐藏左侧菜单，但保留切换按钮（当窗口宽度小于992px时） */
@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
        z-index: 1002;
        /*box-shadow: 2px 0 8px rgba(0, 0, 0, 0.15);*/
        transition: transform 0.3s ease;
    }

    /* 移动端默认隐藏侧边栏 */
    .sidebar.hidden {
        transform: translateX(-100%);
    }

    /* 当侧边栏不隐藏时显示 */
    .sidebar:not(.hidden) {
        transform: translateX(0);
    }

    .content-area {
        margin-left: 0;
        max-width: 100%;
    }

    /* 确保切换按钮始终可见 */
    .sidebar-toggle {
        position: fixed;
        z-index: 1003;
    }

    .sidebar-toggle-edge {
        left: 0;
        transform: translateX(50%);
    }

    /* 侧边栏遮罩层 */
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 1001;
    }

    .sidebar-overlay.show {
        display: block;
    }
}

/* 第四步：缩小搜索框和其他元素（当窗口宽度小于768px时） */
@media (max-width: 768px) {
    .header-container {
        padding: 0 12px;
        gap: 8px;
    }

    .header-center {
        flex: 0 0 auto;
        max-width: 150px;
        min-width: 100px;
    }

    .search-box {
        min-width: 100px;
    }

    .search-input {
        padding: 8px 12px 8px 32px;
        font-size: 13px;
    }

    .search-box i {
        left: 10px;
        font-size: 12px;
    }

    .header-left {
        gap: 5px;
    }

    /* 手机端：把侧边栏切换按钮收进顶部栏（Logo 前） */
    .sidebar-toggle-edge {
        position: static;
        top: auto;
        left: auto;
        transform: none;
        background: none;
        border: none;
        box-shadow: none;
        width: 44px;
        height: 44px;
        border-radius: 50%;
    }

    .logo {
        height: 32px;
    }

    .header-icon-btn {
        width: 44px;
        height: 44px;
        font-size: 20px;
    }

    .header-create-btn {
        padding: 10px 16px;
        font-size: 15px;
        min-width: 44px;
        min-height: 44px;
    }

    .header-create-btn span {
        display: none;
    }

    .header-create-btn i {
        font-size: 20px;
    }

    .user-avatar {
        width: 38px;
        height: 38px;
        font-size: 17px;
        border: 2px solid #ffffff;
    }

    .header-right {
        gap: 4px;
    }

    .main-content {
        padding: 10px 12px;
    }

    .content-toolbar {
        padding-bottom: 8px;
    }
}

/* 第五步：进一步优化小屏幕（当窗口宽度小于480px时） */
@media (max-width: 480px) {
    .header-container {
        padding: 0 8px;
        gap: 6px;
    }

    .header-center {
        max-width: 120px;
        min-width: 80px;
    }

    .search-input {
        padding: 6px 10px 6px 28px;
        font-size: 12px;
    }

    .search-box i {
        left: 8px;
        font-size: 11px;
    }

    .logo {
        height: 32px;
    }

    .header-icon-btn {
        width: 35px;
        height: 35px;
        font-size: 20px;
    }

    .header-create-btn {
        padding: 10px 16px;
        font-size: 15px;
        min-width: 35px;
        min-height: 35px;
    }

    .header-create-btn i {
        font-size: 20px;
    }

    .user-avatar {
        width: 38px;
        height: 38px;
        font-size: 17px;
        border: 2px solid #ffffff;
    }

    .header-right {
        gap: 4px;
    }

    .sidebar-toggle {
        width: 30px;
        height: 40px;
        font-size: 18px;
        margin-right: 0px;
    }

    .main-content {
        padding: 10px 0px;
    }
}

/* 滚动条样式 */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: #f5f5f5;
}

.sidebar::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* 右侧板块简介卡片（内容页专用） */

.community-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.community-name {
    font-size: 14px;
    font-weight: 700;
    color: #181C1F;
    line-height: 1.2;
}

.community-title {
    font-size: 18px;
    font-weight: 700;
    color: #181C1F;
    margin: 0 0 8px 0;
}

.community-description {
    font-size: 12px;
    color: #181C1F;
    line-height: 1.5;
    margin: 0 0 12px 0;
}

.community-join-btn {
    border: 1px solid #cfcfcf;
    background: #ffffff;
    color: #181C1F;
    font-size: 12px;
    padding: 6px 12px;
    border-radius: 999px;
    cursor: pointer;
    white-space: nowrap;
}

.community-join-btn:hover {
    background: #f5f5f5;
}

.community-more-btn {
    border: none;
    background: none;
    color: #2b6cb0;
    font-size: 12px;
    padding: 0;
    cursor: pointer;
    margin-bottom: 12px;
}

.community-more-btn:hover {
    text-decoration: underline;
}

.community-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
    font-size: 11px;
    color: #666;
}

.community-meta .meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.community-meta .meta-item i {
    font-size: 10px;
    width: 12px;
    text-align: center;
}

.community-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.community-pill-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    background: #efefef;
    color: #181C1F;
    font-size: 12px;
    padding: 10px 12px;
    border-radius: 999px;
    cursor: pointer;
}

.community-pill-btn:hover {
    background: #e6e6e6;
}

.community-stats {
    display: flex;
    gap: 24px;
}

.community-stats .stat-item {
    flex: 1;
}

.community-stats .stat-number {
    font-size: 16px;
    font-weight: 700;
    color: #181C1F;
    line-height: 1.2;
    margin-bottom: 4px;
}

.community-stats .stat-label {
    font-size: 12px;
    color: #666;
}

.community-divider {
    height: 1px;
    background: #e0e0e0;
    margin: 12px 0;
}

.community-section-title {
    font-size: 12px;
    font-weight: 700;
    color: #181C1F;
    margin-bottom: 10px;
}

.community-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.community-user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #f0b4b8;
}

.community-user-name {
    font-size: 12px;
    color: #181C1F;
    font-weight: 600;
}

.is-deleted{
    color: #999;
    text-decoration: line-through;
}


