:root {
    /* 高级深紫渐变主题 */
    --primary-bg: linear-gradient(180deg, #30104d 0%, #7b1fa2 50%, #9c27b0 100%);
    --soft-white: rgba(255, 255, 255, 0.15); /* 磨砂玻璃感更强 */
    --text-color: #f1f1f1;
    --accent-color: #e1bee7; /* 浅紫色强调色 */
    --nav-bg: rgba(255, 255, 255, 0.1);
}

/* 深夜模式更暗黑系 */
[data-theme="dark"] {
    --primary-bg: linear-gradient(180deg, #1a062d 0%, #2e0d45 100%);
    --soft-white: rgba(20, 20, 20, 0.6);
    --text-color: #d1d1d1;
    --accent-color: #9575cd;
    --nav-bg: rgba(0, 0, 0, 0.4);
}

/* 核心修复：确保文字和背景分离 */
section {
    background: var(--soft-white);
    backdrop-filter: blur(15px); /* 增加毛玻璃效果 */
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-color);
}

/* 让爱心特效更明显 */
#canvas {
    mix-blend-mode: screen; /* 让爱心有发光感 */
}

body, html {
    margin: 0; padding: 0; height: 100%;
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
    overflow: hidden; /* 防止页面滚动，内容在 main 里滚动 */
    background: var(--primary-bg) fixed !important;
    transition: background 0.5s ease;
}

#canvas { position: fixed; top: 0; left: 0; z-index: 0; pointer-events: none; }

/* 导航栏修复：居中定位 */
nav {
    position: fixed; left: 20px; top: 50%;
    transform: translateY(-50%); z-index: 100;
    background: var(--nav-bg); backdrop-filter: blur(10px);
    padding: 15px; border-radius: 30px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    display: flex; flex-direction: column; gap: 20px;
}

.nav-item {
    font-size: 24px; cursor: pointer;
    transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.nav-item:hover { transform: scale(1.4) rotate(10deg); }

/* 主容器布局修复 */
main {
    position: relative; z-index: 5; 
    height: 100vh; width: 100vw;
    display: flex; justify-content: center; align-items: center;
}

/* 核心卡片样式 */
section {
    background: var(--soft-white); 
    padding: 30px; border-radius: 20px; 
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    width: 85%; max-width: 450px; 
    max-height: 80vh; overflow-y: auto; /* 内容多了可以内滚 */
    text-align: center;
    display: none; /* 必须默认隐藏 */
    animation: fadeIn 0.5s ease;
    color: var(--text-color);
}

section.active { display: block; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

h2 { color: var(--accent-color); margin-top: 0; }



/* 欢迎的过度动画,进场遮罩 */
#enter-overlay {
    position: fixed;
    inset: 0;
    /* 使用你定义的深紫渐变，但加重暗色比例，营造神秘感 */
    background: radial-gradient(circle at center, #30104d 0%, #1a062d 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999; /* 确保在最顶层 */
    transition: all 1.2s cubic-bezier(0.645, 0.045, 0.355, 1); /* 平滑消失 */
}

/* 遮罩消失时的状态：模糊+放大+透明 */
#enter-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    filter: blur(20px);
    transform: scale(1.1);
}

.enter-content {
    text-align: center;
    color: white;
}

/* 进场爱心：带有跳动感 */
.enter-heart {
    font-size: 50px;
    margin-bottom: 20px;
    animation: heartBeat 1.5s infinite;
    filter: drop-shadow(0 0 15px rgba(225, 190, 231, 0.8));
}

.enter-text {
    font-size: 28px;
    letter-spacing: 5px;
    font-weight: 300;
    /* 渐变文字 */
    background: linear-gradient(to right, #fff, var(--accent-color), #fff);
    -webkit-background-clip: text;
    color: transparent;
    background-size: 200% auto;
    animation: shine 3s linear infinite;
}

.enter-subtext {
    font-size: 14px;
    margin-top: 15px;
    color: rgba(255,255,255,0.5);
    letter-spacing: 2px;
}

/* 进度条：增加仪式感 */
.enter-progress {
    width: 200px;
    height: 2px;
    background: rgba(255,255,255,0.1);
    margin: 30px auto 0;
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar {
    width: 0%;
    height: 100%;
    background: var(--accent-color);
    box-shadow: 0 0 10px var(--accent-color);
    animation: loadProgress 0.8s ease-in-out forwards;
}

/* 关键帧动画 */
@keyframes heartBeat {
    0% { transform: scale(1); }
    14% { transform: scale(1.1); }
    28% { transform: scale(1); }
    42% { transform: scale(1.1); }
    70% { transform: scale(1); }
}

@keyframes shine {
    to { background-position: 200% center; }
}

@keyframes loadProgress {
    0% { width: 0%; }
    100% { width: 100%; }
}

main {
    opacity: 0;
    transform: scale(0.95);
    filter: blur(10px);
}

@keyframes mainEnter {
    to {
        opacity: 1;
        transform: scale(1);
        filter: blur(0);
    }
}



/* 相册专属样式 */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 保持每行两张 */
    gap: 20px; /* 稍微加大间距，给文字留出空间 */
    margin-top: 15px;
}

/* 相册卡片容器：包裹图片和文字 */
.photo-card {
    background: rgba(255, 255, 255, 0.05); 
    padding: 10px;
    border-radius: 15px;
    transition: 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.photo-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* 图片框样式 */
.photo-item {
    aspect-ratio: 1; 
    overflow: hidden; 
    border-radius: 10px;
    cursor: zoom-in; 
    border: 2px solid #fff; 
}

.photo-item img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
}

/* 文字描述样式 */
.photo-desc {
    margin-top: 10px;
    margin-bottom: 5px;
    font-size: 13px;
    color: var(--accent-color); /* 自动匹配你的紫色/粉色主题 */
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
/* 放大遮罩 */
/* 放大遮罩升级：增加毛玻璃感 */
#photo-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px); /* 背景轻微模糊 */
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.overlay-content {
    text-align: center;
    width: 90%;
    max-width: 600px;
}

#zoomed-img {
    max-width: 100%;
    max-height: 60vh; /* 给文字留出空间 */
    border-radius: 15px;
    box-shadow: 0 0 30px rgba(225, 190, 231, 0.3); /* 淡淡的紫色光晕 */
    margin-bottom: 25px;
}

/* 回忆文字样式 */
#memory-text-container {
    min-height: 100px;
}

.memory-line {
    color: #f1f1f1;
    font-size: 1.2rem;
    margin: 10px 0;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    letter-spacing: 2px;
    opacity: 0; /* 初始透明 */
    animation: slideUpFade 1s forwards; /* 调用动画 */
}

/* 逐句浮现动画：淡入并向上移动 10px */
@keyframes slideUpFade {
    0% {
        opacity: 0;
        transform: translateY(15px);
        filter: blur(5px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

/* 其他组件 */
/* 修改你原来的 .gift-box 动画 */
.gift-box {
    font-size: 80px;
    cursor: pointer;
    display: inline-block;
    filter: drop-shadow(0 0 10px rgba(255, 190, 231, 0.5));
    transition: all 0.3s ease;
}

.gift-box:hover {
    transform: scale(1.1);
    filter: drop-shadow(0 0 25px #ff80a0); /* 悬浮时发光 */
}

@keyframes floating {
    0%, 100% { transform: translateY(0) rotate(0); }
    50% { transform: translateY(-15px) rotate(5deg); }
}

/* 抽奖时的剧烈晃动 */
@keyframes shake {
    10%, 90% { transform: translate3d(-2px, 0, 0); }
    20%, 80% { transform: translate3d(4px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-6px, 0, 0); }
    40%, 60% { transform: translate3d(6px, 0, 0); }
}

/* 修改 SweetAlert 内部样式 */
/* 弹窗内容的淡入微动画 */
.swal2-html-container {
    overflow: hidden !important;
}

/* 如果你用了 SweetAlert2，这会让整体更协调 */
.swal2-popup {
    border-radius: 20px !important;
    padding: 1.5em !important;
}

.tag-cloud span {
    display: inline-block; background: var(--accent-color);
    color: white; padding: 6px 12px; border-radius: 15px;
    margin: 4px; font-size: 13px;
}

/* 旋转动画 */
@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.rotating {
    animation: rotate 3s linear infinite;
}

/* 确保图标在旋转时不会偏移 */
#music-btn {
    display: inline-block;
    transform-origin: center;
}



/* ===== LULU 看板娘 ===== */
#lulu-waifu {
    position: fixed;
    right: 20px;
    bottom: 10px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* 标签 */
.lulu-tag {
    background: linear-gradient(135deg, #ffafbd, #ffc3a0);
    color: white;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 20px;
    margin-bottom: 5px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    font-weight: bold;
    letter-spacing: 1px;
}

/* 水豚 */
#lulu {
    width: 110px;
    cursor: pointer;
    transition: 0.3s;
}

#lulu:hover {
    transform: scale(1.1) rotate(-3deg);
}

/* 气泡 */
#lulu-bubble {
    background: rgba(48,16,77,0.85);
    color: #e1bee7;
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 12px;
    margin-bottom: 6px;
    display: none;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
    max-width: 150px;
    text-align: center;
}



/* 流星特效 */
.star {
    position: fixed;
    top: 0;
    left: 0;
    width: 10px;
    height: 10px;
    background: #fff;
    border-radius: 50%;
    opacity: 0;
    z-index: 2; /* 位于背景之上，内容之下 */
    pointer-events: none;
}

@keyframes shootingStar {
    0% { transform: translateX(0) translateY(0) rotate(-45deg) scale(0); opacity: 0; }
    10% { opacity: 1; transform: scale(1); } 
    /* 最后的 scale(0.5) 改大一点，尾巴不会太小 */
    100% { transform: translateX(500px) translateY(500px) rotate(-45deg) scale(0.8); opacity: 0; }
}

/* 鼠标气泡特效 */
.click-bubble {
    position: fixed;
    pointer-events: none;
    color: #ff80a0;
    font-weight: bold;
    font-size: 18px;
    z-index: 9999;
    animation: bubbleUp 1s ease-out forwards;
}

@keyframes bubbleUp {
    0% { transform: translate(-50%, -50%) scale(0.5); opacity: 1; }
    100% { transform: translate(-50%, -150%) scale(1.5); opacity: 0; }
}


/* 打字机光标效果 */
#typewriter-title {
    min-height: 1.5em;
    display: inline-block;
    /* 设置一个亮眼的粉紫色光标 */
    border-right: 3px solid #ff80a0; 
    padding-right: 8px;
    margin-bottom: 10px;
    animation: blinkCursor 0.8s step-end infinite, cursorColor 2s infinite;
}

/* 光标闪烁 */
@keyframes blinkCursor {
    from, to { border-color: transparent; }
    50% { border-color: #ff80a0; }
}

/* 光标颜色微调，产生“心情跳动”感 */
@keyframes cursorColor {
    0% { border-color: #ff80a0; }
    50% { border-color: var(--accent-color); }
    100% { border-color: #ff80a0; }
}

/* 一言容器精致排版 */
.hitokoto-container {
    margin-top: 25px;
    padding: 20px;
    position: relative;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
}

.quote-mark {
    font-family: "Georgia", serif;
    font-size: 30px;
    color: var(--accent-color);
    opacity: 0.5;
    line-height: 0;
}

#hitokoto-text {
    font-size: 1.05rem;
    line-height: 1.8;
    margin: 10px 0;
    font-style: italic;
    letter-spacing: 1px;
}

#hitokoto-author {
    font-size: 0.85rem;
    text-align: right;
    color: var(--accent-color);
    margin-bottom: 10px;
    font-weight: 300;
}

.refresh-tip {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.3);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 8px;
    margin-top: 10px;
    letter-spacing: 2px;
}




/* 恋爱头衔栏容器 */
.love-header {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* 头像及名字包裹层 */
.avatar-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

/* 头像样式：增加呼吸感光晕 */
.avatar {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    border: 2px solid var(--accent-color); /* 使用你定义的淡紫色 */
    box-shadow: 0 0 15px rgba(225, 190, 231, 0.4);
    object-fit: cover;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.avatar:hover {
    transform: scale(1.15) rotate(5deg);
    box-shadow: 0 0 25px var(--accent-color);
}

.avatar-wrapper span {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
    letter-spacing: 1px;
}

/* 中间爱心的跳动动画 */
.heart-icon {
    font-size: 26px;
    color: #ff4d4d;
    filter: drop-shadow(0 0 10px rgba(255, 77, 77, 0.6));
    animation: heartBeat 1.2s infinite;
}

@keyframes heartBeat {
    0% { transform: scale(1); }
    14% { transform: scale(1.3); }
    28% { transform: scale(1); }
    42% { transform: scale(1.3); }
    70% { transform: scale(1); }
}


/* 每日新闻板块专属样式 */
#daily-news .news-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.news-image-wrapper {
    width: 100%;
    max-height: 50vh; /* 限制高度，防止图片过长导致弹窗撑爆 */
    overflow-y: auto; /* 如果图片很长，可以在卡片内滚动查看 */
    border: 2px solid var(--accent-color);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    scrollbar-width: thin; /* 瘦滚动条 */
}

/* 适配移动端的滚动条样式 */
.news-image-wrapper::-webkit-scrollbar {
    width: 5px;
}
.news-image-wrapper::-webkit-scrollbar-thumb {
    background: var(--accent-color);
    border-radius: 10px;
}
#news-tip {
    padding: 10px 20px;
    background: rgba(225, 190, 231, 0.1); /* 淡淡的紫色背景 */
    border-left: 3px solid var(--accent-color); /* 左侧装饰线条 */
    border-radius: 4px;
    max-width: 90%;
    display: inline-block;
    animation: fadeIn 1s ease; /* 复用你已有的淡入动画 */
}

/* 装饰一下引号，更有氛围感 */
#news-tip::before { content: "“"; font-size: 20px; vertical-align: sub; }
#news-tip::after { content: "”"; font-size: 20px; vertical-align: sub; }


/* ===== 手机端专项适配：抽屉式隐藏导航 ===== */
/* ========================================================= */
/* 📱 移动端终极完美适配 (屏幕宽度 < 768px) - 全局重构版 */
/* ========================================================= */
@media screen and (max-width: 768px) {
    
    /* --- 1. 视口重置：锁死横向，防止任何元素溢出屏幕 --- */
    html, body {
        width: 100% !important;
        height: 100% !important;
        overflow-x: hidden !important; /* 绝对禁止左右滑动 */
    }

    /* --- 2. 导航栏：改为高级悬浮舱 (HUD) 模式 --- */
    nav {
        position: fixed !important;
        left: 0 !important;
        top: 50% !important;
        transform: translateY(-50%) !important; /* 垂直居中 */
        width: 45px !important; /* 极窄，不占内容空间 */
        height: auto !important;
        padding: 20px 0 !important;
        background: rgba(26, 6, 45, 0.3) !important; /* 高透明度 */
        backdrop-filter: blur(8px) !important; /* 苹果风格毛玻璃效果，字透过去也不乱 */
        border-radius: 0 20px 20px 0 !important;
        z-index: 2000 !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 25px !important;
        border-right: 1px solid rgba(255,255,255,0.1) !important;
    }

    .nav-item {
        font-size: 20px !important;
        margin: 0 !important;
    }

 /* --- 3. 主内容区：全屏铺开，强制垂直排列 --- */
    main {
        position: relative !important;
        width: 100% !important; /* 使用 100% 比 100vw 更稳，防止滚动条引发溢出 */
        height: 100vh !important;
        margin: 0 !important; 
        padding: 20px 15px 20px 65px !important; /* 左边留出 65px 安全区给导航栏 */
        box-sizing: border-box !important;
        overflow-y: auto !important; 
        -webkit-overflow-scrolling: touch !important;

        /* 👑 核心抢救代码：强制所有卡片从上到下垂直堆叠，绝对不准并排！ */
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important; /* 卡片整体居中 */
        gap: 20px !important; /* 卡片之间的上下间距 */
    }

    /* --- 4. 核心卡片：恢复正常宽度，禁止被挤压 --- */
    section {
        position: relative !important;
        width: 100% !important; 
        max-width: 100% !important; /* 让它自然占满 main 减去 padding 的空间 */
        height: auto !important; 
        min-height: 150px !important; /* 降低最小高度，让内容自己撑开 */
        margin: 0 !important; /* 外边距交给 main 的 gap 控制 */
        padding: 25px 20px !important;
        box-sizing: border-box !important;
        border-radius: 20px !important;
        
        /* 👑 核心抢救代码：禁止卡片被父级挤压变形 */
        flex-shrink: 0 !important; 
    }
    /* --- 5. 看板娘：老老实实呆在右上角，不挡任何字 --- */
    #lulu-waifu {
        position: fixed !important;
        top: 15px !important;
        right: 15px !important;
        bottom: auto !important;
        left: auto !important;
        transform: scale(0.6) !important; /* 缩小体型 */
        transform-origin: top right !important; /* 保证缩放不越界 */
        z-index: 3000 !important;
    }

    .lulu-tag {
        display: none !important; /* 手机端强制关掉对话框，太占位置 */
    }

    /* --- 6. 专门护航 index.html 登录框 --- */
    .login-card {
        width: 90% !important;
        max-width: 350px !important;
        margin: 0 auto !important; /* 绝对居中 */
        padding: 35px 20px !important;
        box-sizing: border-box !important;
    }
    
    .login-card input {
        width: 90% !important;
        font-size: 16px !important; /* 防 iOS 自动放大 */
    }
}










/* ======================
   🖼️ 相册左右切换按钮样式
====================== */
.overlay-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 40px;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    padding: 20px 15px;
    user-select: none; /* 防止双击选中文字 */
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 2001; /* 必须在图片之上 */
    border-radius: 10px;
}

.overlay-nav:hover {
    color: #fff;
    text-shadow: 0 0 15px var(--accent-color);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    transform: translateY(-50%) scale(1.1);
}

.overlay-prev { left: 5%; }
.overlay-next { right: 5%; }
/* ======================
   🛠️ 修复相册排版：强制换行、完美居中、杜绝左右滑动
====================== */
/* ======================
   🖼️ 时光相册：全屏沉浸式布局优化
====================== */
/* ======================
   💎 沉浸式大屏相册 + 封面文字描述
====================== */

/* 让相册容器左右顶格，打破小屏束缚 */
#album {
    background: transparent !important;
    backdrop-filter: none !important;
    border: none !important;
    padding: 20px 0 !important;
    width: 100vw !important;
    margin-left: calc(-50vw + 50%) !important;
    height: auto !important;
    overflow: visible !important;
}

.photo-grid {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: flex-start !important; /* 从左往右排，更自然 */
    gap: 4px !important; /* 极细间隙 */
    padding: 0 4px !important; /* 边缘留一点点呼吸感 */
}

/* 手机端：一排两张 */
.photo-card {
    flex: 0 0 calc(50% - 6px) !important; 
    max-width: calc(50% - 6px) !important;
    background: rgba(255, 255, 255, 0.08); /* 给文字部分一点淡淡的底色 */
    margin-bottom: 8px !important;
    display: flex;
    flex-direction: column;
    border-radius: 4px; /* 微圆角 */
    overflow: hidden;
}

/* 电脑端：一排四张 */
@media screen and (min-width: 1024px) {
    .photo-card {
        flex: 0 0 calc(25% - 8px) !important;
        max-width: calc(25% - 8px) !important;
    }
}

/* 图片区域：保持正方形 */
.photo-item {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

/* 封面文字区域：显示数组第一句话 */
.photo-info-footer {
    padding: 8px 6px;
    min-height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-desc {
    display: block !important; /* 确保文字显示 */
    font-size: 11px !important;
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
    margin: 0 !important;
    line-height: 1.2;
    /* 文字过长处理：显示两行并打断 */
    display: -webkit-box !important;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 优化放大后的箭头点击区域，防止在大屏下太难点 */
.overlay-nav {
    width: 60px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.2);
}

.overlay-nav:hover {
    background: rgba(255,255,255,0.1);
}



/* 天气 */
/* ======================
   ☀️ 专属天气板块样式
====================== */
.weather-box {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    margin-bottom: 12px;
    padding: 12px 15px;
    text-align: left;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

/* 框1：时间和定位 */
.w-box-1 {
    text-align: center;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    padding: 8px;
    letter-spacing: 1px;
}

/* 框2：文案区（显眼，带渐变发光感） */
.w-box-2 {
    font-size: 14px;
    line-height: 1.6;
    color: #fff;
    font-style: italic;
    border-left: 4px solid var(--accent-color);
    background: linear-gradient(90deg, rgba(225, 190, 231, 0.15) 0%, transparent 100%);
    text-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* 框3：实时天气结构 */
.w-box-3 {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wb3-left {
    text-align: center;
    flex: 1;
    border-right: 1px dashed rgba(255, 255, 255, 0.3);
}

.wb3-left .temp-now {
    font-size: 42px;
    font-weight: bold;
    color: #ff80a0;
    line-height: 1;
    text-shadow: 0 2px 8px rgba(255, 128, 160, 0.4);
}

.wb3-left .cond-now {
    font-size: 14px;
    margin-top: 5px;
    color: var(--text-color);
}

.wb3-right {
    flex: 1.2;
    padding-left: 20px;
    font-size: 13px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.9);
}

.wb3-right p { margin: 0; }

/* 框4：关怀逻辑区 */
.w-box-4 .care-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 10px;
    font-size: 13px;
    line-height: 1.5;
}
.w-box-4 .care-item:last-child { margin-bottom: 0; }
.care-icon { margin-right: 8px; font-size: 16px; }
.care-content strong { color: var(--accent-color); }

/* 框5：未来三天预测 */
.w-box-5 {
    display: flex;
    justify-content: space-between;
    padding: 10px;
}

.forecast-day {
    flex: 1;
    text-align: center;
    font-size: 12px;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}
.forecast-day:last-child { border-right: none; }
.forecast-day .f-date { color: rgba(255,255,255,0.7); margin-bottom: 4px; }
.forecast-day .f-icon { font-size: 20px; margin: 4px 0; }
.forecast-day .f-temp { font-weight: bold; color: var(--text-color); }

/* 自定义滚动条 - 让它消失或变得高级 */
/* 针对天气板块的滚动条“隐身”设计 */
#weather {
    max-height: 85vh; /* 避免溢出屏幕 */
    overflow-y: auto;
    scrollbar-width: thin; /* 火狐 */
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

/* 谷歌与 Safari：超窄透明轨道 */
#weather::-webkit-scrollbar {
    width: 4px;
}
#weather::-webkit-scrollbar-track {
    background: transparent;
}
#weather::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}



/* 时间感知留言板 */
.time-greeting {
    text-align: center;
    padding: 12px 15px; /* 稍微缩小上下间距 */
    margin: 10px auto;
    width: 90%;
    background: rgba(255, 255, 255, 0.12); /* 稍微加深一点透明度，让文字更清晰 */
    border-radius: 12px;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.95rem; /* 如果文字太长换行了，可以稍微调小字体 */
    line-height: 1.4;
    color: var(--accent-color);
}


/* 白噪音 */
/* --- 休息站整体布局 --- */
#meditation {
    overflow-y: auto;
    padding: 40px 20px;
    text-align: center;
}

/* 👑 滚动条同步：保持与相册一致的优雅感 */
#meditation::-webkit-scrollbar {
    width: 5px;
}
#meditation::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.meditation-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
}

/* --- 文字渐变动画 --- */
.zen-info {
    max-width: 450px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 1.2s cubic-bezier(0.215, 0.61, 0.355, 1);
}

/* 当 Section 激活时触发渐变出现 */
#meditation.active .zen-info {
    opacity: 1;
    transform: translateY(0);
}

.zen-title {
    font-size: 1.4rem;
    color: var(--accent-color);
    margin-bottom: 12px;
    font-weight: 300;
    letter-spacing: 2px;
}

.zen-desc {
    font-size: 0.95rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.7);
}

/* --- 方形播放器外壳 --- */
.iframe-wrapper {
    background: rgba(255, 255, 255, 0.05);
    padding: 12px;
    border-radius: 20px; /* 圆角增加柔和感 */
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 30px rgba(156, 39, 176, 0.15); /* 紫色流星氛围光 */
    opacity: 0;
    transition: all 1.2s ease;
    transition-delay: 0.4s; /* 比文字晚一点出现，增加层次感 */
}

#meditation.active .iframe-wrapper {
    opacity: 1;
}

.iframe-wrapper iframe {
    border-radius: 12px;
    display: block; /* 消除间隙 */
}


/* 音乐歌单布局 */
/* --- 歌单页面深度优化 --- */
.music-section {
    display: none;
    width: 100%;
    min-height: 100vh;
    padding: 100px 20px 40px !important; /* 顶部留出导航栏位置 */
    box-sizing: border-box;
}

.music-section.active {
    display: flex !important;
    justify-content: center; /* 水平居中 */
    align-items: center;     /* 垂直居中 */
}

.music-inner-container {
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* 滚动条容器美化 */
.music-scroll-container {
    width: 100%;
    max-height: 60vh; /* 限制高度，超出滚动 */
    overflow-y: auto;
    overflow-x: hidden;
    padding: 10px;
    /* 隐形滚动条适配 Firefox */
    scrollbar-width: thin;
    scrollbar-color: rgba(225, 190, 231, 0.2) transparent;
}

/* 隐形滚动条适配 Chrome/Safari */
.music-scroll-container::-webkit-scrollbar {
    width: 4px;
}
.music-scroll-container::-webkit-scrollbar-thumb {
    background: rgba(225, 190, 231, 0.3);
    border-radius: 10px;
}

.music-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}

/* 播放器卡片优化 */
.music-card {
    line-height: 0;
    border-radius: 15px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05); /* 极淡的背景 */
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    opacity: 0.9; /* 让它稍微透明一点，融入紫色背景 */
    transition: transform 0.3s ease;
}

.music-card:hover {
    transform: scale(1.02);
    opacity: 1;
}

.music-title {
    font-size: 1.2rem;
    color: var(--accent-color);
    margin: 20px 0;
    text-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

/* 修复头像区域在歌单页的间距 */
#music-playlist .love-header {
    margin-bottom: 20px;
}



/* =========================
   客厅容器
========================= */
.living-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-height: 85vh; /* 限制整体高度，防止冲出屏幕 */
}

.living-title {
    color: var(--accent-color);
    margin: 20px 0 30px;
    font-size: 1.4rem;
}

/* =========================
   网格布局
========================= */
/* 强制上下分布，如果想左右并排，把 1fr 改为 1fr 1fr */
.living-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    padding: 10px;
}

/* =========================
   卡片样式
========================= */
.living-card {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left; /* 文字靠左排版更像收藏夹 */
}

.living-card:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateX(5px); /* 悬停时向右微移，很有灵动感 */
    border-color: var(--accent-color);
}

/* 卡片内图标 */
.card-icon {
    font-size: 1.8rem;
    margin-right: 20px;
}

/* 卡片标题 */
.living-card h3 {
    margin: 0;
    font-size: 1.05rem;
    color: var(--accent-color);
}

/* 卡片描述 */
.living-card p {
    margin: 4px 0 0;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
}

/* --- 滚动条深度优化：极简、半透明、不突兀 --- */

/* 1. 针对 Chrome, Edge, Safari */
/* 这里我们将容器指向你包含内容的那个父级，通常是 section 或特定的 scroll-box */
#living-room::-webkit-scrollbar {
    width: 4px; /* 极细宽度，不会挤压你的卡片内容 */
}

#living-room::-webkit-scrollbar-thumb {
    /* 使用半透明的淡紫色，和你的背景融合 */
    background-color: rgba(225, 190, 231, 0.1); 
    border-radius: 10px;
}

/* 当鼠标移入客厅区域时，滚动条才稍微显现，增加操作感 */
#living-room:hover::-webkit-scrollbar-thumb {
    background-color: rgba(225, 190, 231, 0.3);
}

#living-room::-webkit-scrollbar-track {
    background: transparent; /* 轨道完全透明 */
}

/* 2. 针对 Firefox (兼容性处理) */
#living-room {
    scrollbar-width: thin;
    scrollbar-color: rgba(225, 190, 231, 0.2) transparent;
}
/* 核心：滚动盒子的样式 */
.living-scroll-box {
    width: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 5px; /* 给滚动条留点空隙，防止卡片抖动 */
}

/* --- 优雅的隐形滚动条 --- */
.living-scroll-box::-webkit-scrollbar {
    width: 4px;
}

.living-scroll-box::-webkit-scrollbar-thumb {
    background: rgba(225, 190, 231, 0.1); 
    border-radius: 10px;
}

.living-scroll-box:hover::-webkit-scrollbar-thumb {
    background: rgba(225, 190, 231, 0.4); /* 鼠标放上去才显现 */
}

.living-scroll-box::-webkit-scrollbar-track {
    background: transparent;
}
