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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

/* Header */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-inner {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-link {
    display: flex;
    align-items: center;
}

.header-logo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.header h1 {
    font-size: 20px;
    font-weight: 600;
    flex: 1;
}

.update-time {
    font-size: 12px;
    opacity: 0.8;
    background: rgba(255,255,255,0.2);
    padding: 5px 10px;
    border-radius: 15px;
}

/* 导航栏右侧控制区 */
.header-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

/* Container */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    min-height: calc(100vh - 200px);
}

/* Filter Bar */
.filter-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    overflow-x: auto;
    padding-bottom: 5px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.filter-bar::-webkit-scrollbar {
    display: none;
}

.filter-btn {
    padding: 8px 20px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    white-space: nowrap;
    flex-shrink: 0;
}

.filter-btn:hover {
    border-color: #667eea;
    color: #667eea;
}

.filter-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
}

/* Loading */
.loading {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e0e0e0;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Error */
.error {
    text-align: center;
    padding: 60px 20px;
    color: #c62828;
}

.error button {
    margin-top: 15px;
    padding: 10px 30px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

/* News List */
.news-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.news-item {
    background: white;
    border-radius: 12px;
    padding: 15px;
    display: flex;
    gap: 15px;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.news-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.news-thumb {
    width: 100px;
    height: 75px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    background: #f0f0f0;
}

.news-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.news-title {
    font-size: 15px;
    line-height: 1.5;
    color: #333;
    font-weight: 500;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    font-size: 12px;
    color: #999;
}

.news-source {
    display: flex;
    align-items: center;
    gap: 5px;
}

.source-logo {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    object-fit: cover;
}

.hot-tag {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a5a 100%);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
}

.news-rank {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: bold;
    font-size: 14px;
    flex-shrink: 0;
}

.rank-1 { background: #ff6b6b; color: white; }
.rank-2 { background: #ffa502; color: white; }
.rank-3 { background: #2ed573; color: white; }
.rank-other { background: #f0f0f0; color: #666; }

/* No Image Mode */
.news-item.no-image .news-content {
    padding-left: 0;
}

/* Load More */
.load-more {
    text-align: center;
    padding: 30px;
}

.load-more button {
    padding: 12px 40px;
    background: white;
    border: 1px solid #667eea;
    color: #667eea;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.load-more button:hover {
    background: #667eea;
    color: white;
}

/* Footer */
.footer {
    background: white;
    padding: 30px 20px;
    text-align: center;
    border-top: 1px solid #eee;
}

.footer-links {
    margin-bottom: 15px;
}

.footer-links a {
    color: #667eea;
    text-decoration: none;
    margin: 0 15px;
    font-size: 14px;
}

.footer-links a:hover {
    text-decoration: underline;
}

.beian {
    font-size: 12px;
    color: #999;
    margin-bottom: 10px;
}

.beian p {
    margin: 5px 0;
}

.beian a {
    color: #999;
    text-decoration: none;
}

.beian-icon {
    width: 14px;
    height: 14px;
    vertical-align: middle;
    margin-right: 3px;
}

.copyright {
    font-size: 12px;
    color: #ccc;
}

/* Mobile */
@media (max-width: 600px) {
    .container {
        padding: 15px;
    }
    
    .news-item {
        padding: 12px;
    }
    
    .news-thumb {
        width: 80px;
        height: 60px;
    }
    
    .news-title {
        font-size: 14px;
    }
    
    .filter-btn {
        padding: 6px 15px;
        font-size: 13px;
    }
}
