/* =========================================================
   THEME VARIABLES (DEFAULT DARK)
   ========================================================= */
:root {
    --bg-page: #0b0e14;          /* body background */
    --bg-main: #0b0e14;          /* card background (dark = same as page) */
    --bg-card: #151a24;
    --bg-card-hover: #1c2230;
    --bg-sidebar: #121620;
    --bg-header: rgba(0,0,0,0.15);
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --border-subtle: #263145;
    --border-active: #3b82f6;
    --border-active-strong: #4b5563;
    --accent-gold: #f59e0b;
    --accent-green: #10b981;
    --btn-bg: #1f2937;
    --btn-hover: #334155;
    --shadow-card: 0 4px 12px rgba(0,0,0,0.2);
    --shadow-modal: 0 10px 30px rgba(0,0,0,0.5);
    --player-bg: #0f1115;
    --player-header: #151a24;
    --live-red: #ef4444;
}

[data-theme="light"] {
    /* Clean modern light theme */
    --bg-page: #f3f4f6;
    --bg-main: #f3f4f6;
    --bg-card: #ffffff;
    --bg-card-hover: #f9fafb;
    --bg-sidebar: #ffffff;
    --bg-header: #ffffff;
    --text-main: #111827;
    --text-muted: #6b7280;
    --border-subtle: #e5e7eb;
    --border-active: #2563eb;
    --border-active-strong: #2563eb;
    --accent-gold: #d97706;
    --accent-green: #059669;
    --live-red: #dc2626;
    --btn-bg: #f3f4f6;
    --btn-hover: #e5e7eb;
    --shadow-card: 0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.03);
    --shadow-modal: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    --player-bg: #1e293b;
    --player-header: #ffffff;
}

* { margin:0; padding:0; box-sizing:border-box; font-family:'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; }
html, body { min-height:100vh; }

body { 
    background-color: var(--bg-page); 
    color: var(--text-main); 
    padding:20px; 
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#guide-view { display: flex; flex-direction: column; height: 100%; overflow: hidden; }

img.emoji { height: 1.2em; width: 1.2em; margin: 0 .05em 0 .1em; vertical-align: -0.2em; }

.top-bar { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:24px; flex-wrap:wrap; flex-shrink: 0; }
.top-bar h1 { font-size:1.8rem; font-weight:800; display:flex; align-items:center; gap:10px; margin:0; white-space:nowrap; color: var(--text-main); letter-spacing: -0.5px; flex-shrink:0; }
.top-bar h1 i { color: var(--accent-gold); }
.top-bar .search-container { flex:1; max-width:500px; min-width:200px; }
.search-box { width:100%; padding:12px 20px; border:none; border-radius:12px; background:var(--bg-card); color:var(--text-main); font-size:0.95rem; border:1px solid var(--border-subtle); transition: border-color 0.2s; }
.search-box:focus { outline:none; border-color:var(--border-active); }
.search-box::placeholder { color:var(--text-muted); }
.btn-group { display:flex; gap:8px; flex-shrink:0; }
.btn-outline { background:var(--bg-card); border:1px solid var(--border-subtle); color:var(--text-main); padding:10px 18px; border-radius:12px; cursor:pointer; font-weight:600; font-size:0.85rem; display:flex; align-items:center; gap:8px; transition: background-color 0.2s; }
.btn-outline:hover { background:var(--bg-card-hover); }
.btn-theme { width:42px; padding:0; justify-content:center; }

.layout-container { display:flex; gap:20px; flex: 1; min-height: 0; }

.sidebar-sports { 
    width:220px; flex-shrink:0; background:var(--bg-sidebar); border-radius:14px; padding:10px; 
    display:flex; flex-direction:column; gap:6px; border: 1px solid var(--border-subtle); overflow-y: auto;
    -webkit-overflow-scrolling: touch; scrollbar-width: thin; scrollbar-color: var(--border-subtle) transparent;
}
.sidebar-sports::-webkit-scrollbar { width: 4px; }
.sidebar-sports::-webkit-scrollbar-thumb { background: var(--border-subtle); border-radius: 4px; }

.sport-btn { display:flex; align-items:center; gap:12px; padding:12px 14px; border-radius:10px; background:transparent; border:none; color:var(--text-muted); cursor:pointer; font-weight:600; font-size:0.9rem; text-align:left; width:100%; transition: background-color 0.15s, color 0.15s; }
.sport-btn:hover { background:var(--bg-card); color:var(--text-main); }
.sport-btn.active { background:var(--bg-card-hover); color:var(--text-main); box-shadow: inset 3px 0 0 var(--sport-color, var(--border-active)); }
.sport-btn .sport-icon { width:28px; height:28px; border-radius:8px; display:flex; align-items:center; justify-content:center; font-size:1.2rem; background:var(--bg-card); color:var(--text-muted); flex-shrink: 0; }
.sport-btn.active .sport-icon { background:rgba(255,255,255,0.05); }
.sport-btn .sport-count { margin-left:auto; background:var(--bg-card); padding:2px 8px; border-radius:8px; font-size:0.75rem; font-weight:700; color:var(--text-muted); }
.sport-btn.active .sport-count { background:var(--border-active); color:#fff; }
.sport-btn.featured-btn { color:var(--text-main); }
.sport-btn.featured-btn .sport-icon { background:rgba(245,158,11,0.15); }
.sport-btn.featured-btn.active { box-shadow: inset 3px 0 0 var(--accent-gold); }

/* LIVE + FINISHED special buttons */
.sport-btn.live-btn .sport-icon { background:rgba(239,68,68,0.15); }
.sport-btn.live-btn.active { box-shadow: inset 3px 0 0 var(--live-red); }
.sport-btn.live-btn.active .sport-count { background: var(--live-red); }
.sport-btn.finished-btn .sport-icon { background:rgba(148,163,184,0.15); }
.sport-btn.finished-btn.active { box-shadow: inset 3px 0 0 var(--text-muted); }

.sidebar-dates { 
    width:95px; flex-shrink:0; display:flex; flex-direction:column; gap:10px; overflow-y:auto; 
    -webkit-overflow-scrolling: touch; scrollbar-width:none; padding-right:4px; 
}
.sidebar-dates::-webkit-scrollbar { display:none; }
.date-btn { display:flex; flex-direction:column; align-items:center; justify-content:center; padding:14px 8px; border-radius:12px; background:var(--bg-sidebar); border:1px solid var(--border-subtle); color:var(--text-muted); cursor:pointer; gap:4px; flex-shrink: 0; transition: background-color 0.15s, border-color 0.15s; }
.date-btn:hover { background:var(--bg-card); color:var(--text-main); }
.date-btn.active { background:var(--bg-card-hover); color:var(--text-main); border-color:var(--border-active); }
.date-btn .d-name { font-size:0.7rem; font-weight:800; text-transform:uppercase; letter-spacing:0.5px; opacity:0.7; }
.date-btn .d-num { font-size:1.4rem; font-weight:800; line-height:1.1; }
.date-btn .d-month { font-size:0.7rem; font-weight:700; text-transform:uppercase; }
.date-btn.active .d-name, .date-btn.active .d-month { color: var(--border-active); opacity:1; }

.main-content { 
    flex:1; min-width:0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding-right: 10px; padding-bottom: 20px;
    scrollbar-width: thin; scrollbar-color: var(--border-active) transparent; touch-action: pan-y;
}
.main-content::-webkit-scrollbar { width: 6px; }
.main-content::-webkit-scrollbar-thumb { background: var(--border-active); border-radius: 6px; }

.guide-events-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(320px,1fr)); gap:16px; }

/* =========================================================
   GUIDE CARD (layout tipo "Published")
   ========================================================= */
.guide-card {
    background:var(--bg-main); border-radius:12px; overflow:hidden; display:flex; flex-direction:column;
    cursor:pointer; border:1px solid var(--border-subtle); position: relative;
    border-left:4px solid var(--sport-color, var(--text-muted));
    box-shadow: var(--shadow-card);
    content-visibility: auto; contain-intrinsic-size: auto 280px; 
}
.guide-card:hover { background:var(--bg-card-hover); border-color:var(--text-muted); }
.guide-card.featured { border-color: rgba(245,158,11,0.6); border-left-color: var(--sport-color, var(--accent-gold)); }
.guide-card.is-live { border-color: rgba(239,68,68,0.5); border-left-color: var(--live-red); }
.guide-card.is-finished { opacity: 0.92; cursor: default; pointer-events: none; }

.guide-card-header { padding:10px 14px; background:var(--bg-header); display:flex; justify-content:space-between; align-items:center; gap:8px; font-size:0.8rem; font-weight:600; border-bottom: 1px solid var(--border-subtle); }
.guide-league { display:flex; align-items:center; gap:8px; overflow:hidden; flex:1; color: var(--text-muted); }
.guide-league img { width:20px; height:20px; object-fit:contain; background:var(--bg-card); border-radius:4px; padding:2px; flex-shrink:0; }
.guide-league span { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; font-size:0.8rem; }
.guide-header-right { display:flex; gap:8px; align-items:center; flex-shrink:0; }
.featured-star { color:var(--accent-gold); font-size:0.95rem; }
.guide-time { background:var(--bg-card); color:var(--text-main); padding:4px 10px; border-radius:8px; font-size:0.7rem; font-weight:700; white-space:nowrap; display:flex; align-items:center; gap:6px; border: 1px solid var(--border-subtle); }

/* Header live badge */
.guide-live-badge {
    display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 6px;
    background: rgba(239,68,68,0.15); color: var(--live-red); font-size: 0.65rem; font-weight: 800;
    text-transform: uppercase; letter-spacing: 0.4px; border: 1px solid rgba(239,68,68,0.3);
    animation: pulseLive 1.5s infinite;
}
.guide-live-badge i { font-size: 0.5rem; }

.guide-teams { display:flex; align-items:center; justify-content:space-around; padding:16px 14px; gap:8px; }
.guide-team { display:flex; flex-direction:column; align-items:center; gap:8px; flex:1; text-align:center; min-width:0; }
.guide-team img { width:40px; height:40px; object-fit:contain; }
.guide-team span { font-size:0.8rem; font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; max-width:100%; color: var(--text-main); }

/* VS reemplazado por centro de tiempo/score */
.guide-teams-center {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 3px; padding: 6px 12px; border-radius: 10px;
    background: var(--bg-page); border: 1px solid var(--border-subtle);
    flex-shrink: 0; min-width: 68px; text-align: center;
}
.guide-center-time {
    font-size: 0.9rem; font-weight: 800; color: var(--text-main); letter-spacing: 0.3px;
}
.guide-center-score {
    font-size: 1.2rem; font-weight: 800; color: var(--text-main); line-height: 1; letter-spacing: 0.5px;
}
.guide-center-status {
    font-size: 0.6rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.5px;
    padding: 2px 8px; border-radius: 6px; margin-top: 2px;
}
.guide-center-status.live {
    background: rgba(239,68,68,0.15); color: var(--live-red);
    border: 1px solid rgba(239,68,68,0.3); animation: pulseLive 1.5s infinite;
}
.guide-center-status.finished {
    background: rgba(148,163,184,0.15); color: var(--text-muted);
    border: 1px solid rgba(148,163,184,0.3);
}

@keyframes pulseLive {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.55; }
}

.guide-vs { font-size:0.85rem; font-weight:800; color:var(--text-muted); background:var(--bg-page); padding:6px; border-radius:50%; width:32px; height:32px; display:flex; align-items:center; justify-content:center; flex-shrink:0; }

.guide-footer { padding:8px 14px; background:var(--bg-header); display:flex; justify-content:space-between; align-items:center; gap:8px; font-size:0.7rem; margin-top:auto; border-top: 1px solid var(--border-subtle); }
.guide-channel { display:flex; align-items:center; gap:6px; font-weight:700; color:var(--text-main); background:rgba(59,130,246,0.1); padding:3px 8px; border-radius:6px; border: 1px solid rgba(59,130,246,0.2); font-size:0.7rem; }
.guide-channel i { color: var(--border-active); }

/* END EVENT label en tarjetas finished */
.guide-channel.is-ended {
    background: rgba(148,163,184,0.1);
    border-color: rgba(148,163,184,0.2);
    color: var(--text-muted);
    cursor: default;
}
.guide-channel.is-ended i { color: var(--text-muted) !important; }

.sport-badge { display:inline-flex; align-items:center; gap:6px; padding:3px 8px; border-radius:6px; font-size:0.65rem; font-weight:700; letter-spacing:0.3px; text-transform:uppercase; }

.guide-empty { text-align:center; padding:40px 20px; background:var(--bg-main); border-radius:12px; border:1px solid var(--border-subtle); grid-column:1/-1; }
.guide-empty i { font-size:2.5rem; color:var(--text-muted); opacity:0.5; margin-bottom:12px; display:block; }
.guide-empty p { font-size:1rem; color:var(--text-muted); }

/* =========================================================
   LIGHT THEME — SPECIFIC OVERRIDES
   ========================================================= */
[data-theme="light"] .guide-time { background: var(--bg-page); }
[data-theme="light"] .guide-league img { border: 1px solid var(--border-subtle); }
[data-theme="light"] .sport-btn .sport-icon { background: rgba(15,23,42,0.04); }
[data-theme="light"] .sport-btn.active .sport-icon { background: var(--bg-card); }
[data-theme="light"] .sport-btn.active .sport-count { color: #fff; }

/* =========================================================
   PLAYER OVERLAY
   ========================================================= */
.player-overlay { position:fixed; inset:0; background:rgba(0,0,0,0.95); display:flex; justify-content:center; align-items:center; z-index:1000; opacity:0; visibility:hidden; padding:20px; }
.player-overlay.active { opacity:1; visibility:visible; }
[data-theme="light"] .player-overlay { background:rgba(15,23,42,0.85); }

.player-container { background:var(--player-bg); border-radius:14px; width:95%; max-width:1100px; height:min(90vh,800px); display:flex; flex-direction:column; overflow:hidden; box-shadow:var(--shadow-modal); border:1px solid var(--border-subtle); position: relative; }

.player-header { padding:14px 20px; background:var(--player-header); display:flex; justify-content:space-between; align-items:center; gap:12px; flex-shrink:0; border-bottom:1px solid var(--border-subtle); }
.player-title { display:flex; align-items:center; gap:12px; min-width:0; flex:1; flex-wrap:wrap; }
.player-channel-logo { width:36px; height:36px; object-fit:contain; border-radius:8px; background:var(--bg-card); padding:4px; flex-shrink:0; }
#player-title { font-size:1.05rem; font-weight:700; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; min-width:0; color:var(--text-main); }
.close-player { background:var(--bg-card); border:none; color:var(--text-muted); font-size:1.2rem; cursor:pointer; width:36px; height:36px; display:flex; justify-content:center; align-items:center; border-radius:8px; flex-shrink:0; }
.close-player:hover { background:var(--bg-card-hover); color:var(--text-main); }

.player-body { flex:1; display:flex; min-height:0; overflow:hidden; }

.player-sidebar { display: none; width: 260px; flex-shrink:0; background:var(--player-header); border-right:1px solid var(--border-subtle); flex-direction: column; }
.player-container.show-sidebar .player-sidebar { display: flex; }
.stream-list-header { padding:14px 16px; font-size:0.85rem; font-weight:800; text-transform:uppercase; letter-spacing:0.5px; color:var(--text-muted); border-bottom:1px solid var(--border-subtle); flex-shrink:0; display:flex; justify-content:space-between; align-items:center; }

.close-sidebar-btn { display: none; background: transparent; border: none; color: var(--text-muted); font-size: 1.2rem; cursor: pointer; padding: 0 4px; }
.close-sidebar-btn:hover { color: var(--text-main); }

.player-streams { flex:1; overflow-y:auto; padding:12px; display:flex; flex-direction:column; gap:8px; scrollbar-width:thin; -webkit-overflow-scrolling: touch; }
.player-streams::-webkit-scrollbar { width:6px; }
.player-streams::-webkit-scrollbar-thumb { background:var(--border-subtle); border-radius:3px; }

.stream-tab { padding:12px 14px; border-radius:8px; border:1px solid var(--border-subtle); background:var(--bg-card); color:var(--text-muted); cursor:pointer; font-size:0.85rem; font-weight:600; text-align:left; display:flex; align-items:center; gap:10px; width:100%; transition: background-color 0.15s; }
.stream-tab i { font-size:1rem; opacity:0.7; }
.stream-tab:hover { background:var(--bg-card-hover); color:var(--text-main); }
.stream-tab.active { background:rgba(59,130,246,0.1); border-color:var(--border-active); color:var(--border-active); }
.stream-tab.active i { opacity:1; }

.player-main { flex:1; display:flex; flex-direction:column; min-width:0; background:#000; position:relative; }
.player-iframe-container { flex:1; position:relative; background:#000; overflow:hidden; }
.player-iframe { position:absolute; inset:0; width:100%; height:100%; border:none; }

.channels-toggle-btn { position: absolute; top: 12px; left: 12px; z-index: 10; background: rgba(0,0,0,0.8); color: #fff; border: 1px solid rgba(255,255,255,0.2); padding: 8px 14px; border-radius: 8px; cursor: pointer; font-size: 0.85rem; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.channels-toggle-btn:hover { background: #000; }
.player-container.show-sidebar .channels-toggle-btn { background: var(--border-active); border-color: var(--border-active); }

.player-controls { display:grid; grid-template-columns:repeat(auto-fit,minmax(120px,1fr)); gap:10px; padding:16px 20px; background:var(--player-header); flex-shrink:0; border-top:1px solid var(--border-subtle); }
.player-btn { padding:10px 14px; border:1px solid transparent; border-radius:8px; cursor:pointer; display:flex; align-items:center; justify-content:center; gap:8px; font-weight:600; font-size:0.8rem; color:var(--text-main); background:var(--btn-bg); white-space:nowrap; min-width:0; overflow:hidden; transition: background-color 0.15s; }
.player-btn i { font-size:0.9rem; flex-shrink:0; }
.player-btn:hover { background:var(--btn-hover); }

.player-btn.btn-reload { background:rgba(59,130,246,0.1); color:#60a5fa; border-color:rgba(59,130,246,0.2); }
[data-theme="light"] .player-btn.btn-reload { color:#2563eb; background:rgba(37,99,235,0.1); }
.player-btn.btn-reload:hover { background:rgba(59,130,246,0.2); }
.player-btn.btn-url { background:rgba(16,185,129,0.1); color:#34d399; border-color:rgba(16,185,129,0.2); }
[data-theme="light"] .player-btn.btn-url { color:#059669; background:rgba(5,150,105,0.1); }
.player-btn.btn-url:hover { background:rgba(16,185,129,0.2); }
.player-btn.btn-embed { background:rgba(139,92,246,0.1); color:#a78bfa; border-color:rgba(139,92,246,0.2); }
[data-theme="light"] .player-btn.btn-embed { color:#7c3aed; background:rgba(124,58,237,0.1); }
.player-btn.btn-embed:hover { background:rgba(139,92,246,0.2); }
.player-btn.btn-window { background:rgba(20,184,166,0.1); color:#2dd4bf; border-color:rgba(20,184,166,0.2); }
[data-theme="light"] .player-btn.btn-window { color:#0d9488; background:rgba(13,148,136,0.1); }
.player-btn.btn-window:hover { background:rgba(20,184,166,0.2); }

.player-footer { padding:12px 20px; background:var(--player-header); text-align:center; font-size:0.75rem; color:var(--text-muted); flex-shrink:0; border-top:1px solid var(--border-subtle); }

.toast { position:fixed; left:50%; bottom:30px; transform:translateX(-50%) translateY(20px); background:var(--text-main); color:var(--bg-page); padding:12px 24px; border-radius:12px; font-size:0.9rem; font-weight:600; box-shadow:0 10px 30px rgba(0,0,0,0.2); opacity:0; visibility:hidden; z-index:3000; max-width:90vw; text-align:center; }
.toast.show { opacity:1; visibility:visible; transform:translateX(-50%) translateY(0); }

footer { text-align:center; margin-top:40px; padding:20px; color:var(--text-muted); font-size:0.85rem; }

.flag-icon { width: 18px; height: 13px; object-fit: cover; border-radius: 2px; vertical-align: middle; display: inline-block; margin-right: 4px; }

body.standalone-player #guide-view { display:none !important; }
body.standalone-player footer { display:none !important; }
body.standalone-player { padding:0; background:#000; overflow:hidden; height: 100vh; height: 100dvh; }
body.standalone-player .player-overlay { position:relative; padding:0; width:100vw; height:100vh; height:100dvh; opacity:1; visibility:visible; background:transparent; }
body.standalone-player .player-container { width:100%; height:100vh; height:100dvh; max-width:none; border-radius:0; border:none; box-shadow:none; }
body.standalone-player .close-player { display:none; }
body.standalone-player .btn-window { display:none; }

@media (max-width:900px) {
    body { height: auto; overflow: auto; display: block; }
    #guide-view { height: auto; overflow: visible; }
    .layout-container { flex-wrap:wrap; display: flex; flex-direction: column; }
    .sidebar-sports { width:100%; flex-direction:row; overflow-x:auto; overflow-y:hidden; height: auto; flex-shrink: 1; padding:8px; border-radius:12px; }
    .sport-btn { white-space:nowrap; width:auto; padding:8px 12px; }
    .sport-btn.active { box-shadow: inset 0 -3px 0 var(--sport-color, var(--border-active)); }
    .sport-btn.featured-btn.active { box-shadow: inset 0 -3px 0 var(--accent-gold); }
    .sport-btn.live-btn.active { box-shadow: inset 0 -3px 0 var(--live-red); }
    .sport-btn.finished-btn.active { box-shadow: inset 0 -3px 0 var(--text-muted); }
    .sidebar-dates { width:100%; flex-direction:row; overflow-x:auto; overflow-y:hidden; height: auto; padding-bottom:8px; }
    .date-btn { min-width:80px; flex-direction:row; gap:6px; padding:10px 14px; }
    .date-btn .d-num { font-size:1rem; }
    .main-content { width:100%; height: auto; overflow: visible; padding-right: 0; }
}

@media (max-width: 600px) {
    body { padding:12px; }
    .top-bar { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "title buttons" "search search"; gap: 8px; align-items: center; margin-bottom: 12px; }
    .top-bar h1 { grid-area: title; font-size: 1.1rem; white-space: normal; }
    .top-bar h1 i { font-size: 1rem; }
    .search-container { grid-area: search; margin-top: 4px; width: 100%; max-width: none; }
    .btn-group { grid-area: buttons; }
    .btn-outline { padding: 8px 10px; font-size: 0.75rem; }
    .btn-text-hide { display: none; }
    .btn-theme { width: 34px; height: 34px; padding: 0; }
    .guide-events-grid { grid-template-columns:1fr; gap:12px; }
}

@media (max-width: 768px) {
    .player-overlay { padding: 0; align-items: flex-end; height: 100dvh; }
    .player-container { width: 100%; height: 100dvh; max-height: 100dvh; border-radius: 0; border: none; }
    body.standalone-player .player-overlay { height: 100dvh; }
    body.standalone-player .player-container { width: 100%; height: 100dvh; max-height: 100dvh; }
    .player-header { padding: 10px 14px; }
    .player-body { flex-direction: column; position: relative; }
    .player-sidebar { position: absolute; top: 0; left: 0; bottom: 0; width: 85%; max-width: 320px; z-index: 100; box-shadow: 4px 0 15px rgba(0,0,0,0.5); border-right: none; }
    .close-sidebar-btn { display: block; }
    .player-main { width: 100%; height: 100%; }
    .player-iframe-container { flex: 1; min-height: 0; }
    .channels-toggle-btn { top: 10px; left: 10px; padding: 6px 12px; font-size: 0.75rem; }
    .player-controls { padding: 12px; padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)); grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
    .player-btn { padding: 12px 4px; gap: 0; }
    .player-btn .btn-text { display: none; }
    .player-btn i { font-size: 1.1rem; }
    .player-footer { display: none; }
}

@media (max-height: 500px) and (orientation: landscape) {
    .player-overlay { padding:0; align-items:center; height: 100dvh; }
    .player-container { width:100%; height:100dvh; max-height:100dvh; border-radius:0; }
    body.standalone-player .player-container { height: 100dvh; }
    .player-body { flex-direction: row; }
    .player-sidebar { position: static; width: 200px; max-width: 200px; box-shadow: none; border-right: 1px solid var(--border-subtle); }
    .player-container:not(.show-sidebar) .player-sidebar { display: none; }
    .player-controls { padding:8px 12px; gap:8px; grid-template-columns:repeat(4,minmax(0,1fr)); }
    .player-btn { padding:8px; }
    .player-btn .btn-text { display:none; }
    .player-btn i { font-size:0.95rem; }
    .player-header { padding:8px 12px; }
    .channels-toggle-btn { top: 8px; left: 8px; }
}




/* LIGHT_THEME_V2_OVERRIDES */
[data-theme="light"] .btn-success { background: rgba(5,150,105,0.1); color: #059669; border-color: rgba(5,150,105,0.2); }
[data-theme="light"] .btn-success:hover { background: rgba(5,150,105,0.2); }
[data-theme="light"] .btn-warning { background: rgba(217,119,6,0.1); color: #d97706; border-color: rgba(217,119,6,0.2); }
[data-theme="light"] .btn-warning:hover { background: rgba(217,119,6,0.2); }
[data-theme="light"] .btn-danger { background: rgba(220,38,38,0.1); color: #dc2626; border-color: rgba(220,38,38,0.2); }
[data-theme="light"] .btn-danger:hover { background: rgba(220,38,38,0.2); }
[data-theme="light"] .btn-info { background: rgba(107,114,128,0.1); color: #6b7280; border-color: rgba(107,114,128,0.2); }
[data-theme="light"] .btn-info:hover { background: rgba(107,114,128,0.2); }
[data-theme="light"] .btn-primary { background: rgba(37,99,235,0.1); color: #2563eb; border-color: rgba(37,99,235,0.2); }
[data-theme="light"] .btn-primary:hover { background: rgba(37,99,235,0.2); }
[data-theme="light"] .published-badge { background: rgba(5,150,105,0.1); color: #059669; border-color: rgba(5,150,105,0.2); }
[data-theme="light"] .unpublished-badge { background: rgba(107,114,128,0.1); color: #6b7280; border-color: rgba(107,114,128,0.2); }
[data-theme="light"] .live-badge { background: rgba(220,38,38,0.1); color: #dc2626; border-color: rgba(220,38,38,0.2); }
/* END_LIGHT_THEME_V2_OVERRIDES */
