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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    min-height: 100vh;
    color: #333;
    text-align: center;
    line-height: 1.5;
    background-color: #F7F8F9;
}

.container {
    max-width: 1600px;
    margin: 0 auto;
}

/* 横向网格布局 */
.sites-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px 16px;
    padding: 32px 0;
}

.site-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
    break-inside: avoid;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: max(500px, calc((100vh - 32px - 32px - 32px) / 2));
    min-height: 500px;
}



.site-title {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 12px;
    padding-bottom: 6px;
    border-bottom: 2px solid #e8f4fd;
    position: relative;
}

.site-title::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 64px;
    height: 2px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
}

.site-update-time {
    margin-top: auto;
    padding: 12px 0 0 0;
    border-top: 1px solid #f5f5f5;
    font-size: 11px;
    color: #bbb;
    text-align: center;
    min-height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.hot-list {
    list-style: none;
    flex: 1;
    overflow-y: auto;
    padding-right: 4px;
    /* 隐藏滚动条 - 兼容所有浏览器 */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE 10+ */
}

/* 隐藏WebKit浏览器滚动条 */
.hot-list::-webkit-scrollbar {
    display: none;
    width: 0;
    background: transparent;
}

.hot-list::-webkit-scrollbar-track {
    background: transparent;
}

.hot-list::-webkit-scrollbar-thumb {
    background: transparent;
}

.hot-list::-webkit-scrollbar-thumb:hover {
    background: transparent;
}

.hot-item {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hot-item:hover {
    background: hsla(200, 100%, 98%, 1);
    transform: translateY(-2px);
    transition: all 0.3s ease;
}

.hot-item:hover .hot-rank {
    opacity: 0.8;
}

.hot-item:hover .hot-rank.top3 {
    opacity: 0.9;
}

.hot-item:hover .hot-meta {
    opacity: 0.9;
}

.site-section:hover .site-update-time {
    opacity: 0.8;
}

.hot-item:hover .hot-title {
    color: hsla(200, 100%, 50%, 1);
}

.hot-item:hover .hot-title.external-link {
    color: #d35400;
}

.hot-item:hover .hot-title.external-link::after {
    opacity: 1;
}

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

.hot-rank {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    margin-right: 8px;
    font-size: 9px;
    flex-shrink: 0;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.hot-rank.top3 {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    opacity: 0.7;
}

.hot-rank.normal {
    background: #f8f9fa;
    color: #6c757d;
    opacity: 0.5;
}

.hot-content {
    flex: 1;
    min-width: 0;
}

.hot-title {
    font-size: 14px;
    line-height: 1.3;
    color: #1a202c;
    text-decoration: none;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    text-align: left;
    position: relative;
    transition: color 0.3s ease;
}



/* 为所有标题预留右边距，避免hover时宽度变化 */
.hot-title {
    padding-right: 20px;
}

.hot-title:not(.external-link)::after {
    content: "";
    position: absolute;
    right: 0;
    top: 0;
    width: 20px;
}

/* 新窗口打开的标题样式 */
.hot-title.external-link::after {
    content: "↗";
    position: absolute;
    right: 0;
    top: 0;
    font-size: 12px;
    color: #e67e22;
    opacity: 0.7;
    width: 20px;
    text-align: center;
}





.hot-meta {
    display: none;
}

.hot-score {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 3px 6px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 400;
    opacity: 0.8;
}

.loading {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    padding: 24px 32px;
    color: #95a5a6;
    z-index: 9999;
    font-size: 16px;
    font-weight: 500;
    min-width: 200px;
}

.loading::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #e8f4fd;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 8px;
}

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

/* 主题变量 */
:root {
    /* 浅色主题 */
    --light-bg: #ffffff;
    --light-text: #333333;
    --light-border: #e0e0e0;
    --light-header-bg: rgba(255, 255, 255, 0.95);
    --light-btn-hover: #f0f0f0;
    --light-link: #1a73e8;
    --light-blockquote-bg: #f9f9f9;
    --light-code-bg: #f5f5f5;
    
    /* 深色主题 */
    --dark-bg: #1a1a1a;
    --dark-text: #e0e0e0;
    --dark-border: #444444;
    --dark-header-bg: rgba(32, 32, 32, 0.95);
    --dark-btn-hover: #333333;
    --dark-link: #88b2ff;
    --dark-blockquote-bg: #2a2a2a;
    --dark-code-bg: #2d2d2d;
    
    /* 护眼主题 */
    --sepia-bg: #f8f3e8;
    --sepia-text: #5b4636;
    --sepia-border: #d8d0c8;
    --sepia-header-bg: rgba(248, 243, 232, 0.95);
    --sepia-btn-hover: #efe8d8;
    --sepia-link: #9b6c3a;
    --sepia-blockquote-bg: #f1ece1;
    --sepia-code-bg: #efe8d8;
}

/* 阅读模式弹窗样式 */
.reader-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: hsla(220, 0%, 0%, 0.8);
    backdrop-filter: blur(16px);
    z-index: 1000;
    padding: 20px;
    overflow: hidden;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s ease;
    /* 确保蒙版区域不产生滚动条 */
    overscroll-behavior: contain;
}

.reader-content {
    position: relative;
    width: 100%;
    max-width: 900px;
    height: 90vh;
    background-color: var(--reader-bg, #ffffff);
    border-radius: 16px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: background-color 0.3s ease;
    padding: 0;
    /* 阻止内容区域外的滚动传播 */
    touch-action: pan-y;
}

/* 主题样式 */
.theme-light .reader-content {
    --reader-bg: var(--light-bg);
    --reader-text-color: var(--light-text);
    --reader-border-color: var(--light-border);
    --reader-header-bg: var(--light-header-bg);
    --reader-btn-hover: var(--light-btn-hover);
    --reader-link-color: var(--light-link);
    --reader-blockquote-bg: var(--light-blockquote-bg);
    --reader-code-bg: var(--light-code-bg);
    background-color: var(--reader-bg);
    color: var(--reader-text-color);
}

.theme-dark .reader-content {
    --reader-bg: var(--dark-bg);
    --reader-text-color: var(--dark-text);
    --reader-border-color: var(--dark-border);
    --reader-header-bg: var(--dark-header-bg);
    --reader-btn-hover: var(--dark-btn-hover);
    --reader-link-color: var(--dark-link);
    --reader-blockquote-bg: var(--dark-blockquote-bg);
    --reader-code-bg: var(--dark-code-bg);
    background-color: var(--reader-bg);
    color: var(--reader-text-color);
}

.theme-sepia .reader-content {
    --reader-bg: var(--sepia-bg);
    --reader-text-color: var(--sepia-text);
    --reader-border-color: var(--sepia-border);
    --reader-header-bg: var(--sepia-header-bg);
    --reader-btn-hover: var(--sepia-btn-hover);
    --reader-link-color: var(--sepia-link);
    --reader-blockquote-bg: var(--sepia-blockquote-bg);
    --reader-code-bg: var(--sepia-code-bg);
    background-color: var(--reader-bg);
    color: var(--reader-text-color);
}

/* 主题变量 */
.reader-modal.theme-light {
    --reader-bg-color: #ffffff;
    --reader-text-color: #333333;
    --reader-border-color: #e5e5e5;
    --reader-header-bg: #ffffff;
    --reader-button-hover: #f5f5f5;
    --reader-link-color: #667eea;
    --reader-code-bg: #f8f9fa;
    --reader-blockquote-bg: #f8f9fa;
    --reader-blockquote-border: #667eea;
}

.reader-modal.theme-dark {
    --reader-bg-color: #1a1a1a;
    --reader-text-color: #e0e0e0;
    --reader-border-color: #333333;
    --reader-header-bg: #2d2d2d;
    --reader-button-hover: #404040;
    --reader-link-color: #8fa7ff;
    --reader-code-bg: #2d2d2d;
    --reader-blockquote-bg: #2d2d2d;
    --reader-blockquote-border: #8fa7ff;
}

.reader-modal.theme-sepia {
    --reader-bg-color: #f7f3e9;
    --reader-text-color: #5c4b37;
    --reader-border-color: #d4c5a9;
    --reader-header-bg: #f7f3e9;
    --reader-button-hover: #ede4d3;
    --reader-link-color: #8b4513;
    --reader-code-bg: #ede4d3;
    --reader-blockquote-bg: #ede4d3;
    --reader-blockquote-border: #8b4513;
}

.reader-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--reader-border-color, #eee);
    background: var(--reader-header-bg, #fff);
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    width: 100%;
    box-sizing: border-box;
    flex-shrink: 0;
    backdrop-filter: blur(10px);
    min-height: 56px;
    transform: translateY(0);
    transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
}



.reader-left-controls {
    display: flex;
    align-items: center;
    gap: 16px;
}

.reader-right-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.reader-font-controls {
    display: flex;
    align-items: center;
    gap: 1px;
    padding: 2px;
    background: var(--reader-button-hover, #f5f5f5);
    border-radius: 10px;
    border: 1px solid var(--reader-border-color, #e5e5e5);
}

.font-control-btn {
    background: none;
    border: none;
    color: var(--reader-text-color, #666);
    cursor: pointer;
    padding: 8px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-size: 13px;
    position: relative;
}

.font-control-btn:hover {
    background: var(--reader-button-hover, #f5f5f5);
    color: var(--reader-text-color, #333);
    transform: translateY(-1px);
}

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

#font-size-display {
    font-size: 12px;
    color: var(--reader-text-color, #666);
    min-width: 28px;
    text-align: center;
    font-weight: 500;
    padding: 0 4px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid var(--reader-border-color, #e5e5e5);
    line-height: 1.2;
    display: none;
}

/* 主题切换按钮 */
.theme-control {
    display: flex;
    align-items: center;
    gap: 1px;
    padding: 4px;
    background: var(--reader-button-hover, #f5f5f5);
    border-radius: 10px;
    border: 1px solid var(--reader-border-color, #e5e5e5);
}

.theme-btn {
    background: none;
    border: none;
    color: var(--reader-text-color, #666);
    cursor: pointer;
    padding: 6px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    transition: all 0.2s ease;
    font-size: 11px;
    position: relative;
}

.theme-btn:hover {
    background: var(--reader-button-hover, #f5f5f5);
    transform: translateY(-1px);
}

.theme-btn.active {
    background: var(--reader-link-color, #667eea);
    color: white;
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.3);
}

/* 阅读进度条 */
.reading-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    background: var(--reader-link-color, #667eea);
    transition: width 0.3s ease;
    z-index: 102;
    border-radius: 0 2px 0 0;
}





.reader-action-btn {
    background: none;
    border: none;
    color: var(--reader-text-color, #666);
    cursor: pointer;
    padding: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s ease;
    position: relative;
    border: 1px solid transparent;
}

.reader-action-btn:hover {
    background: var(--reader-button-hover, #f5f5f5);
    color: var(--reader-text-color, #333);
    border-color: var(--reader-border-color, #e5e5e5);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.reader-action-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.reader-close {
    background: none;
    border: 1px solid transparent;
    font-size: 18px;
    color: var(--reader-text-color, #999);
    cursor: pointer;
    padding: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s ease;
    margin-left: 8px;
    font-weight: 300;
}

.reader-close:hover {
    background: var(--reader-button-hover, #f5f5f5);
    color: var(--reader-text-color, #333);
    border-color: var(--reader-border-color, #e5e5e5);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.reader-close:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.article-container {
    padding: 32px 24px;
    max-width: 800px;
    width: 100%;
    flex-shrink: 0;
    box-sizing: border-box;
    margin: 0 auto;
}

.article-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--reader-text-color, #2c3e50);
    line-height: 1.3;
    margin: 0 0 32px 0;
    padding-bottom: 20px;
    border-bottom: 3px solid var(--reader-link-color, #3498db);
    text-align: left;
    letter-spacing: -0.02em;
}

.reader-body {
    padding: 58px 0 70px 0;
    flex: 1;
    overflow-y: auto;
    background: var(--reader-bg-color, #fff);
    font-size: 18px;
    line-height: 1.8;
    color: var(--reader-text-color, #333);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    width: 100%;
    box-sizing: border-box;
    scroll-behavior: smooth;
    /* 确保只有这个区域可以滚动 */
    touch-action: pan-y;
    overscroll-behavior: contain;
}

.reader-body:focus {
    outline: none;
}

/* 自定义滚动条 */
.reader-body::-webkit-scrollbar {
    width: 8px;
}

.reader-body::-webkit-scrollbar-track {
    background: var(--reader-button-hover, #f1f1f1);
}

.reader-body::-webkit-scrollbar-thumb {
    background: var(--reader-border-color, #c1c1c1);
    border-radius: 4px;
}

.reader-body::-webkit-scrollbar-thumb:hover {
    background: var(--reader-text-color, #a8a8a8);
}

.reader-body h1 {
    font-size: 28px;
    margin: 32px 0 20px 0;
    color: var(--reader-text-color, #2c3e50);
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.reader-body h2 {
    font-size: 24px;
    margin: 28px 0 18px 0;
    color: var(--reader-text-color, #2c3e50);
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.reader-body h3 {
    font-size: 20px;
    margin: 24px 0 16px 0;
    color: var(--reader-text-color, #2c3e50);
    font-weight: 600;
    line-height: 1.3;
}

.reader-body p {
    margin-bottom: 20px;
    text-align: justify;
    line-height: 1.8;
    word-spacing: 0.05em;
}

.reader-body img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 24px auto;
    display: block;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* .reader-body img:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
} */

/* 隐藏小于300px的图片 */
.reader-body img[width]:not([width=""]) {
    display: none;
}

.reader-body img[width]:not([width=""])[width^="3"],
.reader-body img[width]:not([width=""])[width^="4"],
.reader-body img[width]:not([width=""])[width^="5"],
.reader-body img[width]:not([width=""])[width^="6"],
.reader-body img[width]:not([width=""])[width^="7"],
.reader-body img[width]:not([width=""])[width^="8"],
.reader-body img[width]:not([width=""])[width^="9"] {
    display: block;
}

.reader-body img[style*="width"] {
    display: block;
}

.error-message {
    text-align: left;
    color: #333;
    padding: 32px;
    font-size: 14px;
    line-height: 1.6;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin: 24px;
}

.error-message h3 {
    color: #e74c3c;
    margin: 0 0 16px 0;
    font-size: 18px;
    font-weight: 600;
}

.error-message h4 {
    color: #2c3e50;
    margin: 0 0 10px 0;
    font-size: 14px;
    font-weight: 600;
}

.error-message ul {
    color: #555;
    font-size: 13px;
    margin: 16px 0;
    padding-left: 24px;
}

.error-message li {
    margin-bottom: 5px;
}

.article-meta {
    border-bottom: 1px solid var(--reader-border-color, #eee);
    padding-bottom: 16px;
    margin-bottom: 32px;
    color: var(--reader-text-color, #666);
    font-size: 14px;
}

.article-content {
    line-height: 1.8;
    font-size: 18px;
    color: var(--reader-text-color, #333);
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 24px auto;
    display: block;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* .article-content img:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
} */

.article-content p {
    margin-bottom: 20px;
    text-align: justify;
    line-height: 1.8;
    word-spacing: 0.05em;
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6 {
    margin: 32px 0 20px 0;
    font-weight: 600;
    line-height: 1.3;
    color: var(--reader-text-color, #2c3e50);
    letter-spacing: -0.01em;
}

.article-content h1 { font-size: 28px; }
.article-content h2 { font-size: 24px; }
.article-content h3 { font-size: 20px; }
.article-content h4 { font-size: 18px; }
.article-content h5 { font-size: 16px; }
.article-content h6 { font-size: 14px; }

.article-content blockquote {
    border-left: 4px solid var(--reader-blockquote-border, #667eea);
    padding: 20px 20px 20px 24px;
    margin: 28px 0;
    font-style: italic;
    color: var(--reader-text-color, #666);
    background: var(--reader-blockquote-bg, #f8f9fa);
    border-radius: 0 12px 12px 0;
    position: relative;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    text-align: left;
}

.article-content blockquote::before {
    content: '"';
    font-size: 48px;
    color: var(--reader-blockquote-border, #667eea);
    position: absolute;
    top: -10px;
    left: 16px;
    opacity: 0.3;
}

.article-content code {
    background: var(--reader-code-bg, #f1f3f4);
    color: var(--reader-text-color, #333);
    padding: 3px 8px;
    border-radius: 6px;
    font-family: 'SF Mono', 'Monaco', 'Consolas', 'Liberation Mono', 'Courier New', monospace;
    font-size: 0.9em;
    border: 1px solid var(--reader-border-color, #e1e4e8);
}

.article-content pre {
    background: var(--reader-code-bg, #f8f9fa);
    color: var(--reader-text-color, #333);
    padding: 20px;
    border-radius: 12px;
    overflow-x: auto;
    margin: 28px 0;
    border: 1px solid var(--reader-border-color, #e9ecef);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.article-content pre code {
    background: none;
    border: none;
    padding: 0;
    font-size: 14px;
}

.article-content a {
    color: var(--reader-link-color, #667eea);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.2s ease;
    font-weight: 500;
}

.article-content a:hover {
    border-bottom-color: var(--reader-link-color, #667eea);
    background: var(--reader-button-hover, rgba(102, 126, 234, 0.1));
    padding: 2px 4px;
    border-radius: 4px;
    margin: -2px -4px;
}

/* 阅读模式中的列表样式 - 左对齐 */
.reader-body ul,
.reader-body ol {
    text-align: left;
    margin: 20px 0;
    padding-left: 24px;
}

.reader-body li {
    text-align: left;
    margin-bottom: 8px;
    line-height: 1.6;
}

.article-content ul,
.article-content ol {
    text-align: left;
    margin: 20px 0;
    padding-left: 24px;
}

.article-content li {
    text-align: left;
    margin-bottom: 8px;
    line-height: 1.6;
}

/* 阅读模式导航样式 */
.reader-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-top: 1px solid var(--reader-border-color, #eee);
    background: var(--reader-bg-color, #fff);
    gap: 1px;
    transform: translateY(0);
    transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    width: 100%;
    box-sizing: border-box;
}



.nav-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border: 1px solid var(--reader-border-color, #e5e5e5);
    border-radius: 6px;
    background: var(--reader-bg-color, #fff);
    color: var(--reader-text-color, #333);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 13px;
    min-width: 0;
    flex: 1;
    max-width: 45%;
}

.nav-btn:hover {
    background: var(--reader-button-hover, #f5f5f5);
    border-color: var(--reader-link-color, #667eea);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.nav-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.nav-btn:disabled {
    cursor: not-allowed;
    background: var(--reader-button-hover, #f5f5f5);
    color: var(--reader-text-color, #999);
}

.nav-btn:disabled:hover {
    transform: none;
    box-shadow: none;
    border-color: var(--reader-border-color, #e5e5e5);
}

.nav-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
    flex: 1;
}

.next-btn .nav-text {
    align-items: flex-end;
}

.nav-label {
    font-size: 11px;
    color: var(--reader-text-color, #666);
    font-weight: 500;
    margin-bottom: 1px;
}

.nav-title {
    font-size: 13px;
    color: var(--reader-text-color, #333);
    font-weight: 400;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.nav-btn svg {
    flex-shrink: 0;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.nav-btn:hover svg {
    opacity: 1;
}

/* 响应式设计 - 导航区域 */
@media (max-width: 768px) {
    .reader-navigation {
        padding: 12px 16px;
        gap: 10px;
    }
    
    .nav-btn {
        padding: 8px 10px;
        gap: 6px;
        font-size: 12px;
    }
    
    .nav-label {
        font-size: 10px;
    }
    
    .nav-title {
        font-size: 12px;
    }
    
    .nav-btn svg {
        width: 12px;
        height: 12px;
    }
}

@media (max-width: 480px) {
    .reader-navigation {
        flex-direction: column;
        gap: 6px;
        padding: 10px 12px;
    }
    
    .nav-btn {
        max-width: 100%;
        justify-content: center;
        padding: 6px 8px;
    }
    
    .prev-btn .nav-text,
    .next-btn .nav-text {
        align-items: center;
        text-align: center;
    }
}

.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    font-size: 14px;
}

.article-content th,
.article-content td {
    padding: 8px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.article-content th {
    background: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .sites-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .sites-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    body {
        padding: 8px;
    }
    
    .sites-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 8px 0;
    }
    
    .site-section {
        padding: 16px;
        margin-bottom: 16px;
    }
    
    .site-title {
        font-size: 18px;
    }
    
    .hot-title {
        font-size: 14px;
    }
    
    .hot-rank {
        width: 32px;
        height: 32px;
        font-size: 12px;
        margin-right: 12px;
    }
    
    .reader-modal {
        padding: 0;
    }
    
    .reader-content {
        margin: 0;
        border-radius: 0;
        height: 100vh;
        max-height: 100vh;
    }
    
    .reader-header {
        padding: 12px 16px;
        flex-wrap: wrap;
        gap: 12px;
        min-height: 56px;
    }
    
    .reader-controls {
        flex: 1;
        min-width: 200px;
        gap: 12px;
    }
    
    .reader-font-controls {
        gap: 1px;
        padding: 4px;
    }
    
    .font-control-btn {
        width: 32px;
        height: 32px;
        padding: 8px;
    }
    
    .theme-control {
        padding: 4px;
        gap: 1px;
    }
    
    .theme-btn {
        width: 28px;
        height: 28px;
        padding: 6px;
    }
    
    .reader-right-controls {
        gap: 4px;
    }
    
    .reader-action-btn {
        width: 36px;
        height: 36px;
        padding: 8px;
    }
    
    .reader-close {
        width: 36px;
        height: 36px;
        margin-left: 8px;
        font-size: 18px;
    }
    
    #font-size-display {
        min-width: 24px;
        font-size: 11px;
        padding: 0 2px;
    }
    
    .reader-body {
        padding: 16px;
        font-size: 17px;
    }
    
    .article-container {
        max-width: 100%;
        padding: 0;
    }
    
    .article-title {
        font-size: 26px;
        margin-bottom: 16px;
    }
    
    .reader-body h1 {
        font-size: 24px;
    }
    
    .reader-body h2 {
        font-size: 22px;
    }
    
    .reader-body h3 {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 8px;
    }
    
    .site-section {
        padding: 16px;
        margin-bottom: 16px;
    }
    
    .hot-item {
        padding: 8px 0;
    }
    
    .site-title {
        font-size: 16px;
        margin-bottom: 15px;
    }
    
    .hot-rank {
        width: 32px;
        height: 32px;
        font-size: 12px;
        margin-right: 8px;
    }
    
    .reader-header {
        padding: 10px 12px;
    }
    
    .reader-controls {
        flex-direction: column;
        gap: 8px;
        align-items: stretch;
    }
    
    .reader-font-controls,
    .theme-control {
        justify-content: center;
    }
    
    .reader-right-controls {
        justify-content: center;
        gap: 8px;
    }
    
    .font-control-btn,
    .reader-action-btn {
        width: 32px;
        height: 32px;
    }
    
    .theme-btn {
        width: 28px;
        height: 28px;
    }
    
    .reader-close {
        width: 32px;
        height: 32px;
        font-size: 18px;
    }
    
    .article-title {
        font-size: 22px;
        line-height: 1.3;
    }
    
    .reader-body {
        font-size: 16px;
        padding: 12px;
        line-height: 1.7;
    }
    
    .reader-body h1 {
        font-size: 20px;
    }
    
    .reader-body h2 {
        font-size: 18px;
    }
    
    .reader-body h3 {
        font-size: 17px;
    }
    
    .reader-body p {
        margin-bottom: 16px;
    }
    
    .reader-body img {
        margin: 12px auto;
    }
}

/* 文本选中样式优化 */
/* 默认选中样式 */
::selection {
    background: rgba(102, 126, 234, 0.2);
    color: #2c3e50;
}

::-moz-selection {
    background: rgba(102, 126, 234, 0.2);
    color: #2c3e50;
}

/* 阅读模式中的文本选中样式 */
.reader-body ::selection {
    background: rgba(102, 126, 234, 0.25);
    color: inherit;
}

.reader-body ::-moz-selection {
    background: rgba(102, 126, 234, 0.25);
    color: inherit;
}

/* 浅色主题选中样式 */
.theme-light .reader-body ::selection {
    background: hsla(60, 100%, 50%, 0.3);
    color: hsla(30, 100%, 10%, 1);
}

.theme-light .reader-body ::-moz-selection {
    background: hsla(60, 100%, 50%, 0.3);
    color: hsla(30, 100%, 10%, 1);
}

/* 深色主题选中样式 */
.theme-dark .reader-body ::selection {
    background: hsla(60, 100%, 50%, 0.2);
    color: #ffffff;
}

.theme-dark .reader-body ::-moz-selection {
    background: hsla(60, 100%, 50%, 0.2);
    color: #ffffff;
}

/* 护眼主题选中样式 */
.theme-sepia .reader-body ::selection {
    background: hsla(60, 100%, 50%, 0.3);
    color: hsla(30, 100%, 10%, 1);
}

.theme-sepia .reader-body ::-moz-selection {
    background: hsla(60, 100%, 50%, 0.3);
    color: hsla(30, 100%, 10%, 1);
}