/* 页面主体样式 */
.couplets-page {
    background: linear-gradient(135deg, #fff1f1 0%, #fff8f0 100%);
    min-height: 100vh;
}

/* 页面标题样式 */
.page-header {
    text-align: center;
    padding: 2rem 0;
    margin-bottom: 2rem;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.page-title {
    color: var(--primary-red);
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: bold;
}

.page-subtitle {
    color: #666;
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}

/* 内容部分样式 */
.content-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 2rem;
    margin: 2rem auto;
    max-width: 1200px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.content-section h2 {
    color: var(--primary-red);
    font-size: 1.8rem;
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
}

.content-section h2::after {
    content: "";
    display: block;
    width: 60px;
    height: 3px;
    background: linear-gradient(to right, var(--gold), var(--primary-red));
    margin: 0.8rem auto;
    border-radius: 3px;
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    padding: 1rem;
}

/* 信息卡片样式 */
.info-card {
    background: #fff;
    border: 1px solid rgba(232, 232, 232, 0.8);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

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

.info-title {
    color: var(--text-color);
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 1rem;
    text-align: center;
}

.info-desc {
    color: #666;
    line-height: 1.6;
    font-size: 0.95rem;
}

/* 春联展示区样式优化 */
#selected-couplets {
    padding: 1rem 0;
    max-width: 1400px;
    margin: 0 auto;
}

.article-subtitle {
    margin: 2rem 0 1rem;
    padding-left: 0.5rem;
    border-left: 3px solid #ff4d4d;
    font-size: 1.2rem;
}

.couplets-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem 0;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.8rem;
    grid-auto-rows: minmax(min-content, max-content);
}

.couplets-list li {
    padding: 0.6rem 0.8rem;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    transition: all 0.2s ease;
    border-left: 2px solid rgba(255, 77, 77, 0.3);
}

.couplets-list li:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-left-color: #ff4d4d;
}

.horizontal-scroll {
    color: #ff4d4d;
    font-size: 0.9rem;
    font-weight: bold;
    margin-bottom: 0.3rem;
    display: block;
    text-align: center;
}

.couplet-pair {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    font-size: 0.95rem;
    line-height: 1.4;
}

.couplet-pair strong {
    color: #ff4d4d;
    font-size: 0.85rem;
    margin-right: 0.3rem;
    display: inline-block;
    min-width: 2.5em;
}

/* 春联分类卡片样式 */
.couplets-category {
    background: #fff;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    transition: all 0.3s ease;
}

.category-header {
    background: linear-gradient(135deg, #ff4d4d 0%, #ff6b6b 100%);
    color: white;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.category-header h3 {
    margin: 0;
    font-size: 1.2rem;
}

.category-header .toggle-btn {
    width: 24px;
    height: 24px;
    position: relative;
    transition: transform 0.3s ease;
}

.category-header .toggle-btn::before,
.category-header .toggle-btn::after {
    content: '';
    position: absolute;
    background: white;
    border-radius: 2px;
}

.category-header .toggle-btn::before {
    width: 2px;
    height: 12px;
    top: 6px;
    left: 11px;
    transition: transform 0.3s ease;
}

.category-header .toggle-btn::after {
    width: 12px;
    height: 2px;
    top: 11px;
    left: 6px;
}

.category-content {
    max-height: 2000px;
    opacity: 1;
    padding: 1.5rem;
    background: white;
    transition: all 0.3s ease;
    overflow: hidden;
}

.couplets-category.collapsed .category-content {
    max-height: 0;
    opacity: 0;
    padding: 0 1.5rem;
}

.couplets-category.collapsed .toggle-btn::before {
    transform: rotate(90deg);
}

.couplets-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.couplets-list li {
    background: #fff8f8;
    border-radius: 8px;
    padding: 1rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 77, 77, 0.1);
}

.couplets-list li:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 77, 77, 0.1);
    border-color: rgba(255, 77, 77, 0.3);
}

.horizontal-scroll {
    color: #ff4d4d;
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
    text-align: center;
    display: block;
}

.couplet-pair {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.couplet-pair strong {
    color: #666;
    font-size: 0.9rem;
    display: inline-block;
    width: 3em;
}

/* 响应式布局优化 */
@media (max-width: 480px) {
    .couplets-list {
        grid-template-columns: 1fr;
        gap: 0.6rem;
    }
    
    .couplets-list li {
        margin-bottom: 0;
        padding: 0.5rem 0.6rem;
    }

    .horizontal-scroll {
        font-size: 0.85rem;
    }

    .couplet-pair {
        font-size: 0.9rem;
    }
}

@media (min-width: 481px) and (max-width: 768px) {
    .couplets-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.6rem;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .couplets-list {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.7rem;
    }
}

@media (min-width: 1025px) and (max-width: 1280px) {
    .couplets-list {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.8rem;
    }
}

@media (min-width: 1281px) {
    .couplets-list {
        grid-template-columns: repeat(5, 1fr);
        gap: 0.8rem;
    }
}

@media (max-width: 768px) {
    .couplets-list {
        grid-template-columns: 1fr;
    }
    
    .category-header {
        padding: 0.8rem 1rem;
    }
    
    .category-header h3 {
        font-size: 1.1rem;
    }
    
    .category-content {
        padding: 1rem;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .couplets-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1025px) {
    .couplets-list {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* 步骤指南样式 */
.step-guide {
    counter-reset: step;
    list-style: none;
    padding: 0;
    margin: 2rem 0;
}

.step-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.step-item::before {
    counter-increment: step;
    content: counter(step);
    min-width: 2rem;
    height: 2rem;
    background: var(--primary-red);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    font-weight: bold;
}

.step-content {
    flex: 1;
}

.step-title {
    font-weight: bold;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.step-desc {
    color: #666;
    line-height: 1.6;
}

/* 文章内容样式 */
.content-section p {
    line-height: 1.8;
    color: #333;
    font-size: 1.05rem;
    margin-bottom: 1.5rem;
    text-align: justify;
}

.content-section a {
    color: var(--primary-red);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.content-section a:hover {
    border-bottom-color: var(--primary-red);
}

/* 文章段落样式 */
.article-section {
    background: #fff;
    border-radius: 12px;
    padding: 2rem;
    margin: 1.5rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.article-section p {
    margin-bottom: 1.2rem;
    text-indent: 2em;
}

/* 文章列表样式 */
.article-list {
    list-style: none;
    padding-left: 0;
    margin: 1.5rem 0;
}

.article-list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.article-list li::before {
    content: "•";
    color: var(--primary-red);
    font-size: 1.2em;
    position: absolute;
    left: 0;
    top: -2px;
}

/* 强调文本样式 */
.highlight-text {
    background: linear-gradient(120deg, rgba(255, 223, 186, 0.4) 0%, rgba(255, 223, 186, 0.1) 100%);
    padding: 0.2em 0.4em;
    border-radius: 4px;
    font-weight: 500;
}

/* 分隔线样式 */
.content-divider {
    height: 2px;
    background: linear-gradient(to right, transparent, var(--gold), transparent);
    margin: 2rem 0;
    opacity: 0.3;
}

/* 文章小标题样式 */
.article-subtitle {
    color: var(--text-color);
    font-size: 1.3rem;
    margin: 2rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(0, 0, 0, 0.1);
}

/* 引用块样式 */
blockquote {
    border-left: 4px solid var(--gold);
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    background: rgba(255, 243, 224, 0.3);
    border-radius: 0 8px 8px 0;
    font-style: italic;
}

blockquote p {
    margin: 0;
    color: #666;
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.content-section {
    animation: fadeInUp 0.6s ease-out;
}

.info-card {
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.info-card:nth-child(2) {
    animation-delay: 0.2s;
}

.info-card:nth-child(3) {
    animation-delay: 0.4s;
}

body {
    color: #333;
}

/* 打印样式优化 */
@media print {
    .content-section {
        break-inside: avoid;
        box-shadow: none;
    }

    .info-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #000;
    }
}

/* 响应式布局 */
@media (max-width: 1200px) {
    .content-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .content-section {
        padding: 1.5rem;
        margin: 1rem;
    }
    
    .couplet-vertical {
        font-size: 1.5rem;
        min-height: 250px;
    }
    
    .couplet-horizontal {
        font-size: 1.6rem;
    }
    
    .content-section p {
        font-size: 1rem;
    }

    .article-section {
        padding: 1.5rem;
    }

    blockquote {
        margin: 1rem 0;
        padding: 0.8rem 1rem;
    }
}
