:root {
    --primary-color: #3498db;
    --secondary-color: #2c3e50;
    --background-color: #f5f7fa;
    --card-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    --hover-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    --transition: all 0.2s ease;
    --toolbar-height: 48px;
    --divider-color: #eee;
    --custom-font-family: inherit;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
    background-color: var(--background-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 工具栏 */
.toolbar {
    background: white;
    padding: 0 0.8rem;
    box-shadow: var(--card-shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--toolbar-height);
    position: sticky;
    top: 0;
    z-index: 100;
    gap: 1rem;
}

.left-controls, .right-controls, .center-controls {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.center-controls {
    flex: 1;
    justify-content: center;
    gap: 1rem;
}

.divider {
    width: 1px;
    height: 24px;
    background: var(--divider-color);
    margin: 0 0.2rem;
}

.view-controls, .format-controls, .font-controls, .align-controls, .spacing-controls {
    display: flex;
    gap: 0.3rem;
}

button {
    background: transparent;
    border: none;
    padding: 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
    height: 32px;
    min-width: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
}

button:hover {
    background: var(--background-color);
    color: var(--primary-color);
}

button.active {
    background: var(--primary-color);
    color: white;
}

button i {
    font-size: 1.2rem;
}

.current-size {
    min-width: 2rem;
    text-align: center;
    font-size: 0.9rem;
    color: #666;
}

.line-height {
    width: 100px;
    height: 4px;
    margin: 0;
    padding: 0;
    -webkit-appearance: none;
    background: var(--divider-color);
    border-radius: 2px;
    outline: none;
}

.line-height::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
}

.center-controls .read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    transition: var(--transition);
    font-size: 0.9rem;
}

.center-controls .read-more:hover {
    background-color: #2980b9;
    transform: translateY(-1px);
    box-shadow: var(--card-shadow);
}

/* 主容器 */
.container {
    display: flex;
    height: calc(100vh - var(--toolbar-height));
    gap: 1px;
    background: var(--divider-color);
    margin: 0;
    padding: 0;
}

/* 列表样式 */
.feed-list {
    background: white;
    border-right: 1px solid var(--divider-color);
    overflow-y: auto;
    padding: 1rem;
    min-width: 250px;
    max-width: 300px;
    flex-shrink: 0;
    height: calc(100vh - var(--toolbar-height) - 40px);
}

.feed-list h2 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
}

.feed-list h2 i {
    margin-right: 0.5rem;
    color: var(--primary-color);
}

.feed-list ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.feed-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--divider-color);
    cursor: pointer;
    transition: var(--transition);
}

.feed-list li:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

.feed-list li.active {
    background-color: rgba(52, 152, 219, 0.1);
    border-left: 3px solid var(--primary-color);
    padding-left: 0.5rem;
}

.articles-list {
    flex: 0 0 320px;
    background: white;
    overflow-y: auto;
}

.article-content {
    flex: 1;
    background: white;
    overflow-y: auto;
    transition: all 0.3s ease;
}

/* 标题样式 */
h2 {
    padding: 1rem;
    margin: 0;
    font-size: 1rem;
    font-weight: 500;
    color: #666;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid var(--divider-color);
    position: sticky;
    top: 0;
    background: white;
    z-index: 1;
}

h2 i {
    font-size: 1.2rem;
    color: var(--primary-color);
}

/* 列表项样式 */
#feeds {
    list-style: none;
    margin: 0;
    padding: 0.5rem;
}

#feeds li {
    padding: 0.8rem;
    cursor: pointer;
    border-radius: 6px;
    margin-bottom: 0.3rem;
    transition: var(--transition);
    border: 1px solid var(--divider-color);
    font-size: 0.9rem;
}

#feeds li:hover {
    background-color: var(--background-color);
    transform: translateX(3px);
}

#feeds li.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* 文章列表样式 */
#articles-list {
    padding: 0.5rem;
}

.article-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    min-height: 80px;
}

.article-item .article-thumbnail {
    width: 80px;
    height: 60px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background: #f6f8fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.article-item .article-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.article-item .article-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.article-item .article-info h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.4;
}

.article-item .article-info .meta {
    font-size: 0.8rem;
    color: #666;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* 文章详情样式 */
#article-detail {
    padding: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

#article-detail .article-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--divider-color);
}

#article-detail .article-header h3 {
    margin: 0 0 1rem 0;
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.4;
}

.placeholder {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #999;
    gap: 1rem;
}

.placeholder i {
    font-size: 3rem;
    opacity: 0.5;
}

/* 视图样式 */
.container.two-column-view .feed-list {
    display: block;
}

.container.two-column-view .articles-list {
    display: block;
}

.container.two-column-view .article-content {
    display: none !important;
}

.container.card-view .feed-list,
.container.card-view .article-content {
    display: none;
}

.container.card-view .articles-list {
    flex: 1;
    padding: 1.5rem;
}

.container.card-view #articles-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.container.card-view .article-item {
    height: 200px;
    margin: 0;
    display: flex;
    flex-direction: column;
    background: white;
    box-shadow: var(--card-shadow);
    border: none;
    padding: 1rem;
}

.container.card-view .article-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--hover-shadow);
}

.container.list-view .feed-list,
.container.list-view .article-content {
    display: none;
}

.container.list-view .articles-list {
    max-width: 100%;
    width: 100%;
    margin: 0;
    padding: 0 0.5rem;
}

.container.list-view .article-item {
    width: 100%;
    border-radius: 0;
    margin: 0;
    border: none;
    border-bottom: 1px solid var(--divider-color);
    padding: 1.2rem 0.5rem 1.2rem 0.5rem;
    background: #fff;
    box-shadow: none;
    display: flex;
    align-items: flex-start;
    gap: 18px;
}

.container.list-view .article-item:last-child {
    border-bottom: none;
}

.container.list-view .article-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.article-excerpt-list {
    color: #888;
    font-size: 0.98rem;
    margin-top: 6px;
    line-height: 1.6;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    max-width: 100%;
}

.container.magazine-view .feed-list {
    display: none;
}

.container.magazine-view .articles-list {
    flex: 0 0 50%;
}

.container.magazine-view .article-content {
    padding: 2rem;
    background: #fff;
}

.container.focus-view .feed-list,
.container.focus-view .articles-list {
    display: none;
}

.container.focus-view .article-content {
    padding: 0 20%;
    background: #fff;
}

/* 排版样式 */
.format-paper .article-content {
    background: #f8f5f0;
    color: #2c3e50;
    font-family: "Georgia", serif;
}

.format-paper #article-detail {
    background: white;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
    padding: 3rem;
    border-radius: 2px;
}

.format-clean .article-content {
    background: white;
    color: #333;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.format-clean #article-detail {
    padding: 2rem;
    max-width: 680px;
}

.format-night .article-content {
    background: #1a1a1a;
    color: #e0e0e0;
}

.format-night #article-detail {
    padding: 2rem;
}

/* 暗色模式 */
body.dark-mode {
    background-color: #1a1a1a;
    color: #f0f0f0;
}

body.dark-mode .toolbar,
body.dark-mode .feed-list,
body.dark-mode .articles-list,
body.dark-mode .article-content {
    background: #2d2d2d;
    color: #f0f0f0;
}

body.dark-mode .divider {
    background: #404040;
}

body.dark-mode button {
    color: #aaa;
}

body.dark-mode button:hover {
    background: #404040;
    color: var(--primary-color);
}

body.dark-mode button.active {
    background: var(--primary-color);
    color: white;
}

body.dark-mode #feeds li,
body.dark-mode .article-item {
    border-color: #404040;
}

body.dark-mode .article-item .meta {
    color: #aaa;
}

body.dark-mode h2 {
    border-color: #404040;
    background: #2d2d2d;
}

/* 响应式布局 */
@media (max-width: 1200px) {
    .container {
        flex-direction: column;
        height: auto;
    }
    
    .feed-list,
    .articles-list,
    .article-content {
        flex: none;
        width: 100%;
        height: 400px;
    }
    
    .container.focus-view .article-content {
        padding: 0 5%;
    }
}

.loading, .error, .no-feeds, .no-articles {
    padding: 1rem;
    text-align: center;
    color: #666;
    border-radius: 8px;
    margin: 1rem 0;
}

.loading {
    background-color: var(--background-color);
}

.error {
    background-color: #fee;
    color: #e74c3c;
}

.no-feeds, .no-articles {
    background-color: var(--background-color);
}

.article-actions {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.read-more {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    transition: var(--transition);
}

.read-more:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: var(--card-shadow);
}

/* 阅读设置工具栏 */
.article-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    position: sticky;
    top: 0;
    background: white;
    z-index: 2;
    padding: 0.5rem 0;
}

.reading-settings {
    position: relative;
}

.settings-toggle {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: var(--transition);
}

.settings-toggle:hover {
    background-color: var(--background-color);
}

.settings-panel {
    position: absolute;
    right: 0;
    top: 100%;
    background: white;
    padding: 1rem;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    min-width: 250px;
    display: none;
    z-index: 3;
}

.settings-panel.active {
    display: block;
    animation: fadeIn 0.2s ease;
}

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

.setting-item {
    margin-bottom: 1rem;
}

.setting-item:last-child {
    margin-bottom: 0;
}

.setting-item label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--secondary-color);
    font-weight: 500;
}

/* 字体大小控制 */
.font-size-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.font-size-controls button {
    background: var(--background-color);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
}

.font-size-controls button:hover {
    background: var(--primary-color);
    color: white;
}

.current-size {
    min-width: 2rem;
    text-align: center;
}

/* 文本对齐控制 */
.text-align-controls {
    display: flex;
    gap: 0.5rem;
}

.text-align-controls button {
    background: var(--background-color);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
    flex: 1;
}

.text-align-controls button:hover,
.text-align-controls button.active {
    background: var(--primary-color);
    color: white;
}

/* 行高控制 */
.line-height {
    width: 100%;
    margin-top: 0.5rem;
}

/* 暗色模式切换 */
.toggle-dark-mode {
    background: var(--background-color);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
}

.toggle-dark-mode:hover {
    background: var(--primary-color);
    color: white;
}

/* 暗色模式样式 */
body.dark-mode {
    background-color: #1a1a1a;
    color: #f0f0f0;
}

body.dark-mode .feed-list,
body.dark-mode .articles-list,
body.dark-mode .article-content,
body.dark-mode .settings-panel {
    background: #2d2d2d;
    color: #f0f0f0;
}

body.dark-mode h2 {
    color: #f0f0f0;
}

body.dark-mode .article-toolbar {
    background: #2d2d2d;
}

body.dark-mode #feeds li {
    border-color: #404040;
}

body.dark-mode #feeds li:hover {
    background-color: #404040;
}

body.dark-mode .article-item {
    border-color: #404040;
}

body.dark-mode .article-item:hover {
    background-color: #404040;
}

body.dark-mode .article-item h3 {
    color: #f0f0f0;
}

body.dark-mode .meta {
    color: #aaa;
}

/* 保存阅读设置 */
.save-settings {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    width: 100%;
    margin-top: 1rem;
    transition: var(--transition);
}

.save-settings:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

/* 图片对齐样式 */
.article-content img {
    max-width: 100%;
    height: auto;
    margin: 1rem 0;
    transition: width 0.3s ease;
}

.article-content img.align-left {
    float: left;
    margin: 0.5rem 1rem 0.5rem 0;
}

.article-content img.align-right {
    float: right;
    margin: 0.5rem 0 0.5rem 1rem;
}

.article-content img.align-justify {
    display: block;
    margin: 1rem auto;
}

/* 清除浮动 */
.article-content::after {
    content: '';
    display: table;
    clear: both;
}

/* 修复暗色模式样式 */
body.dark-mode .format-paper .article-content {
    background: #2d2d2d;
    color: #e0e0e0;
}

body.dark-mode .format-paper #article-detail {
    background: #333;
    box-shadow: 0 0 20px rgba(0,0,0,0.3);
}

body.dark-mode .format-clean .article-content {
    background: #2d2d2d;
    color: #e0e0e0;
}

/* 响应式布局优化 */
@media (max-width: 1200px) {
    .toolbar {
        flex-wrap: wrap;
        height: auto;
        padding: 0.5rem;
    }
    
    .left-controls,
    .center-controls,
    .right-controls {
        flex: 1 1 100%;
        justify-content: center;
        margin: 0.3rem 0;
    }
    
    .container {
        height: calc(100vh - var(--toolbar-height) * 2);
    }
    
    .container.focus-view .article-content {
        padding: 0 1rem;
    }
}

@media (max-width: 768px) {
    .spacing-controls {
        display: none;
    }
    
    .container.card-view #articles-list {
        grid-template-columns: 1fr;
    }
}

/* 新增视图样式 */
.container.timeline-view {
    grid-template-columns: 250px 1fr;
    gap: 1rem;
}

.container.timeline-view .article-content {
    padding: 2rem;
}

.timeline-header {
    position: relative;
    padding-left: 2rem;
    border-left: 3px solid var(--primary-color);
    margin-bottom: 2rem;
}

.timeline-date {
    position: absolute;
    left: -10px;
    top: 0;
    background: var(--background-color);
    padding: 0.5rem;
    border-radius: 4px;
    font-size: 0.9rem;
    color: var(--text-color-light);
}

.container.gallery-view {
    grid-template-columns: 250px 1fr;
    gap: 1rem;
}

.gallery-image {
    cursor: pointer;
    transition: transform 0.3s ease;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.gallery-image:hover {
    transform: scale(1.02);
}

.gallery-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.gallery-container {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}

.gallery-container img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
}

.gallery-close,
.gallery-prev,
.gallery-next {
    position: absolute;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 1rem;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.gallery-close:hover,
.gallery-prev:hover,
.gallery-next:hover {
    background: rgba(255, 255, 255, 0.3);
}

.gallery-close {
    top: 1rem;
    right: 1rem;
}

.gallery-prev {
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
}

.gallery-next {
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
}

.container.compact-view {
    grid-template-columns: 250px 1fr;
    gap: 0.5rem;
}

.compact-header {
    padding: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.compact-header h3 {
    font-size: 1.1rem;
    margin: 0;
}

.compact-meta {
    font-size: 0.8rem;
    color: var(--text-color-light);
}

.compact-content {
    padding: 0.5rem;
    font-size: 0.95rem;
    line-height: 1.4;
}

/* 新增格式样式 */
.format-ink {
    font-family: "楷体", KaiTi, serif;
    line-height: 1.8;
    letter-spacing: 1px;
    background: #f8f9fa;
    padding: 2rem;
    border: 1px solid #e9ecef;
    border-radius: 8px;
}

.format-ink h3 {
    font-family: "黑体", SimHei, sans-serif;
    border-bottom: 2px solid #343a40;
    padding-bottom: 0.5rem;
}

.format-modern {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
    background: white;
    padding: 2rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
}

.format-modern h3 {
    font-weight: 600;
    color: #1a73e8;
    margin-bottom: 1.5rem;
}

.format-modern img {
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 杂志视图样式优化 */
.magazine-header {
    text-align: center;
    padding: 2rem 0;
    border-bottom: 1px solid var(--border-color);
}

.magazine-category {
    display: inline-block;
    padding: 0.3rem 1rem;
    background: var(--primary-color);
    color: white;
    border-radius: 20px;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.magazine-lead {
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--text-color-light);
    margin: 2rem 0;
    padding: 0 2rem;
    font-style: italic;
    border-left: 4px solid var(--primary-color);
}

.magazine-body {
    font-size: 1.1rem;
    line-height: 1.8;
    padding: 0 2rem;
}

/* 响应式优化 */
@media (max-width: 768px) {
    .container.timeline-view,
    .container.gallery-view,
    .container.compact-view {
        grid-template-columns: 1fr;
    }

    .gallery-container {
        width: 95vw;
    }

    .magazine-lead,
    .magazine-body {
        padding: 0 1rem;
    }
}

/* 字体选择控件样式 */
.font-select {
    padding: 0.3rem 0.5rem;
    border: 1px solid var(--divider-color);
    border-radius: 4px;
    background: white;
    color: #666;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    outline: none;
    min-width: 120px;
}

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

.font-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

/* 字体预览样式 */
@font-face {
    font-family: "CustomFont";
    src: var(--custom-font-url);
}

body.custom-font {
    --article-font-family: "CustomFont", var(--system-font-family);
}

body.custom-font,
body.custom-font .article-content,
body.custom-font .feed-list,
body.custom-font .articles-list,
body.custom-font .article-item h3,
body.custom-font #article-detail,
body.custom-font .article-header h3 {
    font-family: var(--article-font-family);
}

/* 确保字体加载时的平滑过渡 */
body, 
.article-content,
.feed-list,
.articles-list,
.article-item h3,
#article-detail,
.article-header h3 {
    transition: font-family 0.3s ease;
}

/* 暗色模式适配 */
body.dark-mode .font-select {
    background: #2d2d2d;
    color: #f0f0f0;
    border-color: #404040;
}

body.dark-mode .font-select:hover {
    border-color: var(--primary-color);
}

/* 公告样式 */
.announcement {
    background-color: #f8f9fa;
    padding: 10px 20px;
    text-align: center;
    border-bottom: 1px solid #ddd;
    position: relative;
    display: none;
}

.announcement.important {
    background-color: #fff3cd;
    color: #856404;
}

.announcement.urgent {
    background-color: #f8d7da;
    color: #721c24;
}

.announcement-close {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 18px;
}

/* 滚动效果 */
.announcement .marquee {
    display: inline-block;
    white-space: nowrap;
    animation: marquee 20s linear infinite;
    padding-left: 100%;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

/* 弹窗公告样式 */
.announcement-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.announcement-modal.show {
    opacity: 1;
}

.announcement-modal.fade-out {
    opacity: 0;
}

.announcement-modal-content {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow: auto;
}

.announcement-modal-content.important {
    border-top: 4px solid #ffc107;
}

.announcement-modal-content.urgent {
    border-top: 4px solid #dc3545;
}

.announcement-modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.announcement-modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
}

.announcement-modal-close {
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
}

.announcement-modal-body {
    padding: 20px;
    line-height: 1.5;
}

.announcement-modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #eee;
    text-align: right;
}

.announcement-modal-confirm {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
}

/* 弹出公告样式 */
.announcement-popup {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 300px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
    z-index: 999;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.3s ease;
}

.announcement-popup.show {
    transform: translateY(0);
    opacity: 1;
}

.announcement-popup.fade-out {
    transform: translateY(20px);
    opacity: 0;
}

.announcement-popup.important {
    border-left: 4px solid #ffc107;
}

.announcement-popup.urgent {
    border-left: 4px solid #dc3545;
}

.announcement-popup-header {
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.announcement-popup-header h4 {
    margin: 0;
    font-size: 1rem;
    color: #333;
}

.announcement-popup-close {
    font-size: 1.2rem;
    cursor: pointer;
    color: #999;
}

.announcement-popup-body {
    padding: 15px;
    max-height: 200px;
    overflow-y: auto;
}

/* 暗色模式适配 */
body.dark-mode .announcement {
    background-color: #333;
    color: #f0f0f0;
    border-bottom: 1px solid #444;
}

body.dark-mode .announcement.important {
    background-color: #4d4200;
    color: #ffd454;
}

body.dark-mode .announcement.urgent {
    background-color: #4d1a1d;
    color: #ffb0b5;
}

body.dark-mode .announcement-modal-content,
body.dark-mode .announcement-popup {
    background-color: #333;
    color: #f0f0f0;
}

body.dark-mode .announcement-modal-header,
body.dark-mode .announcement-modal-footer,
body.dark-mode .announcement-popup-header {
    border-color: #444;
}

body.dark-mode .announcement-modal-close,
body.dark-mode .announcement-popup-close {
    color: #ccc;
}

body.dark-mode .announcement-modal-confirm {
    background-color: #2a6496;
}

body.custom-font,
body.custom-font .article-title,
body.custom-font .article-content,
body.custom-font .feed-title,
body.custom-font .article-item,
body.custom-font .search-input,
body.custom-font button,
body.custom-font select {
    font-family: var(--custom-font-family), system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

/* RTL（从右到左）模式样式 */
body.rtl-mode,
body.rtl-mode .article-content,
body.rtl-mode .article-title,
body.rtl-mode p,
body.rtl-mode h1,
body.rtl-mode h2,
body.rtl-mode h3,
body.rtl-mode h4,
body.rtl-mode h5,
body.rtl-mode h6 {
    direction: rtl;
    text-align: right;
}

body.rtl-mode .feed-list ul,
body.rtl-mode .articles-list {
    direction: rtl;
    text-align: right;
}

body.rtl-mode #rtl-toggle {
    background-color: var(--primary-color);
    color: white;
}

/* 工具提示样式 */
.tooltip {
    position: absolute;
    background-color: #333;
    color: white;
    padding: 10px;
    border-radius: 4px;
    font-size: 12px;
    max-width: 250px;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.tooltip:after {
    content: '';
    position: absolute;
    top: -6px;
    left: 10px;
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid #333;
}

/* 移除双栏视图相关样式，只保留三栏、卡片、列表视图 */
.container.three-column-view .feed-list {
    display: block;
}
.container.three-column-view .articles-list {
    display: block;
}
.container.three-column-view .article-content {
    display: block;
}

/* 视图模式基础样式 */
.view-mode {
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
}

.view-mode.active {
    background-color: var(--primary-color);
    color: white;
}

.view-mode:not(.active):hover {
    background-color: rgba(52, 152, 219, 0.1);
}

/* 视图容器 */
.container.card-mode .feed-list {
    width: 250px;
}

.container.magazine-mode .feed-list {
    width: 250px;
}

/* 卡片视图样式 */
.card-mode #articles-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    padding: 20px;
}

.article-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.article-card .article-thumbnail {
    height: 160px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f6f8fa;
    border-radius: 8px 8px 0 0;
}

.article-card .article-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px 8px 0 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: transform 0.5s;
}

.article-card:hover .article-thumbnail img {
    transform: scale(1.06);
}

.article-content {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.article-title {
    margin: 0 0 10px;
    font-size: 16px;
    line-height: 1.4;
    font-weight: 600;
    color: #333;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    color: #777;
    font-size: 12px;
    margin-bottom: 10px;
}

.article-excerpt {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    margin-bottom: 0;
    margin-top: auto;
}

/* 杂志视图样式 */
.magazine-mode #articles-list {
    padding: 20px;
}

.magazine-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.featured-article {
    position: relative;
    min-height: 260px;
    box-shadow: 0 6px 32px rgba(52,152,219,0.10);
}

.featured-image {
    position: relative;
    height: 260px;
    overflow: hidden;
}

.featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px 0 0 8px;
}

.featured-gradient {
    position: absolute;
    left: 0; right: 0; bottom: 0; top: 0;
    background: linear-gradient(120deg,rgba(0,0,0,0.18) 40%,rgba(52,152,219,0.18) 100%);
    border-radius: 8px 0 0 8px;
    pointer-events: none;
}

.featured-content {
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 36px 32px;
}

.featured-content h2 {
    font-size: 2rem;
    font-weight: bold;
    color: #222;
    margin-bottom: 18px;
    line-height: 1.3;
}

.featured-content p {
    color: #444;
    font-size: 1.1rem;
    margin-bottom: 18px;
    line-height: 1.7;
}

.articles-grid {
    gap: 28px;
}

.magazine-article {
    box-shadow: 0 2px 12px rgba(52,152,219,0.08);
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    transition: box-shadow 0.2s, transform 0.2s;
}

.magazine-article:hover {
    box-shadow: 0 8px 24px rgba(52,152,219,0.16);
    transform: translateY(-4px) scale(1.02);
}

.magazine-thumbnail {
    height: 140px;
    background: #f6f8fa;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.magazine-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px 8px 0 0;
}

.magazine-content {
    padding: 18px 18px 12px 18px;
}

.magazine-content h3 {
    font-size: 1.1rem;
    font-weight: bold;
    color: #222;
    margin-bottom: 10px;
    line-height: 1.4;
}

.magazine-content p {
    color: #555;
    font-size: 0.98rem;
    margin-bottom: 10px;
    line-height: 1.6;
}

/* 文章弹窗样式 */
.article-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-content {
    background-color: white;
    border-radius: 8px;
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.modal-header {
    padding: 20px 30px;
    border-bottom: 1px solid #eee;
    position: relative;
}

.modal-header h2 {
    margin: 0;
    font-size: 22px;
    padding-right: 40px;
    line-height: 1.4;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close-modal:hover {
    background-color: #f0f0f0;
    color: #333;
}

.modal-meta {
    display: flex;
    align-items: center;
    padding: 10px 30px;
    border-bottom: 1px solid #eee;
    color: #666;
    font-size: 14px;
    gap: 15px;
}

.original-link {
    margin-left: auto;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
}

.original-link:hover {
    text-decoration: underline;
}

.modal-body {
    padding: 30px;
    line-height: 1.7;
    color: #333;
}

.modal-body img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 10px 0;
}

.modal-body a {
    color: var(--primary-color);
    text-decoration: none;
}

.modal-body a:hover {
    text-decoration: underline;
}

.modal-footer {
    padding: 15px 30px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.action-btn {
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    background: #f0f0f0;
    color: #555;
    transition: all 0.2s ease;
}

.action-btn:hover {
    background: #e0e0e0;
}

.action-btn.favorite.active {
    background-color: #ffe0b2;
    color: #f57c00;
}

.action-btn.share:hover {
    background-color: #e3f2fd;
    color: #2196f3;
}

/* RTL支持 */
.modal-content.rtl {
    direction: rtl;
    text-align: right;
}

.modal-content.rtl .close-modal {
    right: auto;
    left: 20px;
}

.modal-content.rtl .original-link {
    margin-left: 0;
    margin-right: auto;
}

/* 防止正文溢出 */
.modal-body {
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
}

/* 移动设备适配 */
@media (max-width: 768px) {
    .featured-article {
        grid-template-columns: 1fr;
    }
    
    .featured-image {
        height: 200px;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
    }
    
    .card-mode #articles-list {
        grid-template-columns: 1fr;
    }
}

/* 防止body滚动当弹窗打开时 */
body.modal-open {
    overflow: hidden;
} 

/* 登录注册按钮样式 */
.auth-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

.auth-btn {
    padding: 4px 14px;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 500;
    background: #f5f7fa;
    color: #3498db;
    border: 1px solid #e3eaf2;
    box-shadow: none;
    transition: background 0.2s, color 0.2s, border 0.2s;
}

.auth-btn.login-btn {
    background: #eafaf1;
    color: #27ae60;
    border: 1px solid #b7eacb;
}

.auth-btn.register-btn {
    background: #eaf2fa;
    color: #3498db;
    border: 1px solid #b7d6f2;
}

.auth-btn:hover {
    background: #f0f6ff;
    color: #217dbb;
    border-color: #b7d6f2;
    box-shadow: 0 2px 8px rgba(52,152,219,0.08);
    transform: translateY(-1px) scale(1.03);
    opacity: 0.98;
}

/* 用户菜单样式 */
.user-menu-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #f5f5f5;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    transition: all 0.3s ease;
}

.user-menu-btn:hover {
    background: #e8e8e8;
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 8px 0;
    min-width: 160px;
    display: none;
    z-index: 1000;
}

.user-menu {
    position: relative;
}

.user-menu:hover .user-dropdown {
    display: block;
}

.user-dropdown a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    color: #333;
    text-decoration: none;
    transition: background-color 0.3s;
}

.user-dropdown a:hover {
    background-color: #f5f5f5;
}

.user-dropdown i {
    font-size: 16px;
}

/* 使用次数弹窗 */
.usage-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
}

.usage-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 20px;
    border-radius: 8px;
    min-width: 300px;
}

.usage-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.usage-modal-header h3 {
    margin: 0;
    color: #333;
}

.usage-modal-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #666;
}

.usage-info {
    margin-bottom: 20px;
}

.usage-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding: 8px;
    background: #f5f5f5;
    border-radius: 4px;
}

.usage-item-label {
    color: #666;
}

.usage-item-value {
    font-weight: bold;
    color: #333;
}

.usage-display {
    cursor: default !important;
    color: #666 !important;
}

.usage-display:hover {
    background-color: transparent !important;
}

#usage-count {
    color: #1E9FFF;
    font-weight: bold;
    margin-left: 5px;
}

.feed-count {
    font-size: 12px;
    color: #999;
    margin-left: 5px;
}

.feed-badge {
    display: inline-block;
    padding: 2px 6px;
    font-size: 12px;
    color: #fff;
    background-color: #3498db;
    border-radius: 3px;
    margin-left: 5px;
}

.feed-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #eee;
    transition: background-color 0.3s;
}

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

.feed-item:hover {
    background-color: #f9f9f9;
}

.feed-info {
    flex: 1;
}

.feed-title {
    font-weight: bold;
    margin-bottom: 5px;
}

.feed-url {
    color: #666;
    font-size: 14px;
}

.feed-actions {
    display: flex;
    gap: 10px;
}

/* RSS源列表样式 */
.feed-section-title {
    padding: 15px;
    font-weight: bold;
    color: #666;
    background-color: #f5f5f5;
    border-bottom: 1px solid #eee;
    margin-top: 10px;
}

.feed-section-title i {
    margin-right: 5px;
    color: #3498db;
}

.feed-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: all 0.3s ease;
}

.feed-item:hover {
    background-color: #f9f9f9;
}

.feed-item.active {
    background-color: #ecf0f1;
}

.feed-item.system-feed {
    background-color: #fafafa;
}

.feed-title {
    flex: 1;
    font-size: 14px;
    color: #333;
}

.feed-meta {
    display: flex;
    align-items: center;
    gap: 8px;
}

.feed-badge {
    padding: 2px 6px;
    font-size: 12px;
    border-radius: 3px;
    background-color: #95a5a6;
    color: white;
}

.feed-badge.system {
    background-color: #3498db;
}

.feed-count {
    font-size: 12px;
    color: #95a5a6;
}

.loading, .error, .no-feeds {
    padding: 20px;
    text-align: center;
    color: #666;
}

.loading {
    color: #3498db;
}

.error {
    color: #e74c3c;
}

@media (max-width: 900px) {
    .toolbar, .container {
        flex-direction: column;
        align-items: stretch;
    }
    .feed-list {
        min-width: 100%;
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #eee;
        position: relative;
        z-index: 10;
    }
    .articles-list, .article-content {
        width: 100%;
        min-width: 0;
    }
}
@media (max-width: 600px) {
    .toolbar {
        flex-wrap: wrap;
        padding: 8px 4px;
    }
    .feed-list {
        position: fixed;
        left: -100vw;
        top: 0;
        height: 100vh;
        width: 80vw;
        max-width: 320px;
        background: #fff;
        box-shadow: 2px 0 12px rgba(0,0,0,0.08);
        transition: left 0.3s;
        z-index: 9999;
    }
    .feed-list.open {
        left: 0;
    }
    .sidebar-toggle {
        display: inline-flex;
        align-items: center;
        background: none;
        border: none;
        font-size: 22px;
        margin-right: 10px;
        color: #3498db;
        cursor: pointer;
    }
    .container {
        flex-direction: column;
        padding: 0;
    }
    .articles-list, .article-content {
        width: 100%;
        min-width: 0;
    }
} 

/* 三栏视图下文章列表间距优化 */
.three-column-view .article-item {
    margin-bottom: 0;
    padding: 10px 8px;
    border-radius: 0;
    border: none;
    border-bottom: 1px solid #e5eaf2;
    background: #fff;
    transition: box-shadow 0.2s;
}
.three-column-view .article-item:last-child {
    border-bottom: none;
}
.three-column-view .article-item:hover {
    box-shadow: 0 2px 8px rgba(52,152,219,0.08);
    background: #f8fbff;
} 