/* 导入基础样式 */
@import url('home-styles.css');

/* 社区页面特定样式 */
.community-content {
    padding: 2rem 0;
    min-height: calc(100vh - 140px);
}

/* 文章过滤区域样式 */
.article-filter-section {
    background-color: var(--container-bg);
    border-radius: 16px;
    padding: 1.8rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.article-filter-section:hover {
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.filter-label {
    font-weight: 600;
    color: var(--text-color);
    margin-right: 8px;
    font-size: 0.9rem;
}

.filter-tag {
    padding: 0.5rem 1.2rem;
    border-radius: 24px;
    background-color: var(--light-bg);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.filter-tag:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
}

.filter-tag.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    font-weight: 500;
}

/* 搜索框样式增强 */
.search-box input {
    flex: 1;
    padding: 0.9rem 1.2rem;
    border: 1px solid var(--border-color);
    border-radius: 8px 0 0 8px;
    background-color: var(--light-bg);
    color: var(--text-color);
    font-size: 0.95rem;
    transition: all 0.3s ease;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(255, 149, 183, 0.2);
}

.search-box button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0 1.2rem;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-box button:hover {
    background-color: var(--primary-dark);
}

.search-refresh-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.refresh-control {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

#refreshArticles {
    transition: transform 0.3s ease;
}

#refreshArticles.refreshing {
    animation: spin 1s linear infinite;
}

#refreshArticles.has-updates::after {
    content: '';
    position: absolute;
    top: 3px;
    right: 3px;
    width: 8px;
    height: 8px;
    background-color: #f44336;
    border-radius: 50%;
}

.last-updated {
    color: var(--light-text);
    font-size: 0.85rem;
}

.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.filter-tags-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-right: 1.5rem;
}

.filter-divider {
    width: 1px;
    height: 24px;
    background-color: var(--border-color);
    margin: 0 0.5rem;
}

/* 导航栏整体样式优化 */
.community-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

/* Logo样式优化 */
.logo {
    flex: 0 0 auto;
    margin-right: 2rem;
}

.logo a {
    font-size: 1.6rem;
    font-weight: bold;
    text-decoration: none;
    background: linear-gradient(135deg, var(--primary-color) 0%, #5dade2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    display: inline-block;
    padding: 0.5rem 0;
    transition: all 0.3s ease;
}

.logo a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #5dade2 100%);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.logo a:hover {
    transform: translateY(-2px);
}

.logo a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* 导航菜单样式优化 */
.main-nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

.main-nav ul {
    display: flex;
    gap: 2.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-nav li {
    position: relative;
}

.main-nav a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 1.05rem;
    font-weight: 500;
    padding: 0.8rem 0;
    position: relative;
    transition: all 0.3s ease;
    display: inline-block;
}

.main-nav a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), #5dade2);
    border-radius: 3px;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--primary-color);
}

.main-nav a:hover::before,
.main-nav a.active::before {
    transform: scaleX(1);
    transform-origin: left;
}

/* 用户操作按钮样式优化 */
.user-actions {
    flex: 0 0 auto;
    display: flex;
    gap: 1rem;
    margin-left: 2rem;
}

.login-btn,
.register-btn {
    padding: 0.7rem 1.5rem;
    border-radius: 50px;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.login-btn {
    color: var(--primary-color);
    background: transparent;
    border: 2px solid var(--primary-color);
    position: relative;
    overflow: hidden;
}

.login-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        120deg,
        transparent,
        rgba(52, 152, 219, 0.2),
        transparent
    );
    transition: all 0.5s ease;
}

.login-btn:hover::before {
    left: 100%;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.15);
}

.register-btn {
    color: white;
    background: linear-gradient(135deg, var(--primary-color) 0%, #5dade2 100%);
    border: none;
    position: relative;
    overflow: hidden;
}

.register-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        120deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    transition: all 0.5s ease;
}

.register-btn:hover::before {
    left: 100%;
}

.register-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

/* 响应式设计优化 */
@media (max-width: 992px) {
    .header-container {
        padding: 1rem;
    }

    .main-nav ul {
        gap: 1.5rem;
    }

    .main-nav a {
        font-size: 1rem;
    }

    .login-btn,
    .register-btn {
        padding: 0.6rem 1.2rem;
    }
}

@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .logo {
        margin-right: 0;
        margin-bottom: 0.5rem;
    }

    .main-nav {
        width: 100%;
        order: 2;
    }

    .main-nav ul {
        justify-content: center;
        gap: 1.2rem;
    }

    .user-actions {
        width: 100%;
        justify-content: center;
        margin-left: 0;
        order: 3;
    }

    .login-btn,
    .register-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}

/* 暗色模式支持 */
@media (prefers-color-scheme: dark) {
    .community-header {
        background: rgba(23, 32, 42, 0.95);
        border-bottom-color: rgba(255, 255, 255, 0.05);
    }

    .main-nav a {
        color: #ecf0f1;
    }

    .main-nav a:hover,
    .main-nav a.active {
        color: var(--primary-color);
    }

    .login-btn {
        color: #ecf0f1;
        border-color: #ecf0f1;
    }

    .login-btn:hover {
        border-color: var(--primary-color);
        color: var(--primary-color);
    }
}

.community-layout {
    display: flex;
    gap: 2rem;
}

.content-area {
    flex: 1;
}

.sidebar {
    position: sticky;
    top: 2rem;
    height: fit-content;
}

.sidebar-section {
    background: var(--card-background);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.sidebar-section:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.section-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 1.2rem;
    padding-bottom: 0.8rem;
    border-bottom: 2px solid var(--primary-color);
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-title i {
    color: var(--primary-color);
    font-size: 1.1rem;
}

/* 新闻列表样式 */
.news-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.news-item {
    padding: 0.8rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.news-item:hover {
    background: rgba(52, 152, 219, 0.05);
    transform: translateX(5px);
    border-color: rgba(52, 152, 219, 0.1);
}

.news-title {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-color);
    text-decoration: none;
    display: block;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.news-title:hover {
    color: var(--primary-color);
}

.news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-light);
}

.news-source {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.news-source i {
    color: var(--primary-color);
    font-size: 0.9rem;
}

.news-time {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.news-time i {
    font-size: 0.9rem;
}

/* 热门话题样式 */
.topics-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.topic-tag {
    padding: 0.5rem 1rem;
    background: rgba(52, 152, 219, 0.08);
    color: var(--primary-color);
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.topic-tag i {
    font-size: 0.9rem;
}

.topic-tag:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.2);
}

.topic-tag .count {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    font-size: 0.8rem;
    margin-left: 0.3rem;
}

/* 加载状态 */
.sidebar-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
    color: var(--text-light);
}

.loading-spinner {
    width: 24px;
    height: 24px;
    border: 2px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 0.8rem;
}

/* 响应式优化 */
@media (max-width: 992px) {
    .sidebar {
        position: static;
        margin-top: 2rem;
    }

    .sidebar-section {
        margin-bottom: 1rem;
    }
}

@media (max-width: 768px) {
    .news-item {
        padding: 0.6rem;
    }

    .news-title {
        font-size: 0.9rem;
    }

    .topics-container {
        gap: 0.6rem;
    }

    .topic-tag {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }
}

/* 通知容器样式 */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.notification {
    padding: 12px 20px;
    border-radius: 5px;
    background-color: white;
    color: #333;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
    transform: translateX(120%);
    transition: transform 0.3s ease;
    max-width: 300px;
}

.notification.show {
    transform: translateX(0);
}

.notification.info {
    border-left: 4px solid #2196F3;
}

.notification.success {
    border-left: 4px solid #4CAF50;
}

.notification.error {
    border-left: 4px solid #F44336;
}

.notification.warning {
    border-left: 4px solid #FF9800;
}

/* 帖子区域样式 */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.section-header h2 {
    color: var(--text-color);
    font-size: 1.5rem;
}

.post-section {
    background-color: var(--container-bg);
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px var(--shadow-color);
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
}

.posts-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    padding: 1rem;
}

.post-card {
    background: var(--card-background);
    border-radius: 16px;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.post-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    border-color: transparent;
}

.post-card:hover::before {
    opacity: 1;
}

.post-header {
    margin-bottom: 1rem;
}

.post-title {
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.post-title a {
    text-decoration: none;
    color: inherit;
    background: linear-gradient(to right, var(--primary-color), var(--primary-color));
    background-size: 0% 2px;
    background-repeat: no-repeat;
    background-position: left bottom;
    transition: background-size 0.3s ease;
    padding-bottom: 2px;
}

.post-title a:hover {
    background-size: 100% 2px;
}

.post-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.9rem;
    color: var(--text-light);
}

.post-meta-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.post-meta-item i {
    color: var(--primary-color);
    font-size: 0.95rem;
}

.post-preview {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-color);
    margin: 1rem 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
}

.tag {
    padding: 0.3rem 0.8rem;
    background: rgba(52, 152, 219, 0.1);
    color: var(--primary-color);
    border-radius: 20px;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.tag:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.post-stats {
    display: flex;
    gap: 1rem;
    color: var(--text-light);
    font-size: 0.9rem;
}

.post-stat {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: color 0.3s ease;
}

.post-stat:hover {
    color: var(--primary-color);
}

.post-actions {
    display: flex;
    gap: 0.8rem;
}

.post-action {
    padding: 0.4rem;
    border-radius: 50%;
    color: var(--text-light);
    transition: all 0.3s ease;
    cursor: pointer;
}

.post-action:hover {
    background: rgba(52, 152, 219, 0.1);
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* 加载更多按钮样式优化 */
.load-more-btn {
    margin: 2rem auto;
    padding: 0.8rem 2rem;
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: 30px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
}

.load-more-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.2);
}

.load-more-btn:active {
    transform: translateY(0);
}

.load-more-btn i {
    transition: transform 0.3s ease;
}

.load-more-btn:hover i {
    transform: translateX(3px);
}

/* 空状态样式优化 */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-light);
}

.empty-state i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.empty-state p {
    font-size: 0.95rem;
    max-width: 400px;
    margin: 0 auto;
}

/* 响应式优化 */
@media (max-width: 768px) {
    .posts-container {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 0.5rem;
    }

    .post-card {
        padding: 1.2rem;
    }

    .post-title {
        font-size: 1.1rem;
    }

    .post-meta {
        gap: 0.8rem;
    }

    .post-footer {
        flex-direction: column;
        gap: 1rem;
    }

    .post-stats {
        width: 100%;
        justify-content: space-between;
    }

    .post-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

/* 加载动画 */
@keyframes cardAppear {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.post-card {
    animation: cardAppear 0.5s ease-out forwards;
}

.post-card:nth-child(2) { animation-delay: 0.1s; }
.post-card:nth-child(3) { animation-delay: 0.2s; }
.post-card:nth-child(4) { animation-delay: 0.3s; }
.post-card:nth-child(5) { animation-delay: 0.4s; }

/* 文章互动功能样式 */
.like-btn, .bookmark-btn, .share-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 20px;
    background: var(--primary-color-light);
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.like-btn:hover, .bookmark-btn:hover, .share-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.like-btn.liked {
    background: var(--primary-color);
    color: white;
}

.bookmark-btn.bookmarked {
    background: var(--primary-color);
    color: white;
}

/* 阅读进度指示器 */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--primary-color);
    z-index: 1000;
    transition: width 0.2s ease;
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 999;
}

.back-to-top.show {
    opacity: 1;
    transform: translateY(0);
}

/* 文章目录 */
.table-of-contents {
    background: var(--bg-color-light);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.table-of-contents h3 {
    margin-top: 0;
    margin-bottom: 12px;
}

.table-of-contents ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.table-of-contents li {
    margin: 8px 0;
}

.table-of-contents a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.table-of-contents a:hover {
    color: var(--primary-color);
}

.toc-h2 { margin-left: 0; }
.toc-h3 { margin-left: 20px; }
.toc-h4 { margin-left: 40px; }

/* 文本选择菜单 */
.highlight-menu {
    position: absolute;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 8px;
    display: flex;
    gap: 8px;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.2s ease;
    z-index: 1000;
}

.highlight-menu.show {
    opacity: 1;
    transform: translateY(0);
}

.highlight-menu button {
    padding: 8px;
    border: none;
    border-radius: 4px;
    background: none;
    cursor: pointer;
    color: var(--text-color);
    transition: all 0.2s ease;
}

.highlight-menu button:hover {
    background: var(--primary-color-light);
    color: var(--primary-color);
}

/* 加载状态 */
.loading-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 错误提示 */
.error-container {
    text-align: center;
    padding: 40px 20px;
    background: var(--bg-color-light);
    border-radius: 8px;
}

.error-message {
    color: var(--error-color);
    margin-bottom: 16px;
}

.retry-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 20px;
    background: var(--primary-color);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-color-light);
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
}

/* Toast通知 */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    max-width: 350px;
    background-color: white;
    color: var(--text-color);
    padding: 15px 20px;
    border-radius: var(--card-radius);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.4s ease;
    pointer-events: none;
    display: flex;
    align-items: center;
    gap: 12px;
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast::before {
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    font-size: 20px;
}

.toast-success {
    border-left: 4px solid var(--success-color);
}

.toast-success::before {
    content: '\f058';
    color: var(--success-color);
}

.toast-error {
    border-left: 4px solid var(--danger-color);
}

.toast-error::before {
    content: '\f057';
    color: var(--danger-color);
}

.toast-info {
    border-left: 4px solid var(--primary-color);
}

.toast-info::before {
    content: '\f05a';
    color: var(--primary-color);
}

.toast-warning {
    border-left: 4px solid var(--warning-color);
}

.toast-warning::before {
    content: '\f071';
    color: var(--warning-color);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .back-to-top {
        bottom: 20px;
        right: 20px;
    }

    .table-of-contents {
        display: none;
    }

    .highlight-menu {
        position: fixed;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
    }
}

/* 动画效果 */
@keyframes likeAnimation {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.4);
    }
    100% {
        transform: scale(1);
    }
}

.like-animation {
    animation: likeAnimation 0.5s ease;
}

/* 无限滚动加载指示器 */
.infinite-scroll-loader {
    text-align: center;
    padding: 20px;
    color: var(--text-color-light);
}

/* 图片懒加载过渡效果 */
img {
    opacity: 0;
    transition: opacity 0.3s ease;
}

img.loaded {
    opacity: 1;
}

/* 文章内容优化 */
.article-content {
    line-height: 1.8;
    font-size: 16px;
}

.article-content h2 {
    margin-top: 40px;
    margin-bottom: 20px;
    font-size: 24px;
    color: var(--heading-color);
}

.article-content h3 {
    margin-top: 30px;
    margin-bottom: 15px;
    font-size: 20px;
    color: var(--heading-color);
}

.article-content p {
    margin-bottom: 20px;
}

.article-content img {
    max-width: 100%;
    border-radius: 8px;
    margin: 20px 0;
}

.article-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 20px;
    margin: 20px 0;
    color: var(--text-color-light);
}

.article-content code {
    background: var(--code-bg);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
}

.article-content pre {
    background: var(--code-bg);
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
}

/* 高亮文本样式 */
.highlight {
    background: var(--highlight-color);
    padding: 2px 0;
}

/* 文章卡片悬停效果优化 */
.post-card {
    transform: translateY(0);
    transition: all 0.3s ease;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
}

/* 标签动画效果 */
.tag {
    transform: scale(1);
    transition: all 0.2s ease;
}

.tag:hover {
    transform: scale(1.1);
}

/* 加载动画 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

/* 变量定义 */
:root {
    --primary-color: #3498db;
    --primary-light: #5dade2;
    --primary-dark: #2980b9;
    --secondary-color: #2ecc71;
    --secondary-light: #58d68d;
    --secondary-dark: #27ae60;
    --background-color: #f8f9fa;
    --card-background: #ffffff;
    --text-color: #333333;
    --text-light: #777777;
    --text-muted: #999999;
    --border-color: #e0e0e0;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --hover-shadow: rgba(0, 0, 0, 0.15);
    --success-color: #2ecc71;
    --warning-color: #f39c12;
    --error-color: #e74c3c;
    --info-color: #3498db;
    --danger-color: #e74c3c;
    --animation-duration: 0.3s;
    --border-radius: 8px;
    --card-radius: 12px;
    --button-radius: 6px;
    --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --transition-duration: 400ms;
}

.transition-active {
    pointer-events: none !important;
}

/* 新文章标记 */
.new-post {
    position: relative;
    border-left: 3px solid var(--success-color);
}

.new-post-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: var(--success-color);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: bold;
}

/* 搜索选项样式改进 */
.search-options {
    display: flex;
    gap: 15px;
    margin-top: 12px;
    font-size: 14px;
}

.search-options label {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    transition: all var(--animation-duration);
    position: relative;
}

.search-options label:hover {
    color: var(--primary-color);
}

.search-options input[type="radio"] {
    accent-color: var(--primary-color);
    cursor: pointer;
}

.search-options span {
    position: relative;
    padding-bottom: 2px;
}

.search-options input[type="radio"]:checked + span::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background-color: var(--primary-color);
    border-radius: 1px;
}

/* 文章固定动作按钮 */
.article-action-fixed {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 100;
}

.back-to-top-article,
.close-article-fixed {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--card-background);
    color: var(--text-light);
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0;
    transform: scale(0.8) translateY(20px);
    pointer-events: none;
}

.back-to-top-article.show {
    opacity: 1;
    transform: scale(1) translateY(0);
    pointer-events: all;
}

.close-article-fixed {
    opacity: 1;
    transform: scale(1) translateY(0);
    pointer-events: all;
}

.back-to-top-article:hover,
.close-article-fixed:hover {
    background-color: var(--primary-color);
    color: white;
    transform: scale(1.1) translateY(-5px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.close-article-fixed:hover {
    background-color: var(--danger-color);
}

.back-to-top-article:active,
.close-article-fixed:active {
    transform: scale(0.95);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.back-to-top-article i,
.close-article-fixed i {
    font-size: 18px;
    transition: transform 0.3s ease;
}

.back-to-top-article:hover i {
    transform: translateY(-3px);
}

.close-article-fixed:hover i {
    transform: rotate(90deg);
}

/* 文章返回按钮增强 */
.back-to-list {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background-color: var(--background-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 30px;
    cursor: pointer;
    font-size: 15px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.back-to-list::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(52, 152, 219, 0.2), transparent);
    transition: all 0.5s ease;
    z-index: -1;
}

.back-to-list:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.back-to-list:hover::before {
    left: 100%;
    transition: all 0.8s ease;
}

.back-to-list:active {
    transform: translateY(0);
}

.back-to-list i {
    transition: transform 0.3s ease;
}

.back-to-list:hover i {
    transform: translateX(-4px);
}

/* 评论计数器警告样式 */
.comment-counter.warning {
    color: var(--warning-color);
    font-weight: bold;
}

/* 上次阅读卡片样式增强 */
.last-read {
    position: relative;
    box-shadow: 0 0 0 2px var(--primary-color), 0 10px 20px var(--shadow-color);
    animation: lastReadPulse 3s infinite;
    z-index: 10;
    transform: translateY(-5px) scale(1.03);
    transition: all 0.5s ease;
}

.last-read::after {
    content: '上次阅读';
    position: absolute;
    top: -10px;
    right: 10px;
    background-color: var(--primary-color);
    color: white;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: bold;
    border-radius: 20px;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
    animation: fadeInBadge 0.5s ease forwards;
}

@keyframes fadeInBadge {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes lastReadPulse {
    0% {
        box-shadow: 0 0 0 2px var(--primary-color), 0 10px 20px var(--shadow-color);
    }
    50% {
        box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.5), 0 10px 25px var(--hover-shadow);
    }
    100% {
        box-shadow: 0 0 0 2px var(--primary-color), 0 10px 20px var(--shadow-color);
    }
}

/* 淡入淡出动画改进 */
.fade-in {
    animation: fadeIn var(--transition-duration) ease-out forwards;
    will-change: opacity, transform;
}

.fade-out {
    animation: fadeOut var(--transition-duration) ease-in forwards;
    will-change: opacity, transform;
}

@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOut {
    0% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateY(30px);
    }
}

/* 文章内容阅读优化 */
.article-content {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-color);
    margin-bottom: 30px;
}

.article-content p {
    margin-bottom: 1.5em;
}

.article-content h2 {
    font-size: 24px;
    font-weight: 600;
    margin: 1.5em 0 0.8em;
    padding-bottom: 0.5em;
    border-bottom: 1px solid var(--border-color);
    color: #2c3e50;
}

.article-content h3 {
    font-size: 20px;
    font-weight: 600;
    margin: 1.3em 0 0.8em;
    color: #2c3e50;
}

.article-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding: 1em 1.5em;
    margin: 1.5em 0;
    background-color: rgba(52, 152, 219, 0.1);
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    color: #34495e;
    font-style: italic;
}

/* 搜索结果高亮增强 */
.highlight {
    background-color: rgba(255, 193, 7, 0.3);
    padding: 0 3px;
    border-radius: 3px;
    font-weight: 500;
}

/* 图片加载优化 */
.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin: 1.5em 0;
    display: block;
    transition: transform 0.3s ease;
}

.article-content img:hover {
    transform: scale(1.01);
}

/* 响应式设计优化 */
@media (max-width: 768px) {
    .article-navigation {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
        padding: 15px;
    }
    
    .navigation-controls {
        align-self: flex-end;
    }
    
    .article-action-fixed {
        bottom: 20px;
        right: 20px;
        gap: 10px;
    }
    
    .back-to-top-article,
    .close-article-fixed {
        width: 45px;
        height: 45px;
    }
    
    .toast {
        left: 20px;
        right: 20px;
        max-width: none;
        border-radius: var(--card-radius);
    }
}

/* 打印样式 */
@media print {
    .article-navigation,
    .article-action-fixed,
    .search-container,
    .controls-container,
    .filter-container,
    .sidebar,
    .related-articles,
    .article-comments,
    .article-footer,
    .footer {
        display: none !important;
    }
    
    .article-detail {
        box-shadow: none !important;
        padding: 0 !important;
    }
    
    .article-content {
        font-size: 12pt !important;
        line-height: 1.6 !important;
    }
    
    .article-title {
        font-size: 18pt !important;
        margin-bottom: 15pt !important;
    }
    
    body {
        margin: 0 !important;
        padding: 0 !important;
        background: white !important;
    }
    
    a {
        text-decoration: none !important;
        color: #000 !important;
    }
    
    .article-meta {
        margin-bottom: 20pt !important;
        color: #333 !important;
    }
}

/* 改进文章导航控件 */
.article-navigation {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 25px;
    position: sticky;
    top: 0;
    background-color: var(--card-background);
    padding: 15px 20px;
    z-index: 10;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border-radius: var(--card-radius);
    max-width: 100%;
    width: 100%;
}

/* 返回按钮容器 */
.nav-left {
    flex: 1;
    display: flex;
    justify-content: flex-start;
}

/* 标题容器 */
.nav-center {
    flex: 2;
    display: flex;
    justify-content: center;
    align-items: center;
}

.article-title-small {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-color);
    margin: 0;
    max-width: 600px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
    transition: opacity 0.3s ease;
}

/* 只在滚动时显示标题 */
.article-title-small.hidden {
    opacity: 0;
}

/* 右侧控件容器 */
.nav-right {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.navigation-controls {
    display: flex;
    gap: 10px;
}

.navigation-controls button {
    background: none;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    cursor: pointer;
    transition: all var(--animation-duration);
}

.navigation-controls button:hover {
    background-color: rgba(52, 152, 219, 0.1);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

/* 增强返回按钮样式 */
.back-to-list {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background-color: transparent;
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all var(--animation-duration);
    font-weight: 500;
    letter-spacing: 0.5px;
}

.back-to-list:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
    background-color: rgba(52, 152, 219, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.back-to-list:active {
    transform: translateY(0);
}

.back-to-list i {
    font-size: 0.9rem;
    transition: transform 0.3s ease;
}

.back-to-list:hover i {
    transform: translateX(-3px);
}

/* 响应式设计优化 */
@media (max-width: 768px) {
    .article-navigation {
        padding: 12px 15px;
    }
    
    .nav-center {
        display: none;
    }
    
    .nav-left, .nav-right {
        flex: 1;
    }
    
    .back-to-list {
        padding: 8px 12px;
        font-size: 0.9rem;
    }
    
    .navigation-controls button {
        width: 36px;
        height: 36px;
    }
}

/* 响应式样式 */
@media (max-width: 992px) {
    .filter-tags {
        flex-direction: column;
        gap: 1rem;
    }
    
    .filter-tags-group {
        margin-right: 0;
    }
    
    .search-refresh-container {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .search-box {
        width: 100%;
        max-width: none;
    }
}

@media (max-width: 768px) {
    .filter-tag {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }
    
    .last-updated {
        display: none;
    }
}

/* 过滤器容器 */
.filter-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    justify-content: center;
}

.filter-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-right: 15px;
}

.filter-group:last-child {
    margin-right: 0;
}

.filter-label {
    font-weight: 500;
    color: #555;
    margin-right: 5px;
}

.filter-tag {
    padding: 6px 12px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    color: #555;
}

.filter-tag:hover {
    background-color: #f0f7ff;
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.filter-tag.active {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
    font-weight: 500;
}

/* 搜索和刷新容器 */
.controls-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.search-container {
    position: relative;
    flex: 1;
    max-width: 400px;
}

.search-container input {
    width: 100%;
    padding: 10px 15px;
    padding-right: 40px;
    border: 1px solid #ddd;
    border-radius: 30px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.search-container input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
    outline: none;
}

.search-container button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: #888;
    transition: color 0.3s ease;
}

.search-container button:hover {
    color: var(--primary-color);
}

.refresh-container {
    display: flex;
    align-items: center;
}

#refreshArticles {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 15px;
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    color: #555;
}

#refreshArticles:hover {
    background-color: #f0f7ff;
    border-color: var(--primary-color);
    color: var(--primary-color);
}

#refreshArticles i {
    transition: transform 0.5s ease;
}

#refreshArticles.refreshing i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 响应式样式 */
@media (max-width: 992px) {
    .filter-container {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .filter-group {
        width: 100%;
        margin-right: 0;
        margin-bottom: 10px;
        justify-content: flex-start;
    }
    
    .controls-container {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .search-container {
        width: 100%;
        max-width: none;
    }
    
    .refresh-container {
        width: 100%;
    }
    
    #refreshArticles {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .filter-tag {
        padding: 5px 10px;
        font-size: 0.85rem;
    }
    
    .filter-label {
        width: 100%;
        margin-bottom: 5px;
    }
}

/* 文章详情样式优化 */
.article-detail {
    background: var(--card-background);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    margin-bottom: 2rem;
}

.article-header {
    margin-bottom: 2rem;
}

.article-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-color);
    line-height: 1.3;
    margin-bottom: 1rem;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-light);
    font-size: 0.95rem;
}

.meta-item i {
    color: var(--primary-color);
}

.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
}

.article-tag {
    padding: 0.4rem 1rem;
    background: rgba(52, 152, 219, 0.08);
    color: var(--primary-color);
    border-radius: 20px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.article-tag:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.article-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-color);
}

.article-content p {
    margin-bottom: 1.5rem;
}

.article-content h2 {
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 2.5rem 0 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}

.article-content h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 2rem 0 1rem;
}

.article-content img {
    max-width: 100%;
    border-radius: 8px;
    margin: 1.5rem 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.article-content blockquote {
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    border-left: 4px solid var(--primary-color);
    background: rgba(52, 152, 219, 0.05);
    color: var(--text-color);
    font-style: italic;
}

.article-content code {
    background: rgba(0, 0, 0, 0.05);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9em;
}

.article-content pre {
    background: #2d2d2d;
    color: #fff;
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.article-content pre code {
    background: none;
    color: inherit;
    padding: 0;
}

/* 文章互动区域 */
.article-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.action-buttons {
    display: flex;
    gap: 1rem;
}

.action-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.like-button {
    background: rgba(52, 152, 219, 0.1);
    color: var(--primary-color);
}

.like-button:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.like-button.liked {
    background: var(--primary-color);
    color: white;
}

.share-button {
    background: rgba(46, 204, 113, 0.1);
    color: #2ecc71;
}

.share-button:hover {
    background: #2ecc71;
    color: white;
    transform: translateY(-2px);
}

.bookmark-button {
    background: rgba(241, 196, 15, 0.1);
    color: #f1c40f;
}

.bookmark-button:hover {
    background: #f1c40f;
    color: white;
    transform: translateY(-2px);
}

.bookmark-button.bookmarked {
    background: #f1c40f;
    color: white;
}

/* 评论区样式优化 */
.comments-section {
    margin-top: 3rem;
}

.comments-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.comments-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-color);
}

.comment-count {
    color: var(--text-light);
    font-size: 1rem;
}

.comment-form {
    margin-bottom: 2rem;
}

.comment-input {
    width: 100%;
    min-height: 120px;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--card-background);
    resize: vertical;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.comment-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.comment-submit {
    margin-top: 1rem;
    padding: 0.8rem 1.5rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.comment-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.2);
}

.comment-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.comment {
    background: var(--card-background);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.comment:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.author-name {
    font-weight: 500;
    color: var(--text-color);
}

.comment-date {
    color: var(--text-light);
    font-size: 0.9rem;
}

.comment-content {
    color: var(--text-color);
    line-height: 1.6;
}

.comment-actions {
    margin-top: 1rem;
    display: flex;
    gap: 1rem;
}

.comment-action {
    color: var(--text-light);
    font-size: 0.9rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.comment-action:hover {
    color: var(--primary-color);
}

/* 响应式优化 */
@media (max-width: 768px) {
    .article-detail {
        padding: 1.5rem;
    }

    .article-title {
        font-size: 1.5rem;
    }

    .article-meta {
        gap: 1rem;
    }

    .article-actions {
        flex-direction: column;
        gap: 1rem;
    }

    .action-buttons {
        width: 100%;
        justify-content: space-between;
    }

    .action-button {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }

    .comment-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

/* ... existing code ... */ 