/* 古诗词页面样式 */
:root {
    --primary-color: #8b4513;
    --secondary-color: #d2b48c;
    --accent-color: #a0522d;
    --light-bg: #f9f5f0;
    --dark-bg: #3a2921;
    --text-color: #333;
    --light-text: #f9f5f0;
    --border-color: #d2b48c;
    --shadow-color: rgba(139, 69, 19, 0.2);
}

/* 整体页面样式 */
body {
    background-color: var(--light-bg);
    color: var(--text-color);
    font-family: "SimSun", "宋体", serif;
    line-height: 1.6;
}

/* 头部样式增强 */
.search-container {
    background: linear-gradient(135deg, var(--primary-color), var(--dark-bg));
    padding: 30px 0;
    margin-bottom: 30px;
    box-shadow: 0 4px 12px var(--shadow-color);
}

.search-box {
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    max-width: 800px;
    margin: 0 auto;
}

.search-box h2 {
    color: var(--primary-color);
    font-size: 24px;
    margin-top: 0;
    margin-bottom: 15px;
    text-align: center;
    font-weight: bold;
}

.search-form {
    display: flex;
    margin-bottom: 10px;
}

.search-form input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px 0 0 4px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.search-form input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(139, 69, 19, 0.2);
}

.search-form button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
}

.search-form button:hover {
    background-color: var(--accent-color);
}

.search-tips {
    text-align: center;
    font-size: 14px;
    color: #666;
}

/* 主内容区域样式 */
.main-content {
    padding: 20px 0 40px;
}

.content-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.main-column {
    flex: 1;
    min-width: 300px;
}

.sidebar {
    width: 300px;
}

/* 分类部分样式 */
.category-section {
    margin-bottom: 40px;
}

.category-section h3 {
    color: var(--primary-color);
    font-size: 22px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}

.category-item {
    background-color: white;
    border-radius: 8px;
    padding: 15px;
    text-decoration: none;
    color: var(--text-color);
    box-shadow: 0 3px 10px var(--shadow-color);
    transition: all 0.3s ease;
    border-left: 4px solid var(--primary-color);
}

.category-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px var(--shadow-color);
}

.category-item h4 {
    color: var(--primary-color);
    margin: 0 0 8px 0;
    font-size: 18px;
}

.category-item p {
    margin: 0;
    font-size: 14px;
    color: #666;
}

/* 热门诗人和诗词样式 */
.popular-section {
    margin-bottom: 40px;
}

.popular-section h3 {
    color: var(--primary-color);
    font-size: 22px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.popular-items {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.popular-items a {
    background-color: white;
    color: var(--primary-color);
    padding: 8px 15px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 15px;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.popular-items a:hover {
    background-color: var(--primary-color);
    color: white;
}

/* 介绍部分样式 */
.intro-section {
    background-color: white;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 40px;
    box-shadow: 0 3px 10px var(--shadow-color);
    border-top: 4px solid var(--primary-color);
}

.intro-section h2 {
    color: var(--primary-color);
    margin-top: 0;
    font-size: 24px;
    margin-bottom: 15px;
}

.intro-section p {
    margin-bottom: 15px;
    line-height: 1.8;
}

.intro-section p:last-child {
    margin-bottom: 0;
}

/* 侧边栏样式 */
.featured-content {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 3px 10px var(--shadow-color);
}

.featured-content h3 {
    color: var(--primary-color);
    font-size: 20px;
    margin-top: 0;
    margin-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
}

.featured-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.featured-item {
    text-decoration: none;
    color: var(--text-color);
    padding: 10px;
    border-radius: 6px;
    transition: all 0.3s ease;
    background-color: var(--light-bg);
}

.featured-item:hover {
    background-color: var(--secondary-color);
    transform: translateX(5px);
}

.featured-item h4 {
    color: var(--primary-color);
    margin: 0 0 5px 0;
    font-size: 16px;
}

.featured-item p {
    margin: 0;
    font-size: 14px;
    color: #666;
}

.learning-tools {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 3px 10px var(--shadow-color);
}

.learning-tools h3 {
    color: var(--primary-color);
    font-size: 20px;
    margin-top: 0;
    margin-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
}

.learning-tools ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.learning-tools li {
    margin-bottom: 10px;
}

.learning-tools li:last-child {
    margin-bottom: 0;
}

.learning-tools a {
    display: block;
    text-decoration: none;
    color: var(--text-color);
    padding: 8px 10px;
    border-radius: 4px;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.learning-tools a:hover {
    background-color: var(--light-bg);
    border-left-color: var(--primary-color);
    color: var(--primary-color);
}

/* 每日推荐诗词 */
.daily-poem {
    background: linear-gradient(135deg, var(--primary-color), var(--dark-bg));
    color: var(--light-text);
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px var(--shadow-color);
    position: relative;
    overflow: hidden;
}

.daily-poem::before {
    content: """;
    position: absolute;
    top: -20px;
    right: 10px;
    font-size: 120px;
    color: white;
    opacity: 0.1;
    font-family: serif;
}

.daily-poem h3 {
    margin-top: 0;
    font-size: 20px;
    margin-bottom: 5px;
    color: var(--light-text);
}

.daily-poem-title {
    font-size: 24px;
    margin-bottom: 5px;
    font-weight: bold;
}

.daily-poem-author {
    font-size: 16px;
    margin-bottom: 15px;
    opacity: 0.8;
}

.daily-poem-content {
    font-size: 18px;
    line-height: 1.8;
    margin-bottom: 15px;
    text-align: center;
}

.daily-poem-link {
    display: inline-block;
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.daily-poem-link:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

/* 诗词朝代标签 */
.dynasty-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
}

.dynasty-tag {
    background-color: var(--secondary-color);
    color: var(--dark-bg);
    padding: 6px 12px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
}

.dynasty-tag:hover {
    background-color: var(--primary-color);
    color: white;
}

/* 诗词列表样式 */
.poem-list {
    margin-bottom: 40px;
}

.poem-item {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 3px 10px var(--shadow-color);
    transition: all 0.3s ease;
}

.poem-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px var(--shadow-color);
}

.poem-item h4 {
    color: var(--primary-color);
    margin: 0 0 5px 0;
    font-size: 20px;
}

.poem-item .author {
    color: #666;
    margin-bottom: 10px;
    font-size: 14px;
}

.poem-item .content {
    margin-bottom: 15px;
    line-height: 1.8;
}

.poem-item .view-link {
    display: inline-block;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 14px;
}

.poem-item .view-link:hover {
    text-decoration: underline;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .content-layout {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
    }
    
    .category-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.animated {
    animation: fadeIn 0.8s ease-out forwards;
}

/* 古风装饰元素 */
.decorative-border {
    position: relative;
}

.decorative-border::before,
.decorative-border::after {
    content: "";
    position: absolute;
    width: 30px;
    height: 30px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22%238b4513%22%3E%3Cpath d=%22M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z%22/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    opacity: 0.2;
}

.decorative-border::before {
    top: -5px;
    left: -5px;
}

.decorative-border::after {
    bottom: -5px;
    right: -5px;
    transform: rotate(180deg);
}

/* 诗词格律标记 */
.rhythm-mark {
    font-size: 12px;
    color: #999;
    position: relative;
    top: -0.5em;
}

/* 诗词朗读按钮 */
.read-aloud-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
}

.read-aloud-btn:hover {
    background-color: var(--accent-color);
}

.read-aloud-btn i {
    font-size: 16px;
}