:root {
    --main-color: #0b5ed7; 
    --text-color: #333;
    --bg-color: #fff;
    --link-color: var(--main-color);
    --link-hover-color: #0d6efd;
    --footer-bg: #f8f9fa;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

header {
    background-color: var(--main-color);
    color: white;
    padding: 1rem;
    text-align: center;
}

header h1 {
    font-size: 2rem;
}

header a {
    color: white;
    text-decoration: none;
}

.container {
    max-width: 900px;
    margin: 1rem auto;
    padding: 0 1rem;
}

h2, h3 {
    color: var(--main-color);
    margin-bottom: 1rem;
}

.article-list {
    list-style-type: none;
    margin: 1.5rem 0;
}

.article-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

.article-list a {
    color: var(--link-color);
    text-decoration: none;
    font-size: 1.1rem;
}

.article-list a:hover {
    color: var(--link-hover-color);
    text-decoration: underline;
}

.random-articles {
    margin-top: 2rem;
    padding: 1rem;
    background-color: #f5f5f5;
    border-radius: 5px;
}

.random-articles ul {
    list-style-type: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.5rem;
    margin-top: 1rem;
}

.random-articles li {
    padding: 0.3rem 0;
}

.random-articles a {
     color: var(--link-color);
    text-decoration: none;
    transition: color 0.3s ease; 
}

.random-articles a:hover {
    color: var(--link-hover-color);
    text-decoration: underline;
}

article {
    margin-bottom: 2rem;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin: 2rem 0;
}

.pagination a {
    padding: 0.5rem 1rem;
    background-color: var(--main-color);
    color: white;
    text-decoration: none;
    border-radius: 4px;
}

.pagination a:hover {
    background-color: var(--link-hover-color);
}

footer {
    background-color: var(--footer-bg);
    padding: 2rem 0;
    margin-top: auto;
}

.footer-links, .copyright {
    text-align: center;
    margin-bottom: 1rem;
}

.footer-links ul {
    list-style-type: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-links a {
    color: var(--link-color);
    text-decoration: none;
}

.footer-links a:hover {
    text-decoration: underline;
}

/* 响应式设计 */
@media (max-width: 600px) {
    .container {
        padding: 0 0.5rem;
    }
    
    header h1 {
        font-size: 1.5rem;
    }
    
    .random-articles ul {
        grid-template-columns: 1fr;
    }
    
    .article-list a {
        font-size: 1rem;
    }
}
