    /* ================= 新增打码/模糊相关样式 ================= */
        .card.is-spoilered img, .card.is-spoilered video {
            filter: blur(25px) brightness(0.8);
            transition: filter 0.3s ease;
        }
        .card.is-spoilered .spoiler-label {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            background: rgba(0, 0, 0, 0.7);
            color: #fff;
            padding: 8px 14px;
            border-radius: 20px;
            font-size: 13px;
            font-weight: bold;
            z-index: 10;
            pointer-events: none;
            text-align: center;
            max-width: 80%;
            backdrop-filter: blur(4px);
        }
        .card.is-spoilered.revealed img, .card.is-spoilered.revealed video {
            filter: none !important;
        }
        .card.is-spoilered.revealed .spoiler-label {
            display: none;
        }
        /* ================= 现代社区卡片风格重构 (   Style) ================= */
        :root {
            --primary: #e06c9f; 
            --primary-hover: #c95589;
            --bg-color: #fcf7fa; /*  */
            --surface: #ffffff;
            --text-main: #2c3e50; /*  */
            --text-sub: #7f8c8d;
            --border: #ebeef5; /*  */
            --img-bg: #f0f2f5;
            --radius-sm: 6px;
            --radius-md: 10px;
            --radius-lg: 16px;
            --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
            --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.06);
            --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.12);
        }
        /* ================= 新增：小马专属多主题色彩方案 ================= */
        /* 🎈 萍琪粉 (Pinkie Pink) - 活泼明快的粉色 */
        [data-theme="pinkie"] {
            --primary: #f472b6; --primary-hover: #db2777;
            --bg-color: #fdf2f8; --surface: #ffffff;
            --text-main: #475569; --text-sub: #94a3b8;
            --border: #fce7f3; --img-bg: #fbcfe8;
        }
        /* ✨ 暮光紫 (Twilight Purple) - 魔法与深邃的紫色 */
        [data-theme="twilight"] {
            --primary: #9333ea; --primary-hover: #7e22ce;
            --bg-color: #faf5ff; --surface: #ffffff;
            --text-main: #3b0764; --text-sub: #6b21a8;
            --border: #f3e8ff; --img-bg: #e9d5ff;
        }
        /* ⚡ 云宝蓝 (Rainbow Dash Blue) - 澄澈的天空蓝 */
        [data-theme="rainbow"] {
            --primary: #0ea5e9; --primary-hover: #0284c7;
            --bg-color: #f0f9ff; --surface: #ffffff;
            --text-main: #0c4a6e; --text-sub: #0369a1;
            --border: #e0f2fe; --img-bg: #bae6fd;
        }
        /* 💎 瑞瑞白 (Rarity White) - 优雅的纯白底色配合高贵靛蓝 */
        [data-theme="rarity"] {
            --primary: #6366f1; --primary-hover: #4f46e5;
            --bg-color: #f8fafc; --surface: #ffffff;
            --text-main: #334155; --text-sub: #64748b;
            --border: #e2e8f0; --img-bg: #f1f5f9;
        }
        /* 🦋 小蝶黄 (Fluttershy Yellow) - 还原真正的奶油柔黄 */
        [data-theme="fluttershy"] {
            --primary: #fde047; /* 真正的小蝶奶油黄 */
            --primary-hover: #facc15;
            --bg-color: #fffbeb; 
            --surface: #ffffff;
            --text-main: #713f12; /* 搭配小蝶轮廓的深暖棕色 */
            --text-sub: #92400e;
            --border: #fef08a; 
            --img-bg: #fef08a;
        }

        /* 专门为小蝶黄优化顶栏，把白色文字变成深暖棕色，确保在浅黄色上清晰可见 */
        [data-theme="fluttershy"] header .logo,
        [data-theme="fluttershy"] header .toggle-container span { 
            color: #713f12 !important; 
        }
        [data-theme="fluttershy"] header .back-btn, 
        [data-theme="fluttershy"] header .bell-btn, 
        [data-theme="fluttershy"] header .settings-btn,
        [data-theme="fluttershy"] .search-bar button { 
            background: rgba(113, 63, 18, 0.1) !important; 
            color: #713f12 !important; 
            border: 1px solid rgba(113, 63, 18, 0.15) !important; 
        }
        [data-theme="fluttershy"] header .back-btn:hover, 
        [data-theme="fluttershy"] header .bell-btn:hover, 
        [data-theme="fluttershy"] header .settings-btn:hover,
        [data-theme="fluttershy"] .search-bar button:hover { 
            background: rgba(113, 63, 18, 0.2) !important; 
        }
        [data-theme="fluttershy"] .search-bar input[type="text"], 
        [data-theme="fluttershy"] .search-bar select {
            background: rgba(113, 63, 18, 0.05) !important;
            border: 1px solid rgba(113, 63, 18, 0.15) !important;
            color: #713f12 !important;
        }
        [data-theme="fluttershy"] .search-bar input[type="text"]::placeholder { 
            color: rgba(113, 63, 18, 0.5) !important; 
        }
        /* 🍎 阿杰橙 (Applejack Orange) - 充满活力的秋收暖橙 */
        [data-theme="applejack"] {
            --primary: #ea580c; --primary-hover: #c2410c;
            --bg-color: #fff7ed; --surface: #ffffff;
            --text-main: #7c2d12; --text-sub: #9a3412;
            --border: #ffedd5; --img-bg: #fed7aa;
        }
        /* 🎵 天琴绿 (Lyra Green) - 清新的薄荷水绿 */
        [data-theme="lyra"] {
            --primary: #0d9488; --primary-hover: #0f766e;
            --bg-color: #f0fdfa; --surface: #ffffff;
            --text-main: #134e4a; --text-sub: #115e59;
            --border: #ccfbf1; --img-bg: #99f6e4;
        }

        /* ====== 暗色模式系列 ====== */
        /* 🌙 露娜黑 (Luna Black) - 星空深蓝夜色 */
        [data-theme="luna"] {
            --primary: #818cf8; --primary-hover: #6366f1;
            --bg-color: #0f172a; --surface: #1e293b;
            --text-main: #f8fafc; --text-sub: #94a3b8;
            --border: #334155; --img-bg: #0f172a;
        }
        /* 💚 邪茧黑 (Chrysalis Black) - 幽暗深灰配合幻形灵荧光绿 */
        [data-theme="chrysalis"] {
            --primary: #10b981; --primary-hover: #059669;
            --bg-color: #111827; --surface: #1f2937;
            --text-main: #f3f4f6; --text-sub: #9ca3af;
            --border: #374151; --img-bg: #111827;
        }
        /* 暗黑模式下针对顶栏和滑轨的特殊对比度优化 */
        [data-theme="luna"] header, [data-theme="chrysalis"] header {
            background: var(--surface) !important;
            border-bottom: 1px solid var(--border) !important;
        }
        [data-theme="luna"] .home-tabs, [data-theme="luna"] .settings-tabs, [data-theme="luna"] .main-tabs,
        [data-theme="chrysalis"] .home-tabs, [data-theme="chrysalis"] .settings-tabs, [data-theme="chrysalis"] .main-tabs { 
            background: var(--border); 
        }

        /* 🌊 海洋蓝主题 (Ocean Blue) */
        [data-theme="blue"] {
            --primary: #3b82f6; 
            --primary-hover: #2563eb;
            --bg-color: #f0f9ff;
            --surface: #ffffff;
            --text-main: #1e3a8a;
            --text-sub: #64748b;
            --border: #bfdbfe;
            --img-bg: #e0f2fe;
        }

        /* 🍃 森林绿主题 (Forest Green) */
        [data-theme="green"] {
            --primary: #10b981; 
            --primary-hover: #059669;
            --bg-color: #f0fdf4;
            --surface: #ffffff;
            --text-main: #064e3b;
            --text-sub: #64748b;
            --border: #bbf7d0;
            --img-bg: #dcfce7;
        }
        
        html, body {
            min-height: 100vh;
        }
        body { 
            font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
            background-color: var(--bg-color); 
            margin: 0; 
            color: var(--text-main); 
            padding-top: 130px; /* 增加边距以适应两行顶栏 */
            padding-bottom: 40px; 
            transition: background-color 0.3s, color 0.3s;
            -webkit-font-smoothing: antialiased;
            min-height: 100vh;
        }

        /* ------------------ 现代导航栏 ------------------ */
        header { 
            position: fixed;
            top: 0; left: 0; right: 0; height: auto; /* 改为自动高度 */
            background: rgba(240, 248, 255, 0.85); 
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            border-bottom: none;
            box-shadow: var(--shadow-sm);
            display: flex; align-items: center; justify-content: space-between;
            flex-wrap: wrap; /* 允许元素换行 */
            padding: 12px 5%; /* 增加一点内边距 */
            z-index: 100; gap: 15px; box-sizing: border-box; 
            transition: all 0.3s;
        }
        
        .logo-container { display: flex;
            align-items: center; gap: 12px; flex-shrink: 0; order: 1; /* 固定在排序第1位 */}
        
        .back-btn { 
            background: var(--bg-color);
            color: var(--text-main);
            padding: 8px 10px; border: none; border-radius: var(--radius-sm); 
            cursor: pointer; display: flex; align-items: center; justify-content: center;
            outline: none; transition: all 0.2s; font-size: 14px;
        }
        .back-btn:hover { background: #e4e7ed; color: var(--primary); }
        
        .logo { font-size: 20px; font-weight: 700; color: var(--primary); text-decoration: none; white-space: nowrap; letter-spacing: -0.5px;}

        /* 消息铃铛样式 */
        .bell-btn { 
            position: relative;
            background: var(--bg-color); color: var(--text-main); 
            padding: 8px 10px; border: none; border-radius: var(--radius-sm); 
            cursor: pointer; display: flex; align-items: center;
            justify-content: center;
            text-decoration: none; transition: 0.2s; font-size: 16px; 
            order: 2; /* 和设置按钮同一级排序 */
        }
        .bell-btn:hover { background: #e4e7ed; color: var(--primary); }
        .bell-badge { 
            position: absolute;
            top: -5px; right: -5px; background: #ff4d4f; color: white;
            font-size: 11px; font-weight: bold;
            padding: 2px 6px; border-radius: 10px; line-height: 1; display: none; 
            box-shadow: 0 2px 4px rgba(255, 77, 79, 0.3); border: 2px solid #fff; 
        }
        .bell-btn.has-unread { animation: bellBlink 2s infinite ease-in-out; }
        
        @keyframes bellBlink {
            0% { opacity: 1; transform: scale(1); }
            50% { opacity: 0.8; transform: scale(1.05); box-shadow: 0 0 8px rgba(255, 77, 79, 0.4); }
            100% { opacity: 1; transform: scale(1); }
        }

        /* 搜索框与表单 */
        .search-bar { display: flex;
            flex: 1 1 100%; max-width: 100%; gap: 8px; order: 3; margin-top: 5px; /* 宽度100%强制独占第二行，排在最后 */}
        input[type="text"], input[type="email"], select, input[type="number"], input[type="password"], textarea { 
            padding: 10px 14px;
            border: 1px solid var(--border); border-radius: var(--radius-sm); 
            font-size: 14px; outline: none; box-sizing: border-box; 
            background: var(--bg-color); color: var(--text-main);
            transition: all 0.3s; font-family: inherit;
        }
        input[type="text"]:focus, input[type="email"]:focus, select:focus, input[type="number"]:focus, input[type="password"]:focus, textarea:focus { 
            border-color: var(--primary); background: var(--surface);
            box-shadow: 0 0 0 3px rgba(224, 108, 159, 0.15); 
        }
        
        button { 
            padding: 10px 18px;
            background-color: var(--primary); color: white; border: none; 
            border-radius: var(--radius-sm); cursor: pointer; font-size: 14px; 
            font-weight: 500; transition: all 0.2s; white-space: nowrap;
            box-shadow: 0 2px 6px rgba(224, 108, 159, 0.3);
        }
        button:hover { background-color: var(--primary-hover); transform: translateY(-1px); box-shadow: 0 4px 10px rgba(224, 108, 159, 0.4); }
        button:active { transform: translateY(0); box-shadow: none; }
        button:disabled { background-color: #dcdfe6; color: #909399; cursor: not-allowed; box-shadow: none; transform: none;}

        .history-dropdown { 
            position: absolute; top: 100%; left: 0; right: 0; background: var(--surface);
            border: 1px solid var(--border); border-radius: var(--radius-md); 
            box-shadow: var(--shadow-md); z-index: 300; max-height: 250px; 
            overflow-y: auto; display: none; flex-direction: column; margin-top: 8px;
        }
        .history-dropdown.show { display: flex; }
        .history-item { 
            padding: 12px 16px; cursor: pointer; display: flex; align-items: center;
            gap: 10px; font-size: 14px; color: var(--text-main); border-bottom: 1px solid var(--bg-color);
            transition: background 0.2s; word-break: break-all;
        }
        .history-item:hover { background: var(--bg-color); color: var(--primary); }
        .history-item:last-child { border-bottom: none; }
        .clear-history { 
            padding: 12px 16px; text-align: center; color: #e74c3c; cursor: pointer;
            font-size: 13px; background: #fdf2f2; position: sticky; bottom: 0; font-weight: 500;
        }
        .clear-history:hover { background: #fadbd8; }

        .header-actions { display: flex; align-items: center; gap: 15px; flex-shrink: 0; margin-left: auto; order: 2; /* 靠右对齐并排在第2位 */
        }
        
        /* 拨动开关优化 */
        .toggle-container { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-main); }
        .switch { position: relative; display: inline-block; width: 40px; height: 22px; flex-shrink: 0; }
        .switch input { opacity: 0; width: 0; height: 0; }
        .slider { 
            position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; 
            background-color: #dcdfe6; transition: .3s; border-radius: 22px;
        }
        .slider:before { 
            position: absolute; content: ""; height: 16px; width: 16px; left: 3px; bottom: 3px; 
            background-color: white; transition: .3s; border-radius: 50%; box-shadow: 0 2px 4px rgba(0,0,0,0.1); 
        }
        input:checked + .slider { background-color: var(--primary); }
        input:checked + .slider:before { transform: translateX(18px); }
        #videoPreviewToggle:checked + .slider { background-color: #3498db; }

        .settings-wrapper { position: relative; }
        .settings-btn { 
            padding: 8px 12px; background-color: var(--surface); color: var(--text-main);
            border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; 
            font-size: 14px; display: flex; align-items: center; gap: 6px; box-shadow: var(--shadow-sm);
        }
        .settings-btn:hover { background-color: var(--bg-color); }
        
        .faves-btn { color: #e67e22; border-color: #f39c12; background: #fffcf8; margin-right: 5px; }
        .faves-btn:hover { background-color: #fdf3e8 !important; }
        
        .settings-dropdown { 
            position: absolute; top: 120%; right: 0; background: var(--surface);
            border: 1px solid var(--border); border-radius: var(--radius-md); 
            box-shadow: var(--shadow-hover); padding: 20px;
            display: none; flex-direction: column; gap: 15px; z-index: 200; min-width: 260px;
        }
        .settings-dropdown.show { display: flex; animation: slideDown 0.2s ease-out; }
        
        @keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
        
        .api-key-btn { 
            width: 100%; padding: 10px; border-radius: var(--radius-sm); 
            border: 1px dashed var(--primary); background: #f0f5ff; color: var(--primary); 
            cursor: pointer; font-size: 14px; box-shadow: none; font-weight: 500;
        }
        .api-key-btn:hover { background: var(--primary); color: white; }
        .api-key-btn.bound { border-style: solid; background: var(--bg-color); color: var(--text-main); border-color: var(--border); }

        @media (max-width: 1000px) { 
            header { flex-wrap: wrap; height: auto; padding: 12px 5%; justify-content: space-between; gap: 12px; }
            .header-actions { order: 2; width: auto; }
            .search-bar { order: 3; width: 100%; max-width: none; }
        body { padding-top: 120px; }
        }

        @media (max-width: 600px) {
            header { padding: 10px 5%; gap: 10px; }
            .logo-container { order: 1; flex: 1; }
            .header-actions { order: 2; width: auto; flex-direction: row; flex-wrap: nowrap; justify-content: flex-end; gap: 10px; }
            #myFavesBtn, .settings-wrapper { display: none !important; }
            .search-bar { order: 3; width: 100%; flex-wrap: nowrap; gap: 6px; }
            .search-bar input[type="text"] { flex: 1; min-width: 0; font-size: 14px; padding: 10px; }
            .search-bar select { flex: none; width: auto; font-size: 13px; padding: 10px 8px; }
            .search-bar button { flex: none; font-size: 14px; padding: 10px 14px; }
        body { padding-top: 110px; }
            .settings-dropdown { right: -5px; }
            #settingsContent { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
            .autocomplete-dropdown { border-top-left-radius: 0 !important; border-top-right-radius: 0 !important; }
        }

        /* 画廊瀑布流 - 卡片化 */
        .gallery-container {
            width: 95%; max-width: 1400px; margin: 20px auto;
            column-count: 4; column-gap: 18px;
        }
        @media (max-width: 1200px) { .gallery-container { column-count: 4; } }
        @media (max-width: 800px) { .gallery-container { column-count: 3; column-gap: 12px; width: 98%; } }
        @media (max-width: 500px) { .gallery-container { column-count: 2; column-gap: 10px; width: 96%; margin: 10px auto; } }

        /* 现代悬浮卡片 */
        .card { 
            background: var(--surface); border: none; border-radius: var(--radius-md); 
            padding: 0; margin-bottom: 20px; break-inside: avoid; 
            box-shadow: var(--shadow-sm); cursor: zoom-in; position: relative; 
            transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); overflow: hidden;
        }
        .card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
        .card img, .card video { width: 100%; display: block; background-color: var(--img-bg); }
        
        body.batch-mode .card { cursor: cell; } 
        body.batch-mode .card.selected { outline: 3px solid var(--primary); }
        .card-checkbox { 
            position: absolute; top: 12px; left: 12px; z-index: 20; width: 22px; height: 22px; 
            cursor: pointer; display: none; accent-color: var(--primary); transform: scale(1.2);
        }
        body.batch-mode .card-checkbox { display: block; }

        .format-badge { 
            position: absolute; top: 12px; right: 12px; 
            background: rgba(0, 0, 0, 0.65); backdrop-filter: blur(4px); color: white; 
            padding: 4px 8px; border-radius: 12px; font-size: 11px; font-weight: bold;
            z-index: 10; pointer-events: none; display: flex; align-items: center; gap: 4px; 
        }
        
        /* 底部信息遮罩 */
        .card-overlay { 
            position: absolute; bottom: 0; left: 0; right: 0; 
            background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.4) 60%, transparent 100%); 
            color: white; padding: 30px 12px 10px; display: flex;
            justify-content: space-between; align-items: center; font-size: 13px; font-weight: 500;
            opacity: 1; transition: opacity 0.3s;
        }
        .card:hover .card-overlay { opacity: 1; }

        /* 移动端永远显示底部信息 */
        @media (max-width: 800px) {
            .card { margin-bottom: 12px; border-radius: var(--radius-sm); }
            .card-overlay { opacity: 1; padding: 25px 8px 8px; font-size: 12px; }
            .format-badge { top: 8px; right: 8px; padding: 3px 6px; font-size: 10px; }
            .card-checkbox { top: 8px; left: 8px; width: 18px; height: 18px; }
        }

        .fave-star { cursor: pointer; font-size: 18px; margin-right: 6px; display: inline-block; user-select: none; color: rgba(255,255,255,0.7); transition: transform 0.2s; }
        .fave-star:hover { color: #f1c40f; transform: scale(1.2); }
        .fave-star.active { color: #f1c40f; }

        /* 悬浮球圆润化 */
        .fab-download, .fab-import { 
            position: fixed; z-index: 1000; color: white; border: none; 
            padding: 14px 24px; border-radius: 30px; font-size: 15px; font-weight: bold;
            box-shadow: 0 4px 15px rgba(0,0,0,0.2); cursor: pointer; transition: all 0.3s; display: none; 
        }
        .fab-download { bottom: 30px; right: 30px; background: var(--primary); }
        .fab-download:hover { background: var(--primary-hover); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(78,136,243,0.4); }
        
        .fab-import { bottom: 30px; left: 30px; background: #2ecc71; }
        .fab-import:hover { background: #27ae60; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(46,204,113,0.4); }
        .fab-import:disabled { background: #bdc3c7; cursor: not-allowed; transform: none; box-shadow: none; }

        /* 分页器 */
        .pagination { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin: 40px 0; align-items: center; }
        .page-info-box { 
            background: var(--surface); padding: 10px 16px; border-radius: var(--radius-sm); 
            border: 1px solid var(--border); font-size: 14px; color: var(--text-main); font-weight: 500; box-shadow: var(--shadow-sm);
        }
        .jump-box { display: flex; gap: 8px; align-items: center; }
        .jump-box input { width: 50px; text-align: center; }

        /* 模态框重构：毛玻璃与大圆角 */
        .modal { 
            display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; height: 100%; 
            background: rgba(0,0,0,0.6); backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
            z-index: 2000; align-items: center; justify-content: center; padding: 20px; box-sizing: border-box;
            animation: fadeIn 0.2s;
        }
        @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
        
        /* --- 原有的通用样式保持不变 --- */
.modal-content { 
    background: var(--surface); 
    border-radius: var(--radius-lg); 
    display: flex; 
    flex-direction: row; 
    max-width: 1300px; 
    width: 100%; 
    height: 90vh; 
    max-height: 90vh; 
    overflow: hidden; 
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}
/* === 图片详情页宽屏布局优化 === */
@media (min-width: 801px) {
    /* 1. 强制横向并扩大整体宽度 */
    #imageModal .modal-content {
        display: flex !important;
        flex-direction: row !important;
        max-width: 95% !important;
        width: 1600px !important;
    }

    /* 2. 比例优化：左边图片占 75%，右边信息占 25% */
    #imageModal .modal-image-wrapper {
        flex: 3 !important;
        border-right: 1px solid var(--border);
    }

    #imageModal .modal-sidebar {
        flex: 1 !important;
        min-width: 350px !important;
        background: var(--surface);
    }
}
/* --- 在这里新增：强制图片详情页在桌面端保持横向 --- */
#imageModal .modal-content {
    flex-direction: row !important; /* 使用 !important 确保它不会被其他 CSS 覆盖 */
    display: flex !important;
}
        .modal-image-wrapper { 
            flex: 2; display: flex; align-items: center; justify-content: center; position: relative; 
            background-color: #0f172a; border-right: 1px solid var(--border);
        }
        .media-element { max-width: 100%; max-height: 90vh; object-fit: contain; }
        .modal-sidebar { 
            flex: 1; padding: 25px; overflow-y: auto; display: flex; flex-direction: column;
            gap: 16px; background: var(--surface); min-height: 0;
        }
        
        
        @media (max-width: 800px) { 
    .modal { padding: 0; } 
    .modal-content { flex-direction: column; max-height: 100%; height: 100%; border-radius: 0; }
    /* 确保手机端强制变回竖向 */
    #imageModal .modal-content { flex-direction: column !important; }
    /* ...保持你原有的其他代码不变... */
    .modal-image-wrapper { flex: none; height: 45%; min-height: 250px; border-right: none; border-bottom: 1px solid var(--border); } 
    .media-element { max-height: 100%; }
    .modal-sidebar { flex: 1; padding: 20px; }
    .close-btn { background: rgba(0,0,0,0.5) !important; color: white !important; top: 10px !important; right: 10px !important; backdrop-filter: blur(4px); border-radius: 50% !important;}
}
        .close-btn { 
            position: absolute; top: 15px; right: 15px; background: var(--bg-color); color: var(--text-main); 
            border: none; font-size: 20px; width: 36px; height: 36px; border-radius: 50%;
            cursor: pointer; z-index: 99999; transform: translateZ(1px); display: flex; align-items: center;
            justify-content: center; line-height: 1; transition: all 0.2s;
        }
        .close-btn:hover { background: #ffeaea; color: #e74c3c; transform: translateZ(1px) scale(1.1); }

        /* 标签流设计 */
        .tag-container { display: flex; flex-wrap: wrap; gap: 8px; }
        .tag-item { 
            display: inline-flex; border-radius: 20px; overflow: hidden; font-size: 12px; 
            cursor: pointer; text-decoration: none; border: 1px solid transparent; font-weight: 500;
            transition: all 0.2s; box-shadow: 0 1px 3px rgba(0,0,0,0.05);
        }
        .tag-item:hover { transform: translateY(-1px); box-shadow: 0 3px 6px rgba(0,0,0,0.1); filter: brightness(0.95); }
        .tag-name { padding: 4px 10px; }
        .tag-count { padding: 4px 10px; background-color: rgba(255, 255, 255, 0.4); font-size: 11px; }
        .tag-count.loading { color: transparent; position: relative; min-width: 20px; }
        .tag-count.loading::after { content: "..."; color: rgba(0,0,0,0.5); position: absolute; left: 4px; }
        
        /* 柔和护眼的标签色彩 */
        .tag-category-rating { background-color: #e0f2fe; color: #0284c7; }   
        .tag-category-origin { background-color: #fee2e2; color: #dc2626; }   
        .tag-category-character { background-color: #f3e8ff; color: #7e22ce; }  
        .tag-category-species { background-color: #fef3c7; color: #d97706; }   
        .tag-category-content, .tag-category-error { background-color: #f1f5f9; color: #475569; }  
        .tag-category-general { background-color: #dcfce7; color: #16a34a; }   

        .stat-row { display: flex; justify-content: space-between; font-size: 14px; color: var(--text-sub); border-bottom: 1px dashed var(--border); padding-bottom: 8px; }
        
        .action-btns { display: flex; flex-direction: column; gap: 10px; margin: 15px 0; }
        .action-btns button { width: 100%; padding: 10px; font-size: 14px; border-radius: var(--radius-sm); font-weight: 500; }
        .btn-outline { background: var(--surface); border: 1px solid var(--border); color: var(--text-main); box-shadow: var(--shadow-sm); }
        .btn-outline:hover { background: var(--bg-color); border-color: #dcdfe6; }
        .btn-primary { background: var(--primary); color: white; border: none; box-shadow: 0 4px 10px rgba(78,136,243,0.3); }
        
        /* 评论区现代样式 */
        .comments-section { margin-top: 20px; }
        .comment-input-area { margin-bottom: 20px; background: var(--bg-color); padding: 15px; border-radius: var(--radius-md); border: 1px solid var(--border); }
        .comment { 
            background: var(--surface); padding: 15px; border: 1px solid var(--border); border-radius: var(--radius-md); 
            margin-bottom: 12px; font-size: 14px; line-height: 1.6; color: var(--text-main); display: flex; gap: 12px;
            box-shadow: 0 1px 4px rgba(0,0,0,0.02);
        }
        .comment-avatar { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; border: 2px solid var(--bg-color); flex-shrink: 0; }
        .comment-main { flex: 1; min-width: 0; }
        .comment-author { font-weight: 600; color: var(--primary); font-size: 15px; }
        .comment-author.clickable { cursor: pointer; text-decoration: none; }
        .comment-author.clickable:hover { text-decoration: underline; }
        .comment-time { color: #9ca3af; font-size: 12px; }
        .comment-body { word-break: break-word; margin-top: 8px; color: #4b5563; border-top: 1px dashed #eee; padding-top: 5px; }
        .comment-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
        
        .comment-tag { font-size: 11px; padding: 2px 6px; border-radius: 12px; margin-left: 8px; color: white; vertical-align: middle; }
        .tag-picpony { background: linear-gradient(135deg, #10b981, #059669); }
        .tag-derpibooru { background: linear-gradient(135deg, #3b82f6, #2563eb); }
        .comment-delete-btn { background: transparent; border: none; color: #ef4444; cursor: pointer; font-size: 12px; margin-left: 10px; padding: 0; }
        .comment-delete-btn:hover { text-decoration: underline; }

        .trans-btn { background: var(--bg-color); border: 1px solid var(--border); color: var(--text-sub); border-radius: 12px; padding: 2px 10px; font-size: 12px; cursor: pointer; height: 24px; transition: 0.2s;}
        .trans-btn:hover { background: #e5e7eb; color: var(--text-main); }

        /* 加载动画 */
        #loading { text-align: center; padding: 40px; color: var(--text-sub); display: none; font-size: 15px; font-weight: 500;}
        .spinner { 
            border: 3px solid rgba(224, 108, 159, 0.2); width: 28px; height: 28px; border-radius: 50%;
            border-left-color: var(--primary); animation: spin 1s cubic-bezier(0.4, 0, 0.2, 1) infinite; margin: 0 auto 12px;
        }
        @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

        /* 侧边栏 */
        .sidebar-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); backdrop-filter: blur(2px); z-index: 2999; display: none; opacity: 0; transition: opacity 0.3s;}
        .sidebar-overlay.show { display: block; opacity: 1; }
        .sidebar { 
            position: fixed; top: 0; left: 0; width: 280px; height: 100%; background: var(--surface); 
            box-shadow: 4px 0 20px rgba(0,0,0,0.1); z-index: 3000; transform: translateX(-100%);
            transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); display: flex; flex-direction: column; 
        }
        .sidebar.open { transform: translateX(0); }
        
        .sidebar-header { padding: 20px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border); }
        .sidebar-header h3 { margin: 0; color: var(--text-main); font-size: 18px; font-weight: 600; }
        .close-sidebar { background: transparent; border: none; font-size: 24px; color: var(--text-sub); cursor: pointer; padding: 0; line-height: 1; }
        
        .sidebar-content { padding: 20px; overflow-y: auto; flex: 1; background: var(--bg-color); }
        
        /* 修改原有的 user-profile-mock */
.user-profile-mock {
    display: flex; flex-direction: column; align-items: center;
    padding: 0; /* 去除内边距 */
    background: var(--surface); border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm); margin: 0 0 20px 0;
    overflow: hidden; /* 确保横幅不会溢出圆角 */
    position: relative; width: 100%; box-sizing: border-box;
}
/* 新增：横幅背景样式 */
.profile-banner-bg {
    width: 100%; height: 100px; 
    background: linear-gradient(135deg, #a8c0ff 0%, #3f2b96 100%); 
    background-size: cover; background-position: center; 
    position: relative; cursor: pointer; transition: 0.3s;
}
.banner-hover-mask {
    position: absolute; inset: 0; background: rgba(0,0,0,0.4); color: white; 
    display: flex; align-items: center; justify-content: center; font-size: 13px; 
    opacity: 0; transition: opacity 0.2s; font-weight: bold;
}
.profile-banner-bg:hover .banner-hover-mask { opacity: 1; }

/* 新增：下半部分内容包裹层 */
.profile-content-wrap {
    display: flex; flex-direction: column; align-items: center;
    padding: 0 20px 25px; width: 100%; box-sizing: border-box;
}

/* 修改原有的 avatar-wrapper */
.avatar-wrapper { 
    position: relative; width: 70px; height: 70px; cursor: pointer; border-radius: 50%; 
    border: 3px solid #fff; box-shadow: 0 4px 10px rgba(0,0,0,0.1); background: #fff;
    margin-top: -35px; /* 向上偏移盖住横幅 */
    margin-bottom: 12px; z-index: 2;
}
        
        .avatar-placeholder { width: 100%; height: 100%; background: var(--bg-color); display: flex; align-items: center; justify-content: center; font-size: 28px; color: #ccc; border-radius: 50%; overflow: hidden;}
        .avatar-img { width: 100%; height: 100%; object-fit: cover; display: none; border-radius: 50%;}
        .avatar-hover-mask { position: absolute; inset: 0; background: rgba(0,0,0,0.5); color: white; display: flex; align-items: center; justify-content: center; font-size: 12px; opacity: 0; transition: opacity 0.2s; border-radius: 50%; font-weight: bold;}
        .avatar-wrapper:hover .avatar-hover-mask { opacity: 1; }
        
        .username-placeholder { color: var(--text-main); font-size: 16px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
        
        .sidebar-section { margin-bottom: 20px; background: var(--surface); border-radius: var(--radius-md); padding: 15px; box-shadow: var(--shadow-sm); }
        .sidebar-section h4 { margin: 0 0 12px 0; color: var(--text-sub); font-size: 13px; text-transform: uppercase; letter-spacing: 0.5px; border-bottom: 1px dashed var(--border); padding-bottom: 5px; }
        
        .sidebar-action-btn { 
            width: 100%; padding: 10px 12px; margin-bottom: 6px; background: transparent; border: none; border-radius: var(--radius-sm);
            color: var(--text-main); cursor: pointer; text-align: left; font-size: 14px; font-weight: 500;
            display: flex; align-items: center; gap: 8px; transition: 0.2s; 
        }
        .sidebar-action-btn:hover { background: var(--bg-color); color: var(--primary); padding-left: 16px; }

        .auth-input { width: 100%; padding: 12px; margin-bottom: 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 14px; background: var(--bg-color); color: var(--text-main); transition: 0.3s; box-shadow: inset 0 1px 2px rgba(0,0,0,0.02);}
        .auth-input:focus { background: var(--surface); border-color: var(--primary); box-shadow: 0 0 0 3px rgba(224, 108, 159, 0.15); }
        .auth-switch { text-align: center; font-size: 13px; margin-top: 12px; cursor: pointer; color: var(--primary); font-weight: 500; text-decoration: underline; }
        
        .cloud-fave-title { text-align: center; color: var(--primary); font-size: 20px; margin: 30px 0 10px; font-weight: bold; display: none; letter-spacing: 1px; border-bottom: 2px solid var(--primary); padding-bottom: 5px; max-width: 200px; margin-left: auto; margin-right: auto;}

        .upload-dropzone { 
            border: 2px dashed #cbd5e1; border-radius: var(--radius-md); padding: 30px 20px; text-align: center; 
            cursor: pointer; margin-bottom: 15px; background: #f8fafc; color: #64748b; font-size: 14px; transition: 0.3s;
        }
        .upload-dropzone:hover { border-color: var(--primary); background: #f0f5ff; color: var(--primary);}
        
        .autocomplete-dropdown { position: absolute; top: 100%; left: 0; right: 0; background: var(--surface); border: 1px solid var(--border); box-shadow: 0 2px 5px rgba(0,0,0,0.1); z-index: 3600; max-height: 150px; overflow-y: auto; display: none; flex-direction: column; }
        .autocomplete-item { padding: 8px 12px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; font-size: 13px; border-bottom: 1px solid #eee; color: var(--text-main); }
        .autocomplete-item:hover { background: var(--bg-color); }

        /* 经典的页脚 -    风格 */
        .site-footer { background-color: var(--surface); border-top: 1px solid var(--border); padding: 40px 20px 30px; margin-top: 60px; text-align: center; color: var(--text-sub); }
        .footer-content { max-width: 900px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
        .footer-title { color: var(--primary); font-size: 20px; font-weight: bold; letter-spacing: 1px;}
        .footer-desc { font-size: 14px; color: #9ca3af; }
        .footer-disclaimer { font-size: 12px; margin-top: 15px; color: #9ca3af; line-height: 1.6;}
        .footer-disclaimer a { color: var(--primary); text-decoration: none; font-weight: 500;}
        .footer-disclaimer a:hover { text-decoration: underline; }
        .footer-stats { margin: 20px auto 10px; font-size: 13px; color: #6b7280; display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 15px; background: var(--bg-color); padding: 12px 20px; border-radius: 30px; max-width: 600px; border: 1px solid var(--border); }
        .stat-item strong { color: var(--text-main); font-weight: 600; }
        .stat-separator { color: #d1d5db; }

        /* 对话框通用去装饰化 */
        .modal-content h2 { font-size: 20px; font-weight: 600; color: var(--text-main) !important; border-bottom: 1px solid var(--border); padding-bottom: 15px; margin-bottom: 20px; margin-top: 0;}
        .modal-content p { font-size: 14px; color: #4b5563; line-height: 1.6;}
        
        #profileHeaderBg { height: 100px !important; background: linear-gradient(135deg, #a8c0ff 0%, #3f2b96 100%) !important; }
        #profileAvatar { border-radius: 50% !important; border: 4px solid #fff !important; width: 90px !important; height: 90px !important; margin-top: -45px !important; box-shadow: 0 4px 10px rgba(0,0,0,0.1);}

        /* 身份徽章样式 */
        .role-badge { display: inline-block; padding: 3px 8px; border-radius: 12px; font-size: 11px; margin-left: 8px; color: white; vertical-align: middle; font-weight: bold; box-shadow: 0 2px 4px rgba(0,0,0,0.1); letter-spacing: 0.5px;}
        .role-superadmin { background: linear-gradient(135deg, #ef4444, #b91c1c); }
        .role-admin { background: linear-gradient(135deg, #f59e0b, #d97706); }
        .role-editor { background: linear-gradient(135deg, #10b981, #059669);
        }
        .role-user { background: linear-gradient(135deg, #9ca3af, #6b7280);
        }

        /* ====== 新增：控制详情页第二个关闭按钮的显示与隐藏 ====== */
        /* 1. 默认状态（电脑端）隐藏该按钮 */
        .mobile-only-close {
            display: none !important;
        }

        /* 2. 当屏幕宽度小于等于 800px（手机端）时，显示该按钮 */
        @media (max-width: 800px) {
            .mobile-only-close {
                display: block !important;
            }
        }

/* ================= 参考图布局重构：全宽粉色顶栏 + 可收缩侧边栏 (含手机端换行) ================= */

/* 1. 顶栏基础样式 (粉色，去除写死的高度) */
header {
    background: var(--primary) !important; /* 这里改成了主题粉色 */
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    left: 0 !important;
    z-index: 3100 !important;
    border: none !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2) !important;
}

/* 2. 顶栏内部元素颜色调整 (统一半透明底色) */
header .logo { color: #ffffff !important; font-size: 22px !important; }
header .back-btn, header .bell-btn, header .settings-btn { 
    background: rgba(255, 255, 255, 0.15) !important; /* 加上和搜索按钮一样的半透明白底 */
    color: #ffffff !important; 
    border: 1px solid rgba(255, 255, 255, 0.1) !important; /* 加上微弱的边框线 */
    box-shadow: none !important;
    font-size: 15px !important; /* 稍微缩小一点字号让按钮更精致 */
    padding: 8px 14px !important; /* 调整内边距让按钮更饱满 */
    border-radius: var(--radius-sm) !important;
}
header .back-btn:hover, header .bell-btn:hover, header .settings-btn:hover { 
    background: rgba(255, 255, 255, 0.25) !important; /* 鼠标悬浮时变得更亮 */
}
header .toggle-container span { color: #ffffff !important; }

/* 3. 搜索框暗色皮肤 */
.search-bar input[type="text"], .search-bar select {
    background: rgba(0, 0, 0, 0.2) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
}
.search-bar input[type="text"]::placeholder { color: rgba(255, 255, 255, 0.6) !important; }
.search-bar input[type="text"]:focus { 
    background: rgba(0, 0, 0, 0.3) !important; 
    border-color: rgba(255,255,255,0.3) !important; 
}
.search-bar button { 
    background: rgba(255,255,255,0.15) !important; 
    border: 1px solid rgba(255,255,255,0.1) !important; 
    box-shadow: none !important;
}
.search-bar button:hover { background: rgba(255,255,255,0.25) !important; }

/* 4. 电脑端 (>= 800px)：强制单行，搜索框居中 */
@media (min-width: 800px) {
    header { 
        height: 60px !important; 
        padding: 0 20px !important;
        flex-wrap: nowrap !important; 
    }
    .logo-container { flex: 1; }
    .search-bar { 
        flex: 2; 
        max-width: 600px; 
        justify-content: center; 
        order: 2 !important; 
        margin: 0 20px !important;
    }
    .header-actions { flex: 1; justify-content: flex-end; order: 3 !important; }
    
    /* 侧边栏紧贴顶栏下方 */
    .sidebar { 
        top: 60px !important; 
        height: calc(100dvh - 60px) !important; 
        border-right: 1px solid var(--border);
        box-shadow: 2px 0 10px rgba(0,0,0,0.05) !important;
        transform: translateX(-100%) !important; 
    }
    .sidebar.open { transform: translateX(0) !important; }
}

/* 5. 手机端 (< 800px)：双行布局，搜索框掉至第二行 */
@media (max-width: 799px) {
    header { 
        height: auto !important; 
        padding: 10px 15px !important; 
        flex-wrap: wrap !important; 
    }
    .logo-container { order: 1 !important; flex: 1 !important; }
    .header-actions { order: 2 !important; flex: 1 !important; justify-content: flex-end !important; }
    
    /* 搜索框独占 100% 宽度并排在最后 */
    .search-bar { 
        order: 3 !important; 
        width: 100% !important; 
        flex: 1 1 100% !important; 
        margin-top: 10px !important; 
    }
    
    body { padding-top: 110px !important; } 
    
    /* 手机端侧边栏恢复为全屏覆盖抽屉 */
    .sidebar { top: 0 !important; height: 100% !important; z-index: 3200 !important; } 
}

/* 6. 恢复顶栏 Logo 与标题显示 */
header .logo-container .logo { display: block !important; }
#sidebarToggleBtn { display: flex !important; }
.sidebar-header .sidebar-logo { display: none !important; }
.sidebar-header .sidebar-title { display: block !important; }

/* 7. 主体内容响应侧边栏的推移挤压 */
body {
    padding-left: 0 !important; /* 默认不留白 */
    transition: padding-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
@media (min-width: 1000px) {
    body { padding-top: 80px !important; }
    /* 侧边栏展开时，挤压 body 留出 280px 空间 */
    body.sidebar-expanded {
        padding-left: 280px !important;
    }
    .sidebar-overlay {
        display: none !important; /* 电脑端不需要黑色半透明遮罩 */
    }
}
/* ================= 修复弹窗被顶栏遮挡的问题 ================= */
.modal {
    z-index: 4000 !important; /* 强制弹窗层级高于顶栏的3100和手机端侧边栏的3200 */
}
/* ================= 去掉云端账号中心标题，并让侧边栏整体上移 ================= */

/* 1. 隐藏侧边栏的标题字样、Logo以及底部线条，让这一块区域彻底消失 */
.sidebar-header .sidebar-title,
.sidebar-header .sidebar-logo {
    display: none !important;
}
.sidebar-header {
    border-bottom: none !important;
    padding: 0 !important; 
}

/* 2. 将关闭按钮（手机端）改为绝对定位，悬浮在右上角，不占用排版空间 */
.close-sidebar {
    position: absolute !important;
    top: 10px !important;
    right: 15px !important;
    z-index: 10 !important;
}

/* 3. 减小侧边栏主体内容的顶部留白，让头像和菜单整体往上抬 */
.sidebar-content {
    padding-top: 25px !important; /* 手机端稍微留一点给悬浮关闭按钮 */
}

/* 4. 电脑端由于没有关闭按钮，可以向上抬得更高，紧贴顶栏 */
@media (min-width: 800px) {
    .sidebar-content {
        padding-top: 5px !important; 
    }
}
/* ================= 修复电脑端设置菜单“白底白字”问题 ================= */
@media (min-width: 800px) {
    /* 1. 强制设置菜单容器内的文字恢复为深色 */
    .settings-dropdown {
        background: var(--surface) !important;
        color: var(--text-main) !important;
        box-shadow: var(--shadow-hover) !important;
    }

    /* 2. 修复菜单内的所有文字标签（如：内容分级过滤器、批量下载等） */
    .settings-dropdown span, 
    .settings-dropdown .toggle-container span,
    .settings-dropdown .settings-section span {
        color: var(--text-main) !important;
    }

    /* 3. 特别修复：下拉选择框文字不能是白色 */
    .settings-dropdown select {
        background: var(--bg-color) !important;
        color: var(--text-main) !important;
        border: 1px solid var(--border) !important;
    }

    /* 4. 修复开关旁边的描述文字颜色 */
    .settings-dropdown .toggle-container label + span {
        color: var(--text-main) !important;
    }
    
    /* 5. 确保 API 绑定按钮在未绑定状态下的文字可见性 */
    .api-key-btn:not(.bound) {
        color: var(--primary) !important;
    }
}
/* ================= 高级搜索面板样式 (底部适配) ================= */
.advanced-search-panel {
    display: none;
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    padding: 20px;
    box-sizing: border-box;
    animation: slideDown 0.2s ease-out;
    text-align: left; /* 修正父级可能带来的居中影响 */
}

.advanced-search-panel.show {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.adv-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.adv-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 5px;
}

.adv-range-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
}

.adv-range-inputs input[type="number"] {
    width: 100%;
    padding: 8px;
    font-size: 13px;
    box-sizing: border-box;
}

#advSearchToggleBtn.active {
    background-color: var(--primary) !important;
    color: white !important;
    border-color: var(--primary) !important;
}

@media (max-width: 800px) {
    .advanced-search-panel.show {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 15px;
    }
    /* 手机端底部按钮换行适配 */
    .adv-footer {
        flex-direction: column;
        align-items: flex-start !important;
    }
}
/* ================= 新增：今日推荐样式 ================= */
        .featured-container {
            width: 95%; max-width: 1400px; margin: 20px auto 10px;
            background: var(--surface); border-radius: var(--radius-md);
            box-shadow: var(--shadow-sm); overflow: hidden;
            border: 1px solid var(--border);
            animation: fadeIn 0.3s ease-out;
        }
        .featured-header {
            padding: 15px 20px; background: linear-gradient(135deg, #fff0f6 0%, #fff 100%);
            border-bottom: 1px dashed var(--border); display: flex; align-items: center; gap: 10px;
        }
        .featured-header h3 { margin: 0; color: var(--primary); font-size: 16px; font-weight: bold; }
        .featured-icon { font-size: 20px; }
        .featured-content {
            display: flex; padding: 20px; gap: 20px; align-items: stretch;
        }
        .featured-image-wrapper {
            flex: 0 0 350px; border-radius: var(--radius-sm); overflow: hidden;
            box-shadow: var(--shadow-sm); cursor: zoom-in; position: relative;
            background: var(--img-bg); display: flex; align-items: center; justify-content: center;
        }
        .featured-image-wrapper img, .featured-image-wrapper video {
            width: 100%; height: 100%; max-height: 250px; object-fit: contain; display: block; transition: transform 0.3s;
        }
        .featured-image-wrapper:hover img, .featured-image-wrapper:hover video { transform: scale(1.02); }
        .featured-info { flex: 1; display: flex; flex-direction: column; gap: 10px; min-width: 0;}
        .featured-title { font-size: 18px; font-weight: bold; color: var(--text-main); display: flex; justify-content: space-between;}
        .featured-desc { font-size: 13px; color: var(--text-sub); line-height: 1.6; max-height: 80px; overflow-y: auto; background: var(--bg-color); padding: 10px; border-radius: var(--radius-sm);}
        .featured-stats { display: flex; gap: 15px; font-size: 13px; color: var(--text-sub); margin-top: auto; padding-top: 15px; border-top: 1px dashed var(--border);}
        
        @media (max-width: 800px) {
            .featured-content { flex-direction: column; padding: 15px; gap: 15px; }
            .featured-image-wrapper { flex: none; width: 100%; height: 200px;}
            .featured-image-wrapper img, .featured-image-wrapper video { max-height: 200px; }
        }
        /* ================= 新增：主功能切换滑轨 (图库/论坛) ================= */
        .main-tabs-container {
            width: 100%; display: flex; justify-content: center; margin: 20px 0 30px;
            animation: fadeIn 0.3s ease-out;
        }
        .main-tabs {
            position: relative; display: flex; background: #e4e7ed;
            border-radius: 40px; padding: 6px; width: 400px; max-width: 90%;
            box-shadow: inset 0 2px 5px rgba(0,0,0,0.08);
        }
        .main-tab {
            flex: 1; text-align: center; position: relative; z-index: 2;
            padding: 12px 0; font-size: 16px; font-weight: bold;
            color: #7f8c8d; cursor: pointer; transition: color 0.3s;
            user-select: none; letter-spacing: 1px;
        }
        .main-tabs[data-active="gallery"] #tabMainGallery { color: var(--primary); }
        .main-tabs[data-active="forum"] #tabMainForum { color: #8b5cf6; }
        
        .main-tab-slider {
            position: absolute; top: 6px; bottom: 6px; left: 6px;
            width: calc(50% - 6px); background: var(--surface); border-radius: 35px;
            box-shadow: 0 4px 15px rgba(0,0,0,0.12);
            transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
            z-index: 1; pointer-events: none;
        }
        .main-tabs[data-active="forum"] .main-tab-slider {
            transform: translateX(100%);
        }
        
        @media (max-width: 600px) {
            .main-tabs { width: 95%; max-width: 100%; border-radius: 30px; padding: 4px; box-sizing: border-box; }
            .main-tab { font-size: 14px; padding: 10px 0; white-space: nowrap; letter-spacing: 0; }
            .main-tab-slider { top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: 25px; }
        }

        /* ================= 论坛相关样式 ================= */
        .forum-post-card {
            background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 20px; transition: 0.3s; cursor: pointer; display: flex; flex-direction: column; gap: 12px; box-shadow: var(--shadow-sm);
        }
        .forum-post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); border-color: var(--primary); }
        .forum-post-title { font-size: 18px; font-weight: 700; color: var(--text-main); margin: 0; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
        .forum-post-excerpt { font-size: 14px; color: var(--text-sub); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.6; }
        .forum-post-meta { display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: var(--text-sub); margin-top: 5px; flex-wrap: wrap; gap: 10px; }
        .forum-post-user { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
        .forum-post-stats { display: flex; gap: 15px; flex-shrink: 0; }
        .forum-post-stats span { display: flex; align-items: center; gap: 5px; }
        .forum-comment-item { display: flex; gap: 15px; border-bottom: 1px dashed var(--border); padding-bottom: 15px; margin-bottom: 15px; }
        .forum-comment-item:last-child { border-bottom: none; padding-bottom: 0; margin-bottom: 0; }
        .pinned-badge { background: #ef4444; color: white; padding: 2px 6px; border-radius: 4px; font-size: 11px; margin-right: 8px; vertical-align: middle; font-weight: bold; }

        @media (max-width: 600px) {
            .forum-post-card { padding: 15px; gap: 10px; }
            .forum-post-title { font-size: 16px; }
            .forum-post-excerpt { font-size: 13px; -webkit-line-clamp: 3; }
            .forum-post-meta { flex-direction: column; align-items: flex-start; }
            .forum-post-stats { width: 100%; justify-content: flex-end; }
        }

        /* ================= 新增：最新/热门 切换滑轨 ================= */
        .home-tabs-container {
            width: 100%; display: flex; justify-content: center; margin: 10px 0 20px;
            animation: fadeIn 0.3s ease-out;
        }
        .home-tabs {
            position: relative; display: flex; background: #e4e7ed;
            border-radius: 30px; padding: 4px; width: 280px; 
            box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
        }
        .home-tab {
            flex: 1; text-align: center; position: relative; z-index: 2;
            padding: 8px 0; font-size: 14px; font-weight: bold;
            color: #7f8c8d; cursor: pointer; transition: color 0.3s;
            user-select: none;
        }
        /* 激活状态的文字颜色变化 */
        .home-tabs[data-active="latest"] #tabLatest { color: var(--primary); }
        .home-tabs[data-active="hot"] #tabHot { color: #ef4444; }
        
        /* 滑块本体 */
        .home-tab-slider {
            position: absolute; top: 4px; bottom: 4px; left: 4px;
            width: calc(50% - 4px); background: var(--surface); border-radius: 30px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
            transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            z-index: 1; pointer-events: none;
        }
        /* 当切换到热门时，滑块平移 100% 距离 */
        .home-tabs[data-active="hot"] .home-tab-slider {
            transform: translateX(100%);
        }
        /* ================= 新增：详细设置面板滑轨及布局 ================= */
        .settings-tabs-container {
            width: 100%; display: flex; justify-content: center; margin: 10px 0 20px;
        }
        .settings-tabs {
            position: relative; display: flex; background: #e4e7ed;
            border-radius: 30px; padding: 4px; width: 100%; 
            box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
        }
        .settings-tab {
            flex: 1; text-align: center; position: relative; z-index: 2;
            padding: 8px 0; font-size: 14px; font-weight: bold;
            color: #7f8c8d; cursor: pointer; transition: color 0.3s;
            user-select: none;
        }
        .settings-tabs[data-active="account"] #sTabAccount,
        .settings-tabs[data-active="interface"] #sTabInterface,
        .settings-tabs[data-active="more"] #sTabMore {
            color: var(--primary);
        }
        .settings-tab-slider {
            position: absolute; top: 4px; bottom: 4px; left: 4px;
            width: calc(33.333% - 2.66px); background: var(--surface); border-radius: 30px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
            transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            z-index: 1; pointer-events: none;
        }
        .settings-tabs[data-active="account"] .settings-tab-slider { transform: translateX(0); }
        .settings-tabs[data-active="interface"] .settings-tab-slider { transform: translateX(100%); }
        .settings-tabs[data-active="more"] .settings-tab-slider { transform: translateX(200%); }
        
        .settings-panel { display: none; animation: fadeIn 0.3s ease-out; }
        .settings-panel.active { display: block; }
        /* 设置页面的主容器 */
.settings-page-wrapper {
    width: 95%; 
    max-width: 900px; /* 页面太宽反而不好看，限制在 900px */
    margin: 20px auto 60px auto; 
    background: var(--surface);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    padding: 30px 40px;
    box-sizing: border-box;
    animation: fadeIn 0.3s ease-out;
    min-height: 60vh; /* 保证高度，防止底部页脚顶上来 */
}

/* 顶部标题栏和返回按钮 */
.settings-page-header {
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border);
    padding-bottom: 20px;
    gap: 20px;
}

.back-to-gallery-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    background: var(--bg-color);
    color: var(--text-main);
    border: 1px solid var(--border);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.back-to-gallery-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateX(-2px); /* 鼠标悬浮时有一个轻轻向左的提示动作 */
}

/* 手机端适配 */
@media (max-width: 800px) {
    .settings-page-wrapper {
        width: 100%;
        margin: 0;
        border-radius: 0;
        border: none;
        padding: 20px 15px;
        min-height: calc(100vh - 110px);
    }
}
/* ================= 新版设置页（仿参考图）专属样式 ================= */
.settings-nav-tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    margin-top: 20px;
    gap: 40px;
}
.settings-nav-tab {
    padding: 12px 0;
    font-size: 15px;
    color: #9ca3af;
    cursor: pointer;
    position: relative;
    font-weight: 500;
    transition: color 0.3s;
}
.settings-nav-tab:hover {
    color: #38b2ac; /* 参考图的青色 */
}
.settings-nav-tab.active {
    color: #38b2ac;
    font-weight: bold;
}
.settings-nav-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 3px;
    background-color: #38b2ac;
}

.panel-section-title {
    color: #38b2ac;
    font-size: 22px;
    margin: 30px 0;
    font-weight: normal;
}
.profile-settings-layout {
    display: flex;
    gap: 60px;
    flex-wrap: wrap;
}
.profile-media-col {
    flex: 1;
    min-width: 200px;
    max-width: 280px;
}
.profile-info-col {
    flex: 2;
    min-width: 300px;
    margin-top: 10px; /* 对齐左侧 */
}

/* 头像与背景预览区 */
.media-group label {
    display: block;
    color: var(--text-sub);
    font-size: 14px;
    margin-bottom: 15px;
}
.setting-avatar-preview {
    width: 130px;
    height: 130px;
    border-radius: 50%; /* 如果你想和参考图一样方，去掉这行即可 */
    border: 1px solid var(--border);
    overflow: hidden;
    margin-bottom: 15px;
    background: var(--bg-color);
}
.setting-avatar-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.setting-banner-preview {
    width: 100%;
    height: 90px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: linear-gradient(135deg, #a8c0ff 0%, #3f2b96 100%);
    background-size: cover;
    background-position: center;
    margin-bottom: 15px;
}
.media-actions { margin-bottom: 10px; }
.media-helper {
    font-size: 12px;
    color: var(--text-sub);
    line-height: 1.6;
}
.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
    border-radius: 4px;
    cursor: pointer;
}

/* 右侧信息列表 */
.info-row {
    margin-bottom: 30px;
}
.info-label {
    color: var(--text-sub);
    font-size: 14px;
    margin-bottom: 12px;
}
.info-value-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    padding-bottom: 10px;
}
.info-value {
    font-size: 15px;
    color: var(--text-main);
}
.icon-action-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 16px;
    opacity: 0.5;
    transition: 0.2s;
    padding: 0;
}
.icon-action-btn:hover {
    opacity: 1;
    transform: scale(1.1);
}
