/* ========== 克莱因蓝 · 亮白背景版 ========== */
@import url('https://cdn.jsdelivr.net/npm/lxgw-wenkai-lite@1.6.0/style.css');

/* 全局底色改为亮白 */
.poem-page {
    background-color: #f5f6fa;  /* 暖白底，不刺眼 */
    color: #1a1a2e;
    min-height: 100vh;
    font-family: 'LXGW WenKai Lite', 'Noto Serif SC', 'Cormorant Garamond', serif;
    position: relative;
    overflow-x: hidden;
}

/* ===== 蓝色光晕改为浅浅的蓝雾 ===== */
.poem-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    z-index: 0;
    opacity: 0.15;  /* 降低透明度，更清透 */
}

.glow-1 {
    width: 500px;
    height: 500px;
    top: -100px;
    right: -100px;
    background: radial-gradient(circle, #002FA7 0%, transparent 70%);
}

.glow-2 {
    width: 400px;
    height: 400px;
    bottom: -50px;
    left: -50px;
    background: radial-gradient(circle, #0033CC 0%, transparent 70%);
}

.glow-3 {
    width: 300px;
    height: 300px;
    top: 40%;
    left: 50%;
    transform: translateX(-50%);
    background: radial-gradient(circle, rgba(0, 47, 167, 0.08) 0%, transparent 70%);
}

/* ===== 顶部导航 ===== */
.poem-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: rgba(245, 246, 250, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 47, 167, 0.15);
    padding: 0.75rem 0;
}

.poem-header-inner {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

.poem-back {
    color: #002FA7;
    text-decoration: none;
    transition: color 0.3s;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.5px;
}

.poem-back:hover {
    color: #001a5e;
    text-decoration: underline;
}

.poem-back-icon {
    margin-right: 0.3rem;
}

.poem-badge {
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #002FA7;
    background: rgba(0, 47, 167, 0.08);
    padding: 0.2rem 1rem;
    border-radius: 20px;
    border: 1px solid rgba(0, 47, 167, 0.15);
}

/* ===== 主容器 ===== */
.poem-main {
    position: relative;
    z-index: 1;
    min-height: calc(100vh - 60px);
    padding: 4rem 1.5rem 3rem;
}

.poem-container {
    max-width: 700px;
    margin: 0 auto;
}

/* ===== 作品头部 ===== */
.poem-head {
    text-align: center;
    margin-bottom: 2.5rem;
}

.poem-type-tag {
    display: inline-block;
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: #002FA7;
    border: 1px solid rgba(0, 47, 167, 0.25);
    padding: 0.2rem 1.2rem;
    border-radius: 30px;
    margin-bottom: 1.5rem;
    background: rgba(0, 47, 167, 0.05);
}

.poem-title {
    font-family: 'Noto Serif SC', 'Montserrat', serif;
    font-size: 2.8rem;
    font-weight: 700;
    color: #002FA7;  /* 克莱因蓝标题 */
    letter-spacing: 4px;
    margin-bottom: 0.5rem;
}

.poem-subtitle {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 1.1rem;
    color: #4a6fa5;  /* 柔和一些的蓝 */
    margin-bottom: 1rem;
}

.poem-meta {
    font-size: 0.85rem;
    color: #8a9bb5;  /* 灰蓝色 */
    font-family: 'Inter', sans-serif;
}

.poem-meta-divider {
    margin: 0 0.5rem;
    color: #d0d8e0;
}

/* ===== 装饰分割线 ===== */
.poem-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
}

.poem-divider-line {
    flex: 1;
    max-width: 80px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 47, 167, 0.3), transparent);
}

.poem-divider-diamond {
    color: #002FA7;
    font-size: 0.8rem;
    opacity: 0.4;
    font-family: 'Inter', sans-serif;
}

/* ===== 正文 ===== */

/* 诗歌段落（诗节） */
.poem-stanza {
    margin: 2rem 0;
    text-align: center;
    padding: 0 1rem;
}

.poem-stanza p {
    font-family: 'Noto Serif SC', 'Cormorant Garamond', serif;
    font-size: 1.2rem;
    line-height: 2.2;
    color: #1a1a2e;  /* 深蓝黑文字 */
    margin: 0;
    letter-spacing: 2px;
    transition: color 0.3s;
}

.poem-stanza p:hover {
    color: #002FA7;  /* 悬停变蓝 */
}

/* 小说散文段落 */
.poem-prose {
    margin: 1.8rem 0;
}

.poem-prose p {
    font-family: 'Noto Serif SC', 'Cormorant Garamond', serif;
    font-size: 1.15rem;
    line-height: 2;
    color: #1a1a2e;
    text-indent: 2em;
    margin-bottom: 0.8rem;
}

.poem-prose p:last-child {
    margin-bottom: 0;
}

/* 对话/特殊强调用深蓝 */
.poem-prose strong {
    color: #002FA7;
    font-weight: 600;
}

.poem-prose em {
    color: #4a6fa5;
    font-style: italic;
}

/* 引用/关键句用克莱因蓝加粗 */
.poem-prose .highlight-blue {
    color: #002FA7;
    font-weight: 600;
}

/* 结尾标记 */
.poem-ending {
    text-align: center;
    margin: 3rem 0 1rem;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.2rem;
    color: #b0c0d0;
    letter-spacing: 6px;
}

/* ===== 底部 ===== */
.poem-footer {
    text-align: center;
    margin-top: 3rem;
    padding-top: 1rem;
}

.poem-signature {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    color: #8a9bb5;
    font-size: 1rem;
    margin: 1.5rem 0 2rem;
}

.poem-back-bottom {
    display: inline-block;
    color: #002FA7;
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    padding: 0.5rem 1.5rem;
    border: 1px solid rgba(0, 47, 167, 0.25);
    border-radius: 30px;
    transition: all 0.3s;
}

.poem-back-bottom:hover {
    background: rgba(0, 47, 167, 0.08);
    border-color: #002FA7;
    color: #001a5e;
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .poem-main {
        padding: 2rem 1rem 2rem;
    }
    
    .poem-title {
        font-size: 2rem;
    }
    
    .poem-subtitle {
        font-size: 0.95rem;
    }
    
    .poem-stanza p {
        font-size: 1.05rem;
        line-height: 2;
    }
    
    .poem-prose p {
        font-size: 1rem;
        line-height: 1.9;
    }
}

@media (max-width: 480px) {
    .poem-title {
        font-size: 1.6rem;
        letter-spacing: 2px;
    }
    
    .poem-stanza p {
        font-size: 0.95rem;
        line-height: 1.9;
        letter-spacing: 1px;
    }
    
    .poem-prose p {
        font-size: 0.9rem;
        text-indent: 1.5em;
    }
    
    .poem-header-inner {
        padding: 0 1rem;
        font-size: 0.75rem;
    }
    
    .glow-1 {
        width: 200px;
        height: 200px;
    }
    
    .glow-2 {
        width: 180px;
        height: 180px;
    }
}

/* ===== 碎片漂浮背景 ===== */
.poem-fragments {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.poem-fragment {
    position: absolute;
    opacity: 0.1;  /* 先调低，确认能动后再调高 */
    animation: floatFragment 20s infinite alternate ease-in-out;
    font-family: 'Noto Serif SC', 'Inter', sans-serif;
    font-weight: 300;
    letter-spacing: 6px;
    user-select: none;
    color: rgba(0, 47, 167, 0.712);
}

@keyframes floatFragment {
    0% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(12px, -18px) rotate(2deg); }
    66% { transform: translate(-8px, 20px) rotate(-2deg); }
    100% { transform: translate(15px, -10px) rotate(3deg); }
}

/* ========== 打字机效果 ========== */

.poem-container.typewriter p {
    opacity: 0;
    transform: translateY(4px);
}

/* 前 20 行有动画 */
.poem-container.typewriter p:nth-child(-n+20) {
    animation: typewriterAppear 0.8s ease forwards;
}

/* 超过 20 行直接显示 */
.poem-container.typewriter p:nth-child(n+21) {
    opacity: 1;
    transform: none;
}

/* 逐行延迟（前 20 行） */
.poem-container.typewriter p:nth-child(1)  { animation-delay: 0.1s; }
.poem-container.typewriter p:nth-child(2)  { animation-delay: 0.3s; }
.poem-container.typewriter p:nth-child(3)  { animation-delay: 0.5s; }
.poem-container.typewriter p:nth-child(4)  { animation-delay: 0.7s; }
.poem-container.typewriter p:nth-child(5)  { animation-delay: 0.9s; }
.poem-container.typewriter p:nth-child(6)  { animation-delay: 1.1s; }
.poem-container.typewriter p:nth-child(7)  { animation-delay: 1.3s; }
.poem-container.typewriter p:nth-child(8)  { animation-delay: 1.5s; }
.poem-container.typewriter p:nth-child(9)  { animation-delay: 1.7s; }
.poem-container.typewriter p:nth-child(10) { animation-delay: 1.9s; }
.poem-container.typewriter p:nth-child(11) { animation-delay: 2.1s; }
.poem-container.typewriter p:nth-child(12) { animation-delay: 2.3s; }
.poem-container.typewriter p:nth-child(13) { animation-delay: 2.5s; }
.poem-container.typewriter p:nth-child(14) { animation-delay: 2.7s; }
.poem-container.typewriter p:nth-child(15) { animation-delay: 2.9s; }
.poem-container.typewriter p:nth-child(16) { animation-delay: 3.1s; }
.poem-container.typewriter p:nth-child(17) { animation-delay: 3.3s; }
.poem-container.typewriter p:nth-child(18) { animation-delay: 3.5s; }
.poem-container.typewriter p:nth-child(19) { animation-delay: 3.7s; }
.poem-container.typewriter p:nth-child(20) { animation-delay: 3.9s; }

@keyframes typewriterAppear {
    0% {
        opacity: 0;
        transform: translateY(4px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}