/**
 * 归云集 - 装饰元素样式
 * 包含水墨纹理、印章、回纹等中式装饰元素
 */

/* ===== 水墨纹理背景 ===== */
.ink-wash-bg {
    background-image: url("data:image/svg+xml,%3Csvg width='400' height='400' viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='inkNoise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.04' numOctaves='5' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0.18 0 0 0 0 0.18 0 0 0 0 0.18 0 0 0 0.08 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23inkNoise)'/%3E%3C/svg%3E");
    background-size: 200px 200px;
}

/* ===== 宣纸纹理 ===== */
.paper-texture {
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='paperNoise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0.95 0 0 0 0 0.93 0 0 0 0 0.9 0 0 0 0.15 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23paperNoise)'/%3E%3C/svg%3E");
    background-size: 50px 50px;
}

/* ===== 印章样式 ===== */
.seal {
    display: inline-block;
    width: auto;
    min-width: 40px;
    height: 40px;
    padding: 4px 8px;
    background: var(--cinnabar-red);
    color: var(--rice-white);
    font-family: var(--font-serif);
    font-size: 14px;
    font-weight: 700;
    border-radius: 4px;
    text-align: center;
    line-height: 1.4;
    vertical-align: middle;
    box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    position: relative;
}

.seal::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    bottom: 2px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}

.seal-large {
    width: auto;
    min-width: 60px;
    height: 60px;
    font-size: 20px;
    padding: 8px 12px;
}

.seal-small {
    width: auto;
    min-width: 30px;
    height: 30px;
    font-size: 12px;
    padding: 3px 6px;
}

/* ===== 回纹装饰 ===== */
.meander-pattern {
    position: relative;
    overflow: hidden;
}

.meander-pattern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 20px;
    background-image: url("data:image/svg+xml,%3Csvg width='40' height='20' viewBox='0 0 40 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0,10 L10,10 L10,0 L20,0 L20,10 L30,10 L30,0 L40,0' fill='none' stroke='%23d4d0c7' stroke-width='1.5'/%3E%3C/svg%3E");
    background-repeat: repeat-x;
    opacity: 0.5;
}

.meander-pattern::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 20px;
    background-image: url("data:image/svg+xml,%3Csvg width='40' height='20' viewBox='0 0 40 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0,10 L10,10 L10,20 L20,20 L20,10 L30,10 L30,20 L40,20' fill='none' stroke='%23d4d0c7' stroke-width='1.5'/%3E%3C/svg%3E");
    background-repeat: repeat-x;
    opacity: 0.5;
}

/* ===== 祥云装饰 ===== */
.cloud-pattern {
    position: relative;
}

.cloud-pattern::before {
    content: '';
    position: absolute;
    top: -30px;
    right: -30px;
    width: 150px;
    height: 75px;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 150 75' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10,65 Q25,35 50,50 Q75,30 100,50 Q125,35 140,65' fill='none' stroke='%23d4d0c7' stroke-width='2' opacity='0.4'/%3E%3Cpath d='M20,60 Q35,40 55,50 Q75,35 95,50 Q115,40 130,60' fill='none' stroke='%23d4d0c7' stroke-width='1.5' opacity='0.3'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    pointer-events: none;
}

/* ===== 竹简装饰 ===== */
.bamboo-slip {
    position: relative;
    padding: var(--spacing-lg) var(--spacing-xl);
    background: linear-gradient(90deg, 
        var(--bamboo-green) 0%, 
        var(--bamboo-light) 10%, 
        var(--bamboo-light) 90%, 
        var(--bamboo-green) 100%
    );
    border-radius: 4px;
    color: var(--rice-white);
}

.bamboo-slip::before,
.bamboo-slip::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: rgba(0, 0, 0, 0.2);
}

.bamboo-slip::before {
    top: 10px;
}

.bamboo-slip::after {
    bottom: 10px;
}

/* ===== 毛笔笔触装饰线 ===== */
.brush-stroke {
    position: relative;
    display: inline-block;
}

.brush-stroke::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg, 
        var(--cinnabar-red) 0%, 
        var(--cinnabar-red) 60%, 
        transparent 100%
    );
    border-radius: 3px;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.brush-stroke:hover::after {
    transform: scaleX(1);
}

/* ===== 朱砂红点装饰 ===== */
.cinnabar-dot {
    position: relative;
    padding-left: 20px;
}

.cinnabar-dot::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background: var(--cinnabar-red);
    border-radius: 50%;
    box-shadow: 0 0 0 2px rgba(199, 62, 58, 0.2);
}

/* ===== 墨色渐变 ===== */
.ink-gradient {
    background: linear-gradient(135deg, 
        var(--ink-black) 0%, 
        var(--ink-light) 50%, 
        var(--ink-lighter) 100%
    );
}

/* ===== 竹青渐变 ===== */
.bamboo-gradient {
    background: linear-gradient(135deg, 
        var(--bamboo-green) 0%, 
        var(--bamboo-light) 100%
    );
}

/* ===== 朱砂渐变 ===== */
.cinnabar-gradient {
    background: linear-gradient(135deg, 
        var(--cinnabar-red) 0%, 
        var(--cinnabar-light) 100%
    );
}

/* ===== 边框装饰 ===== */
.decorative-border {
    border: 2px solid var(--border-color);
    position: relative;
}

.decorative-border::before {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    right: 4px;
    bottom: 4px;
    border: 1px solid var(--border-light);
    pointer-events: none;
}

/* ===== 角落装饰 ===== */
.corner-decoration {
    position: relative;
}

.corner-decoration::before,
.corner-decoration::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid var(--cinnabar-red);
    opacity: 0.6;
}

.corner-decoration::before {
    top: 0;
    left: 0;
    border-right: none;
    border-bottom: none;
}

.corner-decoration::after {
    bottom: 0;
    right: 0;
    border-left: none;
    border-top: none;
}

/* ===== 垂直分隔线（中式风格）===== */
.divider-vertical {
    width: 2px;
    height: 100%;
    background: linear-gradient(to bottom, 
        transparent, 
        var(--border-color) 20%, 
        var(--border-color) 80%, 
        transparent
    );
}

/* ===== 水平分隔线（中式风格）===== */
.divider-horizontal {
    height: 2px;
    width: 100%;
    background: linear-gradient(to right, 
        transparent, 
        var(--border-color) 20%, 
        var(--border-color) 80%, 
        transparent
    );
    margin: var(--spacing-lg) 0;
}

/* ===== 书法笔触按钮 ===== */
.brush-btn {
    position: relative;
    padding: var(--spacing-sm) var(--spacing-lg);
    background: var(--cinnabar-red);
    color: var(--rice-white);
    border: none;
    border-radius: 4px;
    font-family: var(--font-serif);
    font-size: 1rem;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
}

.brush-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.brush-btn:hover::before {
    width: 300px;
    height: 300px;
}

.brush-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(199, 62, 58, 0.4);
}

/* ===== 卡片悬停效果（水墨晕染）===== */
.ink-hover {
    transition: all 0.4s ease;
}

.ink-hover:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    transform: translateY(-4px);
}

.ink-hover::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, 
        var(--cinnabar-red), 
        var(--bamboo-green), 
        var(--ink-black)
    );
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.ink-hover:hover::after {
    transform: scaleX(1);
}

/* ===== 引用装饰（中式）===== */
.quote-chinese {
    position: relative;
    padding: var(--spacing-lg) var(--spacing-xl);
    background: var(--bg-secondary);
    border-left: 4px solid var(--cinnabar-red);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.quote-chinese::before {
    content: '「';
    position: absolute;
    top: 0;
    left: var(--spacing-sm);
    font-family: var(--font-serif);
    font-size: 3rem;
    color: var(--cinnabar-red);
    opacity: 0.3;
    line-height: 1;
}

.quote-chinese::after {
    content: '」';
    position: absolute;
    bottom: -10px;
    right: var(--spacing-md);
    font-family: var(--font-serif);
    font-size: 3rem;
    color: var(--cinnabar-red);
    opacity: 0.3;
    line-height: 1;
}

/* ===== 竖排文字容器 ===== */
.vertical-container {
    writing-mode: vertical-rl;
    text-orientation: upright;
    letter-spacing: 0.25em;
    line-height: 2;
}

/* ===== 淡入动画 ===== */
.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== 脉冲动画（用于提醒）===== */
.pulse-gentle {
    animation: pulseGentle 2s ease-in-out infinite;
}

@keyframes pulseGentle {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* ===== 响应式调整 ===== */
@media (max-width: 768px) {
    .seal-large {
        min-width: 50px;
        height: 50px;
        font-size: 16px;
        padding: 6px 10px;
    }
    
    .corner-decoration::before,
    .corner-decoration::after {
        width: 15px;
        height: 15px;
    }
    
    .quote-chinese::before,
    .quote-chinese::after {
        font-size: 2rem;
    }
}