        /* 预加载关键字体 */
        @font-face {
            font-family: 'LoveFont';
            src: url('../zit.ttf') format('truetype'); 
            font-display: block; /* 强制等待字体加载，防止闪烁 */
        }
        @font-face {
            font-family: 'ZhutiFont';
            src: url('../zhuti.ttf') format('truetype'); 
            font-display: block; /* 强制等待字体加载 */
        }

        :root { 
            --text-main: #ffffff; 
            --accent: #ff9a9e; 
            --danger: #ff6b6b; 
            --glass-bg: rgba(0, 0, 0, 0.25); 
            --glass-border: rgba(255, 255, 255, 0.15); 
            --glass-blur: 20px; 
            --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3); 
            --capsule-bg: rgba(0, 0, 0, 0.3); 
            --love-gradient: linear-gradient(135deg, #ff9a9e 0%, #fecfef 99%, #fecfef 100%); 
            --video-overlay-bg: rgba(0, 0, 0, 0.3); 
            --modal-bg: rgba(30, 30, 40, 0.85);
            --modal-text: white;
            --input-bg: rgba(0, 0, 0, 0.2);
            --input-text: #fff;
            --calendar-bg: rgba(0,0,0,0.1);
            --calendar-text: #dcd6f7;
            --calendar-hover: rgba(255,255,255,0.2);
        }

        /* 日间模式 */
        body.light-mode {
            --text-main: #4c3f6f; 
            --accent: #ff8fa3; 
            --glass-bg: rgba(255, 252, 245, 0.65); 
            --glass-border: rgba(255, 255, 255, 0.6);
            --glass-shadow: 0 10px 40px rgba(100, 80, 100, 0.05);
            --capsule-bg: rgba(255, 255, 255, 0.5);
            --video-overlay-bg: rgba(255, 245, 235, 0.15); 
            --modal-bg: rgba(255, 250, 248, 0.92);
            --modal-text: #4c3f6f;
            --input-bg: rgba(255, 255, 255, 0.7);
            --input-text: #333;
            --calendar-bg: rgba(255,255,255,0.4);
            --calendar-text: #4c3f6f;
            --calendar-hover: rgba(255,255,255,0.7);
        }

        * { box-sizing: border-box; -webkit-tap-highlight-color: transparent; scroll-behavior: smooth; }
        body { 
            font-family: 'Noto Serif SC', "华文行楷", "微软雅黑", "SimHei", sans-serif; 
            margin: 0; 
            padding: 0; 
            background-color: transparent; 
            min-height: 100vh; 
            color: var(--text-main); 
            padding-bottom: 160px; 
            overflow-x: hidden; 
            position: relative; 
            line-height: 1.65; 
            transition: color 0.3s ease; 
        }
        .noise-layer { display: none; }
        .video-bg { 
            position: fixed; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; z-index: -5; 
        }
        .video-overlay {
            position: fixed; top: 0; left: 0; width: 100%; height: 100%;
            background: var(--video-overlay-bg);
            backdrop-filter: blur(0px); z-index: -4; pointer-events: none; transition: background 0.5s ease;
        }
        body.light-mode .video-bg { filter: brightness(0.85) contrast(1.1) saturate(0.85); }
        body.light-mode .video-overlay {
            background: radial-gradient(circle at center, rgba(255, 252, 245, 0.1) 0%, rgba(220, 210, 200, 0.4) 90%);
        }
        
        .theme-toggle-btn {
            position: absolute; top: 20px; right: 20px; width: 44px; height: 44px; border-radius: 50%;
            background: var(--glass-bg); border: 1px solid var(--glass-border); backdrop-filter: blur(10px);
            display: flex; justify-content: center; align-items: center; cursor: pointer; z-index: 100;
            transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1); box-shadow: var(--glass-shadow);
        }
        .theme-toggle-btn:active { transform: scale(0.9); }
        .theme-toggle-btn svg { width: 24px; height: 24px; fill: var(--text-main); transition: transform 0.5s ease, opacity 0.3s ease; }
        .theme-toggle-btn .moon-icon { display: none; }
        .theme-toggle-btn .sun-icon { display: block; }
        body.light-mode .theme-toggle-btn .moon-icon { display: block; }
        body.light-mode .theme-toggle-btn .sun-icon { display: none; }
        
        .orb { display: none; }
        .orb-1 { top: -10%; left: -10%; width: 80vw; height: 80vw; background: #f8c8dc; }
        .orb-2 { bottom: -10%; right: -10%; width: 90vw; height: 90vw; background: #a18cd1; animation-delay: -5s; }
        .orb-3 { top: 40%; left: 30%; width: 50vw; height: 50vw; background: #e85d75; opacity: 0.5; animation-delay: -10s; }
        .orb-4 { top: 10%; right: 20%; width: 40vw; height: 40vw; background: #fad0c4; opacity: 0.4; }
        @keyframes float { 0% { transform: translate(0, 0) rotate(0deg); } 100% { transform: translate(30px, 50px) rotate(20deg); } }
        
        .input-group { position: relative; width: 100%; max-width: 280px; margin: 0 auto 30px auto; }
        .capsule-input { 
            width: 100%; padding: 16px; text-align: center; border-radius: 100px; 
            border: 1px solid var(--glass-border); background: var(--capsule-bg); backdrop-filter: blur(20px); 
            font-size: 1.8rem; letter-spacing: 12px; color: #fff; outline: none; transition: all 0.3s; 
            box-shadow: inset 0 2px 5px rgba(255,255,255,0.1), 0 10px 20px rgba(0,0,0,0.2); font-family: monospace; 
        }
        .capsule-input:focus { 
            background: rgba(255, 255, 255, 0.15); 
            border-color: var(--accent); 
            transform: scale(1.02); 
            box-shadow: 0 0 0 4px rgba(255, 154, 158, 0.25), inset 0 2px 5px rgba(255,255,255,0.1);
        }
        .capsule-input.error { border-color: var(--danger); color: var(--danger); background: rgba(255, 59, 48, 0.05); animation: shake 0.5s; }
        
        .glass-panel { 
            background: var(--glass-bg); backdrop-filter: saturate(180%) blur(var(--glass-blur)); 
            border: 1px solid var(--glass-border); box-shadow: var(--glass-shadow); 
        }
        .glass-btn { 
            appearance: none; outline: none; border: none; background: var(--love-gradient); 
            border: 1px solid rgba(255,255,255,0.3); border-radius: 50px; padding: 14px 40px; 
            font-size: 1rem; font-weight: 600; color: white; cursor: pointer; position: relative; 
            overflow: hidden; backdrop-filter: blur(10px); box-shadow: 0 10px 20px rgba(0,0,0,0.05); 
            transition: 0.3s; font-family: 'Noto Serif SC', "华文行楷", sans-serif; 
        }
        .glass-btn:active { transform: scale(0.95); background: linear-gradient(135deg, #d64863, #8f79b9); }
        
        .lock-screen { 
            position: fixed; top: 0; left: 0; width: 100%; height: 100%; display: flex; 
            flex-direction: column; justify-content: center; align-items: center; z-index: 9999; 
            background: rgba(255,255,255,0.05); backdrop-filter: blur(50px); 
        }
        .lock-content { width: 90%; max-width: 320px; text-align: center; }
        .lock-content h2 { font-family: 'Great Vibes', 'LoveFont', "华文行楷", cursive; font-size: 2.5rem; color: var(--accent); letter-spacing: 2px; margin-bottom: 15px; }
        .lock-content p { font-family: 'LoveFont', 'Noto Serif SC', "微软雅黑", sans-serif; color: #e0d4fc; font-style: italic; }
        .hint-text { height: 20px; font-size: 0.9rem; color: var(--danger); margin-bottom: 20px; font-weight: 500; opacity: 0; transition: 0.2s; }
        @keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-10px); } 75% { transform: translateX(10px); } }
        
        .container { max-width: 600px; margin: 0 auto; padding: 20px; }
        .hidden { display: none !important; }
        .fade-in { animation: fadeIn 0.8s ease forwards; }
        @keyframes fadeIn { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
        
        /* 优化 header 布局，避免错位 */
        header { margin: 30px 0 40px 0; text-align: center; position: relative; display: flex; flex-direction: column; align-items: center; }
        .ripple {
            position: absolute; border-radius: 50%; background: rgba(255, 255, 255, 0.4); 
            transform: scale(0); animation: ripple 0.6s linear; pointer-events: none;
        }
        @keyframes ripple { to { transform: scale(4); opacity: 0; } }
        
        h1 { 
            font-family: 'Great Vibes', 'LoveFont', "华文行楷", cursive; font-size: 3rem; margin: 10px 0; 
            text-shadow: 0 2px 10px rgba(232, 93, 117, 0.2); color: var(--accent); letter-spacing: 4px; 
            font-weight: normal; animation: breathe 4s ease-in-out infinite; width: 100%;
        }
        @keyframes breathe { 0%, 100% { transform: scale(1); text-shadow: 0 2px 10px rgba(232, 93, 117, 0.2); } 50% { transform: scale(1.02); text-shadow: 0 5px 20px rgba(232, 93, 117, 0.4); } }
        
        #typing-text { 
            font-size: 1rem; opacity: 0.7; letter-spacing: 4px; color: #a18cd1; 
            font-family: 'LoveFont', 'Noto Serif SC', "华文行楷", sans-serif; text-transform: lowercase; 
            min-height: 1.5em; margin-bottom: 5px; width: 100%;
        }
        .typing-cursor::after {
            content: '|'; animation: blink 1s infinite;
        }
        @keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

        .timer-capsule {
            margin-top: 5px; width: 100%;
        }
        
        .search-box { display: none; width: 100%; max-width: 280px; margin: 0 auto 20px auto; position: relative; }
        .search-box.show { display: block; animation: fadeIn 0.3s ease; }
        .search-input {
            width: 100%; padding: 12px 40px 12px 20px; border-radius: 50px; 
            border: 1px solid rgba(255, 255, 255, 0.2); border-top: 1px solid rgba(255, 255, 255, 0.5); border-left: 1px solid rgba(255, 255, 255, 0.5); 
            background: rgba(255, 255, 255, 0.05); backdrop-filter: blur(20px) saturate(150%); color: var(--text-main); outline: none; 
            font-family: 'Noto Serif SC', sans-serif; transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); 
            box-shadow: inset 0 5px 15px rgba(255, 255, 255, 0.1), 0 10px 25px rgba(0, 0, 0, 0.1);
        }
        .search-input:focus {
            background: rgba(255, 255, 255, 0.15); border-color: rgba(255, 255, 255, 0.8); 
            box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.2), 0 0 20px rgba(232, 93, 117, 0.3); transform: scale(1.02);
        }
        .search-clear { position: absolute; right: 15px; top: 50%; transform: translateY(-50%); color: var(--text-main); opacity: 0.5; cursor: pointer; font-size: 1.2rem; }
        
        .timer-val { font-family: 'Great Vibes', "华文行楷", sans-serif; font-weight: 700; color: var(--accent); font-size: 1.3rem; letter-spacing: 2px; }
        
        /* 时间轴样式 */
        .timeline-container { position: relative; padding-left: 20px; }
        .timeline-line {
            position: absolute; left: 34px; top: 20px; bottom: 0; width: 2px;
            background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,0.3) 10%, rgba(255,255,255,0.3) 90%, rgba(255,255,255,0));
            z-index: -1;
        }
        body.light-mode .timeline-line {
            background: linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,0.1) 10%, rgba(0,0,0,0.1) 90%, rgba(0,0,0,0));
        }

        .entry-card { 
            border-radius: 28px; padding: 24px; margin-bottom: 30px; transition: transform 0.2s; position: relative;
            /* 性能优化：跳过屏幕外渲染 */
            content-visibility: auto;
            contain-intrinsic-size: 1px 200px;
            /* 时间轴小圆点 */
        }
        .entry-card::after {
            content: ''; position: absolute; left: -26px; top: 30px; width: 12px; height: 12px;
            background: var(--accent); border-radius: 50%; border: 3px solid rgba(255,255,255,0.5);
            box-shadow: 0 0 10px var(--accent);
        }

        .entry-header { 
            display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; 
            font-size: 0.9rem; color: #dcd6f7; font-family: 'ZhutiFont', 'LoveFont', 'Noto Serif SC', "微软雅黑", sans-serif; 
            flex-wrap: wrap; gap: 10px; 
        }
        .entry-header > div:last-child { display: flex; gap: 8px; align-items: center; }
        
        .entry-body { 
            font-size: 1.15rem; line-height: 1.8; white-space: pre-wrap; word-break: break-word; 
            transition: all 0.3s ease; font-family: 'ZhutiFont', 'LoveFont', 'Noto Serif SC', "华文行楷", "微软雅黑", sans-serif; 
            letter-spacing: 0.5px; text-shadow: 0 1px 2px rgba(0,0,0,0.5); 
        }
        .entry-body.collapsed { max-height: 80px; overflow: hidden; }
        
        .media-box { margin-top: 15px; border-radius: 20px; overflow: hidden; }
/* 优化图片加载体验：初始模糊占位，加载完清晰 */
.media-box img {
    width: 100%; display: block; cursor: zoom-in;
    opacity: 0; transition: opacity 0.5s ease-in-out;
    min-height: 200px; background: rgba(255,255,255,0.05); /* 占位背景 */
}
.media-box img.loaded { opacity: 1; min-height: auto; background: none; }

/* 视频样式，与图片保持一致 */
.media-box video {
    width: 100%; display: block; cursor: pointer;
    opacity: 0; transition: opacity 0.5s ease-in-out;
    min-height: 200px; background: rgba(255,255,255,0.05); /* 占位背景 */
}
.media-box video.loaded { opacity: 1; min-height: auto; background: none; }
        
        .del-btn { color: var(--danger); background: rgba(255,59,48,0.1); padding: 4px 12px; border-radius: 12px; font-size: 0.75rem; cursor: pointer; border: none; font-family: 'Noto Serif SC', "微软雅黑", sans-serif; }
        .edit-btn { color: var(--accent); background: rgba(232, 93, 117, 0.1); padding: 4px 12px; border-radius: 12px; font-size: 0.75rem; cursor: pointer; border: none; margin-right: 8px; font-family: 'Noto Serif SC', "微软雅黑", sans-serif; }
        
        .fab { 
            position: fixed; bottom: 80px; right: 30px; width: 70px; height: 70px; border-radius: 50%; 
            background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.3); 
            border-top: 1px solid rgba(255, 255, 255, 0.6); border-left: 1px solid rgba(255, 255, 255, 0.6); 
            backdrop-filter: blur(20px) saturate(180%); 
            box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.2), inset 10px 10px 30px rgba(232, 93, 117, 0.3), 0 15px 35px rgba(0, 0, 0, 0.2); 
            display: flex; justify-content: center; align-items: center; z-index: 100; cursor: pointer; 
            transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); overflow: hidden; 
        }
        .fab::before {
            content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%; 
            background: radial-gradient(circle, rgba(255,255,255,0.8) 0%, transparent 60%); 
            opacity: 0.3; transform: scale(0); transition: transform 0.5s;
        }
        body.light-mode .fab {
            background: rgba(255, 255, 255, 0.4); border: 1px solid rgba(255, 255, 255, 0.8);
            box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.5), inset 10px 10px 30px rgba(255, 143, 163, 0.2), 0 15px 35px rgba(100, 80, 100, 0.15);
        }
        body.light-mode .fab svg { fill: var(--accent); filter: drop-shadow(0 2px 5px rgba(255, 143, 163, 0.3)); }
        .fab:hover {
            transform: translateY(-5px) scale(1.05);
            box-shadow: inset 0 0 30px rgba(255, 255, 255, 0.4), inset 10px 10px 40px rgba(232, 93, 117, 0.5), 0 20px 40px rgba(0, 0, 0, 0.3);
        }
        .fab:active { transform: scale(0.95); }
        .fab svg { width: 32px; height: 32px; fill: var(--accent); filter: drop-shadow(0 2px 5px rgba(0,0,0,0.2)); z-index: 1; }
        
        .modal-overlay { 
            position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.1); 
            z-index: 200; display: flex; align-items: flex-end; opacity: 0; pointer-events: none; transition: 0.3s; 
        }
        .modal-overlay.show { opacity: 1; pointer-events: all; }
        .modal-content { 
            width: 100%; max-width: 600px; margin: 0 auto; border-radius: 40px 40px 0 0; padding: 30px 25px; 
            background: var(--modal-bg); backdrop-filter: blur(50px); box-shadow: 0 -20px 60px rgba(0,0,0,0.3); 
            transform: translateY(100%); transition: 0.4s cubic-bezier(0.19, 1, 0.22, 1); max-height: 85vh; 
            overflow-y: auto; color: var(--modal-text);
        }
        .modal-overlay.show .modal-content { transform: translateY(0); }
        
        .editor { 
            width: 100%; border: none; background: var(--input-bg); border-radius: 20px; padding: 20px; 
            font-size: 1.15rem; height: 120px; resize: none; outline: none; margin-bottom: 15px; 
            border: 1px solid rgba(255,255,255,0.1); font-family: 'Noto Serif SC', "华文行楷", "微软雅黑", sans-serif; 
            color: var(--text-main); line-height: 1.7;
        }
        .emoji-grid { 
            display: grid; grid-template-columns: repeat(8, 1fr); gap: 5px; background: var(--input-bg); 
            padding: 10px; border-radius: 20px; height: 250px; overflow-y: auto; margin-bottom: 20px; 
            border: 1px solid rgba(255,255,255,0.1); 
        }
        .emo { font-size: 1.4rem; text-align: center; cursor: pointer; padding: 5px; border-radius: 5px; user-select: none; }
        .emo:active { background: rgba(255,255,255,0.2); transform: scale(1.2); }
        .toolbar { display: flex; gap: 10px; margin-bottom: 20px; }
        .tool-icon { 
            flex: 1; padding: 15px; text-align: center; border-radius: 18px; background: rgba(255,255,255,0.1); 
            border: 1px solid rgba(255,255,255,0.2); cursor: pointer; transition: 0.2s; font-weight: 600; 
            color: #fff; display: flex; align-items: center; justify-content: center; 
            font-family: 'Noto Serif SC', "华文行楷", sans-serif; backdrop-filter: blur(5px);
        }
        .tool-icon:active { background: rgba(255,255,255,0.2); }
        
        .editor-media-grid {
            display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
            margin-bottom: 15px;
            width: 100%;
            min-height: 50px; /* 确保即使为空也有高度 */
            border: 1px dashed rgba(255,255,255,0.1); /* 视觉提示区域 */
            padding: 5px;
            border-radius: 8px;
        }
        .editor-media-item {
            position: relative; border-radius: 10px; overflow: hidden;
            aspect-ratio: 1; 
            height: 100px; /* 兜底高度 */
            border: 1px solid rgba(255,255,255,0.2);
            background: rgba(0,0,0,0.2);
        }
        .editor-media-item img {
            width: 100%; height: 100%; object-fit: cover;
            display: block; /* 消除 img 下方间隙 */
            border-radius: 10px; /* 确保图片圆角 */
        }
        /* 强制覆盖内部 media-box 的样式，如果存在的话 */
        .editor-media-item .media-box { 
            display: contents; /* 让内部 img 直接受 editor-media-item 控制 */
        }
        .del-media-btn {
            position: absolute; top: 0; right: 0;
            width: 36px; height: 36px; /* 更大 */
            background: rgba(255, 59, 48, 1); color: white;
            display: flex; justify-content: center; align-items: center;
            cursor: pointer; font-size: 24px; font-weight: bold;
            z-index: 100; 
            border-bottom-left-radius: 12px;
            box-shadow: -2px 2px 5px rgba(0,0,0,0.3);
            border-left: 1px solid rgba(255,255,255,0.3);
            border-bottom: 1px solid rgba(255,255,255,0.3);
        }
        .del-media-btn:hover { background: #ff1a1a; transform: scale(1.1); }
        .del-media-btn:active { transform: scale(0.95); background: #cc0000; }
        
        .btn-submit { 
            width: 100%; padding: 16px; border-radius: 50px; border: none; background: var(--love-gradient); 
            color: white; font-weight: 700; font-size: 1.1rem; box-shadow: 0 5px 20px rgba(232, 93, 117, 0.2); 
            cursor: pointer; position: relative; overflow: hidden; transition: all 0.3s; 
            font-family: 'Noto Serif SC', "华文行楷", sans-serif; letter-spacing: 1px;
        }
        .btn-progress { position: absolute; top: 0; left: 0; height: 100%; background: rgba(255, 255, 255, 0.2); width: 0%; transition: width 0.2s; z-index: 1; }
        .btn-text { position: relative; z-index: 2; }
        
        .icp-footer { 
            position: fixed; bottom: 0; left: 0; width: 100%; padding: 8px 0; background: var(--glass-bg); 
            backdrop-filter: blur(10px); font-size: 10px; z-index: 150; transform: translateY(100%); 
            transition: transform 0.4s ease-in-out; pointer-events: none; display: flex; 
            justify-content: center; align-items: center; gap: 15px; flex-wrap: wrap; color: var(--text-main); 
            font-family: sans-serif; 
        }
        .icp-footer.visible { transform: translateY(0); pointer-events: auto; }
        .icp-footer a { color: var(--text-main); text-decoration: none; display: inline-flex; align-items: center; transition: color 0.2s; }
        .icp-footer a:hover { color: var(--accent); text-decoration: none; }
        .icp-footer img { width: 14px; height: 14px; margin-right: 3px; }
        
        .date-selector { 
            margin: 20px auto 0 auto; display: flex; justify-content: space-between; align-items: center; 
            background: var(--glass-bg); backdrop-filter: saturate(180%) blur(20px); border: 1px solid var(--glass-border); 
            box-shadow: var(--glass-shadow); padding: 8px; border-radius: 50px; width: 100%; max-width: 320px; user-select: none; 
        }
        .date-arrow { 
            background: rgba(255,255,255,0.1); border: none; width: 38px; height: 38px; border-radius: 50%; 
            color: #e0d4fc; cursor: pointer; transition: all 0.2s; display: flex; justify-content: center; align-items: center; 
        }
        .date-arrow:hover { background: rgba(255,255,255,0.2); }
        .date-arrow:active { transform: scale(0.9); background: rgba(255,255,255,0.3); }
        .date-arrow svg { width: 18px; height: 18px; stroke: #e0d4fc; stroke-width: 2.5; }
        #main-date-display { 
            font-size: 1rem; font-weight: 600; color: #e0d4fc; text-align: center; flex-grow: 1; 
            cursor: pointer; padding: 5px 0; border-radius: 20px; transition: opacity 0.3s, transform 0.3s; 
            font-family: 'Noto Serif SC', "华文行楷", sans-serif;
        }
        #main-date-display.change { opacity: 0; transform: translateY(10px); }

        .visitor-item { padding: 12px; border-bottom: 1px solid rgba(255,255,255,0.1); font-size: 0.9rem; color: var(--text-main); font-family: monospace; }
        .visitor-item:last-child { border-bottom: none; }
        .visitor-ip { color: var(--accent); font-weight: bold; }
        .visitor-time { color: #886aae; font-size: 0.8rem; }
        .visitor-ua { font-size: 0.75rem; opacity: 0.7; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

        .calendar-overlay { 
            position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.1); 
            backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); z-index: 999; display: flex; 
            justify-content: center; align-items: center; opacity: 0; pointer-events: none; transition: opacity 0.3s ease; 
        }
        .calendar-overlay.show { opacity: 1; pointer-events: auto; }
        #calendar-popup { width: 350px; border-radius: 16px; z-index: 1000; transform: scale(0.95); transition: transform 0.3s cubic-bezier(0.19, 1, 0.22, 1); overflow: hidden; }
        .calendar-overlay.show #calendar-popup { transform: scale(1); }

        .ios-calendar-header { display: flex; justify-content: space-between; align-items: center; padding: 16px; border-bottom: 1px solid rgba(255,255,255,0.2); }
        .ios-header-btn { 
            width: 32px; height: 32px; border-radius: 50%; border: none; background: rgba(255,255,255,0.1); 
            color: var(--accent); font-size: 18px; cursor: pointer; display: flex; justify-content: center; 
            align-items: center; transition: background-color 0.2s; backdrop-filter: blur(10px); font-family: 'Noto Serif SC', sans-serif;
        }
        .ios-header-btn:hover { background: rgba(255,255,255,0.2); }
        .ios-header-title { font-size: 17px; font-weight: 500; color: var(--text-main); font-family: 'Noto Serif SC', "华文行楷", sans-serif; }
        #ios-showAllNotes { width: auto; padding: 0 12px; font-size: 14px; }

        .ios-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); background: rgba(255,255,255,0.05); padding: 8px 0; }
        .ios-weekday { text-align: center; font-size: 12px; color: var(--calendar-text); font-family: 'Noto Serif SC', sans-serif; }

        .ios-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; padding: 8px; }
        .ios-day { 
            height: 44px; display: flex; justify-content: center; align-items: center; font-size: 17px; 
            color: var(--text-main); border-radius: 50%; cursor: pointer; position: relative; transition: all 0.2s; 
            font-family: 'Noto Serif SC', sans-serif;
        }
        .ios-day.today::after { content: ''; position: absolute; bottom: 4px; width: 4px; height: 4px; border-radius: 50%; background-color: var(--accent); }
        .ios-day.has-note::before { content: ''; position: absolute; bottom: 4px; right: 8px; width: 6px; height: 6px; border-radius: 50%; background-color: var(--accent); z-index: 1; }
        .ios-day.selected.has-note::before { background-color: #fff; }
        .ios-day.selected { background-color: var(--accent); color: #ffffff; }
        .ios-day.other-month { color: var(--glass-border); opacity: 0.5; }
        .ios-day.disabled { cursor: not-allowed; color: var(--glass-border); opacity: 0.3; }

        @media (max-width: 375px) { #calendar-popup { width: 92%; height: auto; border-radius: 20px; } }

        #expand-collapse-all {
            display: block; margin: 0 0 20px auto; padding: 4px 12px; background: var(--glass-bg);
            backdrop-filter: saturate(180%) blur(var(--glass-blur)); border: 1px solid var(--glass-border);
            box-shadow: var(--glass-shadow); border-radius: 12px; color: var(--accent); font-weight: 600;
            font-size: 0.75rem; cursor: pointer; transition: all 0.3s ease; outline: none; transform: none; 
            line-height: 1.2; height: auto; min-width: auto; font-family: 'Noto Serif SC', "微软雅黑", sans-serif;
        }
        #expand-collapse-all:hover { background: rgba(232, 93, 117, 0.1); transform: none; }

        ::-webkit-scrollbar { width: 6px; height: 6px; }
        ::-webkit-scrollbar-track { background: transparent; }
        ::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.2); border-radius: 10px; }
        ::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.4); }
        body.light-mode ::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, 0.1); }
        body.light-mode ::-webkit-scrollbar-thumb:hover { background: rgba(0, 0, 0, 0.2); }

        .hashtag { color: var(--accent); font-weight: bold; margin-right: 2px; cursor: pointer; }
        .hashtag:hover { text-decoration: underline; }

        .back-to-top {
            position: fixed; bottom: 30px; right: 30px; width: 44px; height: 44px; border-radius: 50%;
            background: var(--glass-bg); border: 1px solid var(--glass-border); backdrop-filter: blur(10px);
            display: flex; justify-content: center; align-items: center; cursor: pointer; z-index: 90;
            transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1); box-shadow: var(--glass-shadow);
            opacity: 0; transform: translateY(20px); pointer-events: none;
        }
        .back-to-top.show { opacity: 1; transform: translateY(0); pointer-events: auto; bottom: 160px; }
        .back-to-top:active { transform: scale(0.9); }
        .back-to-top svg { width: 24px; height: 24px; stroke: var(--text-main); fill: none; stroke-width: 2; }

        .skeleton {
            background: var(--glass-bg); border-radius: 28px; padding: 24px; margin-bottom: 24px;
            position: relative; overflow: hidden; border: 1px solid var(--glass-border);
        }
        .skeleton::after {
            content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0; transform: translateX(-100%);
            background-image: linear-gradient(90deg, rgba(255, 255, 255, 0) 0, rgba(255, 255, 255, 0.1) 20%, rgba(255, 255, 255, 0.2) 60%, rgba(255, 255, 255, 0));
            animation: shimmer 2s infinite;
        }
        body.light-mode .skeleton::after {
            background-image: linear-gradient(90deg, rgba(0, 0, 0, 0) 0, rgba(0, 0, 0, 0.05) 20%, rgba(0, 0, 0, 0.1) 60%, rgba(0, 0, 0, 0));
        }
        @keyframes shimmer { 100% { transform: translateX(100%); } }
        .skeleton-header { display: flex; justify-content: space-between; margin-bottom: 15px; }
        .skeleton-date { width: 120px; height: 14px; background: rgba(255,255,255,0.1); border-radius: 4px; }
        body.light-mode .skeleton-date { background: rgba(0,0,0,0.1); }
        .skeleton-line { height: 16px; background: rgba(255,255,255,0.1); border-radius: 4px; margin-bottom: 10px; }
        body.light-mode .skeleton-line { background: rgba(0,0,0,0.1); }
        .skeleton-line.short { width: 60%; }

        .toast-container { position: fixed; top: 30px; left: 50%; transform: translateX(-50%); z-index: 2000; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
        .toast {
            min-width: 300px; padding: 12px 20px; border-radius: 50px; background: rgba(30, 30, 40, 0.85);
            backdrop-filter: blur(20px); border: 1px solid rgba(255, 255, 255, 0.1); color: #fff;
            font-size: 0.95rem; display: flex; align-items: center; box-shadow: 0 10px 30px rgba(0,0,0,0.2);
            opacity: 0; transform: translateY(-20px); animation: toastIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
            font-family: 'Noto Serif SC', sans-serif; pointer-events: auto;
        }
        body.light-mode .toast { background: rgba(255, 255, 255, 0.85); color: #333; border: 1px solid rgba(255, 255, 255, 0.4); }
        .toast.error { border-left: 4px solid var(--danger); }
        .toast.success { border-left: 4px solid #4cd964; }
        .toast.info { border-left: 4px solid var(--accent); }
        .toast.out { animation: toastOut 0.3s ease forwards; }
        @keyframes toastIn { to { opacity: 1; transform: translateY(0); } }
        @keyframes toastOut { to { opacity: 0; transform: translateY(-20px) scale(0.9); } }
        .toast-icon { margin-right: 10px; font-size: 1.2rem; }
        @keyframes sun-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
        body.light-mode .theme-toggle-btn .sun-icon { display: block; animation: sun-spin 12s linear infinite; }
        body.light-mode .ripple { background: rgba(255, 180, 140, 0.5); }

        .entry-card { position: relative; overflow: hidden; transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.4s ease; transform-style: preserve-3d; }
        .entry-card:hover { transform: translateY(-8px) scale(1.02); box-shadow: 0 20px 40px rgba(0,0,0,0.2); z-index: 10; }
        body.light-mode .entry-card:hover { box-shadow: 0 25px 50px rgba(100, 80, 100, 0.15); }
        .entry-card::before {
            content: ''; position: absolute; top: 0; left: -100%; width: 80%; height: 100%;
            background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0) 100%);
            transform: skewX(-25deg); pointer-events: none; transition: none; z-index: 2;
        }
        .entry-card:hover::before { left: 200%; transition: left 0.8s ease-in-out; }
        
        .particles-container { position: fixed; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: -1; display: none; }
        body.light-mode .particles-container { display: block; }
        .particle { position: absolute; background: rgba(255, 255, 255, 0.6); border-radius: 50%; animation: float-up 10s linear infinite; }
        .petal { position: absolute; background: #ffd1dc; border-radius: 150% 0 150% 0; animation: fall 15s linear infinite; }
        @keyframes float-up { 0% { transform: translateY(100vh) scale(0); opacity: 0; } 50% { opacity: 0.8; } 100% { transform: translateY(-10vh) scale(1); opacity: 0; } }
        @keyframes fall { 0% { transform: translate(0, -10vh) rotate(0deg); opacity: 0; } 20% { opacity: 0.8; } 100% { transform: translate(20vw, 100vh) rotate(360deg); opacity: 0; } }

        /* 顶部阅读进度条 */
        .scroll-progress-container {
            position: fixed; top: 0; left: 0; width: 100%; height: 6px; z-index: 2000;
            background: rgba(0, 0, 0, 0.1); 
            backdrop-filter: blur(2px);
        }
        .scroll-progress {
            height: 100%; 
            background: linear-gradient(90deg, #ff9a9e, #fad0c4, #fad0c4, #a18cd1, #fbc2eb, #ff9a9e);
            background-size: 300% 100%;
            width: 0%; 
            border-radius: 0 4px 4px 0;
            box-shadow: 0 0 10px rgba(255, 154, 158, 0.8), 0 0 5px rgba(255, 255, 255, 0.5);
            animation: rainbow-flow 3s linear infinite;
            position: relative;
        }
        /* 增加光点跟随效果 */
        .scroll-progress::after {
            content: ''; position: absolute; right: 0; top: 0; bottom: 0; width: 4px;
            background: #fff; border-radius: 50%;
            box-shadow: 0 0 8px #fff, 0 0 15px var(--accent);
            opacity: 0.8;
        }
        @keyframes rainbow-flow {
            0% { background-position: 0% 50%; }
            100% { background-position: 100% 50%; }
        }


        /* 🎵 网易云风格播放器 (迷你悬浮版) */
        .netease-player {
            position: fixed; top: 80px; left: 10px; z-index: 1000;
            display: flex; align-items: center;
            background: rgba(255, 255, 255, 0.1); 
            backdrop-filter: blur(20px) saturate(180%);
            border: 1px solid rgba(255, 255, 255, 0.2);
            border-radius: 50px; /* 胶囊形状 */
            padding: 6px 12px 6px 6px; /* 调整内边距 */
            box-shadow: 0 5px 20px 0 rgba(0, 0, 0, 0.2);
            transition: all 0.4s cubic-bezier(0.18, 0.89, 0.32, 1.28);
            width: auto; max-width: 240px;
            font-family: 'Noto Serif SC', sans-serif;
            overflow: hidden;
            transform: translateX(0); /* 默认完全显示 */
            will-change: transform, opacity;
        }
        
        /* 隐藏状态：只露出一半 */
        .netease-player.hide {
            transform: translateX(-85%); /* 向左隐藏大部分 */
            opacity: 0.6;
        }
        /* 鼠标悬停时完全展示 */
        .netease-player.hide:hover, .netease-player:hover {
            transform: translateX(0);
            opacity: 1;
            box-shadow: 0 8px 30px 0 rgba(0, 0, 0, 0.4);
            background: rgba(255, 255, 255, 0.2); 
        }

        body.light-mode .netease-player {
            background: rgba(255, 255, 255, 0.6);
            border: 1px solid rgba(255, 255, 255, 0.5);
            box-shadow: 0 5px 20px 0 rgba(100, 100, 100, 0.1);
        }

        .player-cover-box {
            position: relative; width: 40px; height: 40px; flex-shrink: 0;
            margin-right: 10px; display: flex; justify-content: center; align-items: center;
        }
        .player-disc {
            width: 36px; height: 36px; border-radius: 50%;
            background: #111;
            border: 1.5px solid rgba(255,255,255,0.2);
            position: relative;
            box-shadow: 0 0 5px rgba(0,0,0,0.5);
            animation: spin 8s linear infinite;
            animation-play-state: paused;
        }
        .player-disc.playing { animation-play-state: running; }
        .player-cover {
            position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
            width: 24px; height: 24px; border-radius: 50%;
            background: url('https://p1.music.126.net/K3q5k8s9j2s9k8s9j2s9k8/109951163332066774.jpg?param=130y130') no-repeat center/cover;
        }

        .player-info { 
            flex-grow: 1; overflow: hidden; display: flex; flex-direction: column; justify-content: center; 
            min-width: 120px; /* 保证文字区域有宽度 */
        }
        .song-title { 
            font-size: 0.8rem; color: var(--text-main); font-weight: bold; 
            white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 2px;
        }
        .song-artist { font-size: 0.7rem; color: var(--text-main); opacity: 0.7; margin-bottom: 2px; }
        
        .player-controls { display: flex; flex-direction: column; gap: 3px; }
        
        .progress-bar-bg {
            width: 100%; height: 2px; background: rgba(255,255,255,0.2); border-radius: 2px; cursor: pointer; position: relative;
            margin-top: 2px;
        }
        body.light-mode .progress-bar-bg { background: rgba(0,0,0,0.1); }
        .progress-bar-fill {
            width: 0%; height: 100%; background: var(--accent); border-radius: 2px; position: relative;
            transition: width 0.1s linear;
        }
        .progress-bar-fill::after {
            content: ''; position: absolute; right: -2px; top: -2px; width: 6px; height: 6px;
            background: #fff; border-radius: 50%; box-shadow: 0 0 3px rgba(0,0,0,0.3);
            opacity: 0; transition: opacity 0.2s;
        }
        .netease-player:hover .progress-bar-fill::after { opacity: 1; }

        .btns { display: flex; justify-content: space-between; align-items: center; padding: 0 2px; }
        .ctrl-btn { 
            cursor: pointer; font-size: 0.9rem; color: var(--text-main); opacity: 0.8; transition: 0.2s; 
            width: 20px; height: 20px; display: flex; justify-content: center; align-items: center;
        }
        .ctrl-btn:hover { opacity: 1; transform: scale(1.1); color: var(--accent); }
        .play-btn { font-size: 1.1rem; }
        
        /* 移动端适配 */
        @media (max-width: 480px) {
            .netease-player {
                top: 70px; left: 10px; width: auto; max-width: 220px;
                padding: 6px 10px 6px 6px;
            }
            /* 修复移动端暂停键黄色方块问题：移除点击高亮背景 */
            .ctrl-btn { -webkit-tap-highlight-color: transparent; outline: none; }
        }

        /* 卡片光效 Glare */
        .glare {
            position: absolute; top: 0; left: 0; width: 100%; height: 100%;
            border-radius: 28px; pointer-events: none;
            background: linear-gradient(125deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.05) 45%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.05) 55%, rgba(255,255,255,0) 100%);
            z-index: 5; opacity: 0; transition: opacity 0.3s;
            mix-blend-mode: overlay;
        }
        body.light-mode .glare {
            background: linear-gradient(125deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.4) 45%, rgba(255,255,255,0.8) 50%, rgba(255,255,255,0.4) 55%, rgba(255,255,255,0) 100%);
        }
        
        /* 💖 心形点赞动画 */
        .heart-popup {
            position: absolute; width: 100px; height: 100px;
            background: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='%23ff6b6b' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z'/%3E%3C/svg%3E") no-repeat center/contain;
            pointer-events: none; animation: heartPop 0.8s ease-out forwards;
            z-index: 999;
            --r: 0deg; --tx: 0px; /* CSS 变量默认值 */
            transform: translate(-50%, -50%) rotate(var(--r));
        }
        @keyframes heartPop {
            0% { opacity: 0; transform: translate(-50%, -50%) rotate(var(--r)) scale(0); }
            15% { opacity: 1; transform: translate(-50%, -50%) rotate(var(--r)) scale(1.2); }
            30% { transform: translate(-50%, -50%) rotate(var(--r)) scale(1); }
            100% { opacity: 0; transform: translate(calc(-50% + var(--tx)), -150%) rotate(var(--r)) scale(1.5); }
        }