/**
 * AI学姐博客 - 主样式表
 * 包含网站基础样式和主要组件样式
 */

/* 添加全局CSS变量用于主题切换 - 更新颜色以减少刺眼感 */
:root {
    /* 主要颜色 */
    --primary-color: #4285f4;
    --primary-color-rgb: 66, 133, 244;
    --secondary-color: #ec407a;
    --secondary-color-rgb: 236, 64, 122;
    --hover-color: #1a73e8;
    
    /* 背景颜色 */
    --bg-color: #ffffff;
    --body-bg: #ffffff;
    --card-bg: #ffffff;
    --bg-gray: #f5f7fa;
    --bg-light: #fafbfc;
    --secondary-soft-bg: rgba(236, 64, 122, 0.05);
    
    /* 边框和阴影 */
    --border-color: #e1e8ed;
    --border-radius-sm: 4px;
    --border-radius-md: 8px;
    --border-radius-lg: 12px;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 15px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.1);
    
    /* 文本颜色 */
    --text-color: #333333;
    --text-dark: #1a1a1a;
    --text-medium: #555555;
    --text-light: #888888;
    --link-color: #4285f4;
    --link-hover: #1a73e8;
    
    /* 标签与分类 */
    --tag-bg: #f0f2f5;
    --tag-color: #666;
    --tag-hover-bg: var(--primary-color);
    --tag-hover-color: white;
    --category-bg: var(--secondary-color);
    --category-color: white;
    
    /* 文章相关 */
    --blockquote-bg: #f8f9fa;
    --note-bg: rgba(66, 133, 244, 0.05);
    --note-border: rgba(66, 133, 244, 0.2);
    --code-bg: #282c34;
    --code-text: #abb2bf;
    --code-keyword: #c678dd;
    --code-function: #61afef;
    --code-string: #98c379;
    --code-number: #d19a66;
    --code-comment: #5c6370;
    --code-class: #e5c07b;
    --updates-bg: #f5f7fa;
    --donate-bg: #f5f7fa;
    
    /* 布局 */
    --header-height: 70px;
    --container-width: 1200px;
    --footer-bg: #f5f7fa;
    
    /* 动画时间 */
    --transition-fast: 0.15s;
    --transition-normal: 0.3s;
    --transition-slow: 0.5s;
    
    /* 渐变 */
    --gradient-primary: linear-gradient(135deg, #4285f4, #34a853);
    --gradient-secondary: linear-gradient(135deg, #ec407a, #ff7043);
    
    /* 文本颜色 */
    --text-white: #FFFFFF;
    
    /* 背景颜色 */
    --bg-dark: #0f172a;
    
    /* 尺寸变量 */
    --footer-padding: 60px;
    --section-spacing: 50px;
    
    /* 字体 */
    --body-font: 'Noto Sans SC', sans-serif;
    --heading-font: 'Noto Sans SC', sans-serif;
    
    /* 阴影 */
    --shadow-sm: 0 2px 10px rgba(0,0,0,0.05);
    --shadow-md: 0 5px 15px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
    
    /* 过渡时间 */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* 深色模式变量优化 - 更新颜色提高对比度 */
body.dark-mode {
    /* 主要颜色 - 暗模式下稍微亮一些 */
    --primary-color: #5c9eff;
    --primary-color-rgb: 92, 158, 255;
    --secondary-color: #f06292;
    --secondary-color-rgb: 240, 98, 146;
    --hover-color: #80b1ff;
    
    /* 背景颜色 */
    --bg-color: #121212;
    --body-bg: #121212;
    --card-bg: #1e1e1e;
    --bg-gray: #262626;
    --bg-light: #2d2d2d;
    --secondary-soft-bg: rgba(240, 98, 146, 0.08);
    
    /* 边框和阴影 */
    --border-color: #333333;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 15px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.4);
    
    /* 文本颜色 */
    --text-color: #e1e1e1;
    --text-dark: #ffffff;
    --text-medium: #b0b0b0;
    --text-light: #888888;
    --link-color: #5c9eff;
    --link-hover: #80b1ff;
    
    /* 标签与分类 */
    --tag-bg: #333333;
    --tag-color: #b0b0b0;
    --tag-hover-bg: var(--primary-color);
    --tag-hover-color: #ffffff;
    --category-bg: var(--secondary-color);
    --category-color: #ffffff;
    
    /* 文章相关 */
    --blockquote-bg: #1e1e1e;
    --note-bg: rgba(92, 158, 255, 0.1);
    --note-border: rgba(92, 158, 255, 0.2);
    --note-bg-dark: rgba(92, 158, 255, 0.1);
    --note-border-dark: rgba(92, 158, 255, 0.2);
    --code-bg: #282c34;
    --code-bg-dark: #16181c;
    --code-text: #abb2bf;
    --code-text-dark: #e1e1e1;
    --code-keyword: #c678dd;
    --code-function: #61afef;
    --code-string: #98c379;
    --code-number: #d19a66;
    --code-comment: #7f848e;
    --code-class: #e5c07b;
    --updates-bg: #262626;
    --donate-bg: #262626;
    
    /* 布局 */
    --footer-bg: #1a1a1a;
    
    /* 暗模式特有 */
    --card-bg-dark: #1e1e1e;
    --border-color-dark: #333333;
    --text-medium-dark: #b0b0b0;
}

/* 隐藏全局滚动条 */
body {
    font-family: 'Noto Sans SC', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) var(--bg-color);
}

/* Chrome, Safari和Opera的滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background-color: var(--text-light);
    border-radius: 4px;
    border: 2px solid var(--bg-color);
}

::-webkit-scrollbar-thumb:hover {
    background-color: var(--primary-color);
}

/* 应用CSS变量到全局元素 */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans SC', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--link-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--link-hover);
}

ul, ol {
    list-style-type: none;
}

input, button, textarea, select {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: var(--text-color);
}

p {
    margin-bottom: 1rem;
    color: var(--text-color);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 优化按钮样式，减少刺眼感 */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    background-color: var(--primary-color);
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-align: center;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn:hover {
    background-color: var(--link-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* 更新渐变按钮样式 */
.btn-gradient {
    background-image: var(--gradient-primary);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-gradient:hover {
    opacity: 0.95;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* 主题切换图标样式 */
.theme-toggle {
    cursor: pointer;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    background-color: rgba(0, 0, 0, 0.1);
    transform: rotate(30deg);
}

body.dark-mode .theme-toggle {
    color: #f1c40f;
}

body:not(.dark-mode) .theme-toggle {
    color: #f39c12;
}

.theme-toggle i {
    font-size: 18px;
}

/* 其他样式保持不变但使用CSS变量 */

/* 标题样式 */
.section-title {
    font-size: 28px;
    margin-bottom: 30px;
    position: relative;
    text-align: left;
}

.section-title::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    margin-top: 10px;
}

.tech-gradient {
    background: linear-gradient(45deg, var(--primary-color), #00A5FF);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.warm-gradient {
    background: linear-gradient(45deg, #FF8E8E, var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* 页头样式 */
.site-header {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: var(--header-bg);
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease;
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
}

.logo {
    display: flex;
    align-items: center;
}

/* CSS生成的Logo样式 */
.logo-img {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    width: 40px;
    height: 40px;
    border-radius: 8px;
    position: relative;
    margin-right: 10px;
    transform: rotate(10deg);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.logo-img::before {
    content: 'AI';
    color: white;
    font-weight: 700;
    font-size: 18px;
    transform: rotate(-10deg);
}

.logo-img::after {
    content: '';
    position: absolute;
    top: -3px;
    right: -3px;
    width: 10px;
    height: 10px;
    background-color: var(--accent-color);
    border-radius: 50%;
    border: 2px solid white;
}

.logo:hover .logo-img {
    transform: rotate(15deg);
    box-shadow: 0 6px 10px rgba(0,0,0,0.15);
}

.logo-text {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
}

.nav-menu {
    display: flex;
    align-items: center;
}

.nav-item {
    margin: 0 15px;
}

/* 提高暗色模式下导航链接的可见性 */
body.dark-mode .nav-link {
    color: var(--text-color);
}

body.dark-mode .nav-link:hover, 
body.dark-mode .nav-link.active {
    color: var(--primary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--primary-color);
    transition: width var(--transition-normal);
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

.header-actions {
    display: flex;
    align-items: center;
}

.search-icon, .theme-toggle {
    font-size: 18px;
    margin-left: 15px;
    cursor: pointer;
    color: var(--text-dark);
    transition: color var(--transition-normal);
}

/* 提高所有图标在暗色模式下的可见性 */
body.dark-mode .search-icon, 
body.dark-mode .theme-toggle {
    color: var(--text-color);
}

body.dark-mode .search-icon:hover, 
body.dark-mode .theme-toggle:hover {
    color: var(--primary-color);
}

/* 搜索框 */
.header-search {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--bg-light);
    padding: 20px;
    box-shadow: var(--shadow-md);
    transform: translateY(-100%);
    transition: transform var(--transition-normal);
    z-index: 900;
}

.header-search.show {
    transform: translateY(0);
}

.search-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius-md);
    font-size: 16px;
}

.search-btn {
    position: absolute;
    right: 35px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-medium);
    cursor: pointer;
}

.close-search {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-medium);
}

.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 800;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-normal), visibility var(--transition-normal);
}

.search-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* 移动菜单 */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.mobile-menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-dark);
    margin: 2px 0;
    transition: all var(--transition-normal);
}

/* 调整移动菜单按钮在暗色模式下的颜色 */
body.dark-mode .mobile-menu-toggle span {
    background-color: var(--text-color);
}

.mobile-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100%;
    background-color: var(--card-bg);
    z-index: 1500;
    padding: 20px;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    box-shadow: var(--card-shadow);
}

.mobile-nav.show {
    transform: translateX(0);
}

.mobile-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.close-mobile-menu {
    font-size: 24px;
    cursor: pointer;
    color: var(--text-color);
}

.mobile-nav-menu {
    margin-bottom: 20px;
}

.mobile-nav-menu li {
    margin-bottom: 15px;
}

.mobile-nav-menu a {
    color: var(--text-color);
    font-size: 16px;
    display: block;
    padding: 5px 0;
    transition: color 0.3s ease;
}

.mobile-nav-menu a:hover {
    color: var(--link-hover);
}

.mobile-nav-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.mobile-search {
    margin-bottom: 20px;
}

.mobile-search form {
    display: flex;
}

.mobile-search input {
    flex: 1;
    padding: 10px;
    border: 1px solid var(--input-border);
    border-radius: 4px 0 0 4px;
    background-color: var(--input-bg);
    color: var(--text-color);
}

.mobile-search button {
    background-color: var(--primary-color);
    border: none;
    color: #fff;
    padding: 0 15px;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}

.mobile-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.social-links {
    display: flex;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin-right: 10px;
    border-radius: 50%;
    background-color: var(--input-bg);
    color: var(--text-color);
    transition: all 0.3s ease;
}

.social-links a:hover {
    background-color: var(--primary-color);
    color: #fff;
    transform: translateY(-2px);
}

.mobile-theme-toggle {
    width: 36px;
    height: 36px;
    background-color: var(--input-bg);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 首页英雄区 */
.hero-section {
    padding: 60px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.hero-content {
    flex: 1;
    padding-right: 40px;
}

.hero-content h1 {
    font-size: 42px;
    margin-bottom: 20px;
}

.hero-content .highlight {
    color: var(--primary-color);
}

.hero-content p {
    font-size: 18px;
    color: var(--text-medium);
    margin-bottom: 30px;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.hero-image img {
    max-width: 100%;
    height: auto;
}

.search-box {
    position: relative;
    max-width: 500px;
}

.search-box input {
    width: 100%;
    padding: 15px 20px;
    border: none;
    border-radius: var(--border-radius-lg);
    background-color: var(--bg-gray);
    box-shadow: var(--shadow-sm);
    font-size: 16px;
}

.search-box button {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    font-size: 18px;
}

/* AI心情卡片 */
.ai-mood-section {
    margin-bottom: var(--section-spacing);
}

.ai-mood-card {
    background: linear-gradient(135deg, #F3F3FB, #FFEEF6);
    border-radius: var(--border-radius-lg);
    padding: 25px;
    display: flex;
    align-items: flex-start;
    box-shadow: var(--shadow-md);
}

.ai-avatar {
    margin-right: 20px;
}

.ai-avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: var(--shadow-sm);
}

.ai-message h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.ai-message p {
    color: var(--text-medium);
    margin-bottom: 15px;
}

.ai-recommendation {
    background-color: rgba(255, 255, 255, 0.7);
    padding: 15px;
    border-radius: var(--border-radius-md);
    border-left: 3px solid var(--secondary-color);
}

.ai-recommendation h4 {
    color: var(--secondary-color);
    margin-bottom: 5px;
    font-size: 16px;
}

/* 内容网格 */
.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    margin-bottom: var(--section-spacing);
}

/* 特色文章轮播 */
.featured-carousel {
    margin-bottom: 40px;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.featured-item {
    position: relative;
    display: flex;
    flex-direction: column;
}

.featured-image {
    width: 100%;
    height: 350px;
    overflow: hidden;
}

.featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.featured-item:hover .featured-image img {
    transform: scale(1.05);
}

.featured-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 30px;
    background: linear-gradient(0deg, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 100%);
    color: var(--text-white);
}

.featured-info .category {
    display: inline-block;
    padding: 5px 10px;
    background-color: var(--primary-color);
    border-radius: var(--border-radius-sm);
    margin-bottom: 10px;
    font-size: 14px;
}

.featured-info h2 {
    margin-bottom: 10px;
}

.featured-info h2 a {
    color: var(--text-white);
}

.featured-info p {
    margin-bottom: 15px;
    opacity: 0.9;
}

.article-meta {
    display: flex;
    align-items: center;
    font-size: 14px;
    opacity: 0.8;
}

.article-meta span {
    margin-right: 15px;
}

/* 文章卡片 */
.article-section {
    margin-bottom: 40px;
}

.article-list, .article-grid {
    display: grid;
    gap: 30px;
}

.article-list {
    grid-template-columns: 1fr;
}

.article-grid {
    grid-template-columns: repeat(2, 1fr);
}

.article-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.article-image {
    position: relative;
    overflow: hidden;
}

.article-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.article-card:hover .article-image img {
    transform: scale(1.05);
}

.category-tag {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: var(--primary-color);
    color: var(--text-white);
    padding: 5px 10px;
    border-radius: var(--border-radius-sm);
    font-size: 12px;
}

.article-content {
    padding: 20px;
}

.article-content h3 {
    margin-bottom: 10px;
    font-size: 20px;
}

.article-content p {
    color: var(--text-medium);
    margin-bottom: 15px;
}

.article-meta {
    color: var(--text-light);
    font-size: 14px;
}

.article-meta i {
    margin-right: 5px;
}

.view-more {
    margin-top: 30px;
    text-align: center;
}

/* 侧边栏样式 */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.sidebar-widget {
    background-color: var(--card-bg);
    border-radius: var(--border-radius-lg);
    padding: 25px;
    box-shadow: var(--card-shadow);
}

.sidebar-widget h3 {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
    color: var(--text-dark);
    font-size: 20px;
}

/* 关于小部件 */
.about-widget .about-content {
    text-align: center;
    margin-bottom: 15px;
}

.about-content img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin-bottom: 15px;
    object-fit: cover;
}

.about-content p {
    color: var(--text-medium);
}

/* 打赏小部件 */
.donate-widget {
    text-align: center;
}

.flower-options {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 20px 0;
}

.flower {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    transition: all var(--transition-normal);
}

.flower img {
    width: 40px;
    height: 40px;
    margin-bottom: 5px;
}

.flower small {
    font-size: 12px;
    color: var(--text-light);
}

.flower.selected, .flower:hover {
    background-color: var(--accent-color);
}

.flower.selected.paid {
    background-color: rgba(255, 182, 193, 0.2);
}

/* 分类导航 */
.category-list li {
    margin-bottom: 12px;
}

.category-list a {
    display: flex;
    justify-content: space-between;
    color: var(--text-dark);
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    transition: all var(--transition-normal);
}

.category-list a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.category-count {
    color: var(--text-light);
}

/* 订阅部件 */
.subscribe-form {
    margin-bottom: 15px;
}

.subscribe-form input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius-md);
    margin-bottom: 10px;
}

/* 标签云 */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag-item {
    display: inline-block;
    padding: 5px 12px;
    background-color: var(--accent-color);
    border-radius: var(--border-radius-md);
    color: var(--text-dark);
    font-size: 14px;
    transition: all var(--transition-normal);
}

.tag-item:hover {
    background-color: var(--primary-color);
    color: var(--text-white);
}

/* 模态窗口 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background-color: var(--card-bg);
    border-radius: var(--border-radius-lg);
    width: 90%;
    max-width: 500px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    animation: scaleIn 0.3s ease;
}

.modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--text-dark);
}

.close-modal {
    font-size: 24px;
    color: var(--text-light);
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-modal:hover {
    color: var(--text-dark);
}

.modal-body {
    padding: 20px;
}

/* 分享二维码 */
.qrcode-container {
    display: flex;
    justify-content: center;
    margin-bottom: 15px;
}

#shareQRCode {
    width: 200px;
    height: 200px;
    background-color: white;
    padding: 10px;
    border-radius: var(--border-radius-md);
}

#shareQRCode img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.share-qrcode-modal .modal-body p {
    text-align: center;
    color: var(--text-medium);
    margin-bottom: 0;
}

/* 赞赏支持 */
.donate-text {
    text-align: center;
    margin-bottom: 20px;
    color: var(--text-medium);
}

.donate-options {
    display: flex;
    justify-content: space-around;
    gap: 20px;
}

.donate-option {
    text-align: center;
}

.donate-option img {
    width: 180px;
    height: 180px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 5px;
    background-color: white;
    display: block;
    margin-bottom: 10px;
}

.donate-option span {
    color: var(--text-medium);
    font-size: 14px;
}

/* 提示消息 */
.toast-message {
    position: fixed;
    bottom: -60px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 12px 25px;
    border-radius: 25px;
    font-size: 14px;
    z-index: 1100;
    transition: bottom 0.3s ease;
}

.toast-message.show {
    bottom: 30px;
}

/* 点赞心形动画 */
.floating-heart {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #E91E63;
    animation: floatingHeart 1s ease-out forwards;
    pointer-events: none;
}

.floating-heart i {
    font-size: 24px;
}

@keyframes floatingHeart {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    20% {
        transform: translate(-50%, -50%) scale(1.5);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -200%) scale(1);
    }
}

/* 弹窗动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* 文章点赞按钮 */
.like-button {
    position: relative;
}

/* 代码语法高亮样式补充 */
.language-python {
    position: relative;
}

.language-python::before {
    content: 'Python';
    position: absolute;
    top: 0;
    right: 0;
    background-color: rgba(40, 44, 52, 0.6);
    color: #abb2bf;
    padding: 2px 8px;
    font-size: 12px;
    border-bottom-left-radius: 4px;
}

/* 暗色模式适配 */
body.dark-mode .modal-content {
    background-color: var(--card-bg);
}

body.dark-mode .donate-option img,
body.dark-mode #shareQRCode {
    border-color: var(--border-color);
}

body.dark-mode .toast-message {
    background-color: rgba(255, 255, 255, 0.8);
    color: #333;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .donate-options {
        flex-direction: column;
        align-items: center;
    }
    
    .modal-content {
        width: 95%;
    }
}

/* 页脚样式 */
.site-footer {
    background-color: var(--bg-dark);
    color: var(--text-white);
    padding: var(--footer-padding) 0 30px;
}

.footer-top {
    margin-bottom: 40px;
    padding-bottom: 20px;
}

.footer-columns {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 40px 20px;
}

.footer-column {
    flex: 1 1 220px;
    max-width: 300px;
}

.footer-column:first-child {
    flex-basis: 300px;
}

.footer-column h3 {
    color: var(--text-white);
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: 600;
    position: relative;
    padding-bottom: 10px;
}

.footer-column h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.footer-column p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    margin-bottom: 20px;
}

/* 社交图标样式 */
.social-icons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-white);
    border-radius: 50%;
    transition: all 0.3s ease;
    position: relative;
    font-size: 16px;
}

.social-icons a:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
}

.wechat-icon .qrcode {
    position: absolute;
    bottom: 45px;
    left: 50%;
    transform: translateX(-50%) scale(0);
    background-color: white;
    padding: 5px;
    border-radius: 4px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 10;
}

.wechat-icon:hover .qrcode {
    opacity: 1;
    transform: translateX(-50%) scale(1);
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.3s ease;
    display: block;
    padding: 2px 0;
}

.footer-links a:hover {
    color: var(--primary-color);
    transform: translateX(5px);
}

.subscribe-form {
    margin-top: 15px;
    margin-bottom: 15px;
    position: relative;
}

.subscribe-form input {
    width: 100%;
    padding: 12px 15px;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius-md);
    color: var(--text-white);
    font-size: 14px;
}

.subscribe-form input:focus {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: var(--primary-color);
    outline: none;
}

.subscribe-form input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.btn-subscribe {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    margin-top: 10px;
    transition: all 0.3s ease;
    width: 100%;
    font-weight: 500;
}

.btn-subscribe:hover {
    background-color: var(--link-hover);
    transform: translateY(-2px);
}

.small {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    padding-bottom: 10px;
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.copyright {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    font-weight: 500;
}

.credits {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
}

.credits .highlight {
    color: var(--secondary-color);
    font-weight: 500;
}

.donate-button button {
    background-color: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 8px 20px;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
}

.donate-button button:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* 响应式设计优化 */
@media (max-width: 1200px) {
    .container {
        max-width: 100%;
        padding: 0 20px;
    }
    
    .hero-section {
        padding: 40px 0;
    }
    
    .hero-content h1 {
        font-size: 36px;
    }
}

@media (max-width: 992px) {
    .content-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .sidebar {
        order: 2;
    }
    
    .hero-section {
        flex-direction: column;
    }
    
    .hero-content {
        padding-right: 0;
        margin-bottom: 30px;
        text-align: center;
    }
    
    .hero-image {
        justify-content: center;
    }
    
    .search-box {
        max-width: 100%;
    }
    
    .footer-columns {
        justify-content: space-around;
    }
    
    .footer-column {
        flex-basis: calc(50% - 30px);
        max-width: 350px;
    }
    
    .footer-column:first-child {
        flex-basis: calc(50% - 30px);
    }
}

@media (max-width: 768px) {
    .site-header {
        padding: 10px 0;
    }
    
    .header-top {
        height: 60px;
    }
    
    .logo-text {
        font-size: 20px;
    }
    
    .nav-menu {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .header-actions {
        margin-left: auto;
    }
    
    .article-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-bottom-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 15px;
    }
    
    .footer-bottom {
        padding-top: 15px;
    }
}

@media (max-width: 576px) {
    .hero-content h1 {
        font-size: 30px;
    }
    
    .hero-content p {
        font-size: 16px;
    }
    
    .section-title {
        font-size: 24px;
    }
    
    .footer-column, 
    .footer-column:first-child {
        flex-basis: 100%;
        max-width: 100%;
        text-align: center;
    }
    
    .footer-column h3::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .social-icons {
        justify-content: center;
    }
    
    .footer-links {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    
    .footer-links li {
        margin-bottom: 0;
    }
    
    .footer-links a {
        padding: 5px 10px;
        background-color: rgba(255, 255, 255, 0.05);
        border-radius: var(--border-radius-sm);
    }
    
    .copyright, .credits {
        text-align: center;
        width: 100%;
    }
    
    .subscribe-form {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    
    .donate-options {
        flex-direction: column;
    }
    
    .donate-item {
        width: 100%;
    }
}

/* 暗色模式下的移动优化 */
@media (max-width: 768px) {
    body.dark-mode .mobile-menu-toggle span {
        background-color: #fff;
    }
    
    body.dark-mode .mobile-nav {
        background-color: var(--card-bg);
    }
    
    body.dark-mode .footer-links a {
        color: rgba(255, 255, 255, 0.7);
    }
}

@media (max-width: 576px) {
    body.dark-mode .footer-links a {
        background-color: rgba(255, 255, 255, 0.1);
    }
}

/* 回到顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background-color: var(--primary-color);
    color: var(--text-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-md);
    z-index: 900;
    overflow: hidden;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--secondary-color);
}

.back-to-top i {
    font-size: 18px;
    color: white;
}

/* 回到顶部按钮美化 */
.back-to-top::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--secondary-color);
    border-radius: 50%;
    transform: scale(0);
    opacity: 0;
    transition: all 0.5s;
    z-index: -1;
}

.back-to-top:hover::before {
    transform: scale(1);
    opacity: 1;
}

/* AI学姐形象增强样式 */
.ai-avatar {
    position: relative;
}

.ai-avatar img {
    transition: transform var(--transition-normal);
    box-shadow: 0 5px 15px rgba(0,123,255,0.2);
    border: 4px solid white;
}

.ai-avatar:hover img {
    transform: scale(1.05) rotate(3deg);
}

.ai-avatar::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    width: calc(100% + 20px);
    height: calc(100% + 20px);
    border-radius: 50%;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    opacity: 0.2;
    z-index: -1;
    animation: pulse 3s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.2; }
    50% { transform: scale(1.05); opacity: 0.3; }
    100% { transform: scale(1); opacity: 0.2; }
}

/* 增强文章卡片样式 */
.article-card {
    position: relative;
    border: 1px solid #f0f0f0;
    transition: all var(--transition-normal);
}

.article-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.article-card:hover::before {
    opacity: 1;
}

/* 花朵样式增强 */
.flower {
    position: relative;
    border: 1px solid transparent;
    transition: all var(--transition-normal);
}

.flower.selected {
    border-color: var(--primary-color);
    background-color: rgba(0,123,255,0.05);
    transform: translateY(-3px);
}

.flower:not(.selected):hover {
    transform: translateY(-2px);
}

/* 改进标签云样式 */
.tag-cloud {
    position: relative;
}

.tag-item {
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.tag-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-color);
    opacity: 0;
    transform: translateY(100%);
    transition: all var(--transition-normal);
    z-index: -1;
}

.tag-item:hover {
    color: white;
}

.tag-item:hover::before {
    transform: translateY(0);
    opacity: 1;
}

/* 分隔线美化 */
.section-title {
    position: relative;
}

.section-title::after {
    background: linear-gradient(90deg, var(--primary-color), transparent);
    height: 3px;
    border-radius: 3px;
    transition: width var(--transition-normal);
}

.section-title:hover::after {
    width: 70px;
}

/* 按钮样式增强 */
.btn, .btn-small, .btn-gradient {
    position: relative;
    overflow: hidden;
}

.btn::after, .btn-small::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255,255,255,0.3);
    opacity: 0;
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(1);
    transition: all 0.5s;
}

.btn:hover::after, .btn-small:hover::after {
    opacity: 1;
    width: 300%;
    height: 300%;
}

.btn-gradient {
    background-size: 200% 100%;
    background-position: right bottom;
    transition: all .5s ease-out;
    background-image: linear-gradient(to right, var(--primary-color) 50%, var(--secondary-color) 50%);
}

.btn-gradient:hover {
    background-position: left bottom;
}

/* 订阅框样式增强 */
.subscribe-form input {
    border: 2px solid transparent;
    background-color: var(--bg-gray);
    transition: all var(--transition-normal);
}

.subscribe-form input:focus {
    border-color: var(--primary-color);
    background-color: white;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
}

/* 社交图标增强 */
.social-links a {
    position: relative;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all var(--transition-normal);
}

.social-links a:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 5px 10px rgba(0,0,0,0.1);
}

/* 搜索框样式增强 */
.search-box input {
    transition: all var(--transition-normal);
}

.search-box input:focus {
    outline: none;
}

.search-box button {
    transition: all var(--transition-normal);
}

.search-box:hover button {
    transform: translateY(-50%) scale(1.1);
}

/* 卡片内容过渡 */
.article-content h3 {
    transition: all var(--transition-normal);
}

.article-card:hover .article-content h3 {
    color: var(--primary-color);
}

/* 侧边栏标题样式增强 */
.sidebar-widget h3 {
    position: relative;
    display: inline-block;
    margin-bottom: 25px;
}

.sidebar-widget h3::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color), transparent);
}

/* 页头导航链接特效 */
.nav-link::before {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: var(--primary-color);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform var(--transition-normal);
    z-index: -1;
}

.nav-link:hover::before {
    transform: scaleX(1);
    transform-origin: left;
}

/* AI学姐的SVG图标样式 */
.ai-sister-icon {
    display: inline-block;
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    position: relative;
    margin-right: 10px;
    vertical-align: middle;
}

.ai-sister-icon::before {
    content: 'AI';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.section-title .ai-sister-icon {
    margin-left: 10px;
    transform: scale(0.8);
}

/* 文章图片占位符样式 */
.featured-image-placeholder,
.article-image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #f3f3f3, #e1e1e1);
    position: relative;
    overflow: hidden;
}

.featured-image-placeholder::after,
.article-image-placeholder::after {
    content: '文章';
    font-size: 18px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.7;
    color: #555;
    font-weight: 500;
}

.article-image-placeholder.popular::after {
    content: '热门';
    background-color: rgba(255, 87, 51, 0.1);
    padding: 5px 10px;
    border-radius: 4px;
    color: #ff5733;
}

/* 根据数据ID生成不同色彩 */
.featured-image-placeholder[data-id="21"] {
    background: linear-gradient(45deg, #e3f2fd, #bbdefb);
}
.featured-image-placeholder[data-id="22"] {
    background: linear-gradient(45deg, #e8f5e9, #c8e6c9);
}
.featured-image-placeholder[data-id="23"] {
    background: linear-gradient(45deg, #fff8e1, #ffecb3);
}

.article-image-placeholder[data-id="1"],
.article-image-placeholder[data-id="11"] {
    background: linear-gradient(45deg, #e1f5fe, #b3e5fc);
}
.article-image-placeholder[data-id="2"],
.article-image-placeholder[data-id="12"] {
    background: linear-gradient(45deg, #e0f2f1, #b2dfdb);
}
.article-image-placeholder[data-id="3"],
.article-image-placeholder[data-id="13"] {
    background: linear-gradient(45deg, #f3e5f5, #e1bee7);
}
.article-image-placeholder[data-id="4"],
.article-image-placeholder[data-id="14"] {
    background: linear-gradient(45deg, #fffde7, #fff9c4);
}
.article-image-placeholder[data-id="5"], 
.article-image-placeholder[data-id="15"] {
    background: linear-gradient(45deg, #fbe9e7, #ffccbc);
}

/* 花朵样式 */
.flower-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.flower-daisy {
    background-color: #FFF9C4;
}
.flower-daisy::after {
    content: '雏菊';
    font-size: 12px;
    color: #826200;
}

.flower-rose {
    background-color: #FFCDD2;
}
.flower-rose::after {
    content: '玫瑰';
    font-size: 12px;
    color: #C62828;
}

.flower-lily {
    background-color: #E1BEE7;
}
.flower-lily::after {
    content: '百合';
    font-size: 12px;
    color: #6A1B9A;
}

/* 二维码占位符 */
.qr-code-placeholder {
    width: 150px;
    height: 150px;
    margin: 0 auto;
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 8px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qr-code-placeholder::before {
    content: '';
    width: 80%;
    height: 80%;
    background: 
        linear-gradient(90deg, transparent 0%, transparent 30%, #333 30%, #333 35%, transparent 35%, transparent 65%, #333 65%, #333 70%, transparent 70%, transparent 100%),
        linear-gradient(0deg, transparent 0%, transparent 30%, #333 30%, #333 35%, transparent 35%, transparent 65%, #333 65%, #333 70%, transparent 70%, transparent 100%);
}

.qr-code-placeholder::after {
    content: '';
    width: 25px;
    height: 25px;
    position: absolute;
    border: 5px solid #333;
    border-radius: 5px;
}

.qr-code-placeholder.alipay::after {
    background-color: #1677FF;
}

.qr-code-placeholder.wechat::after {
    background-color: #07C160;
}

/* 感谢动画心形 */
.thanks-animation-heart {
    width: 150px;
    height: 150px;
    margin: 0 auto;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.thanks-animation-heart::before {
    content: '感谢';
    font-size: 24px;
    color: #E91E63;
    font-weight: bold;
    animation: heartbeat 1.5s infinite;
}

@keyframes heartbeat {
    0% { transform: scale(1); }
    25% { transform: scale(1.1); }
    50% { transform: scale(1); }
    75% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* 导航链接样式 - 恢复之前被覆盖的样式 */
.nav-link {
    position: relative;
    color: var(--text-dark);
    font-weight: 500;
    padding: 5px 0;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary-color);
}

/* 搜索图标和主题切换图标样式 */
.search-icon:hover, .theme-toggle:hover {
    color: var(--primary-color);
}

/* 提高暗色模式下表单元素的可见性 */
body.dark-mode input, 
body.dark-mode textarea, 
body.dark-mode select {
    background-color: var(--input-bg);
    color: var(--text-color);
    border-color: var(--input-border);
}

body.dark-mode input::placeholder, 
body.dark-mode textarea::placeholder {
    color: var(--text-muted);
}

/* 卡片在暗色模式下的边框 */
body.dark-mode .article-card {
    border-color: var(--border-color);
}

/* 提高暗色模式下分类导航的可读性 */
body.dark-mode .category-list a {
    border-bottom-color: var(--border-color);
    color: var(--text-color);
}

body.dark-mode .category-count {
    color: var(--text-muted);
}

/* 标签在暗色模式下的优化 */
body.dark-mode .tag-item {
    background-color: var(--input-bg);
    color: var(--text-color);
}

body.dark-mode .tag-item:hover {
    background-color: var(--primary-color);
    color: #fff;
}

/* 侧边栏在暗色模式下的优化 */
body.dark-mode .sidebar-widget h3 {
    color: var(--text-color);
}

/* 暗色模式下的页脚优化 */
body.dark-mode .site-footer {
    background-color: #0a0c14;
}

body.dark-mode .footer-column h3 {
    color: #ffffff;
}

body.dark-mode .footer-column p,
body.dark-mode .footer-links a,
body.dark-mode .copyright,
body.dark-mode .credits {
    color: rgba(255, 255, 255, 0.9);
}

body.dark-mode .footer-links a:hover {
    color: var(--primary-color);
    background-color: rgba(255, 255, 255, 0.05);
}

body.dark-mode .social-icons a {
    background-color: rgba(255, 255, 255, 0.15);
}

body.dark-mode .social-icons a:hover {
    background-color: var(--primary-color);
}

body.dark-mode .btn-subscribe {
    background-color: var(--primary-color);
}

body.dark-mode .subscribe-form input {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

body.dark-mode .subscribe-form input:focus {
    border-color: var(--primary-color);
    background-color: rgba(255, 255, 255, 0.15);
}

body.dark-mode .donate-button button {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

body.dark-mode .donate-button button:hover {
    background-color: var(--primary-color);
    color: white;
}

body.dark-mode .wechat-icon .qrcode {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
}

/* 确保主要区域在黑暗模式下背景颜色正确 */
body.dark-mode .main-content,
body.dark-mode .sidebar,
body.dark-mode .hero-section,
body.dark-mode .container,
body.dark-mode .ai-mood-section,
body.dark-mode .content-grid,
body.dark-mode .article-section,
body.dark-mode .footer-top,
body.dark-mode .footer-bottom {
    background-color: var(--bg-color);
}

/* 确保页面元素在黑暗模式下有正确的颜色和背景 */
body.dark-mode .article-card {
    background-color: var(--card-bg);
    color: var(--text-color);
}

body.dark-mode .hero-content h1,
body.dark-mode .hero-content p,
body.dark-mode .ai-message h3,
body.dark-mode .ai-message p,
body.dark-mode .section-title,
body.dark-mode .article-content h3 {
    color: var(--text-color);
}

body.dark-mode .search-box input {
    background-color: var(--card-bg);
    border-color: var(--border-color);
    color: var(--text-color);
}

/* 分类页面样式 */
.category-header {
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(to right, #f5f7fa, #e4efe9);
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.category-title {
    font-size: 2rem;
    color: #333;
    margin-bottom: 10px;
    font-weight: 700;
}

.category-description {
    font-size: 1rem;
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
}

.category-meta {
    font-size: 0.9rem;
    color: #888;
}

.category-list li.active {
    font-weight: 700;
    background-color: #f5f5f5;
    border-left: 3px solid #ff7eb3;
}

.category-list li.active a {
    color: #ff4081;
}

.no-articles {
    padding: 40px 20px;
    text-align: center;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px dashed #ddd;
    color: #888;
}

.pagination-container {
    margin-top: 30px;
    text-align: center;
}

/* 搜索页面样式 */
.search-header {
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(to right, #f5f7fa, #e4efe9);
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.search-title {
    font-size: 2rem;
    color: #333;
    margin-bottom: 10px;
    font-weight: 700;
}

.search-keyword {
    color: var(--primary-color);
}

.search-meta {
    font-size: 0.9rem;
    color: #777;
    margin-bottom: 15px;
}

.search-form-container {
    margin-top: 20px;
}

.search-form {
    display: flex;
    max-width: 600px;
}

.search-form input {
    flex: 1;
    padding: 12px 15px;
    font-size: 1rem;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    outline: none;
}

.search-form input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(var(--primary-color-rgb), 0.2);
}

.btn-search {
    padding: 12px 25px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
}

.btn-search:hover {
    background: var(--hover-color);
}

.search-tips {
    background: #f9f9f9;
    border: 1px solid #e9e9e9;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.search-tips h3 {
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 15px;
}

.search-tips ul {
    padding-left: 20px;
}

.search-tips li {
    margin-bottom: 10px;
    line-height: 1.5;
    color: #555;
}

.no-results {
    background: #f9f9f9;
    border: 1px solid #e9e9e9;
    border-radius: 8px;
    padding: 30px 20px;
    text-align: center;
}

.no-results p {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 20px;
}

.search-suggestions {
    max-width: 400px;
    margin: 0 auto;
    text-align: left;
}

.search-suggestions h3 {
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 15px;
}

.search-suggestions ul {
    padding-left: 20px;
}

.search-suggestions li {
    margin-bottom: 8px;
    color: #666;
}

.search-results .article-card {
    margin-bottom: 25px;
    border-bottom: 1px solid #eee;
    padding-bottom: 25px;
}

.search-results .article-card:last-child {
    border-bottom: none;
}

.popular-searches {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.popular-search-item {
    display: inline-block;
    padding: 8px 15px;
    background: #f5f7fa;
    border-radius: 20px;
    color: #555;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.popular-search-item:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* 暗色模式适配 */
body.dark-mode .search-header {
    background: linear-gradient(to right, #2d3748, #1a202c);
}

body.dark-mode .search-title {
    color: #e2e8f0;
}

body.dark-mode .search-meta {
    color: #a0aec0;
}

body.dark-mode .search-form input {
    background-color: #2d3748;
    border-color: #4a5568;
    color: #e2e8f0;
}

body.dark-mode .search-form input:focus {
    border-color: var(--primary-color);
}

body.dark-mode .search-tips,
body.dark-mode .no-results {
    background: #2d3748;
    border-color: #4a5568;
}

body.dark-mode .search-tips h3,
body.dark-mode .search-suggestions h3 {
    color: #e2e8f0;
}

body.dark-mode .search-tips li,
body.dark-mode .search-suggestions li,
body.dark-mode .no-results p {
    color: #a0aec0;
}

body.dark-mode .popular-search-item {
    background: #2d3748;
    color: #a0aec0;
}

body.dark-mode .popular-search-item:hover {
    background: var(--primary-color);
    color: white;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .search-form {
        flex-direction: column;
    }
    
    .search-form input {
        border-radius: 4px;
        margin-bottom: 10px;
    }
    
    .btn-search {
        border-radius: 4px;
        width: 100%;
    }
    
    .search-title {
        font-size: 1.5rem;
    }
    
    .popular-searches {
        gap: 8px;
    }
    
    .popular-search-item {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
} 