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

body {
    font-family: 'Microsoft YaHei', 'SimSun', serif;
    background: #f5f5f5;
    color: #333;
    line-height: 1.8;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

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

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

header h1 {
    font-size: 28px;
    margin-right: 30px;
}

header nav {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

header nav a {
    color: white;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 5px;
    transition: all 0.3s;
}

header nav a:hover,
header nav a.active {
    background: rgba(255,255,255,0.2);
}

.search-box {
    margin-top: 10px;
}

.search-box form {
    display: flex;
    gap: 10px;
}

.search-box input {
    padding: 8px 15px;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    width: 250px;
}

.search-box button {
    padding: 8px 20px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
}

.search-box button:hover {
    background: #45a049;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 60px 0;
    text-align: center;
}

.hero h2 {
    font-size: 36px;
    margin-bottom: 15px;
}

.hero p {
    font-size: 18px;
    opacity: 0.9;
}

/* Sections */
section {
    padding: 60px 0;
}

section h2 {
    font-size: 28px;
    margin-bottom: 30px;
    text-align: center;
    color: #333;
}

/* Category Grid */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.category-card {
    background: white;
    padding: 30px;
    border-radius: 10px;
    text-decoration: none;
    color: #333;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    text-align: center;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

.category-card h3 {
    font-size: 24px;
    margin-bottom: 10px;
    color: #667eea;
}

.category-card p {
    color: #666;
}

/* Poetry Grid */
.poetry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.poetry-card {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.poetry-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

.poetry-card h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: #333;
}

.poetry-card .author {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 14px;
}

.poetry-card .content {
    color: #555;
    white-space: pre-wrap;
    line-height: 2;
    font-size: 15px;
}

.poetry-card .more {
    display: inline-block;
    margin-top: 15px;
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
}

.poetry-card .more:hover {
    text-decoration: underline;
}

/* Author Grid */
.author-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.author-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s;
    text-decoration: none;
    color: #333;
}

.author-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

.author-card .name {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #667eea;
}

.author-card .desc {
    font-size: 12px;
    color: #666;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Detail Page */
.detail-page {
    max-width: 800px;
    margin: 40px auto;
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.detail-page h1 {
    font-size: 32px;
    margin-bottom: 10px;
    text-align: center;
}

.detail-page .meta {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
}

.detail-page .meta a {
    color: #667eea;
    text-decoration: none;
}

.detail-page .content {
    font-size: 18px;
    line-height: 2.5;
    white-space: pre-wrap;
    text-align: center;
    color: #333;
}

.detail-page .tags {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.detail-page .tags span {
    display: inline-block;
    background: #f0f0f0;
    padding: 5px 15px;
    border-radius: 20px;
    margin: 5px;
    font-size: 13px;
}

/* Author Page */
.author-page {
    max-width: 800px;
    margin: 40px auto;
}

.author-header {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.author-header h1 {
    font-size: 32px;
    margin-bottom: 15px;
    color: #667eea;
}

.author-header .desc {
    color: #666;
    line-height: 2;
}

.author-works {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.author-works h2 {
    margin-bottom: 20px;
}

.work-list {
    list-style: none;
}

.work-list li {
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.work-list li:last-child {
    border-bottom: none;
}

.work-list a {
    text-decoration: none;
    color: #333;
    font-size: 16px;
}

.work-list a:hover {
    color: #667eea;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 30px 0;
}

.pagination a,
.pagination span {
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    text-decoration: none;
    color: #333;
}

.pagination a:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.pagination .active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* Search Results */
.search-results {
    max-width: 800px;
    margin: 40px auto;
}

.search-results h1 {
    margin-bottom: 30px;
}

.result-info {
    margin-bottom: 20px;
    color: #666;
}

/* Footer */
footer {
    background: #333;
    color: white;
    padding: 30px 0;
    text-align: center;
    margin-top: 60px;
}

footer a {
    color: #667eea;
    text-decoration: none;
}

/* Responsive */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        text-align: center;
    }

    header h1 {
        margin-right: 0;
        margin-bottom: 15px;
    }

    header nav {
        justify-content: center;
    }

    .search-box input {
        width: 200px;
    }

    .hero h2 {
        font-size: 28px;
    }

    .poetry-grid {
        grid-template-columns: 1fr;
    }
}

/* Loading */
.loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

/* Error */
.error {
    background: #ffebee;
    color: #c62828;
    padding: 20px;
    border-radius: 5px;
    margin: 20px 0;
}
