* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-color);
    color: var(--ink-heavy);
    line-height: 1.8;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.5s ease, color 0.5s ease;
}

::selection {
    background-color: var(--ink-faint);
    color: var(--ink-heavy);
}

a {
    text-decoration: none;
    color: inherit;
}

/* --- 滚动条样式 --- */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--ink-faint); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--ink-pale); }

/* --- 宣纸纹理背景 --- */
.paper-texture {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -20;
    opacity: var(--paper-texture-opacity);
    background-image:
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 60px,
            rgba(180, 170, 150, 0.03) 60px,
            rgba(180, 170, 150, 0.03) 61px
        ),
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 60px,
            rgba(180, 170, 150, 0.03) 60px,
            rgba(180, 170, 150, 0.03) 61px
        );
}

/* --- 水墨晕染背景 --- */
.bg-ink,
.bg-ink-2 {
    color: var(--bg-ink-color);
}

.bg-ink {
    position: fixed;
    top: -20%;
    right: -15%;
    width: 900px;
    height: 900px;
    opacity: var(--ink-blob-opacity);
    pointer-events: none;
    z-index: -10;
    filter: blur(40px);
    animation: ink-float 20s infinite ease-in-out;
}

.bg-ink-2 {
    position: fixed;
    bottom: -10%;
    left: -10%;
    width: 700px;
    height: 700px;
    opacity: var(--ink-blob-opacity-2);
    pointer-events: none;
    z-index: -10;
    filter: blur(50px);
    animation: ink-float 25s infinite ease-in-out reverse;
}

@keyframes ink-float {
    0%, 100% { transform: translate(0, 0) rotate(0deg) scale(1); }
    33% { transform: translate(-30px, 20px) rotate(3deg) scale(1.05); }
    66% { transform: translate(20px, -15px) rotate(-2deg) scale(0.98); }
}

/* --- 远山淡影 --- */
.bg-mountain {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40vh;
    opacity: var(--mountain-opacity);
    pointer-events: none;
    z-index: -10;
    mask-image: linear-gradient(to top, black, transparent);
    -webkit-mask-image: linear-gradient(to top, black, transparent);
}

/* --- 竖排装饰文字 --- */
.vertical-text {
    position: fixed;
    top: 50%;
    right: 32px;
    transform: translateY(-50%);
    writing-mode: vertical-rl;
    text-orientation: upright;
    font-family: var(--font-brush);
    font-size: 14px;
    letter-spacing: 0.8em;
    color: var(--ink-faint);
    opacity: 0.6;
    pointer-events: none;
    z-index: 5;
    user-select: none;
}

@media (max-width: 1024px) {
    .vertical-text { display: none; }
}
