 
        * { margin: 0; padding: 0; box-sizing: border-box; font-family: "Microsoft YaHei", sans-serif; }
        html { font-size: var(--tv-font-size, 14px); }
        body { background-color: #1a2c4b; color: #fff; overflow: hidden; font-size: 1rem; }
        .tv-app { display: flex; height: 100vh; background: linear-gradient(to right, #233b66, #3a67b3); }

        /* 左侧导航 */
        .sidebar { width: 160px; min-width: 160px; padding: 20px 10px; background-color: rgba(35,59,102,0.95); overflow-y: auto; display: flex; flex-direction: column; }
        .sidebar-title { font-size: 1.43rem; font-weight: bold; padding: 10px 16px 20px; color: #ffd700; }
        .nav-item { flex-shrink: 0; display: flex; align-items: center; padding: 10px 14px; margin: 4px 0; border-radius: 8px; font-size: 1rem; cursor: pointer; transition: all 0.25s ease; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
        .nav-item span { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
        .nav-item span:first-child { margin-right: 8px; }
        .nav-item.active { background-color: #ffffff !important; color: #233b66 !important; font-weight: bold; }
        .nav-item:hover { background-color: rgba(255,255,255,0.15); }
        .nav-item.active:hover { background-color: #ffffff !important; }
        .sidebar-bottom { margin-top: auto; padding-top: 10px; }
        .sidebar-settings-btn { display: flex; align-items: center; padding: 10px 14px; margin: 4px 0; border-radius: 8px; font-size: 1rem; cursor: pointer; transition: all 0.25s ease; color: rgba(255,255,255,0.7); }
        .sidebar-settings-btn span { margin-right: 10px; }
        .sidebar-settings-btn:hover { background-color: rgba(255,255,255,0.15); color: #fff; }
        .sidebar-settings-btn.active { background-color: #ffffff !important; color: #233b66 !important; font-weight: bold; }

        /* 右侧内容区 */
        .content-area { flex: 1; padding: 30px 30px; overflow-y: auto; position: relative; }
        .content-area::-webkit-scrollbar { width: 6px; }
        .content-area::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 3px; }

        /* 首页/分类内容 */
        .home-content { display: block; }
        .section-title { font-size: 1.71rem; margin-bottom: 20px; font-weight: 600; display: flex; align-items: center; }
        .section-title .page-info { font-size: 1rem; color: #aaa; font-weight: normal; margin-left: 12px; }

        /* 搜索页 */
        .search-content { display: none; width: 100%; }
        .search-box-wrap { width: 100%; display: flex; justify-content: center; margin-bottom: 25px; }
        .search-box { width: 80%; height: 56px; background-color: rgba(255,255,255,0.9); border-radius: 12px; display: flex; align-items: center; padding: 0 20px; outline: none; transition: all 0.2s ease; }
        .search-box:focus { outline: 3px solid #ffd700; outline-offset: 3px; transform: scale(1.02); box-shadow: 0 0 20px rgba(255,215,0,0.4); }
        .search-box input { flex: 1; border: none; background: transparent; outline: none; font-size: 1.29rem; color: #233b66; }
        .search-box .icon { font-size: 1.43rem; margin-right: 12px; }
        .search-box .clear-btn { cursor: pointer; font-size: 1.29rem; color: #999; padding: 4px 8px; display: none; }
        .search-box .clear-btn:hover { color: #333; }
        .search-box .clear-btn.show { display: block; }

        .hot-list { width: 100%; margin-bottom: 25px; }
        .hot-title { font-size: 1.43rem; margin-bottom: 15px; }
        .hot-items { display: flex; flex-wrap: wrap; }
        .hot-item { background-color: rgba(255,255,255,0.1); padding: 8px 16px; border-radius: 8px; font-size: 1rem; cursor: pointer; transition: all 0.2s ease; margin: 6px; }
        .hot-item:hover { background-color: rgba(255,255,255,0.25); }

        /* 视频布局 - Grid 改为 Flex 兼容 Android 7.0 */
        .video-grid { display: flex; flex-wrap: wrap; margin-left: -9px; margin-right: -9px; }
        .video-card { width: 170px; margin: 9px; position: relative; border-radius: 8px; overflow: hidden; background-color: #2a4b8d; cursor: pointer; transition: transform 0.2s ease, box-shadow 0.2s ease; }
        .video-card:hover { transform: scale(1.03); box-shadow: 0 4px 20px rgba(0,0,0,0.3); }
        
        /* 宽高比 2:3 兼容方案 */
        .video-poster { width: 100%; position: relative; height: 0; padding-bottom: 150%; background-color: #333; background-size: cover; background-position: center; }
        .video-poster.skeleton { background: linear-gradient(90deg, #2a4b8d 25%, #3a5b9d 50%, #2a4b8d 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; }
        @keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
        .video-remarks { position: absolute; top: 8px; left: 8px; background: rgba(0,0,0,0.7); color: #fff; font-size: 0.79rem; padding: 2px 6px; border-radius: 3px; }
        .video-info { padding: 8px 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
        .video-name { font-size: 1rem; margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .video-meta { font-size: 0.79rem; color: #ccc; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

        /* 加载更多 */
        .load-more { text-align: center; padding: 30px 0; color: #aaa; font-size: 1rem; }
        .load-more .spinner { display: inline-block; width: 20px; height: 20px; border: 2px solid rgba(255,255,255,0.2); border-top-color: #ffd700; border-radius: 50%; animation: spin 0.8s linear infinite; margin-right: 8px; vertical-align: middle; }
        @keyframes spin { to { transform: rotate(360deg); } }

        /* 空状态 */
        .empty-state { text-align: center; padding: 60px 0; color: #888; font-size: 1.14rem; }

        /* 详情页 */
        .detail-view { display: none; }
        .detail-view.show { display: block; }
        .detail-topbar { display: flex; align-items: center; padding-bottom: 20px; margin-bottom: 20px; border-bottom: 1px solid rgba(255,255,255,0.15); }
        .detail-back { cursor: pointer; font-size: 1.07rem; padding: 9px 20px; background: rgba(255,255,255,0.1); border-radius: 8px; transition: background 0.2s; color: #fff; border: none; margin-right: 16px; }
        .detail-back:hover { background: rgba(255,255,255,0.25); }
        .detail-topbar-title { font-size: 1.43rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .detail-header { display: flex; margin-bottom: 20px; }
        .detail-poster { width: 180px; min-width: 180px; position: relative;   border-radius: 8px; background-size: cover; background-position: center; background-color: #333; margin-right: 24px; }
        .detail-info { flex: 1; }
        .detail-name { font-size: 1.57rem; font-weight: bold; margin-bottom: 10px; }
        .detail-meta-item { font-size: 0.93rem; color: #bbb; margin-bottom: 6px; }
        .detail-score { color: #ffd700; font-size: 1.14rem; font-weight: bold; }
        .detail-desc { font-size: 0.93rem; color: #ccc; line-height: 1.6; margin-top: 16px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,0.1); }
        .detail-episodes { margin-top: 20px; }
        .detail-episodes-title { font-size: 1.14rem; margin-bottom: 12px; font-weight: bold; }
        .episode-list { display: flex; flex-wrap: wrap; max-height: 300px; overflow-y: auto; }
        .episode-btn { padding: 6px 14px; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.15); border-radius: 6px; color: #fff; cursor: pointer; font-size: 0.93rem; transition: all 0.2s; margin: 4px; }
        .episode-btn:hover { background: #ffd700; color: #233b66; }
        .episode-btn.playing { background: #ffd700; color: #233b66; font-weight: bold; }

        .nav-item.is-focused,
        .sidebar-settings-btn.is-focused,
        .video-card.is-focused,
        .episode-btn.is-focused,
        .hot-item.is-focused,
        .search-box.is-focused,
        .font-size-btn.is-focused,
        .source-item.is-focused,
        .detail-back.is-focused,
        .clear-history-btn.is-focused {
            box-shadow: 0 0 0 3px #ffd700;
        }

        .video-card.is-focused {
            background-color: #ffffff;
            color: #233b66;
            transform: scale(1.06);
            box-shadow: 0 0 0 3px #ffd700, 0 10px 30px rgba(0,0,0,0.45);
        }

        .video-card.is-focused .video-name,
        .video-card.is-focused .video-meta {
            color: #233b66;
        }

        .nav-item.is-focused:not(.active),
        .sidebar-settings-btn.is-focused:not(.active) {
            background-color: rgba(255,255,255,0.18);
        }

        .episode-btn.is-focused {
            background: #ffd700;
            color: #233b66;
            font-weight: bold;
        }

        /* 设置页 */
        .settings-content { display: none; padding: 20px 0; }
        .settings-content.show { display: block; }
        .settings-title { font-size: 1.71rem; margin-bottom: 24px; font-weight: 600; }
        .settings-group { margin-bottom: 28px; }
        .settings-group-title { font-size: 1rem; color: #aaa; margin-bottom: 12px; text-transform: uppercase; letter-spacing: 1px; }
        .settings-item { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; background: rgba(255,255,255,0.06); border-radius: 10px; margin-bottom: 8px; }
        .settings-item-label { font-size: 1.07rem; }
        .settings-item-desc { font-size: 0.86rem; color: #999; margin-top: 2px; }
        .font-size-control { display: flex; align-items: center; }
        .font-size-btn { width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.2); background: rgba(255,255,255,0.08); color: #fff; font-size: 1.29rem; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s; margin: 0 6px; }
        .font-size-btn:hover { background: rgba(255,255,255,0.2); border-color: rgba(255,255,255,0.4); }
        .font-size-value { min-width: 50px; text-align: center; font-size: 1.07rem; font-weight: bold; color: #ffd700; }
        .source-actions { display: flex; align-items: center; }
        .source-list { margin-top: 10px; }
        .source-item { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; background: rgba(255,255,255,0.06); border-radius: 10px; margin-bottom: 8px; cursor: pointer; }
        .source-item.current { background: rgba(255,255,255,0.12); }
        .source-item-main { min-width: 0; }
        .source-item-name { font-size: 1.07rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .source-item-api { font-size: 0.86rem; color: #999; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 560px; }
        .source-badge { font-size: 0.86rem; padding: 2px 10px; border-radius: 999px; background: #ffd700; color: #233b66; font-weight: bold; flex-shrink: 0; margin-left: 12px; }
        
        /* 观看历史页 */
        .history-content {
            display: none;
            padding: 20px 0;
            color: #fff;
        }
        .history-toolbar {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 16px;
            margin-bottom: 24px;
            flex-wrap: wrap;
        }
        .history-content-title {
            font-size: 1.71rem;
            font-weight: 600;
            margin: 0;
        }
        .clear-history-btn {
            flex-shrink: 0;
            padding: 10px 22px;
            font-size: 1rem;
            font-family: inherit;
            color: #fff;
            background: rgba(220, 60, 60, 0.35);
            border: 1px solid rgba(255, 120, 120, 0.45);
            border-radius: 10px;
            cursor: pointer;
            transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
            outline: none;
        }
        .clear-history-btn:hover {
            background: rgba(220, 60, 60, 0.55);
            border-color: rgba(255, 160, 160, 0.7);
        }
        .clear-history-btn:active {
            transform: scale(0.98);
        }
        .clear-history-btn.is-focused {
            background: rgba(220, 60, 60, 0.65);
            border-color: #ffd700;
        }

        /* 列表加载 Toast */
        .toast-loading {
            position: fixed;
            left: 50%;
            bottom: 48px;
            z-index: 9999;
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 12px 26px;
            background: rgba(20, 35, 70, 0.94);
            border: 1px solid rgba(255, 215, 0, 0.4);
            border-radius: 12px;
            color: #fff;
            font-size: 1rem;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
            opacity: 0;
            visibility: hidden;
            pointer-events: none;
            transform: translateX(-50%) translateY(16px);
            transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
        }
        .toast-loading.show {
            opacity: 1;
            visibility: visible;
            transform: translateX(-50%) translateY(0);
        }
        .toast-loading-spinner {
            display: inline-block;
            width: 22px;
            height: 22px;
            border: 2px solid rgba(255, 255, 255, 0.2);
            border-top-color: #ffd700;
            border-radius: 50%;
            animation: spin 0.8s linear infinite;
            flex-shrink: 0;
        }
        .toast-loading-text {
            white-space: nowrap;
        }

