* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft JhengHei", -apple-system, SF UI Text, Arial, sans-serif;
    font-size: 15px;
    background: #f5f5f5;
    height: 100vh;
    overflow: hidden;
    padding-left: 10px;
 padding-right: 10px;
       
}
.article-content{
    padding-left: 5px;
    padding-right: 5px;
    word-wrap: break-word;
    word-break: break-all;
    overflow-wrap: break-word;
}

/* 搜索关键字高亮样式 */
.search-highlight {
    background-color: #e6f7ff;
    padding: 0 3px;
    border-radius: 3px;
    font-weight: 600;
    color: #1890ff;
    border: 1px solid #91d5ff;
    box-shadow: 0 1px 2px rgba(24, 144, 255, 0.1);
}

/* 文章订阅源信息样式 */
.article-feed-info {
 background: #dbe3db;
    padding: 8px 12px;
    margin-bottom: 15px;
    border-bottom: 3px solid #1890ff;
}

.feed-source {
    font-size: 13px;
    color: #666;
    font-weight: 500;
}

.feed-link {
    color: #1890ff;
    text-decoration: none;
    transition: color 0.2s;
}

.feed-link:hover {
    color: #40a9ff;
    text-decoration: underline;
}

.article-navigation {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    gap: 10px;
}

.nav-btn {
    padding: 8px 16px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    background: #fff;
    color: #333;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.nav-btn:hover:not(:disabled) {
    background: #f0f0f0;
    border-color: #1890ff;
    color: #1890ff;
}

.nav-btn:disabled {
    background: #f5f5f5;
    color: #ccc;
    cursor: not-allowed;
    border-color: #d9d9d9;
}

/* 图片懒加载样式 */
.lazy-image {
    max-width: 100%;
    height: auto;
    transition: all 0.5s ease-in-out;
    opacity: 0;
    transform: scale(0.95);
}

.lazy-image.loading {
    opacity: 0.3;
    background: #f5f5f5;
    border-radius: 4px;
}

.lazy-image.loaded {
    opacity: 1;
    transform: scale(1);
    animation: imageFadeIn 0.5s ease-in-out;
}

@keyframes imageFadeIn {
    0% {
        opacity: 0;
        transform: scale(0.95);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* 加载动画 */
.lazy-image.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #1890ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 公告浮窗样式 */
.announcement-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.announcement-modal-overlay.active {
    display: flex;
}

.announcement-modal {
    background: #fff;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

.announcement-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e8e8e8;
}

.announcement-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.close-btn:hover {
    background: #f5f5f5;
    color: #666;
}

.announcement-content {
    padding: 24px;
    line-height: 1.6;
    color: #666;
}

.announcement-content p {
    margin: 0 0 16px 0;
}

.announcement-content p:last-child {
    margin-bottom: 0;
}

.announcement-content a {
    color: #1890ff;
    text-decoration: none;
}

.announcement-content a:hover {
    text-decoration: underline;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.container {
    display: flex;
    height: calc(100vh - 40px); /* 增加头部和底部间距，总共40px */
    max-width: 1400px;
    margin: 20px auto; /* 增加上下外边距各20px */
    background: #fff;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

.sidebar {
    width: 60px;
    background: #2e3238;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 20px;
    position: relative;
}

.sidebar-icon {
    width: 40px;
    height: 40px;
    margin-bottom: 15px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}

.sidebar-icon:hover {
    background: #3a3f45;
}

.sidebar-icon.active {
    background: #07c160;
}

.sidebar-icon svg {
    width: 24px;
    height: 24px;
    fill: #fff;
}

.sidebar-icon.active svg {
    fill: #fff;
}

.feed-list {
    width: 280px;
    background: #e9e9e9;
    border-right: 1px solid #d6d6d6;
    display: flex;
    flex-direction: column;
}

.back-btn {
    padding: 6px 12px;
    background: #e5e5e5;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
    display: none;
}

.back-btn:hover {
    background: #d4d4d4;
}

.article-list-header {
    padding: 0;
    border-bottom: none;
    background: transparent;
    margin: 0;
}

@media (max-width: 1000px) {
    .article-list-header {
        justify-content: flex-start;
        gap: 0;
    }
    
    .back-btn {
        display: block;
    }
    
    .article-detail-header {
        display: flex;
        align-items: flex-start;
        gap: 10px;
    }
    
    .article-detail-header .back-btn {
        flex-shrink: 0;
        margin-top: 2px;
    }
    
    .article-detail-meta {
        padding: 0;
        border-bottom: none;
    }
}

.search-box {
    padding: 8.5px 20px;
    background: #f5f5f5;
    border-bottom: 1px solid #e0e0e0;
}

.search-box input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.search-box input:focus {
    border-color: #07c160;
}

.feed-list-header h2 {
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

.add-btn {
    position: absolute;
    bottom: 70px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #07c160;
    color: white;
    border: none;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.add-btn:hover {
    background: #06b055;
}

.stats-btn {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #1890ff;
    color: white;
    border: none;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.stats-btn:hover {
    background: #40a9ff;
}

.stats-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.stats-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: #f5f5f5;
    border-radius: 8px;
}

.stats-label {
    font-size: 16px;
    color: #666;
}

.stats-value {
    font-size: 24px;
    font-weight: bold;
    color: #07c160;
}

.feed-items {
    flex: 1;
    overflow-y: auto;
}

/* 订阅源列表底部备案信息 */
.feed-footer {
    background: #f5f5f5;
    border-top: 1px solid #e0e0e0;
    padding: 10px 0;
    text-align: center;
    font-size: 12px;
    color: #666;
    width: 100%;
    box-sizing: border-box;
    position: sticky;
    bottom: 0;
    z-index: 5;
}

.feed-item {
    padding: 12px 15px;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 12px;
}

.feed-item:hover {
    background: #d9d9d9;
}

.feed-item.active {
    background: #c9c9c9;
}

.feed-avatar {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    background: #07c160;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
    flex-shrink: 0;
    overflow: hidden;
}

.feed-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.feed-info {
    flex: 1;
    min-width: 0;
}

.feed-title {
    font-size: 14px;
    color: #333;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.feed-meta {
    font-size: 12px;
    color: #999;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.favorite-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #999;
    padding: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s;
}

.favorite-btn:hover {
    color: #ffcc00;
}

.favorite-btn.favorite-active {
    color: #ffcc00;
}

.favorite-btn.favorite-active svg {
    fill: #ffcc00;
}

.pinned-tag {
    margin-right: 8px;
    font-size: 14px;
    vertical-align: middle;
}

.unread-count {
        background: #d3cccc;
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    min-width: 18px;
    text-align: center;
}

.content-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #fff;
    padding-bottom: 80px; /* 为备案信息留出空间 */
}

.content-header {
    padding: 20px 20px;
    background: #f5f5f5;
    border-bottom: 1px solid #e0e0e0;
}

.content-header h3 {
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

.article-list {
    width: 320px;
    border-right: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    background: #fafafa;
}

.article-list-header {
   /* padding: 15px 20px;*/
    background: #f5f5f5;
  /*  border-bottom: 1px solid #e0e0e0;*/
    /*margin: 10px 0;*/
}

.article-list-header h3 {
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

.article-items {
    flex: 1;
    overflow-y: auto;
}

.article-item {
    padding: 15px 20px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s;
}

.article-item:hover {
    background: #f0f0f0;
}

.article-item.active {
    background: #e6e6e6;
}

.article-item.unread .article-title {
    font-weight: 600;
}

.read-tag {
    display: inline-block;
    padding: 2px 8px;
    background: #f0f0f0;
    color: #666;
    font-size: 12px;
    border-radius: 10px;
    margin-left: 8px;
    vertical-align: middle;
}

.article-title {
    font-size: 14px;
    color: #333;
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-meta {
    font-size: 12px;
    color: #999;
}

.article-detail {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.article-detail-header {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    background: #f5f5f5;
    border-bottom: 1px solid #e0e0e0;
}

.article-detail-title-header {
    flex: 1;
    margin: 0;
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

/* 侧边栏返回按钮 */
.sidebar-back-btn {
    display: none;
}

/* 移动设备上的返回按钮 */
.mobile-back-btn {
    display: none;
}

@media (max-width: 1000px) {
    .sidebar-back-btn {
        display: block;
        background: none;
        border: none;
        font-size: 20px;
        color: #1890ff;
        cursor: pointer;
        padding: 10px 12px;
        margin-right: 5px;
        border-radius: 4px;
        position: absolute;
        left: 5px;
        top: 5px;
        z-index: 10;
    }
    
    .sidebar-back-btn:hover {
        background: #f0f0f0;
    }
    
    .mobile-back-btn {
        display: block;
        background: none;
        border: none;
        font-size: 18px;
        color: #1890ff;
        cursor: pointer;
        padding: 8px 12px;
        margin-right: 10px;
        border-radius: 4px;
    }
    
    .mobile-back-btn:hover {
        background: #f0f0f0;
    }
    
    /* 在订阅源列表页面隐藏返回按钮 */
    .sidebar-back-btn.hidden {
        display: none !important;
    }
}

.article-detail-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
    line-height: 1.4;
}

.article-detail-meta {
    font-size: 13px;
    color: #999;
    display: flex;
    gap: 20px;
}

.article-detail-meta a {
    color: #07c160;
    text-decoration: none;
}

.article-detail-meta a:hover {
    text-decoration: underline;
}

.article-detail-content {
    flex: 1;
    overflow-y: auto;
    padding: 30px;
}

.article-detail-content img {
    max-width: 100%;
    height: auto;
}

.article-detail-content p {
    margin-bottom: 15px;
    line-height: 1.8;
    color: #333;
}

.article-detail-content a {
    color: #07c160;
    text-decoration: none;
}

.article-detail-content a:hover {
    text-decoration: underline;
}

.empty-state {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #999;
    padding: 40px;
    text-align: center;
}

.empty-state svg {
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
    fill: #ddd;
}

.empty-state p {
    font-size: 14px;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    display: none;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: #fff;
    border-radius: 8px;
    width: 450px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    line-height: 1;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    padding: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    color: #333;
    margin-bottom: 8px;
}

.form-group input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.form-group input:focus {
    border-color: #07c160;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.btn {
    padding: 8px 20px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    border: none;
    transition: background 0.2s;
}

.btn-default {
    background: #f0f0f0;
    color: #333;
}

.btn-default:hover {
    background: #e0e0e0;
}

.btn-primary {
    background: #07c160;
    color: #fff;
}

.btn-primary:hover {
    background: #06ad56;
}

.main-content {
    flex: 1;
    display: flex;
    overflow: hidden;
    position: relative; /* 为备案信息定位做准备 */
}

.feed-item-all {
    background: #e9e9e9;
    color: #333;
}

.feed-item-all:hover {
    background: #d9d9d9 !important;
}

.feed-item-all.active {
    background: #07c160 !important;
    color: #fff;
}

.feed-item-all .feed-avatar {
    background: #07c160;
    color: #fff;
}

.feed-item-all.active .feed-avatar {
    background: #fff;
    color: #07c160;
}

.mobile-bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #2e3238;
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 10px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 100;
    display: none;
}

.mobile-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.mobile-btn:first-child {
    background: #07c160;
    color: white;
}

.mobile-btn:last-child {
    background: #1890ff;
    color: white;
}

@media (max-width: 1000px) {
    body {
        padding: 0 !important;
        padding-bottom: 60px !important;
    }
    
    .container {
        height: calc(100vh - 60px);
        max-width: 100%;
        border-radius: 0;
        flex-direction: column;
        margin: 0 !important;
    }
    
    .sidebar {
        width: 100%;
        height: 50px;
        padding: 0;
        flex-direction: row;
        justify-content: center;
        align-items: center;
    }
    
    .sidebar-icon {
        margin: 0 10px;
        margin-bottom: 0;
        width: 36px;
        height: 36px;
    }
    
    .sidebar-icon svg {
        width: 20px;
        height: 20px;
    }
    
    .add-btn,
    .stats-btn {
        display: none;
    }
    
    .mobile-bottom-bar {
        display: flex;
    }
    
    .feed-list {
        width: 100%;
        height: 100%;
        border-right: none;
        border-bottom: none;
        position: absolute;
        top: 50px;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 10;
        background: #fff;
        display: none;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .feed-list.mobile-show {
        display: block;
    }
    
    .main-content {
        flex: 1;
        flex-direction: column;
        position: absolute;
        top: 50px;
        left: 0;
        right: 0;
        bottom: 0;
    }
    
    .article-list {
        width: 100%;
        height: 100%;
        border-right: none;
        border-bottom: none;
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 20;
        background: #fff;
        display: none;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .article-list.mobile-show {
        display: block;
    }
    
    .article-detail {
        width: 100%;
        height: 100%;
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 30;
        background: #fff;
        display: none;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .article-detail.mobile-show {
        display: block;
    }
}

/* 备案信息样式 */
.footer {
    background: #f5f5f5;
    border-top: 1px solid #e0e0e0;
    padding: 15px 0;
    text-align: center;
    font-size: 14px;
    color: #666;
    width: 100%; /* 确保占满整个宽度 */
    box-sizing: border-box;
    position: relative; /* 改为相对定位，避免影响容器间距 */
    margin-top: auto; /* 使用margin-top: auto使其吸附在底部 */
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    color: #06ad56;
}
.footer-content a{
    color: #06ad56;
}

.footer p {
    margin: 10px 0;
    line-height: 1.6;
}

@media (max-width: 1000px) {
    .footer {
        padding: 12px 0;
        font-size: 12px;
        margin-top: auto; /* 使用margin-top: auto使其吸附在内容区底部 */
    }
    
    .footer-content {
        padding: 0 15px;
    }
    
    .footer p {
        margin: 6px 0;
        line-height: 1.4;
    }
    
    .content-area {
        padding-bottom: 80px; /* 移动设备上为备案信息和底部菜单留出空间 */
    }
    
    .back-btn {
        display: block;
    }
    
    .article-detail-content {
        padding: 15px;
    }
    
    .article-detail-header {
        padding: 15px 20px;
        display: flex;
        align-items: center;
        gap: 10px;
    }
}

.load-more {
    padding: 15px;
    text-align: center;
    border-top: 1px solid #e0e0e0;
}

.load-more button {
    padding: 8px 24px;
    background: #07c160;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

.load-more button:hover {
    background: #06ad56;
}

.article-detail-meta {
    padding: 0 20px 15px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.article-detail-meta span {
    color: #999;
    font-size: 13px;
}

.article-detail-meta a {
    color: #07c160;
    text-decoration: none;
    font-size: 13px;
}

.article-detail-meta a:hover {
    text-decoration: underline;
}
