 
:root {
    --page-padding: 2rem;
    --card-width: 240px;
}

body {
    background-color: #f5f5f5;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
 

.custom-container {
    min-height: 100vh; /* 至少占满整个视口高度 */
    padding: 0 var(--page-padding);
    max-width: 1920px;
    margin: 0 auto;
    flex: 1;
}

   /* 侧边栏样式 */
   .sidebar { 
    position: sticky;
    top: 1rem;
    background: white;
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}
.user-avatar-r {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
}

.default-avatar {
    width: 38px;
    height: 38px;
    background-color: #ccc;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 30px;
    color: #fff;
}

/* 瀑布流容器 */
.masonry-layout {
    column-count: 5;      /* 默认5列 */
    column-gap: 1.5rem;   /* 列间距 */
    padding: 0 2rem;
    display: flex;
}

/* 帖子卡片 */
.post-card { 
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: transform 0.2s;
    break-inside: avoid;  /* 防止内容分列 */
    margin-bottom: 1.5rem; /* 行间距 */
    position: relative;
    /*display: inline-block;*/
}

.post-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0);
    transition: background-color 0.3s ease;
    pointer-events: none; /* 让鼠标事件可以穿透伪元素 */
  }
  
  .post-card:hover::before {
    background-color: rgba(0, 0, 0, 0.5);
  }
  

/* 图片容器 */
.post-image {
    width: 100%;
}

.post-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* 帖子信息 */
.post-info {
    padding: 12px;
}

.post-title {
    font-size: 14px;
    color: #333;
    margin-bottom: 8px;
}

/* 响应式调整 */
@media (max-width: 1400px) {
    .masonry-layout {
        column-count: 4;
    }
}

@media (max-width: 1200px) {
    .masonry-layout {
        column-count: 3;
    }
}

@media (max-width: 768px) {
    .masonry-layout {
        column-count: 2;
    }
}

@media (max-width: 576px) {
    .masonry-layout {
        column-count: 1;
    }
}


/* 分类导航 */
.category-nav {
padding: 30px 20px 15px 20px !important;
}

.category-nav .btn {
font-size: 14px;
font-weight: 400; /* 默认常规字体 */
border: none !important;
padding: 6px 16px;
border-radius: 16px;
transition: all 0.2s;
background: transparent !important;
color: #666 !important;
}

/* 悬停状态 */
.category-nav .btn:hover {
font-weight: 600 !important; /* 加粗 */
color: #333 !important; /* 品牌红色 */
transform: scale(1.05);
}

/* 选中状态 */
.category-nav .btn.active {
font-weight: 600 !important; /* 加粗 */
color: #333 !important; /* 品牌红色 */
}

/* 颜色系统保持原有 */
.category-nav .btn-outline-primary { color: #333; }
.category-nav .btn-outline-success { color: #00B96B; }
.category-nav .btn-outline-danger { color: #FF4757; }
.category-nav .btn-outline-warning { color: #FFC300; }

/* 用户信息容器 */
.user-info {
display: flex;
align-items: center;
gap: 6px; /* 缩小间距 */
margin-top: 8px;
} 

.user-avatar {
width: 24px !important; /* 小红书网页版头像大小 */
height: 24px !important;
border: 0.5px solid rgba(0,0,0,0.1); /* 添加细边框 */
}

/* 用户名字体样式 */
.user-name {
font-size: 12px !important;
color: #757575 !important; /* 小红书文字灰色 */
font-weight: 400;
line-height: 1.2;
display: flex;
align-items: center;
gap: 4px;
flex: 1;
}
/* 用户元信息容器 */
.user-meta {
display: flex;
justify-content: space-between;
width: 100%;
}

/* 达人名称样式 */
.daren-name {   
font-size: 12px !important;
color: #333 !important; /* 小红书文字灰色 */
font-weight: 400;
line-height: 1.2;
display: flex;
align-items: center;
gap: 4px;
}

/* 心形按钮样式 */
.like-btn {
color: #8a8a8a;
font-size: 12px;
display: inline-flex;
align-items: center;
gap: 2px; 
border-radius: 12px;
background: #f5f5f5;
transition: all 0.2s;
cursor: pointer;
margin-left: auto; /* 使点赞按钮靠右 */
padding: 2px 8px !important;
}

.like-btn:hover {
background: #ffeded;
color: #fe2c55;
}

.like-btn.active {
color: #fe2c55;
}
.post-stats { cursor: pointer; }
 

.post-stats:hover {
    background: #ffeded;
    color: #fe2c55;

    }
    
    .post-stats.active {
    color: #fe2c55;
    }

/* 发帖数量样式 */
.post-count {
font-size: 12px;
color: #8a8a8a;
white-space: nowrap;
}

/* 达人徽章 */
.expert-badge {
font-size: 10px;
padding: 1px 4px;
background: linear-gradient(90deg, #ffd700, #ffc800);
color: #7a5a00;
border-radius: 2px;
}


/* 关注按钮样式 */
.follow-btn {
background: #FE2C55;
color: white;
border: none;
border-radius: 12px;
padding: 4px 12px;
font-size: 12px;
font-weight: 500;
transition: all 0.2s;
white-space: nowrap;
}

.follow-btn:hover {
background: #ff1a4a;
transform: scale(1.05);
box-shadow: 0 2px 6px rgba(254,44,85,0.2);
}

.follow-btn.active {
background: #e0e0e0;
color: #666;
transform: none;
}

/* 调整用户信息间距 */

.user-info:hover {
background: #f8f8f8;

}

/* 右侧栏关注按钮间距调整 */
.user-info.mb-3 { 
border-radius: 8px;
transition: background 0.2s;
}

.user-info.mb-3:hover {
background: #f8f8f8;
}

   /* 新增样式 */
   .main-content {
    height: calc(100vh - 100px);
    overflow-y: auto;
    padding-bottom: 60px;
}

.article-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-bottom: 1.5rem;
    transition: transform 0.2s;

    width: 100%;
    min-height: 180px; /* 设置最小高度 */
    flex-shrink: 0; /* 禁止收缩 */
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-3px);
}
.article-card > div {
    flex: 1; /* 内容区域自适应 */
}

 /* 回到顶部按钮 */
 .back-to-top {
    position: fixed;
    bottom: 30px;
    right: 50px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 185, 107, 0.8);
    color: white;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
}

.back-to-top.show {
    display: flex;
}


/* 激活状态样式 */
.category-nav .btn.active {
    position: relative;
    font-weight: 600 !important;
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
}

/* 激活状态指示条 */
.category-nav .btn.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 2px;
    background: #00B96B;
    border-radius: 1px;
}


.hand-cursor {
    cursor:pointer;/*将标光标设置为手形*/
}

.show-times {
    color: #8a8a8a;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 2px; 
    border-radius: 12px;
    background: #f5f5f5;
    transition: all 0.2s;
    cursor: pointer;
    margin-left: auto; /* 使点赞按钮靠右 */
    padding: 2px 8px !important;
    }



      /* 瀑布流容器 */
      .masonry-container {
        min-height: calc(100vh - 200px); /* 保证最小高度 */
        display: flex;
        gap: 1.5rem;
        padding: 0 15px;
        margin: 20px auto;
        min-height: calc(100vh - 100px); 
    }

    .masonry-column {
        flex: 1;
        min-width: 0;
        transition: width 0.3s;
    }

    /* 加载按钮容器 */
    .load-more-container {
        position: fixed;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        z-index: 1000;
        opacity: 0;
        transition: opacity 0.3s;
        pointer-events: none;
    }

    .load-more-container.visible {
        opacity: 1;
        pointer-events: auto;
    }

    /* 加载按钮样式 */
    .load-more-btn {
        padding: 12px 40px;
        background: #f0f0f0;
        border: none;
        border-radius: 25px;
        color: #666;
        font-size: 14px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        transition: all 0.3s;
    }

    .load-more-btn:hover {
        background: #e0e0e0;
        transform: translateY(-2px);
    }

 
/* 内容项保持固定高度 */
.masonry-item {
    width: 100%;
    flex-shrink: 0; /* 防止内容项收缩 */
}

/* 卡片样式 */
.card {
    height: 100%; /* 确保卡片占满内容项高度 */
    display: flex;
    flex-direction: column;
}

.card-body {
    flex: 1; /* 内容区域自适应 */
}

    /* 响应式列数 */
    @media (min-width: 1600px) { .masonry-container { gap: 2rem; } }
    @media (max-width: 1599px) { .masonry-container { gap: 1.5rem; } }
    @media (max-width: 1199px) { .masonry-container { gap: 1.2rem; } }
    @media (max-width: 991px) { .masonry-container { gap: 1rem; } }
    @media (max-width: 767px) { .masonry-container { gap: 0.8rem; } }
    

 /* 在 forumidx.css 中添加以下样式 */
.notice-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    overflow: hidden;
}

.notice-header {
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
}

.notice-list {
    padding: 1rem;
}

.notice-item {
    display: flex;
    gap: 1rem;
    padding: 1.25rem;
    border-bottom: 1px solid #f5f5f5;
    transition: background 0.2s;
}

.notice-item:last-child {
    border-bottom: none;
}

.notice-item:hover {
    background: #fafafa;
}

.notice-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.notice-icon.bg-primary { background: #00B96B; }
.notice-icon.bg-warning { background: #FFC300; }
.notice-icon.bg-danger { background: #FF4757; }

.notice-content {
    flex: 1;
    min-width: 0;
}

.notice-actions {
    margin-top: 0.5rem;
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .notice-item {
        flex-direction: column;
        align-items: start;
    }
    
    .notice-icon {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }
}


/* 主内容容器 */
.main-content-container {
    width: 100%;
    max-width: 1200px; /* 与index页面同宽 */
    margin: 0 auto;
    padding: 0 1rem;
}



    /* 用户信息头部 */
    .profile-header {
        background: white;
        padding: 1rem;
        position: relative;
    }

    .avatar-section {
        display:flex;
        align-items: center;
        gap: 1rem;
        margin-bottom: 1.5rem;
        position: relative;
        width: var(--avatar-size);
        margin: -20px auto 2rem;
    }
 

    .stats-grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 1rem;
        margin: 1rem 0;
    }

    .stat-item {
        text-align: center;
        padding: 0.5rem;
        background: #f8f9fa;
        border-radius: 8px;
    }
    .user-avatar-me {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}
   


/* 在forumidx.css中添加 */
.post-text {
    font-size: 14px;
    line-height: 1.6;
    color: #333;
}

.post-text p {
    margin: 8px 0;
}

.post-text a {
    color: #00B96B;
    text-decoration: none;
}

.post-text img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 8px 0;
}

.post-text ul,
.post-text ol {
    padding-left: 24px;
    margin: 8px 0;
}

.post-text pre {
font-size: 14px;
  font-family: Source Sans Pro;
    padding: 12px;
    border-radius: 8px;
    overflow-x: auto;
      white-space: pre-wrap; /* 保留换行和空格，但会自动换行 */
  word-wrap: break-word; /* 如果有很长的单词也会换行 */
  overflow-x: hidden;    /* 可选：禁止水平滚动条 */
}

.post-text code {
    font-family: Monaco, Consolas, monospace;
    font-size: 13px;
}


/* 作者信息行 */
.post-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 16px;
    position: relative;
    
}

/* 关注按钮 */
.follow-btn-modal {
    background: #00B96B;
    color: white;
    border: none;
    padding: 6px 20px;
    border-radius: 20px;
    font-size: 14px;
    transition: all 0.3s;
}

.follow-btn-modal.active {
    background: #e0e0e0;
    color: #666;
}

/* 移动端关闭按钮 */
.mobile-close {
    display: none;
    position: absolute;
    left: -10px;
    background: rgba(0,0,0,0.6);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: white;
}

/* 评论标题 */
.comment-title {
    font-weight: 600;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 移动端布局 */
@media (max-width: 768px) {
    .post-modal {
        flex-direction: column;
        height: 100vh;
        border-radius: 0;
    }
    
    .modal-media {
        order: 2;
        height: 50vh;
    }
    
    .modal-content {
        order: 3;
        padding: 16px;
    }
    
   
    
    .mobile-close {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .author-info {
        padding-left: 40px;
    }
}
.video-container {
    position: relative; 
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    /* 添加 flex 布局确保视频垂直方向完整显示 */
    display: flex;
    flex-direction: column;
}

.video-container video {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;  /* 保持视频完整比例 */
    object-position: center top;
    /* 移除绝对定位使高度可以自适应 */
}
    /* 播放按钮 */
.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 1;
}

.play-overlay:hover {
    background: rgba(0, 185, 107, 0.8);
    transform: translate(-50%, -50%) scale(1.1);
}

.play-overlay i {
    color: white;
    font-size: 24px;
    margin-left: 3px; /* 图标居中修正 */
}


 
    /* 移动端优化 */
    @media (max-width: 768px) {
        .masonry-container {
            column-count: 2; /* 减少列数适应竖屏内容 */
            column-gap: 8px;
        }
        
        .post-card {
            margin-bottom: 8px;
        }
        
        .video-container {
            border-radius: 8px;
        }
    }
    
/* 移动端横屏适配（屏幕宽度小于等于768px且横屏时生效） */
@media (orientation: landscape) and (max-width: 768px) {
    .video-container {
        padding-top: 150%; /* 调整为3:2比例 */
    }
}

    /* 隐藏原生控件 */
.video-list video::-webkit-media-controls {
    display: none !important;
}

/* 自己按钮样式 */
.self-btn {
    background-color: #f5f5f5;
    color: #999;
    cursor: not-allowed;
    border: 1px solid #ddd;
}

    /* 基础图标样式 */
    .level-icon {
        display: inline-block; 
        transition: all 0.3s ease;
        position: relative;
        font-size: 15px;
      }
      
 
      
      /* 激活状态 - 彩色 */
      .level-icon.active {
        filter: none;        /* 移除滤镜 */
        opacity: 1;
        animation: glow 1.5s ease-in-out infinite alternate;
      }
      
      /* 文字样式 */
      .level-text {
        display: block;
        font-size: 0.8rem;
        color: #666;
      }
      
      /* 激活状态文字颜色 */
      .level-icon.active .level-text {
        color: #e91e63;      /* 粉红色 */
        font-weight: bold;
      }
      
      /* 呼吸光效 */
      @keyframes glow {
        from {
          filter: drop-shadow(0 0 5px rgba(233,30,99,0.3));
        }
        to {
          filter: drop-shadow(0 0 15px rgba(233,30,99,0.6));
        }
      }

      .featured-badge {
        position: absolute;
        top: 10px;
        right: 10px;
        background:#ffd700;
        color:red;
        padding: 5px 12px;
        border-color: red; 
        border-radius: 15px;
        font-size: 12px;
        font-weight: bold;
        box-shadow: 0 2px 5px rgba(0,0,0,0.2); 
        transform: rotate(15deg);
        animation: pulse 2s infinite;
        z-index: 2;
      }