/* region 1. 全局样式及动画 (Global Styles & Animations) */
:root {
    --primary-color: #2c3e50;
    --bg-color: #f4f4f0;
    --accent-color: #8b0000;
}

body, html {
    margin: 0;
    padding: 0;
    font-family: "Noto Serif SC", "Songti SC", "SimSun", serif;
    background-color: var(--bg-color);
    color: var(--primary-color);
    min-height: 100vh;
}

#app {
    width: 100%;
    max-width: 480px;
    min-height: 100vh;
    margin: 0 auto;
    position: relative;
    padding: 20px;
    box-sizing: border-box;
    background-image: linear-gradient(to bottom, #ffffff, #e9e9e5);
    overflow-x: hidden;
}

.back-btn {
    display: inline-block;
    text-decoration: none;
    color: var(--primary-color);
    font-weight: bold;
    margin-bottom: 20px;
    font-size: 1rem;
}

.content-container {
    background: rgba(255, 255, 255, 0.6);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

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

/* 页面过渡动画 - 水墨渐变风格 */
@keyframes pageSlideOut {
    0%   { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-12px); }
}
@keyframes pageSlideIn {
    0%   { opacity: 0; transform: translateY(18px); }
    100% { opacity: 1; transform: translateY(0); }
}
.page-fade-out {
    animation: pageSlideOut 0.35s forwards cubic-bezier(0.4, 0, 0.2, 1);
}
.page-fade-in {
    animation: pageSlideIn 0.45s forwards cubic-bezier(0.2, 0, 0, 1);
}

/* 粒子背景容器 */
#particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.particle {
    position: absolute;
    background: rgba(139, 0, 0, 0.4);
    border-radius: 50%;
    pointer-events: none;
    animation: floatParticle linear infinite;
}

@keyframes floatParticle {
    0% { transform: translateY(-10px) rotate(0deg); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(100vh) rotate(360deg); opacity: 0; }
}
/* endregion */

/* region 2. 全局组件：背景音乐按钮 */
.bgm-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    text-align: center;
    line-height: 34px;
    font-size: 18px;
    cursor: pointer;
    z-index: 9999;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    user-select: none;
}

.bgm-btn.playing { animation: spin 4s linear infinite; }
.bgm-btn.paused { opacity: 0.5; }
@keyframes spin { 100% { transform: rotate(360deg); } }
/* endregion */

/* region 3. 首页专属样式 (#page-index) */
#page-index {
    background: radial-gradient(circle at center, #ffffff 0%, #f0f0e8 100%);
}
#page-index .header {
    text-align: center;
    margin-top: 6vh;
    margin-bottom: 3vh;
    animation: fadeInDown 1s ease;
}
#page-index h1 {
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 3.5rem;
    letter-spacing: 5px;
    margin: 0;
    position: relative;
    display: inline-block;
    color: var(--accent-color);
}
.seal {
    position: absolute;
    top: -5px;
    right: -40px;
    font-size: 0.85rem;
    color: var(--accent-color);
    border: 2px solid var(--accent-color);
    padding: 2px 4px;
    border-radius: 4px;
    letter-spacing: 1px;
    transform: rotate(-10deg);
    font-weight: bold;
    opacity: 0.8;
}

.hero {
    text-align: center;
    margin-bottom: 5vh;
    animation: fadeIn 1.5s ease;
    position: relative;
}

.hero-poem {
    font-size: 1.1rem;
    color: #555;
    line-height: 1.8;
    letter-spacing: 3px;
    font-family: "Kaiti", "STKaiti", serif;
    margin-top: 20px;
}

/* ====== 交互式非遗画卷 ====== */
.journey-scroll-wrapper {
    position: relative;
    width: 90%;
    max-width: 370px;
    height: 70px;
    margin: 25px auto 35px;
    z-index: 200;
}

.journey-scroll-container {
    width: 100%;
    position: absolute;
    left: 0;
    top: 0;
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
    animation: fadeIn 1s ease;
}

.scroll-roller {
    width: 100%;
    height: 14px;
    background: linear-gradient(to right, #3d2414, #5c3a1e, #3d2414);
    border-radius: 7px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    position: relative;
    z-index: 10;
}

.scroll-roller::before, .scroll-roller::after {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 18px;
    background: #2a1a0c;
    border-radius: 2px;
}
.scroll-roller::before { left: -4px; }
.scroll-roller::after { right: -4px; }

.scroll-body {
    width: 90%;
    margin: -3px auto;
    background: #fdfaf4;
    overflow: hidden;
    height: 52px; /* 默认折叠高度 */
    transition: height 0.8s cubic-bezier(0.19, 1, 0.22, 1);
    box-shadow: inset 0 0 15px rgba(139, 0, 0, 0.05);
    border-left: 1px solid #dcc9a3;
    border-right: 1px solid #dcc9a3;
    position: relative;
    z-index: 5;
}

.scroll-paper {
    padding: 12px 15px;
    opacity: 1;
    transition: opacity 0.4s;
    height: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    background:
        repeating-linear-gradient(rgba(0,0,0,0.02) 0px, rgba(0,0,0,0.02) 1px, transparent 1px, transparent 20px),
        #fdfaf4;
}

.scroll-header {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    position: relative;
    min-height: 20px;
}

.scroll-header {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center; /* 改为居中 */
    position: relative;
    min-height: 20px;
}

.scroll-title {
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 1.6rem;
    color: #8b0000;
    letter-spacing: 3px;
    text-shadow: 1px 1px 0 rgba(255,255,255,1);
}

.scroll-arrow {
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid #8b0000;
    transition: transform 0.5s;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
}

.scroll-content-inner {
    margin-top: 15px;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    pointer-events: none;
    text-align: left;
}

/* 展开状态 */
.journey-scroll-container.is-expanded .scroll-body {
    height: 500px; /* 展开后的高度 */
}

.journey-scroll-container.is-expanded .scroll-content-inner {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.journey-scroll-container.is-expanded .scroll-arrow {
    transform: translateY(-50%) rotate(180deg);
}



.journey-progress-shell {
    width: 100%;
    height: 8px;
    overflow: hidden;
    border-radius: 4px;
    background: #e6d8c3;
    margin-top: 10px;
}

.journey-progress-bar {
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #8b0000, #c47a3a, #d2a85c);
    transition: width 0.45s ease;
}

.journey-progress-text {
    margin: 6px 0 16px;
    color: #8b8178;
    font-size: 0.75rem;
}

.task-cards {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.task-card {
    display: flex;
    align-items: center;
    background: #fffdf9;
    border: 1px solid rgba(139, 0, 0, 0.1);
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
    transition: all 0.3s;
}

.task-card.is-done {
    background: #fff;
    border-color: rgba(139, 0, 0, 0.3);
    box-shadow: 0 4px 10px rgba(139, 0, 0, 0.05);
}

.task-num {
    width: 32px;
    height: 32px;
    background: #8b0000;
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-family: serif;
    margin-right: 12px;
    flex-shrink: 0;
    opacity: 0.4;
    transition: opacity 0.3s;
}

.task-card.is-done .task-num {
    opacity: 1;
    box-shadow: 0 2px 6px rgba(139, 0, 0, 0.3);
}

.task-text {
    text-align: left;
}

.task-title {
    font-size: 0.95rem;
    font-weight: bold;
    color: #4a2e15;
    margin-bottom: 3px;
}

.task-sub {
    font-size: 0.7rem;
    color: #7d7065;
    line-height: 1.3;
}

.journey-badge-block {
    margin-top: 20px;
    background: linear-gradient(135deg, #3d3733, #1a1614);
    border-radius: 8px;
    padding: 16px;
    text-align: left;
    color: #fdfaf4;
    transition: all 0.3s;
}

.journey-badge-block.locked {
    opacity: 0.95;
}

.badge-status-text {
    font-size: 0.7rem;
    color: #dcc9a3;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.badge-title {
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 1.8rem;
    color: #f5e6c8;
    margin-bottom: 8px;
    letter-spacing: 2px;
}

.badge-desc {
    font-size: 0.75rem;
    color: #b0a396;
    line-height: 1.5;
}

.badge-action-content {
    text-align: center;
}

.claim-badge-btn:active {
    transform: scale(0.98);
    opacity: 0.9;
}

.badge-hint {
    margin-top: 8px;
    font-size: 0.75rem;
    color: #888;
}

/* 称号揭示后的交互感 */
.journey-badge-block:not(.locked) {
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}
.journey-badge-block:not(.locked):active {
    transform: scale(0.99);
    filter: brightness(1.1);
}

/* 守护之旅完成后的“荣耀时刻”动效 */
.journey-completed .scroll-roller {
    background: linear-gradient(to right, #8b0000, #d4af37, #8b0000); /* 变为金红相间 */
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.6);
}

.journey-completed .scroll-body {
    border-color: #d4af37;
    animation: glowSuccess 2s infinite alternate;
}

@keyframes glowSuccess {
    from { box-shadow: inset 0 0 15px rgba(139, 0, 0, 0.1); }
    to { box-shadow: inset 0 0 25px rgba(212, 175, 55, 0.3), 0 0 10px rgba(212, 175, 55, 0.2); }
}

/* ====== 新版卷轴导航区域 ====== */
.nav-scrolls {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 25px;
    margin-top: 5vh;
    padding: 0 20px;
    z-index: 100;
}

.scroll-btn {
    writing-mode: vertical-rl;
    text-orientation: upright;
    background: rgba(255, 255, 255, 0.85); /* 宣纸底色 */
    border: 1px solid #d4c4b7;
    box-shadow: 2px 5px 15px rgba(0,0,0,0.15);
    padding: 25px 12px;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    transform-origin: top center;
    animation: unrollScroll 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.scroll-btn::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none;
    background: repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(0,0,0,0.02) 2px, rgba(0,0,0,0.02) 4px);
}

.scroll-1 { animation-delay: 1.0s; margin-top: 0px; }
.scroll-2 { animation-delay: 1.2s; margin-top: 35px; }
.scroll-3 { animation-delay: 1.4s; margin-top: 15px; }

@keyframes unrollScroll {
    0% { transform: scaleY(0); opacity: 0; }
    100% { transform: scaleY(1); opacity: 1; }
}

.scroll-num {
    font-family: 'Ma Shan Zheng', cursive;
    color: #8b0000;
    font-size: 1.5rem;
    margin-bottom: 15px;
    border-bottom: 1px solid #8b0000;
    padding-bottom: 10px;
    text-align: center;
}

.scroll-sub {
    font-size: 0.8rem;
    color: #777;
    letter-spacing: 3px;
    transition: color 0.3s;
}

.scroll-btn:hover, .scroll-btn:active {
    transform: translateY(-15px) scale(1.05);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 15px 30px rgba(139, 0, 0, 0.3);
    border-color: #8b0000;
}

.scroll-btn:hover .scroll-title { color: #8b0000; }
.scroll-btn:hover .scroll-sub { color: #8b0000; }

@media (max-width: 420px) {
    .journey-panel { opacity: 0; pointer-events: none; height: 0; margin: 0; padding: 0; }
}

/* 开屏水墨样式 */
#ink-intro-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: #fff;
    z-index: 10001;
    display: flex;
    justify-content: center;
    align-items: center;
}

.ink-content {
    position: relative;
    width: 200px;
    height: 200px;
    text-align: center;
}

.ink-drop {
    position: absolute;
    top: 50%; left: 50%;
    width: 20px; height: 20px;
    background: #000;
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(1);
    animation: inkSpreading 2s forwards ease-in-out;
}

@keyframes inkSpreading {
    0% { transform: translate(-50%, -50%) scale(0); opacity: 1; }
    50% { transform: translate(-50%, -50%) scale(8); opacity: 0.8; height: 300%; width: 300%; }
    100% { transform: translate(-50%, -50%) scale(0); opacity: 0; visibility: hidden; }
}

.intro-title {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 2.5rem;
    color: #8b0000;
    opacity: 0;
    animation: introTitleFade 2.2s forwards ease-in-out;
    letter-spacing: 8px;
    white-space: nowrap;
}

@keyframes introTitleFade {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
    30% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    80% { opacity: 1; transform: translate(-50%, -50%) scale(1.05); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(1.1); }
}

/* 视差元素基础偏移过渡 */
.parallax-layer {
    transition: transform 0.15s ease-out;
    will-change: transform;
}

/* 印章弹窗样式 */
.popup-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 10002;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s forwards;
}

.popup-content {
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100" opacity="0.1"><rect width="100" height="100" fill="gray"/></svg>') #fbfbf4;
    width: 85%;
    max-width: 320px;
    padding: 25px;
    border-radius: 4px;
    border: 1px solid #dcdcdc;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    position: relative;
}

.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #8b0000;
    margin-bottom: 15px;
}

.popup-header h3 {
    margin: 0;
    font-family: 'Ma Shan Zheng', cursive;
    color: #8b0000;
    font-size: 1.5rem;
}

.close-popup {
    font-size: 1.8rem;
    cursor: pointer;
    color: #888;
}

.popup-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 0.8rem;
    color: #aaa;
    border-top: 1px dashed #ccc;
    padding-top: 10px;
}
.btn-left {
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 2.2rem;
    font-weight: normal;
    color: var(--accent-color);
    margin-right: 20px;
    opacity: 0.8;
}
.btn-right {
    display: flex;
    flex-direction: column;
    text-align: left;
}
.btn-title {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 4px;
}
.btn-sub {
    font-size: 0.8rem;
    color: #888;
}
.footer {
    margin-top: auto;
    text-align: center;
    padding-top: 5vh;
    padding-bottom: 2vh;
    font-size: 0.75rem;
    color: #aaa;
    letter-spacing: 1px;
}
/* endregion */

/* region 4. 答题页专属样式 (#page-quiz) */
#page-quiz h2 {
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 2rem;
    text-align: center;
    border-bottom: 1px solid #ccc;
    padding-bottom: 10px;
    color: var(--accent-color);
}
.action-btn {
    width: 100%;
    padding: 12px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1.1rem;
    margin-top: 20px;
}
/* endregion */

/* region 5. 科普长卷页专属样式 (#page-history) */
#page-history h2 {
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 2rem;
    text-align: center;
    border-bottom: 1px solid #ccc;
    padding-bottom: 10px;
    margin-bottom: 15px;
    color: var(--accent-color);
}
.history-intro {
    font-size: 0.95rem;
    color: #555;
    text-align: justify;
    line-height: 1.6;
}
.scroll-hint {
    text-align: right;
    font-size: 0.8rem;
    color: var(--accent-color);
    margin-bottom: 5px;
    animation: slideRight 1.5s infinite;
}
@keyframes slideRight {
    0% { transform: translateX(0); opacity: 0.5; }
    50% { transform: translateX(5px); opacity: 1; }
    100% { transform: translateX(0); opacity: 0.5; }
}

.history-scroll-wrapper {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 20px;
    padding-bottom: 10px;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.history-scroll-wrapper::-webkit-scrollbar {
    display: none;
}

.module-content {
    min-width: 85%;
    scroll-snap-align: center;
    background: rgba(255,255,255,0.8);
    border-radius: 8px;
    padding: 20px;
    border: 1px solid rgba(0,0,0,0.08);
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
    animation: fadeIn 0.4s ease;
    box-sizing: border-box;
}
.module-content h3 {
    margin: 0 0 12px 0;
    color: var(--accent-color);
    font-size: 1.15rem;
    border-bottom: 1px dashed #ccc;
    padding-bottom: 6px;
}
.module-content p {
    font-size: 0.9rem;
    color: #333;
    line-height: 1.6;
    margin-bottom: 12px;
    text-align: justify;
}
.module-content ul {
    margin: 0 0 10px 0;
    padding-left: 20px;
    font-size: 0.9rem;
    color: #333;
    line-height: 1.6;
}
.module-content li {
    margin-bottom: 4px;
}
/* endregion */

/* region 6. 音乐页专属样式 (#page-music) */
#page-music h2 {
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 2rem;
    text-align: center;
    border-bottom: 1px solid #ccc;
    padding-bottom: 10px;
    color: var(--accent-color);
}
.guqin-player {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.guqin-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    width: 100%;
    margin-top: 10px;
    padding-bottom: 30px;
}
.guqin-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.7);
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    padding: 15px 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}
.guqin-logo .icon {
    font-size: 2.5rem;
    margin-bottom: 8px;
    transition: transform 0.3s ease;
}
.guqin-logo span {
    font-size: 0.95rem;
    font-weight: bold;
    color: var(--primary-color);
}
.guqin-logo:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}
.guqin-logo.playing {
    border-color: var(--accent-color);
    background: rgba(139, 0, 0, 0.05);
}
.guqin-logo.playing .icon {
    animation: breatheMusic 1.5s infinite ease-in-out;
}
.guqin-logo.playing span {
    color: var(--accent-color);
}
@keyframes breatheMusic {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}
.music-info {
    text-align: center;
    margin-bottom: 20px;
    min-height: 50px;
}
#music-status {
    font-weight: bold;
    font-size: 1.1rem;
    margin: 0 0 8px 0;
    color: var(--primary-color);
}
#music-desc {
    color: #666;
    font-size: 0.9rem;
    margin: 0;
}

/* ====== 仿真古琴互动区域 ====== */
.interactive-guqin {
    width: 100%;
    margin-bottom: 25px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0,0,0,0.4);
    background: #1a0e06;
}

.guqin-head {
    height: 30px;
    background: linear-gradient(180deg, #3d2414, #2a1a0c);
    position: relative;
    border-radius: 12px 12px 0 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.guqin-nut {
    width: 85%;
    height: 6px;
    background: linear-gradient(90deg, #f5e6c8, #dcc9a3, #f5e6c8);
    border-radius: 3px 3px 0 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.guqin-body {
    background:
        repeating-linear-gradient(90deg, transparent, transparent 3px, rgba(0,0,0,0.03) 3px, rgba(0,0,0,0.03) 5px),
        linear-gradient(180deg, #5c3a1e, #4a2e15, #3d2414, #4a2e15, #5c3a1e);
    padding: 25px 15px 30px;
    position: relative;
}

.hui-markers {
    position: absolute;
    left: 8px;
    top: 25px;
    bottom: 30px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    z-index: 2;
}

.hui {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: radial-gradient(circle, #f0e68c 30%, #daa520 70%);
    box-shadow: 0 0 4px rgba(218,165,32,0.6), inset 0 0 3px rgba(255,255,255,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.45rem;
    color: #5c3a1e;
    font-weight: bold;
}

.hui-center {
    width: 20px;
    height: 20px;
    font-size: 0.5rem;
    background: radial-gradient(circle, #fff8dc 30%, #ffd700 70%);
    box-shadow: 0 0 8px rgba(255,215,0,0.8), inset 0 0 4px rgba(255,255,255,0.5);
}

.string-board {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    padding-left: 20px;
}

.guqin-string {
    width: 90%;
    height: 2px;
    cursor: pointer;
    position: relative;
    transition: all 0.15s;
    border-radius: 1px;
}

.guqin-string::before {
    content: attr(data-name);
    position: absolute;
    right: -35px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.6rem;
    color: #dcc9a3;
    opacity: 0.7;
    font-family: 'Ma Shan Zheng', cursive;
    white-space: nowrap;
}

.guqin-string:nth-child(1) { height: 4px; background: linear-gradient(90deg, #c9b896, #e8dcc4, #c9b896); box-shadow: 0 1px 3px rgba(0,0,0,0.9); }
.guqin-string:nth-child(2) { height: 3.5px; background: linear-gradient(90deg, #c9b896, #e0d4b8, #c9b896); box-shadow: 0 1px 3px rgba(0,0,0,0.85); }
.guqin-string:nth-child(3) { height: 3px; background: linear-gradient(90deg, #d4c8a8, #e8dcc4, #d4c8a8); box-shadow: 0 1px 2px rgba(0,0,0,0.8); }
.guqin-string:nth-child(4) { height: 2.5px; background: linear-gradient(90deg, #d4c8a8, #eddfc8, #d4c8a8); box-shadow: 0 1px 2px rgba(0,0,0,0.75); }
.guqin-string:nth-child(5) { height: 2px; background: linear-gradient(90deg, #ddd0b4, #f0e4cc, #ddd0b4); box-shadow: 0 1px 2px rgba(0,0,0,0.7); }
.guqin-string:nth-child(6) { height: 1.5px; background: linear-gradient(90deg, #e0d5c1, #f5e9d0, #e0d5c1); box-shadow: 0 0 2px rgba(0,0,0,0.6); }
.guqin-string:nth-child(7) { height: 1px; background: linear-gradient(90deg, #e8dcc4, #fff5e0, #e8dcc4); box-shadow: 0 0 1px rgba(0,0,0,0.5); }

.guqin-string::after {
    content: '';
    position: absolute;
    top: -12px; bottom: -12px;
    left: 0; right: 0;
}

.guqin-string.vibrating {
    animation: vibrateString 0.7s ease-out;
    filter: brightness(1.8);
    box-shadow: 0 0 12px rgba(255,255,255,0.6), 0 0 20px rgba(255,215,0,0.3);
}

@keyframes vibrateString {
    0%  { transform: translateY(0); }
    5%  { transform: translateY(-5px); }
    15% { transform: translateY(4px); }
    25% { transform: translateY(-3px); }
    35% { transform: translateY(2.5px); }
    45% { transform: translateY(-2px); }
    55% { transform: translateY(1.5px); }
    65% { transform: translateY(-1px); }
    75% { transform: translateY(0.5px); }
    85% { transform: translateY(-0.3px); }
    100%{ transform: translateY(0); }
}

.guqin-tail {
    height: 25px;
    background: linear-gradient(180deg, #2a1a0c, #3d2414);
    border-radius: 0 0 12px 12px;
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
    padding-top: 5px;
}

.goose-foot {
    width: 8px;
    height: 12px;
    background: #f5e6c8;
    border-radius: 0 0 3px 3px;
    box-shadow: 0 2px 3px rgba(0,0,0,0.4);
}

.pluck-hint {
    color: #dcc9a3;
    font-size: 0.75rem;
    text-align: center;
    padding: 8px 0;
    background: #1a0e06;
    margin: 0;
    opacity: 0.8;
    letter-spacing: 2px;
}
/* endregion */

/* region 7. 沉浸式听音作画 Canvas 背景 */
#ink-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
    opacity: 0.85;
}

#page-music #app {
    background: transparent;
    box-shadow: none;
    z-index: 1;
}
/* endregion */

/* region 8. �߼��к���������� */
.premium-close-icon {
    position: fixed;
    top: 25px;
    right: 20px;
    width: 36px;
    height: 36px;
    border: 1.5px solid rgba(255, 255, 255, 0.4);
    background: rgba(0, 0, 0, 0.2);
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    line-height: 1;
    z-index: 100000;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    -webkit-tap-highlight-color: transparent;
}

.premium-close-icon:active {
    transform: scale(0.9) rotate(90deg);
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.8);
}

.subtle-close-hint {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
    letter-spacing: 2px;
    animation: pulseHint 2s infinite;
    font-family: 'Noto Serif SC', serif;
}

@keyframes pulseHint {
    0%, 100% { opacity: 0.4; transform: translateY(0); }
    50% { opacity: 0.7; transform: translateY(5px); }
}

#poster-img {
    cursor: default;
    pointer-events: auto;
    position: relative;
    z-index: 99999;
}
/* endregion */
