/* public/assets/css/video/epg-viewer.css */

.epg-wrapper { padding: 32px; border-radius: var(--radius-lg); }
.epg-header { text-align: center; margin-bottom: 32px; }
.epg-title { font-size: 2rem; font-weight: 800; color: var(--text-main); margin-bottom: 12px; letter-spacing: -0.5px; }
.epg-subtitle { font-size: 1.05rem; color: var(--text-muted); max-width: 700px; margin: 0 auto; line-height: 1.6; }

/* 核心布局 */
.epg-workspace { display: flex; flex-direction: column; gap: 24px; max-width: 1100px; margin: 0 auto; align-items: stretch; }

.epg-panel { background: var(--bg-surface); padding: 24px; border: 1px solid var(--border-color); border-radius: 16px; box-shadow: 0 4px 20px rgba(0,0,0,0.03); display: flex; flex-direction: column; }
.epg-panel-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; border-bottom: 1px dashed var(--border-color); padding-bottom: 12px; }
.epg-panel-title { font-size: 1.1rem; font-weight: 700; color: var(--text-main); margin: 0; }

/* 输入区组件 */
.epg-label { display: block; font-weight: 600; color: var(--text-main); font-size: 0.95rem; margin-bottom: 10px; }
.epg-upload-box { background: rgba(var(--primary-rgb), 0.05); border: 2px dashed rgba(var(--primary-rgb), 0.3); padding: 24px; border-radius: 12px; text-align: center; transition: 0.2s; }
.epg-upload-box:hover { border-color: var(--primary-color); background: rgba(var(--primary-rgb), 0.08); }
.epg-file-input { display: block; width: 100%; max-width: 300px; margin: 0 auto; padding: 10px; border: 1px solid var(--border-color); border-radius: 8px; background: var(--bg-body); color: var(--text-main); cursor: pointer; }

.epg-textarea { width: 100%; height: 180px; padding: 14px; border: 1.5px solid var(--border-color); border-radius: 12px; font-size: 0.9rem; background: var(--bg-body); color: var(--text-main); outline: none; transition: 0.2s; box-sizing: border-box; resize: vertical; font-family: ui-monospace, monospace; }
.epg-textarea:focus { border-color: var(--primary-color); box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.15); }

/* 按钮 */
.epg-btn-hero { width: 100%; border: none; padding: 16px; border-radius: 12px; font-size: 1.1rem; font-weight: 800; cursor: pointer; transition: 0.3s; }
.epg-btn-hero:hover { transform: translateY(-2px); }
.epg-btn-primary { background: var(--primary-color); color: #fff; box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.3); }

.epg-btn-sm { background: var(--bg-body); color: var(--text-main); border: 1px solid var(--border-color); padding: 8px 16px; border-radius: 8px; font-size: 0.85rem; font-weight: 600; cursor: pointer; transition: 0.2s; }
.epg-btn-sm-danger { background: #fee2e2; color: #ef4444; border-color: #fca5a5; }
.epg-btn-sm-danger:hover { background: #fecaca; color: #b91c1c; border-color: #f87171; }

/* ================= 仪表盘布局 (Dashboard) ================= */
.epg-dashboard-layout { display: grid; grid-template-columns: 320px 1fr; height: 600px; }

/* 左侧：频道列表 */
.epg-sidebar { border-right: 1px solid var(--border-color); display: flex; flex-direction: column; background: var(--bg-surface); }
.epg-sidebar-header { padding: 16px; border-bottom: 1px solid var(--border-color); }
.epg-search { width: 100%; padding: 10px 14px; border: 1px solid var(--border-color); border-radius: 8px; font-size: 0.95rem; background: var(--bg-body); color: var(--text-main); outline: none; transition: 0.2s; box-sizing: border-box; }
.epg-search:focus { border-color: var(--primary-color); }

.epg-channel-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; }
.epg-channel-list::-webkit-scrollbar { width: 6px; }
.epg-channel-list::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
.epg-channel-item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border-color); cursor: pointer; transition: 0.2s; }
.epg-channel-item:hover { background: rgba(0,0,0,0.02); }
.epg-channel-item.active { background: rgba(var(--primary-rgb), 0.08); border-left: 4px solid var(--primary-color); padding-left: 12px; }
.epg-chan-logo { width: 32px; height: 32px; object-fit: contain; border-radius: 4px; background: rgba(0,0,0,0.05); flex-shrink: 0; }
.epg-chan-name { font-size: 0.95rem; font-weight: 600; color: var(--text-main); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; }

/* 右侧：节目列表时间轴 */
.epg-main-view { display: flex; flex-direction: column; background: var(--bg-body); }
.epg-main-header { padding: 20px 24px; border-bottom: 1px solid var(--border-color); background: var(--bg-surface); }
.epg-program-list { flex: 1; overflow-y: auto; padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.epg-program-list::-webkit-scrollbar { width: 8px; }
.epg-program-list::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }

.epg-empty-state { text-align: center; color: var(--text-muted); padding: 60px 20px; font-size: 1.05rem; }

/* 节目单卡片 (时间轴风格) */
.epg-prog-card { display: flex; gap: 16px; background: var(--bg-surface); padding: 16px; border-radius: 12px; border: 1px solid var(--border-color); transition: 0.2s; position: relative; }
.epg-prog-card:hover { border-color: #cbd5e1; box-shadow: 0 4px 12px rgba(0,0,0,0.04); }
.epg-prog-time { width: 100px; flex-shrink: 0; font-family: monospace; font-size: 0.95rem; font-weight: 700; color: var(--primary-color); display: flex; flex-direction: column; gap: 4px; border-right: 2px solid rgba(var(--primary-rgb), 0.1); padding-right: 12px; }
.epg-prog-time .end-time { color: var(--text-muted); font-size: 0.8rem; font-weight: normal; }
.epg-prog-info { flex: 1; min-width: 0; }
.epg-prog-title { margin: 0 0 6px 0; font-size: 1.1rem; color: var(--text-main); font-weight: 700; }
.epg-prog-desc { margin: 0; font-size: 0.85rem; color: var(--text-muted); line-height: 1.5; }

/* SEO Blocks */
.epg-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; max-width: 1100px; margin: 0 auto; }
.epg-info-card { background: var(--bg-surface); padding: 24px; border-radius: 16px; border: 1px solid var(--border-color); }
.epg-info-card h3 { color: var(--text-main); font-size: 1.15rem; margin-bottom: 16px; }
.epg-desc-text { font-size: 0.95rem; color: var(--text-muted); margin: 0; }
.epg-desc-text strong { color: var(--text-main); }

@media (max-width: 768px) {
    .epg-dashboard-layout { grid-template-columns: 1fr; height: auto; }
    .epg-sidebar { border-right: none; border-bottom: 1px solid var(--border-color); height: 260px; }
    .epg-program-list { min-height: 400px; }
    .epg-info-grid { grid-template-columns: 1fr; }
}

/* 深色模式适配 */
[data-theme="dark"] .epg-panel, [data-theme="dark"] .epg-info-card, [data-theme="dark"] .epg-sidebar, [data-theme="dark"] .epg-main-header, [data-theme="dark"] .epg-prog-card { background: #1e293b; border-color: #334155; }
[data-theme="dark"] .epg-upload-box { background: rgba(var(--primary-rgb), 0.1); border-color: rgba(var(--primary-rgb), 0.4); }
[data-theme="dark"] .epg-textarea, [data-theme="dark"] .epg-search, [data-theme="dark"] .epg-file-input { background: #0f172a; border-color: #475569; color: #f8fafc; }
[data-theme="dark"] .epg-main-view { background: #0f172a; }
[data-theme="dark"] .epg-channel-item, [data-theme="dark"] .epg-sidebar-header { border-color: #334155; }
[data-theme="dark"] .epg-channel-item:hover { background: rgba(255,255,255,0.02); }
[data-theme="dark"] .epg-channel-item.active { background: rgba(var(--primary-rgb), 0.15); }
[data-theme="dark"] .epg-btn-sm { background: #0f172a; border-color: #475569; color: #f8fafc; }
[data-theme="dark"] .epg-btn-sm-danger { background: rgba(239,68,68,0.1); color: #f87171; border-color: rgba(239,68,68,0.3); }
[data-theme="dark"] .epg-btn-sm-danger:hover { background: rgba(239,68,68,0.2); }
[data-theme="dark"] .epg-prog-card:hover { border-color: #475569; }