/* =============================================
   Sports Streaming Platform — Square Design System
   Consistent container width, no rounded oversized layouts
   ============================================= */

*, *::before, *::after { box-sizing: border-box; }

html {
    scrollbar-gutter: stable;
}

:root {
    --container: 800px;
    --gap: 20px;
    --border: #e2e8f0;
    --bg: #ffffff;
    --bg-alt: #f8fafc;
    --text: #2d3748;
    --text-muted: #718096;
    --text-light: #a0aec0;
    --primary: #1a365d;
    --primary-hover: #2b6cb0;
    --accent: #2563eb;
    --live: #dc2626;
    --success: #16a34a;
    --border-deep: #c0c3c6
}

body {
    margin: 0; padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

body.dark {
    --border: #2d3748;
    --bg: #0f1115;
    --bg-alt: #1a1d23;
    --text: #c8ccd2;
    --text-muted: #718096;
    --text-light: #4a5568;
    --primary: #90cdf4;
    --primary-hover: #63b3ed;
}

h1,h2,h3,h4 { margin:0; padding:0; }
a { text-decoration:none; color:var(--text-muted); transition:color .15s; }
a:hover { color:var(--text); }
img { max-width:100%; height:auto; border:0; }

/* ---- HEADER (contained width — background matches container) ---- */
#header {
    background: var(--bg);
    position: sticky; top: 0; z-index: 1000;
}
.header-inner {
    width: var(--container);
    max-width: calc(100% - 40px);
    margin: 0 auto;
    display: flex; align-items: center; justify-content: space-between;
    height: 48px; gap: 12px;
    border-bottom: 1px solid var(--border);
}
#header h2 { font-size:16px; font-weight:700; line-height:48px; margin:0; }
#header h2 a { color:var(--primary); letter-spacing:-0.02em; display:inline-flex; align-items:center; gap:8px; height:48px; }
#header h2 a:hover { color:var(--primary-hover); text-decoration:none; }
.site-brand-logo { height:22px; width:auto; max-width:none; object-fit:contain; display:block; vertical-align:middle; }

.header-actions { display:flex; align-items:center; gap:8px; }
.donate-btn { font-size:11px; color:var(--text-muted); padding:4px 10px; border:1px solid var(--border); border-radius:0px; transition:all .15s; min-height:24px; display:inline-flex; align-items:center; justify-content:center; }
.donate-btn:hover { background:var(--bg-alt); color:var(--text); text-decoration:none; }
.dark-toggle { background:none; border:1px solid var(--border); padding:5px 8px; cursor:pointer; color:var(--text-muted); border-radius:0px; display:flex; align-items:center; justify-content:center; min-height:24px; }
.dark-toggle:hover { color:var(--text); background:var(--bg-alt); border-color:var(--border); }
.nav-dash-sep { color:var(--border); font-size:10px; }
.nav-dash-tab { font-size:11px; color:var(--text-muted); background:none; border:none; padding:3px 6px; cursor:pointer; font-family:inherit; white-space:nowrap; text-decoration:none; border-radius:3px; }
.nav-dash-tab:hover { color:var(--text); background:var(--bg-alt); text-decoration:none; }
.nav-dash-tab.active { color:var(--accent); font-weight:600; }

/* ---- NOTIFICATION BELL ---- */
.notif-bell-wrap { position:relative; }
.notif-bell-btn { position:relative; background:none; border:none; cursor:pointer; padding:5px; color:var(--text-muted); display:flex; align-items:center; border-radius:3px; }
.notif-bell-btn:hover { background:var(--bg-alt); color:var(--text); }
.notif-badge { position:absolute; top:-2px; right:-2px; background:var(--live); color:#fff; font-size:9px; font-weight:700; min-width:14px; height:14px; border-radius:7px; display:flex; align-items:center; justify-content:center; padding:0 2px; }
.notif-badge-hidden { display:none; }
.notif-dropdown { display:none; position:absolute; top:calc(100% + 6px); right:-8px; width:300px; background:var(--bg); border:1px solid var(--border); box-shadow:0 8px 24px rgba(0,0,0,.12); z-index:9999; }
.notif-dropdown.show { display:block; }
.notif-dropdown-head { display:flex; align-items:center; justify-content:space-between; padding:10px 14px; border-bottom:1px solid var(--border); font-size:12px; font-weight:700; color:var(--text); }
.notif-head-actions { display:flex; gap:8px; }
.notif-mark-all { font-size:10px; color:var(--accent); background:none; border:none; cursor:pointer; font-family:inherit; padding:0; }
.notif-mark-all.notif-del-all { color:var(--live); }
.notif-list { max-height:300px; overflow-y:auto; }
.notif-loading,.notif-empty { padding:20px; text-align:center; font-size:12px; color:var(--text-light); }
.notif-item { padding:10px 14px; border-bottom:1px solid var(--border); background:var(--bg-alt); }
.notif-item.read { background:var(--bg); }
.notif-item:not(.read) { box-shadow:inset 3px 0 0 var(--accent); }
.notif-item.notif-type-info:not(.read) { box-shadow:inset 3px 0 0 #3b82f6; }
.notif-item.notif-type-success:not(.read) { box-shadow:inset 3px 0 0 #16a34a; }
.notif-item.notif-type-warning:not(.read) { box-shadow:inset 3px 0 0 #d97706; }
.notif-item.notif-type-alert:not(.read) { box-shadow:inset 3px 0 0 #dc2626; }
.notif-item.notif-link { display:block; color:inherit; text-decoration:none; }
.notif-item.notif-link:hover { background:var(--bg); text-decoration:none; }
.notif-item.notif-link { cursor:pointer; }
.notif-item.expanded { background:var(--bg); }
.notif-item:not(.read) .notif-title { font-weight:700; }
.notif-item:not(.read) .notif-msg { color:var(--text); }
.notif-item.read .notif-title { color:var(--text-muted); }
.notif-item.read .notif-msg { color:var(--text-light); }
.notif-body { min-width:0; }
.notif-title { font-size:12px; font-weight:600; color:var(--text); margin-bottom:2px; }
.notif-type-icon { font-size:12px; line-height:1; vertical-align:-1px; }
.notif-msg { font-size:11px; color:var(--text-muted); }
.notif-preview-float { width:var(--container); max-width:calc(100% - 40px); margin:8px auto 0; }
.notif-preview-inner { border:1px solid var(--border); border-left:4px solid #3b82f6; background:var(--bg-alt); box-shadow:0 6px 18px rgba(0,0,0,.08); padding:10px 12px; }
.notif-preview-head { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:6px; }
.notif-preview-title-wrap { display:flex; align-items:center; gap:7px; }
.notif-preview-head strong { font-size:12px; color:var(--text); }
.notif-preview-close { border:none; background:none; cursor:pointer; font-size:12px; color:var(--text-light); }
.notif-preview-close:hover { color:var(--text); }
.notif-preview-msg { font-size:12px; color:var(--text-muted); line-height:1.45; white-space:pre-wrap; }
.notif-preview-actions { margin-top:8px; }
.notif-preview-link { font-size:11px; color:var(--accent); text-decoration:none; font-weight:600; }
.notif-preview-link:hover { text-decoration:underline; }
.notif-preview-inner.notif-preview-type-info { border-left-color:#3b82f6; }
.notif-preview-inner.notif-preview-type-success { border-left-color:#16a34a; }
.notif-preview-inner.notif-preview-type-warning { border-left-color:#d97706; }
.notif-preview-inner.notif-preview-type-alert { border-left-color:#dc2626; }

/* ---- SPORTS NAVIGATION BAR ---- */
#sports-nav {
    width: var(--container);
    max-width: calc(100% - 40px);
    margin: 0 auto;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
}
.sports-nav-loading .sports-nav-inner,
.sports-nav-loading .sports-nav-current {
    visibility: hidden;
}
.sports-nav-loading .sports-nav-wrap::before {
    content: '';
    display: block;
    height: 34px;
    margin: 7px 8px;
    background: linear-gradient(90deg, rgba(148, 163, 184, 0.18) 0%, rgba(148, 163, 184, 0.32) 50%, rgba(148, 163, 184, 0.18) 100%);
    background-size: 220% 100%;
    animation: sportsNavSkeleton 1.3s ease-in-out infinite;
}
@keyframes sportsNavSkeleton {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}
.sports-nav-wrap {
    position: relative;
}
.sports-nav-inner {
    width: 100%;
    max-width: none;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: var(--sports-link-gap, 4px);
    padding: 0 8px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.sports-nav-inner.has-overflow { padding: 0 8px; }
.sports-nav-inner::-webkit-scrollbar { display: none; }
.sports-nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text-muted);
    display: none !important;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
    padding: 0;
}
.sports-nav-arrow:hover { color: var(--text); border-color: var(--accent); }
.sports-nav-arrow.is-visible { display: inline-flex; }
.sports-nav-arrow-left { left: 2px; }
.sports-nav-arrow-right { right: 2px; }
.sports-nav-arrow i { font-size: 10px; }
.sport-link {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    gap: 6px;
    padding: 7px 6px;
    min-width: 24px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    transition: all 0.15s;
    text-decoration: none;
}
.sport-link:hover {
    color: var(--text);
    background: var(--bg);
    text-decoration: none;
}
.sport-link.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}
.sport-link i { font-size: 12px; }
.sport-link span {
    display: none;
}
.sports-nav-current {
    width: 100%;
    padding: 4px 10px 6px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
@media (max-width: 600px) {
    .sports-nav-inner { gap: 3px; }
    .sport-link { padding: 6px 6px; font-size: 10px; min-width: 24px; }
    .sport-link i { font-size: 14px; }
    .sports-nav-inner,
    .sports-nav-inner.has-overflow { padding: 0 8px; }
    .sports-nav-arrow { display: none !important; }
    .sports-nav-current { font-size: 10px; padding: 3px 8px 5px; }
}

/* ---- CONTAINER & CONTENT (same width) ---- */
#container { padding-bottom:12px; background:var(--bg); min-height:calc(100vh - 48px - 140px); }
#content { width:var(--container); max-width:calc(100% - 40px); margin:0 auto; padding-top:20px; position:relative; }

/* ---- HOMEPAGE HERO ---- */
.hp-hero {
    padding:20px 0 16px;
    border-bottom:1px solid var(--border);
    margin-bottom:16px;
}
.hp-hero h1 { font-size:18px; font-weight:700; color:var(--text); margin-bottom:6px; }
.hp-hero p { font-size:13px; color:var(--text-muted); margin:0; line-height:1.6; }

.hp-info-block {
    padding:14px 0;
    border-bottom:1px solid var(--border);
    margin-bottom:12px;
}
.hp-info-block h3 { font-size:14px; font-weight:600; color:var(--text); margin-bottom:4px; }
.hp-info-block p { font-size:12px; color:var(--text-muted); margin:0; line-height:1.6; }

/* ---- NAVIGATION TABS ---- */
.hp-nav-tabs {
    display:flex; gap:0; border-bottom:2px solid var(--border); margin-bottom:20px;
}
.hp-tab {
    padding:10px 16px; font-size:12px; font-weight:600;
    color:var(--text-muted); border-bottom:2px solid transparent; margin-bottom:-2px;
    transition:all .15s;
}
.hp-tab:hover { color:var(--text); text-decoration:none; }
.hp-tab.active { color:var(--accent); border-bottom-color:var(--accent); }
.hp-tab i { margin-right:4px; }

/* ---- QUICK NAV (homepage) ---- */
.quick-nav {
    display:flex; gap:10px; margin-bottom:20px;
}
.quick-nav-item {
    display:inline-flex; align-items:center; gap:6px; padding:8px 16px;
    font-size:12px; font-weight:600; color:var(--text-muted);
    border:1px solid var(--border); background:var(--bg-alt);
    transition:all .15s;
}
.quick-nav-item:hover { border-color:var(--accent); color:var(--accent); background:var(--bg); text-decoration:none; }
.quick-nav-item i { font-size:11px; }
.quick-nav-live { color:var(--live); border-color:var(--live); background:rgba(220,38,38,.04); }
.quick-nav-live:hover { background:rgba(220,38,38,.08); color:var(--live); border-color:var(--live); }

/* ---- SECTIONS ---- */
.hp-section { margin-bottom:24px; }
.hp-section-header { display:flex; align-items:center; justify-content:space-between; padding-bottom:10px; border-bottom:1px solid var(--border); margin-bottom:12px; }
.hp-section-header h2 { font-size:14px; font-weight:700; color:var(--text); border:none !important; }
.hp-section-header h2 i { margin-right:6px; font-size:13px; }
.hp-see-all { font-size:11px; color:var(--accent); font-weight:500; }
.hp-see-all:hover { text-decoration:underline; }

/* ---- EVENT CARDS (square design) ---- */
.event-cards {
    display:grid; grid-template-columns:repeat(auto-fill, minmax(240px, 1fr)); gap:12px;
}
.event-card {
    border:1px solid var(--border); background:var(--bg); padding:14px;
    cursor:pointer; transition:all .15s;
}
.event-card:hover { border-color:var(--accent); box-shadow:0 2px 8px rgba(0,0,0,.06); }
.event-card-live { border-left:3px solid var(--live); }
.event-card-top { display:flex; align-items:center; justify-content:space-between; margin-bottom:10px; }
.event-card-sport { font-size:10px; color:var(--text-light); text-transform:uppercase; font-weight:600; }
.event-card-status { font-size:10px; color:var(--text-light); font-weight:500; }
.event-card-body { margin-bottom:12px; }
.event-card-teams { display:flex; gap:4px; margin-bottom:6px; }
.event-card-teams img { width:22px; height:22px; object-fit:contain; }
.event-card-title { font-size:13px; font-weight:700; color:var(--text); line-height:1.3; margin-bottom:3px; }
.event-card-comp { font-size:11px; color:var(--text-muted); }
.event-card-footer { display:flex; align-items:center; justify-content:space-between; padding-top:10px; border-top:1px solid var(--border); }
.event-card-time { font-size:11px; color:var(--text-muted); font-variant-numeric:tabular-nums; }

/* Watch Button */
.watch-btn {
    display:inline-block; padding:4px 12px; font-size:11px; font-weight:600;
    background:var(--accent); color:#fff; border-radius:3px; transition:background .15s;
}
.watch-btn:hover { background:#1d4ed8; color:#fff; text-decoration:none; }
.watch-btn-sm {
    display:inline-block; padding:3px 8px; font-size:10px; font-weight:600;
    background:var(--bg-alt); color:var(--accent); border:1px solid var(--border); border-radius:3px;
}
.watch-btn-sm:hover { background:var(--accent); color:#fff; text-decoration:none; border-color:var(--accent); }

/* LIVE badge */
.live-badge {
    display:inline-flex; align-items:center; gap:3px;
    background:var(--live); color:#fff; padding:2px 8px;
    font-size:8px; font-weight:700; border-radius:0px;
}
.live-pulse { color:var(--live); }

/* ---- COMPACT EVENT LIST ---- */
.event-list-compact { border:1px solid var(--border); }
.event-row-compact {
    display:flex; align-items:center; gap:10px; padding:8px 12px;
    border-bottom:1px solid var(--border); cursor:pointer; transition:background .12s;
}
.event-row-compact:last-child { border-bottom:none; }
.event-row-compact:hover { background:var(--bg-alt); }
.erc-time { font-size:12px; font-weight:600; color:var(--text); min-width:40px; font-variant-numeric:tabular-nums; }
.erc-sport { width:20px; flex-shrink:0; display:flex; align-items:center; }
.erc-sport img { width:16px; height:16px; }
.erc-title { flex:1; font-size:12px; font-weight:600; color:var(--text); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.erc-comp { font-size:11px; color:var(--text-muted); min-width:80px; max-width:120px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

/* ---- SCHEDULE PAGE: EVENT ROWS ---- */
.schedule-header {
    display:flex; align-items:center; justify-content:space-between; gap:12px;
    padding-bottom:12px; margin-bottom:0;
}
.schedule-header h1 {
    font-size:15px;
    font-weight:500;
    color:var(--text);
    border:none !important;
    padding:0 !important;
    font-family:"Avenir Next", "Helvetica Neue", "Segoe UI", Arial, sans-serif;
    letter-spacing:0.01em;
}
.schedule-controls { display:flex; gap:8px; align-items:center; }

.schedule-controls-global {
    margin-left:auto;
    width:min(50%, 430px);
    min-width:280px;
    display:flex;
    flex-direction:row;
    align-items:center;
    justify-content:space-between;
    gap:8px;
}

.schedule-meta-row {
    display:flex;
    align-items:center;
    justify-content:flex-start;
    gap:8px;
    flex-wrap:nowrap;
}

.channels-toggle-btn {
    appearance:none;
    border:1px solid var(--border);
    background:var(--bg-alt);
    color:var(--text-muted);
    height:28px;
    padding:0 12px;
    font-size:11px;
    font-weight:600;
    cursor:pointer;
}

.channels-toggle-btn:hover { color:var(--text); border-color:var(--accent); background:var(--bg); }
.channels-toggle-btn.active { color:var(--accent); border-color:var(--accent); background:var(--bg); }

.schedule-stat {
    display:inline;
    color:var(--text-muted);
    font-size:12px;
    font-weight:500;
    cursor:default;
    user-select:none;
}

.schedule-stat strong { color:var(--text); font-weight:700; }
.schedule-stat.live strong { color:var(--live); }

.schedule-stat-sep {
    color:var(--text-light);
    font-size:12px;
    user-select:none;
}

.schedule-controls-global .events-search { width:100%; }
.schedule-controls-global #searchInput { width:100%; }

.events-search { position:relative; }
.events-search .search-icon { position:absolute; left:8px; top:50%; transform:translateY(-50%); font-size:11px; color:var(--text-light); pointer-events:none; }
#searchInput {
    -webkit-appearance:none; appearance:none; font-family:inherit; width:180px; padding:6px 10px 6px 26px;
    font-size:12px; color:var(--text); border:1px solid var(--border); background:var(--bg-alt);
}
#searchInput:focus { outline:none; border-color:var(--accent); background:var(--bg); }

.search-clear-btn {
    position:absolute;
    right:8px;
    top:50%;
    transform:translateY(-50%);
    width:16px;
    height:16px;
    border:0;
    background:transparent;
    color:var(--text-muted);
    cursor:pointer;
    display:none;
    padding:0;
    font-size:14px;
    line-height:1;
}

.search-clear-btn.show {
    display:inline-flex;
    align-items:center;
    justify-content:center;
}

.date-header { background:var(--bg-alt); padding:8px 14px; border-left:0px solid var(--text-light); }
.date-header .date-text { font-size:12px; font-weight:600; color:var(--text); font-style:italic; }

.event-row {
    display:flex; align-items:center; gap:10px; padding:7px 14px;
    border-bottom:1px solid var(--border); cursor:pointer; transition:background .12s; min-height:34px;
}
.event-row:hover { background:var(--bg-alt); }
.event-row-live { background:#fef2f2; }
.event-row-live:hover { background:#fee2e2; }
.dark .event-row-live { background:#1f1616; }
.event-row-featured { background:#fffbeb; }
.dark .event-row-featured { background:#1f1d16; }

.er-time { display:flex; align-items:center; gap:4px; min-width:58px; font-size:12px; font-weight:600; color:var(--text); font-variant-numeric:tabular-nums; }
.er-time i { font-size:10px; color:var(--text-light); }
.er-sport { width:20px; flex-shrink:0; display:flex; align-items:center; justify-content:center; }
.er-sport img { width:18px; height:18px; }
.er-flag { width:22px; flex-shrink:0; display:flex; align-items:center; justify-content:center; }
.er-flag img { border-radius:1px; }
.er-comp { min-width:120px; max-width:160px; flex-shrink:0; font-size:11px; color:var(--text-muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.er-teams { display:flex; align-items:center; gap:8px; min-width:42px; flex-shrink:0; }
.er-teams img { width:18px; height:18px; border-radius:1px; }

.page-skeleton .event-row,
.page-skeleton .event-card,
.page-skeleton .settings-card,
.page-skeleton .subs-card,
.page-skeleton .user-info-card,
.page-skeleton .provider-card,
.page-skeleton .watch-player,
.page-skeleton .watch-stream-item {
    position: relative;
    overflow: hidden;
}

.page-skeleton .event-row::after,
.page-skeleton .event-card::after,
.page-skeleton .settings-card::after,
.page-skeleton .subs-card::after,
.page-skeleton .user-info-card::after,
.page-skeleton .provider-card::after,
.page-skeleton .watch-player::after,
.page-skeleton .watch-stream-item::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: rgba(229, 231, 235, 0.18);
    animation: skeletonPulse 1.7s ease-in-out infinite;
}

.lazy-img {
    display: block;
    opacity: 1;
}

.iframe-skeleton-wrap {
    position: relative;
}

.iframe-skeleton-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    display: none;
    background: rgba(148, 163, 184, 0.22);
    animation: skeletonPulseStrong 1.9s ease-in-out infinite;
}

.iframe-skeleton-overlay.show {
    display: block;
}

.panel-skeleton {
    position: relative;
}

.panel-skeleton::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: rgba(229, 231, 235, 0.14);
    animation: skeletonPulse 1.8s ease-in-out infinite;
}

.panel-skeleton.ready::before {
    display: none;
}

.stream-list-skeleton {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.stream-list-skeleton-item {
    height: 44px;
    border: 1px solid var(--border);
    background: rgba(203, 213, 225, 0.22);
    animation: skeletonPulse 1.9s ease-in-out infinite;
}

img.js-img-pending {
    background: #e5e7eb;
    animation: skeletonPulse 1.8s ease-in-out infinite;
}

img.is-loaded {
    animation: none;
    background: transparent;
}

img.is-fallback {
    animation: none;
    background: #f3f4f6;
}

.team-badge-skeleton {
    background: #e5e7eb;
    animation: skeletonPulse 1.8s ease-in-out infinite;
}

.lazy-img.is-loaded {
    animation: none;
    background: transparent;
}

.lazy-img.is-fallback {
    animation: none;
    background: #f3f4f6;
}

@keyframes skeletonPulse {
    0% { opacity: 0.55; }
    50% { opacity: 0.85; }
    100% { opacity: 0.55; }
}

@keyframes skeletonPulseStrong {
    0% { opacity: 0.5; }
    50% { opacity: 0.82; }
    100% { opacity: 0.5; }
}

@media (prefers-reduced-motion: reduce) {
    .team-badge-skeleton {
        animation: none;
    }
    img.js-img-pending {
        animation: none;
    }
    .iframe-skeleton-overlay {
        animation: none;
    }
    .panel-skeleton::before {
        animation: none;
    }
    .stream-list-skeleton-item {
        animation: none;
    }
    .page-skeleton .event-row::after,
    .page-skeleton .event-card::after,
    .page-skeleton .settings-card::after,
    .page-skeleton .subs-card::after,
    .page-skeleton .user-info-card::after,
    .page-skeleton .provider-card::after,
    .page-skeleton .watch-player::after,
    .page-skeleton .watch-stream-item::after {
        animation: none;
    }
}
.er-title { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.er-title a { font-size:12px; font-weight:700; color:var(--primary); }
.er-title a:hover { color:var(--primary-hover); text-decoration:none; }
.er-action { flex-shrink:0; min-width:55px; text-align:right; position:relative; }
.stream-count { display:inline-block; font-size:10px; font-weight:700; color:var(--text-muted); }
.watch-btn-hover { display:none; font-size:10px; font-weight:600; color:var(--text-light); text-decoration:none; background:none; padding:0; }
.event-row:hover .watch-btn-hover { display:inline-block; }
.event-row:hover .stream-count { display:none; }
.watch-btn-hover:hover { color:var(--text); text-decoration:none; }

/* ---- LEAGUES BAR ---- */
.leagues-bar { display:flex; align-items:center; gap:10px; overflow-x:auto; padding:4px 0; scrollbar-width:none; }
.leagues-bar::-webkit-scrollbar { display:none; }
.league-item {
    display:flex; align-items:center; justify-content:center; flex-shrink:0;
    width:38px; height:38px; border:1px solid var(--border); background:var(--bg-alt);
    padding:5px; transition:all .15s;
}
.league-item:hover { border-color:var(--accent); background:var(--bg); text-decoration:none; }
.league-item img { max-height:26px; max-width:26px; object-fit:contain; }
.league-text { font-size:8px; color:var(--text-muted); text-align:center; }

/* ---- AD SLOTS ---- */
.ad-slot { padding:0; margin:0; border:0; background:transparent; }
.ad-slot:empty { display:none; }
.main-domain-ad-wrap {
    width: var(--container);
    max-width: calc(100% - 40px);
    margin: 12px auto;
    padding: 0;
    border: 0;
    background: transparent;
    text-align: center;
    line-height: 0;
    overflow-x: hidden;
}
.main-domain-ad-wrap iframe,
.main-domain-ad-wrap ins,
.main-domain-ad-wrap img,
.main-domain-ad-wrap > div,
.main-domain-ad-wrap > a {
    display: inline-block;
    margin-left: auto;
    margin-right: auto;
    max-width: 100%;
}
@media (max-width: 768px) {
    .main-domain-ad-wrap.main-domain-ad-hide-mobile { display: none !important; }
}

/* Middle banner placed on the right of the schedule header row. */
.schedule-header .main-domain-ad-wrap {
    width: auto;
    max-width: 60%;
    margin: 0;
    text-align: right;
    flex: 0 0 auto;
}
@media (max-width: 760px) {
    .schedule-header .main-domain-ad-wrap {
        max-width: 100%;
        width: 100%;
        text-align: center;
    }
}

/* Left/right sidebar banners — sit in the empty space beside the centered
   content column. Only shown on wide screens so they never overlap content. */
.main-domain-side-ad {
    position: fixed;
    top: 120px;
    z-index: 50;
    line-height: 0;
    display: none;
}
.main-domain-side-ad-left {
    right: calc(50% + (var(--container) / 2) + 16px);
}
.main-domain-side-ad-right {
    left: calc(50% + (var(--container) / 2) + 16px);
}
.main-domain-side-ad iframe,
.main-domain-side-ad ins,
.main-domain-side-ad img,
.main-domain-side-ad > div,
.main-domain-side-ad > a {
    display: block;
    max-width: 100%;
}
@media (min-width: 1280px) {
    .main-domain-side-ad { display: block; }
}

/* ---- MESSAGES ---- */
.events-message { padding:30px 20px; text-align:center; color:var(--text-light); font-size:13px; }
.events-message i { display:block; font-size:20px; margin-bottom:6px; opacity:.5; }
.events-message a { color:var(--accent); }

/* ---- LOAD MORE ---- */
.loadmore { text-align:center; padding:16px 0; }
.load-more-btn { display:inline-flex; align-items:center; gap:6px; padding:8px 20px; font-size:12px; font-weight:600; color:var(--text-muted); border:1px solid var(--border); background:var(--bg-alt); }
.load-more-btn:hover { background:var(--bg); border-color:var(--accent); color:var(--text); text-decoration:none; }

/* ---- FOOTER (same container width) ---- */
#footer {
    width: var(--container);
    max-width: calc(100% - 40px);
    margin: 0 auto;
    background: var(--bg-alt);
    border-top: 1px solid var(--border);
}
.footer-inner { width:100%; max-width:none; margin:0 auto; padding:16px; box-sizing:border-box; }
.footer-top { display:flex; align-items:flex-start; justify-content:flex-start; padding-bottom:8px; border-bottom:1px solid var(--border); margin-bottom:8px; gap:16px; flex-wrap:wrap; }
.footer-brand h3 { font-size:14px; font-weight:700; color:var(--primary); margin-bottom:3px; }
.footer-desc { font-size:11px; color:var(--text-muted); margin:0; line-height:1.55; }
.footer-desc-secondary { margin-top:4px; }
.footer-links { display:flex; gap:16px; }
.footer-links a { font-size:11px; color:var(--text-muted); }
.footer-links a:hover { color:var(--text); text-decoration:none; }
.footer-bottom { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:10px; }
.footer-bottom .footer-links { margin-left:auto; justify-content:flex-end; }
.footer-timezone { display:flex; align-items:center; gap:6px; font-size:11px; color:var(--text-muted); }
.footer-timezone i { font-size:12px; color:var(--text-light); }
.footer-timezone select { font-family:inherit; font-size:10px; padding:3px 6px; border:1px solid var(--border); background:var(--bg); color:var(--text-muted); cursor:pointer; }
.utc-time { font-size:10px; color:var(--text-light); }
.footer-copy { font-size:10px; color:var(--text-light); }

/* ---- UTILITY ---- */
.flex { display:flex; }
.flex-grow-1 { flex-grow:1; }
.border-bottom { border-bottom:1px solid var(--border); }
.border-0 { border:none !important; }

/* ---- MESSAGES ---- */
.message { background:#eff6ff; border:1px solid #bfdbfe; padding:10px 14px; font-size:12px; color:#1e40af; }
.success { background:#f0fdf4; border-color:#86efac; color:#166534; }
.error { background:#fef2f2; border-color:#fca5a5; color:#991b1b; }

/* ---- AUTH PAGES ---- */
.auth-container { max-width:380px; margin:20px auto; padding:20px 0; }
.auth-box { background:var(--bg); border:1px solid var(--border); padding:28px; }
.auth-title { font-size:20px !important; border:none !important; padding:0 !important; margin-bottom:4px !important; color:var(--text); }
.auth-subtitle { color:var(--text-muted); font-size:12px; margin-bottom:18px; }
.auth-field { margin-bottom:12px; }
.auth-field label { display:block; font-size:11px; font-weight:600; color:var(--text-muted); margin-bottom:3px; }
.auth-field input,.auth-field select { width:100%; padding:8px 10px; border:1px solid var(--border); font-size:13px; font-family:inherit; background:var(--bg); color:var(--text); }
.auth-field input:focus,.auth-field select:focus { outline:none; border-color:var(--accent); }
.auth-btn { display:block; width:100%; padding:9px; background:var(--accent); color:#fff; border:none; font-size:13px; font-weight:600; cursor:pointer; margin-top:14px; }
.auth-btn:hover { background:#1d4ed8; }
.auth-footer { text-align:center; margin-top:14px; font-size:12px; color:var(--text-muted); }
.auth-footer a { color:var(--accent); }

/* ---- DASHBOARD ---- */
.dashboard-container { padding:10px 0; }
.user-info-card { background:var(--bg-alt); border:1px solid var(--border); padding:16px; margin-bottom:16px; display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:10px; }
.user-info-card h2 { font-size:16px !important; border:none !important; padding:0 !important; color:var(--text); }
.user-stats { display:flex; gap:16px; font-size:12px; color:var(--text-muted); }
.logout-btn { padding:5px 12px; background:var(--bg); border:1px solid var(--border); font-size:11px; color:var(--live) !important; font-weight:600; }
.logout-btn:hover { background:#fef2f2; text-decoration:none; }
.submit-form-card,.submissions-card { background:var(--bg); border:1px solid var(--border); padding:18px; margin-bottom:16px; }
.submit-form-card h3,.submissions-card h3 { font-size:14px; margin-bottom:14px; padding-bottom:8px; border-bottom:1px solid var(--border); color:var(--text); }
.form-row-inline { display:grid; grid-template-columns:1fr 1fr 1fr; gap:10px; }
.submissions-table { width:100%; border-collapse:collapse; font-size:12px; }
.submissions-table th { background:var(--bg-alt); padding:6px 8px; text-align:left; font-size:10px; text-transform:uppercase; color:var(--text-muted); border-bottom:1px solid var(--border); }
.submissions-table td { padding:6px 8px; border-bottom:1px solid var(--border); text-align:left; }
.submissions-table .url-cell { max-width:130px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:11px; color:var(--text-light); }
.status-badge { display:inline-block; padding:2px 6px; border-radius:2px; font-size:10px; font-weight:600; }
.status-pending { background:#fffbeb; color:#92400e; }
.status-approved { background:#dcfce7; color:#166534; }
.status-rejected { background:#fef2f2; color:#991b1b; }
.empty-msg { color:var(--text-light); font-size:12px; text-align:center; padding:16px; }

/* ---- PLAYER ---- */
.player { position:relative; }
.player span { position:absolute; background:#000; border-radius:3px; }
.player a { color:#fff; text-decoration:none; font-weight:bold; padding:12px; display:block; }
.player .left { left:5px; top:5px; }
.player .right { right:5px; top:5px; }
.player iframe { background:#000; }
#container .streamview { width:640px; }
.streamview .embed { width:618px; height:52px; padding:10px; }

/* ---- LEGACY SUPPORT ---- */
#content h1,#content h2 { font-size:15px; color:var(--text); margin:0; border-bottom:1px solid var(--border); }
#content h1 img,#content h2 img { vertical-align:middle; }
#content ul a { color:var(--primary); }
hr { margin-top:20px; border-width:0; border-top:1px solid var(--border); }
.highlighted { background:#fffbeb; }
a.url.summary { margin-left:4px; vertical-align:middle; }
.description a { font-weight:bold; }
.buttons a { padding:5px; border-radius:3px; }
.buttons .active { font-weight:bold; background:var(--accent); color:#fff; }

/* Legacy table */
#events table { padding:0; margin:0; font-size:12px; line-height:26px; width:100%; color:var(--text-muted); border-collapse:collapse; }
td { text-align:center; padding:0; }
td img { vertical-align:middle; }
tr .time { width:58px; text-align:left; }
.type { width:44px; }
.competition { max-width:150px; text-align:left; white-space:nowrap; text-overflow:ellipsis; overflow:hidden; }
.country { width:30px; }
.event { max-width:260px; text-align:left; white-space:nowrap; text-overflow:ellipsis; overflow:hidden; }
.event a { color:var(--primary); font-weight:bold; }
.play { width:50px; font-size:10px; font-weight:bold; }
.play a { display:none; }
tr:hover .play a { display:inline; }
tr.date { border-bottom:3px solid var(--bg); border-top:3px solid var(--bg); font-size:.85rem; text-align:left; }
.sticky-header { background:#37474f; color:#eceff1; position:sticky; top:-2px; padding:7px 14px; border-left:3px solid #26a69a; }
tr:hover td { background:var(--bg-alt); cursor:pointer; }

/* Sports nav */
.sports { list-style:none; width:100%; max-width:var(--container); margin:0 auto; padding:0; overflow:hidden; font-weight:bold; text-align:center; }
.sports li { font-size:12px; margin:0; padding:0; height:60px; line-height:60px; display:inline-block; }
.sports a { color:var(--text-muted); float:left; padding:0 8px; height:60px; line-height:60px; }
.sports a:hover { text-decoration:none; color:var(--text); }

/* Legacy leagues */
.leagues { list-style:none; overflow:hidden; margin:16px 0 0; padding:0; border-bottom:1px solid var(--border); }
.leagues li { float:left; margin:0 0 12px 12px; }
.leagues img { height:32px; max-height:32px; max-width:32px; }

/* Pager */
#pager { clear:both; margin-top:14px; padding:14px 0; border-top:1px solid var(--border); }
#pager a,.button { color:var(--text-muted); padding:3px 8px; font-weight:600; font-size:11px; border:1px solid var(--border); background:var(--bg-alt); cursor:pointer; }
#pager a:hover { background:var(--bg); border-color:var(--accent); color:var(--text); }
#pager a { float:right; }

/* Spinner */
.lds-roller { display:block; position:relative; width:64px; height:64px; margin:15px auto; }
.lds-roller div { animation:lds-roller 1.2s cubic-bezier(.5,0,.5,1) infinite; transform-origin:32px 32px; }
.lds-roller div:after { content:" "; display:block; position:absolute; width:5px; height:5px; border-radius:50%; background:var(--text-muted); margin:-3px 0 0 -3px; }
@keyframes lds-roller { 0%{transform:rotate(0)} 100%{transform:rotate(360deg)} }

/* Floated list */
.floated-list { list-style:none; margin:0; padding:0; font-size:12px; flex-wrap:wrap; display:flex; }
.floated-list li { flex:1 0 33.3%; margin-bottom:4px; }

/* ---- RESPONSIVE ---- */
@media (max-width:768px) {
    .header-inner { height:auto; padding:8px 0; flex-wrap:wrap; }
    .header-actions { flex-wrap:wrap; gap:4px; }
    .hp-nav-tabs { overflow-x:auto; }
    .event-cards { grid-template-columns:1fr; }
    .schedule-header { flex-direction:column; align-items:flex-start; gap:8px; }
    .schedule-controls-global { width:100%; min-width:0; }
    .schedule-meta-row { justify-content:flex-start; }
    .schedule-controls-global { flex-direction:column; align-items:stretch; }
    #searchInput { width:100%; }
    .events-search { width:100%; }
    .event-row { flex-wrap:wrap; gap:6px; padding:8px 10px; }
    .er-comp { display:none; }
    .footer-top { flex-direction:column; gap:10px; }
    .footer-bottom { flex-direction:column; align-items:flex-start; gap:6px; }
    .footer-bottom .footer-links { margin-left:0; justify-content:flex-start; }
    .form-row-inline { grid-template-columns:1fr; }
    .event-row-compact { flex-wrap:wrap; }
    .erc-comp { display:none; }
}
