/* 重置样式 */
2|* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", sans-serif;
    background: #f5f5f5;
}

/* 顶部横幅 */
.banner {
    position: relative;
    height: 400px;
    overflow: hidden;
}

.banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner h1 {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 3em;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

/* 导航菜单 */
.main-nav {
    position: relative;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 1em;
}

.main-nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    gap: 2em;
}

.main-nav a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
}

.main-nav a:hover,
.main-nav a.active {
    color: #c41;
}

/* 搜索框 */
.search-box {
    position: absolute;
    right: 2em;
    top: 50%;
    transform: translateY(-50%);
}

.search-box input {
    width: 200px;
    padding: 0.5em 1em;
    border: 1px solid #ddd;
    border-radius: 20px;
    outline: none;
}

/* 分类筛选区 */
.filter-section {
    background: #fff;
    padding: 1.5em;
    margin: 2em auto;
    max-width: 1200px;
}

.filter-options {
    display: flex;
    gap: 1em;
    flex-wrap: wrap;
}

.filter-option {
    padding: 0.5em 1.5em;
    border: 1px solid #ddd;
    border-radius: 20px;
    cursor: pointer;
}

.filter-option.active {
    background: #c41;
    color: #fff;
    border-color: #c41;
}

/* 诗词展示区 */
.poetry-container {
    max-width: 1200px;
    margin: 2em auto;
    padding: 0 1em;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2em;
}

.poetry-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.poetry-card:hover {
    transform: translateY(-5px);
}

.poetry-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.poetry-content {
    padding: 1em;
}

.poetry-content h3 {
    color: #333;
    margin-bottom: 0.5em;
}

.poetry-content p {
    color: #666;
    line-height: 1.6;
}

/* 底部 */
footer {
    text-align: center;
    padding: 2em;
    color: #666;
    background: #fff;
}

/* 响应式适配 */
@media (max-width: 768px) {
    .banner h1 {
        font-size: 2em;
    }
    
    .main-nav ul {
        flex-direction: column;
        align-items: center;
        gap: 1em;
    }
    
    .search-box {
        position: static;
        margin-top: 1em;
        text-align: center;
    }
    
    .filter-section {
        margin: 1em;
    }
}

/* 详情页样式 */
.detail-container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
}

.poetry-info {
    background: #fff;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.poetry-header {
    text-align: center;
    margin-bottom: 30px;
}

.poetry-header h2 {
    font-size: 2em;
    margin-bottom: 10px;
}

.author-info {
    color: #666;
}

.author-info span {
    margin: 0 10px;
}

.original-text {
    text-align: center;
    font-size: 1.5em;
    line-height: 2;
    margin: 30px 0;
}

.annotation-toggles {
    text-align: center;
    margin: 20px 0;
}

.toggle-btn {
    background: #f5f5f5;
    border: 1px solid #ddd;
    padding: 8px 15px;
    margin: 0 10px;
    border-radius: 4px;
    cursor: pointer;
}

.toggle-btn:hover {
    background: #e9e9e9;
}

.appreciation-section,
.background-section {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.appreciation-section h3,
.background-section h3 {
    color: #333;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.collapsible {
    line-height: 1.8;
    color: #444;
}

.related-section {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.related-poems {
    display: flex;
    overflow-x: auto;
    gap: 20px;
    padding: 10px 0;
}

.poetry-card.mini {
    min-width: 200px;
    margin: 0;
}

.poetry-card.mini img {
    height: 120px;
}

.poetry-card.mini .poetry-content {
    padding: 10px;
}

.poetry-card.mini h4 {
    font-size: 1em;
    margin: 0;
}