/**
 * 首页左侧导航栏样式
 * 宽度: 180px
 * 位置: 左侧
 */

/* ==================== 主布局容器 ==================== */
.home-layout-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 8px 10px 20px;
    display: flex;
    flex-direction: row;
    gap: 20px;
    box-sizing: border-box;
}

/* ==================== 左侧导航栏 ==================== */
.home-left-nav {
    width: 180px;
    flex-shrink: 0;
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    height: fit-content;
    position: sticky;
    top: 96px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    border: 1px solid #e8eaed;
}

/* 导航栏头部 - 所有分类按钮 */
.nav-header {
    padding: 8px;
    background: #f8f9fa;
}

.btn-create-space {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 16px;
    background: #4a90e2;
    border: none;
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(74, 144, 226, 0.2);
}

.btn-create-space:hover {
    background: #3a7bc8;
    box-shadow: 0 2px 6px rgba(74, 144, 226, 0.3);
    transform: translateY(-1px);
    color: #ffffff !important;
}

.btn-create-space:active {
    background: #2c5fa3;
    transform: translateY(0);
    color: #ffffff !important;
}

.btn-create-space span {
    color: #ffffff !important;
}

.btn-create-space:hover span,
.btn-create-space:active span {
    color: #ffffff !important;
}

.btn-create-space .create-icon {
    background: rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
}

.btn-create-space .create-icon i {
    font-size: 16px;
}

/* 分类导航列表 */
.category-nav-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 4px 0;
}

.nav-category-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    background: #ffffff;
    color: #3c4043;
    font-size: 14px;
    text-decoration: none;
    cursor: default;
    border-radius: 0;
    position: relative;
}

/* 已关注的分类 - 只有按钮可点击 */
.nav-category-item.followed-item {
    cursor: default;
}

/* 导航图标 */
.nav-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.nav-icon i {
    font-size: 20px;
    color: #ffffff;
}

.nav-icon.has-custom-image {
    border-radius: 8px;
    background: #f5f5f5;
}

.nav-icon.has-custom-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

/* 通知红点 */
.notification-dot {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 10px;
    height: 10px;
    background: #ea4335;
    border-radius: 50%;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 4px rgba(234, 67, 53, 0.3);
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

/* 导航文字 */
.nav-text {
    flex: 1;
    font-size: 14px;
    color: #202124;
    font-weight: 500;
    letter-spacing: 0.2px;
}

/* 取消关注按钮 */
.unfollow-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    background: transparent;
    border: none;
    color: #4a90e2;
    font-size: 16px;
    opacity: 0.8;
    cursor: pointer;
    padding: 4px;
    transition: all 0.2s;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    position: relative;
}

.unfollow-btn i {
    font-size: 16px;
    transition: all 0.2s;
}

/* 默认显示对勾图标（蓝色） */
.unfollow-btn i.fa-check-circle {
    display: block;
}

.unfollow-btn i.fa-times-circle {
    display: none;
    position: absolute;
}

/* 悬停时显示×图标（红色） */
.unfollow-btn:hover {
    background: #ffebee;
    color: #f44336;
    opacity: 1;
    transform: scale(1.15);
}

.unfollow-btn:hover i.fa-check-circle {
    display: none;
}

.unfollow-btn:hover i.fa-times-circle {
    display: block;
}

.unfollow-btn:active {
    transform: scale(0.95);
}

/* 分隔线 */
.nav-divider {
    height: 1px;
    background: linear-gradient(to right, transparent, #e8eaed 20%, #e8eaed 80%, transparent);
    margin: 12px 0;
}

/* ==================== 推荐关注区域 ==================== */
.recommended-section {
    padding: 0;
    background: #ffffff;
}

.recommended-header {
    padding: 12px 16px 8px;
    background: #ffffff;
}

.recommended-title {
    font-size: 12px;
    color: #5f6368;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.recommended-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 4px 0;
}

.recommended-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: #ffffff;
    transition: background 0.2s;
    cursor: default;
}

.recommended-item {
    cursor: default;
}

.recommended-item .nav-icon.small {
    width: 32px;
    height: 32px;
    border-radius: 6px;
}

.recommended-item .nav-icon.small i {
    font-size: 16px;
}

.recommended-item .nav-text.small {
    flex: 1;
    font-size: 13px;
    color: #3c4043;
    font-weight: 400;
}

/* 快速关注按钮 */
.quick-follow-btn {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: transparent;
    border: 1.5px solid #dadce0;
    color: #5f6368;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.quick-follow-btn i {
    font-size: 10px;
}

.quick-follow-btn:hover {
    background: #4a90e2;
    border-color: #4a90e2;
    color: #ffffff;
    transform: scale(1.1);
}

.quick-follow-btn:active {
    transform: scale(0.95);
}

/* 未关注分类时的提示 */
.no-followed-categories {
    padding: 0;
    background: #ffffff;
    height: 268px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0;
}

.empty-state i {
    font-size: 48px;
    color: #ff0000;
    margin-bottom: 16px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

.empty-state p {
    font-size: 13px;
    color: #5f6368;
    margin: 0 0 20px 0;
    line-height: 1.6;
}

.btn-goto-categories {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    background: #4a90e2;
    color: #ffffff !important;
    font-size: 13px;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s;
    font-weight: 500;
    box-shadow: 0 1px 3px rgba(74, 144, 226, 0.2);
    white-space: nowrap;
}

.btn-goto-categories:hover {
    background: #3a7bc8;
    box-shadow: 0 2px 6px rgba(74, 144, 226, 0.3);
    transform: translateY(-1px);
    color: #ffffff !important;
}

.btn-goto-categories:active {
    background: #2c5fa3;
    transform: translateY(0);
    color: #ffffff !important;
}

.btn-goto-categories:visited {
    color: #ffffff !important;
}

/* 导航栏页脚 */
.nav-footer {
    padding: 16px;
    background: #f8f9fa;
    border-top: 1px solid #e8eaed;
}

.nav-footer p {
    font-size: 11px;
    line-height: 1.7;
    color: #5f6368;
    margin: 0;
    text-align: center;
}

/* 关注分类按钮 - 与分类项保持一致 */
.create-space-button {
    padding: 0;
    background: #f7f8fa;
}

.btn-create {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 12px;
    background: transparent;
    border: none;
    color: #3c4043;
    font-size: 13px;
    text-decoration: none;
    transition: background 0.2s;
    min-height: 48px;
    box-sizing: border-box;
}

.btn-create:hover {
    background: #e8eaed;
}

/* 关注分类图标 - 与分类图标一致 */
.btn-create i {
    width: 36px;
    height: 36px;
    background: var(--primary-color);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 16px;
    flex-shrink: 0;
}

.btn-create span {
    font-size: 13px;
    font-weight: 500;
    color: #3c4043;
}

/* 分类列表 */
.category-list {
    background: #f7f8fa;
    padding: 0;
}

.category-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    text-decoration: none;
    transition: background 0.2s;
    position: relative;
    min-height: 48px;
    box-sizing: border-box;
}

.category-item:hover {
    background: #e8eaed;
}

/* 分类图标 */
.category-icon {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.category-icon i {
    color: #ffffff;
    font-size: 16px;
}

/* 自定义图片图标 */
.category-icon.has-custom-image {
    background: #f0f2f5 !important;
    padding: 2px;
}

.category-icon.has-custom-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

/* 通知小红点 */
.notification-dot {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 8px;
    height: 8px;
    background: #ea4335;
    border-radius: 50%;
    border: 2px solid #f7f8fa;
}

/* 分类信息容器 */
.category-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex: 1;
    min-width: 0;
}

/* 分类名称 */
.category-name {
    color: #3c4043;
    font-size: 13px;
    line-height: 1.4;
    font-weight: 500;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 分类文章数量标签 - 隐藏不显示 */
.category-count-badge {
    display: none;
}

/* 未关注分类提示 - 与分类项统一样式 */
.no-followed-message {
    padding: 0;
    background: #f7f8fa;
}

.no-followed-message p {
    font-size: 12px;
    color: #8590a6;
    margin: 0;
    padding: 12px 12px 8px 12px;
    line-height: 1.5;
    text-align: center;
}

.goto-categories-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: transparent;
    color: #3c4043;
    text-decoration: none;
    transition: background 0.2s;
    min-height: 48px;
    box-sizing: border-box;
}

.goto-categories-link:hover {
    background: #e8eaed;
}

.goto-categories-link i {
    width: 36px;
    height: 36px;
    background: var(--primary-color);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 16px;
    flex-shrink: 0;
}

.goto-categories-link span {
    font-size: 13px;
    font-weight: 500;
    color: #3c4043;
}

/* 页脚信息 */
.nav-footer {
    padding: 16px 12px;
    border-top: 1px solid #dadce0;
    background: #f7f8fa;
}

.nav-footer p {
    font-size: 11px;
    line-height: 1.6;
    color: #80868b;
    margin: 0;
}

/* ==================== 主内容区域 ==================== */
.home-main-area {
    width: 640px;
    flex-shrink: 0;
}

/* 动态内容流 */
.feed-stream {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ==================== 帖子卡片样式 ==================== */
.feed-card {
    background: #ffffff;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.2s;
}

.feed-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

/* 帖子头部 */
.feed-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.author-info {
    display: flex;
    gap: 10px;
    flex: 1;
}

.author-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.author-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.author-name-row {
    display: flex;
    align-items: center;
    gap: 4px;
}

.author-name {
    color: #1a1a1a;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.author-name:hover {
    color: #0066cc;
}

.post-meta-text {
    color: #8590a6;
    font-size: 13px;
    line-height: 1.4;
}

.card-close-btn {
    background: transparent;
    border: none;
    color: #8590a6;
    font-size: 14px;
    cursor: pointer;
    padding: 4px;
    transition: color 0.2s;
}

.card-close-btn:hover {
    color: #1a1a1a;
}

/* 帖子内容 */
.feed-card-content {
    margin-bottom: 12px;
}

.card-title {
    margin: 0 0 12px 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.5;
    color: #1a1a1a;
    cursor: default; /* 不可点击 */
    text-align: left;
}

.card-image {
    border-radius: 8px;
    overflow: hidden;
    margin: 0 auto 12px;
    text-align: center;
    position: relative;
}

/* 横图布局容器 */
.card-image[data-orientation="horizontal"] {
    width: 100%;
}

/* 竖图布局容器 */
.card-image[data-orientation="vertical"] {
    width: 100%;
    height: 478px;
    border-radius: 8px;
    overflow: visible;
}

.card-image img {
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    max-height: 500px;
    object-fit: cover;
}

/* 从内容中提取的图片样式 */
.card-image img[class*="wp-image"],
.card-image img[class*="size-"] {
    width: 100% !important;
    height: auto !important;
}

/* 主轮播图 */
.main-carousel {
    position: relative;
    width: 100%;
    margin-bottom: 10px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.main-carousel:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

/* 横图布局 */
.main-carousel.horizontal .carousel-container {
    position: relative;
    width: 100%;
    height: 320px;
    overflow: hidden;
    background: linear-gradient(135deg, #f5f7fa 0%, #e9ecef 100%);
}

/* 竖图布局 */
.main-carousel.vertical {
    width: 100%;
    margin: 0 auto 8px;
    box-shadow: none;
}

.main-carousel.vertical .carousel-container {
    position: relative;
    width: 100%;
    height: 478px;
    overflow: visible;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1000px;
}

/* 竖图3D轮播slides */
.carousel-slide-3d {
    position: absolute;
    height: 478px;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center center;
    z-index: 1;
}

.carousel-slide-3d img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    transition: all 0.6s ease;
}

/* 中间主图（包括单张图片） */
.main-carousel.vertical .carousel-slide-3d[data-position="center"],
.main-carousel.vertical .carousel-slide-3d:only-child {
    width: 298px;
    z-index: 10;
    opacity: 1;
    transform: translateX(0) scale(1);
    left: 50%;
    margin-left: -149px;
}

.main-carousel.vertical .carousel-slide-3d[data-position="center"] img,
.main-carousel.vertical .carousel-slide-3d:only-child img {
    filter: blur(0) brightness(1);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

/* 左侧图片 */
.main-carousel.vertical .carousel-slide-3d[data-position="left"] {
    width: 180px;
    left: 0;
    z-index: 5;
    opacity: 0.7;
    transform: translateX(-20px) scale(0.9);
}

.main-carousel.vertical .carousel-slide-3d[data-position="left"] img {
    filter: blur(2px) brightness(0.8);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* 右侧图片 */
.main-carousel.vertical .carousel-slide-3d[data-position="right"] {
    width: 180px;
    right: 0;
    z-index: 5;
    opacity: 0.7;
    transform: translateX(20px) scale(0.9);
}

.main-carousel.vertical .carousel-slide-3d[data-position="right"] img {
    filter: blur(2px) brightness(0.8);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* 隐藏的slides */
.main-carousel.vertical .carousel-slide-3d[data-position="hidden"] {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.5);
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.carousel-slide.active {
    opacity: 1;
    pointer-events: auto;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    cursor: pointer;
}

/* 轮播箭头 */
.carousel-prev,
.carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;
    color: #1a1a1a;
    font-size: 18px;
    cursor: pointer;
    z-index: 20;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
}

.main-carousel:hover .carousel-prev,
.main-carousel:hover .carousel-next {
    opacity: 1;
}

.carousel-prev:hover,
.carousel-next:hover {
    background: #fff;
    transform: translateY(-50%) scale(1.15);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    color: #4a90e2;
}

.carousel-prev:active,
.carousel-next:active {
    transform: translateY(-50%) scale(1.05);
}

.carousel-prev {
    left: 20px;
}

.carousel-next {
    right: 20px;
}

/* 竖图布局的箭头位置 */
.main-carousel.vertical .carousel-prev {
    left: 12%;
}

.main-carousel.vertical .carousel-next {
    right: 12%;
}

/* 轮播指示点 */
.carousel-dots {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 25;
    background: rgba(0, 0, 0, 0.3);
    padding: 8px 14px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.carousel-dot:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: scale(1.4);
    border-color: rgba(74, 144, 226, 0.5);
}

.carousel-dot.active {
    width: 28px;
    border-radius: 5px;
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.4);
}

/* 竖图布局的指示点位置 */
.main-carousel.vertical .carousel-dots {
    left: 50%;
    transform: translateX(-50%);
}

/* 双击提示 */
.image-hint {
    position: absolute;
    top: 12px;
    right: 12px;
    color: #fff;
    font-size: 12px;
    z-index: 25;
    opacity: 0.9;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.main-carousel:hover .image-hint {
    opacity: 1;
}

/* 竖图布局的提示位置（在298px图片的右上角） */
.main-carousel.vertical .image-hint {
    left: 45%;
    right: auto;
    transform: translateX(-50%);
    margin-left: 137px;
}

/* 下方缩略图（横图布局） */
.card-image[data-orientation="horizontal"] .bottom-thumbnails {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 10px;
}

.card-image[data-orientation="horizontal"] .bottom-thumb {
    position: relative;
    height: 160px;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, #f5f7fa 0%, #e9ecef 100%);
}

.card-image[data-orientation="horizontal"] .bottom-thumb:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.18);
}

/* 竖图布局容器 */
.card-image[data-orientation="vertical"] {
    position: relative;
    height: 478px;
}

/* 竖图容器添加两侧模糊装饰 */
.card-image[data-orientation="vertical"]::before,
.card-image[data-orientation="vertical"]::after {
    content: '';
    position: absolute;
    top: 0;
    width: 20%;
    height: 478px;
    background: linear-gradient(135deg, rgba(245, 247, 250, 0.6) 0%, rgba(233, 236, 239, 0.6) 100%);
    backdrop-filter: blur(8px);
    pointer-events: none;
    z-index: 1;
}

.card-image[data-orientation="vertical"]::before {
    left: 0;
    border-radius: 12px 0 0 12px;
}

.card-image[data-orientation="vertical"]::after {
    right: 0;
    border-radius: 0 12px 12px 0;
}

/* 通用缩略图样式 */
.bottom-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

/* 横图布局的缩略图双击提示 */
.card-image[data-orientation="horizontal"] .bottom-thumb::after {
    content: '双击查看原图';
    position: absolute;
    top: 12px;
    right: 12px;
    color: #fff;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.card-image[data-orientation="horizontal"] .bottom-thumb:hover::after {
    opacity: 1;
}

/* 文章内容包装器 */
.card-text-wrapper {
    position: relative;
}

.card-excerpt {
    color: #1a1a1a;
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 12px;
    overflow: hidden;
    transition: all 0.4s ease;
}

/* 收起状态：显示3行 */
.card-excerpt.collapsed {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    max-height: calc(1.7em * 3); /* 3行高度 */
    position: relative;
    margin-bottom: 4px;
}

/* 收起状态底部渐变遮罩 */
.card-excerpt.collapsed::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1.7em;
    background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,1));
    pointer-events: none;
}

/* 展开状态：显示全部 */
.card-excerpt.expanded {
    display: block;
    -webkit-line-clamp: unset;
    max-height: none;
}

/* 展开状态移除渐变 */
.card-excerpt.expanded::after {
    display: none;
}

/* 阅读更多按钮 */
.read-more-btn {
    background: transparent;
    border: none;
    color: #0066cc;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    padding: 0;
    margin: 2px auto 0;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    transition: all 0.2s ease;
}

.read-more-btn:hover {
    color: #0052a3;
}

.read-more-btn:active {
    opacity: 0.7;
}

.read-more-text {
    font-size: 13px;
    letter-spacing: 0.2px;
}

.read-more-btn i {
    font-size: 11px;
    transition: transform 0.3s ease;
}

/* 展开时箭头动画 */
.card-excerpt.expanded + .read-more-btn i {
    animation: bounce-up 0.5s ease;
}

/* 收起时箭头动画 */
.card-excerpt.collapsed + .read-more-btn i {
    animation: bounce-down 0.5s ease;
}

@keyframes bounce-up {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

@keyframes bounce-down {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(3px); }
}

/* 按钮容器居中 */
.card-text-wrapper {
    text-align: center; /* 仅让按钮居中 */
}

.card-text-wrapper .card-excerpt {
    text-align: left; /* 内容文字左对齐 */
}

/* 帖子互动栏 */
.feed-card-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
}

.action-item {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    background: transparent;
    border: none;
    border-radius: 4px;
    color: #8590a6;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.action-item:hover {
    background: #f6f6f6;
}

.action-item i {
    font-size: 14px;
}

.upvote-item {
    font-weight: 500;
}

.upvote-item:hover {
    color: #0066cc;
}

.upvote-item.active {
    color: #0066cc;
    background: #eff4fb;
}

.downvote-item:hover {
    color: #999;
}

.comment-item:hover {
    color: #666;
}

.share-item:hover {
    color: #666;
}

.more-item {
    margin-left: auto;
}

.more-item:hover {
    color: #666;
}

/* 暂无内容 */
.no-content-message {
    text-align: center;
    padding: 80px 20px;
    color: #8590a6;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.no-content-message i {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.4;
    color: #d1d5db;
}

.no-content-message h3 {
    margin: 0 0 12px 0;
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
}

.no-content-message p {
    font-size: 14px;
    margin: 0 0 24px 0;
    color: #8590a6;
    line-height: 1.6;
}

.btn-goto-categories {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--primary-color);
    color: #ffffff !important;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.3);
}

.btn-goto-categories:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.4);
    color: #ffffff !important;
}

.btn-goto-categories:active {
    background: #2c5fa3;
    transform: translateY(0);
    color: #ffffff !important;
}

.btn-goto-categories:visited {
    color: #ffffff !important;
}

.btn-goto-categories i {
    font-size: 16px;
}

/* ==================== 首页右侧广告栏 ==================== */
.home-right-sidebar {
    width: 360px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: sticky;
    top: 96px;
    height: fit-content;
}

/* 广告容器 */
.home-ad-container {
    width: 360px;
    min-height: 300px;
    position: relative;
}

.home-ad-slot {
    width: 360px;
    height: 300px;
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border: 1px solid #e8eaed;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out;
    z-index: 1;
}

/* 激活状态的广告 */
.home-ad-slot.ad-active {
    opacity: 1;
    visibility: visible;
    z-index: 10;
}

/* 随机广告项特殊样式 */
.random-ad-item {
    display: block !important;
}

.home-ad-slot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.home-ad-slot iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* 广告占位符（仅管理员可见） */
.home-ad-slot.ad-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f7fa 0%, #eef1f5 100%);
    border: 2px dashed #c3cad3;
}

.ad-placeholder-content {
    text-align: center;
    color: #8590a6;
}

.ad-placeholder-content i {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.4;
}

.ad-placeholder-content p {
    margin: 0 0 8px 0;
    font-size: 14px;
    font-weight: 500;
}

.ad-placeholder-content .ad-size {
    font-size: 12px;
    color: #adb5bd;
    margin-bottom: 15px;
}

.btn-config-ad {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #4a90e2;
    color: #ffffff !important;
    text-decoration: none;
    border-radius: 6px;
    font-size: 13px;
    transition: all 0.2s;
}

.btn-config-ad:hover {
    background: #3a7bc8;
    transform: translateY(-1px);
}

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

/* 平板 (小于1024px) */
@media (max-width: 1024px) {
    .home-layout-container {
        padding: 8px 10px 20px;
    }
}

/* 中等屏幕 (小于900px) - 隐藏左侧导航栏和右侧广告 */
@media (max-width: 900px) {
    .home-left-nav {
        display: none;
    }
    
    .home-right-sidebar {
        display: none;
    }
    
    .home-layout-container {
        display: block;
    }
    
    .home-main-area {
        width: 100%;
    }
}

/* 移动设备 (小于768px) */
@media (max-width: 768px) {
    .home-layout-container {
        padding: 8px 5px 10px;
    }
}

