/* 全局重置与基础变量 */
:root {
    --bg-color: #0a0a0c;
    --panel-bg: rgba(20, 20, 25, 0.7);
    --neon-yellow: #fcee0a;
    --neon-cyan: #00f0ff;
    --neon-orange: #ff4757;
    --text-main: #e0e0e0;
    --text-muted: #666677;
    --border-color: rgba(0, 240, 255, 0.3);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Share Tech Mono', 'Noto Sans JP', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    height: 100vh;
    overflow: hidden;
    background-image: linear-gradient(rgba(0,240,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,240,255,0.03) 1px, transparent 1px);
    background-size: 30px 30px;
}

/* 💻 电脑端布局 */
.app-container {
    display: flex;
    flex-direction: row; 
    height: 100vh;
    padding: 20px;
    gap: 20px;
}

.sidebar {
    width: 320px;
    background: var(--panel-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.05);
    overflow: hidden;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 15px 20px 10px 20px;
}

/* 搜索栏样式 */
.search-box {
    padding: 0 20px 15px 20px;
    border-bottom: 1px solid rgba(0, 240, 255, 0.15);
}

.search-box input {
    width: 100%;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 8px 12px;
    color: var(--text-main);
    font-size: 0.9rem;
    outline: none;
    transition: all 0.3s ease;
}

.search-box input:focus {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 8px rgba(0, 240, 255, 0.2);
}

.glitch-text {
    color: var(--neon-yellow);
    font-size: 1.5rem;
    letter-spacing: 2px;
    text-shadow: 2px 0 0 red, -2px 0 0 blue;
}

.channel-list {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    position: relative;
    -webkit-overflow-scrolling: touch;
}

.channel-list::-webkit-scrollbar { width: 6px; }
.channel-list::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 3px; }

.channel-group { margin-bottom: 10px; }

/* 可折叠分类头部 */
.group-title {
    position: sticky;
    top: -15px;
    background: rgba(10, 10, 12, 0.95);
    color: var(--neon-cyan);
    padding: 8px 6px;
    font-size: 0.9rem;
    letter-spacing: 1px;
    z-index: 10;
    margin-bottom: 8px;
    backdrop-filter: blur(5px);
    border-bottom: 1px dashed var(--border-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    user-select: none;
    justify-content: space-between;
}

.group-title::after {
    content: '▼';
    font-size: 0.7rem;
    transition: transform 0.2s ease;
    color: var(--text-muted);
}

.channel-group.collapsed .group-title::after {
    transform: rotate(-90deg);
}

.channel-group.collapsed .group-items-container {
    display: none;
}

.channel-item {
    display: flex;
    align-items: center;
    padding: 10px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

.channel-item:hover { background: rgba(0, 240, 255, 0.1); border-color: var(--neon-cyan); }
.channel-item.active {
    background: rgba(252, 238, 10, 0.1);
    border-left: 4px solid var(--neon-yellow);
    border-color: var(--neon-yellow);
}

.ch-logo {
    width: 45px;
    height: 45px;
    object-fit: contain;
    background: #fff;
    border-radius: 4px;
    margin-right: 12px;
    padding: 2px;
    flex-shrink: 0;
}

.ch-meta {
    display: flex;
    flex-direction: column;
    overflow: hidden; 
    flex: 1;
    padding-right: 25px;
}

.ch-name { font-size: 1.05rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 跑马灯 */
.ch-epg-now {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
}
.channel-item.active .ch-epg-now {
    color: rgba(252, 238, 10, 0.8);
}
.channel-item:hover .ch-epg-now {
    text-overflow: clip;
    overflow: visible;
    display: inline-block;
    min-width: max-content;
    animation: terminal-marquee 8s linear infinite;
}
@keyframes terminal-marquee {
    0% { transform: translateX(0); }
    15% { transform: translateX(0); }
    45% { transform: translateX(-40%); }
    55% { transform: translateX(-40%); }
    85% { transform: translateX(0); }
    100% { transform: translateX(0); }
}

/* 心形收藏图标样式 */
.heart-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    z-index: 5;
}

.heart-icon:hover {
    color: #ff4757;
    transform: translateY(-50%) scale(1.1);
}

.heart-icon.is-fav {
    color: #ff4757;
    text-shadow: 0 0 8px rgba(255, 71, 87, 0.4);
}

/* 🎬 播放器区域 */
.player-section {
    flex: 1;
    background: #000;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.video-container {
    position: relative;
    width: 100%;
    flex: 1;
    min-height: 0;
    background: #000;
}

#video-player {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
    outline: none;
    display: block;
}

.no-signal {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: #000; display: flex; justify-content: center; align-items: center;
    color: var(--neon-cyan); font-size: 1.5rem; z-index: 5; pointer-events: none;
}

.video-container.playing .no-signal { display: none; }
.no-signal span { animation: blink 2s infinite; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

/* 📊 悬浮监控面板 UI 样式设计 */
.stats-overlay {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(10, 10, 14, 0.88);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 16px;
    border-radius: 8px;
    z-index: 10;
    width: 250px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.85rem;
    color: #f0f0f0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.7);
    pointer-events: auto;
}

.stats-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 8px;
    margin-bottom: 12px;
    color: var(--neon-yellow);
    font-weight: bold;
    letter-spacing: 1px;
}

.stats-close {
    cursor: pointer;
    color: var(--text-muted);
    font-size: 1.1rem;
    transition: color 0.2s ease;
    padding: 0 4px;
}
.stats-close:hover { color: #ff4757; }

.stats-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}
.stats-label { color: #8a8a9a; }
.stats-val { color: var(--neon-cyan); font-weight: bold; }

/* 📅 EPG 全量节目面板 */
.epg-panel {
    height: 250px; 
    background: rgba(12, 12, 16, 0.95);
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 12px 20px;
    box-sizing: border-box;
}

.epg-panel-header {
    color: var(--neon-cyan);
    font-size: 0.85rem;
    letter-spacing: 1px;
    margin-bottom: 8px;
    border-bottom: 1px dashed rgba(0, 240, 255, 0.2);
    padding-bottom: 4px;
}

/* 🆕 11天横向日期选择器轴 */
.epg-date-picker {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 0 8px 0;
    margin-bottom: 6px;
    border-bottom: 1px dashed rgba(0, 240, 255, 0.1);
    -webkit-overflow-scrolling: touch;
}
.epg-date-picker::-webkit-scrollbar { height: 3px; }
.epg-date-picker::-webkit-scrollbar-thumb { background: rgba(0, 240, 255, 0.15); border-radius: 2px; }

.date-tab {
    padding: 4px 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(0, 240, 255, 0.2);
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}
.date-tab:hover {
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
}
.date-tab.active {
    background: rgba(0, 240, 255, 0.12);
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.25);
    text-shadow: 0 0 5px var(--neon-cyan);
}

.epg-timeline {
    flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; scroll-behavior: smooth; 
}
.epg-timeline::-webkit-scrollbar { width: 4px; }
.epg-timeline::-webkit-scrollbar-thumb { background: rgba(0, 240, 255, 0.2); }

.epg-empty { color: var(--text-muted); font-size: 0.9rem; font-style: italic; padding-top: 20px; }
.epg-date-header {
    color: var(--text-muted); font-size: 0.8rem; letter-spacing: 1px; font-weight: bold;
    padding: 10px 0 4px 0; margin-top: 6px; border-bottom: 1px dashed rgba(255, 255, 255, 0.05);
}
.epg-date-header:first-child { margin-top: 0; }

.epg-row {
    display: flex; align-items: center; padding: 8px 12px;
    background: rgba(255,255,255,0.01); border: 1px solid rgba(255,255,255,0.02);
    border-radius: 4px; transition: all 0.3s ease;
}

.epg-past { opacity: 0.45; position: relative; cursor: pointer; }
.epg-future { opacity: 0.85; }
.epg-live {
    background: rgba(252, 238, 10, 0.08) !important;
    border: 1px solid var(--neon-yellow) !important;
    color: var(--neon-yellow);
    box-shadow: 0 0 15px rgba(252, 238, 10, 0.15);
    font-weight: bold;
}

/* 🆕 历史节目单悬浮弹出回看 REPLAY 标志 */
.epg-past:hover {
    opacity: 1;
    background: rgba(0, 240, 255, 0.08) !important;
    border-color: var(--neon-cyan) !important;
}
.epg-past::after {
    content: attr(data-replay-text);
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8rem;
    font-weight: bold;
    color: var(--neon-cyan);
    opacity: 0;
    transition: opacity 0.2s ease, text-shadow 0.2s ease;
}
.epg-past:hover::after {
    opacity: 1;
    text-shadow: 0 0 8px var(--neon-cyan);
}

.epg-time { font-weight: bold; width: 120px; font-size: 0.9rem; flex-shrink: 0; }
.epg-future .epg-time { color: var(--neon-cyan); }
.epg-live .epg-time { color: var(--neon-yellow); }
.epg-title { font-size: 0.95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 80px; }

.epg-blink-tag { color: var(--neon-yellow); margin-right: 8px; animation: live-blink 1.5s infinite; }
@keyframes live-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

/* 🆕 视频区域流媒体时空状态指示灯 */
.stream-status-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    padding: 5px 12px;
    font-size: 0.8rem;
    font-weight: bold;
    letter-spacing: 1px;
    border-radius: 4px;
    z-index: 5;
    pointer-events: none;
    display: none;
}
.video-container.playing .stream-status-badge { display: block; }

.stream-status-badge.live-mode {
    background: rgba(252, 238, 10, 0.15);
    border: 1px solid var(--neon-yellow);
    color: var(--neon-yellow);
    box-shadow: 0 0 12px rgba(252, 238, 10, 0.3);
    animation: live-blink 1.5s infinite;
}
.stream-status-badge.timeshift-mode {
    background: rgba(255, 71, 87, 0.15);
    border: 1px solid var(--neon-orange);
    color: var(--neon-orange);
    box-shadow: 0 0 12px rgba(255, 71, 87, 0.3);
    animation: live-blink 1.5s infinite;
}

/* 📱 移动端自适应布局 */
@media (max-width: 768px) {
    body { height: auto; overflow: auto; overflow-x: hidden; }
    .app-container { flex-direction: column; padding: 0; gap: 0; height: auto; }
    .main-content, .player-section { display: contents; }
    .video-container { order: 1; height: 30vh; flex: none; position: sticky; top: 0; z-index: 99; box-shadow: 0 4px 15px rgba(0,0,0,0.8); }
    
    .terminal-control-bar { order: 2; padding: 8px 15px; gap: 8px; flex-wrap: wrap; justify-content: center; }
    
    .epg-panel { order: 3; height: 210px; border-top: none; border-bottom: 1px dashed var(--border-color); }
    .sidebar { order: 4; width: 100%; flex: none; border-radius: 0; border: none; height: auto; }
    .channel-list { overflow: visible; height: auto; padding-bottom: 50px; }
    .control-btn { padding: 6px 12px; font-size: 0.75rem; }
    .channel-item { padding: 12px; margin-bottom: 10px; }
    .ch-logo { width: 40px; height: 40px; }
    .ch-name { font-size: 1rem; }
    .stats-overlay { top: 10px; right: 10px; width: 200px; padding: 10px; font-size: 0.75rem; }
    .stream-status-badge { top: 10px; left: 10px; padding: 3px 8px; font-size: 0.7rem; }

    #themeBtn,
    #pipBtn,
    .kbd-shortcut-wrapper {
        display: none !important;
    }
}

/* 🔒 登录面板 */
.login-overlay {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background-color: var(--bg-color);
    background-image: linear-gradient(rgba(0,240,255,0.03) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(0,240,255,0.03) 1px, transparent 1px);
    background-size: 30px 30px;
    display: flex; justify-content: center; align-items: center; z-index: 9999; padding: 20px;
}
.login-box {
    width: 100%; max-width: 450px; background: var(--panel-bg); backdrop-filter: blur(15px);
    border: 2px solid var(--border-color); border-radius: 8px; padding: 35px 30px; box-shadow: 0 0 30px rgba(0, 240, 255, 0.15);
    box-sizing: border-box;
}
.login-header { margin-bottom: 30px; text-align: center; }
.login-header h2 { font-size: 1.15rem; letter-spacing: 1px; }
.input-group { margin-bottom: 22px; display: flex; flex-direction: column; gap: 8px; }
.input-group label { color: var(--neon-cyan); font-size: 0.85rem; letter-spacing: 1px; font-weight: bold; }
.input-group input {
    background: rgba(0, 0, 0, 0.6); border: 1px solid var(--border-color); border-radius: 4px;
    padding: 12px 15px; color: var(--text-main); font-size: 1rem; outline: none; transition: all 0.3s ease;
}
.input-group input:focus { border-color: var(--neon-yellow); box-shadow: 0 0 10px rgba(252, 238, 10, 0.2); }
.login-error { color: #ff3333; font-size: 0.8rem; min-height: 20px; margin-bottom: 15px; letter-spacing: 0.5px; font-weight: bold; text-shadow: 1px 0 5px rgba(255, 0, 0, 0.2); }
.login-btn {
    width: 100%; background: transparent; border: 1px dashed var(--neon-yellow);
    color: var(--neon-yellow); padding: 14px; font-size: 1.05rem; font-weight: bold;
    cursor: pointer; border-radius: 4px; transition: all 0.2s ease; letter-spacing: 1px;
}
.login-btn:hover { background: rgba(252, 238, 10, 0.1); box-shadow: 0 0 15px rgba(252, 238, 10, 0.25); border-style: solid; }

/* 控制按键栏 */
.terminal-control-bar {
    background: rgba(14, 14, 18, 0.95);
    padding: 10px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    box-sizing: border-box;
}
.control-btn {
    background: rgba(255, 255, 255, 0.03);
    padding: 8px 18px;
    font-size: 0.85rem;
    font-weight: bold;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.5px;
    outline: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}
.control-btn.btn-cyan { border: 1px solid rgba(0, 240, 255, 0.4); color: var(--neon-cyan); }
.control-btn.btn-cyan:hover, .control-btn.btn-cyan.active-panel {
    background: var(--neon-cyan); color: #000; border-color: var(--neon-cyan);
    box-shadow: 0 0 14px rgba(0, 240, 255, 0.4); transform: translateY(-1px);
}

/* 🆕 橙红色霓虹按钮（专门用于返回直播） */
.control-btn.btn-orange { border: 1px solid rgba(255, 71, 87, 0.5); color: var(--neon-orange); }
.control-btn.btn-orange:hover {
    background: var(--neon-orange); color: #fff; border-color: var(--neon-orange);
    box-shadow: 0 0 14px rgba(255, 71, 87, 0.5); transform: translateY(-1px);
}

.control-btn:active { transform: translateY(1px); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5); }

/* 四分屏盒子 */
#multiview-box {
    display: grid; grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(2, 1fr);
    width: 100%; height: 100%; position: absolute; top: 0; left: 0; background: #000;
    z-index: 6; gap: 6px; padding: 6px; box-sizing: border-box;
}
.multiview-slot { position: relative; background: #050508; border: 1px solid rgba(0, 240, 255, 0.15); display: flex; justify-content: center; align-items: center; overflow: hidden; box-sizing: border-box; transition: all 0.2s ease; }
.multiview-slot.active-focus { border: 2px solid var(--neon-cyan); box-shadow: inset 0 0 15px rgba(0, 240, 255, 0.4), 0 0 10px rgba(0, 240, 255, 0.2); }
.multiview-slot video { width: 100%; height: 100%; object-fit: contain; display: none; background: #000; }
.multiview-slot.has-stream video { display: block; }
.slot-placeholder { display: flex; justify-content: center; align-items: center; color: var(--text-muted); font-size: 3rem; cursor: pointer; width: 100%; height: 100%; position: absolute; top: 0; left: 0; z-index: 2; transition: all 0.2s ease; }
.slot-placeholder:hover { color: var(--neon-cyan); text-shadow: 0 0 10px var(--neon-cyan); }
.multiview-slot.has-stream .slot-placeholder { display: none; }
.slot-close { position: absolute; top: 8px; right: 8px; color: rgba(255, 255, 255, 0.5); cursor: pointer; font-size: 0.85rem; z-index: 3; display: none; background: rgba(10, 10, 14, 0.85); padding: 4px 8px; border-radius: 4px; font-family: sans-serif; border: 1px solid rgba(255, 255, 255, 0.1); }
.multiview-slot.has-stream:hover .slot-close { display: block; }
.slot-close:hover { color: #ff4757; background: rgba(255, 71, 87, 0.1); border-color: #ff4757; }
.slot-controls { position: absolute; bottom: 0; left: 0; width: 100%; background: rgba(10, 10, 14, 0.85); backdrop-filter: blur(4px); border-top: 1px solid rgba(255, 255, 255, 0.1); display: flex; align-items: center; padding: 6px 12px; gap: 10px; transform: translateY(100%); transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1); z-index: 3; box-sizing: border-box; }
.multiview-slot.has-stream:hover .slot-controls { transform: translateY(0); }
.slot-mute-btn { cursor: pointer; font-size: 1rem; user-select: none; transition: transform 0.1s; }
.slot-mute-btn:active { transform: scale(0.9); }
.slot-volume-slider { flex: 1; height: 4px; -webkit-appearance: none; background: rgba(255, 255, 255, 0.2); border-radius: 2px; outline: none; }
.slot-volume-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; border-radius: 50%; background: var(--neon-cyan); cursor: pointer; box-shadow: 0 0 6px var(--neon-cyan); }

/* 录制状态动画 */
.control-btn.active-record { background: #ff4757 !important; color: #fff !important; border-color: #ff4757 !important; box-shadow: 0 0 14px rgba(255, 71, 87, 0.6) !important; animation: record-blink-animation 1.5s infinite ease-in-out; }
@keyframes record-blink-animation { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.7; transform: scale(0.98); } }

/* 键盘快捷键提示框 */
.kbd-shortcut-wrapper { position: relative; display: inline-block; margin-left: 8px; }
.kbd-icon-btn { padding: 6px 12px; font-size: 1.1rem; display: flex; justify-content: center; align-items: center; }
.kbd-tooltip { position: absolute; bottom: 130%; right: 0; background: rgba(10, 10, 14, 0.95); backdrop-filter: blur(12px); border: 1px solid rgba(0, 240, 255, 0.4); border-radius: 8px; padding: 18px; width: 280px; opacity: 0; visibility: hidden; transform: translateY(15px); transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 20px rgba(0, 240, 255, 0.15); z-index: 100; pointer-events: none; box-sizing: border-box; }
.kbd-shortcut-wrapper:hover .kbd-tooltip { opacity: 1; visibility: visible; transform: translateY(0); }
.kbd-header { color: var(--neon-yellow); font-size: 0.9rem; font-weight: bold; letter-spacing: 1px; margin-bottom: 12px; border-bottom: 1px dashed rgba(255, 255, 255, 0.15); padding-bottom: 6px; }
.kbd-grid { display: flex; flex-direction: column; gap: 10px; }
.kbd-row { display: flex; justify-content: space-between; align-items: center; }
.kbd-key { background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.2); border-bottom: 2px solid rgba(255, 255, 255, 0.3); padding: 3px 10px; border-radius: 4px; color: #fff; font-family: monospace; font-size: 0.75rem; font-weight: bold; letter-spacing: 0.5px; }
.kbd-desc { color: var(--neon-cyan); font-size: 0.8rem; font-family: 'Share Tech Mono', sans-serif; }
.multiview-notice { margin-top: 8px; font-size: 0.75rem; color: var(--text-muted); text-align: right; font-style: italic; border-top: 1px solid rgba(255, 255, 255, 0.05); padding-top: 8px; }

/* 🌓 亮色模式 (Light Theme) 完美覆盖 */
body.light-theme {
    --bg-color: #f6f6f9;
    --panel-bg: rgba(255, 255, 255, 0.85);
    --neon-yellow: #ca9200;   
    --neon-cyan: #0066cc;     
    --neon-orange: #d92d3a;
    --text-main: #1c1c1e;     
    --text-muted: #8e8e93;    
    --border-color: rgba(0, 102, 204, 0.25);
    background-image: linear-gradient(rgba(0, 102, 204, 0.02) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(0, 102, 204, 0.02) 1px, transparent 1px);
}

body.light-theme .search-box input { background: rgba(0, 0, 0, 0.05); color: #1c1c1e; }
body.light-theme .group-title { background: rgba(246, 246, 249, 0.95); }
body.light-theme .channel-item { background: rgba(0, 0, 0, 0.02); }
body.light-theme .channel-item:hover { background: rgba(0, 102, 204, 0.08); }
body.light-theme .channel-item.active { background: rgba(202, 146, 0, 0.08); }
body.light-theme .terminal-control-bar { background: rgba(240, 240, 245, 0.95); border-top: 1px solid rgba(0, 0, 0, 0.05); }
body.light-theme .control-btn { background: rgba(0, 0, 0, 0.03); }
body.light-theme .control-btn.btn-cyan:hover, body.light-theme .control-btn.btn-cyan.active-panel { color: #fff; }
body.light-theme .control-btn.btn-orange:hover { color: #fff !important; }
body.light-theme .stats-overlay { background: rgba(255, 255, 255, 0.95); color: #1c1c1e; border: 1px solid rgba(0, 0, 0, 0.1); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15); }
body.light-theme .stats-label { color: #555566; }
body.light-theme .epg-panel { background: rgba(240, 240, 245, 0.95); }
body.light-theme .epg-row { background: rgba(0, 0, 0, 0.02); border: 1px solid rgba(0, 0, 0, 0.04); }
body.light-theme .epg-live { background: rgba(202, 146, 0, 0.08) !important; box-shadow: 0 0 15px rgba(202, 146, 0, 0.15); }
body.light-theme .kbd-tooltip { background: rgba(255, 255, 255, 0.98); border: 1px solid rgba(0, 102, 204, 0.4); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15); }
body.light-theme .kbd-key { background: rgba(0, 0, 0, 0.05); border: 1px solid rgba(0, 0, 0, 0.1); border-bottom: 2px solid rgba(0, 0, 0, 0.15); color: #1c1c1e; }
body.light-theme .input-group input { background: rgba(255, 255, 255, 0.9); color: #1c1c1e; }

/* 🆕 亮色模式下的日期选择器与回看标识适配 */
body.light-theme .epg-date-picker { border-bottom-color: rgba(0, 102, 204, 0.15); }
body.light-theme .date-tab { background: rgba(0, 0, 0, 0.02); border-color: rgba(0, 102, 204, 0.2); }
body.light-theme .date-tab:hover, body.light-theme .date-tab.active { background: rgba(0, 102, 204, 0.08); border-color: var(--neon-cyan); color: var(--neon-cyan); }
body.light-theme .epg-past:hover { background: rgba(0, 102, 204, 0.05) !important; border-color: var(--neon-cyan) !important; }
body.light-theme .epg-past::after { color: var(--neon-cyan); }