/* AIseek css/app — restored from 8864c52 baseline */
body, body * {
            -webkit-user-select: text !important;
            user-select: text !important;
        }
        button, .btn, .btn-primary, [role="button"], .status-pill, .p-del, .drag-handle {
            -webkit-user-select: none !important;
            user-select: none !important;
        }
        :root {
            --bg-color: #161823;
            --nav-bg: #161823;
            --surface: #141a23;
            --surface-soft: #1a2230;
            --primary-color: #00d4aa;
            --primary-hover: #00e6b8;
            --text-color: #f0f4f8;
            --text-secondary: rgba(240,244,248,0.65);
            --border-color: rgba(255,255,255,0.08);
            --seg-bg: rgba(255,255,255,0.06);
            --seg-bg-active: rgba(255,255,255,0.10);
            --radius-sm: 8px;
            --radius-md: 12px;
            --radius-lg: 16px;
            --shadow-sm: 0 2px 8px rgba(0,0,0,0.2);
            --shadow-md: 0 4px 16px rgba(0,0,0,0.25);
            --nav-reserved: calc(var(--nav-arrows-right) + var(--nav-arrows-size) + var(--video-edge-gap));
            --comments-arrow-gap: 0px;
            --sidebar-width: 140px;
            --header-height: 56px;
            --jx-gap: 16px;
            --comments-panel-width: 380px;
            --nav-arrows-size: 40px;
            --nav-arrows-gap: 16px;
            --nav-arrows-right: 8px;
            --profile-hero-height: 190px;
            --video-edge-gap: 6px;
            --profile-pad-left: clamp(16px, 4vw, 50px);
            --profile-pad-right: clamp(0px, 1.2vw, 12px);
            --hero-fade: rgba(22,24,35,0.80);
        }
        :root[data-theme="light"] {
            --bg-color: #f8fafc;
            --nav-bg: #ffffff;
            --surface: #ffffff;
            --surface-soft: #f1f5f9;
            --primary-color: #0d9488;
            --primary-hover: #0f766e;
            --text-color: #0f172a;
            --text-secondary: rgba(15,23,42,0.65);
            --border-color: rgba(15,23,42,0.12);
            --seg-bg: rgba(15,23,42,0.05);
            --seg-bg-active: rgba(15,23,42,0.08);
            --hero-fade: rgba(255,255,255,0.92);
        }
        :root[data-theme="light"] body { background-color: var(--bg-color); color: var(--text-color); }
        :root[data-theme="light"] .navbar { background: rgba(255,255,255,0.92); }
        :root[data-theme="light"] .sidebar { background: var(--bg-color); }
        :root[data-theme="light"] .content-area { background: var(--bg-color); }
        :root[data-theme="light"] #page-recommend { background: var(--bg-color); }
        :root[data-theme="light"] .video-slide { background: var(--bg-color); }
        :root[data-theme="light"] .search-bar { background: rgba(0,0,0,0.06); }
        :root[data-theme="light"] .search-bar:focus-within { background: rgba(0,0,0,0.10); }
        :root[data-theme="light"] .search-dropdown { background: #ffffff; }
        :root[data-theme="light"] .modal-content { background: #ffffff; color: var(--text-color); }
        :root[data-theme="light"] .form-input { background: rgba(0,0,0,0.04); border: 1px solid rgba(0,0,0,0.10); color: var(--text-color); }
        :root[data-theme="light"] .settings-nav-item { color: rgba(0,0,0,0.72); }
        :root[data-theme="light"] .settings-nav-item:hover { background: rgba(0,0,0,0.04); }
        :root[data-theme="light"] .settings-nav-item.active { background: rgba(0,0,0,0.06); color: rgba(0,0,0,0.90); }
        :root[data-theme="light"] .settings-nav-item i { color: rgba(0,0,0,0.35) !important; }
        :root[data-theme="light"] span[style*="color: white"] { color: var(--text-color) !important; }
        :root[data-theme="light"] div[style*="color: white"] { color: var(--text-color) !important; }
        :root[data-theme="light"] span[style*="color:rgba(255,255,255"] { color: var(--text-color) !important; }
        :root[data-theme="light"] div[style*="color:rgba(255,255,255"] { color: var(--text-color) !important; }
        :root[data-theme="light"] .logo-container svg [stroke="white"] { stroke: var(--text-color) !important; }
        :root[data-theme="light"] .logo-container svg [fill="#fff"] { fill: var(--text-color) !important; }
        * { margin: 0; padding: 0; box-sizing: border-box; }
        body { 
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; 
            background-color: var(--bg-color); 
            color: var(--text-color); 
            overflow: hidden; /* App-like feel */
            height: 100svh;
        }
        @supports (height: 100dvh) {
            body { height: 100dvh; }
        }
        
        /* --- Header --- */
        .navbar {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0 24px;
            height: var(--header-height);
            background: var(--bg-color);
            backdrop-filter: blur(16px);
            position: fixed;
            top: 0;
            width: 100%;
            z-index: 100;
        }
        /* --- Profile Hero & Header --- */
        body.profile-hero .navbar {
            background: var(--bg-color);
            backdrop-filter: blur(16px);
            box-shadow: none;
        }
        body.profile-hero .main-container {
            margin-top: 0;
            height: 100vh;
        }
        body.profile-hero .sidebar {
            top: var(--header-height); /* Keep sidebar below header area */
            background: var(--hero-fade);
        }
        body.profile-hero .content-area {
            top: 0;
            bottom: 0;
            height: 100vh;
        }
        
        /* Profile Header - Under Navbar */
        .profile-header {
            position: relative;
            width: 100%;
            height: 420px; /* Avoid clipping meta line */
            margin-top: 0;
            padding-top: var(--header-height); /* Push content down */
            overflow: hidden;
            flex-shrink: 0;
        }
        
        .profile-banner {
            position: absolute;
            inset: 0;
            width: 100%;
            height: 100%;
            background-color: #333;
            background-size: cover;
            background-position: center;
            z-index: 0;
        }
        .profile-banner::after {
            content: '';
            position: absolute;
            inset: 0;
            background:
                linear-gradient(to right, var(--bg-color) 0%, transparent 50%),
                linear-gradient(to top, var(--bg-color) 0%, transparent 45%);
            pointer-events: none;
        }

        .profile-header-inner {
            position: relative;
            z-index: 2;
            display: flex;
            align-items: flex-end; /* Align bottom */
            height: 100%;
            padding: 0 50px 56px 50px; /* Bottom padding */
            gap: 24px;
            background: linear-gradient(to top, var(--bg-color) 0%, var(--hero-fade) 30%, transparent 100%);
        }

        /* Creator Page - Columns */
        .creator-grid {
            display: grid;
            grid-template-columns: 1fr 1fr; /* Default 2 columns (Manual) */
            gap: 20px;
        }
        .creator-grid.ai-mode {
            grid-template-columns: 1fr 1fr 1fr; /* 3 columns (AI) */
        }
        /* Make preview column content wider */
        .creator-media {
            height: 520px;
            width: 100%;
        }

        /* Search Grid - Adaptive */
        .search-grid {
            display: grid;
            grid-template-columns: repeat(4, minmax(0, 1fr));
            gap: 16px;
            padding-right: 12px;
        }
        .search-grid.mode-video { grid-template-columns: repeat(4, minmax(0, 1fr)); }
        .search-grid.mode-user {
            grid-template-columns: 1fr; /* List view */
        }
        .search-grid.mode-all {
            grid-template-columns: repeat(4, 1fr); /* Default 4 cols for mix */
        }
        
        /* Jingxuan Popup - Larger & Persistent */
        .jx-hover-popup {
            position: fixed;
            z-index: 1000;
            width: 480px;
            aspect-ratio: 16/9;
            background: #000;
            border-radius: var(--radius-md);
            box-shadow: var(--shadow-md);
            border: 1px solid var(--border-color);
            overflow: hidden;
            display: none;
            opacity: 0;
            transition: opacity 0.2s;
            pointer-events: auto;
        }
        .jx-popup-controls {
            position: absolute;
            bottom: 0; left: 0; right: 0;
            padding: 12px;
            background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
            display: flex;
            justify-content: space-between;
            align-items: center;
            opacity: 0;
            transition: opacity 0.2s;
        }
        .jx-hover-popup:hover .jx-popup-controls { opacity: 1; }

        
        /* Logo: Colorful Sound Waves */
        .logo-container {
            display: flex;
            align-items: center;
            gap: 6px;
            cursor: pointer;
            margin-top: 6px;
        }
        .logo-ai { color: var(--text-color); }
        .logo-svg { width: 100px; height: 36px; } /* Smaller disc/waves and slightly lower */
        
        .search-bar {
            display: flex;
            align-items: center;
            background: var(--surface-soft);
            border: none;
            border-radius: var(--radius-md);
            padding: 0 16px;
            width: 400px;
            height: 42px;
            margin: 0 20px;
            position: relative;
            transition: all 0.2s ease;
            box-shadow: none;
        }
        .search-bar:focus-within { background: var(--surface); border-color: rgba(0,212,170,0.4); box-shadow: 0 0 0 2px rgba(0,212,170,0.15); }
        .navbar .search-bar { border-bottom: none; }
        .search-bar input {
            background: transparent;
            border: none;
            color: var(--text-color);
            flex: 1;
            font-size: 14px;
            outline: none;
        }
        .search-bar i { color: var(--text-secondary); cursor: pointer; }
        
        /* Search Hot Words Dropdown */
        .search-dropdown {
            position: absolute;
            top: 48px;
            left: 0;
            width: 100%;
            background: var(--surface);
            border: 1px solid var(--border-color);
            border-radius: var(--radius-md);
            padding: 12px 0;
            box-shadow: var(--shadow-md);
            display: none;
            z-index: 110;
        }
        .search-dropdown.active { display: block; }
        .search-history-head {
            padding: 0 16px 8px;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }
        .search-history-title { font-size: 13px; color: var(--text-secondary); font-weight: 600; }
        .search-history-clear { font-size: 12px; color: var(--primary-color); font-weight: 700; cursor: pointer; }
        .hot-word-title {
            padding: 0 16px 8px;
            font-size: 13px;
            color: var(--text-secondary);
            font-weight: 600;
        }
        .hot-word-item {
            padding: 8px 16px;
            display: flex;
            align-items: center;
            gap: 10px;
            cursor: pointer;
            transition: background 0.2s;
        }
        .hot-word-item:hover { background: var(--seg-bg); }
        .hot-rank {
            width: 18px; height: 18px;
            background: var(--seg-bg-active);
            color: var(--text-secondary);
            font-size: 11px;
            display: flex; align-items: center; justify-content: center;
            border-radius: 4px;
            font-weight: 700;
        }
        .hot-rank.top3 { background: var(--primary-color); color: white; }
        .hot-text { font-size: 14px; color: var(--text-color); flex: 1; }
        .hot-tag { font-size: 10px; padding: 2px 4px; border-radius: 2px; color: white; }
        .tag-new { background: #ffb800; }
        .tag-hot { background: var(--primary-color); }
        
        /* Header Dropdowns (Notification & DM) */
        .header-drop-wrap { position: relative; display: flex; align-items: center; height: 100%; }
        .header-drop-menu {
            position: absolute;
            top: 100%;
            right: -10px;
            width: 360px;
            background: var(--surface);
            border-radius: var(--radius-md);
            box-shadow: var(--shadow-md);
            display: none;
            flex-direction: column;
            z-index: 120;
            padding: 8px 0;
            border: 1px solid var(--border-color);
        }
        /* Bridge to prevent closing on hover gap */
        .header-drop-wrap:hover .header-drop-menu, .header-drop-menu:hover { display: flex; }
        
        .drop-header { padding: 10px 16px; border-bottom: 1px solid var(--border-color); font-weight: 600; font-size: 14px; display:flex; justify-content:space-between; align-items:center; color: var(--text-color); }
        .drop-list { max-height: 400px; overflow-y: auto; }
        .drop-item { padding: 10px 16px; display: flex; gap: 10px; align-items: flex-start; cursor: pointer; border-bottom: 1px solid var(--border-color); }
        .drop-item:hover { background: var(--seg-bg); }
        .drop-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
        .drop-content { flex: 1; min-width: 0; }
        .drop-name { font-size: 13px; font-weight: 600; margin-bottom: 4px; }
        .drop-text { font-size: 12px; color: var(--text-secondary); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
        .drop-time { font-size: 11px; color: var(--text-secondary); margin-top: 4px; opacity: 0.8; }
        .drop-footer { padding: 10px; text-align: center; font-size: 12px; color: var(--text-secondary); cursor: pointer; border-top: 1px solid var(--border-color); }
        .drop-footer:hover { color: var(--text-color); }
        .avatar-wrap { position: relative; display: flex; align-items: center; height: 100%; }
        .user-hover-menu {
            position: absolute;
            top: 100%;
            right: -8px;
            width: 280px;
            border-radius: 18px;
            box-shadow: 0 18px 70px rgba(0,0,0,0.62);
            border: 1px solid rgba(255,255,255,0.12);
            display: none;
            z-index: 140;
            overflow: hidden;
            background: var(--um-bg-user,
                radial-gradient(900px 520px at 20% -10%, rgba(0,212,170,0.15) 0%, transparent 55%),
                radial-gradient(800px 520px at 100% 0%, rgba(0,212,170,0.08) 0%, transparent 60%),
                linear-gradient(180deg, var(--surface) 0%, var(--bg-color) 100%)
            );
            background-size: cover;
            background-position: center;
            backdrop-filter: blur(16px);
        }
        .avatar-wrap:hover .user-hover-menu, .user-hover-menu:hover { display: block; }
        .um-top { padding: 14px 14px 12px; display:flex; gap: 12px; align-items:center; border-bottom: 1px solid rgba(255,255,255,0.10); }
        .um-avatar { width: 46px; height: 46px; border-radius: 16px; object-fit: cover; border:1px solid rgba(255,255,255,0.12); }
        .um-name { font-weight: 850; color: rgba(255,255,255,0.92); font-size: 14px; letter-spacing:0.2px; }
        .um-sub { margin-top: 4px; font-size: 12px; color: rgba(255,255,255,0.50); }
        .um-row { display:flex; gap: 10px; padding: 10px 14px; font-size: 12px; color: rgba(255,255,255,0.80); border-bottom: 1px solid rgba(255,255,255,0.10); }
        .um-row span { flex: 1; }
        .um-list { padding: 8px 0; }
        .um-item { padding: 11px 14px; display:flex; justify-content:space-between; align-items:center; cursor:pointer; color: rgba(255,255,255,0.86); font-size: 13px; transition: background 0.16s ease, transform 0.16s ease; }
        .um-item:hover { background: rgba(255,255,255,0.06); transform: translateY(-1px); }
        .um-num { color: rgba(255,255,255,0.55); font-size: 12px; }
        .um-left { display:flex; align-items:center; gap:10px; min-width:0; }
        .um-text { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
        .um-ico { width: 26px; height: 26px; border-radius: 10px; display:flex; align-items:center; justify-content:center; color:white; flex: 0 0 auto; box-shadow: 0 10px 28px rgba(0,0,0,0.35); }
        .um-ico-like { background: linear-gradient(135deg, rgba(254,44,85,0.95) 0%, rgba(255,84,84,0.90) 55%, rgba(255,164,69,0.86) 100%); }
        .um-ico-fav { background: linear-gradient(135deg, rgba(0,212,255,0.95) 0%, rgba(86,92,255,0.92) 60%, rgba(144,99,255,0.88) 100%); }
        .um-ico-his { background: linear-gradient(135deg, rgba(64,255,156,0.92) 0%, rgba(0,212,255,0.78) 100%); }
        .um-ico-work { background: linear-gradient(135deg, rgba(255,192,74,0.95) 0%, rgba(254,44,85,0.80) 100%); }
        .um-ico-out { background: rgba(255,255,255,0.14); color: rgba(255,255,255,0.78); }
        .um-logout { color: var(--primary-color); }
        .um-logout:hover { background: rgba(0,212,170,0.12); }

        .nav-right { display: flex; align-items: center; gap: 24px; height: 100%; }
        .upload-btn {
            background: linear-gradient(135deg, var(--primary-color) 0%, #00b894 100%);
            color: #0a0e14;
            padding: 0 20px;
            height: 40px;
            border-radius: var(--radius-md);
            border: none;
            cursor: pointer;
            font-weight: 700;
            font-size: 14px;
            display: flex;
            align-items: center;
            gap: 8px;
            box-shadow: 0 2px 8px rgba(0,212,170,0.35);
            transition: all 0.2s ease;
        }
        .upload-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,212,170,0.45); }
        .nav-icon { font-size: 22px; cursor: pointer; color: var(--text-secondary); position: relative; transition: color 0.2s; }
        .nav-icon:hover { color: var(--text-color); }
        .user-avatar {
            width: 32px; height: 32px; border-radius: 50%;
            background-size: cover; background-position: center;
            cursor: pointer; border: 1px solid var(--border-color);
        }

        /* --- Main Layout --- */
        .main-container {
            display: flex;
            margin-top: var(--header-height);
            height: calc(100svh - var(--header-height));
            width: 100%;
            max-width: none;
            margin-left: 0;
            margin-right: 0;
        }
        @supports (height: 100dvh) {
            .main-container { height: calc(100dvh - var(--header-height)); }
        }
        
        /* Sidebar */
        .sidebar {
            width: var(--sidebar-width);
            background: var(--bg-color);
            overflow-y: auto;
            padding: 6px 0;
            display: flex;
            flex-direction: column;
            position: fixed; /* Fixed sidebar */
            top: var(--header-height);
            bottom: 0;
            left: 0;
            z-index: 90;
        }
        .nav-item {
            padding: 8px 12px;
            display: flex;
            align-items: center;
            gap: 10px;
            font-size: 14px;
            color: var(--text-color);
            cursor: pointer;
            transition: all 0.2s ease;
            border-radius: var(--radius-sm);
            margin: 0 6px;
            border: 1px solid transparent;
        }
        .nav-item:hover { background: var(--seg-bg); border-color: var(--border-color); }
        .nav-item.active {
            color: var(--text-color);
            font-weight: 600;
            background: var(--seg-bg-active);
            border: none;
            box-shadow: none;
        }
        .nav-item-disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }
        .nav-item i { width: 24px; text-align: center; }
        .nav-group-title { padding: 20px 24px 8px; font-size: 12px; color: var(--text-secondary); }

        @media (max-width: 1100px) {
            .main-container { max-width: 100%; }
        }

        /* --- Layout Adjustments (Closer to Menu, Closer to Top) --- */
        .content-area {
            position: fixed;
            top: var(--header-height);
            bottom: 0;
            left: var(--sidebar-width);
            right: 0;
            margin-left: 0;
            padding: 0;
            overflow-y: auto;
            background: var(--bg-color);
        }
        #page-recommend { padding-top: 10px; }
        #page-creator { padding-top: 4px; }
        #page-inbox { display: none !important; }
        
        /* Recommend & Featured Pages: Reduce gap from menu */
        #page-recommend, #page-jingxuan {
             margin: 0;
        }
        
        /* Featured Page Specifics */
        #page-jingxuan {
             padding-top: 0; /* Move closer to search box */
        }
        .category-tabs {
            margin-bottom: 0;
            margin-top: 0;
            padding-left: 0;
            position: sticky; top: 0; z-index: 10; background: var(--nav-bg);
        }
        
        /* Right side videos gap from edge */
        .jx-featured {
             padding-right: 20px; /* Leave gap from right edge */
        }
        .jingxuan-grid {
             padding-right: 20px;
        }

        /* Friends/Follow Page Layout */
        #page-following, #page-friends {
            background: var(--bg-color);
            overflow: hidden;
        }
        .friends-layout {
            display: flex;
            height: 100%;
            overflow: hidden;
        }
        .friends-list-panel {
            width: 84px;
            background: var(--bg-color);
            border-right: none;
            display: flex;
            flex-direction: column;
            overflow-y: auto;
        }
        .friends-list-panel .search-bar { display: none; }
        .friends-list-panel .p-tab { padding: 8px 0; font-size: 12px; }
        .friends-list-panel #subtab_following, .friends-list-panel #subtab_followers { flex: 1; text-align: center; }
        .friends-list-panel > div { padding-left: 8px !important; padding-right: 8px !important; }
        .friends-panel-title {
            height: 44px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 800;
            color: var(--text-color);
            letter-spacing: 0.4px;
        }
        .friends-main-panel {
            flex: 1;
            background: var(--bg-color);
            position: relative;
            display: flex;
            align-items: center;
            justify-content: center;
            overflow-y: hidden;
        }
        .friend-item {
            padding: 12px 0;
            display: flex;
            gap: 12px;
            cursor: pointer;
            transition: background 0.2s;
            justify-content: center;
        }
        .friend-item:hover, .friend-item.active {
            background: var(--seg-bg);
        }
        .friend-avatar-wrap { flex-shrink: 0; display: flex; }
        .friend-avatar {
            width: 48px; height: 48px; border-radius: 50%; object-fit: cover;
            border: 1px solid var(--border-color);
        }
        .friend-info { display: none; }
        .friend-name { font-weight: 600; font-size: 15px; margin-bottom: 4px; color:var(--text-color); }
        .friend-status { font-size: 12px; color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

        #followModal .friend-item {
            justify-content: flex-start;
            align-items: center;
            padding: 10px 12px;
        }
        #followModal .friend-info { display: block; }

        /* Video Feed in Friends Page (Single Column) */
        .friend-feed-shell {
            position: relative;
            width: 100%;
            height: 100%;
            padding-top: 10px;
            padding-right: var(--nav-reserved);
            box-sizing: border-box;
        }
        .friend-feed-container {
            width: 100%;
            height: 100%;
            overflow-y: scroll;
            scroll-snap-type: y mandatory;
            scrollbar-width: none;
        }
        .friend-feed-container::-webkit-scrollbar { display: none; }
        .friend-nav-arrows {
            position: absolute;
            right: var(--nav-arrows-right);
            top: 50%;
            transform: translateY(-50%);
            display: flex;
            flex-direction: column;
            gap: 12px;
            z-index: 12;
            pointer-events: auto;
        }
        .friend-feed-item {
            height: 100%;
            width: 100%;
            scroll-snap-align: start;
            position: relative;
            background: var(--bg-color);
            display: flex;
            justify-content: center;
        }
        
        /* --- Pages --- */
        .page-container {
            width: 100%;
            height: 100%;
            display: none; /* Hidden by default */
            overflow-y: auto;
        }
        .page-container.active { display: block; }

        /* 1. Recommend Page (Vertical Scroll) */
        #page-recommend {
            background: var(--bg-color);
            overflow-y: scroll;
            scroll-snap-type: y mandatory;
            scrollbar-width: none; /* Hide scrollbar */
            padding-top: 10px;
            padding-right: var(--nav-reserved);
            height: 100%;
            box-sizing: border-box;
        }
        body.comments-open #page-recommend { padding-right: var(--nav-reserved); }
        #page-recommend::-webkit-scrollbar { display: none; }
        
        .video-slide {
            width: 100%;
            height: 100%;
            position: relative;
            scroll-snap-align: start;
            display: flex;
            justify-content: flex-start;
            align-items: stretch;
            padding: 0;
            background: var(--bg-color);
            box-sizing: border-box;
        }
        .video-player-container {
            flex: 1 1 auto;
            min-width: 0;
            width: 100%;
            height: calc(100% - 16px);
            margin: 8px 0 8px 0;
            position: relative;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: var(--radius-lg);
            overflow: hidden;
            background: #000;
            box-shadow: var(--shadow-md);
            border: 1px solid var(--border-color);
            --media-pos-x: 50%;
        }
        .video-player-container video, .video-player-container img {
            width: 100%;
            height: 100%;
            object-fit: cover !important;
            object-position: var(--media-pos-x) 50%;
            display: block;
            background: transparent;
        }
        
        /* Right Side Actions */
        .video-actions {
            position: absolute;
            right: 12px;
            bottom: 100px;
            display: flex;
            flex-direction: column;
            gap: 20px;
            align-items: center;
            z-index: 10;
            transition: opacity 0.3s;
        }

        .video-nav-arrows {
            position: fixed;
            right: var(--nav-arrows-right);
            top: 50%;
            transform: translateY(-50%);
            display: flex;
            flex-direction: column;
            gap: 12px;
            z-index: 12;
        }
        .nav-arrow {
            width: var(--nav-arrows-size);
            height: var(--nav-arrows-size);
            border-radius: 999px;
            background: var(--surface-soft);
            border: 1px solid var(--border-color);
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.2s ease;
            color: var(--text-color);
            font-size: 16px;
        }
        .nav-arrow:hover { background: rgba(0,212,170,0.2); border-color: rgba(0,212,170,0.4); color: var(--primary-color); }
        .action-item { text-align: center; cursor: pointer; }
        .action-icon {
            width: 48px; height: 48px;
            background: var(--surface-soft);
            border: 1px solid var(--border-color);
            border-radius: 50%;
            display: flex; align-items: center; justify-content: center;
            font-size: 24px; color: var(--text-color);
            transition: all 0.2s ease;
            margin-bottom: 5px;
        }
        .action-icon:hover { background: rgba(0,212,170,0.2); border-color: rgba(0,212,170,0.4); color: var(--primary-color); }
        .action-text { font-size: 12px; color: white; font-weight: 600; text-shadow: 0 1px 2px rgba(0,0,0,0.5); }
        .avatar-action img { width: 48px; height: 48px; border-radius: 50%; border: 2px solid white; }
        .avatar-action { position: relative; }
        .follow-plus {
            position: absolute; bottom: -5px; left: 50%; transform: translateX(-50%);
            background: var(--primary-color); width: 18px; height: 18px; border-radius: 50%;
            display: flex; align-items: center; justify-content: center; font-size: 10px; color: #0a0e14;
        }
        .vol-btn { position: relative; }
        .v-vol-pop {
            display: none;
            position: absolute;
            bottom: 44px;
            left: 50%;
            transform: translateX(-50%);
            width: 44px;
            height: 150px;
            padding: 10px 8px 12px;
            border-radius: 14px;
            background: rgba(0,0,0,0.65);
            border: 1px solid rgba(255,255,255,0.14);
            backdrop-filter: blur(10px);
        }
        .v-vol-pop.active { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; }
        .vol-btn:hover .v-vol-pop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; }
        .v-vol-slider {
            width: 120px;
            height: 4px;
            transform: rotate(-90deg);
            transform-origin: center;
            accent-color: var(--primary-color);
        }
        .v-vol-pct { font-size: 12px; color: rgba(255,255,255,0.85); }

        /* Bottom Info */
        .video-info-overlay {
            position: absolute;
            left: 12px;
            bottom: 80px;
            width: 60%;
            max-height: 30%;
            z-index: 10;
            text-shadow: 0 1px 2px rgba(0,0,0,0.5);
            transition: opacity 0.3s;
            overflow: hidden;
        }
        .video-author { font-size: 18px; font-weight: 700; margin-bottom: 10px; cursor: pointer; background: transparent !important; }
        .video-author:hover { background: transparent !important; }
        .video-desc {
            font-size: 15px; line-height: 1.4; margin-bottom: 10px;
            display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
            overflow: hidden; word-break: break-word; max-height: 2.8em;
        }
        .video-music { font-size: 13px; display: flex; align-items: center; gap: 5px; }
        .video-stats { font-size: 12px; color: rgba(255,255,255,0.75); margin-top: 6px; }
        
        /* --- Enhanced Video Controls --- */
        .video-controls-bar {
            position: absolute; bottom: 0; left: 0; width: 100%; height: 60px;
            background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
            display: flex; flex-direction: column; justify-content: flex-end;
            padding: 0 20px 10px; z-index: 20;
            opacity: 0; transition: opacity 0.3s;
        }
        .video-slide:hover .video-controls-bar { opacity: 1; }
        @media (hover: none) { .video-controls-bar { opacity: 1; } }
        
        .v-progress-top-row { margin-bottom: 6px; font-size: 12px; color: rgba(255,255,255,0.85); display: flex; align-items: center; gap: 6px; }
        .v-view-count { display: inline-flex; align-items: center; gap: 4px; }
        .v-view-count i { font-size: 11px; opacity: 0.9; }
        .v-progress-container {
            width: 100%; height: 4px; background: rgba(255,255,255,0.2);
            border-radius: 2px; cursor: pointer; margin-bottom: 10px;
            position: relative;
        }
        .v-progress-filled { height: 100%; background: white; width: 0%; border-radius: 2px; }
        .v-progress-container:hover { height: 6px; }
        .v-progress-container:hover .v-progress-filled { background: var(--primary-color); }
        :root[data-theme="light"] .v-progress-filled { background: var(--primary-color); }

        .v-controls-row {
            display: flex; align-items: center; justify-content: space-between;
            color: white; font-size: 14px;
        }
        .v-left { display: flex; align-items: center; gap: 15px; }
        .v-time { font-size: 12px; color: #ddd; }
        
        .v-center { flex: 1; display: flex; justify-content: center; padding: 0 20px; }
        .danmaku-input-box {
            background: rgba(255,255,255,0.1); border-radius: 20px;
            padding: 5px 15px; width: 100%; max-width: 400px;
            display: flex; align-items: center;
        }
        .danmaku-input-box input {
            background: transparent; border: none; color: white; width: 100%; outline: none; font-size: 12px;
        }

        .v-right { display: flex; align-items: center; gap: 15px; position: relative; }
        .v-btn { cursor: pointer; color: rgba(255,255,255,0.9); display: flex; align-items: center; gap: 5px; font-size: 13px; position: relative; }
        .v-btn:hover { color: white; }
        
        /* Speed Menu - Fixed hover gap */
        .speed-menu {
            position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%);
            background: rgba(0,0,0,0.8); border-radius: 4px; padding: 5px 0;
            display: none; flex-direction: column; width: 60px;
            margin-bottom: 10px; /* Space between button and menu */
        }
        /* Invisible bridge to prevent menu disappearing on hover transition */
        .speed-menu::after {
            content: ''; position: absolute; top: 100%; left: 0; width: 100%; height: 10px;
        }
        .speed-btn:hover .speed-menu { display: flex; }
        .speed-opt { padding: 5px 0; text-align: center; cursor: pointer; font-size: 12px; }
        .speed-opt:hover { background: rgba(255,255,255,0.2); }
        .speed-opt.active { color: var(--primary-color); }
        .dm-hover-item:hover { background: transparent; }
        
        /* Active States */
        .v-btn.active { color: var(--primary-color); }
        
        /* 2. Jingxuan Page (Grid) */
        #page-jingxuan {
            background: var(--bg-color);
            padding: 0 12px 22px 0;
        }
        .category-tabs {
            position: sticky; top: 0; z-index: 10;
            display: flex; gap: 12px;
            background: var(--nav-bg);
            padding: 6px 0;
            overflow-x: auto; white-space: nowrap;
            border-bottom: none;
            margin-top: 0;
            margin-bottom: 0;
            opacity: 1;
            backdrop-filter: none;
        }
        .tab-item {
            color: var(--text-secondary); cursor: pointer; font-size: 15px;
            padding: 6px 12px; position: relative; border-radius: 999px; border: none;
        }
        .tab-item.active { color: var(--text-color); font-weight: 600; background: var(--seg-bg-active); border: none; box-shadow: none; }
        
        .jingxuan-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(246px, 1fr));
            gap: var(--jx-gap);
            grid-auto-rows: 420px;
        }

        .jingxuan-featured {
            display: grid;
            grid-template-columns: minmax(0, 2.8fr) minmax(0, 1fr);
            gap: var(--jx-gap);
            height: var(--jx-featured-h, 640px);
            margin-bottom: 22px;
        }
        .jx-below-row {
            display: grid;
            grid-template-columns: minmax(0, 0.93fr) minmax(0, 0.93fr) minmax(0, 0.93fr) minmax(0, 1fr);
            gap: var(--jx-gap);
            height: calc((var(--jx-featured-h, 640px) - var(--jx-gap)) / 2);
            margin-bottom: 14px;
        }
        .jx-below-row .jx-card { height: 100%; aspect-ratio: auto; }
        .jx-main-player {
            border-radius: 12px;
            overflow: hidden;
            position: relative;
            background: rgba(0,0,0,0.6);
            box-shadow: 0 12px 36px rgba(0,0,0,0.45);
        }
        .jx-main-player video, .jx-main-player img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        .jx-side-grid {
            display: grid;
            grid-template-rows: repeat(2, 1fr);
            gap: var(--jx-gap);
            min-height: 0;
        }
        .jx-side-grid .jx-card {
            aspect-ratio: auto;
            height: 100%;
        }

        .jx-controls-bar {
            position: absolute;
            left: 0;
            bottom: 0;
            width: 100%;
            height: 56px;
            display: flex;
            flex-direction: column;
            justify-content: flex-end;
            gap: 8px;
            padding: 0 14px 10px;
            background: linear-gradient(to top, rgba(0,0,0,0.78), rgba(0,0,0,0.0));
            z-index: 15;
        }
        .jx-progress {
            width: 100%;
            height: 4px;
            background: rgba(255,255,255,0.18);
            border-radius: 999px;
            cursor: pointer;
            position: relative;
        }
        .jx-progress-filled {
            height: 100%;
            width: 0%;
            border-radius: 999px;
            background: rgba(255,255,255,0.92);
        }
        .jx-controls-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            color: rgba(255,255,255,0.92);
            font-size: 13px;
        }
        .jx-controls-left { display: flex; align-items: center; gap: 10px; }
        .jx-controls-right { display: flex; align-items: center; gap: 12px; }
        .jx-ctrl-btn { cursor: pointer; color: rgba(255,255,255,0.92); }
        .jx-ctrl-btn:hover { color: white; }
        .jx-time { font-size: 12px; color: rgba(255,255,255,0.78); }
        .jx-vol-wrap { display:flex; align-items:center; gap:8px; }
        .jx-vol { width: 96px; height: 3px; }
        .jx-vol { width: 90px; accent-color: var(--primary-color); }

        /* Search Page - Integrated Layout */
        #page-search {
            /* padding: 0 20px 20px 10px;  Use same padding as content area */
            background: var(--bg-color);
            min-height: 100%;
        }
        
        .search-container {
            width: 100%;
            max-width: none;
            padding-left: 0;
            padding-right: 12px;
        }

        .search-topbar {
            position: sticky;
            top: 0;
            z-index: 20;
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 10px 0 8px 0; /* Align with content padding */
            background: var(--nav-bg);
            backdrop-filter: blur(8px);
        }
        .search-tabs { display:flex; align-items:center; gap: 10px; flex-wrap: nowrap; }
        .search-tab {
            padding: 8px 14px;
            border-radius: 999px;
            font-size: 13px;
            color: var(--text-secondary);
            cursor: pointer;
            user-select: none;
        }
        .search-tab.active { background: var(--seg-bg-active); color: var(--text-color); }
        .search-filter-pill {
            height: 30px;
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 0 10px;
            border-radius: 999px;
            border: 1px solid var(--border-color);
            background: rgba(255,255,255,0.02);
            color: var(--text-secondary);
            font-size: 12px;
            cursor: pointer;
            user-select: none;
        }
        .search-filter-pill.active {
            color: #ffc46b;
            border-color: rgba(255,196,107,0.45);
            background: rgba(255,196,107,0.12);
        }
        .search-filter-select {
            height: 30px;
            border-radius: 999px;
            border: 1px solid var(--border-color);
            background: rgba(255,255,255,0.02);
            color: var(--text-secondary);
            font-size: 12px;
            padding: 0 10px;
            outline: none;
            min-width: 96px;
        }
        .search-summary-sub { color: #8f9198; }
        .search-export-panel {
            position: fixed;
            inset: 0;
            background: rgba(0,0,0,0.46);
            z-index: 2200;
            display: none;
            align-items: center;
            justify-content: center;
            padding: 20px;
        }
        .search-export-panel.active { display: flex; }
        .search-export-sheet {
            width: min(920px, 92vw);
            max-height: 78vh;
            display: flex;
            flex-direction: column;
            background: var(--card-bg);
            border: 1px solid var(--border-color);
            border-radius: 14px;
            overflow: hidden;
        }
        .search-export-sheet-head {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 12px 14px;
            border-bottom: 1px solid var(--border-color);
            color: var(--text-color);
        }
        .search-export-sheet-title { font-size: 14px; font-weight: 600; }
        .search-export-filter {
            display: flex;
            gap: 8px;
            align-items: center;
            padding: 10px 14px;
            border-bottom: 1px solid var(--border-color);
        }
        .search-export-filter input {
            flex: 1;
            min-width: 0;
            height: 30px;
            border-radius: 999px;
            border: 1px solid var(--border-color);
            background: rgba(255,255,255,0.02);
            color: var(--text-color);
            font-size: 12px;
            padding: 0 12px;
            outline: none;
        }
        .search-export-sheet-body { padding: 10px; overflow: auto; display: flex; flex-direction: column; gap: 8px; }
        .search-export-row {
            border: 1px solid var(--border-color);
            border-radius: 10px;
            padding: 10px;
            display: flex;
            justify-content: space-between;
            gap: 10px;
            align-items: center;
            background: rgba(255,255,255,0.02);
        }
        .search-export-main { min-width: 0; }
        .search-export-title { color: var(--text-color); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .search-export-meta { color: #8f9198; font-size: 12px; margin-top: 4px; }
        .search-export-actions { display: inline-flex; gap: 8px; flex-wrap: wrap; }
        .search-export-btn {
            height: 28px;
            border-radius: 999px;
            border: 1px solid var(--border-color);
            background: rgba(255,255,255,0.03);
            color: var(--text-secondary);
            padding: 0 10px;
            cursor: pointer;
            font-size: 12px;
        }
        .search-export-btn.danger { color: #ff8f8f; border-color: rgba(255,143,143,0.45); }
        .search-export-pager {
            padding: 10px 14px;
            border-top: 1px solid var(--border-color);
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 8px;
            color: #8f9198;
            font-size: 12px;
        }
        .search-export-empty { text-align: center; color: #8f9198; padding: 26px 0; }
        .search-share-qr-panel {
            position: fixed;
            inset: 0;
            background: rgba(0,0,0,0.46);
            z-index: 2300;
            display: none;
            align-items: center;
            justify-content: center;
            padding: 20px;
        }
        .search-share-qr-panel.active { display: flex; }
        .search-share-qr-sheet {
            width: min(360px, 92vw);
            background: var(--card-bg);
            border: 1px solid var(--border-color);
            border-radius: 14px;
            padding: 14px;
            display: flex;
            flex-direction: column;
            gap: 10px;
            align-items: center;
        }
        .search-share-qr-link {
            width: 100%;
            color: #8f9198;
            font-size: 12px;
            word-break: break-all;
            text-align: left;
            max-height: 78px;
            overflow: auto;
        }
        
        .search-grid {
            display: grid;
            grid-template-columns: repeat(4, minmax(0, 1fr));
            gap: 16px;
            padding-right: 12px;
        }
        
        /* Search Card Styling - Larger */
        .s-card {
            background: var(--bg-color);
            border-radius: 12px;
            overflow: hidden;
            cursor: pointer;
            transition: transform 0.2s;
            border: 1px solid var(--border-color);
        }
        .s-card:hover { transform: translateY(-4px); }
        .s-media {
            position: relative;
            width: 100%;
            aspect-ratio: 16/9; /* Maintain ratio */
            border-radius: 12px;
            overflow: hidden;
            background: #000;
        }
        .s-media img, .s-media video {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
        }
        .s-media-controls {
            position: absolute;
            left: 8px;
            right: 8px;
            bottom: 8px;
            padding: 8px;
            border-radius: 12px;
            background: rgba(0,0,0,0.38);
            backdrop-filter: blur(10px);
            display: flex;
            flex-direction: column;
            gap: 8px;
            opacity: 0;
            transition: opacity 0.16s ease;
        }
        .s-card:hover .s-media-controls, .s-media-controls:focus-within { opacity: 1; }
        .s-media-progress {
            position: relative;
            width: 100%;
            height: 5px;
            border-radius: 999px;
            background: rgba(255,255,255,0.22);
            overflow: hidden;
            pointer-events: auto;
            cursor: pointer;
        }
        .s-media-progress-fill {
            height: 100%;
            width: 0%;
            border-radius: 999px;
            background: var(--primary-color);
        }
        .s-ctrl-row { display:flex; align-items:center; justify-content:space-between; gap: 10px; }
        .s-ctrl-left, .s-ctrl-right { display:flex; align-items:center; gap: 10px; min-width:0; }
        .s-ctrl-time { color: rgba(255,255,255,0.85); font-size: 12px; font-weight: 650; white-space: nowrap; }
        .s-ctrl-time-split { color: rgba(255,255,255,0.55); margin: 0 2px; }
        .s-ctrl-btn { width: 28px; height: 28px; border-radius: 10px; display:flex; align-items:center; justify-content:center; cursor:pointer; color: rgba(255,255,255,0.92); background: rgba(255,255,255,0.10); }
        .s-ctrl-btn:hover { background: rgba(255,255,255,0.16); }
        .s-ctrl-vol { width: 92px; height: 4px; accent-color: var(--primary-color); }
        .s-info { padding: 14px 4px 8px 4px; }
        .s-title {
            color: var(--text-color);
            font-size: 16px; /* Larger title */
            line-height: 1.4;
            margin-bottom: 8px;
            font-weight: 500;
            display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
        }
        .s-meta {
            display: flex; align-items: center; justify-content: space-between;
            color: var(--text-secondary); font-size: 13px;
        }
        .s-author { display: flex; align-items: center; gap: 6px; }
        .s-author img { width: 20px; height: 20px; border-radius: 50%; }

        /* Search Grid Modes */
        .search-grid.mode-video {
            grid-template-columns: repeat(4, minmax(0, 1fr));
            gap: 16px;
        }
        .search-grid.mode-user {
            grid-template-columns: 1fr; /* List view */
            gap: 12px;
        }
        .search-grid.mode-all {
            display: flex;
            flex-direction: column;
            gap: 30px;
        }
        
        .search-section-title {
            font-size: 15px; font-weight: 700; color: var(--text-color); margin-bottom: 16px; padding-left: 4px; border-left: 3px solid var(--primary-color); line-height: 1;
        }
        .search-waterfall {
            display: grid;
            grid-template-columns: repeat(4, minmax(0, 1fr));
            gap: 16px;
        }
        .jx-main-player {
            border-radius: 12px;
            overflow: hidden;
            position: relative;
            background: transparent; /* Remove black block */
            box-shadow: 0 12px 36px rgba(0,0,0,0.45);
        }
        .jingxuan-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr); /* Force 4 columns */
            gap: 12px;
            grid-auto-rows: auto;
        }
        .jx-hover-popup {
            position: fixed;
            z-index: 1000;
            width: 400px; /* 2x size of approx 200px card */
            aspect-ratio: 9/16;
            background: #000;
            border-radius: 12px;
            box-shadow: 0 10px 40px rgba(0,0,0,0.6);
            overflow: hidden;
            pointer-events: none; /* Let clicks pass through or handle separately? Usually hover popup is non-interactive or handles its own events. */
            display: none;
            opacity: 0;
            transition: opacity 0.2s;
        }
        .jx-hover-popup.active { display: block; opacity: 1; }
        .jx-hover-popup video { width: 100%; height: 100%; object-fit: cover; }
        
        /* Creator Updates */
        .creator-grid {
            display: grid;
            grid-template-columns: 1fr 1fr; /* Widen inputs */
            gap: 18px;
        }
        .s-title {
            color: #e6e6e6; font-size: 14px; line-height: 1.4;
            display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
            margin-bottom: 6px;
        }
        .s-meta {
            display: flex; align-items: center; justify-content: space-between;
            color: #8a8b91; font-size: 12px;
        }
        .s-author { display: flex; align-items: center; gap: 4px; }
        .s-author img { width: 16px; height: 16px; border-radius: 50%; }
        .s-date { font-size: 11px; }
        .s-obs-line { margin-top: 3px; display: flex; align-items: center; gap: 6px; line-height: 1.2; }
        .s-obs-badge { font-size: 10px; padding: 2px 6px; border-radius: 999px; border: 1px solid rgba(255,255,255,0.12); color: rgba(255,255,255,0.78); background: rgba(255,255,255,0.08); white-space: nowrap; }
        .s-obs-badge.ok { color: #48d18b; border-color: rgba(72,209,139,0.35); background: rgba(72,209,139,0.12); }
        .s-obs-badge.degrade { color: #ffbe55; border-color: rgba(255,190,85,0.38); background: rgba(255,190,85,0.14); }
        .s-obs-badge.slow { color: #ff8a8a; border-color: rgba(255,138,138,0.40); background: rgba(255,138,138,0.14); }
        .s-obs-badge.q-a { color: #3fe08f; border-color: rgba(63,224,143,0.45); background: rgba(63,224,143,0.13); }
        .s-obs-badge.q-b { color: #7fd7ff; border-color: rgba(127,215,255,0.45); background: rgba(127,215,255,0.12); }
        .s-obs-badge.q-c { color: #ffc46b; border-color: rgba(255,196,107,0.45); background: rgba(255,196,107,0.14); }
        .s-obs-badge.q-d { color: #ff9a9a; border-color: rgba(255,154,154,0.45); background: rgba(255,154,154,0.14); }
        .s-obs-badge.q-na { color: #b8bbc3; border-color: rgba(184,187,195,0.35); background: rgba(184,187,195,0.10); }
        .s-obs-text { font-size: 11px; color: #8f9198; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
        .s-obs-quality-line { position: relative; }
        .s-obs-hover { display: none; margin-top: 4px; padding: 8px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.10); background: rgba(17,18,22,0.96); }
        .s-obs-quality-line:hover + .s-obs-hover { display: block; }
        .s-obs-actions { margin-top: 4px; display: flex; }
        .s-obs-toggle { appearance: none; border: 1px solid rgba(255,255,255,0.16); background: rgba(255,255,255,0.04); color: #a9acb3; font-size: 11px; padding: 2px 8px; border-radius: 999px; cursor: pointer; }
        .s-obs-toggle:hover { color: #d9dbe0; border-color: rgba(255,255,255,0.28); background: rgba(255,255,255,0.08); }
        .s-obs-detail { margin-top: 6px; padding: 8px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.10); background: rgba(255,255,255,0.03); }
        .s-obs-kv { font-size: 11px; color: #b6b8bf; line-height: 1.35; }
        .s-obs-hint { margin-top: 4px; font-size: 11px; color: #8f9198; line-height: 1.35; }
        .s-user {
            grid-column: 1 / -1;
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 12px 10px;
            border-radius: 12px;
            background: rgba(255,255,255,0.06);
            border: 1px solid rgba(255,255,255,0.08);
            cursor: pointer;
        }
        .s-user:hover { background: rgba(255,255,255,0.08); }
        .s-user-avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
        .s-user-info { flex: 1; min-width: 0; }
        .s-user-name { font-weight: 700; font-size: 14px; color: rgba(255,255,255,0.92); }
        .s-user-sub { margin-top: 4px; font-size: 12px; color: rgba(255,255,255,0.55); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .s-user-right { display: flex; align-items: center; }
        .s-user-pill { font-size: 12px; padding: 6px 10px; border-radius: 999px; background: rgba(254,44,85,0.18); border: 1px solid rgba(254,44,85,0.45); color: white; }
        .s-user-top { margin-bottom: 6px; }
        .jx-card {
            height: 100%;
            border-radius: 12px;
            overflow: hidden;
            position: relative;
            cursor: pointer;
            background: #0b0c10;
            display: flex;
            flex-direction: column;
        }
        .jx-media { flex: 1; min-height: 0; position: relative; }
        .jx-media img, .jx-media video { width: 100%; height: 100%; object-fit: cover; display: block; }
        .jx-mini-controls {
            position: absolute;
            left: 0;
            right: 0;
            bottom: 0;
            height: 48px;
            display: flex;
            flex-direction: column;
            justify-content: flex-end;
            gap: 6px;
            padding: 0 10px 8px;
            background: linear-gradient(to top, rgba(0,0,0,0.72), rgba(0,0,0,0.0));
            z-index: 6;
        }
        .jx-mini-progress {
            width: 100%;
            height: 3px;
            background: rgba(255,255,255,0.18);
            border-radius: 999px;
            cursor: pointer;
            position: relative;
        }
        .jx-mini-filled {
            height: 100%;
            width: 0%;
            border-radius: 999px;
            background: rgba(255,255,255,0.92);
        }
        .jx-mini-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            color: rgba(255,255,255,0.9);
            font-size: 12px;
        }
        .jx-mini-left { display: flex; align-items: center; gap: 8px; min-width: 0; }
        .jx-mini-right { display: flex; align-items: center; gap: 10px; }
        .jx-mini-btn { cursor: pointer; color: rgba(255,255,255,0.9); }
        .jx-mini-btn:hover { color: white; }
        .jx-mini-time { font-size: 11px; color: rgba(255,255,255,0.75); white-space: nowrap; }
        .jx-card-meta {
            padding: 10px 12px;
            background: rgba(22,24,35,0.96);
            border-top: 1px solid rgba(255,255,255,0.06);
        }
        .jx-meta-title {
            color: rgba(255,255,255,0.92);
            font-size: 15px;
            line-height: 1.3;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
            min-height: 38px;
        }
        .jx-meta-sub {
            margin-top: 6px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            color: rgba(255,255,255,0.62);
            font-size: 12px;
            white-space: nowrap;
        }
        .jx-meta-sub .left { overflow: hidden; text-overflow: ellipsis; }
        
        /* 3. Profile Page */
        #page-profile {
            background: var(--bg-color);
            overflow-y: auto;
        }
        .profile-header {
            position: relative;
            width: 100%;
            margin-right: 0;
            margin-top: 0;
            min-height: 240px;
            height: auto;
            margin-bottom: 0;
            overflow: hidden;
        }
        
        .profile-banner {
            position: absolute;
            inset: 0;
            width: 100%;
            background-color: #fe2c55; /* Default Red */
            background-size: cover;
            background-position: right center;
            /* Remove blur and opacity to show full image */
            filter: none;
            opacity: 1;
            z-index: 0;
        }

        /* Gradient Overlay - Left & Bottom fade into bg-color */
        #page-profile .profile-banner::after {
            content: '';
            position: absolute;
            inset: 0;
            background:
                linear-gradient(to right, var(--bg-color) 0%, transparent 50%),
                linear-gradient(to top, var(--bg-color) 0%, transparent 50%);
            z-index: 1;
        }

        .profile-header-inner {
            position: relative;
            z-index: 2; /* Float above banner */
            display: flex;
            align-items: flex-start;
            height: 100%;
            padding: 22px var(--profile-pad-right) 18px var(--profile-pad-left);
            gap: 24px;
        }
        
        .profile-avatar-lg {
            width: 112px; height: 112px;
            border-radius: 50%;
            object-fit: cover;
            border: 4px solid var(--bg-color);
        }
        
        .profile-info-box {
            flex: 1;
            margin-bottom: 4px;
        }
        
        .profile-name {
            font-size: 28px; /* Slightly smaller name */
            font-weight: 600;
            margin-bottom: 4px;
            display: flex;
            align-items: center;
            gap: 12px;
            color: var(--text-color);
            text-shadow: 0 2px 4px rgba(0,0,0,0.5);
        }
        
        .profile-id {
            font-size: 14px;
            color: var(--text-color);
            opacity: 0.9;
            margin-bottom: 12px;
            text-shadow: 0 1px 2px rgba(0,0,0,0.5);
        }
        
        .profile-divider {
            height: 1px;
            background: var(--border-color);
            margin: 12px 0;
            width: 100%;
            max-width: 600px;
        }
        
        .profile-stats {
            display: flex;
            gap: 24px;
            margin-bottom: 12px;
            color: var(--text-color);
            text-shadow: 0 1px 2px rgba(0,0,0,0.5);
        }
        .stat-item { cursor: pointer; display: flex; align-items: baseline; gap: 4px; font-size: 15px; }
        .stat-num { font-weight: 700; font-size: 18px; }
        
        .profile-meta {
            color: var(--text-color);
            opacity: 0.9;
            font-size: 13px;
            line-height: 1.5;
            text-shadow: 0 1px 2px rgba(0,0,0,0.5);
            max-width: 600px;
        }
        
        .profile-tabs-container {
            position: sticky;
            top: 0;
            z-index: 10;
            background: transparent;
            border-bottom: none;
            padding: 0 var(--profile-pad-right) 0 var(--profile-pad-left);
        }
        
        .profile-tabs {
            display: flex;
            gap: 40px;
        }
        
        .p-tab {
            padding: 14px 0;
            cursor: pointer;
            color: var(--text-secondary);
            font-size: 16px;
            font-weight: 500;
            position: relative;
        }
        .p-tab.active { color: var(--text-color); }
        .p-tab.active::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 0;
            width: 100%;
            height: 3px;
            background: var(--primary-color);
            border-radius: 99px;
        }
        .profile-content { padding: 20px var(--profile-pad-right) 20px var(--profile-pad-left); display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 15px; }
        .p-card { aspect-ratio: 3/4; border-radius: var(--radius-sm); overflow: hidden; position: relative; cursor: pointer; border: 1px solid var(--border-color); box-shadow: var(--shadow-sm); transition: transform 0.2s, box-shadow 0.2s; }
        .p-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
        
        /* --- Modals --- */
        .modal {
            display: none; position: fixed; z-index: 2000; left: 0; top: 0; width: 100%; height: 100%;
            background: rgba(0,0,0,0.8); align-items: center; justify-content: center;
        }
        .modal.active { display: flex; }
        #messageModal, #notificationModal { pointer-events: none; background: transparent; }
        #messageModal .modal-content, #notificationModal .modal-content { pointer-events: auto; }
        #messageModal.modal.active, #notificationModal.modal.active {
            justify-content: flex-end;
            align-items: flex-start;
            padding-top: calc(var(--header-height) + 10px);
            padding-right: 16px;
            background: transparent;
        }
        #messageModal .close-btn, #notificationModal .close-btn { top: 10px; right: 10px; }
        .modal-content {
            background: var(--surface); border-radius: var(--radius-md); position: relative; display: flex; flex-direction: column;
            border: 1px solid var(--border-color); box-shadow: var(--shadow-md);
        }
        .modal-content.im-modal {
            width: min(760px, 92vw);
            height: min(720px, calc(100vh - var(--header-height) - 26px));
            border-radius: var(--radius-lg);
            padding: 0;
            overflow: hidden;
            border: 1px solid var(--border-color);
            background: var(--surface);
            box-shadow: var(--shadow-md);
            backdrop-filter: blur(16px);
            --im-left-w: 190px;
        }
        .modal-content.notify-modal {
            width: min(360px, 92vw);
            height: min(560px, calc(100vh - var(--header-height) - 26px));
            border-radius: var(--radius-lg);
            padding: 0;
            overflow: hidden;
            border: 1px solid var(--border-color);
            background: var(--notify-bg-user,
                radial-gradient(900px 560px at 18% -12%, rgba(0,212,170,0.18) 0%, transparent 60%),
                radial-gradient(820px 560px at 104% 0%, rgba(0,212,170,0.10) 0%, transparent 62%),
                linear-gradient(180deg, var(--surface) 0%, var(--bg-color) 100%)
            );
            background-size: cover;
            background-position: center;
            box-shadow: var(--shadow-md);
            backdrop-filter: blur(16px);
        }
        .im-header { display:flex; align-items:center; justify-content:space-between; height:54px; padding: 0 16px; border-bottom:1px solid rgba(255,255,255,0.08); }
        .im-title { font-size:16px; font-weight:800; letter-spacing:0.2px; color:rgba(255,255,255,0.92); }
        .im-search { flex:1; display:flex; justify-content:flex-end; }
        .im-search .search-bar { margin:0; width:min(360px, 100%); height:36px; background:rgba(255,255,255,0.08); border-radius: 18px; }
        .im-search .search-bar input { font-size:13px; }
        .im-body { display:flex; gap:0; flex:1; min-height:0; }
        .im-left { width: var(--im-left-w); border-right:1px solid rgba(255,255,255,0.08); padding: 10px 10px; display:flex; flex-direction:column; min-height:0; background: transparent; }
        .im-right { flex:1; display:flex; flex-direction:column; min-height:0; padding: 0 16px 16px; }
        .im-start { display:flex; gap:8px; align-items:stretch; }
        .im-start-btn { width:auto; border-radius:12px; padding:0 14px; }
        .im-conv-list { margin-top: 10px; flex:1; overflow-y:auto; padding-top: 0; }
        .dm-conv-item { border: none; background: transparent; display:flex; align-items:center; justify-content:flex-start; padding: 10px 6px; gap: 10px; margin-bottom: 0; }
        .dm-conv-item.active { border-color: transparent; background: transparent; }
        .dm-conv-item img { width:44px !important; height:44px !important; border-radius: 14px !important; }
        .dm-conv-item.active img { box-shadow: 0 0 0 3px rgba(255,255,255,0.10), 0 0 0 5px rgba(0,212,170,0.5); }
        .dm-conv-item .dm-meta { flex:1; min-width:0; }
        .dm-conv-item .dm-name { font-size:14px; font-weight:700; color:rgba(255,255,255,0.92); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; line-height:1.15; }
        .dm-conv-item .dm-sub { font-size:12px; color:rgba(255,255,255,0.55); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; margin-top:2px; }
        .im-chat-header { height:54px; display:flex; align-items:center; border-bottom:1px solid rgba(255,255,255,0.08); padding:0; }
        .im-chat-title { font-weight:750; color:rgba(255,255,255,0.90); }
        .im-chat-box { flex:1; overflow-y:auto; padding:14px 0; min-height:0; }
        .im-chat-box { background: transparent; border-radius: 18px; padding: 14px 12px; }
        .im-input { display:flex; flex-direction:column; gap:10px; align-items:stretch; padding-top:10px; position: relative; }
        .dm-composer-pill { display:flex; align-items:center; gap: 10px; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.10); border-radius: 999px; padding: 10px 10px 10px 14px; }
        .dm-input { flex:1; min-width:0; border:none; outline:none; background: transparent; color: rgba(255,255,255,0.92); font-size: 14px; }
        .dm-input::placeholder { color: rgba(255,255,255,0.40); }
        .dm-input::selection { background: rgba(255,255,255,0.18); }
        .dm-input { -webkit-appearance: none; appearance: none; caret-color: rgba(255,255,255,0.92); }
        .dm-input:-webkit-autofill,
        .dm-input:-webkit-autofill:hover,
        .dm-input:-webkit-autofill:focus,
        .dm-input:-webkit-autofill:active {
            -webkit-text-fill-color: rgba(255,255,255,0.92) !important;
            -webkit-box-shadow: 0 0 0 1000px rgba(0,0,0,0) inset !important;
            box-shadow: 0 0 0 1000px rgba(0,0,0,0) inset !important;
            transition: background-color 9999s ease-out 0s;
        }
        .dm-composer-actions { display:flex; align-items:center; gap: 10px; flex: 0 0 auto; }
        .dm-icon-btn { width: 34px; height: 34px; border-radius: 999px; display:flex; align-items:center; justify-content:center; cursor:pointer; background: rgba(255,255,255,0.10); color: rgba(255,255,255,0.86); }
        .dm-icon-btn:hover { background: rgba(255,255,255,0.16); }
        .dm-send-circle { width: 36px; height: 36px; border-radius: 999px; display:flex; align-items:center; justify-content:center; cursor:pointer; background: var(--primary-color); color: #0a0e14; box-shadow: 0 4px 16px rgba(0,212,170,0.35); }
        .dm-send-circle:hover { background: var(--primary-hover); }
        .dm-send-circle.disabled, .dm-icon-btn.disabled { opacity: 0.35; pointer-events: none; }
        .dm-emoji-panel { display:none; position: absolute; left: 16px; right: 16px; bottom: 76px; border-radius: 18px; overflow: hidden; background: rgba(46,48,63,0.98); box-shadow: 0 18px 70px rgba(0,0,0,0.62); backdrop-filter: blur(16px); }
        .dm-emoji-panel.active { display:block; }
        .dm-emoji-top { display:flex; align-items:center; justify-content:space-between; padding: 10px 12px; border-bottom: 1px solid rgba(255,255,255,0.08); }
        .dm-emoji-tabs { display:flex; gap: 8px; }
        .dm-emoji-tab { padding: 6px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; color: rgba(255,255,255,0.78); cursor:pointer; background: rgba(255,255,255,0.06); }
        .dm-emoji-tab.active { background: rgba(0,212,170,0.20); color: var(--text-color); }
        .dm-emoji-grid { display:grid; grid-template-columns: repeat(8, 1fr); gap: 8px; padding: 10px 12px 12px; }
        .dm-emoji-item { height: 34px; border-radius: 12px; display:flex; align-items:center; justify-content:center; cursor:pointer; background: rgba(255,255,255,0.06); font-size: 18px; }
        .dm-emoji-item:hover { background: rgba(255,255,255,0.10); }
        .bg-card-grid { display:grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
        .bg-card { height: 120px; border-radius: 16px; overflow:hidden; position: relative; cursor: pointer; border: 2px solid rgba(255,255,255,0.08); background: rgba(255,255,255,0.06); }
        .bg-card.active { border-color: var(--primary-color); }
        .bg-card .tag { position:absolute; top: 10px; left: 10px; padding: 4px 8px; border-radius: 999px; font-size: 12px; font-weight: 800; color: rgba(255,255,255,0.92); background: rgba(0,0,0,0.45); }
        .bg-card .name { position:absolute; left: 10px; right: 10px; bottom: 10px; font-size: 12px; font-weight: 750; color: rgba(255,255,255,0.88); text-shadow: 0 2px 10px rgba(0,0,0,0.65); }
        #bgPickerModal .modal-content { width: min(860px, 94vw); height: min(640px, 86vh); border-radius: 22px; overflow: hidden; border: 1px solid rgba(255,255,255,0.10); background: rgba(46,48,63,0.98); box-shadow: 0 26px 80px rgba(0,0,0,0.55); backdrop-filter: blur(16px); padding: 16px; }
        #bgPickerModal .bg-body { display:flex; flex-direction:column; gap: 14px; height: 100%; }
        #bgPickerModal .bg-head { display:flex; align-items:center; justify-content:space-between; gap: 10px; }
        #bgPickerModal .bg-title { font-size: 16px; font-weight: 850; color: rgba(255,255,255,0.92); }
        #bgPickerModal .bg-grid-wrap { flex:1; min-height:0; overflow:auto; padding-right: 2px; }
        #bgPickerModal .bg-actions { display:flex; justify-content:flex-end; gap: 10px; }
        #bgPickerModal .bg-btn { height: 38px; border-radius: 12px; padding: 0 14px; border: 1px solid rgba(255,255,255,0.10); background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.92); cursor: pointer; font-weight: 750; }
        #bgPickerModal .bg-btn.primary { border: none; background: var(--primary-color); color: #0a0e14; }
        .notify-head { display:flex; align-items:center; justify-content:space-between; padding: 14px 16px 6px; }
        .notify-head-title { font-weight:800; color:rgba(255,255,255,0.92); }
        .notify-head-action { font-size:12px; font-weight:700; color: var(--primary-color); cursor:pointer; }
        .notify-list { flex: 1; overflow-y:auto; min-height:0; padding: 8px 16px 16px; }
        .notify-card { transition: transform 0.18s ease; }
        .notify-card:hover { transform: translateY(-1px); background: transparent; }
        .notify-avatar { width:44px; height:44px; border-radius:14px; object-fit:cover; border:1px solid rgba(255,255,255,0.10); }
        .notify-text { color: rgba(255,255,255,0.92); font-size: 14px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .notify-sub { color: rgba(255,255,255,0.72); font-size: 13px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .notify-time { color: rgba(255,255,255,0.45); font-size: 12px; margin-top: 6px; }
        .notify-right { display:flex; align-items:center; justify-content:flex-end; gap:10px; }
        .notify-actions { display:flex; align-items:center; justify-content:flex-end; min-width:120px; }
        .notify-thumb { width:56px; height:56px; border-radius:14px; object-fit:cover; border:1px solid rgba(255,255,255,0.10); cursor:pointer; display:block; background:#000; }

        #messageModal .im-header { border-bottom: none; position: relative; height: 48px; }
        #messageModal .im-header::after { content:''; position:absolute; left: var(--im-left-w); top: 0; bottom: 0; width:1px; background: rgba(255,255,255,0.08); }
        #messageModal .im-title { position: relative; top: -2px; }
        #messageModal #dm_chat_header_name { position:absolute; left: calc(var(--im-left-w) + 16px); right: 96px; top: -2px; height: 48px; display:flex; align-items:center; pointer-events:none; }
        #dm_more_btn { position:absolute; top: 10px; right: 52px; padding: 6px 6px; border-radius: 0; background: transparent; display:flex; align-items:center; justify-content:center; cursor:pointer; color:white; font-weight: 900; line-height: 1; z-index: 3; }
        #dm_more_menu { position:absolute; top: 54px; right: 12px; width: 180px; border-radius: 14px; overflow:hidden; display:none; z-index: 3; background: rgba(46,48,63,0.98); border: 1px solid rgba(255,255,255,0.12); box-shadow: 0 18px 70px rgba(0,0,0,0.62); backdrop-filter: blur(16px); }
        #dm_more_menu.active { display:block; }
        .dm-more-item { padding: 11px 12px; font-size: 13px; font-weight: 650; color: rgba(255,255,255,0.86); cursor:pointer; }
        .dm-more-item:hover { background: rgba(255,255,255,0.06); }
        #dmHoverPanel { position: relative; }
        #dmHoverPanel::before { content:''; position:absolute; top: 0; bottom: 0; left: var(--im-left-w); right: 0; background: var(--dm-bg-user, transparent); background-size: cover; background-position: center; z-index: 0; }
        #dmHoverPanel .im-header, #dmHoverPanel .im-body { position: relative; z-index: 1; }
        #messageModal .close-btn, #dm_more_btn, #dm_more_menu { z-index: 4; }

        /* Comments (Right Panel) */
        .video-stage {
            width: 100%;
            height: 100%;
            display: flex;
            align-items: stretch;
            gap: 0;
            flex: 1 1 auto;
            min-width: 0;
        }
        .video-stage .video-player-container {
            transition: width 0.28s cubic-bezier(0.19, 1, 0.22, 1);
        }
        body.comments-open .video-nav-arrows { opacity: 1; pointer-events: auto; }

        .video-stage.comments-open { padding-right: 0; box-sizing: border-box; gap: 0; overflow: hidden; border-radius: 20px; }
        .video-stage.comments-open .comments-side { margin-right: 0; }
        .comments-side {
            flex: 0 0 auto;
            width: 0;
            height: calc(100% - 16px);
            margin: 8px 0 8px 0;
            overflow: hidden;
            transition: width 0.28s cubic-bezier(0.19, 1, 0.22, 1);
        }
        .video-stage.comments-open .comments-side { width: var(--comments-panel-width); margin-right: 0; height: calc(100% - 16px); margin: 8px 0 8px 0; }
        .video-stage.comments-open .video-player-container { margin-right: 0; height: calc(100% - 16px); margin: 8px 0 8px 0; }
        .comments-side-inner {
            position: relative;
            width: var(--comments-panel-width);
            height: 100%;
            border-radius: 20px;
            overflow: hidden;
            display: flex;
            flex-direction: column;
            text-align: left !important;
            --comments-bg:
                linear-gradient(180deg,
                    rgba(28, 30, 38, 0.96) 0%,
                    rgba(34, 28, 44, 0.96) 20%,
                    rgba(74, 30, 66, 0.90) 48%,
                    rgba(34, 28, 44, 0.96) 80%,
                    rgba(28, 30, 38, 0.96) 100%
                );
            background: var(--comments-bg-user, var(--comments-bg));
            background-size: cover;
            background-position: center;
            border: none;
            box-shadow: 0 18px 70px rgba(0,0,0,0.58);
            backdrop-filter: blur(16px);
            opacity: 0;
            transform: translateX(26px);
            transition: opacity 0.20s ease, transform 0.28s cubic-bezier(0.19, 1, 0.22, 1);
        }
        .comments-side-inner::after { display: none; }
        .video-stage.comments-open .comments-side-inner { opacity: 1; transform: translateX(0); }
        .video-stage.comments-open .video-player-container {
            border-top-right-radius: 0;
            border-bottom-right-radius: 0;
        }
        .video-stage.comments-open .comments-side-inner {
            border-top-left-radius: 0;
            border-bottom-left-radius: 0;
        }
        .video-stage.comments-open .comments-side-inner { box-shadow: none; }
        .comments-head {
            height: 52px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0 16px;
            border-bottom: 1px solid rgba(255,255,255,0.08);
        }
        .comments-title { font-size: 15px; font-weight: 800; color: rgba(255,255,255,0.92); }
        .comments-close { cursor: pointer; font-size: 18px; color: rgba(255,255,255,0.55); }
        .comments-close:hover { color: white; }
        .comments-list {
            flex: 1;
            overflow-y: auto;
            padding: 2px 0;
            text-align: left !important;
        }
        .comment-item {
            width: 100%;
            padding: 4px 10px;
            display: flex;
            gap: 8px;
            border-bottom: none;
            align-items: flex-start;
            justify-content: flex-start;
            text-align: left !important;
        }
        .comment-avatar {
            width: 30px;
            height: 30px;
            border-radius: 50%;
            object-fit: cover;
            flex-shrink: 0;
            cursor: pointer;
            border: 1px solid rgba(255,255,255,0.12);
        }
        .comment-body { width: 100%; flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start !important; text-align: left !important; }
        .comment-user { font-size: 12px; color: rgba(255,255,255,0.86); margin-bottom: 0; font-weight: 700; cursor: pointer; line-height: 1.15; }
        .comment-user:hover { color: white; }
        .comment-text { width: 100%; font-size: 13px; color: rgba(255,255,255,0.94); line-height: 1.24; margin-top: 1px; margin-bottom: 0; word-wrap: break-word; white-space: pre-wrap; text-align: left !important; }
        .comment-meta { width: 100%; font-size: 11px; color: rgba(255,255,255,0.60); display: flex; justify-content: flex-start; gap: 10px; margin-bottom: 0; line-height: 1.15; text-align: left !important; }
        .comment-actions-row { width: 100%; display: flex; justify-content: flex-start; gap: 12px; font-size: 11px; color: rgba(255,255,255,0.70); align-items: center; margin-top: 1px; line-height: 1.15; text-align: left !important; }
        .comment-actions-row span { cursor: pointer; display: flex; align-items: center; gap: 4px; }
        .comment-actions-row span:hover { color: white; }
        .comments-input-wrap {
            padding: 12px 14px;
            background: transparent;
            border-top: none;
        }
        .comments-input-row {
            background: transparent;
            border: none;
            border-radius: 0;
            padding: 0;
        }
        .comments-input {
            border: none;
            background: rgba(0,0,0,0.22);
        }
        .comments-reply-bar {
            display: none;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 8px;
            font-size: 12px;
            color: rgba(255,255,255,0.72);
        }
        .comments-reply-bar .cancel { cursor: pointer; color: rgba(255,255,255,0.7); }
        .comments-reply-bar .cancel:hover { color: white; }
        .comments-input-row { display: flex; gap: 10px; align-items: stretch; }
        .comments-input {
            flex: 1;
            height: 40px;
            resize: none;
            border-radius: 18px;
            background: rgba(255,255,255,0.10);
            border: 1px solid rgba(255,255,255,0.10);
            padding: 10px 12px;
            color: white;
            outline: none;
        }
        .comments-send {
            width: auto;
            border-radius: 18px;
            padding: 0 18px;
            height: 40px;
            border: none;
            background: var(--primary-color);
            color: white;
            cursor: pointer;
            font-weight: 700;
        }

        
        /* Jingxuan Popup - 2.5x Size & Controls */
        .jx-hover-popup {
            position: fixed;
            z-index: 1000;
            width: 600px; /* Increased from 480px to 600px (approx 2.5x) */
            aspect-ratio: 16/9;
            background: #000;
            border-radius: 12px;
            box-shadow: 0 16px 64px rgba(0,0,0,0.8);
            overflow: hidden;
            display: none;
            opacity: 0;
            transition: opacity 0.2s;
            pointer-events: auto;
        }
        .jx-hover-popup.active { display: block; opacity: 1; }
        .jx-popup-controls {
            position: absolute;
            bottom: 0; left: 0; right: 0;
            padding: 12px 16px;
            background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
            display: flex;
            flex-direction: column;
            gap: 8px;
            opacity: 0;
            transition: opacity 0.2s;
        }
        .jx-hover-popup:hover .jx-popup-controls { opacity: 1; }
        .jx-popup-progress {
            width: 100%; height: 4px; background: rgba(255,255,255,0.3);
            border-radius: 2px; cursor: pointer; position: relative;
        }
        .jx-popup-filled { height: 100%; background: var(--primary-color); width: 0%; border-radius: 2px; }
        .jx-popup-row { display: flex; align-items: center; justify-content: space-between; color: white; font-size: 14px; }
        .jx-popup-btn { cursor: pointer; display: flex; align-items: center; gap: 6px; }
        .jx-popup-btn:hover { color: var(--primary-color); }

        /* Search Grid - Large Video Cards */
        /* Removed duplicate styles here since we updated above */
        .s-user {
            grid-column: 1 / -1;
            display: flex;
            align-items: center;
            gap: 16px;
            padding: 16px;
            border-radius: 12px;
            background: rgba(255,255,255,0.06);
            border: 1px solid rgba(255,255,255,0.08);
            cursor: pointer;
        }
        .s-user:hover { background: rgba(255,255,255,0.1); }
        .s-user-avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; }
        .s-user-info { flex: 1; min-width: 0; }
        .s-user-name { font-weight: 700; font-size: 16px; color: rgba(255,255,255,0.95); }
        .s-user-sub { margin-top: 4px; font-size: 13px; color: rgba(255,255,255,0.6); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .s-user-sub { color: var(--text-secondary); }
        .s-user-right { display: flex; align-items: center; }
        .s-user-pill { font-size: 13px; padding: 8px 16px; border-radius: 6px; background: var(--primary-color); border: none; color: white; font-weight: 600; }
        
        .s-user-top { margin-bottom: 6px; }

        /* Profile & Following - Clean List */
        .friend-item {
            background: transparent !important;
            padding: 10px 14px;
            border-bottom: none;
        }
        .friend-item:hover { background: transparent !important; }
        .friend-status { display: none; }
        
        /* Profile Banner - Full Width */
        .profile-banner {
            width: 100%;
            left: 0;
            transform: none;
        }
        .profile-header { overflow: hidden; }

        .settings-shell { position: relative; padding-top: 0; }

        /* Fix modal width - make auth modal less wide */
        #authModal .modal-content { width: 360px; padding: 30px; }

        /* Settings Modal - Taller & Narrower */
        #settingsModal .modal-content {
            width: 1000px; /* Much wider */
            max-width: 90vw;
            height: 700px;
            padding: 0;
            border-radius: 12px;
            background: var(--bg-color);
            overflow: hidden;
        }
        .settings-menu-item {
            padding: 15px 20px;
            border-bottom: 1px solid var(--border-color);
            color: var(--text-color);
            cursor: pointer;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .settings-menu-item:hover { background: var(--seg-bg); }
        .settings-menu-item:last-child { border-bottom: none; }
        
        .close-btn { position: absolute; top: 15px; right: 15px; cursor: pointer; font-size: 20px; color: #888; }
        
        /* Edit Profile Modal */
        .edit-modal { width: 520px; padding: 30px; }
        .edit-bg { width: 100%; height: 120px; border-radius: 12px; overflow: hidden; background: rgba(255,255,255,0.06); position: relative; cursor: pointer; margin-bottom: 18px; }
        .edit-bg img { width: 100%; height: 100%; object-fit: cover; opacity: 0.85; }
        .edit-bg .edit-bg-mask { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.6), transparent); }
        .edit-bg .edit-bg-tip { position: absolute; left: 12px; bottom: 10px; font-size: 12px; color: rgba(255,255,255,0.85); display: flex; align-items: center; gap: 8px; }
        .edit-avatar { width: 100px; height: 100px; margin: 0 auto 20px; position: relative; cursor: pointer; }
        .edit-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; opacity: 0.7; }
        .edit-avatar i { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); font-size: 24px; }
        
        /* Creator Modal */
        .creator-modal { width: 900px; height: 600px; display: flex; overflow: hidden; }
        
        /* Common Form */
        .form-group { margin-bottom: 15px; }
        .form-label { display: block; margin-bottom: 5px; color: var(--text-secondary); font-size: 14px; }
        .form-input { width: 100%; background: var(--seg-bg); border: 1px solid var(--border-color); color: var(--text-color); padding: 10px 14px; border-radius: var(--radius-sm); transition: border-color 0.2s, box-shadow 0.2s; }
        .form-input:focus { outline: none; border-color: rgba(0,212,170,0.5); box-shadow: 0 0 0 2px rgba(0,212,170,0.12); }

        #page-creator {
            background: var(--bg-color);
            overflow-y: auto;
        }
        .creator-shell {
            padding: 24px 10px 28px;
            max-width: 1600px;
            margin: 0 auto;
            min-height: calc(100svh - var(--header-height));
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .creator-title { font-size: 18px; font-weight: 700; }
        .creator-tab2 { height: 46px; width: 168px; padding: 0 18px; border-radius: 999px; cursor:pointer; color: var(--text-secondary); font-size: 14px; display:flex; align-items:center; justify-content:center; font-weight: 850; user-select: none; border: 1px solid var(--border-color); background: var(--seg-bg); transition: all 0.2s ease; }
        .creator-tab2:hover { border-color: var(--border-color); background: var(--seg-bg-active); }
        .creator-tab2.active { color: #0a0e14; border-color: var(--primary-color); background: linear-gradient(135deg, var(--primary-color) 0%, #00b894 100%); box-shadow: 0 4px 16px rgba(0,212,170,0.35); }
        .creator-grid {
            display:grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 18px;
            max-width: 1320px;
            margin: 0 auto;
            padding-left: 0;
        }
        .creator-grid.ai-mode {
            grid-template-columns: repeat(3, minmax(0, 1fr));
            padding-left: 180px;
        }
        .creator-type-btn {
            flex: 1;
            height: 44px;
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            cursor: pointer;
            color: var(--text-color);
            background: var(--seg-bg);
            border: 1px solid var(--border-color);
            font-weight: 700;
            font-size: 13px;
        }
        .creator-type-btn.active {
            background: rgba(0,212,170,0.18);
            border: 1px solid rgba(0,212,170,0.45);
            color: var(--text-color);
        }
        .creator-card {
            background: var(--bg-color);
            border: 1px solid var(--border-color);
            border-radius: 18px;
            overflow: visible;
        }
        .creator-preview-row { display:flex; gap: 12px; align-items: stretch; --creator-media-h: 520px; position: relative; }
        .creator-side-tabs {
            width: 156px;
            height: auto;
            display: flex;
            flex-direction: column;
            border-radius: var(--radius-lg);
            overflow: hidden;
            background: var(--surface);
            border: 1px solid var(--border-color);
            flex: 0 0 auto;
            position: absolute;
            left: -168px;
            top: 0;
            padding: 10px;
            gap: 10px;
        }
        .creator-side-tabs .creator-tab2 {
            width: 100%;
            height: 42px;
            flex: 0 0 auto;
            border-radius: 12px;
            padding: 0 12px;
            justify-content: center;
            gap: 10px;
            position: relative;
            border: 1px solid rgba(255,255,255,0.14);
            background: rgba(255,255,255,0.08);
            box-shadow: none;
            transform: none;
            color: rgba(255,255,255,0.86);
        }
        .creator-side-tabs .creator-tab2:hover { transform: none; box-shadow: none; background: var(--seg-bg-active); border-color: var(--border-color); }
        .creator-side-tabs .creator-tab2 i { font-size: 16px; width: 22px; text-align:center; }
        .creator-side-tabs .creator-tab2 + .creator-tab2 { border-top: none; }
        .creator-side-tabs .creator-tab2.active { background: var(--primary-color); border-color: var(--primary-color); color: #0a0e14; box-shadow: 0 4px 12px rgba(0,212,170,0.35); }
        .creator-side-tabs .creator-tab2.active::before { display: none; }
        .creator-media {
            position: relative;
            height: var(--creator-media-h, 520px);
            background: var(--seg-bg);
            display:flex;
            align-items:center;
            justify-content:center;
            flex: 1;
            min-width: 0;
        }
        .creator-media img, .creator-media video { width:100%; height:100%; object-fit: cover; }
        .creator-media-actions {
            position:absolute;
            left: 12px;
            top: 12px;
            display:flex;
            gap: 8px;
            z-index: 2;
        }
        .c-btn {
            height: 32px;
            padding: 0 12px;
            border-radius: 999px;
            border: 1px solid var(--border-color);
            background: var(--seg-bg);
            color: var(--text-color);
            cursor: pointer;
            font-size: 12px;
            display:flex;
            align-items:center;
            gap: 6px;
            white-space: nowrap;
        }
        .c-btn:hover { background: var(--seg-bg-active); }
        .creator-carousel {
            position:absolute;
            inset: 0;
        }
        .creator-nav {
            position:absolute;
            inset: 0;
            display:flex;
            align-items:center;
            justify-content:space-between;
            padding: 0 8px;
            pointer-events: none;
        }
        .creator-nav .arrow {
            pointer-events: auto;
            width: 40px;
            height: 40px;
            border-radius: 999px;
            display:flex;
            align-items:center;
            justify-content:center;
            background: var(--seg-bg-active);
            border: 1px solid var(--border-color);
            cursor: pointer;
            color: var(--text-color);
        }
        .creator-form { padding: 18px; display:flex; flex-direction: column; gap: 12px; }
        .creator-form .form-input { border-radius: 10px; }
        .creator-actions { padding: 14px; display:flex; gap: 10px; }
        .creator-actions .btn-primary { border-radius: 10px; }

        @media (max-width: 1200px) {
            .creator-grid.ai-mode { grid-template-columns: 1fr; }
            .creator-grid { grid-template-columns: 1fr; padding-left: 0; }
            .creator-preview-row { --creator-media-h: 420px; }
            .creator-side-tabs { position: relative; left: 0; top: 0; width: 100%; height: auto; flex-direction: row; border-radius: 14px; margin-bottom: 12px; }
            .creator-side-tabs .creator-tab2 { flex: 1; }
            .creator-side-tabs .creator-tab2 + .creator-tab2 { border-top: 0; border-left: 1px solid rgba(255,255,255,0.10); }
        }

        .settings-shell {
            height: 100%;
            width: 100%;
            max-width: none;
            border-radius: 0;
            padding: 18px;
            display:flex;
            flex-direction: column;
        }
        .settings-body {
            display:flex;
            gap: 14px;
            flex: 1;
            min-height: 0;
            margin-top: 10px;
        }
        .settings-left {
            width: 260px;
            border-right: none;
            padding-right: 14px;
            display:flex;
            flex-direction: column;
            gap: 8px;
            position: relative;
            align-self: flex-start;
        }
        .settings-left::after {
            content: '';
            position: absolute;
            top: 18px;
            bottom: 18px;
            right: 0;
            width: 1px;
            background: var(--border-color);
        }
        .settings-nav-item {
            padding: 10px 12px;
            border-radius: 12px;
            cursor: pointer;
            display:flex;
            align-items:center;
            justify-content: space-between;
            color: var(--text-color);
            opacity: 0.9;
        }
        .settings-nav-item:hover { background: var(--seg-bg); }
        .settings-nav-item.active { background: var(--seg-bg-active); color: var(--text-color); opacity: 1; }
        .settings-right { flex:1; min-width:0; display:flex; flex-direction: column; min-height:0; }
        .settings-panel {
            flex: 1;
            min-height: 0;
            overflow-y: auto;
            padding: 4px 6px 10px;
            max-width: 520px;
            margin-right: auto;
        }
        .settings-panel h3 { font-size: 16px; margin: 10px 0 12px; }
        .settings-panel .btn-primary { width: auto; min-width: 0; height: 36px; padding: 0 14px; border-radius: 12px; }

        .dm-input-wrap { display:flex; gap:10px; align-items:flex-end; padding: 10px 6px 0; }
        .dm-input-wrap textarea { height: 64px; resize:none; border-radius: 14px; padding: 12px 14px; }
        .dm-input-wrap button { white-space: nowrap; height: 64px; /* Align height with textarea */ }
        .dm-time-divider { display:flex; justify-content:center; margin: 12px 0 8px; }
        .dm-time-divider span { font-size: 12px; color: var(--text-secondary); background: var(--seg-bg); border: 1px solid var(--border-color); padding: 4px 10px; border-radius: 999px; }
        .btn-primary { background: linear-gradient(135deg, var(--primary-color) 0%, #00b894 100%); color: #0a0e14; border: none; padding: 0 16px; border-radius: var(--radius-md); cursor: pointer; height: 36px; width: auto; display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; font-weight: 700; box-shadow: 0 2px 8px rgba(0,212,170,0.3); transition: all 0.2s ease; }
        .btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,212,170,0.4); }

        .jx-hover-popup { pointer-events: auto !important; }

        .search-container { padding-right: 18px; }
        .search-grid.mode-video { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
        .search-grid.mode-video .s-media { aspect-ratio: 3/4; border-radius: 14px; }
        .search-grid.mode-video .s-card { border-radius: 14px; }
        .search-grid.mode-video .s-info { padding: 12px 12px !important; }
        .search-grid.mode-all { display: flex; flex-direction: column; gap: 14px; }
        .search-waterfall { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
        .search-waterfall .s-media { aspect-ratio: 3/4; border-radius: 14px; }

        .inbox-shell {
            padding: 14px 10px 24px;
            height: 100%;
            max-width: 860px;
            margin: 0 auto;
        }
        .inbox-topbar {
            position: sticky;
            top: 0;
            z-index: 20;
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 10px 0 10px 0;
            background: var(--bg-color);
            backdrop-filter: none;
        }
        :root[data-theme="light"] .inbox-topbar { background: var(--bg-color); }
        .inbox-tabs {
            display: flex;
            gap: 22px;
            align-items: center;
        }
        .inbox-tab {
            color: var(--text-secondary);
            cursor: pointer;
            font-size: 16px;
            padding-bottom: 5px;
            position: relative;
        }
        .inbox-tab.active {
            color: var(--text-color);
            font-weight: 600;
            border-bottom: 2px solid var(--primary-color);
        }
        #inbox_mark_read { position: relative; top: -10px; }
        .inbox-layout {
            display: flex;
            gap: 14px;
            height: calc(100% - 54px);
            min-height: 0;
        }
        .inbox-left {
            width: 220px;
            border-right: 1px solid var(--border-color);
            padding-right: 14px;
            display: flex;
            flex-direction: column;
            min-height: 0;
        }
        .inbox-right {
            flex: 1;
            min-width: 0;
            display: flex;
            flex-direction: column;
            min-height: 0;
        }
        .inbox-panel {
            flex: 1;
            min-height: 0;
            overflow-y: auto;
            padding: 6px 6px 10px;
        }
        .inbox-panel { background: var(--bg-color); }
        .inbox-list {
            flex: 1;
            min-height: 0;
            overflow-y: auto;
            padding-top: 10px;
        }
        .dm-conv-item {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 10px;
            border-radius: 0;
            cursor: pointer;
            margin-bottom: 6px;
            background: transparent;
        }
        .dm-conv-item:hover { background: transparent; }
        .dm-conv-item.active { background: transparent; }
        .dm-conv-name { font-size: 14px; color: var(--text-color); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .dm-conv-sub { font-size: 12px; color: var(--text-secondary); }
        .inbox-chat-header {
            height: 44px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            border-bottom: 1px solid var(--border-color);
            padding: 0 6px;
        }
        .inbox-chat-box {
            flex: 1;
            min-height: 0;
            overflow-y: auto;
            padding: 14px 6px;
        }
        .dm-time { text-align: center; color: var(--text-secondary); font-size: 12px; margin: 10px 0; }
        .dm-row { display: flex; justify-content: flex-start; margin: 8px 0; }
        .dm-row.mine { justify-content: flex-end; }
        .dm-bubble {
            max-width: 68%;
            padding: 10px 12px;
            border-radius: 16px 16px 16px 6px;
            background: var(--seg-bg-active);
            color: var(--text-color);
            font-size: 14px;
            line-height: 1.5;
            white-space: pre-wrap;
            word-break: break-word;
        }
        .dm-bubble.mine {
            border-radius: 16px 16px 6px 16px;
            background: rgba(254,44,85,0.95);
            color: white;
        }
        .inbox-dm-input {
            display: flex;
            gap: 10px;
            align-items: flex-end;
            padding: 10px 6px 0;
        }
        .inbox-dm-input textarea {
            height: 64px;
            resize: none;
            border-radius: 14px;
            padding: 12px 14px;
        }
        .inbox-dm-input button {
            white-space: nowrap;
            height: 64px;
        }

        .upload-btn-theme {
            background: rgba(254,44,85,0.92) !important;
            border: 1px solid rgba(254,44,85,0.72) !important;
            color: white !important;
            text-decoration: none !important;
        }
