/* =========================================================
   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 */


/* ================================================================
   Accessibility: respect reduced-motion preference
   ================================================================ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .gtranslate_wrapper { animation: none !important; transition: none !important; }
}

/* Disable animations for low-end devices */
@media (prefers-reduced-data: reduce) {
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
    }
}

/* Prevent GPU overuse on animations (better battery) */
@supports (will-change: auto) {
    .stream-tab.active {
        will-change: auto;
    }
}

/* ================================================================
   50F: CLEAN FINAL BLOCK
   (1) Player flash fix CSS (JS is in scripthome05.js)
   (2) Light theme CONTRAST improvements (visible backgrounds, borders, shadows)
   (3) NO animations, NO transitions (performance for thousands of users)
   ================================================================ */

/* ──────────────────────────────────────────────────────────────
   PART 1: Player flash fix CSS
   Iframe hidden until JS adds .xuper-visible class
   ────────────────────────────────────────────────────────────── */

#player-iframe.player-iframe {
    opacity: 0;
}

#player-iframe.player-iframe.xuper-visible {
    opacity: 1 !important;
}

/* Dark theme: iframe loading bg dark */
.player-iframe {
    background: #0b0e14;
}

/* Light theme: iframe loading bg light */
html[data-theme="light"] #player-iframe.player-iframe {
    background: #e2e8f0 !important;
}

/* ──────────────────────────────────────────────────────────────
   PART 2: KILL animations/transitions for performance
   ────────────────────────────────────────────────────────────── */

*,
*::before,
*::after {
    transition: none !important;
    animation: none !important;
}

/* Isolate card repaint (off-screen cards don't repaint) */
.guide-card,
.event-card {
    contain: layout style;
}

/* ──────────────────────────────────────────────────────────────
   PART 3: LIGHT THEME — HIGH CONTRAST
   Backgrounds, borders, and text with proper distinction
   ────────────────────────────────────────────────────────────── */

html[data-theme="light"] {
    background: #dfe6ee !important;
    color-scheme: light !important;
}

html[data-theme="light"] body {
    background: #dfe6ee !important;
    color: #0f172a !important;
}

/* Top bar — clean white with visible border */
html[data-theme="light"] .top-bar {
    background: #ffffff !important;
    border-bottom: 2px solid #cbd5e1 !important;
    box-shadow: 0 2px 4px rgba(15, 23, 42, 0.06) !important;
}

html[data-theme="light"] .top-bar h1,
html[data-theme="light"] .top-bar h1 span {
    color: #0f172a !important;
}

html[data-theme="light"] .top-bar h1 i {
    color: #f59e0b !important;
}

/* Search box — distinct from white bg */
html[data-theme="light"] .search-box,
html[data-theme="light"] .search-container input {
    background: #f8fafc !important;
    color: #0f172a !important;
    border: 1px solid #cbd5e1 !important;
}

html[data-theme="light"] .search-box::placeholder {
    color: #64748b !important;
}

html[data-theme="light"] .search-box:focus {
    border-color: #3b82f6 !important;
    background: #ffffff !important;
}

/* Buttons — white with visible border */
html[data-theme="light"] .btn-outline {
    background: #ffffff !important;
    color: #0f172a !important;
    border: 1px solid #cbd5e1 !important;
}

html[data-theme="light"] .btn-outline:hover {
    background: #f1f5f9 !important;
    border-color: #94a3b8 !important;
}

html[data-theme="light"] #theme-toggle {
    background: #ffffff !important;
    color: #0f172a !important;
    border: 1px solid #cbd5e1 !important;
}

/* Language selector */
html[data-theme="light"] .xuper-lang-v2-btn {
    background: #ffffff !important;
    color: #0f172a !important;
    border: 1px solid #cbd5e1 !important;
}

html[data-theme="light"] .xuper-lang-v2-menu {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.12) !important;
}

html[data-theme="light"] .xuper-lang-v2-item {
    color: #0f172a !important;
}

html[data-theme="light"] .xuper-lang-v2-item:hover {
    background: #f1f5f9 !important;
}

html[data-theme="light"] .xuper-lang-v2-item.active {
    background: #eff6ff !important;
    color: #2563eb !important;
}

/* Layout wrappers */
html[data-theme="light"] #guide-view,
html[data-theme="light"] .guide-layout,
html[data-theme="light"] .guide-main,
html[data-theme="light"] .guide-content,
html[data-theme="light"] .guide-list,
html[data-theme="light"] .events-list {
    background: #dfe6ee !important;
}

/* Sidebar — white card with border, subtle shadow */
html[data-theme="light"] .guide-sidebar,
html[data-theme="light"] .sidebar {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06) !important;
}

/* Cards — white with visible border + subtle shadow */
html[data-theme="light"] .guide-card,
html[data-theme="light"] .event-card,
html[data-theme="light"] .guide-league-card {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08) !important;
}

/* Cards hover — subtle lift */
html[data-theme="light"] .guide-card:hover,
html[data-theme="light"] .event-card:hover {
    border-color: #94a3b8 !important;
    box-shadow: 0 4px 8px rgba(15, 23, 42, 0.12) !important;
}

/* Sport buttons in sidebar */
html[data-theme="light"] .sport-btn {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    color: #0f172a !important;
}

html[data-theme="light"] .sport-btn:hover {
    background: #f1f5f9 !important;
    border-color: #cbd5e1 !important;
}

html[data-theme="light"] .sport-btn.active {
    background: #eff6ff !important;
    border-color: #3b82f6 !important;
    color: #1d4ed8 !important;
}

/* Date pills */
html[data-theme="light"] .date-pill {
    background: #ffffff !important;
    color: #0f172a !important;
    border: 1px solid #cbd5e1 !important;
}

html[data-theme="light"] .date-pill.active {
    background: #3b82f6 !important;
    color: #ffffff !important;
    border-color: #2563eb !important;
}

/* Footer */
html[data-theme="light"] footer,
html[data-theme="light"] .xuper-main-footer {
    background: #ffffff !important;
    border-top: 2px solid #cbd5e1 !important;
    color: #475569 !important;
}

html[data-theme="light"] footer p,
html[data-theme="light"] .xuper-main-footer p {
    color: #475569 !important;
}

/* ──────────────────────────────────────────────────────────────
   PART 4: PLAYER LIGHT THEME
   ────────────────────────────────────────────────────────────── */

html[data-theme="light"] .player-overlay {
    background: rgba(15, 23, 42, 0.75) !important;
}

html[data-theme="light"] .player-container {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25) !important;
}

html[data-theme="light"] .player-header {
    background: #f8fafc !important;
    border-bottom: 1px solid #cbd5e1 !important;
}

html[data-theme="light"] .player-header #player-title {
    color: #0f172a !important;
}

html[data-theme="light"] .close-player {
    background: #f1f5f9 !important;
    color: #475569 !important;
    border: 1px solid #cbd5e1 !important;
}

html[data-theme="light"] .close-player:hover {
    background: #e2e8f0 !important;
    color: #0f172a !important;
}

html[data-theme="light"] .player-body {
    background: #f1f5f9 !important;
}

html[data-theme="light"] .player-sidebar {
    background: #ffffff !important;
    border-right: 1px solid #cbd5e1 !important;
}

html[data-theme="light"] .stream-list-header {
    background: #f1f5f9 !important;
    border-bottom: 1px solid #cbd5e1 !important;
    color: #0f172a !important;
}

html[data-theme="light"] .stream-tab {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    color: #0f172a !important;
}

html[data-theme="light"] .stream-tab:hover {
    background: #f8fafc !important;
    border-color: #cbd5e1 !important;
}

html[data-theme="light"] .stream-tab.active {
    background: #eff6ff !important;
    border-color: #3b82f6 !important;
    color: #1d4ed8 !important;
}

html[data-theme="light"] .player-main,
html[data-theme="light"] .player-iframe-container {
    background: #e2e8f0 !important;
}

html[data-theme="light"] .player-controls {
    background: #f8fafc !important;
    border-top: 1px solid #cbd5e1 !important;
}

html[data-theme="light"] .player-btn {
    background: #ffffff !important;
    color: #0f172a !important;
    border: 1px solid #cbd5e1 !important;
}

html[data-theme="light"] .player-btn:hover {
    background: #f1f5f9 !important;
    border-color: #94a3b8 !important;
}

html[data-theme="light"] .player-footer {
    background: #f8fafc !important;
    border-top: 1px solid #cbd5e1 !important;
    color: #475569 !important;
}

html[data-theme="light"] .channels-toggle-btn {
    background: rgba(255, 255, 255, 0.95) !important;
    color: #0f172a !important;
    border: 1px solid #cbd5e1 !important;
}

/* ──────────────────────────────────────────────────────────────
   PART 5: TEXT COLOR ALWAYS READABLE
   ────────────────────────────────────────────────────────────── */

html[data-theme="light"] * {
    /* Don't override everything, just ensure base text is dark */
    /* text color cascades from body which we set */
}

/* XUPER UI V4 START - portada estilo DAZN, sin animaciones. Para quitarlo, borrar hasta XUPER UI V4 END */
@font-face { font-family:"XF Cond"; src:url("/fonts/barlow-condensed-700.woff2") format("woff2"); font-weight:700; font-style:normal; font-display:swap; }
:root { --xf-ac:#ffd60a; --xf-live:#e5192e; --xf-cond:"XF Cond","Barlow Condensed","Arial Narrow",ui-sans-serif,system-ui,sans-serif; }
html:not([data-theme="light"]) { --xf-bg:#0a0b0d; --xf-top:#0f1114; --xf-side:#0d0f12; --xf-c1:#1b1e23; --xf-c2:#14161a; --xf-bd:rgba(255,255,255,.07); --xf-hi:rgba(255,255,255,.06); --xf-sd:rgba(0,0,0,.75); --xf-tx:#f3f4f6; --xf-mu:#9ca3ae; --xf-line:rgba(255,255,255,.06); --xf-sel:#1d2128; --xf-chip:#23272e; --xf-inp:#16191d; --xf-row:rgba(255,255,255,.025); --xf-hov:rgba(255,255,255,.035); --xf-acic:#ffd60a; }
html[data-theme="light"] { --xf-bg:#e9edf2; --xf-top:#ffffff; --xf-side:#f5f7fa; --xf-c1:#ffffff; --xf-c2:#f9fafc; --xf-bd:#d3dae3; --xf-hi:#ffffff; --xf-sd:rgba(15,23,42,.18); --xf-tx:#0e141b; --xf-mu:#556070; --xf-line:#e6ebf1; --xf-sel:#ffffff; --xf-chip:#eef1f5; --xf-inp:#eef1f5; --xf-row:#f4f6f9; --xf-hov:#f4f7fa; --xf-acic:#a16207; }

/* base */
html:not(.xf) { background:var(--xf-bg) !important; }
html:not(.xf) body { background:var(--xf-bg) !important; color:var(--xf-tx) !important; padding:0; -webkit-font-smoothing:antialiased; -moz-osx-font-smoothing:grayscale; }
html:not(.xf) body, html:not(.xf) body :where(div,span,p,a,button,input,select,textarea,label,h1,h2,h3,h4,small,b,strong,li,td,th) { font-family:ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
html:not(.xf) body #guide-view { background:transparent !important; }
html:not(.xf) body * { scrollbar-width:thin; scrollbar-color:rgba(148,163,184,.35) transparent; }
html:not(.xf) body ::-webkit-scrollbar { width:8px; height:8px; }
html:not(.xf) body ::-webkit-scrollbar-thumb { background:rgba(148,163,184,.35); border-radius:8px; }
html:not(.xf) body ::-webkit-scrollbar-track { background:transparent; }
.xs-ic { display:inline-block; vertical-align:middle; overflow:visible; width:1em; height:1em; }

/* cabecera */
html:not(.xf) body .top-bar { margin:0; padding:12px 24px; min-height:64px; gap:12px 20px; background:var(--xf-top) !important; border:0 !important; border-bottom:1px solid var(--xf-bd) !important; box-shadow:none !important; }
html:not(.xf) body .top-bar h1 { font-size:1.2rem; font-weight:800; letter-spacing:-.02em; color:var(--xf-tx) !important; }
html:not(.xf) body .top-bar h1 i { width:32px; height:32px; border-radius:9px; display:inline-flex; align-items:center; justify-content:center; font-size:.9rem; background:var(--xf-ac) !important; color:#111 !important; box-shadow:inset 0 1px 0 rgba(255,255,255,.45), 0 4px 10px -4px rgba(0,0,0,.6); }
html:not(.xf) body .search-box { height:42px; border-radius:10px; padding-left:40px !important; font-size:.92rem; color:var(--xf-tx) !important; border:1px solid var(--xf-bd) !important;
  background:var(--xf-inp) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239ca3ae' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E") no-repeat 14px 50% / 16px 16px !important; }
html[data-theme="light"] body .search-box { background:var(--xf-inp) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23556070' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E") no-repeat 14px 50% / 16px 16px !important; }
html:not(.xf) body .search-box::placeholder { color:var(--xf-mu) !important; }
html:not(.xf) body .search-box:focus { border-color:var(--xf-ac) !important; outline:none; }
html:not(.xf) body .btn-outline, html:not(.xf) body #theme-toggle, html:not(.xf) body .xuper-lang-v2-btn { min-height:42px; border-radius:10px; background:var(--xf-chip) !important; border:1px solid var(--xf-bd) !important; color:var(--xf-tx) !important; font-weight:600; box-shadow:inset 0 1px 0 var(--xf-hi); }
html:not(.xf) body .btn-outline:hover, html:not(.xf) body #theme-toggle:hover, html:not(.xf) body .xuper-lang-v2-btn:hover { background:var(--xf-sel) !important; }
html:not(.xf) body .xuper-lang-v2-menu { background:var(--xf-c1) !important; border:1px solid var(--xf-bd) !important; }
html:not(.xf) body .xuper-lang-v2-item { color:var(--xf-tx) !important; }
html:not(.xf) body .xuper-lang-v2-item:hover { background:var(--xf-hov) !important; }

/* menu de deportes */
html:not(.xf) body .sidebar-sports { background:var(--xf-side) !important; border:1px solid var(--xf-bd) !important; box-shadow:none !important; padding:14px 10px !important; gap:3px; }
html:not(.xf) body .sport-btn { min-height:44px; padding:6px 10px !important; gap:12px; border-radius:10px !important; background:transparent !important; border:1px solid transparent !important; color:var(--xf-tx) !important; font-weight:500 !important; font-size:.9rem; box-shadow:none !important; }
html:not(.xf) body .sport-btn:hover { background:var(--xf-hov) !important; }
html:not(.xf) body .sport-btn.active { background:var(--xf-sel) !important; border-color:var(--xf-bd) !important; font-weight:700 !important; box-shadow:inset 0 1px 0 var(--xf-hi), 0 6px 14px -10px var(--xf-sd) !important; }
html:not(.xf) body .sport-btn .sport-icon { width:28px; height:28px; min-width:28px; border-radius:0; background:transparent !important; color:var(--sport-color, var(--xf-mu)) !important; font-size:1rem; }
html:not(.xf) body .sport-btn .sport-icon .xs-ic { width:28px; height:28px; display:block; }
html:not(.xf) body .sport-btn .sport-count { margin-left:auto; min-width:26px; height:22px; padding:0 7px; border-radius:999px; display:inline-flex; align-items:center; justify-content:center; background:var(--xf-chip) !important; color:var(--xf-mu) !important; font-size:.72rem; font-weight:700; font-variant-numeric:tabular-nums; }
html:not(.xf) body .sport-btn.active .sport-count { background:var(--xf-ac) !important; color:#111 !important; }
html:not(.xf) body .sport-btn.live-btn.active .sport-count { background:var(--xf-live) !important; color:#fff !important; }

/* fechas */
html:not(.xf) body .sidebar-dates { background:transparent !important; border:0 !important; box-shadow:none !important; }
html:not(.xf) body .date-btn { gap:1px; border-radius:11px !important; background:var(--xf-c1) !important; border:1px solid var(--xf-bd) !important; color:var(--xf-tx) !important; box-shadow:inset 0 1px 0 var(--xf-hi) !important; }
html:not(.xf) body .date-btn:hover { background:var(--xf-sel) !important; }
html:not(.xf) body .date-btn.active { background:var(--xf-ac) !important; border-color:transparent !important; color:#111 !important; box-shadow:inset 0 1px 0 rgba(255,255,255,.5), 0 8px 18px -10px rgba(0,0,0,.7) !important; }
html:not(.xf) body .date-btn .d-name { font-size:.66rem; font-weight:800; letter-spacing:.07em; opacity:.8; }
html:not(.xf) body .date-btn .d-num { font-family:var(--xf-cond); font-size:1.4rem; font-weight:700; line-height:1; font-variant-numeric:tabular-nums; }
html:not(.xf) body .date-btn .d-month { font-size:.64rem; font-weight:700; letter-spacing:.06em; opacity:.8; }
html:not(.xf) body .date-btn.active .d-name, html:not(.xf) body .date-btn.active .d-month { color:#111 !important; opacity:.85; }

/* escritorio (XUPER UI V4.2): deportes | fechas en columna | eventos */
@media (min-width:901px) {
  html:not(.xf) body .layout-container { display:flex; gap:0; }
  html:not(.xf) body .sidebar-sports { width:240px; flex-shrink:0; border-radius:0; border:0 !important; border-right:1px solid var(--xf-bd) !important; }
  html:not(.xf) body .sidebar-dates { width:104px; flex-shrink:0; flex-direction:column; overflow-y:auto; overflow-x:hidden; padding:16px 10px; gap:8px; background:var(--xf-side) !important; border-right:1px solid var(--xf-bd) !important; scrollbar-width:none; }
  html:not(.xf) body .sidebar-dates::-webkit-scrollbar { display:none; }
  html:not(.xf) body .date-btn { flex-shrink:0; width:100%; min-height:78px; padding:10px 6px !important; gap:3px; }
  html:not(.xf) body .main-content { padding:16px 28px 32px; }
}

/* secciones */
html:not(.xf) body #guide-events-container { display:flex !important; flex-direction:column; gap:26px; }
.xg-sec { display:flex; flex-direction:column; gap:12px; }
.xg-h { display:flex; align-items:center; gap:10px; margin:0; font-family:var(--xf-cond) !important; font-size:1.45rem; font-weight:700; letter-spacing:.03em; text-transform:uppercase; color:var(--xf-tx); }
.xg-h .xg-n { font-family:ui-sans-serif, system-ui, sans-serif; font-size:.8rem; font-weight:600; letter-spacing:0; text-transform:none; color:var(--xf-mu); }
.xg-dot { width:9px; height:9px; border-radius:50%; background:var(--xf-live); box-shadow:0 0 0 4px rgba(229,25,46,.18); flex:none; }
.xg-live-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(300px,1fr)); gap:14px; }

/* tarjetas en vivo */
html:not(.xf) body .guide-card:not(.xg-row) { background:linear-gradient(180deg,var(--xf-c1),var(--xf-c2)) !important; border:1px solid var(--xf-bd) !important; border-radius:16px !important; box-shadow:inset 0 1px 0 var(--xf-hi), 0 1px 2px rgba(0,0,0,.25), 0 14px 30px -16px var(--xf-sd) !important; }
html:not(.xf) body .guide-card.is-live:not(.xg-row) { border-color:rgba(229,25,46,.45) !important; }
html:not(.xf) body .guide-card.featured:not(.xg-row) { border-color:rgba(255,214,10,.45) !important; }
@media (hover:hover) { html:not(.xf) body .guide-card:not(.xg-row):hover { background:linear-gradient(180deg,var(--xf-sel),var(--xf-c2)) !important; } }
html:not(.xf) body .guide-card-header { background:transparent !important; border-bottom:1px solid var(--xf-line) !important; padding:12px 16px 10px !important; }
html:not(.xf) body .guide-league span { color:var(--xf-tx) !important; font-weight:700; font-size:.82rem; }
html:not(.xf) body .guide-league img { width:22px; height:22px; background:transparent !important; border:0 !important; padding:0; }
html:not(.xf) body .guide-teams { padding:16px 14px !important; min-height:112px; }
html:not(.xf) body .guide-team img { width:46px; height:46px; }
html:not(.xf) body .guide-team span { color:var(--xf-tx) !important; font-size:.88rem; font-weight:650; line-height:1.25; white-space:normal; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
html:not(.xf) body .guide-teams-center { background:transparent !important; border:0 !important; box-shadow:none !important; min-width:76px; }
html:not(.xf) body .guide-center-score { font-family:var(--xf-cond); font-size:2rem !important; font-weight:700; letter-spacing:.02em; color:var(--xf-tx) !important; font-variant-numeric:tabular-nums; }
html:not(.xf) body .guide-center-time { font-family:var(--xf-cond); font-size:1.5rem; font-weight:700; color:var(--xf-tx) !important; font-variant-numeric:tabular-nums; }
html:not(.xf) body .guide-center-status.live, html:not(.xf) body .guide-live-badge { background:var(--xf-live) !important; color:#fff !important; border:0 !important; border-radius:6px; padding:3px 8px; font-size:.62rem; font-weight:800; letter-spacing:.08em; }
html:not(.xf) body .guide-center-status.finished { background:var(--xf-chip) !important; color:var(--xf-mu) !important; border:0 !important; }
html:not(.xf) body .guide-footer { background:transparent !important; border-top:1px solid var(--xf-line) !important; padding:10px 16px !important; }
html:not(.xf) body .guide-channel { background:var(--xf-chip) !important; border:0 !important; color:var(--xf-tx) !important; border-radius:8px; padding:5px 10px; font-size:.74rem; font-weight:600; }
html:not(.xf) body .guide-channel i { color:var(--xf-acic) !important; }
html:not(.xf) body .guide-channel.is-ended, html:not(.xf) body .guide-channel.is-ended i { color:var(--xf-mu) !important; }
html:not(.xf) body .sport-badge { background:transparent !important; border:0 !important; color:var(--xf-mu) !important; padding:0; gap:6px; font-size:.68rem; font-weight:700; letter-spacing:.06em; }
html:not(.xf) body .sport-badge .xs-ic { width:16px; height:16px; }
html:not(.xf) body .featured-star { color:var(--xf-acic) !important; }

/* grupos por liga y filas */
.xg-group { border-radius:16px; overflow:hidden; background:linear-gradient(180deg,var(--xf-c1),var(--xf-c2)); border:1px solid var(--xf-bd); box-shadow:inset 0 1px 0 var(--xf-hi), 0 1px 2px rgba(0,0,0,.2), 0 14px 30px -18px var(--xf-sd); }
.xg-ghead { display:flex; align-items:center; gap:10px; padding:11px 16px; background:var(--xf-row); }
.xg-glogo { width:22px; height:22px; object-fit:contain; flex:none; }
.xg-gname { min-width:0; font-weight:700; font-size:.88rem; color:var(--xf-tx); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.xg-gsport { display:inline-flex; flex:none; color:var(--sport-color, var(--xf-mu)); font-size:.85rem; }
.xg-gsport .xs-ic { width:18px; height:18px; }
.xg-ghead .xg-n { margin-left:auto; flex:none; font-size:.74rem; font-weight:700; color:var(--xf-mu); background:var(--xf-chip); border-radius:999px; padding:2px 8px; }
html:not(.xf) body .guide-card.xg-row { display:grid !important; grid-template-columns:80px minmax(0,1fr) auto auto 40px; align-items:center; gap:16px; padding:12px 16px !important; background:transparent !important; border:0 !important; border-top:1px solid var(--xf-line) !important; border-radius:0 !important; box-shadow:none !important; overflow:visible; content-visibility:auto; contain-intrinsic-size:auto 76px; }
@media (hover:hover) { html:not(.xf) body .guide-card.xg-row:hover { background:var(--xf-hov) !important; } }
html:not(.xf) body .guide-card.xg-row.is-finished { opacity:.82; }
.xg-time { display:flex; flex-direction:column; line-height:1; }
.xg-time b { font-family:var(--xf-cond) !important; font-size:1.65rem; font-weight:700; letter-spacing:.02em; color:var(--xf-tx); font-variant-numeric:tabular-nums; }
.xg-time small { margin-top:5px; font-size:.64rem; font-weight:700; letter-spacing:.08em; color:var(--xf-mu); }
.xg-teams { display:flex; flex-direction:column; gap:7px; min-width:0; }
.xg-t { display:flex; align-items:center; gap:10px; min-width:0; }
.xg-t img { width:24px; height:24px; object-fit:contain; flex:none; }
.xg-t span { min-width:0; font-size:.93rem; font-weight:600; color:var(--xf-tx); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.xg-t1 img { width:30px; height:30px; }
.xg-t1 span { white-space:normal; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; }
.xg-star .xs-ic { width:20px; height:20px; display:block; }
.xg-row .guide-channel { white-space:nowrap; }
.xg-go { width:40px; height:40px; border-radius:50%; display:flex; align-items:center; justify-content:center; background:var(--xf-chip); border:1px solid var(--xf-bd); box-shadow:inset 0 1px 0 var(--xf-hi); color:var(--xf-tx); }
.xg-go svg { width:13px; height:13px; fill:currentColor; }
@media (hover:hover) { .xg-row:hover .xg-go { background:var(--xf-ac); border-color:transparent; color:#111; } }
.xg-row.is-finished .xg-go { visibility:hidden; }

/* vacio, cargar mas, pie */
html:not(.xf) body .guide-empty { background:var(--xf-c1) !important; border:1px solid var(--xf-bd) !important; border-radius:16px; }
html:not(.xf) body .guide-load-more-btn { background:var(--xf-chip) !important; border:1px solid var(--xf-bd) !important; color:var(--xf-tx) !important; border-radius:10px; }
html:not(.xf) body .xuper-main-footer { margin:0; padding:14px; background:var(--xf-top) !important; border-top:1px solid var(--xf-bd) !important; color:var(--xf-mu) !important; font-size:.8rem; }
html:not(.xf) body .xuper-main-footer p { color:var(--xf-mu) !important; }

/* tablet y celular */
@media (max-width:900px) {
  html:not(.xf) body .top-bar { padding:10px 12px; min-height:56px; }
  html:not(.xf) body .layout-container { gap:10px; padding:12px 12px 0; }
  html:not(.xf) body .sidebar-sports { background:transparent !important; border:0 !important; padding:0 0 2px !important; gap:8px; scrollbar-width:none; }
  html:not(.xf) body .sidebar-sports::-webkit-scrollbar, html:not(.xf) body .sidebar-dates::-webkit-scrollbar { display:none; }
  html:not(.xf) body .sport-btn { flex:none; width:auto; white-space:nowrap; min-height:44px; padding:0 12px 0 8px !important; gap:8px; background:var(--xf-c1) !important; border:1px solid var(--xf-bd) !important; border-radius:12px !important; box-shadow:inset 0 1px 0 var(--xf-hi) !important; font-weight:700 !important; font-size:.82rem; }
  html:not(.xf) body .sport-btn.active { background:var(--xf-ac) !important; color:#111 !important; border-color:transparent !important; }
  html:not(.xf) body .sport-btn.active .sport-count, html:not(.xf) body .sport-btn.live-btn.active .sport-count { background:rgba(0,0,0,.16) !important; color:#111 !important; }
  html:not(.xf) body .sport-btn .sport-icon, html:not(.xf) body .sport-btn .sport-icon .xs-ic { width:24px; height:24px; min-width:24px; }
  html:not(.xf) body .sidebar-dates { padding:0 0 2px !important; gap:6px; scrollbar-width:none; }
  html:not(.xf) body .date-btn { min-width:64px; height:48px; flex-direction:column; gap:0; padding:0 10px !important; flex-shrink:0; }
  html:not(.xf) body .date-btn .d-num { font-size:1.1rem; }
  html:not(.xf) body .main-content { padding:4px 0 24px; }
}
@media (max-width:600px) {
  html:not(.xf) body .top-bar h1 { font-size:1.05rem; }
  .xg-live-grid { grid-template-columns:1fr; }
  html:not(.xf) body .guide-card.xg-row { grid-template-columns:58px minmax(0,1fr) auto 40px; gap:12px; padding:11px 12px !important; }
  html:not(.xf) body .xg-row .guide-channel { display:none; }
  .xg-time b { font-size:1.4rem; }
  .xg-t span { font-size:.88rem; }
  .xg-h { font-size:1.25rem; }
  .xg-ghead { padding:10px 12px; }
  html:not(.xf) body .guide-card:not(.xg-row) .guide-card-header { padding:10px 12px 8px !important; }
  html:not(.xf) body .guide-card:not(.xg-row) .guide-teams { min-height:0; padding:12px 10px !important; }
  html:not(.xf) body .guide-card:not(.xg-row) .guide-team { gap:6px; }
  html:not(.xf) body .guide-card:not(.xg-row) .guide-team img { width:36px; height:36px; }
  html:not(.xf) body .guide-card:not(.xg-row) .guide-team span { font-size:.82rem; }
  html:not(.xf) body .guide-center-score { font-size:1.7rem !important; }
  html:not(.xf) body .guide-card:not(.xg-row) .guide-footer { padding:8px 12px !important; }
}
/* XUPER UI V4.1: selector de vista + liga en cada fila */
.xg-shead { display:flex; align-items:center; justify-content:space-between; gap:10px 12px; flex-wrap:wrap; }
.xg-view { display:inline-flex; gap:3px; padding:3px; border-radius:11px; background:var(--xf-chip); border:1px solid var(--xf-bd); }
html:not(.xf) body .xg-view button { min-height:38px; padding:0 14px; border:0; border-radius:8px; background:transparent; color:var(--xf-mu); font-size:.8rem; font-weight:700; cursor:pointer; white-space:nowrap; }
html:not(.xf) body .xg-view button:hover { color:var(--xf-tx); }
html:not(.xf) body .xg-view button.active { background:var(--xf-ac); color:#111; box-shadow:inset 0 1px 0 rgba(255,255,255,.45); }
html:not(.xf) body .xg-flat > .guide-card.xg-row:first-child { border-top:0 !important; }
.xg-lg { display:flex; align-items:center; gap:6px; min-width:0; margin-bottom:1px; font-size:.72rem; font-weight:700; letter-spacing:.02em; color:var(--xf-mu); }
.xg-lg span:last-child { min-width:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.xg-lgi { display:inline-flex; flex:none; color:var(--sport-color, var(--xf-mu)); font-size:.75rem; }
.xg-lgi .xs-ic { width:15px; height:15px; }
@media (max-width:600px) { html:not(.xf) body .xg-view button { min-height:36px; padding:0 11px; font-size:.76rem; } }
/* XUPER UI V4.2: accesos directos por competicion */
.xg-strip { display:flex; align-items:center; gap:12px; min-width:0; }
.xg-strip-row { display:flex; gap:8px; flex:1; min-width:0; overflow-x:auto; padding:3px 3px 8px; scrollbar-width:thin; }
html:not(.xf) body .xg-lgbtn { flex:none; width:54px; height:54px; padding:0; border-radius:13px; display:flex; align-items:center; justify-content:center; cursor:pointer;
  background:linear-gradient(180deg,var(--xf-c1),var(--xf-c2)); border:1px solid var(--xf-bd); box-shadow:inset 0 1px 0 var(--xf-hi), 0 8px 16px -12px var(--xf-sd); }
html:not(.xf) body .xg-lgbtn img { width:34px; height:34px; object-fit:contain; }
.xg-lgfb { display:inline-flex; color:var(--xf-mu); font-size:1.1rem; }
.xg-lgfb .xs-ic { width:32px; height:32px; }
@media (hover:hover) { html:not(.xf) body .xg-lgbtn:hover { border-color:var(--xf-mu); } }
html:not(.xf) body .xg-lgbtn.active { border-color:var(--xf-ac); box-shadow:0 0 0 2px var(--xf-ac), 0 8px 16px -10px var(--xf-sd); }
.xg-lgname { flex:none; max-width:40%; font-family:var(--xf-cond); font-size:1.25rem; font-weight:700; letter-spacing:.02em; text-transform:uppercase; color:var(--xf-tx); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
@media (max-width:600px) {
  .xg-strip { flex-direction:column; align-items:stretch; gap:4px; }
  .xg-strip-row { gap:6px; scrollbar-width:none; }
  .xg-strip-row::-webkit-scrollbar { display:none; }
  html:not(.xf) body .xg-lgbtn { width:48px; height:48px; border-radius:12px; }
  html:not(.xf) body .xg-lgbtn img { width:30px; height:30px; }
  .xg-lgfb .xs-ic { width:28px; height:28px; }
  .xg-lgname { max-width:none; font-size:1.1rem; }
}
/* XUPER UI V4.3: separacion clara entre eventos */
html:not([data-theme="light"]) { --xf-sep:rgba(255,255,255,.10); }
/* por horario: cada evento es su propia tarjeta, con aire entre una y otra */
html:not(.xf) body .xg-group.xg-flat { display:flex; flex-direction:column; gap:10px; background:transparent; border:0; border-radius:0; box-shadow:none; overflow:visible; }
html:not(.xf) body .xg-flat > .guide-card.xg-row { padding:14px 16px !important; background:linear-gradient(180deg,var(--xf-c1),var(--xf-c2)) !important; border:1px solid var(--xf-bd) !important; border-radius:14px !important;
  box-shadow:inset 0 1px 0 var(--xf-hi), 0 1px 2px rgba(0,0,0,.18), 0 10px 22px -16px var(--xf-sd) !important; }
html:not(.xf) body .xg-flat > .guide-card.xg-row:first-child { border-top:1px solid var(--xf-bd) !important; }
@media (hover:hover) { html:not(.xf) body .xg-flat > .guide-card.xg-row:hover { border-color:var(--xf-mu) !important; background:linear-gradient(180deg,var(--xf-sel),var(--xf-c2)) !important; } }
/* por competicion: lineas divisorias mas marcadas dentro de cada liga */
html:not(.xf) body .xg-group:not(.xg-flat) > .guide-card.xg-row { border-top:1px solid var(--xf-sep) !important; padding:14px 16px !important; }
html:not(.xf) body .xg-group:not(.xg-flat) > .xg-ghead { border-bottom:1px solid var(--xf-sep); }
html:not(.xf) body .xg-group:not(.xg-flat) > .xg-ghead + .guide-card.xg-row { border-top:0 !important; }
.xg-sec > .xg-group:not(.xg-flat) + .xg-group:not(.xg-flat) { margin-top:2px; }

/* XUPER UI V4.3: tema claro suave (sin blanco puro, capas bien distintas, texto con buen contraste) */
html[data-theme="light"] {
  --xf-ac:#f0c000; --xf-bg:#d9dee5; --xf-top:#eceff3; --xf-side:#e3e7ec; --xf-c1:#f3f5f7; --xf-c2:#eceff2; --xf-bd:#c4cbd5; --xf-hi:rgba(255,255,255,.75);
  --xf-sd:rgba(15,23,42,.24); --xf-tx:#0f172a; --xf-mu:#4b5565; --xf-line:#d4dae2; --xf-sep:#cfd5de; --xf-sel:#f6f7f9; --xf-chip:#e1e5ea; --xf-inp:#f3f5f7;
  --xf-row:#e7eaee; --xf-hov:#e9ecf0; --xf-acic:#9a6700;
}
html[data-theme="light"] body .search-box:focus { border-color:#b08900 !important; }
@media (min-width:901px) { html:not(.xf) body .sport-btn.active { color:var(--xf-tx) !important; } }
html[data-theme="light"] body .guide-card.is-live:not(.xg-row) { border-color:rgba(220,38,38,.45) !important; }
html[data-theme="light"] body .guide-card.featured:not(.xg-row) { border-color:rgba(176,137,0,.55) !important; }
html[data-theme="light"] body .xg-lgbtn.active { border-color:#c79c00; box-shadow:0 0 0 2px #e0b400, 0 8px 16px -10px var(--xf-sd); }
html[data-theme="light"] body .sport-btn.active .sport-count, html[data-theme="light"] body .date-btn.active, html[data-theme="light"] body .xg-view button.active { color:#111 !important; }
/* XUPER UI V4.4: reproductor con el mismo estilo de la portada */
html:not(.xf) body .player-overlay { background:rgba(5,6,8,.88) !important; }
html[data-theme="light"] body .player-overlay { background:rgba(30,41,59,.62) !important; }
html:not(.xf) body .player-container { max-width:1180px; background:var(--xf-bg) !important; border:1px solid var(--xf-bd) !important; border-radius:16px; box-shadow:0 30px 70px -20px rgba(0,0,0,.7) !important; }
/* cabecera */
html:not(.xf) body .player-header { min-height:62px; padding:10px 14px 10px 18px; background:var(--xf-top) !important; border-bottom:1px solid var(--xf-bd) !important; }
html:not(.xf) body .player-title { flex-wrap:nowrap; gap:12px; }
html:not(.xf) body .player-channel-logo { width:36px; height:36px; padding:0; background:transparent !important; border-radius:0; }
html:not(.xf) body .player-header #player-title { font-family:var(--xf-cond) !important; font-size:1.45rem; font-weight:700; letter-spacing:.02em; line-height:1.15; color:var(--xf-tx) !important;
  white-space:normal; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
html:not(.xf) body .close-player { width:42px; height:42px; border-radius:11px; font-size:1.4rem; background:var(--xf-chip) !important; border:1px solid var(--xf-bd) !important; color:var(--xf-tx) !important; box-shadow:inset 0 1px 0 var(--xf-hi); }
html:not(.xf) body .close-player:hover { background:var(--xf-sel) !important; }
/* lista de canales: mas ancha y el nombre completo (hasta 2 lineas, nunca cortado con "...") */
html:not(.xf) body .player-sidebar { width:300px; background:var(--xf-side) !important; border-right:1px solid var(--xf-bd) !important; }
html:not(.xf) body .stream-list-header { padding:14px 16px; background:var(--xf-side) !important; border-bottom:1px solid var(--xf-bd) !important; color:var(--xf-mu) !important;
  font-family:var(--xf-cond) !important; font-size:1.05rem; font-weight:700; letter-spacing:.08em; }
html:not(.xf) body .close-sidebar-btn { color:var(--xf-mu) !important; background:transparent !important; border:0 !important; }
html:not(.xf) body .player-streams { padding:12px; gap:8px; }
html:not(.xf) body .stream-tab { min-height:50px; margin-bottom:0 !important; padding:10px 12px !important; gap:10px !important; border-radius:12px !important; transform:none !important;
  background:linear-gradient(180deg,var(--xf-c1),var(--xf-c2)) !important; border:1px solid var(--xf-bd) !important; color:var(--xf-tx) !important;
  box-shadow:inset 0 1px 0 var(--xf-hi), 0 6px 14px -12px var(--xf-sd) !important; }
html:not(.xf) body .stream-tab:hover { border-color:var(--xf-mu) !important; background:linear-gradient(180deg,var(--xf-sel),var(--xf-c2)) !important; }
html:not(.xf) body .stream-tab.active { background:var(--xf-sel) !important; border-color:var(--xf-ac) !important; box-shadow:inset 0 0 0 1px var(--xf-ac), 0 8px 16px -12px var(--xf-sd) !important; }
html:not(.xf) body .stream-tab .fa-tv { color:var(--xf-mu) !important; opacity:1; font-size:.95rem; }
html:not(.xf) body .stream-tab.active .fa-tv { color:var(--xf-acic) !important; }
html:not(.xf) body .stream-tab .stream-label { min-width:0; font-size:.88rem; font-weight:600 !important; line-height:1.25; color:var(--xf-tx) !important;
  white-space:normal !important; overflow:hidden !important; text-overflow:clip !important; overflow-wrap:anywhere; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; }
html:not(.xf) body .stream-tab > :not(.stream-label) { flex-shrink:0; }
html:not(.xf) body .stream-tab .flag-icon { width:22px !important; height:15px !important; margin-right:0; }
/* video y boton de canales */
html:not(.xf) body .player-main, html:not(.xf) body .player-iframe-container { background:#000 !important; }
html:not(.xf) body .channels-toggle-btn { min-height:40px; padding:0 14px; border-radius:10px; background:rgba(15,17,20,.86) !important; border:1px solid rgba(255,255,255,.14) !important; color:#f3f4f6 !important; font-weight:700; }
html:not(.xf) body .player-container.show-sidebar .channels-toggle-btn { background:var(--xf-ac) !important; border-color:transparent !important; color:#111 !important; }
/* botones de abajo: mismo estilo, icono con color */
html:not(.xf) body .player-controls { padding:12px 16px; gap:10px; background:var(--xf-top) !important; border-top:1px solid var(--xf-bd) !important; }
html:not(.xf) body .player-btn { min-height:44px; border-radius:11px; font-size:.84rem; font-weight:700; background:var(--xf-chip) !important; border:1px solid var(--xf-bd) !important; color:var(--xf-tx) !important; box-shadow:inset 0 1px 0 var(--xf-hi); }
html:not(.xf) body .player-btn:hover { background:var(--xf-sel) !important; border-color:var(--xf-mu) !important; }
html:not(.xf) body .player-btn.btn-reload i { color:#60a5fa; }
html:not(.xf) body .player-btn.btn-url i { color:#34d399; }
html:not(.xf) body .player-btn.btn-embed i { color:#a78bfa; }
html:not(.xf) body .player-btn.btn-window i { color:#2dd4bf; }
html[data-theme="light"] body .player-btn.btn-reload i { color:#1d4ed8; }
html[data-theme="light"] body .player-btn.btn-url i { color:#047857; }
html[data-theme="light"] body .player-btn.btn-embed i { color:#6d28d9; }
html[data-theme="light"] body .player-btn.btn-window i { color:#0f766e; }
html:not(.xf) body .player-footer { background:var(--xf-top) !important; border-top:1px solid var(--xf-bd) !important; color:var(--xf-mu) !important; }
@media (max-width:768px) {
  html:not(.xf) body .player-container { border-radius:0; border:0 !important; }
  html:not(.xf) body .player-sidebar { width:85%; max-width:330px; }
  html:not(.xf) body .player-header #player-title { font-size:1.2rem; }
  html:not(.xf) body .player-controls { padding:10px; padding-bottom:calc(10px + env(safe-area-inset-bottom, 0px)); gap:8px; }
}
@media (max-height:500px) and (orientation:landscape) {
  html:not(.xf) body .player-sidebar { width:240px; max-width:240px; }
}
/* XUPER UI V4.5: filas en vivo con borde rojo a la izquierda */
html:not(.xf) body .xg-flat > .guide-card.xg-row.is-live { border-left:4px solid var(--xf-live) !important; padding-left:13px !important;
  background:linear-gradient(90deg, rgba(229,25,46,.10), rgba(229,25,46,0) 38%), linear-gradient(180deg,var(--xf-c1),var(--xf-c2)) !important; }
@media (hover:hover) { html:not(.xf) body .xg-flat > .guide-card.xg-row.is-live:hover { border-color:var(--xf-mu) !important; border-left-color:var(--xf-live) !important; } }
.xg-row .xg-time b { white-space:nowrap; }
.xg-livetag { align-self:flex-start; margin-top:6px !important; padding:2px 7px; border-radius:5px; background:var(--xf-live); color:#fff !important; font-size:.6rem !important; font-weight:800; letter-spacing:.1em !important; line-height:1.3; }
@media (max-width:600px) { html:not(.xf) body .xg-row.is-live .xg-time b { font-size:1.3rem; } html:not(.xf) body .xg-flat > .guide-card.xg-row.is-live { padding-left:9px !important; } }
/* XUPER UI V4.6: PC y horizontal -> competicion | local vs visitante en un solo renglon */
@media (min-width:700px) {
  html:not(.xf) body .guide-card.xg-row { padding-top:10px !important; padding-bottom:10px !important; min-height:64px; }
  html:not(.xf) body .xg-row .xg-teams { flex-direction:row; align-items:center; gap:16px; }
  html:not(.xf) body .xg-row .xg-lg { flex:0 0 200px; width:200px; margin:0; font-size:.76rem; }
  html:not(.xf) body .xg-row .xg-t { flex:1 1 0; }
  html:not(.xf) body .xg-row .xg-t img { width:26px; height:26px; }
  html:not(.xf) body .xg-row .xg-t + .xg-t::before { content:"vs"; flex:none; margin-right:4px; font-size:.7rem; font-weight:800; letter-spacing:.06em; text-transform:uppercase; color:var(--xf-mu); }
  html:not(.xf) body .xg-row .xg-t1 span { -webkit-line-clamp:1; }
  html:not(.xf) body .xg-row .xg-time b { font-size:1.55rem; }
  html:not(.xf) body .xg-row .xg-time small { margin-top:3px; }
  html:not(.xf) body .xg-row .xg-livetag { margin-top:4px !important; }
}
@media (min-width:700px) and (max-width:1100px) {
  html:not(.xf) body .xg-row .xg-lg { flex-basis:150px; width:150px; }
}
/* XUPER UI V4.7: barra con logos + selector; fija arriba en PC */
.xg-bar { display:flex; align-items:center; gap:10px 14px; flex-wrap:wrap; }
.xg-bar > .xg-strip { flex:1 1 320px; min-width:0; }
.xg-bar > .xg-view { flex:none; margin-left:auto; }
@media (min-width:901px) {
  html:not(.xf) body .main-content { padding-top:0; }
  html:not(.xf) body .xg-bar { position:sticky; top:0; z-index:30; margin:0 -28px; padding:14px 28px 12px; background:var(--xf-bg); border-bottom:1px solid var(--xf-bd); box-shadow:0 10px 18px -16px var(--xf-sd); }
  html:not(.xf) body #guide-events-container > :first-child:not(.xg-bar) { margin-top:16px; }
}
/* equipos centrados: Local [escudo] VS [escudo] Visitante */
@media (min-width:700px) {
  html:not(.xf) body .xg-row .xg-teams { gap:12px; }
  html:not(.xf) body .xg-row .xg-teams > .xg-t:first-child:not(.xg-t1), html:not(.xf) body .xg-row .xg-lg + .xg-t:not(.xg-t1) { flex-direction:row-reverse; justify-content:flex-start; text-align:right; }
  html:not(.xf) body .xg-row .xg-t + .xg-t::before { margin:0 4px 0 0; padding:3px 7px; border-radius:6px; background:var(--xf-chip); border:1px solid var(--xf-bd); font-size:.62rem; line-height:1; }
  html:not(.xf) body .xg-row .xg-lg { padding-right:8px; }
}
/* XUPER UI V4.8: competicion elegida junto al titulo */
html:not(.xf) body .xg-shead { justify-content:flex-start; gap:10px 16px; }
.xg-act { display:inline-flex; align-items:center; gap:10px; min-width:0; max-width:100%; height:42px; padding:0 6px 0 10px; border-radius:11px; background:linear-gradient(180deg,var(--xf-c1),var(--xf-c2)); border:1px solid var(--xf-ac); box-shadow:inset 0 1px 0 var(--xf-hi), 0 8px 16px -12px var(--xf-sd); }
.xg-act img { width:28px; height:28px; object-fit:contain; flex:none; }
.xg-act .xg-lgfb .xs-ic { width:26px; height:26px; }
.xg-act-name { min-width:0; font-family:var(--xf-cond) !important; font-size:1.2rem; font-weight:700; letter-spacing:.03em; text-transform:uppercase; color:var(--xf-tx); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
html:not(.xf) body .xg-act-x { flex:none; width:30px; height:30px; border-radius:8px; border:0; background:var(--xf-chip); color:var(--xf-tx); font-size:1.15rem; line-height:1; cursor:pointer; display:inline-flex; align-items:center; justify-content:center; }
html:not(.xf) body .xg-act-x:hover { background:var(--xf-ac); color:#111; }
@media (max-width:600px) { .xg-act { height:38px; } .xg-act-name { font-size:1.05rem; } }
/* XUPER UI V4.9: equipos juntos (celular: uno arriba del otro, como siempre) */
.xg-pair { display:flex; flex-direction:column; gap:7px; min-width:0; }
@media (min-width:700px) {
  html:not(.xf) body .xg-row .xg-pair { flex-direction:row; align-items:center; gap:12px; flex:1 1 auto; }
  html:not(.xf) body .xg-row .xg-pair > .xg-t { flex:0 1 auto; min-width:0; }
  html:not(.xf) body .xg-row .xg-pair > .xg-t:first-child { flex-direction:row-reverse; justify-content:flex-start; text-align:right; }
  html:not(.xf) body .xg-row .xg-t.xg-t1 span { white-space:normal; -webkit-line-clamp:2; line-height:1.2; }
  html:not(.xf) body .xg-row .xg-pair > .xg-t span { white-space:normal; overflow-wrap:break-word; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; line-height:1.2; }
  /* columnas compartidas: hora | competicion (ancho del nombre mas largo) | equipos | ... | canales | ver */
  @supports (grid-template-columns: subgrid) {
    html:not(.xf) body .xg-group.xg-flat { display:grid; grid-template-columns:[t] auto [lg] fit-content(420px) [tm] minmax(0,1fr) [st] auto [ch] auto [go] 40px; column-gap:18px; row-gap:10px; }
    html:not(.xf) body .xg-group:not(.xg-flat) { display:grid; grid-template-columns:[t] auto [tm] minmax(0,1fr) [st] auto [ch] auto [go] 40px; column-gap:18px; }
    html:not(.xf) body .xg-group > .xg-ghead { grid-column:1 / -1; }
    html:not(.xf) body .xg-group > .guide-card.xg-row { grid-column:1 / -1; display:grid !important; grid-template-columns:subgrid; column-gap:18px; contain:none; content-visibility:visible; }
    html:not(.xf) body .xg-row > .xg-teams { display:contents; }
    html:not(.xf) body .xg-row .xg-time { grid-column:t; }
    html:not(.xf) body .xg-row .xg-lg { grid-column:lg; width:auto; flex:none; min-width:0; padding-right:0; }
    html:not(.xf) body .xg-row .xg-pair, html:not(.xf) body .xg-row .xg-t.xg-t1 { grid-column:tm; justify-self:start; min-width:0; max-width:100%; }
    html:not(.xf) body .xg-row .xg-star { grid-column:st; }
    html:not(.xf) body .xg-row > .guide-channel { grid-column:ch; }
    html:not(.xf) body .xg-row > .xg-go { grid-column:go; }
  }
}
@media (min-width:700px) and (max-width:1100px) {
  html:not(.xf) body .xg-row > .guide-channel { display:none; }
  @supports (grid-template-columns: subgrid) {
    html:not(.xf) body .xg-group.xg-flat { grid-template-columns:[t] auto [lg] fit-content(200px) [tm] minmax(0,1fr) [st] auto [ch] auto [go] 40px; column-gap:12px; }
    html:not(.xf) body .xg-group:not(.xg-flat) { column-gap:12px; }
    html:not(.xf) body .xg-group > .guide-card.xg-row { column-gap:12px; }
  }
}
/* XUPER UI V5.0: logo de competicion + equipos mas grandes + competicion en la 2da linea (junto a CH) */
.xg-lglogo { width:16px; height:16px; object-fit:contain; flex:none; }
@media (min-width:700px) {
  html:not(.xf) body .xg-row .xg-pair > .xg-t span, html:not(.xf) body .xg-row .xg-t.xg-t1 span { font-size:1.03rem; font-weight:650; }
  html:not(.xf) body .xg-row .xg-t img { width:30px; height:30px; }
  html:not(.xf) body .xg-row .xg-pair { gap:14px; }
  html:not(.xf) body .guide-card.xg-row { padding-top:12px !important; padding-bottom:11px !important; }
  @supports (grid-template-columns: subgrid) {
    html:not(.xf) body .xg-group.xg-flat, html:not(.xf) body .xg-group:not(.xg-flat) { grid-template-columns:[t] auto [tm] minmax(0,1fr) [st] auto [ch] auto [go] 40px; column-gap:20px; }
    html:not(.xf) body .xg-group > .guide-card.xg-row { grid-template-rows:auto auto; row-gap:6px; column-gap:20px; align-items:center; }
    html:not(.xf) body .xg-row > .xg-time { display:contents; }
    html:not(.xf) body .xg-row > .xg-time > b { grid-column:t; grid-row:1; line-height:1; }
    html:not(.xf) body .xg-row > .xg-time > small { grid-column:t; grid-row:2; margin-top:0 !important; align-self:start; justify-self:start; }
    html:not(.xf) body .xg-row .xg-pair, html:not(.xf) body .xg-row .xg-t.xg-t1 { grid-column:tm; grid-row:1; }
    html:not(.xf) body .xg-row .xg-lg { grid-column:tm; grid-row:2; align-self:start; justify-self:start; max-width:100%; margin:0; font-size:.75rem; gap:6px; }
    html:not(.xf) body .xg-row .xg-lg .xg-lglogo { width:17px; height:17px; }
    html:not(.xf) body .xg-row .xg-star { grid-column:st; grid-row:1 / 3; }
    html:not(.xf) body .xg-row > .guide-channel { grid-column:ch; grid-row:1 / 3; }
    html:not(.xf) body .xg-row > .xg-go { grid-column:go; grid-row:1 / 3; }
  }
}
@media (min-width:700px) and (max-width:1100px) {
  @supports (grid-template-columns: subgrid) {
    html:not(.xf) body .xg-group.xg-flat, html:not(.xf) body .xg-group:not(.xg-flat) { grid-template-columns:[t] auto [tm] minmax(0,1fr) [st] auto [ch] auto [go] 40px; column-gap:14px; }
    html:not(.xf) body .xg-group > .guide-card.xg-row { column-gap:14px; }
    html:not(.xf) body .xg-row .xg-pair > .xg-t span { font-size:.96rem; }
    html:not(.xf) body .xg-row .xg-t img { width:28px; height:28px; }
  }
}
@media (max-width:699px) { .xg-lglogo { width:15px; height:15px; } }
/* XUPER UI V5.1: competicion sutil (sin negrita); en PC sin "CH" repetido y competicion debajo del horario */
html:not(.xf) body .xg-row .xg-lg { font-weight:400; letter-spacing:0; color:var(--xf-mu); }
html:not(.xf) body .xg-row .xg-lg span:last-child { font-weight:400; }
@media (min-width:1101px) {
  @supports (grid-template-columns: subgrid) {
    html:not(.xf) body .xg-row:not(.is-live) > .xg-time > small { display:none; }
    html:not(.xf) body .xg-row:not(.is-live) .xg-lg { grid-column:t / st; }
  }
}
/* XUPER UI V4 END */
