/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* CSS变量定义 */
:root {
    /* 颜色主题 - 基于主站 hsla(200, 100%, 50%, 1.0) */
    --primary-color: hsla(200, 100%, 50%, 1.0);  /* 主站主色 */
    --primary-hover: hsla(200, 100%, 45%, 1.0);  /* 悬停时稍深 */
    --primary-light: hsla(200, 100%, 85%, 1.0);  /* 浅色变体 */
    --primary-dark: hsla(200, 100%, 35%, 1.0);   /* 深色变体 */
    --secondary-color: hsla(200, 30%, 50%, 1.0); /* 次要颜色 */
    --accent-color: hsla(30, 95%, 55%, 1.0);     /* 橙色强调色 */
    --accent-color-rgb: 245, 158, 11;
    
    /* 背景色 - 基于蓝色调的中性色 */
    --bg-primary: hsla(200, 20%, 98%, 1.0);      /* 主背景 */
    --bg-secondary: hsla(200, 25%, 96%, 1.0);    /* 次要背景 */
    --bg-tertiary: hsla(200, 30%, 94%, 1.0);     /* 第三级背景 */
    --bg-card: hsla(200, 40%, 99%, 1.0);         /* 卡片背景 */
    
    /* 文字颜色 - 基于蓝色调的灰色 */
    --text-primary: hsla(200, 25%, 15%, 1.0);    /* 主文字 */
    --text-secondary: hsla(200, 15%, 45%, 1.0);  /* 次要文字 */
    --text-muted: hsla(200, 10%, 60%, 1.0);      /* 弱化文字 */
    
    /* 边框颜色 - 基于蓝色调 */
    --border-color: hsla(200, 20%, 88%, 1.0);    /* 边框色 */
    --border-hover: hsla(200, 30%, 80%, 1.0);    /* 悬停边框 */
    
    /* 阴影 */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    
    /* 圆角 - 基于8px原则 */
    --radius-sm: 4px;   /* 4px */
    --radius-md: 8px;   /* 8px */
    --radius-lg: 12px;  /* 12px */
    --radius-xl: 16px;  /* 16px */
    
    /* 间距 - 基于8px原则 */
    --spacing-xs: 4px;   /* 4px */
    --spacing-sm: 8px;   /* 8px */
    --spacing-md: 16px;  /* 16px */
    --spacing-lg: 24px;  /* 24px */
    --spacing-xl: 32px;  /* 32px */
    --spacing-2xl: 48px; /* 48px */
    --spacing-3xl: 64px; /* 64px */
    
    /* 字体 */
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-mono: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
}

/* 暗色主题 - 基于蓝色调优化 */
[data-theme="dark"] {
    --bg-primary: hsla(200, 30%, 8%, 1.0);       /* 深蓝灰主背景 */
    --bg-secondary: hsla(200, 25%, 12%, 1.0);    /* 次要背景 */
    --bg-tertiary: hsla(200, 20%, 16%, 1.0);     /* 第三级背景 */
    --bg-card: hsla(200, 25%, 10%, 1.0);         /* 卡片背景 */
    
    --text-primary: hsla(200, 20%, 92%, 1.0);    /* 主文字 */
    --text-secondary: hsla(200, 15%, 75%, 1.0);  /* 次要文字 */
    --text-muted: hsla(200, 10%, 55%, 1.0);      /* 弱化文字 */
    
    --border-color: hsla(200, 15%, 20%, 1.0);    /* 边框色 */
    --border-hover: hsla(200, 20%, 30%, 1.0);    /* 悬停边框 */
    
    /* 暗色主题下的主色调整 */
    --primary-color: hsla(200, 100%, 60%, 1.0);  /* 稍亮的主色 */
    --primary-hover: hsla(200, 100%, 65%, 1.0);  /* 悬停时更亮 */
}

/* 基础样式 */
body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* 隐藏页面滚动条 */
body::-webkit-scrollbar {
    display: none;
}

body {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* 宽屏幕容器宽度调整 */
@media (min-width: 1600px) {
    .container {
        max-width: 1800px;
    }
}

@media (min-width: 2000px) {
    .container {
        max-width: 2000px;
    }
}

@media (min-width: 2200px) {
    .container {
        max-width: 2200px;
    }
}

/* 瀑布流容器 - 旧定义已移除 */

/* 旧的响应式列数调整已移至瀑布流布局部分 */

/* 站点卡片样式 */
.site-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm), 0 0 0 1px hsla(200, 100%, 50%, 0.05);
    padding: 0;
    transition: all 0.3s ease;
    width: 100%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    padding-bottom: var(--spacing-md);
}

.site-card:hover {
    box-shadow: var(--shadow-md), 0 0 20px hsla(200, 100%, 50%, 0.15);
    transform: translateY(-2px);
    border-color: var(--primary-light);
}

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

.site-title {
    font-size: 20px;  /* 20px - 接近8的倍数 */
    font-weight: 600;
    color: var(--primary-color);
    margin: 0;
}

.site-category {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    font-size: 12px;  /* 12px - 8的倍数 */
    font-weight: 500;
    border-radius: var(--radius-sm);
    padding: var(--spacing-xs) var(--spacing-sm);  /* 4px 8px */
    margin-left: var(--spacing-xs);
    box-shadow: 0 1px 3px hsla(200, 100%, 50%, 0.3);
}

.site-time {
    color: var(--text-secondary);
    font-size: 12px;  /* 12px - 8的倍数 */
    font-weight: 400;
}

.site-count {
    background: var(--accent-color);
    color: white;
    font-size: 12px;  /* 12px - 8的倍数 */
    font-weight: 500;
    border-radius: var(--radius-sm);
    padding: var(--spacing-xs) var(--spacing-sm);  /* 4px 8px */
}

.site-articles-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    flex: 1;
    overflow-y: auto;
}

/* 隐藏站点卡片滚动条 */
.site-articles-list::-webkit-scrollbar {
    width: 0;
    background: transparent;
}

.site-articles-list {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

/* 文章项样式 */
.article-item {
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--bg-secondary);
    position: relative; /* 为推荐标记提供定位基准 */
}



.article-title {
    font-size: 14px;  /* 14px - 接近8的倍数 */
    font-weight: 400;  /* 默认字重改为400 */
    color: var(--text-primary);
    line-height: 1.5;  /* 更好的行高比例 */
    position: relative;
    margin: 0;
    word-wrap: break-word;
    word-break: break-word;
    flex: 1; /* 标题占据剩余空间 */
}

/* 2小时内的新文章标题样式 */
.article-title.recent {
    font-weight: 600;
}

/* 移除原有的外部链接伪元素样式，现在使用独立图标 */

.article-source {
    font-size: 12px;  /* 12px - 8的倍数 */
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

/* 推荐文章样式 */
.article-title-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.left-icon, .right-icon {
    display: flex;
    align-items: center;
    min-width: 20px;
}

.right-icon {
    justify-content: center;
}

.recommended-badge {
    width: 8px;
    height: 8px;
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(238, 90, 36, 0.4);
    animation: pulse-glow 2s infinite;
    flex-shrink: 0; /* 防止图标被压缩 */
}

.external-link-icon {
    font-size: 12px;
    color: rgb(230, 126, 34);
    opacity: 0.7;
    cursor: pointer;
    flex-shrink: 0; /* 防止图标被压缩 */
}



/* 推荐标记的脉冲动画 */
@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 2px 4px rgba(238, 90, 36, 0.3), 0 0 0 0 rgba(255, 107, 107, 0.4);
    }
    50% {
        box-shadow: 0 2px 8px rgba(238, 90, 36, 0.4), 0 0 0 4px rgba(255, 107, 107, 0.1);
    }
}

.article-time {
    font-size: 11px;  /* 11px - 接近8的倍数 */
    color: var(--text-muted);
    margin-left: auto;
}

/* 按钮样式 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-sm) var(--spacing-md);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: var(--bg-card);
    color: var(--text-primary);
    font-size: 14px;  /* 14px - 接近8的倍数 */
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.btn:hover {
    background-color: var(--bg-tertiary);
    border-color: var(--border-hover);
    transform: translateY(-1px);
}

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

.btn-icon {
    padding: var(--spacing-sm);
    width: 40px;  /* 40px - 8的倍数 */
    height: 40px; /* 40px - 8的倍数 */
}

.btn-sm {
    padding: var(--spacing-xs) var(--spacing-sm);
    font-size: 12px;  /* 12px - 8的倍数 */
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

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

/* 主要内容 */
.main-content {
    padding: var(--spacing-sm) 0;
    min-height: 100vh;
}

/* 顶部信息提示 */
.info-banner {
    text-align: center;
    padding: var(--spacing-md) 0;
    margin-bottom: var(--spacing-md);
    font-size: 14px;  /* 14px - 接近8的倍数 */
    color: var(--text-muted);
}

.info-banner .separator {
    margin: 0 var(--spacing-sm);
    color: var(--text-muted);
}



@media (max-width: 480px) {
    .info-banner {
        font-size: 12px;  /* 12px - 8的倍数 */
        padding: var(--spacing-sm) var(--spacing-md);
    }
    
    .info-banner .separator {
        margin: 0 var(--spacing-xs);
    }
}

/* 分类卡片布局 */
.category-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm), 0 0 0 1px hsla(200, 100%, 50%, 0.03);
    overflow: hidden;
    transition: all 0.3s ease;
}

.category-card:hover {
    box-shadow: var(--shadow-md), 0 0 25px hsla(200, 100%, 50%, 0.12);
    border-color: var(--primary-light);
    transform: translateY(-1px);
}

.category-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: var(--spacing-md) var(--spacing-lg);
    margin: 0;
    position: relative;
    box-shadow: 0 2px 8px hsla(200, 100%, 50%, 0.2);
}

/* 推荐语卡片样式 */
.recommendation-reason {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--radius-lg);
    margin-bottom: var(--spacing-xl);
    font-size: 16px;
    line-height: 1.6;
    box-shadow: var(--shadow-md), 0 0 20px hsla(200, 100%, 50%, 0.15);
    position: relative;
    transition: all 0.3s ease;
}

.recommendation-reason:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), 0 0 30px hsla(200, 100%, 50%, 0.25);
}

.recommendation-header {
    display: flex;
    align-items: center;
    margin-bottom: var(--spacing-sm);
    font-weight: 600;
    font-size: 14px;
    opacity: 0.95;
    letter-spacing: 0.5px;
}

.recommendation-icon {
    font-size: 16px;
    margin-right: var(--spacing-sm);
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

.recommendation-content {
    font-weight: 500;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* 暗色主题下的推荐语样式优化 */
[data-theme="dark"] .recommendation-reason {
    background: linear-gradient(135deg, 
        hsla(200, 60%, 25%, 0.9), 
        hsla(200, 50%, 20%, 0.9)
    );
    box-shadow: var(--shadow-md), 0 0 20px hsla(200, 100%, 50%, 0.1);
}

[data-theme="dark"] .recommendation-reason:hover {
    box-shadow: var(--shadow-lg), 0 0 30px hsla(200, 100%, 50%, 0.2);
}

/* 响应式优化 */
@media (max-width: 768px) {
    .recommendation-reason {
        padding: var(--spacing-sm) var(--spacing-md);
        margin-bottom: var(--spacing-lg);
        font-size: 14px;
    }
    
    .recommendation-header {
        font-size: 12px;
    }
    
    .recommendation-icon {
        font-size: 14px;
    }
}

@media (min-width: 1200px) {
    .category-container {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
        gap: var(--spacing-xl);
    }
}

/* 加载指示器 */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-xl);
    text-align: center;
}

.loading-spinner {
    width: 3rem;
    height: 3rem;
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: var(--spacing-md);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}



/* Masonry 容器 */
.grid-container {
    position: relative;
    padding-bottom: var(--spacing-md);
    margin: 0 auto;
}

/* Masonry 项目 */
.grid-item {
    /* 宽度由JavaScript动态设置 */
    margin-bottom: 20px; /* 固定底部间距 */
    box-sizing: border-box;
}

/* 移动端特殊处理 */
@media (max-width: 600px) {
    .grid-container {
        padding: var(--spacing-sm);
    }
    
    .grid-item {
        width: calc(100% - 20px) !important; /* 移动端占满宽度，减去间距 */
        margin-left: auto;
        margin-right: auto;
    }
}

/* 订阅源分组 */
.feed-group {
    margin-bottom: var(--spacing-xl);
}

.feed-header {
    padding: var(--spacing-md) 0;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: var(--spacing-md);
}

.feed-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

/* 文章列表 */
.articles-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.article-item {
    padding: var(--spacing-sm);
    transition: all 0.2s ease;
    cursor: pointer;
    border-radius: var(--radius-sm);
    border-left: 3px solid transparent;
    background-color: transparent;
    display: block;
    width: 100%;
    box-sizing: border-box;
}



.article-source {
    display: inline-block;
    font-size: 0.65rem;
    color: var(--text-muted);
    font-weight: 400;
    opacity: 0.8;
    margin: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 文章项动画效果 */
.article-item {
    animation: fadeInUp 0.3s ease-out;
    animation-fill-mode: both;
}

.article-item:nth-child(1) { animation-delay: 0.05s; }
.article-item:nth-child(2) { animation-delay: 0.1s; }
.article-item:nth-child(3) { animation-delay: 0.15s; }
.article-item:nth-child(4) { animation-delay: 0.2s; }
.article-item:nth-child(5) { animation-delay: 0.25s; }

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

/* 响应式优化 */
/* 小屏幕移动端样式已移除，专注于web端使用 */

.open-mode-badge {
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
    font-size: 0.625rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.open-mode-reader {
    background-color: #fef3c7;
    color: #92400e;
}

.open-mode-window {
    background-color: #dbeafe;
    color: #1e40af;
}

[data-theme="dark"] .open-mode-reader {
    background-color: #451a03;
    color: #fbbf24;
}

[data-theme="dark"] .open-mode-window {
    background-color: #1e3a8a;
    color: #93c5fd;
}

/* 无文章状态 */
.no-articles {
    text-align: center;
    padding: var(--spacing-xl);
    color: var(--text-secondary);
}

.no-articles-icon {
    font-size: 4rem;
    margin-bottom: var(--spacing-md);
    opacity: 0.5;
}

.no-articles h3 {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-sm);
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.no-articles h3:hover {
    color: var(--primary-color);
}

/* 通用h3 hover效果 */
h3 {
    transition: color 0.3s ease;
}

h3:hover {
    color: var(--primary-color);
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: var(--spacing-xl);
    right: var(--spacing-xl);
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    border: none;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
}

/* 阅读器模态框 */
.reader-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(16px);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* 图片隐藏样式 */
.hide-images img {
    display: none !important;
}

.reader-modal.show {
    opacity: 1;
    visibility: visible;
}

.reader-container {
    max-width: 900px;
    width: 100%;
    height: 90vh;
    max-height: 90vh;
    background: var(--bg-primary);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    transition: height 0.3s ease;
}

/* 工具栏样式 - 参考底部导航栏设计 */
.reader-toolbar {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: var(--spacing-sm) var(--spacing-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--spacing-md);
    flex-shrink: 0;
}

.reader-left-controls,
.reader-right-controls {
    display: flex;
    gap: var(--spacing-sm);
    align-items: center;
}

.reader-left-controls {
    flex: 1;
}

.reader-right-controls {
    justify-content: flex-end;
}

/* 主题控制区域 */
.theme-control {
    display: flex;
    gap: 4px;
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    padding: 4px;
    border: 1px solid var(--border-color);
}

.theme-btn {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    color: #666666;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
}

.theme-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-1px);
}

.theme-btn.active {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 2px 8px rgba(0, 122, 255, 0.3);
}

/* 字体控制区域 */
.reader-font-controls {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    background: transparent;
    border-radius: var(--radius-md);
    padding: 4px 8px;
    border: none;
}

.font-control-btn {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    color: #666666;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.font-control-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

#font-size-display {
    font-size: 12px;
    color: var(--text-secondary);
    min-width: 20px;
    text-align: center;
    font-weight: 500;
    padding: 0 4px;
}

/* 功能按钮样式 - 参考底部导航栏 */
.reader-action-btn {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    color: #666666;
    padding: var(--spacing-sm);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
}

.reader-action-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

.reader-close {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    color: #ff4757;
    padding: var(--spacing-sm);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
}

.reader-close:hover {
    background: #ff4757;
    color: white;
    border-color: #ff4757;
    transform: translateY(-1px);
}

.font-size-btn:hover {
    background: var(--bg-secondary);
}

#font-size-display {
    min-width: 40px;
    text-align: center;
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
    background: var(--bg-secondary);
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

/* 阅读进度条 - 简洁版本 */
.progress-bar {
    width: 100%;
    height: 2px;
    background: var(--bg-secondary);
    position: relative;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-hover));
    transition: width 0.3s ease;
    width: 0%;
    position: relative;
}

/* 去掉进度文字显示 */
.progress-text {
    display: none;
}

.reader-content {
    padding: 0;
    margin: 0;
    max-width: 100%;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    scroll-behavior: smooth;
}

/* 隐藏阅读模式滚动条 */
.reader-content::-webkit-scrollbar {
    display: none;
}

.reader-content {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* 内容区域使用padding控制宽度 */
.reader-content > * {
    padding: 0 var(--spacing-3xl);
}

.reader-meta {
    padding-top: var(--spacing-2xl);
}

#article-content {
    padding-top: var(--spacing-lg);
    padding-bottom: var(--spacing-lg);
}

.reader-meta {
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-xl);
    border-bottom: 1px solid var(--border-color);
}

.reader-meta #article-title {
    font-size: 28px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-primary);
    margin: 0 0 var(--spacing-md) 0;
    width: 100%;
}

.reader-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--spacing-lg);
    color: var(--text-secondary);
    font-size: 16px;
    width: 100%;
    margin-top: var(--spacing-sm);
}

.article-source {
    flex: 1;
    text-align: left;
}

.article-time {
    flex-shrink: 0;
    text-align: right;
}

#article-content {
    color: var(--text-primary);
    line-height: 1.7;
    font-size: 18px;
}

/* 文章内容详细样式 */
#article-content p {
    margin: 0 0 var(--spacing-lg) 0;
}

#article-content h1,
#article-content h2,
#article-content h3,
#article-content h4,
#article-content h5,
#article-content h6 {
    margin: var(--spacing-xl) 0 var(--spacing-md) 0;
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-primary);
}

#article-content h1 {
    font-size: 1.8em;
}

#article-content h2 {
    font-size: 1.5em;
}

#article-content h3 {
    font-size: 1.3em;
    transition: color 0.3s ease;
}

#article-content h3:hover {
    color: var(--primary-color);
}

#article-content h4 {
    font-size: 1.1em;
}

#article-content h5,
#article-content h6 {
    font-size: 1em;
}

#article-content a {
    color: var(--accent-color, #007bff);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}

#article-content a:hover {
    border-bottom-color: var(--accent-color, #007bff);
}

#article-content ul,
#article-content ol {
    margin: 0 0 var(--spacing-md) 0;
    padding-left: var(--spacing-xl);
}

#article-content li {
    margin-bottom: var(--spacing-xs);
}

#article-content blockquote {
    margin: var(--spacing-lg) 0;
    padding: var(--spacing-md) var(--spacing-lg);
    border-left: 4px solid var(--accent-color, #007bff);
    background: var(--bg-secondary);
    font-style: italic;
    color: var(--text-secondary);
}

#article-content code {
    background: var(--bg-secondary);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9em;
    color: var(--text-primary);
}

#article-content pre {
    background: var(--bg-secondary);
    padding: var(--spacing-md);
    border-radius: 6px;
    overflow-x: auto;
    margin: var(--spacing-md) 0;
    border: 1px solid var(--border-color);
}

#article-content pre code {
    background: none;
    padding: 0;
    border-radius: 0;
    font-size: 0.9em;
}

#article-content img {
    max-width: 100%;
    height: auto;
    margin: var(--spacing-xl) auto;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: block;
}

#article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--spacing-xl) 0;
    border: 1px solid var(--border-color);
}

#article-content th,
#article-content td {
    padding: var(--spacing-sm) var(--spacing-md);
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

#article-content th {
    background: var(--bg-secondary);
    font-weight: 600;
}

#article-content hr {
    border: none;
    height: 1px;
    background: var(--border-color);
    margin: var(--spacing-xl) 0;
}

#article-content strong,
#article-content b {
    font-weight: 600;
    color: var(--text-primary);
}

#article-content em,
#article-content i {
    font-style: italic;
}

#article-content del {
    text-decoration: line-through;
    color: var(--text-secondary);
}

#article-content u {
    text-decoration: underline;
}

#article-content sup,
#article-content sub {
    font-size: 0.8em;
    line-height: 0;
    position: relative;
    vertical-align: baseline;
}

#article-content sup {
    top: -0.5em;
}

#article-content sub {
    bottom: -0.25em;
}

/* 首段不需要上边距 */
#article-content > *:first-child {
    margin-top: 0;
}

/* 最后一个元素不需要下边距 */
#article-content > *:last-child {
    margin-bottom: 0;
}

/* 阅读器主题 */
.reader-modal.theme-light {
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --text-primary: #333333;
    --text-secondary: #666666;
    --border-color: #e0e0e0;
}

.reader-modal.theme-dark {
    --bg-primary: #1e1e1e;
    --bg-secondary: #252525;
    --text-primary: #e8e8e8;
    --text-secondary: #b0b0b0;
    --border-color: #3a3a3a;
}

.reader-modal.theme-sepia {
    --bg-primary: #f4f1ea;
    --bg-secondary: #ede6d3;
    --text-primary: #5c4b37;
    --text-secondary: #8b7355;
    --border-color: #d4c5a9;
}

/* 字体大小 */
.reader-content[data-font-size="small"] #article-content,
.reader-content.font-small #article-content {
    font-size: 18px;
}

.reader-content[data-font-size="medium"] #article-content,
.reader-content.font-medium #article-content {
    font-size: 20px;
}

.reader-content[data-font-size="large"] #article-content,
.reader-content.font-large #article-content {
    font-size: 22px;
}

.reader-content[data-font-size="xlarge"] #article-content,
.reader-content.font-xlarge #article-content {
    font-size: 24px;
}

/* 底部导航栏 */
.reader-navigation {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: var(--spacing-sm) var(--spacing-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.nav-btn {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    min-width: 100px;
    justify-content: center;
}

.nav-btn:hover:not(:disabled) {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

.nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--bg-tertiary);
}



/* 分类汇总卡片样式 - 与普通站点卡片保持一致 */
.category-card {
    /* 移除特殊样式，使用默认的site-card样式 */
}

/* 响应式设计 */
/* 超大屏幕优化 */
@media (min-width: 2000px) {
    .site-card {
        padding: 0;
        padding-bottom: var(--spacing-md);
    }
    
    .site-title {
        font-size: 1.5rem;
    }
    
    .article-item {
        padding: var(--spacing-sm) var(--spacing-md);
    }
}

/* 大屏幕优化 */
@media (min-width: 1600px) and (max-width: 1999px) {
    .site-card {
        padding-bottom: var(--spacing-md);
    }
}

/* 中等屏幕 */
@media (max-width: 768px) {
    .container {
        padding: 0 var(--spacing-sm);
    }
    
    .header .container {
        padding: var(--spacing-sm);
    }
    
    .site-title {
        font-size: 20px;  /* 20px - 8的倍数 */
    }
    
    .status-bar .container {
        flex-direction: column;
        gap: var(--spacing-sm);
        align-items: flex-start;
    }
    
    .status-info {
        flex-direction: column;
        gap: var(--spacing-xs);
    }
    
    .feed-header {
        padding: var(--spacing-sm) var(--spacing-md);
        flex-direction: column;
        gap: var(--spacing-sm);
        align-items: flex-start;
    }
    
    .article-item {
        padding: var(--spacing-md);
    }
    
    .article-header {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
    
    .article-meta {
        flex-direction: column;
        gap: var(--spacing-xs);
    }
    
    .reader-info {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-xs);
    }
    
    .article-source,
    .article-time {
        text-align: left;
        width: 100%;
    }
    
    .article-actions {
        flex-wrap: wrap;
    }
    
    .reader-controls {
        flex-wrap: wrap;
        gap: var(--spacing-sm);
    }
    
    .reader-content {
        padding: var(--spacing-md);
    }
    
    #reader-title {
        font-size: 24px;  /* 24px - 8的倍数 */
    }
    
    .reader-meta {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
    
    .back-to-top {
        bottom: var(--spacing-md);
        right: var(--spacing-md);
        width: 40px;  /* 40px - 8的倍数 */
        height: 40px; /* 40px - 8的倍数 */
    }
    
    /* 阅读器响应式 */
    .reader-modal {
        padding: 0;
    }
    
    .reader-container {
        max-width: 100%;
        max-height: 100vh;
        border-radius: 0;
        height: 100vh;
    }
    
    .reader-toolbar {
        padding: var(--spacing-sm);
        flex-wrap: wrap;
        gap: var(--spacing-sm);
    }
    
    .toolbar-left,
    .toolbar-right {
        gap: var(--spacing-xs);
    }
    
    .toolbar-right {
        flex-wrap: wrap;
    }
    
    .reader-btn {
        padding: var(--spacing-xs);
        font-size: 12px;
    }
    
    .theme-btn {
        width: 24px;
        height: 24px;
    }
    
    .font-size-btn {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }
    
    .reader-navigation {
        padding: var(--spacing-sm);
    }
    
    .nav-btn {
        min-width: 80px;
        padding: var(--spacing-xs) var(--spacing-sm);
        font-size: 12px;
    }
    

}

/* 文本选择气泡样式 */
.text-selection-bubble {
    position: fixed;
    z-index: 10000;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 4px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.text-selection-bubble.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.bubble-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.bubble-button:hover {
    background: var(--bg-secondary);
    color: var(--primary-color);
    transform: scale(1.1);
}

.bubble-button:active {
    transform: scale(0.95);
}

.bubble-button svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* Toast提示动画 */
@keyframes fadeInOut {
    0% {
        opacity: 0;
        transform: translateY(-10px);
    }
    10%, 90% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateY(-10px);
    }
}

/* 暗色主题下的气泡样式调整 */
[data-theme="dark"] .text-selection-bubble {
    background: var(--bg-card);
    border-color: var(--border-color);
}

[data-theme="dark"] .bubble-button:hover {
    background: var(--bg-tertiary);
}



/* 阅读器主题下的气泡样式 */
.reader-modal.theme-light .text-selection-bubble {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(0, 0, 0, 0.1);
}

.reader-modal.theme-dark .text-selection-bubble {
    background: rgba(30, 30, 30, 0.95);
    border-color: rgba(255, 255, 255, 0.1);
    color: #e0e0e0;
}

.reader-modal.theme-sepia .text-selection-bubble {
    background: rgba(251, 248, 240, 0.95);
    border-color: rgba(139, 125, 107, 0.2);
    color: #5c4b37;
}



@media (max-width: 480px) {
    .articles-list {
        gap: 0;
    }
    

    
    .font-controls {
        display: none;
    }
    
    .toolbar-left {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-xs);
    }
    
    .theme-controls {
        margin-right: 0;
    }
    
    .reader-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .toolbar-right {
        justify-content: center;
        margin-top: var(--spacing-xs);
    }
    
    .nav-btn {
        min-width: 70px;
    }
    

}

/* 打印样式 */
@media print {
    .header,
    .status-bar,
    .back-to-top,
    .reader-header {
        display: none;
    }
    
    .main-content {
        padding: 0;
    }
    
    .article-item {
    }
    
    .reader-content {
        max-width: none;
        padding: 0;
    }
}

/* 高对比度模式 */
@media (prefers-contrast: high) {
    :root {
        --border-color: #000000;
        --text-secondary: #000000;
    }
    
    [data-theme="dark"] {
        --border-color: #ffffff;
        --text-secondary: #ffffff;
    }
}

/* 减少动画偏好 */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}