/* 猫猫网站 - 猫主题样式 */

/* CSS 变量 - 猫主题配色 */
:root {
    --primary: #FF8C42;
    --primary-dark: #E67634;
    --primary-light: #FFB366;
    --secondary: #D4A574;
    --accent: #FFE4C4;
    --dark: #5D4E37;
    --text: #333;
    --text-light: #666;
    --text-muted: #999;
    --bg: #FFF9F0;
    --bg-card: #FFFFFF;
    --bg-warm: #FFF5E6;
    --border: #FFE4C4;
    --shadow-sm: 0 2px 8px rgba(255, 140, 66, 0.1);
    --shadow-md: 0 4px 15px rgba(255, 140, 66, 0.15);
    --shadow-lg: 0 8px 30px rgba(255, 140, 66, 0.2);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 20px;
}

/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    cursor: default;
    overflow-x: hidden;
}

main {
    display: block;
    min-height: calc(100vh - 70px);
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: var(--primary-dark);
}

/* 加载动画 */
.loading {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: var(--bg);
}

.cat-loader {
    display: flex;
    gap: 10px;
}

.cat-loader span {
    font-size: 32px;
    animation: bounce 1s infinite;
}

.cat-loader span:nth-child(2) {
    animation-delay: 0.15s;
}

.cat-loader span:nth-child(3) {
    animation-delay: 0.3s;
}

.cat-loader.small span {
    font-size: 20px;
}

.loading p {
    margin-top: 16px;
    color: var(--primary);
    font-size: 16px;
}

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

/* 头部导航 */
.header {
    background: linear-gradient(135deg, #fff 0%, var(--bg-warm) 100%);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 3px solid var(--primary-light);
}

.header-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.logo-icon {
    font-size: 32px;
    animation: wiggle 2s ease-in-out infinite;
}

@keyframes wiggle {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-5deg); }
    75% { transform: rotate(5deg); }
}

.logo-text {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary);
    letter-spacing: 2px;
}

.nav {
    display: flex;
    gap: 35px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: var(--dark);
    font-size: 15px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.3s;
    position: relative;
}

.nav-item:hover {
    background: var(--accent);
    color: var(--primary);
    transform: translateY(-2px);
}

.nav-item.active {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(255, 140, 66, 0.4);
}

.nav-item span {
    font-size: 18px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.search-box {
    display: flex;
    align-items: center;
    background: #fff;
    border: 2px solid var(--border);
    border-radius: 25px;
    padding: 4px 4px 4px 20px;
    transition: all 0.3s;
}

.search-box:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 140, 66, 0.1);
}

.search-box input {
    border: none;
    outline: none;
    width: 200px;
    font-size: 14px;
    background: transparent;
    color: var(--text);
}

.search-box button {
    background: var(--primary);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    transition: all 0.3s;
}

.search-box button:hover {
    background: var(--primary-dark);
    transform: scale(1.1);
}

.user-area {
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn {
    padding: 8px 20px;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-cat {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(255, 140, 66, 0.4);
}

.btn-cat:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 140, 66, 0.5);
}

.btn-cat:active {
    transform: translateY(0);
}

.btn-cat:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-cat-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-cat-outline:hover {
    background: var(--primary);
    color: #fff;
}

.btn-block {
    width: 100%;
    padding: 12px;
    font-size: 16px;
}

.user-dropdown {
    position: relative;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.user-avatar:hover {
    transform: scale(1.1);
}

.dropdown-menu {
    position: absolute;
    top: 50px;
    right: 0;
    background: #fff;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
    min-width: 120px;
    overflow: hidden;
}

.dropdown-item {
    padding: 12px 20px;
    cursor: pointer;
    transition: background 0.2s;
    color: var(--text);
}

.dropdown-item:hover {
    background: var(--bg-warm);
    color: var(--primary);
}

/* 主容器 */
.main-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px;
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 30px;
}

/* 侧边栏 */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: sticky;
    top: 90px;
    align-self: start;
}

.widget {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.widget-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--accent);
}

.widget-icon {
    font-size: 20px;
}

.widget-header h3 {
    font-size: 16px;
    color: var(--dark);
    font-weight: 600;
}

/* 今日猫咪 */
.cat-widget {
    background: linear-gradient(135deg, var(--bg-warm) 0%, #fff 100%);
    text-align: center;
}

.cat-of-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.cat-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    animation: float 3s ease-in-out infinite;
}

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

.cat-name {
    font-size: 18px;
    font-weight: bold;
    color: var(--primary);
}

.cat-desc {
    font-size: 13px;
    color: var(--text-muted);
    font-style: italic;
}

/* 分类列表 */
.category-list {
    list-style: none;
}

.category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 4px;
}

.category-item:hover {
    background: var(--accent);
    color: var(--primary);
}

.category-item .count {
    background: var(--primary);
    color: #fff;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 10px;
}

/* 热门列表 */
.hot-list {
    list-style: none;
}

.hot-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px dashed var(--border);
    cursor: pointer;
    transition: all 0.2s;
}

.hot-item:last-child {
    border-bottom: none;
}

.hot-item:hover {
    color: var(--primary);
}

.hot-item .rank {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    background: var(--bg-warm);
    color: var(--text-muted);
    flex-shrink: 0;
}

.hot-item .rank-1 {
    background: #FF6B6B;
    color: #fff;
}

.hot-item .rank-2 {
    background: #FFA94D;
    color: #fff;
}

.hot-item .rank-3 {
    background: #FFD43B;
    color: #fff;
}

.hot-item .title {
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

/* 标签云 */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-item {
    padding: 4px 12px;
    background: var(--bg-warm);
    color: var(--primary);
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.tag-item:hover {
    background: var(--primary);
    color: #fff;
    transform: scale(1.1);
}

/* 文章卡片 */
.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

/* 大屏时限制卡片最大宽度 */
@media (min-width: 1440px) {
    .article-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 380px));
    }
}

.article-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid var(--border);
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.card-cover {
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.cover-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}

.article-card:hover .cover-image {
    transform: scale(1.05);
}

.card-cover::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(transparent, rgba(255, 255, 255, 0.3));
}

.card-category {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
}

.category-badge {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary);
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    backdrop-filter: blur(4px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.cover-icon {
    font-size: 60px;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.2));
    transition: transform 0.3s;
}

.article-card:hover .cover-icon {
    transform: scale(1.1) rotate(5deg);
}

.card-content {
    padding: 16px;
}

.card-title {
    font-size: 17px;
    color: var(--text);
    margin-bottom: 10px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.card-summary {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.5;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag-chip {
    font-size: 12px;
    padding: 3px 10px;
    background: var(--accent);
    color: var(--primary);
    border-radius: 10px;
}

/* 文章列表容器 */
.article-list-container {
    min-height: 400px;
}

.loading-more {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    color: var(--text-muted);
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.empty-hint {
    font-size: 14px;
    margin-top: 8px;
}

/* 分页组件样式 */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 30px 20px;
    flex-wrap: wrap;
}

.pagination-info {
    color: var(--text-muted);
    font-size: 14px;
    margin-right: 10px;
}

.page-size-select {
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #fff;
    color: var(--text);
    font-size: 14px;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s;
}

.page-size-select:hover,
.page-size-select:focus {
    border-color: var(--primary);
}

.page-btn {
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #fff;
    color: var(--text);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.page-btn:hover:not(:disabled) {
    border-color: var(--primary);
    color: var(--primary);
}

.page-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-ellipsis {
    color: var(--text-muted);
    padding: 0 4px;
}

.pagination-jump {
    color: var(--text-muted);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.pagination-jump input {
    width: 50px;
    height: 32px;
    padding: 0 8px;
    border: 1px solid var(--border);
    border-radius: 6px;
    text-align: center;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.pagination-jump input:hover,
.pagination-jump input:focus {
    border-color: var(--primary);
}

/* 模态框 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(93, 78, 55, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal {
    background: #fff;
    border-radius: var(--radius-lg);
    width: 400px;
    max-width: 90%;
    overflow: hidden;
    animation: slideUp 0.3s;
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.cat-modal {
    border-top: 5px solid var(--primary);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 30px;
    border-bottom: 1px solid var(--border);
}

.modal-icon {
    font-size: 28px;
}

.modal-header h2 {
    flex: 1;
    text-align: center;
    color: var(--dark);
    font-size: 20px;
}

.close-btn {
    font-size: 24px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
    line-height: 1;
}

.close-btn:hover {
    color: var(--primary);
    transform: rotate(90deg);
}

.modal-body {
    padding: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--dark);
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    transition: all 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 140, 66, 0.1);
}

.error-msg {
    background: #FFE5E5;
    color: #FF6B6B;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: 14px;
}

.login-tips {
    text-align: center;
    margin-top: 16px;
    font-size: 13px;
    color: var(--text-muted);
}

.login-tips a {
    color: var(--primary);
    margin-left: 5px;
}

/* Toast 提示 */
.toast {
    position: fixed;
    top: 100px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 24px;
    border-radius: 25px;
    color: #fff;
    font-size: 14px;
    z-index: 2000;
    animation: toastIn 0.3s;
    box-shadow: var(--shadow-lg);
}

.toast.success {
    background: linear-gradient(135deg, #51CF66 0%, #69DB7C 100%);
}

.toast.error {
    background: linear-gradient(135deg, #FF6B6B 0%, #FF8787 100%);
}

@keyframes toastIn {
    from {
        transform: translateX(-50%) translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

/* 底部 */
.footer {
    background: linear-gradient(135deg, var(--dark) 0%, #3d3423 100%);
    color: #fff;
    padding: 50px 0 0;
    margin-top: 60px;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.footer-section h4 {
    font-size: 18px;
    margin-bottom: 20px;
    color: var(--primary-light);
}

.footer-section p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    line-height: 1.8;
    margin-bottom: 8px;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.3s;
}

.footer-section a:hover {
    color: var(--primary-light);
}

.footer-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.footer-tag {
    padding: 4px 12px;
    background: rgba(255, 140, 66, 0.2);
    color: var(--primary-light);
    border-radius: 15px;
    font-size: 12px;
}

.footer-bottom {
    text-align: center;
    padding: 25px;
    margin-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
}

.footer-bottom p {
    margin: 5px 0;
}

.footer-bottom a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-bottom a:hover {
    color: rgba(255, 255, 255, 0.9);
}

/* 过渡动画 */
.fade-enter-active,
.fade-leave-active {
    transition: opacity 0.3s ease;
}

.fade-enter-from,
.fade-leave-to {
    opacity: 0;
}

/* 响应式 */
@media (max-width: 1024px) {
    .main-container {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        position: static;
    }
    
    .nav {
        gap: 20px;
    }
    
    .search-box input {
        width: 150px;
    }
}

@media (max-width: 768px) {
    .header-inner {
        padding: 0 15px;
        height: auto;
        flex-wrap: wrap;
        gap: 15px;
        padding: 15px;
    }
    
    .nav {
        order: 3;
        width: 100%;
        justify-content: center;
        overflow-x: auto;
    }
    
    .main-container {
        padding: 15px;
    }
    
    .article-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 0 20px;
    }
}

/* ==================== 首页样式 ==================== */
.home-page {
    min-height: calc(100vh - 70px - 200px);
    max-width: 1600px;
    margin: 0 auto;
}

.banner {
    background: linear-gradient(135deg, #FFE4C4 0%, #FFB347 50%, #FF8C42 100%);
    padding: 60px 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.banner::before {
    content: '🐾';
    position: absolute;
    top: 20px;
    left: 10%;
    font-size: 40px;
    opacity: 0.3;
    animation: float 4s ease-in-out infinite;
}

.banner::after {
    content: '🐾';
    position: absolute;
    bottom: 20px;
    right: 10%;
    font-size: 40px;
    opacity: 0.3;
    animation: float 4s ease-in-out infinite reverse;
}

.banner-content {
    position: relative;
    z-index: 1;
}

.banner-content h1 {
    font-size: 36px;
    color: var(--dark);
    margin-bottom: 16px;
}

.banner-content p {
    font-size: 18px;
    color: var(--dark);
    opacity: 0.8;
}

.banner-cats {
    margin-top: 20px;
    font-size: 48px;
}

.floating-cat {
    display: inline-block;
    animation: float 3s ease-in-out infinite;
    margin: 0 10px;
}

/* ==================== 文章列表页样式 ==================== */
.articles-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px;
}

/* 页面头部 */
.articles-header {
    background: #fff;
    border-radius: 16px;
    padding: 24px 28px;
    margin-bottom: 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    border: 1px solid #f0f0f0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.header-left {
    display: flex;
    align-items: baseline;
    gap: 16px;
}

.page-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--dark);
    margin: 0;
}

.total-count {
    font-size: 14px;
    color: var(--text-muted);
    background: var(--bg-warm);
    padding: 4px 12px;
    border-radius: 20px;
}

.header-actions {
    display: flex;
    align-items: center;
}

.filter-group {
    display: flex;
    gap: 12px;
}

.filter-select {
    padding: 8px 32px 8px 14px;
    border: 1.5px solid #e8e8e8;
    border-radius: 10px;
    font-size: 14px;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23999' d='M6 8L1 3h10z'/%3E%3C/svg%3E") no-repeat right 12px center;
    appearance: none;
    cursor: pointer;
    color: var(--text);
    transition: border-color 0.2s;
}

.filter-select:hover {
    border-color: var(--primary-light);
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary);
}

.search-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding: 8px 14px;
    background: var(--accent);
    border-radius: 20px;
    font-size: 14px;
    color: var(--primary);
}

.tag-close {
    border: none;
    background: rgba(255, 255, 255, 0.6);
    color: var(--primary);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.tag-close:hover {
    background: rgba(255, 255, 255, 0.9);
}

/* 主体布局 */
.articles-main {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 24px;
    align-items: start;
}

.articles-list {
    min-width: 0;
}

.articles-sidebar {
    position: sticky;
    top: 90px;
}

/* 响应式 */
@media (max-width: 1024px) {
    .articles-main {
        grid-template-columns: 1fr;
    }
    
    .articles-sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    .articles-container {
        padding: 16px;
    }
    
    .articles-header {
        padding: 16px 20px;
    }
    
    .header-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .filter-select {
        flex: 1;
    }
    
    .page-title {
        font-size: 20px;
    }
}

/* 大屏优化 */
@media (min-width: 1440px) {
    .articles-container {
        max-width: 1500px;
    }
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 3px solid var(--accent);
}

.section-header h2 {
    font-size: 22px;
    color: var(--dark);
}

.more-link {
    color: var(--primary);
    font-size: 14px;
}

.more-link:hover {
    color: var(--primary-dark);
}

/* ==================== 页面头部样式 ==================== */
.page-header {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, var(--bg-warm) 0%, #fff 100%);
    margin-bottom: 30px;
}

.page-header h1 {
    font-size: 32px;
    color: var(--dark);
    margin-bottom: 10px;
}

.page-header p {
    color: var(--text-muted);
    font-size: 16px;
}

.search-info {
    display: inline-block;
    background: var(--accent);
    color: var(--primary);
    padding: 8px 16px;
    border-radius: 20px;
    margin-top: 10px;
    font-size: 14px;
}

/* ==================== 筛选条样式 ==================== */
.filter-bar {
    display: flex;
    gap: 20px;
    margin-bottom: 24px;
    padding: 16px 20px;
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.filter-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-item label {
    font-size: 14px;
    color: var(--dark);
    font-weight: 500;
}

.filter-item select {
    padding: 8px 12px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    background: #fff;
    color: var(--text);
    cursor: pointer;
    outline: none;
}

.filter-item select:focus {
    border-color: var(--primary);
}

/* ==================== 文章详情页样式 ==================== */
.article-detail-page {
    max-width: 1200px;
    margin: 0 auto;
}

.back-bar {
    margin-bottom: 20px;
}

.back-btn {
    background: transparent;
    border: 2px solid var(--border);
    color: var(--primary);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.back-btn:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.article-detail {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: var(--shadow-sm);
}

.article-title {
    font-size: 32px;
    color: var(--dark);
    margin-bottom: 20px;
    line-height: 1.3;
}

.article-meta {
    display: flex;
    gap: 20px;
    padding: 16px 0;
    border-bottom: 2px solid var(--accent);
    margin-bottom: 24px;
    font-size: 14px;
    color: var(--text-muted);
    flex-wrap: wrap;
    align-items: center;
}

.article-meta .category {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    background: var(--accent);
    color: var(--primary);
    border-radius: 12px;
    font-weight: 500;
}

.article-meta .views,
.article-meta .author,
.article-meta .date {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
}

.detail-tag {
    padding: 6px 14px;
    background: var(--accent);
    color: var(--primary);
    border-radius: 15px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.detail-tag:hover {
    background: var(--primary);
    color: #fff;
}

.article-content {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text);
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
    margin: 20px 0;
}

.article-content p {
    margin-bottom: 20px;
}

.article-footer {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 2px solid var(--accent);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.like-section,
.share-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.like-btn {
    background: linear-gradient(135deg, #FF6B6B 0%, #FF8787 100%);
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s;
}

.like-btn:hover {
    transform: scale(1.05);
}

.like-text {
    color: var(--text-muted);
    font-size: 14px;
}

.share-btn {
    background: var(--accent);
    color: var(--primary);
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.share-btn:hover {
    background: var(--primary);
    color: #fff;
}

/* 评论区 */
.comments-section {
    margin-top: 40px;
}

.comments-title {
    font-size: 22px;
    color: var(--dark);
    margin-bottom: 24px;
}

.comment-form {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 30px;
}

.comment-form textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
    outline: none;
    transition: all 0.3s;
}

.comment-form textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 140, 66, 0.1);
}

.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    flex-wrap: wrap;
    gap: 12px;
}

.emoji-picker {
    display: flex;
    gap: 8px;
}

.emoji-picker span {
    font-size: 24px;
    cursor: pointer;
    transition: transform 0.2s;
}

.emoji-picker span:hover {
    transform: scale(1.3);
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.comment-item {
    display: flex;
    gap: 16px;
    background: var(--bg-card);
    padding: 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.comment-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
    flex-shrink: 0;
}

.comment-body {
    flex: 1;
}

.comment-header {
    display: flex;
    gap: 12px;
    margin-bottom: 8px;
}

.comment-user {
    font-weight: bold;
    color: var(--dark);
}

.comment-time {
    color: var(--text-muted);
    font-size: 12px;
}

.comment-content {
    color: var(--text);
    line-height: 1.6;
}

.no-comments {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
    background: var(--bg-card);
    border-radius: var(--radius);
}

/* ==================== 分类页面样式 ==================== */
.categories-page,
.tags-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
}

.category-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid var(--border);
    position: relative;
    overflow: hidden;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.category-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.category-card h3 {
    font-size: 20px;
    color: var(--dark);
    margin-bottom: 8px;
}

.category-desc {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 16px;
}

.article-count {
    display: inline-block;
    background: var(--accent);
    color: var(--primary);
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 13px;
    font-weight: 500;
}

.category-decoration {
    position: absolute;
    top: -20px;
    right: -20px;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--accent) 0%, transparent 100%);
    border-radius: 50%;
    opacity: 0.5;
}

/* ==================== 标签页面样式 ==================== */
.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    padding: 40px;
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.tag-badge {
    padding: 10px 20px;
    border: 2px solid;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.tag-badge:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-md);
}

.tag-count {
    font-size: 12px;
    background: rgba(255, 255, 255, 0.5);
    padding: 2px 8px;
    border-radius: 10px;
}

@media (max-width: 768px) {
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .article-detail {
        padding: 24px 16px;
    }
    
    .article-title {
        font-size: 24px;
    }
    
    .banner {
        padding: 40px 20px;
    }
    
    .banner-content h1 {
        font-size: 28px;
    }
    
    .filter-bar {
        flex-direction: column;
    }
}
