:root {
    --primary-color: #0068B7;
    --secondary-color: #4A90E2;
    --background-color: #F5F7FA;
    --text-color: #333;
    --card-bg: #fff;
    --border-color: #E1E4E8;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    height: 100vh;
    overflow: hidden;
    position: relative;
}

header {
    background-color: var(--primary-color);
    padding: 16px;
    color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
}

h1 {
    font-size: 1.5rem;
    margin: 0;
}

.update-info {
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filters {
    max-width: 1200px;
    margin: 8px auto 0;
}

.filter-group {
    display: flex;
    gap: 12px;
}

.filter-select {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 4px;
    background-color: rgba(255,255,255,0.1);
    color: white;
    font-size: 0.9rem;
    cursor: pointer;
}

.filter-select option {
    background-color: white;
    color: var(--text-color);
}

.refresh-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: transform 0.3s;
}

.refresh-btn:hover {
    transform: rotate(180deg);
}

main {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 16px;
    height: calc(100vh - 140px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
}

#news-container {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    position: relative;
    padding-bottom: 60px;
}

#news-list {
    flex: 1;
    overflow-y: auto;
    list-style: none;
    padding: 0;
    margin: 0;
    /* 自定义滚动条样式 */
    scrollbar-width: none;
    scrollbar-color: var(--primary-color) transparent;
}

/* Webkit浏览器的滚动条样式 */
#news-list::-webkit-scrollbar {
    width: 6px;
}

#news-list::-webkit-scrollbar-track {
    background: transparent;
}

#news-list::-webkit-scrollbar-thumb {
    background-color: var(--primary-color);
    border-radius: 3px;
}

.news-item {
    background-color: var(--card-bg);
    margin-bottom: 12px;
    padding: 16px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid var(--border-color);
}

.news-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.news-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 8px;
}

.news-title {
    margin: 0;
    flex: 1;
}

.share-btn {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: #666;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.share-btn:hover {
    background-color: rgba(0, 104, 183, 0.1);
    color: var(--primary-color);
}

.news-date {
    color: #666;
    font-size: 0.85rem;
}

.news-title a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
}

.news-title a:hover {
    text-decoration: underline;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.pagination {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--background-color);
    padding: 12px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    border-top: 1px solid var(--border-color);
    z-index: 100;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

/* 确保分页按钮和信息的布局 */
.page-btn {
    padding: 8px 16px;
    border: none;
    background-color: var(--primary-color);
    color: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    min-width: 80px; /* 确保按钮宽度一致 */
}

#page-info {
    font-size: 0.9rem;
    color: #666;
    min-width: 100px; /* 确保页码信息有足够空间 */
    text-align: center;
}

.loading, .error {
    text-align: center;
    padding: 20px;
    display: none;
}

.error {
    color: #dc3545;
    background-color: #fff;
    border-radius: 8px;
    border: 1px solid #dc3545;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    background-color: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.category-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    color: white;
    font-size: 0.8rem;
    font-weight: 500;
}

/* 提示消息样式 */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 12px 24px;
    border-radius: 4px;
    font-size: 0.9rem;
    z-index: 1000;
    transition: transform 0.3s ease-out;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .update-info {
        width: 100%;
        justify-content: space-between;
    }

    .filter-group {
        flex-direction: column;
    }

    .filter-select {
        width: 100%;
    }

    .news-meta {
        flex-direction: row;
        gap: 8px;
    }

    .pagination {
        padding: 8px 0;
    }

    .news-header {
        gap: 8px;
    }

    .share-btn {
        padding: 8px;  /* 在移动端增加点击区域 */
    }

    .header-logo {
        height: 32px;  /* 移动端稍微小一点 */
    }

    main {
        margin: 10px auto;
        padding: 0 8px;
        height: calc(100vh - 160px);
    }

    .page-btn {
        padding: 6px 12px;
        font-size: 0.85rem;
    }

    #page-info {
        font-size: 0.85rem;
    }

    #news-container {
        padding-bottom: 50px;
    }
}

/* 修改 logo 相关样式 */
.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-logo {
    height: 36px;
    width: auto;
    display: block;
    transition: transform 0.3s ease;
}

.header-logo:hover {
    transform: scale(1.02);
}

/* 移动端适配 */
@media (max-width: 768px) {
    .header-logo {
        height: 32px;
    }
}