/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Serif SC', serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
}

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

/* 导航栏样式 */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo h1 {
    color: #8B4513;
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
}

.nav-logo .subtitle {
    color: #666;
    font-size: 0.9rem;
    margin-left: 10px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-link {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    padding: 10px 15px;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    background: linear-gradient(135deg, #8B4513, #A0522D);
    color: white;
}

/* 主要内容区域 */
.main-content {
    margin-top: 70px;
    padding-top: 20px;
}

/* 搜索区域样式 */
.search-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 80px 0;
    text-align: center;
    color: white;
}

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

.search-title {
    font-size: 2.5rem;
    margin-bottom: 15px;
    font-weight: 700;
}

.search-subtitle {
    font-size: 1.1rem;
    margin-bottom: 40px;
    opacity: 0.9;
}

.search-box {
    display: flex;
    max-width: 600px;
    margin: 0 auto 20px;
    background: white;
    border-radius: 50px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.search-input {
    flex: 1;
    padding: 20px 25px;
    border: none;
    outline: none;
    font-size: 1.1rem;
    font-family: inherit;
}

.search-btn {
    background: linear-gradient(135deg, #8B4513, #A0522D);
    color: white;
    border: none;
    padding: 20px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-btn:hover {
    background: linear-gradient(135deg, #A0522D, #8B4513);
    transform: translateY(-2px);
}

.search-icon {
    font-size: 1.2rem;
}

.search-suggestions {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.suggestion-item {
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.suggestion-item:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* 热门诗歌区域 */
.popular-section {
    padding: 60px 0;
    background: white;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 40px;
    color: #333;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(135deg, #8B4513, #A0522D);
    border-radius: 2px;
}

.poems-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.poem-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid #f0f0f0;
}

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

.poem-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #8B4513;
    margin-bottom: 10px;
}

.poem-author {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.poem-preview {
    color: #333;
    line-height: 1.8;
    font-style: italic;
    margin-bottom: 15px;
}



/* 分类浏览区域 */
.categories-section {
    padding: 60px 0;
    background: #f8f9fa;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.category-card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

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

.category-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.category-card h4 {
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 10px;
}

.category-card p {
    color: #666;
    font-size: 0.9rem;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 15px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
    padding: 20px 30px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    color: #333;
    margin: 0;
}

.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: #333;
}

.modal-body {
    padding: 30px;
}

.search-result-item {
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-result-item:hover {
    background-color: #f8f9fa;
}

.search-result-item:last-child {
    border-bottom: none;
}

.result-title {
    font-size: 1.2rem;
    color: #8B4513;
    margin-bottom: 5px;
}

.result-author {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.result-preview {
    color: #333;
    font-style: italic;
}

/* 页脚样式 */
.footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 30px 0;
    margin-top: 60px;
}

/* 诗歌列表页面样式 */
.poems-list-section {
    padding: 60px 0;
    background: white;
}

.section-subtitle {
    text-align: center;
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 40px;
}

.filter-section {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 40px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.filter-section .search-box {
    margin-bottom: 20px;
    max-width: 100%;
}

.filter-controls {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-group label {
    font-weight: 600;
    color: #333;
    white-space: nowrap;
}

.filter-select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: white;
    font-size: 0.9rem;
    min-width: 120px;
    cursor: pointer;
}

.filter-select:focus {
    outline: none;
    border-color: #8B4513;
    box-shadow: 0 0 0 2px rgba(139, 69, 19, 0.1);
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 40px;
}

.pagination button {
    padding: 10px 15px;
    border: 1px solid #ddd;
    background: white;
    color: #333;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.pagination button:hover {
    background: #8B4513;
    color: white;
    border-color: #8B4513;
}

.pagination button.active {
    background: #8B4513;
    color: white;
    border-color: #8B4513;
}

.pagination button:disabled {
    background: #f0f0f0;
    color: #999;
    cursor: not-allowed;
    border-color: #ddd;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        height: auto;
        padding: 15px 20px;
    }
    
    .nav-menu {
        margin-top: 15px;
        gap: 15px;
    }
    
    .search-title {
        font-size: 2rem;
    }
    
    .search-box {
        flex-direction: column;
        border-radius: 15px;
    }
    
    .search-input,
    .search-btn {
        border-radius: 0;
    }
    
    .search-input {
        border-radius: 15px 15px 0 0;
    }
    
    .search-btn {
        border-radius: 0 0 15px 15px;
    }
    
    .poems-grid {
        grid-template-columns: 1fr;
    }
    
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .filter-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        justify-content: space-between;
    }
    
    .filter-select {
        min-width: 150px;
    }
}

@media (max-width: 480px) {
    .categories-grid {
        grid-template-columns: 1fr;
    }
    
    .search-suggestions {
        flex-direction: column;
        align-items: center;
    }
    
    .filter-section {
        padding: 20px;
    }
    
    .pagination {
        flex-wrap: wrap;
    }
} 