:root {
    --primary-color: #5D4037;
    --primary-light: #8D6E63;
    --primary-dark: #3E2723;
    --accent-color: #FFAB00;
    --accent-light: #FFD54F;
    --background-color: #F8F9FA;
    --surface-color: #FFFFFF;
    --text-primary: #212121;
    --text-secondary: #616161;
    --text-hint: #9E9E9E;
    --text-on-primary: #FFFFFF;
    --border-color: #E0E0E0;
    --shadow-color: rgba(0, 0, 0, 0.08);
    --card-shadow: 0 8px 16px rgba(0, 0, 0, 0.06);
    --hover-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
    --card-radius: 16px;
    --button-radius: 24px;
    --transition-time: 0.3s;
    --loading-color-1: #FF9800;
    --loading-color-2: #8BC34A;
    --loading-color-3: #03A9F4;
    --card-bg: #f5f5f5;
    --skeleton-bg: #e0e0e0;
}

/* 暗色主题 */
.dark-theme {
    --primary-color: #8D6E63;
    --primary-light: #A1887F;
    --primary-dark: #6D4C41;
    --accent-color: #FFB300;
    --accent-light: #FFCA28;
    --background-color: #121212;
    --surface-color: #1E1E1E;
    --text-primary: #E0E0E0;
    --text-secondary: #B0B0B0;
    --text-hint: #909090;
    --text-on-primary: #FFFFFF;
    --border-color: #333333;
    --shadow-color: rgba(0, 0, 0, 0.2);
    --card-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    --hover-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Noto Sans SC', sans-serif;
}

body {
    color: var(--text-primary);
    background-color: var(--background-color);
    transition: background-color 0.5s ease, color 0.5s ease;
    margin: 0;
    padding: 0;
}

/*隐藏滚动条*/
::-webkit-scrollbar {display:none}

/* 主题切换动画 */
.theme-transition {
    transition: background-color 0.5s ease,
                color 0.5s ease,
                border-color 0.5s ease,
                box-shadow 0.5s ease;
}

.container {
    top: 5px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 15px;
    position: relative;
}

/* 新导航栏设计 */
header {
    display: none;
}

.header-container {
    display: none;
}

.logo {
    font-size: 18px;  /* 稍微减小字体大小 */
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    transition: transform 0.3s ease;
    padding: 4px 0;  /* 添加一些垂直内边距 */
}

.logo:hover {
    transform: scale(1.05);
}

.logo-img {
    width: 35px;  /* 增加图片尺寸 */
    height: 35px;
    margin-right: 10px;  /* 稍微减少右边距 */
    transition: transform 0.5s ease;
    object-fit: contain;  /* 确保图片比例正确 */
}

.logo:hover .logo-img {
    transform: rotate(15deg);
}

.search-bar {
    flex: 1;
    position: relative;
    margin: 0 24px;
    max-width: 600px;
}

.search-bar input {
    width: 100%;
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    font-size: 15px;
    padding-left: 42px;
    transition: all var(--transition-time);
    background-color: var(--background-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) inset;
    height: 45px;
}

.search-bar input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(93, 64, 55, 0.1);
}

.search-bar i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-hint);
    transition: color 0.3s ease;
    font-size: 15px;
}

.search-bar input:focus + i,
.search-bar:hover i {
    color: var(--primary-color);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-action-button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--background-color);
    color: var(--primary-color);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.nav-action-button:hover {
    background-color: rgba(93, 64, 55, 0.1);
    transform: translateY(-2px);
}

/* 主内容区域 */
.main-content {
    flex-grow: 1;
    padding: 0 5px;
}

.filters {
    display: flex;
    justify-content: space-between;
    background-color: var(--surface-color);
    padding: 18px 22px;
    border-radius: 12px;
    margin-bottom: 24px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    flex-wrap: wrap;
    gap: 16px;
    transition: all var(--transition-time) ease;
}

.filters:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.filter-tags {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 5px;
    flex-wrap: wrap;
}

/* 分类标签基础样式 */
.filter-tag {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 18px;
    margin: 0 8px;
    border-radius: 20px;
    background: #f5f5f5;
    color: #333;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    min-width: 80px;
    justify-content: center;
    text-align: center;
}

/* 标签内部文本 */
.filter-tag .tag-text {
    position: relative;
    z-index: 2;
}

/* 标签底部指示器 */
/* .filter-tag .tag-indicator {
    height: 3px;
    width: 0;
    background: var(--accent-color);
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    transition: width 0.3s ease;
    border-radius: 3px;
    opacity: 0;
} */

/* 选中状态 */
.filter-tag.active {
    background: #5c3a1e;   /* 深色背景 */
    color: #fff;           /* 白色字体 */
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(92,58,30,0.15);
    transform: translateY(-2px);
}

/* 活动标签指示器 */
/* .filter-tag.active .tag-indicator {
    width: 70%;
    opacity: 1;
} */

/* 悬停状态 */
.filter-tag:hover {
    background: #e0c9b0;
    color: #5c3a1e;
    transform: translateY(-2px);
}

/* 悬停指示器 */
/* .filter-tag:hover .tag-indicator {
    width: 40%;
    opacity: 0.7;
} */

.sort-options {
    display: flex;
    align-items: center;
    color: var(--text-secondary);
}

.sort-options select {
    padding: 10px 18px;
    border-radius: var(--button-radius);
    border: 2px solid var(--border-color);
    font-size: 14px;
    margin-left: 8px;
    background-color: var(--surface-color);
    cursor: pointer;
    transition: all var(--transition-time);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.sort-options select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(93, 64, 55, 0.15);
}

/* 内容卡片区域 */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 35px;
}

/* 全新卡片设计 */
.content-card {
    background-color: var(--surface-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.25s ease;
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
}

.card-thumbnail {
    height: 160px;
    position: relative;
    overflow: hidden;
    background-color: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-light);
    font-size: 40px;
}

/* 添加卡片缩略图遮罩效果 */
.card-thumbnail::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.1);  /* 90%透明度的灰色遮罩 */
    z-index: 2;
    transition: opacity var(--transition-time);
}

/* 暗色主题下的遮罩 */
.dark-theme .card-thumbnail::before {
    background-color: rgba(0, 0, 0, 0.15);  /* 暗色主题下稍微调深一点 */
}

/* 鼠标悬停时去除缩略图遮罩 */
.content-card:hover .card-thumbnail::before {
    opacity: 0;
}

/* 底部渐变效果，保持在遮罩下面 */
.card-thumbnail::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(to top, rgba(0,0,0,0.4), transparent);
    z-index: 1; /* 确保在主遮罩下面 */
}

/* 简笔画风格的封面占位符 */
.card-placeholder-sketch {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #FCFCFA;
    position: relative;
    overflow: hidden;
    transition: transform var(--transition-time);
}

/* 添加卡片遮罩效果 */
.card-placeholder-sketch::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.1);  /* 90%透明度的灰色遮罩 */
    z-index: 2;
    transition: opacity var(--transition-time);
}

/* 鼠标悬停时去除遮罩 */
.content-card:hover .card-placeholder-sketch::before {
    opacity: 0;
}

/* 暗色主题的占位符背景 */
.dark-theme .card-placeholder-sketch {
    background-color: #282826;
}

.dark-theme .card-placeholder-sketch::before {
    background-color: rgba(0, 0, 0, 0.15);  /* 暗色主题下稍微调深一点 */
}

.sketch-animal {
    width: 100px;
    height: 100px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3; /* 确保在遮罩上面 */
}

.sketch-animal::before {
    content: "";
    position: absolute;
    width: 80px;
    height: 60px;
    border: 2.5px solid #7d6c55;
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    transform: rotate(5deg);
    transition: transform var(--transition-time);
}

.dark-theme .sketch-animal::before {
    border-color: #a8967d;
}

.sketch-animal::after {
    content: "";
    position: absolute;
    top: 20px;
    left: 50%;
    width: 50px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(253, 247, 240, 0.6);
    transform: translateX(-50%);
}

.dark-theme .sketch-animal::after {
    background-color: rgba(110, 100, 90, 0.3);
}

.sketch-animal .ears {
    position: absolute;
    top: -15px;
    width: 80px;
    display: flex;
    justify-content: space-between;
}

.sketch-animal .ears::before,
.sketch-animal .ears::after {
    content: "";
    width: 20px;
    height: 25px;
    border: 2.5px solid #7d6c55;
    border-bottom: 0;
    border-radius: 50% 50% 0 0;
    transform: rotate(-5deg);
    transition: transform var(--transition-time);
}

.dark-theme .sketch-animal .ears::before,
.dark-theme .sketch-animal .ears::after {
    border-color: #a8967d;
}

.sketch-animal .ears::after {
    transform: rotate(5deg);
    transition: transform var(--transition-time);
}

.sketch-animal .eyes {
    position: absolute;
    top: 22px;
    width: 60px;
    display: flex;
    justify-content: space-between;
    z-index: 1;
}

.sketch-animal .eyes::before,
.sketch-animal .eyes::after {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #7d6c55;
}

.dark-theme .sketch-animal .eyes::before,
.dark-theme .sketch-animal .eyes::after {
    background-color: #a8967d;
}

.sketch-animal .nose {
    position: absolute;
    top: 35px;
    width: 12px;
    height: 8px;
    border-radius: 50%;
    background-color: #7d6c55;
    z-index: 1;
}

.dark-theme .sketch-animal .nose {
    background-color: #a8967d;
}

.sketch-animal .mouth {
    position: absolute;
    top: 45px;
    width: 14px;
    height: 7px;
    border-bottom: 2.5px solid #7d6c55;
    border-radius: 50%;
    z-index: 1;
}

.dark-theme .sketch-animal .mouth {
    border-bottom-color: #a8967d;
}

.sketch-animal .whiskers {
    position: absolute;
    top: 38px;
    width: 80px;
    display: flex;
    justify-content: space-between;
}

.sketch-animal .whiskers::before,
.sketch-animal .whiskers::after {
    content: "";
    width: 25px;
    height: 1.5px;
    background-color: #7d6c55;
    transform: rotate(-15deg);
}

.dark-theme .sketch-animal .whiskers::before,
.dark-theme .sketch-animal .whiskers::after {
    background-color: #a8967d;
}

.sketch-animal .whiskers::after {
    transform: rotate(15deg);
}

.sketch-text {
    margin-top: 12px;
    font-size: 12px;
    color: #7d6c55;
    font-style: italic;
    font-family: 'Noto Sans SC', cursive, sans-serif;
    transform: rotate(-2deg);
    text-align: center;
    line-height: 1.4;
    opacity: 0.8;
    max-width: 90%;
    position: relative;
    z-index: 3; /* 确保在遮罩上面 */
}

.dark-theme .sketch-text {
    color: #a8967d;
}

/* 手绘风格的线条效果 */
.sketch-text::before {
    content: "";
    position: absolute;
    bottom: -3px;
    left: 10%;
    width: 80%;
    height: 1px;
    background-color: #7d6c55;
    opacity: 0.3;
    border-radius: 50%;
}

.dark-theme .sketch-text::before {
    background-color: #a8967d;
}

.content-card:hover .card-placeholder-sketch {
    transform: scale(1.03);
}

.content-card:hover .sketch-animal::before {
    transform: rotate(8deg);
}

.content-card:hover .sketch-animal .ears::before {
    transform: rotate(-8deg);
}

.content-card:hover .sketch-animal .ears::after {
    transform: rotate(8deg);
}

.card-thumbnail i {
    opacity: 0.7;
}

.content-card:hover .card-thumbnail i {
    color: var(--primary-color);
}

.account-avatar {
    position: absolute;
    right: 16px;
    bottom: -16px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--surface-color);
    background-color: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    z-index: 3;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    color: var(--text-on-primary);
}

.card-info {
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    position: relative;
}

.card-title {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.6;
    height: 3.2em;
    color: var(--text-primary);
    transition: color 0.2s ease;
}

.content-card:hover .card-title {
    color: var(--primary-color);
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-secondary);
    font-size: 13px;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid rgba(0, 0, 0, 0.03);
}

.account-name {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-weight: 500;
    opacity: 0.8;
}

.card-stats {
    display: flex;
    gap: 14px;
}

.card-stats span {
    display: flex;
    align-items: center;
}

.card-stats span i {
    margin-right: 4px;
    color: var(--primary-color);
    font-size: 12px;
}

.card-category {
    position: absolute;
    top: 12px;
    left: 12px;
    background-color: rgba(255, 255, 255, 0.9);
    color: var(--primary-color);
    padding: 4px 10px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 500;
    z-index: 3;
    backdrop-filter: blur(4px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
}

/* 卡片加载状态 */
.content-card-skeleton {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    animation: skeleton-loading 1.5s infinite;
}

.skeleton-thumbnail {
    width: 100%;
    height: 200px;
    background: var(--skeleton-bg);
    border-radius: 8px;
    margin-bottom: 15px;
}

.skeleton-info {
    padding: 10px 0;
}

.skeleton-title {
    height: 20px;
    background: var(--skeleton-bg);
    border-radius: 4px;
    margin-bottom: 10px;
    width: 100%;
}

.skeleton-title:last-child {
    width: 80%;
}

.skeleton-meta {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
}

.skeleton-meta-item {
    height: 16px;
    background: var(--skeleton-bg);
    border-radius: 4px;
    width: 30%;
}

@keyframes skeleton-loading {
    0% {
        opacity: 0.6;
    }
    50% {
        opacity: 0.8;
    }
    100% {
        opacity: 0.6;
    }
}

/* 响应式设计 */
@media (max-width: 992px) {
    .container {
        padding: 0 10px;
    }

    .header-container {
        padding: 0 15px;
    }

    .search-bar {
        margin: 0 15px;
    }
}

@media (max-width: 768px) {
    header {
        height: 60px;
    }

    .header-container {
        padding: 0 10px;
    }

    .logo {
        font-size: 18px;
    }

    /*.logo i {*/
    /*    font-size: 20px;*/
    /*    margin-right: 8px;*/
    /*}*/

    .search-bar {
        margin: 0 10px;
    }

    .search-bar input {
        height: 40px;
        padding: 10px 12px;
        padding-left: 36px;
        font-size: 14px;
    }

    .search-bar i {
        left: 12px;
    }

    .nav-action-button {
        width: 36px;
        height: 36px;
    }

    .filters {
        padding: 15px;
    }

    .content-grid {
        gap: 25px;
    }

    .card-thumbnail {
        height: 140px;
    }

    .card-info {
        padding: 18px 16px;
    }

    .card-title {
        font-size: 15px;
        margin-bottom: 10px;
    }

    .card-stats {
        gap: 8px;
    }

    .account-avatar {
        width: 36px;
        height: 36px;
    }

    .article-view {
        padding: 30px 20px;
    }

    .article-title {
        font-size: 24px;
        margin-top: 0;
        margin-bottom: 20px;
    }

    .article-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .article-content {
        font-size: 16px;
    }

    .no-result {
        padding: 50px 25px;
    }

    .no-result-animal {
        width: 120px;
        height: 120px;
    }

    .no-result-animal i {
        font-size: 50px;
    }

    .no-result-title {
        font-size: 24px;
    }

    .no-result-text {
        font-size: 16px;
    }

    .back-btn {
        margin-bottom: 20px;
        font-size: 15px;
    }

    body.simple-mode .content-card {
        max-height: 150px;
    }

    body.simple-mode .card-excerpt {
        margin-bottom: 12px;
    }
}

/* 阅读页面样式 */
.article-view {
    display: none;
    background-color: var(--surface-color);
    border-radius: var(--card-radius);
    padding: 45px;
    box-shadow: var(--card-shadow);
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    animation: fadeIn 0.5s ease forwards;
}

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

.article-header {
    margin-bottom: 32px;
    display: flex;
    flex-direction: column;
}

.article-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 24px;
    line-height: 1.3;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.article-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 28px;
    gap: 24px;
}

.article-account {
    display: flex;
    align-items: center;
}

/* .article-account-avatar {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background-color: var(--primary-light);
    margin-right: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-on-primary);
    box-shadow: 0 4px 12px var(--shadow-color);
    transition: all 0.3s ease;
}

.article-account-avatar:hover {
    transform: scale(1.05) rotate(5deg);
} */

.article-account-info {
    display: flex;
    flex-direction: column;
}

.article-account-name {
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.article-date {
    color: var(--text-secondary);
    font-size: 14px;
}

/* .article-stats {
    display: flex;
    gap: 20px;
    color: var(--text-secondary);
    font-size: 14px;
}

.article-stats span {
    display: flex;
    align-items: center;
}

.article-stats span i {
    margin-right: 8px;
    color: var(--primary-color);
} */

.article-content {
    font-size: 18px;
    line-height: 1.8;
    margin-bottom: 40px;
    color: var(--text-primary);
    white-space: pre-line;
}

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

.back-btn {
    position: relative;
    top: unset;
    left: unset;
    margin-bottom: 24px;
    background: transparent;
    border: none;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    border-radius: 0;
    color: var(--text-secondary);
    transition: all 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 10;
    box-shadow: none;
    border-bottom: 1px solid var(--border-color);
    align-self: flex-start;
    width: auto;
}

.back-btn:after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    height: 2px;
    width: 0;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.back-btn:hover {
    color: var(--primary-color);
    transform: translateX(-5px);
    background-color: transparent;
    box-shadow: none;
}

.back-btn:hover:after {
    width: 100%;
}

.back-btn:active {
    transform: translateX(-5px) scale(0.98);
}

.back-btn i {
    font-size: 14px;
    transition: transform 0.2s ease;
}

.back-btn:hover i {
    transform: translateX(-3px);
}

/* 全局加载遮罩 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    backdrop-filter: blur(5px);
}

.loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    background-color: transparent;
    padding: 25px;
    border-radius: 50px;
    box-shadow: none;
    transform: scale(1);
    transition: all 0.2s ease;
    animation: pulse 1.5s infinite alternate;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    100% {
        transform: scale(1.05);
    }
}

/* 加载遮罩淡出动画 */
.loading-overlay.fade-out {
    opacity: 0;
    transition: opacity 0.2s ease;
}

/* 弹跳加载动画 */
.bouncing-loader {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
}

.bouncing-loader > div {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    animation: bouncing 0.5s infinite alternate;
    box-shadow: 0 3px 8px rgba(0,0,0,0.15);
}

.bouncing-loader > div:nth-child(1) {
    background-color: var(--loading-color-1);
    animation-delay: 0s;
}

.bouncing-loader > div:nth-child(2) {
    background-color: var(--loading-color-2);
    animation-delay: 0.15s;
}

.bouncing-loader > div:nth-child(3) {
    background-color: var(--loading-color-3);
    animation-delay: 0.3s;
}

@keyframes bouncing {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(-14px);
    }
}

.no-result {
    text-align: center;
    padding: 70px 40px;
    color: var(--text-secondary);
    font-size: 18px;
    background-color: var(--surface-color);
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    grid-column: 1 / -1;
    width: 100%;
    animation: fadeInUp 0.6s ease forwards;
}

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

.no-result-icon {
    font-size: 84px;
    color: var(--primary-light);
    margin-bottom: 10px;
    position: relative;
    animation: float 3s ease-in-out infinite;
}

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

.no-result-animal {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background-color: var(--background-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    border: 5px solid rgba(255, 255, 255, 0.8);
}

.no-result-animal i {
    font-size: 64px;
    color: var(--primary-color);
    animation: wobble 4s ease-in-out infinite;
}

@keyframes wobble {
    0%, 100% {
        transform: rotate(0deg) scale(1);
    }
    25% {
        transform: rotate(-8deg) scale(1.08);
    }
    50% {
        transform: rotate(0deg) scale(1);
    }
    75% {
        transform: rotate(8deg) scale(1.08);
    }
}

.no-result-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.no-result-text {
    color: var(--text-secondary);
    max-width: 450px;
    margin: 0 auto;
    line-height: 1.7;
    font-size: 17px;
}

.no-result-action {
    margin-top: 15px;
    padding: 12px 28px;
    background-color: var(--primary-color);
    color: var(--text-on-primary);
    border: none;
    border-radius: var(--button-radius);
    font-size: 16px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 4px 12px rgba(93, 64, 55, 0.25);
}

.no-result-action:hover {
    background-color: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.no-result-action:active {
    transform: translateY(-1px);
}

/* 搜索框样式增强 */
.search-bar.search-focus input {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(93, 64, 55, 0.15);
    transform: translateY(-1px);
}

.search-bar.search-active input {
    animation: search-pulse 0.4s ease;
}

@keyframes search-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

/* 底部加载指示器 */
.bottom-loading {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 0;
    gap: 15px;
    color: var(--primary-color);
    font-size: 16px;
    animation: fadeIn 0.3s ease;
}

.bottom-loading-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(93, 64, 55, 0.2);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s infinite linear;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 欢迎动画 */
.welcome-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--surface-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.welcome-overlay.welcome-fade {
    opacity: 0;
}

.welcome-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    animation: welcome-in 1s ease;
}

@keyframes welcome-in {
    0% { opacity: 0; transform: translateY(30px); }
    100% { opacity: 1; transform: translateY(0); }
}

.welcome-icon {
    font-size: 84px;
    color: var(--primary-light);
    margin-bottom: 10px;
    position: relative;
    animation: float 3s ease-in-out infinite;
}

.welcome-icon .logo-img {
    width: 84px;  /* 调大欢迎界面的图片尺寸 */
    height: 84px;
    object-fit: contain;
}

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

.welcome-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-color);
}

.welcome-text {
    font-size: 18px;
    color: var(--text-secondary);
}

/* 添加明显的页面转场效果 */
.home-view, .article-view {
    transition: opacity 0.5s ease, transform 0.5s ease;
}

/* 更自然的图像缩放效果 */
.card-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.content-card:hover .card-thumbnail img {
    transform: scale(1.1);
}

/* 文章内容段落动画 */
.article-content p {
    margin-bottom: 24px;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

/* 表单元素焦点效果增强 */
input:focus, select:focus, button:focus {
    outline: none;
}

/* 新的导航栏分类和悬浮搜索样式 */

/* 导航分类样式 */
.nav-categories {
    display: flex;
    align-items: center;
    flex: 1;
    overflow-x: auto;
    padding: 0 15px;
    max-width: none;
    white-space: nowrap;
    position: relative;
    scroll-behavior: smooth;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

/* 导航滚动按钮 */
.nav-scroll-button {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--surface-color);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    opacity: 0.9;
}

.nav-scroll-button:hover {
    background: var(--primary-light);
    color: white;
    opacity: 1;
}

.nav-scroll-button.disabled {
    opacity: 0.3;
    cursor: default;
    pointer-events: none;
}

.nav-scroll-left {
    left: 5px;
}

.nav-scroll-right {
    right: 5px;
}

/* 当导航栏分类较少时的样式 */
.nav-categories.center-categories {
    justify-content: center;
}

/* 隐藏滚动条 */
.nav-categories::-webkit-scrollbar {
    display: none;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .nav-categories {
        padding: 0 26px;
        margin: 0 -10px;
    }

    .filter-tag {
        padding: 6px 14px;
        margin: 0 4px;
        font-size: 14px;
        min-width: 70px;
    }

    .nav-scroll-button {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
}

/* 悬浮搜索框 - 现代简约风格 */
.floating-search {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px) saturate(180%);
    height: 100vh;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    pointer-events: none; /* 默认不接受点击事件 */
}

.floating-search.active {
    opacity: 1;
    visibility: visible;
    pointer-events: all; /* 激活状态时接受点击事件 */
}

.floating-search-container {
    width: 650px;
    max-width: 90%;
    position: relative;
    transform: translateY(-120px);
    margin-top: -100px;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.floating-search.active .floating-search-container {
    transform: translateY(-100px); /* 激活状态时的位置也相应调整 */
}

.floating-search .search-bar {
    margin: 0;
    position: relative;
    width: 100%;
}

.floating-search .search-bar input {
    width: 100%;
    height: 60px;
    padding: 0 60px 0 60px;
    border-radius: 30px;
    border: 2px solid var(--border-color);
    font-size: 18px;
    background-color: var(--surface-color);
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.floating-search .search-bar input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 8px 25px rgba(93, 64, 55, 0.15);
    transform: translateY(-2px);
    padding-left: 30px; /* 当输入框获得焦点时，减少左侧padding */
}

.floating-search .search-bar i.search-icon {
    position: absolute;
    left: 25px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-hint);
    font-size: 20px;
    transition: all 0.3s ease;
    opacity: 1;
    visibility: visible;
}

.floating-search .search-bar input:focus + i.search-icon {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-50%) translateX(-20px);
}

/* 响应式设计中也需要调整 */
@media (max-width: 768px) {
    .floating-search .search-bar input {
        height: 50px;
        font-size: 16px;
        padding: 0 25px 0 50px;
    }

    .floating-search .search-bar input:focus {
        padding-left: 25px;
    }

    .floating-search .search-bar i.search-icon {
        left: 20px;
        font-size: 18px;
    }
}

/* 关闭按钮 */
.search-close {
    position: fixed;
    top: 30px;
    right: 30px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--surface-color);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 1001;
    opacity: 0;
    transform: scale(0.8);
}

.floating-search.active .search-close {
    opacity: 1;
    transform: scale(1);
    transition-delay: 0.2s;
}

.search-close:hover {
    transform: rotate(90deg) scale(1.1);
    border-color: var(--primary-color);
    color: var(--primary-color);
    background-color: var(--surface-color);
}

/* 移除旧的按钮相关样式 */
.search-actions,
.search-submit,
.search-clear {
    display: none;
}

/* 暗色主题适配 */
.dark-theme .floating-search {
    background-color: rgba(18, 18, 18, 0.98);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .floating-search {
        align-items: flex-start;
        padding-top: 20vh;
    }

    .floating-search .search-bar input {
        height: 50px;
        font-size: 16px;
        padding: 0 25px 0 50px;
    }

    .floating-search .search-bar i.search-icon {
        left: 20px;
        font-size: 18px;
    }

    .search-close {
        top: 20px;
        right: 20px;
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
}

/* 修改现有样式 */

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1500px;
    margin: 0 auto;
    padding: 0 20px;
    height: 100%;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-action-button {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--background-color);
    color: var(--primary-color);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 15px;
}

.nav-action-button:hover {
    background-color: rgba(93, 64, 55, 0.1);
    transform: translateY(-2px);
}

/* 响应式调整 */
@media (max-width: 992px) {
    .nav-categories {
        max-width: 75%;
    }
}

@media (max-width: 768px) {
    .nav-categories {
        max-width: 75%;
        margin: 0 10px;
        padding: 0;
        overflow-x: auto;
    }

    .nav-categories .filter-tag {
        padding: 6px 12px;
        font-size: 13px;
    }

    .floating-search-container {
        padding: 15px;
    }

    .floating-search .search-bar input {
        height: 45px;
    }

    .header-container {
        flex-wrap: nowrap;
        padding: 0 10px;
    }

    .logo span {
        display: none;
    }

    /*.logo i {*/
    /*    margin-right: 0;*/
    /*}*/
}

.floating-search .search-bar input::placeholder {
    color: var(--text-hint);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.floating-search .search-bar input:focus::placeholder {
    opacity: 0.7;
    transform: translateX(5px);
}

.floating-search .search-bar input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(93, 64, 55, 0.1);
    outline: none;
}

.floating-search .search-bar i.search-icon {
    font-size: 16px;
    left: 18px;
    color: var(--primary-color);
    opacity: 0.7;
    transition: opacity 0.3s ease, transform 0.3s ease;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.floating-search .search-bar input:focus + i.search-icon {
    opacity: 1;
    transform: translateY(-50%) scale(1.05);
}

.search-close {
    background: transparent;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    color: var(--text-secondary);
    margin-left: 12px;
    transition: all 0.25s ease;
}

.search-close:hover {
    background-color: rgba(93, 64, 55, 0.08);
    color: var(--primary-color);
    transform: rotate(90deg);
}

/* 分类设置弹窗样式 */
.category-settings-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    height: 100vh;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), visibility 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.category-settings-modal.active {
    opacity: 1;
    visibility: visible;
}

.category-settings-container {
    background-color: var(--surface-color);
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
    padding: 24px;
    width: 90%;
    max-width: 1400px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.category-settings-modal.active .category-settings-container {
    transform: translateY(0);
    opacity: 1;
}

.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.settings-header h3 {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.settings-close {
    background: transparent;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    color: var(--text-secondary);
    transition: all 0.25s ease;
}

.settings-close:hover {
    background-color: rgba(93, 64, 55, 0.08);
    color: var(--primary-color);
    transform: rotate(90deg);
}

.settings-description {
    color: var(--text-secondary);
    font-size: 15px;
    margin-bottom: 24px;
    line-height: 1.5;
}

/* 新的分类设置样式 */
.category-sections {
    display: flex;
    flex-direction: column;
    gap: 24px;
    overflow-y: auto;
    max-height: none;
    padding: 5px;
    margin-bottom: 24px;
}

.category-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.section-header {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.section-header h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-header i {
    color: var(--primary-color);
}

.section-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
}

.category-items {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 12px;
}

.category-divider {
    height: 1px;
    background-color: var(--border-color);
    margin: 0 -32px;
    opacity: 0.7;
}

.category-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    border-radius: 14px;
    background-color: var(--background-color);
    transition: all 0.25s ease;
    position: relative;
    border: 1px solid var(--border-color);
}

.category-item.selected {
    border-color: var(--primary-color);
    background-color: rgba(93, 64, 55, 0.05);
}

.category-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.category-icon {
    color: var(--text-secondary);
    font-size: 14px;
    width: 20px;
    display: flex;
    justify-content: center;
}

.category-item.selected .category-icon {
    color: var(--primary-color);
}

.category-name {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.category-action-btn {
    width: 24px;
    height: 24px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 12px;
    transition: all 0.2s ease;
    padding: 0;
}

.category-action-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
    transform: scale(1.1);
}

.category-action-btn.add-btn {
    color: #4CAF50;
}

.category-action-btn.remove-btn {
    color: #F44336;
}

.category-action-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.empty-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 20px;
    color: var(--text-secondary);
    font-style: italic;
    background-color: rgba(0, 0, 0, 0.02);
    border-radius: 12px;
    font-size: 14px;
}

.category-limit-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 12px;
    background-color: rgba(0, 120, 230, 0.05);
    color: #0078e6;
    font-size: 14px;
    margin-bottom: 24px;
    border: 1px solid rgba(0, 120, 230, 0.1);
}

.category-limit-info.warning {
    background-color: rgba(244, 67, 54, 0.05);
    color: #F44336;
    border-color: rgba(244, 67, 54, 0.1);
}

.settings-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

.settings-save, .settings-reset {
    padding: 12px 20px;
    border-radius: var(--button-radius);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.settings-save {
    background-color: var(--background-color);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.settings-save:hover {
    background-color: var(--surface-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.settings-reset {
    background-color: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.settings-reset:hover {
    background-color: var(--background-color);
    transform: translateY(-2px);
}

.settings-save:active, .settings-reset:active {
    transform: translateY(0);
}

/* 最大限制警告动画 */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.shake-animation {
    animation: shake 0.82s cubic-bezier(.36,.07,.19,.97) both;
}

/* 暗色主题适配 */
.dark-theme .category-item {
    background-color: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.1);
}

.dark-theme .category-item.selected {
    background-color: rgba(141, 110, 99, 0.15);
    border-color: var(--primary-color);
}

.dark-theme .empty-message {
    background-color: rgba(255, 255, 255, 0.03);
}

/* 响应式布局 */
@media (max-width: 1500px) {
    .category-items {
        grid-template-columns: repeat(6, 1fr);
    }
}

@media (max-width: 1200px) {
    .category-items {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (max-width: 992px) {
    .category-items {
        grid-template-columns: repeat(4, 1fr);
    }

    .category-settings-container {
        width: 95%;
        max-width: 800px;
        padding: 20px;
    }
}

@media (max-width: 768px) {
    .category-items {
        grid-template-columns: 1fr;
    }
    .category-settings-container {
        width: 95%;
        max-width: 600px;
        padding: 16px;
    }
}

/* 选择分类数量限制提示 */
.category-limit-warning {
    color: #e67e22;
    font-size: 13px;
    margin: 5px 0 20px;
    display: none;
    padding: 8px 12px;
    background-color: rgba(230, 126, 34, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
}

.category-limit-warning i {
    margin-right: 8px;
}

.category-limit-warning.active {
    display: flex;
    animation: fadeIn 0.3s ease forwards;
}

/* 添加自定义复选框样式 */
.custom-checkbox {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.custom-checkbox input[type="checkbox"] {
    opacity: 0;
    position: absolute;
}

.custom-checkbox label {
    padding-left: 30px;
    cursor: pointer;
    font-size: 15px;
    color: var(--text-primary);
    position: relative;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.custom-checkbox label:before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    background-color: var(--surface-color);
    transition: all 0.2s ease;
}

.custom-checkbox input[type="checkbox"]:checked + label:before {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.custom-checkbox input[type="checkbox"]:checked + label:after {
    content: '\f00c';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    left: 3px;
    top: 0;
    color: var(--text-on-primary);
    font-size: 12px;
}

.custom-checkbox input[type="checkbox"]:disabled + label {
    opacity: 0.5;
    cursor: not-allowed;
}

.custom-checkbox input[type="checkbox"]:disabled + label:before {
    background-color: var(--border-color);
    border-color: var(--border-color);
}

/* 禁止页面滚动的样式 */
body.modal-open {
    overflow: hidden;
    height: 100vh;
    position: fixed;
    width: 100%;
}

/* 简约模式样式 */
body.simple-mode .content-card {
    display: flex;
    flex-direction: row;
    max-height: 250px;
    overflow: hidden;
}

body.simple-mode .card-thumbnail {
    display: none;
}

body.simple-mode .card-info {
    padding: 24px 26px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    position: relative;
}

body.simple-mode .card-title {
    font-size: 17px;
    margin-bottom: 14px;
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.6;
    height: auto;
    max-height: 3.2em;
}

body.simple-mode .card-excerpt {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0 0 20px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    line-height: 1.6;
}

body.simple-mode .content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 25px;
}

body.simple-mode .card-meta {
    margin-top: 0;
    padding-top: 6px;
    border-top: 1px solid rgba(0, 0, 0, 0.03);
}

/* 简约模式下阅读指示器 */
/* body.simple-mode .read-indicator {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background-color: var(--primary-color);
    opacity: 0.7;
    border-radius: 2px;
} */

/* 响应式调整 */
@media (max-width: 768px) {
    body.simple-mode .content-grid {
        grid-template-columns: 1fr;
    }

    body.simple-mode .content-card {
        max-height: 230px;
    }

    body.simple-mode .card-excerpt {
        -webkit-line-clamp: 4;
        margin-bottom: 16px;
    }

    body.simple-mode .card-info {
        padding: 14px 16px;
    }
}

/* 简约模式下的卡片骨架屏 */
body.simple-mode .content-card-skeleton {
    display: flex;
    flex-direction: row;
    height: 140px;
}

body.simple-mode .skeleton-thumbnail {
    display: none;
}

body.simple-mode .skeleton-info {
    flex-grow: 1;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

body.simple-mode .card-category {
    position: static;
    display: inline-block;
    margin-bottom: 10px;
    font-size: 11px;
    padding: 3px 8px;
    background-color: rgba(93, 64, 55, 0.1);
    color: var(--primary-light);
}

/* Toast通知样式 */
.toast-message {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background-color: rgba(76, 175, 80, 0.9);
    color: white;
    padding: 12px 22px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    z-index: 2000;
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    pointer-events: none;
    font-size: 14px;
    font-weight: 500;
    backdrop-filter: blur(4px);
}

.toast-message.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast-message i {
    font-size: 16px;
}

.toast-message.error {
    background-color: rgba(244, 67, 54, 0.9);
}

.toast-message.warning {
    background-color: rgba(255, 152, 0, 0.9);
}

.toast-message.info {
    background-color: rgba(33, 150, 243, 0.9);
}

@media (max-width: 768px) {
    .toast-message {
        width: 90%;
        bottom: 20px;
        padding: 10px 16px;
        font-size: 13px;
    }
}

@media (max-width: 992px) {
    .category-items {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .category-settings-container {
        padding: 24px;
        width: 95%;
        max-height: 85vh;
        border-radius: 20px;
    }

    .category-items {
        grid-template-columns: repeat(2, 1fr);
    }

    .settings-header h3 {
        font-size: 18px;
    }

    .settings-description {
        font-size: 14px;
    }

    .category-divider {
        margin: 0 -24px;
    }

    .category-action-btn {
        width: 26px;
        height: 26px;
    }
}

/* 侧边栏相关样式 */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 280px;
    background-color: var(--surface-color);
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.08);
    z-index: 100;
    overflow-y: auto;
    overflow-x: hidden;
    transition: transform 0.3s ease, width 0.3s ease;
    border-right: 1px solid var(--border-color);
}

.sidebar-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 20px 0;
}

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

.sidebar .logo {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    transition: transform 0.3s ease;
}

/*.sidebar .logo i {*/
/*    margin-right: 12px;*/
/*    color: var(--accent-color);*/
/*    transition: transform 0.5s ease;*/
/*    font-size: 22px;*/
/*}*/

.sidebar-close {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    color: var(--text-secondary);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    margin-left: 10px;
}

.sidebar-close:hover {
    color: var(--primary-color);
    transform: translateX(-2px);
}

.sidebar-actions {
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    border-bottom: 1px solid var(--border-color);
}

.action-button {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-radius: 12px;
    background-color: var(--background-color);
    color: var(--text-primary);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 15px;
    width: 100%;
}

.action-button i {
    margin-right: 12px;
    font-size: 16px;
    color: var(--primary-color);
    transition: transform 0.3s ease;
}

.action-button span {
    flex: 1;
    text-align: left;
}

.action-button:hover {
    background-color: rgba(93, 64, 55, 0.08);
    transform: translateY(-2px);
}

.action-button:hover i {
    transform: scale(1.1);
}

.function-dropdown-icon {
    margin-left: 8px;
    margin-right: 0 !important;
    font-size: 12px !important;
    transition: transform 0.3s ease;
}

.multi-function-button {
    position: relative;
}

.function-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background-color: var(--surface-color);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 8px;
    z-index: 10;
    display: none;
    flex-direction: column;
    gap: 4px;
    border: 1px solid var(--border-color);
}

.multi-function-button.active .function-dropdown-icon {
    transform: rotate(180deg);
}

.multi-function-button.active .function-dropdown {
    display: flex;
    animation: fadeInDown 0.3s forwards;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.function-item {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.function-item i {
    margin-right: 12px;
    font-size: 15px;
    color: var(--primary-color);
}

.function-item:hover {
    background-color: var(--background-color);
}

/* 更新侧边栏分类区域样式 */
.sidebar-categories {
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
}

/* .sidebar-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 16px;
    padding-bottom: 0;
    border-bottom: none;
} */

/* 侧边栏分类列表 */
.sidebar-category-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-bottom: 0;
}

/* 主内容区域适配 */
.main-container {
    margin-left: 280px;
    transition: margin-left 0.3s ease;
    width: calc(100% - 280px);
    min-height: 100vh;
}

/* 侧边栏收起时的样式 */
body.sidebar-collapsed .sidebar {
    transform: translateX(-280px);
}

body.sidebar-collapsed .main-container {
    margin-left: 0;
    width: 100%;
}

/* 侧边栏切换按钮 - 更隐蔽设计 */
.sidebar-toggle {
    position: fixed;
    top: 20px; /* 从中间位置改为偏上位置 */
    left: 0;
    width: 10px; /* 减小宽度使其更隐蔽 */
    height: 50px; /* 减小高度 */
    border-radius: 0 4px 4px 0; /* 减小圆角 */
    background-color: var(--surface-color);
    color: var(--text-secondary); /* 减弱颜色对比度 */
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 99;
    box-shadow: 1px 0 5px rgba(0, 0, 0, 0.05); /* 减轻阴影 */
    transition: all 0.3s ease;
    opacity: 0.7; /* 降低不透明度 */
    visibility: hidden;
    transform: translate(-100%, 0);
    border-left: none;
    border-top: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.sidebar-toggle i {
    font-size: 10px; /* 减小图标尺寸 */
    transition: transform 0.3s ease;
}

.sidebar-toggle:hover {
    color: var(--primary-color);
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
    width: 15px; /* 稍微增加宽度，但仍保持低调 */
    opacity: 1;
}

.sidebar-toggle:hover i {
    transform: translateX(1px); /* 减小移动距离，保持低调 */
}

body.sidebar-collapsed .sidebar-toggle {
    opacity: 0.7;
    visibility: visible;
    transform: translate(0, 0);
}

/* 暗色主题适配 */
.dark-theme .sidebar-toggle {
    background-color: var(--surface-color);
    border-color: rgba(255, 255, 255, 0.1);
}

/* 响应式设计 */
@media (max-width: 992px) {
    .sidebar {
        width: 250px;
    }

    .main-container {
        margin-left: 250px;
        width: calc(100% - 250px);
    }

    /* 调整侧边栏内部间距 */
    .sidebar-header,
    .sidebar-actions,
    .sidebar-categories {
        padding-left: 20px;
        padding-right: 20px;
    }
}

@media (max-width: 768px) {
    /* 在移动设备上默认收起侧边栏 */
    .sidebar {
        width: 280px;
        transform: translateX(-280px);
    }

    .main-container {
        margin-left: 0;
        width: 100%;
    }

    body.sidebar-mobile-open .sidebar {
        transform: translateX(0);
    }

    .sidebar-toggle {
        opacity: 1;
        visibility: visible;
    }

    /* 添加遮罩层防止点击 */
    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 99;
        display: none;
    }

    body.sidebar-mobile-open .sidebar-overlay {
        display: block;
    }
}

/* 滚动条美化 */
.sidebar::-webkit-scrollbar {
    width: 5px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background-color: rgba(93, 64, 55, 0.2);
    border-radius: 10px;
}

/* 暗色模式适配 */
.dark-theme .sidebar {
    border-right-color: rgba(255, 255, 255, 0.1);
}

.dark-theme .sidebar-close {
    background-color: rgba(255, 255, 255, 0.05);
}

.dark-theme .action-button {
    background-color: rgba(255, 255, 255, 0.05);
}

.dark-theme .action-button:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.dark-theme .function-dropdown {
    background-color: var(--surface-color);
    border-color: rgba(255, 255, 255, 0.1);
}

.dark-theme .function-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.dark-theme .sidebar .filter-tag {
    background-color: rgba(255, 255, 255, 0.05);
}

.dark-theme .sidebar .filter-tag.active {
    background-color: rgba(141, 110, 99, 0.2);
}

.dark-theme .sidebar .filter-tag:hover {
    background-color: rgba(141, 110, 99, 0.1);
}

.dark-theme .sidebar-toggle {
    background-color: var(--surface-color);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
}

/* 移除旧的头部样式，保留其他原有样式 */
header {
    display: none;
}

.header-container {
    display: none;
}

/* 添加侧边栏遮罩层 */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 99;
    display: none;
    backdrop-filter: blur(2px);
}

/* 侧边栏中的分类标签样式 */
.sidebar .filter-tag {
    display: flex;
    flex-direction: row;
    align-items: center;
    /* 减小内边距 */
    padding: 14px 16px;
    margin: 0;
    border-radius: 12px;
    background: var(--background-color);
    color: var(--text-primary);
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    width: 100%;
    justify-content: flex-start;
    text-align: left;
}

.sidebar .filter-tag .tag-text {
    position: relative;
    z-index: 2;
}

.sidebar .filter-tag.active {
    background: rgba(92, 58, 30, 0.1);
    color: var(--primary-color);
    font-weight: 600;
    box-shadow: none;
    transform: none;
}

.sidebar .filter-tag:hover {
    background: rgba(224, 201, 176, 0.2);
    color: var(--primary-color);
    transform: translateX(5px);
}

/* 书籍卡片样式 */
.content-book-card {
    background-color: var(--surface-color);
    border-radius: var(--card-radius);
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: all 0.25s ease;
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
    padding: 20px;
}

.content-book-card:hover {
    box-shadow: var(--hover-shadow);
    transform: translateY(-3px);
}

.card-book-info {
    display: flex;
    gap: 20px;
}

.card-book-img {
    flex-shrink: 0;
    width: 120px;
    height: 160px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.card-book-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.content-book-card:hover .card-book-img {
    transform: scale(1.02) rotate(1deg);
}

.card-book-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card-book-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    line-height: 1.4;
}

.card-book-excerpt {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 15px;
}

.card-book-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--text-secondary);
    font-size: 13px;
}

.card-book-meta i {
    color: var(--primary-color);
    margin-right: 4px;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .card-book-info {
        gap: 15px;
    }

    .card-book-img {
        width: 100px;
        height: 140px;
    }

    .card-book-title {
        font-size: 16px;
        margin-bottom: 8px;
    }

    .card-book-excerpt {
        font-size: 13px;
        -webkit-line-clamp: 3;
    }
}
