/* ============================================
   七月の手紙 - 样式表
   基于 DESIGN.md 视觉规范
   ============================================ */

/* === 1. 基础重置与全局设置 === */

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

:root {
    /* 字号基准 */
    font-size: 16px;

    /* Mood 1: 静 (しずか) - 默认主题 */
    --bg-color: #F5F0E8;
    --text-primary: #3A2E26;
    --text-secondary: #7A6B5D;
    --text-secondary-rgb: 122, 107, 93;
    --accent-color: #A93A2D;
    --border-color: #D4C8B8;
    --paper-color: #F9F5ED;
    --paper-fold-color: #EDE7DB;
    --margin-line-color: #C04A5A;
    --margin-line-opacity: 0.30;
    --guideline-opacity: 0.08;

    /* 动画缓动 */
    --ease-paper: cubic-bezier(0.25, 0.1, 0.25, 1);
}

/* Mood 主题色变量 */
body[data-mood="1"] {
    --bg-color: #F5F0E8;
    --text-primary: #3A2E26;
    --text-secondary: #7A6B5D;
    --text-secondary-rgb: 122, 107, 93;
    --accent-color: #A93A2D;
    --border-color: #D4C8B8;
    --paper-color: #F9F5ED;
    --paper-fold-color: #EDE7DB;
    --margin-line-color: #C04A5A;
    --margin-line-opacity: 0.30;
    --guideline-opacity: 0.08;
}

body[data-mood="2"] {
    --bg-color: #F5EFE5;
    --text-primary: #3D2E1F;
    --text-secondary: #8B6F4E;
    --text-secondary-rgb: 139, 111, 78;
    --accent-color: #B8862F;
    --border-color: #D9C9AB;
    --paper-color: #FAF5EC;
    --paper-fold-color: #EEE5D5;
    --margin-line-color: #C04A5A;
    --margin-line-opacity: 0.30;
    --guideline-opacity: 0.08;
}

body[data-mood="3"] {
    --bg-color: #F3EBE8;
    --text-primary: #3B2E2B;
    --text-secondary: #7E6761;
    --text-secondary-rgb: 126, 103, 97;
    --accent-color: #9B6B5C;
    --border-color: #D4C3BC;
    --paper-color: #F8F1ED;
    --paper-fold-color: #EBE0DA;
    --margin-line-color: #C04A5A;
    --margin-line-opacity: 0.30;
    --guideline-opacity: 0.08;
}

body[data-mood="4"] {
    --bg-color: #2C2C2C;
    --text-primary: #E8E0D5;
    --text-secondary: #A59988;
    --text-secondary-rgb: 165, 153, 136;
    --accent-color: #8B7355;
    --border-color: #4A4540;
    --paper-color: #3A3630;
    --paper-fold-color: #302D28;
    --margin-line-color: #A8505C;
    --margin-line-opacity: 0.30;
    --guideline-opacity: 0.12;
}
    --accent-color: #A93A2D;
    --border-color: #D4C8B8;
    --paper-color: #F9F5ED;
}

body[data-mood="2"] {
    --bg-color: #F4E4D0;
    --text-primary: #5C2E1F;
    --text-secondary: #8C6850;
    --accent-color: #B8862F;
    --border-color: #D8C0A0;
    --paper-color: #F8EAD6;
}

body[data-mood="3"] {
    --bg-color: #EDE5DC;
    --text-primary: #4A4036;
    --text-secondary: #8B7E72;
    --accent-color: #9B6B5C;
    --border-color: #D0C5B8;
    --paper-color: #F3EBE2;
}

body[data-mood="4"] {
    --bg-color: #1A2238;
    --text-primary: #E8E2D5;
    --text-secondary: #A89888;
    --accent-color: #C9A961;
    --border-color: #3A4258;
    --paper-color: #242D48;
}

body {
    font-family: 'Noto Serif JP', 'Noto Serif SC', 'Songti SC', 'STSong', serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    transition: background-color 400ms ease-in-out, color 400ms ease-in-out;

    /* 纸张纹理 (极淡) */
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' /%3E%3C/filter%3E%3Crect width='100' height='100' filter='url(%23noise)' opacity='0.05' /%3E%3C/svg%3E");
}

/* === 2. 屏幕控制 === */

.screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 800ms ease-out;
}

.screen.active {
    opacity: 1;
    pointer-events: auto;
}

.container {
    width: 100%;
    max-width: 375px;
    padding: 0 24px;
    text-align: center;
}

/* 圆形扩散动画容器 */
.ripple-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 50;
    opacity: 0;
    transition: opacity 400ms ease-out;
}

.ripple-overlay.active {
    opacity: 1;
}

.ripple-overlay::before {
    content: '';
    position: absolute;
    left: var(--ripple-left, 50%);
    top: var(--ripple-top, 50%);
    width: var(--ripple-final-size, 0);
    height: var(--ripple-final-size, 0);
    border-radius: 50%;
    background-color: var(--ripple-color, var(--bg-color));
    transform: translate(-50%, -50%) scale(0);
    transition: transform 1000ms cubic-bezier(0.4, 0, 0.2, 1);
}

.ripple-overlay.expanding::before {
    transform: translate(-50%, -50%) scale(1);
}

/* === 3. 屏 1: 心情选择 === */

#screen-1 .container {
    padding-top: 18vh;
}

.mood-grid {
    display: grid;
    grid-template-columns: repeat(2, 140px);
    gap: 16px;
    justify-content: center;
    margin-bottom: 30px;
}

/* 单张心情卡片 */
.mood-card {
    width: 140px;
    height: 140px;
    background-color: var(--paper-color);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 300ms ease-out, border-color 300ms ease-out, box-shadow 300ms ease-out;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

.mood-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.mood-card.selected {
    transform: scale(1.05);
}

.mood-card:not(.selected).dimmed {
    opacity: 0.3;
}

.mood-card.long-pressing {
    transform: scale(0.95);
}

.mood-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    margin-bottom: 16px;
}

.mood-zh {
    font-size: 1.125rem; /* 18px，放大显示 */
    color: var(--text-primary);
    letter-spacing: 0.1em;
    font-weight: 500;
}

/* === 4. 屏 2: 日期输入 === */

#screen-2 {
    background-color: var(--bg-color);
}

#screen-2 .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 18vh;
    position: relative;
    z-index: 2;
}

/* 顶部标题 */
.header-text {
    margin-bottom: 70px;
}

.subtitle-en {
    font-size: 0.8125rem; /* 13px */
    color: var(--text-secondary);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 8px;
    font-weight: 400;
}

.subtitle-jp {
    font-size: 0.8125rem; /* 13px */
    color: var(--text-secondary);
    letter-spacing: 0.05em;
    font-weight: 400;
}

/* 信封图形 */
.envelope-wrapper {
    margin-bottom: 70px;
}

.envelope {
    width: 300px;
    height: 180px;
    filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.06));
    transition: transform 300ms var(--ease-paper);
}

.envelope.click-effect {
    animation: envelope-click 300ms var(--ease-paper);
}

@keyframes envelope-click {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

.envelope-body {
    fill: var(--paper-color);
    stroke: var(--text-primary);
    stroke-width: 1;
}

.envelope-flap {
    transition: transform 300ms ease;
}

.envelope-paper {
    stroke: var(--border-color);
    stroke-width: 0.5;
}

/* 蜡封 */
/* 信封内信纸（从信封中滑出） */
.envelope-letter-paper {
    transform: translateY(0) scale(0.95);
    opacity: 0;
    transition: none;
    transform-origin: center top;
}

/* 蜡封 */
.wax-seal {
    transition: opacity 600ms cubic-bezier(0.4, 0, 0.2, 1);
}

.seal-left,
.seal-right {
    transform-origin: 150px 90px;
    transition: transform 600ms cubic-bezier(0.4, 0, 0.2, 1), opacity 600ms;
}

/* 蜡封碎裂动画 */
.wax-seal.breaking {
    opacity: 0.85;
}

.wax-seal.breaking .seal-left {
    transform: rotate(-8deg) translateX(-3px);
}

.wax-seal.breaking .seal-right {
    transform: rotate(8deg) translateX(3px);
}
    100% {
        opacity: 0;
        transform: translate(25px, 65px) rotate(-60deg);
    }
}

/* 输入区域 */
.input-section {
    width: 100%;
}

.prompt-jp {
    font-size: 0.9375rem; /* 15px */
    color: var(--text-primary);
    margin-bottom: 8px;
    letter-spacing: 0.05em;
}

.prompt-zh {
    font-size: 0.75rem; /* 12px */
    color: var(--text-secondary);
    margin-bottom: 20px;
    letter-spacing: 0.03em;
}

/* 日期输入框 */
.date-input {
    width: 200px;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border-color);
    padding: 8px 0;
    font-size: 1.25rem; /* 20px */
    font-family: 'Noto Serif JP', serif;
    color: var(--text-primary);
    text-align: center;
    outline: none;
    transition: border-color 300ms ease, color 300ms ease;
}

.date-input:focus {
    border-bottom-color: var(--text-primary);
}

.date-input::placeholder {
    color: var(--border-color);
    opacity: 0.6;
}

.date-input.shake {
    animation: input-shake 300ms linear;
}

.date-input.error {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
}

@keyframes input-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    50% { transform: translateX(4px); }
    75% { transform: translateX(-4px); }
}

.question-text {
    margin-bottom: 60px;
}

.question-text .subtitle-jp {
    font-size: 0.875rem; /* 14px */
    color: var(--text-secondary);
    margin-bottom: 12px;
    letter-spacing: 0.05em;
}

.question-text .title-zh {
    font-size: 1.125rem; /* 18px */
    color: var(--text-primary);
    letter-spacing: 0.03em;
}

/* 按钮组 */
.button-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.skip-btn {
    background: transparent;
    border: none;
    font-size: 0.8125rem; /* 13px */
    color: var(--text-secondary);
    font-family: 'Noto Serif JP', serif;
    text-decoration: underline;
    cursor: pointer;
    padding: 8px 16px;
    transition: color 300ms ease;
}

.skip-btn:hover {
    color: var(--text-primary);
}

.confirm-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 0;
    padding: 12px 32px;
    font-size: 1rem; /* 16px */
    color: var(--text-primary);
    font-family: 'Noto Serif JP', serif;
    cursor: pointer;
    transition: background-color 300ms ease, color 300ms ease;
    min-width: 44px;
    min-height: 44px;
}

.confirm-btn:hover,
.confirm-btn:active {
    background-color: var(--text-primary);
    color: var(--bg-color);
}

/* === 5. 屏 3-5: 祝福过渡屏 === */

#screen-3-5 {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

#screen-3-5 .blessing-content {
    transform: translateY(20px);
    opacity: 0;
    transition: transform 500ms cubic-bezier(0.25, 0.1, 0.25, 1), opacity 500ms;
}

#screen-3-5.active .blessing-content {
    transform: translateY(0);
    opacity: 1;
}

/* 根据选择的 Mood 显示对应背景图 */
body[data-mood="1"] #screen-2,
body[data-mood="1"] #screen-3-5,
body[data-mood="1"] #screen-4 {
    background-image: url('../images/mood%201.png');
}

body[data-mood="2"] #screen-2,
body[data-mood="2"] #screen-3-5,
body[data-mood="2"] #screen-4 {
    background-image: url('../images/mood%202.png');
}

body[data-mood="3"] #screen-2,
body[data-mood="3"] #screen-3-5,
body[data-mood="3"] #screen-4 {
    background-image: url('../images/mood%203.png');
}

body[data-mood="4"] #screen-2,
body[data-mood="4"] #screen-3-5,
body[data-mood="4"] #screen-4 {
    background-image: url('../images/mood%204.png');
}

/* 屏 2 背景装饰 */
#screen-2 .mood-decoration {
    display: none;
}

body[data-mood="2"] #screen-2 .mood-warmth-glow {
    display: block;
}

body[data-mood="4"] #screen-2 .mood-night-stars {
    display: block;
}

.blessing-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
}

.blessing-text {
    display: flex;
    gap: 0.2em;
    margin-bottom: 20px;
}

.blessing-char {
    font-size: 4rem; /* 64px, 在 60-72px 范围内 */
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 0.2em;
    opacity: 0;
    transform: translateY(10px);
}

/* 逐字淡入动画 */
.blessing-char.show {
    animation: char-fade-in 600ms ease-out forwards;
}

@keyframes char-fade-in {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.blessing-subtitle {
    font-size: 0.875rem; /* 14px */
    color: var(--text-primary);
    letter-spacing: 0.3em;
    text-transform: uppercase;
    opacity: 0;
    font-family: 'Noto Serif JP', serif;
}

.blessing-subtitle.show {
    animation: subtitle-fade-in 400ms ease-out forwards;
}

@keyframes subtitle-fade-in {
    to {
        opacity: 0.8;
    }
}

/* 整体淡出动画 */
.blessing-content.fade-out {
    animation: blessing-fade-out 800ms ease-out forwards;
}

@keyframes blessing-fade-out {
    to {
        opacity: 0;
        transform: scale(0.95);
    }
}

/* === 6. 屏 4: 信件展开 === */

#screen-4 {
    padding: 0;
    align-items: flex-start;
    overflow-y: auto;
    padding-top: 60px;
    padding-bottom: 120px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.letter-paper {
    width: calc(100% - 48px);
    max-width: 327px;
    margin: 0 auto;
    background-color: var(--paper-color);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.04);
    padding: 48px 32px 48px 64px; /* 左边距增加以容纳装订线 */
    position: relative;
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 800ms ease-out, transform 800ms ease-out, background-color 400ms ease-in-out;

    /* 横线（信纸格线）- 32px间距对齐行高 */
    background-image:
        repeating-linear-gradient(
            to bottom,
            transparent 0,
            transparent 31px,
            rgba(var(--text-secondary-rgb), var(--guideline-opacity)) 31px,
            rgba(var(--text-secondary-rgb), var(--guideline-opacity)) 32px
        );
    background-position: 0 48px; /* 从顶部内边距下方开始 */
}

/* 左侧装订红线 */
.letter-paper::before {
    content: '';
    position: absolute;
    left: 48px;
    top: 0;
    bottom: 0;
    width: 1px;
    background-color: var(--margin-line-color);
    opacity: var(--margin-line-opacity);
}

/* 右上角折角 - 已移除 */

.letter-paper.show {
    opacity: 1;
    transform: scale(1);
}

/* 右上角信封图标 */
.letter-icon {
    position: absolute;
    top: 20px;
    right: 24px;
    font-size: 0.75rem; /* 12px */
    color: var(--accent-color);
}

/* 称呼 */
.letter-greeting {
    margin-bottom: 60px;
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    opacity: 0;
    transition: opacity 300ms;
}

.recipient-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    flex-shrink: 0;
}

.to-label {
    font-size: 0.9375rem; /* 15px */
    color: var(--text-secondary);
    margin-right: 4px;
}

.recipient-name {
    font-size: 1.375rem; /* 22px */
    color: var(--text-primary);
    font-weight: 500;
}

/* 正文段落 */
.letter-paragraph {
    margin-bottom: 24px;
    text-align: left;
}

.letter-paragraph p {
    font-size: 1rem; /* 16px */
    line-height: 2;
    color: var(--text-primary);
    opacity: 1;
    letter-spacing: 0.03em;
}

/* 逐字浮现动画 */
.letter-paragraph .char {
    display: inline;
    color: var(--text-primary);
    opacity: 0;
    transform: translateY(2px);
    transition: opacity 400ms cubic-bezier(0.25, 0.1, 0.25, 1),
                transform 400ms cubic-bezier(0.25, 0.1, 0.25, 1);
}

.letter-paragraph .char.reveal {
    opacity: 1;
    transform: translateY(0);
}

/* 署名 */
.letter-signature {
    margin-top: 60px;
    text-align: right;
    opacity: 0;
    transition: opacity 300ms;
}

.from-label {
    font-size: 0.9375rem; /* 15px */
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.sender-name {
    font-size: 1.375rem; /* 22px */
    color: var(--text-primary);
    font-weight: 500;
    margin-bottom: 8px;
}

.date-label {
    font-size: 0.875rem; /* 14px */
    color: var(--text-secondary);
    letter-spacing: 0.05em;
}

/* 逐段淡入动画 */
.fade-in-element {
    opacity: 0;
    transition: opacity 400ms ease-out;
}

.fade-in-element.visible {
    opacity: 1;
}

/* === 6.1 各 Mood 独有装饰元素 === */

/* 默认隐藏所有装饰元素 */
.mood-decoration {
    display: none;
}

/* ---- Mood 1 静: 留白与线 ---- */

body[data-mood="1"] .mood-calm-line,
body[data-mood="1"] .separator-calm {
    display: block;
}

/* 信纸顶部水平细线 */
.mood-calm-line {
    width: 40px;
    height: 1px;
    background-color: var(--text-primary);
    margin-bottom: 32px;
}

/* 段落分隔符 ※ */
.paragraph-separator {
    text-align: center;
    margin: 16px 0;
}

.separator-calm,
.separator-mist {
    display: none;
    font-size: 0.875rem; /* 14px */
    color: var(--text-secondary);
}

.separator-mist {
    font-size: 1rem; /* 16px */
    letter-spacing: 0.2em;
}

/* ---- Mood 2 暖: 烛光与温度 ---- */

body[data-mood="2"] .mood-warmth-glow,
body[data-mood="2"] .mood-warmth-divider,
body[data-mood="2"] .mood-warmth-candle {
    display: block;
}

/* 背景光晕 */
.mood-warmth-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(184, 134, 47, 0.03) 0%, transparent 60%);
    pointer-events: none;
    z-index: 1;
}

#screen-4 .letter-paper {
    position: relative;
    z-index: 2;
}

/* 信件底部到 From 之间的渐变线 */
.mood-warmth-divider {
    width: 100%;
    height: 2px;
    background: linear-gradient(to right, transparent 0%, var(--accent-color) 50%, transparent 100%);
    margin: 32px 0 24px 0;
}

/* 烛火图标 (右下角) */
.mood-warmth-candle {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 8px;
    height: 12px;
    color: var(--accent-color);
    opacity: 0.4;
}

/* ---- Mood 3 霞: 雾霭 ---- */

body[data-mood="3"] .mood-mist-haze,
body[data-mood="3"] .mood-mist-edge,
body[data-mood="3"] .separator-mist {
    display: block;
}

/* 信纸顶部雾晕 */
.mood-mist-haze {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    opacity: 1;
    pointer-events: none;
}

.mood-mist-haze path {
    fill: var(--text-secondary);
}

/* 信纸边缘毛边 (顶部和底部) */
.mood-mist-edge {
    position: absolute;
    top: -2px;
    left: 0;
    width: 100%;
    height: 4px;
    opacity: 0.6;
}

/* ---- Mood 4 夜: 星与影 ---- */

body[data-mood="4"] .mood-night-stars,
body[data-mood="4"] .mood-night-moon {
    display: block;
}

/* 背景星点 */
.mood-night-stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.mood-night-stars circle {
    fill: var(--accent-color);
}

/* 月亮符号 (信纸顶部右侧) */
.mood-night-moon {
    position: absolute;
    top: 20px;
    right: 48px;
    font-size: 0.75rem; /* 12px */
    color: var(--accent-color);
    opacity: 0.7;
}

/* 底部控制按钮 */
.controls {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 40px;
    z-index: 10;
}

.control-btn {
    width: 44px;
    height: 44px;
    background: var(--paper-color);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    font-size: 1.25rem; /* 20px */
    color: var(--text-secondary);
    font-family: 'Noto Serif JP', serif;
    cursor: pointer;
    transition: color 300ms ease, transform 200ms ease, background-color 300ms ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.control-btn:hover {
    transform: scale(1.1);
    background: var(--text-primary);
    color: var(--paper-color);
}

.control-btn:active {
    transform: scale(0.95);
}

/* === 7. 音乐播放器 === */

.music-player {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--paper-color);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    z-index: 100;
    transition: background-color 400ms ease-in-out, border-color 400ms ease-in-out;
}

.player-btn {
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 200ms ease, transform 200ms ease;
    font-family: 'Noto Serif JP', serif;
}

.player-btn:hover {
    color: var(--accent-color);
    transform: scale(1.1);
}

.player-btn:active {
    transform: scale(0.95);
}

.player-play-btn {
    width: 36px;
    height: 36px;
    background: var(--accent-color);
    color: var(--paper-color);
    border-radius: 50%;
    font-size: 12px;
}

.player-play-btn:hover {
    color: var(--paper-color);
    opacity: 0.9;
}

#player-prev,
#player-next {
    font-size: 18px;
}

.player-info {
    max-width: 150px;
    margin-left: 8px;
    overflow: hidden;
}

#player-title {
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    letter-spacing: 0.02em;
}

/* 响应式：小屏幕时缩小播放器 */
@media (max-width: 360px) {
    .music-player {
        bottom: 16px;
        right: 16px;
        padding: 8px 12px;
        gap: 6px;
    }

    .player-btn {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }

    .player-play-btn {
        width: 32px;
        height: 32px;
    }

    .player-info {
        max-width: 100px;
    }

    #player-title {
        font-size: 11px;
    }
}

/* === 8. 响应式调整 === */

@media (max-width: 360px) {
    .envelope {
        width: 260px;
        height: 156px;
    }

    .mood-grid {
        grid-template-columns: repeat(2, 120px);
        gap: 12px;
    }

    .mood-card {
        width: 120px;
        height: 120px;
    }

    .mood-icon {
        width: 40px;
        height: 40px;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 480px;
    }

    .letter-paper {
        max-width: 420px;
    }
}
