/*
 *  对联大全样式文件
 * ============================================================================
 * 版权所有 (C)  西安尊云信息科技有限公司，并保留所有权利。
 * 网站地址:   http://www.zunyunkeji.com
 * ----------------------------------------------------------------------------
 * 许可声明：未经许可不得将本软件的整体或任何部分用于商业用途及再发布。
 * ============================================================================
 * Author: 缘境 (yvsm@zunyunkeji.com) QQ:316430983 微信：yvsm316
 */

/* 对联列表样式 */
.couplet-list-container {
    background-color: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border: 2px solid #D2691E;
    margin-bottom: 30px;
}

.couplet-category-filter {
    margin-bottom: 20px;
    padding: 12px 15px;
    background-color: #f5f0e1;
    border-radius: 8px;
}

.couplet-category-filter h3 {
    font-size: 1.2em;
    color: #8B4513;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.couplet-category-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.couplet-category-parent {
    border-bottom: 1px solid #D2691E;
    padding-bottom: 6px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.couplet-category-parent:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.couplet-category-parent-title {
    font-size: 0.95em;
    color: #8B4513;
    font-weight: bold;
    margin-right: 8px;
    white-space: nowrap;
    flex-shrink: 0;
}

.couplet-category-list {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    align-items: center;
    flex: 1;
}

.couplet-category-item {
    padding: 4px 10px;
    background-color: transparent;
    border: 1px solid #D2691E;
    border-radius: 4px;
    text-decoration: none;
    color: #8B4513;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 0.9em;
}

.couplet-category-item:hover,
.couplet-category-item.active {
    background-color: #D2691E;
    color: white;
}

.couplet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* 对联卡片样式 - 中国对联风格 */
.couplet-card {
    background: linear-gradient(135deg, #c41e3a, #8b0000);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(196, 30, 58, 0.3);
    border: 3px solid #ffd700;
    position: relative;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.couplet-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(255, 215, 0, 0.1) 2px, rgba(255, 215, 0, 0.1) 4px),
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(255, 215, 0, 0.1) 2px, rgba(255, 215, 0, 0.1) 4px);
    border-radius: 8px;
    pointer-events: none;
}

.couplet-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(196, 30, 58, 0.5);
    border-color: #ffed4e;
}

.couplet-card a {
    color: #ffd700;
    text-decoration: none;
    font-size: 1.3em;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    z-index: 1;
    position: relative;
    display: block;
    width: 100%;
}

.couplet-card a:hover {
    color: #ffed4e;
}

/* 对联详情页样式 */
.couplet-detail {
    background-color: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border: 2px solid #D2691E;
    margin-bottom: 30px;
}

.couplet-detail-header {
    text-align: center;
    margin-bottom: 40px;
}

.couplet-detail-header h2 {
    font-size: 3em;
    color: #8B4513;
    margin-bottom: 15px;
}

.couplet-detail-info {
    text-align: center;
    margin-bottom: 30px;
    padding: 15px;
    background-color: #f5f0e1;
    border-radius: 8px;
}

/* 对联展示区域 - 中国对联风格 */
.couplet-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    margin-bottom: 40px;
}

/* 横批 */
.couplet-horizontal {
    background: linear-gradient(135deg, #c41e3a, #8b0000);
    color: #ffd700;
    padding: 15px 40px;
    border-radius: 8px;
    font-size: 2em;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    box-shadow: 0 4px 15px rgba(196, 30, 58, 0.3);
    border: 3px solid #ffd700;
    position: relative;
    min-width: 300px;
    text-align: center;
    font-family: "KaiTi", "楷体", "STKaiti", serif;
}

.couplet-horizontal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(255, 215, 0, 0.1) 2px, rgba(255, 215, 0, 0.1) 4px);
    border-radius: 8px;
    pointer-events: none;
}

/* 上下联容器 */
.couplet-vertical-container {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    justify-content: center;
    flex-wrap: wrap;
}

/* 上联和下联 */
.couplet-vertical {
    background: linear-gradient(135deg, #c41e3a, #8b0000);
    color: #ffd700;
    padding: 30px 20px;
    border-radius: 8px;
    font-size: 1.8em;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    box-shadow: 0 4px 15px rgba(196, 30, 58, 0.3);
    border: 3px solid #ffd700;
    position: relative;
    writing-mode: vertical-rl;
    text-orientation: upright;
    min-height: 300px;
    min-width: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.8;
    font-family: "KaiTi", "楷体", "STKaiti", serif;
}

.couplet-vertical::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(255, 215, 0, 0.1) 2px, rgba(255, 215, 0, 0.1) 4px);
    border-radius: 8px;
    pointer-events: none;
}

.couplet-vertical.left {
    order: 1;
}

.couplet-vertical.right {
    order: 3;
}

/* 寓意区域 */
.couplet-meaning {
    order: 2;
    flex: 1;
    max-width: 400px;
    background-color: #f5f0e1;
    padding: 30px;
    border-radius: 8px;
    border: 2px solid #D2691E;
    text-align: justify;
    line-height: 2;
    font-size: 1.1em;
    color: #333;
}

.couplet-meaning h3 {
    color: #8B4513;
    font-size: 1.5em;
    margin-bottom: 15px;
    text-align: center;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .couplet-vertical-container {
        flex-direction: column;
        gap: 20px;
    }
    
    .couplet-vertical {
        writing-mode: horizontal-tb;
        text-orientation: mixed;
        min-height: auto;
        width: 100%;
    }
    
    .couplet-meaning {
        order: 3;
        max-width: 100%;
    }
    
    .couplet-horizontal {
        min-width: auto;
        width: 100%;
    }
}
