/* =====================================================================
   MoreStreams — "Ember"  (dark only)
   Deep blue-black, ember-orange accent, aqua secondary, red for live.
   Cinematic backdrops, 14px cards, Plus Jakarta Sans.
   Loaded after style.min.css. New components use the ms- prefix; the
   older components rendered by existing scripts are restyled below.
   ===================================================================== */

:root {
  --bg: #07080d;
  --bg-2: #0b0d14;
  --surface: #10131c;
  --surface-2: #161a26;
  --surface-3: #1d2231;
  --line: rgba(255, 255, 255, .07);
  --line-2: rgba(255, 255, 255, .13);
  --text: #eef1f8;
  --text-2: #b8bfcf;
  --mute: #7f879b;
  --accent: #ff6b3d;
  --accent-2: #ff8b5e;
  --accent-soft: rgba(255, 107, 61, .14);
  --aqua: #3ad6c5;
  --aqua-soft: rgba(58, 214, 197, .13);
  --live: #ff3d55;
  --live-soft: rgba(255, 61, 85, .15);
  --gold: #ffc857;
  --font: "Plus Jakarta Sans", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --r-s: 10px;
  --r: 14px;
  --r-l: 22px;
  --pill: 999px;
  --gutter: clamp(16px, 3.4vw, 48px);
  --max: 1560px;
  --nav-h: 68px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .45);

  /* Old theme tokens → Ember */
  --primary: var(--accent); --primary-dark: #e9572b; --primary-light: var(--accent-2); --danger: var(--live);
  --bg-primary: var(--bg); --bg-secondary: var(--surface); --bg-tertiary: var(--surface-2);
  --card-bg: var(--surface); --card-hover: var(--surface-2);
  --text-primary: var(--text); --text-secondary: var(--text-2); --text-muted: var(--mute);
  --border: var(--line); --border-light: var(--line);
  --shadow-sm: none; --shadow-lg: var(--shadow); --shadow-xl: var(--shadow);
  color-scheme: dark;
}

/* ---------- Base ---------- */
html { background: var(--bg); scroll-padding-top: calc(var(--nav-h) + 12px); }
html, body { overflow-x: clip; }
body { background: var(--bg) !important; color: var(--text) !important; font-family: var(--font) !important; -webkit-font-smoothing: antialiased; }
body::before, body::after { display: none !important; }
::selection { background: var(--accent); color: #fff; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 3px solid var(--accent) !important; outline-offset: 3px; border-radius: 6px; }
*, *::before, *::after { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; text-shadow: none !important; }
.container, .ms-wrap { max-width: var(--max) !important; margin-left: auto !important; margin-right: auto !important; padding-left: var(--gutter) !important; padding-right: var(--gutter) !important; box-sizing: border-box; }
.ms-sr, .sport-live-chat-sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
img { color: transparent; }
h1, h2, h3, .page-title-modern, .section-title-modern, .carousel-slide-title, .player-title {
  font-family: var(--font) !important; font-weight: 800 !important; letter-spacing: -.025em !important; line-height: 1.08 !important;
  color: var(--text) !important; background: none !important; -webkit-text-fill-color: currentColor !important; text-transform: none !important;
}

/* ---------- Top bar ---------- */
.navbar {
  position: sticky !important; top: 0; z-index: 1000 !important; height: var(--nav-h) !important; padding: 0 !important; margin: 0 !important;
  background: rgba(7, 8, 13, .92) !important; border: 0 !important; border-bottom: 1px solid var(--line) !important; box-shadow: none !important;
  transition: background-color .25s ease, border-color .25s ease;
}
body.ms-has-hero .navbar:not(.ms-scrolled) { background: linear-gradient(180deg, rgba(7,8,13,.85), rgba(7,8,13,0)) !important; border-bottom-color: transparent !important; }
.navbar::before, .navbar::after { display: none !important; }
.navbar > .container { display: flex !important; align-items: center !important; gap: 28px; height: var(--nav-h) !important; min-height: 0 !important; }
.brand-logo-link { display: inline-flex !important; align-items: center; gap: 10px; flex: none; padding: 0 !important; background: none !important; box-shadow: none !important; }
.ms-logo-mark { width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg, var(--accent), #ff3d6e); display: grid; place-items: center; flex: none; }
.ms-logo-mark svg { width: 13px; height: 13px; margin-left: 2px; fill: #fff; }
.ms-wordmark { font-family: var(--font); font-weight: 800; font-size: 20px; letter-spacing: -.03em; color: var(--text); white-space: nowrap; }
.ms-wordmark b { color: var(--accent); font-weight: 800; }

.navbar-actions { display: flex !important; align-items: center !important; gap: 10px !important; flex: 1; justify-content: space-between; flex-direction: row !important; }
.nav-links { display: flex !important; align-items: center !important; gap: 4px !important; padding: 0 !important; margin: 0 !important; background: none !important; border: 0 !important; box-shadow: none !important; order: 1; }
.nav-links--header-sep::before, .nav-links--header-sep::after { display: none !important; }
.nav-links li { list-style: none; }
.nav-links a {
  position: relative; display: inline-flex !important; align-items: center; gap: 8px; height: 40px; padding: 0 14px !important; border-radius: var(--r-s) !important;
  background: none !important; box-shadow: none !important; color: var(--text-2) !important; font: 600 14.5px/1 var(--font) !important; letter-spacing: 0 !important;
}
.nav-links a:hover { color: var(--text) !important; background: rgba(255,255,255,.05) !important; }
.nav-links a.active { color: var(--text) !important; }
.nav-links a.active::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 2px; height: 2px; border-radius: 2px; background: var(--accent); }
.ms-nav-live { display: inline-flex; align-items: center; gap: 5px; height: 20px; padding: 0 7px; border-radius: var(--pill); background: var(--live); color: #fff; font-size: 11px; font-weight: 800; }
.ms-nav-live[hidden] { display: none; }
.ms-nav-live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: ms-blink 1.4s ease-in-out infinite; }

.nav-search-trigger {
  order: 2; display: inline-flex !important; align-items: center; gap: 10px; height: 42px !important; min-width: min(320px, 30vw); padding: 0 8px 0 14px !important; margin: 0 !important;
  background: var(--surface) !important; border: 1px solid var(--line-2) !important; border-radius: var(--r-s) !important; box-shadow: none !important;
  color: var(--mute) !important; font: 500 14px/1 var(--font) !important; text-transform: none !important; letter-spacing: 0 !important;
}
.nav-search-trigger:hover { border-color: var(--accent) !important; color: var(--text) !important; }
.nav-search-trigger-icon { color: var(--text-2) !important; }
.nav-search-trigger-label { flex: 1; text-align: left; }
.nav-search-trigger-kbd { min-width: 24px; height: 24px; display: inline-grid; place-items: center; border-radius: 6px !important; background: var(--surface-3) !important; border: 0 !important; color: var(--text-2) !important; font: 600 12px/1 var(--font) !important; }

/* ---------- Buttons ---------- */
.ms-btn, .btn-modern, .btn-modern-load {
  display: inline-flex !important; align-items: center; justify-content: center; gap: 9px; height: 46px; padding: 0 22px !important; border-radius: var(--r-s) !important;
  font: 700 15px/1 var(--font) !important; letter-spacing: 0 !important; text-transform: none !important; border: 0 !important; cursor: pointer; box-shadow: none !important;
  background: var(--accent) !important; color: #fff !important; transition: background-color .15s ease, transform .15s ease !important; transform: none !important; white-space: nowrap;
}
.ms-btn:hover, .btn-modern:hover, .btn-modern-load:hover { background: var(--accent-2) !important; }
.ms-btn svg { width: 18px; height: 18px; }
.ms-btn--ghost { background: rgba(255,255,255,.1) !important; color: var(--text) !important; }
.ms-btn--ghost:hover { background: rgba(255,255,255,.18) !important; }
.ms-btn--sm { height: 36px; padding: 0 14px !important; font-size: 13.5px !important; }
.ms-btn--icon { width: 46px; padding: 0 !important; }
.ms-btn.is-on { background: var(--aqua-soft) !important; color: var(--aqua) !important; }
.view-all-link, .ms-more { display: inline-flex !important; align-items: center; gap: 6px; color: var(--text-2) !important; font: 600 14px/1 var(--font) !important; background: none !important; border: 0 !important; padding: 0 !important; text-transform: none !important; letter-spacing: 0 !important; }
.view-all-link:hover, .ms-more:hover { color: var(--accent) !important; }
.view-all-link svg, .ms-more svg { width: 16px; height: 16px; }

/* Chips / filters (new + old) */
.ms-chip, .filter-btn, .filter-btn-modern, .live-filter-btn, .global-search-chip, .server-btn, .modern-source-btn, .modern-stream-btn {
  display: inline-flex !important; align-items: center; gap: 8px; height: 40px; padding: 0 16px !important; border-radius: var(--pill) !important;
  background: var(--surface) !important; border: 1px solid var(--line-2) !important; color: var(--text-2) !important; box-shadow: none !important;
  font: 600 14px/1 var(--font) !important; letter-spacing: 0 !important; text-transform: none !important; cursor: pointer; white-space: nowrap; transform: none !important;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease !important;
}
.ms-chip:hover, .filter-btn:hover, .filter-btn-modern:hover, .live-filter-btn:hover, .global-search-chip:hover, .server-btn:hover, .modern-source-btn:hover, .modern-stream-btn:hover { color: var(--text) !important; border-color: rgba(255,255,255,.3) !important; }
.ms-chip.is-active, .filter-btn.active, .filter-btn-modern.active, .live-filter-btn.active, .global-search-chip.is-active, .server-btn.active, .modern-source-btn.active, .modern-stream-btn.active {
  background: var(--text) !important; border-color: var(--text) !important; color: var(--bg) !important;
}
.filter-btn svg, .filter-btn-modern svg { width: 16px; height: 16px; color: currentColor !important; stroke: currentColor; }
.filter-count { background: rgba(127,127,127,.22) !important; color: inherit !important; border-radius: var(--pill) !important; padding: 2px 8px !important; font-size: 12px !important; }
.ms-chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 0; }
.ms-chips::-webkit-scrollbar { display: none; }

/* Pills / badges */
.ms-pill, .meta-badge, .meta-item, .category-badge, .category, .genre-tag, .upcoming-badge, .finished-badge {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px !important; border-radius: var(--pill) !important;
  background: rgba(255,255,255,.07) !important; border: 0 !important; color: var(--text-2) !important; box-shadow: none !important;
  font: 600 12.5px/1 var(--font) !important; letter-spacing: 0 !important; text-transform: none !important;
}
.genre-tag:hover { background: var(--accent-soft) !important; color: var(--accent) !important; }
.ms-pill--live, .live-badge, .live-indicator { background: var(--live) !important; color: #fff !important; border: 0 !important; border-radius: var(--pill) !important; font: 800 11.5px/1 var(--font) !important; letter-spacing: .04em !important; text-transform: uppercase !important; padding: 6px 10px !important; display: inline-flex; align-items: center; gap: 6px; }
.ms-pill--live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: ms-blink 1.4s ease-in-out infinite; }
.ms-pill--soon, .upcoming-badge { background: var(--aqua-soft) !important; color: var(--aqua) !important; }
.ms-pill--gold { background: rgba(255,200,87,.14) !important; color: var(--gold) !important; }
.finished-badge { color: var(--mute) !important; }
@keyframes ms-blink { 50% { opacity: .3; } }

/* Inputs */
input[type="text"], input[type="search"], .search-bar-modern input, .sport-live-chat-input, .sport-live-chat-nick, .modern-select, select {
  background: var(--surface) !important; color: var(--text) !important; border: 1px solid var(--line-2) !important; border-radius: var(--r-s) !important; box-shadow: none !important; font-family: var(--font) !important; max-width: 100%;
}
input:focus, select:focus { border-color: var(--accent) !important; box-shadow: 0 0 0 3px var(--accent-soft) !important; outline: none !important; }
input::placeholder { color: var(--mute) !important; }
input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; }

/* ---------- Sections & rails ---------- */
.ms-section { padding-top: clamp(30px, 4vw, 48px); }
.ms-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.ms-head h2 { font-size: clamp(20px, 2vw, 26px) !important; margin: 0 !important; display: flex; align-items: center; gap: 10px; }
.ms-head p { margin: 4px 0 0; color: var(--mute); font-size: 14px; }
.ms-head__tools { display: flex; align-items: center; gap: 8px; flex: none; }
.ms-arrow { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); display: grid; place-items: center; cursor: pointer; }
.ms-arrow:hover { background: var(--accent); border-color: var(--accent); }
.ms-arrow svg { width: 18px; height: 18px; }
.ms-arrow:disabled { opacity: .35; cursor: default; background: var(--surface); border-color: var(--line-2); }

.ms-rail { display: grid; grid-auto-flow: column; grid-auto-columns: var(--col, calc((100% - 7 * 16px) / 8)); gap: 16px; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 4px 0 8px; scroll-behavior: smooth; }
.ms-rail::-webkit-scrollbar { display: none; }
.ms-rail > * { scroll-snap-align: start; min-width: 0; }
.ms-rail--wide { --col: calc((100% - 3 * 16px) / 4); }
.ms-rail--top10 { --col: calc((100% - 5 * 16px) / 6); }
@media (max-width: 1280px) { .ms-rail { --col: calc((100% - 5 * 16px) / 6); } .ms-rail--wide { --col: calc((100% - 2 * 16px) / 3); } .ms-rail--top10 { --col: calc((100% - 4 * 16px) / 5); } }
@media (max-width: 900px) { .ms-rail { --col: calc((100% - 3 * 12px) / 4); gap: 12px; } .ms-rail--wide { --col: 72%; } .ms-rail--top10 { --col: 44%; } }
@media (max-width: 560px) { .ms-rail { --col: 36%; } .ms-rail--wide { --col: 84%; } .ms-rail--top10 { --col: 58%; } }

/* Poster card */
.ms-card { position: relative; display: block; min-width: 0; }
.ms-card__art { position: relative; display: block; aspect-ratio: 2 / 3; border-radius: var(--r); overflow: hidden; background: var(--surface-2); }
.ms-card__art img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s cubic-bezier(.2,.7,.2,1); }
.ms-card:hover .ms-card__art img, .ms-card:focus-within .ms-card__art img { transform: scale(1.05); }
.ms-card__art::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(255,255,255,.07); pointer-events: none; }
.ms-card:hover .ms-card__art::after { box-shadow: inset 0 0 0 2px var(--accent); }
.ms-card__rating { position: absolute; top: 8px; left: 8px; display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; border-radius: var(--pill); background: rgba(7,8,13,.78); color: var(--gold); font: 800 12px/1 var(--font); }
.ms-card__type { position: absolute; top: 8px; right: 8px; height: 22px; padding: 0 7px; display: inline-flex; align-items: center; border-radius: 6px; background: rgba(7,8,13,.78); color: var(--text-2); font: 700 10.5px/1 var(--font); text-transform: uppercase; letter-spacing: .05em; }
.ms-card__add { position: absolute; right: 8px; bottom: 8px; width: 34px; height: 34px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer; background: rgba(7,8,13,.82); color: #fff; opacity: 0; transform: translateY(4px); transition: opacity .15s ease, transform .15s ease, background-color .15s; }
.ms-card__add svg { width: 17px; height: 17px; }
.ms-card:hover .ms-card__add, .ms-card:focus-within .ms-card__add, .ms-card__add.is-on { opacity: 1; transform: none; }
.ms-card__add:hover { background: var(--accent); }
.ms-card__add.is-on { background: var(--aqua); color: var(--bg); }
.ms-card__title { display: block; margin-top: 10px; font-size: 14px; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ms-card:hover .ms-card__title { color: var(--accent); }
.ms-card__meta { display: block; margin-top: 3px; font-size: 12.5px; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ms-card__bar { position: absolute; left: 10px; right: 10px; bottom: 10px; height: 4px; border-radius: 2px; background: rgba(255,255,255,.25); overflow: hidden; }
.ms-card__bar span { display: block; height: 100%; background: var(--accent); }

/* Wide (landscape) card: continue watching, episodes */
.ms-wide { display: block; position: relative; min-width: 0; }
.ms-wide__art { position: relative; aspect-ratio: 16 / 9; border-radius: var(--r); overflow: hidden; background: var(--surface-2); display: block; }
.ms-wide__art img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.ms-wide:hover .ms-wide__art img { transform: scale(1.04); }
.ms-wide__art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(7,8,13,.85), rgba(7,8,13,0) 55%); }
.ms-wide__play { position: absolute; left: 12px; bottom: 12px; z-index: 1; width: 40px; height: 40px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; }
.ms-wide__play svg { width: 15px; height: 15px; fill: #fff; margin-left: 2px; }
.ms-wide__label { position: absolute; left: 62px; right: 12px; bottom: 14px; z-index: 1; }
.ms-wide__label b { display: block; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ms-wide__label span { display: block; font-size: 12.5px; color: var(--text-2); margin-top: 2px; }
.ms-wide__x { position: absolute; top: 8px; right: 8px; z-index: 2; width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgba(7,8,13,.8); color: #fff; display: grid; place-items: center; cursor: pointer; opacity: 0; }
.ms-wide:hover .ms-wide__x { opacity: 1; }
.ms-wide__x svg { width: 14px; height: 14px; }

/* Top 10 */
.ms-top { display: flex; align-items: flex-end; min-width: 0; }
.ms-top__n { flex: none; font-size: clamp(90px, 9vw, 150px); font-weight: 800; line-height: .78; letter-spacing: -.08em; color: var(--bg); -webkit-text-stroke: 2px rgba(255,255,255,.35); margin-right: -14px; position: relative; z-index: 0; }
.ms-top .ms-card { flex: 1; z-index: 1; }

/* Genre tiles */
.ms-genres { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.ms-genre { position: relative; height: 92px; border-radius: var(--r); overflow: hidden; display: flex; align-items: flex-end; padding: 14px 16px; background: var(--surface-2); font-weight: 800; font-size: 16px; isolation: isolate; }
.ms-genre img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; opacity: .55; transition: transform .4s ease, opacity .2s; }
.ms-genre::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(120deg, var(--g, rgba(255,107,61,.85)), rgba(7,8,13,.35)); }
.ms-genre:hover img { transform: scale(1.06); opacity: .75; }

/* ---------- Home: live sports hero ---------- */
.ms-live { padding-top: 22px; }
.ms-live__grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(320px, 1fr); gap: 16px; }
.ms-match-hero { position: relative; border-radius: var(--r-l); overflow: hidden; min-height: 400px; display: flex; flex-direction: column; justify-content: space-between; padding: clamp(20px, 2.6vw, 34px); background: radial-gradient(120% 140% at 0% 0%, #2a1610 0%, var(--surface) 55%); isolation: isolate; }
.ms-match-hero__bg { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; opacity: .32; filter: saturate(1.1); }
.ms-match-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(7,8,13,.95), rgba(7,8,13,.35) 60%, rgba(7,8,13,.55)); }
.ms-match-hero__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ms-match-hero__league { display: flex; align-items: center; gap: 10px; color: var(--text-2); font-weight: 700; font-size: 14px; }
.ms-match-hero__teams { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 18px; margin: 18px 0; }
.ms-team { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; min-width: 0; }
.ms-team__badge { width: clamp(72px, 8vw, 116px); height: clamp(72px, 8vw, 116px); border-radius: 50%; background: rgba(255,255,255,.06); display: grid; place-items: center; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.ms-team__badge img { width: 74%; height: 74%; object-fit: contain; }
.ms-team__badge span { font-weight: 800; font-size: clamp(22px, 2.4vw, 34px); color: var(--text-2); }
.ms-team__name { font-weight: 800; font-size: clamp(16px, 1.7vw, 22px); line-height: 1.2; max-width: 16ch; }
.ms-vs { font-weight: 800; color: var(--mute); font-size: 15px; }
.ms-match-hero__single { font-size: clamp(28px, 3.4vw, 46px); font-weight: 800; letter-spacing: -.03em; line-height: 1.05; margin: 18px 0; max-width: 18ch; }
.ms-match-hero__bottom { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.ms-match-hero__meta { display: flex; gap: 8px; flex-wrap: wrap; }

.ms-livelist { border-radius: var(--r-l); background: var(--surface); padding: 16px; display: flex; flex-direction: column; min-height: 0; max-height: 470px; }
.ms-livelist__tabs { display: flex; gap: 6px; margin-bottom: 10px; }
.ms-livelist__tabs .ms-chip { height: 34px; padding: 0 13px !important; font-size: 13px !important; }
.ms-livelist__rows { overflow-y: auto; margin: 0 -6px; padding: 0 6px; scrollbar-width: thin; scrollbar-color: var(--surface-3) transparent; }
.ms-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 10px 8px; border-radius: var(--r-s); }
.ms-row:hover { background: var(--surface-2); }
.ms-row__badges { display: flex; }
.ms-row__badges .ms-mini { width: 32px; height: 32px; border-radius: 50%; background: var(--surface-3); display: grid; place-items: center; overflow: hidden; box-shadow: 0 0 0 2px var(--surface); }
.ms-row__badges .ms-mini + .ms-mini { margin-left: -8px; }
.ms-mini img { width: 76%; height: 76%; object-fit: contain; }
.ms-mini span { font-size: 11px; font-weight: 800; color: var(--text-2); }
.ms-row__title { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ms-row__sub { color: var(--mute); font-size: 12.5px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ms-row__right { text-align: right; font-size: 12px; font-weight: 700; color: var(--text-2); }
.ms-row__right .ms-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--live); margin-right: 5px; }
.ms-livelist__foot { padding-top: 12px; margin-top: auto; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.ms-sportnav { margin-top: 14px; }

/* ---------- Spotlight (backdrop hero) ---------- */
.ms-spot { position: relative; margin-top: clamp(30px, 4vw, 48px); border-radius: var(--r-l); overflow: hidden; min-height: clamp(380px, 46vw, 560px); display: flex; align-items: flex-end; isolation: isolate; background: var(--surface); }
.ms-spot__bg { position: absolute; inset: 0; z-index: -2; }
.ms-spot__bg img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; opacity: 0; transition: opacity .7s ease; position: absolute; inset: 0; }
.ms-spot__bg img.is-on { opacity: 1; }
.ms-spot::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(7,8,13,.95) 0%, rgba(7,8,13,.6) 40%, rgba(7,8,13,0) 75%), linear-gradient(0deg, rgba(7,8,13,.9), rgba(7,8,13,0) 50%); }
.ms-spot__body { padding: clamp(22px, 3.6vw, 52px); max-width: 640px; }
.ms-spot__kicker { color: var(--accent); font-weight: 800; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.ms-spot__title { font-size: clamp(32px, 4.6vw, 62px) !important; margin: 10px 0 12px !important; }
.ms-spot__meta { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.ms-spot__text { color: var(--text-2); font-size: 15.5px; line-height: 1.6; margin: 0 0 22px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ms-spot__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.ms-spot__dots { position: absolute; right: clamp(18px, 3vw, 40px); bottom: clamp(18px, 3vw, 40px); display: flex; gap: 6px; }
.ms-spot__dots button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 4px; background: rgba(255,255,255,.3); cursor: pointer; transition: width .2s; }
.ms-spot__dots button.is-on { width: 26px; background: var(--accent); }

/* ---------- Page intro (listing pages) ---------- */
.ms-intro { padding: clamp(28px, 4vw, 48px) 0 8px; }
.ms-intro h1 { font-size: clamp(32px, 4.4vw, 56px) !important; margin: 0 0 8px !important; }
.ms-intro p { color: var(--text-2); margin: 0; font-size: 16px; max-width: 60ch; }
.ms-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: 22px 0 18px; }
.ms-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(172px, 1fr)); gap: 26px 16px; }
@media (max-width: 560px) { .ms-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 10px; } .ms-card__title { font-size: 12.5px; } .ms-card__meta { font-size: 11.5px; } }
.ms-loadmore { display: flex; justify-content: center; padding: 30px 0 0; }
.ms-empty { padding: 60px 20px; text-align: center; color: var(--mute); border: 1px dashed var(--line-2); border-radius: var(--r-l); }
.ms-empty b { display: block; color: var(--text); font-size: 18px; margin-bottom: 6px; }
.ms-skel { border-radius: var(--r); background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 50%, var(--surface) 75%); background-size: 300% 100%; animation: ms-shimmer 1.4s linear infinite; aspect-ratio: 2 / 3; }
@keyframes ms-shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }

/* ---------- Detail hero (watch pages) ---------- */
.ms-detail { position: relative; isolation: isolate; margin-top: calc(var(--nav-h) * -1); padding-top: calc(var(--nav-h) + clamp(30px, 6vw, 90px)); padding-bottom: 28px; min-height: 360px; }
.ms-detail__bg { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
.ms-detail__bg img { width: 100%; height: 100%; object-fit: cover; object-position: center 25%; }
.ms-detail::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(7,8,13,.96) 0%, rgba(7,8,13,.75) 45%, rgba(7,8,13,.35) 100%), linear-gradient(0deg, var(--bg) 0%, rgba(7,8,13,0) 50%); }
.ms-detail__grid { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(20px, 3vw, 40px); align-items: end; }
.ms-detail__poster { border-radius: var(--r); overflow: hidden; aspect-ratio: 2/3; background: var(--surface-2); box-shadow: var(--shadow); }
.ms-detail__poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ms-detail h1 { font-size: clamp(30px, 4.2vw, 56px) !important; margin: 0 0 8px !important; }
.ms-detail__tagline { color: var(--accent-2); font-weight: 600; font-style: italic; margin: 0 0 14px; }
.ms-detail__meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.ms-detail__overview { color: var(--text-2); line-height: 1.65; max-width: 70ch; margin: 0 0 20px; }
.ms-detail__actions { display: flex; flex-wrap: wrap; gap: 10px; }
@media (max-width: 760px) {
  .ms-detail__grid { grid-template-columns: 110px minmax(0, 1fr); align-items: start; }
  .ms-detail__overview { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; grid-column: 1 / -1; }
}

/* Cast rail */
.ms-person { display: block; text-align: center; min-width: 0; }
.ms-person__img { aspect-ratio: 1; border-radius: 50%; overflow: hidden; background: var(--surface-2); margin-bottom: 10px; }
.ms-person__img img { width: 100%; height: 100%; object-fit: cover; }
.ms-person b { display: block; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ms-person span { display: block; font-size: 12px; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Trailer modal */
.ms-modal { position: fixed; inset: 0; z-index: 5000; display: grid; place-items: center; padding: 20px; background: rgba(4,5,8,.88); }
.ms-modal[hidden] { display: none; }
.ms-modal__box { width: min(1100px, 100%); aspect-ratio: 16 / 9; background: #000; border-radius: var(--r); overflow: hidden; position: relative; box-shadow: var(--shadow); }
.ms-modal__box iframe { width: 100%; height: 100%; border: 0; display: block; }
.ms-modal__close { position: absolute; top: -48px; right: 0; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255,255,255,.12); color: #fff; display: grid; place-items: center; cursor: pointer; }
.ms-modal__close svg { width: 18px; height: 18px; }

/* Toast */
.ms-toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 140%); z-index: 6000; background: var(--surface-3); color: var(--text); border-radius: var(--pill); padding: 12px 20px; font-weight: 700; font-size: 14px; box-shadow: var(--shadow); transition: transform .25s ease; }
.ms-toast.is-on { transform: translate(-50%, 0); }

/* =====================================================================
   Older components rendered by existing scripts
   ===================================================================== */
.home-intro, .ms-ticker { display: none !important; }
.page-header-modern, .sports-header-modern, .sports-header { background: none !important; border: 0 !important; box-shadow: none !important; padding: clamp(28px, 4vw, 48px) 0 6px !important; margin: 0 !important; }
.page-header-modern::before, .page-header-modern::after, .sports-header-modern::before, .sports-header-modern::after, .sports-header::before, .sports-header::after { display: none !important; }
.page-header-content { display: flex !important; align-items: flex-end !important; justify-content: space-between !important; gap: 20px; flex-wrap: wrap; }
.page-title-section { flex: 1 1 auto; min-width: 0; display: block !important; }
.page-title-modern { font-size: clamp(32px, 4.4vw, 56px) !important; margin: 0 !important; display: block !important; }
.page-title-modern svg, .page-title-modern img { display: none !important; }
.page-subtitle-modern { margin: 8px 0 0 !important; color: var(--text-2) !important; font: 400 16px/1.5 var(--font) !important; letter-spacing: 0 !important; max-width: 60ch; }
.page-subtitle-modern::before { content: none !important; }
.page-subtitle-modern a { color: var(--accent) !important; }
.search-bar-modern { position: relative; min-width: min(100%, 360px); }
.search-bar-modern input { height: 46px !important; padding-left: 44px !important; width: 100%; }
.search-icon { color: var(--mute) !important; }
.filter-section-modern, .sports-filters-modern, .top-filters-row { background: none !important; border: 0 !important; box-shadow: none !important; padding: 18px 0 !important; margin: 0 !important; }
.filter-tabs-modern { display: flex !important; flex-wrap: wrap; gap: 8px !important; }

.section-header-modern { display: flex !important; align-items: flex-end !important; justify-content: space-between !important; gap: 16px; margin: 0 0 16px !important; padding: 0 !important; border: 0 !important; background: none !important; }
.section-header-modern::before, .section-header-modern::after, .section-title-group::before, .section-title-group::after { display: none !important; }
.section-title-group { display: block !important; min-width: 0; }
.section-title-modern { font-size: clamp(20px, 2vw, 26px) !important; margin: 0 !important; display: block !important; }
.section-title-modern::first-letter { text-transform: uppercase; }
.section-subtitle { color: var(--mute) !important; font: 400 14px/1.4 var(--font) !important; margin: 4px 0 0 !important; letter-spacing: 0 !important; }
.content-section-modern, .carousel-section-modern { padding: clamp(26px, 4vw, 44px) 0 0 !important; margin: 0 !important; background: none !important; border: 0 !important; }

/* Old poster cards (anime, sports, search) */
.content-grid-modern { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(172px, 1fr)) !important; gap: 26px 16px !important; }
.content-card, .poster-card { background: none !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; overflow: visible !important; transform: none !important; }
.content-card::before, .content-card::after { display: none !important; }
.card-image-wrapper, .content-poster { position: relative; border-radius: var(--r) !important; overflow: hidden !important; background: var(--surface-2) !important; aspect-ratio: 2 / 3; box-shadow: inset 0 0 0 1px rgba(255,255,255,.07) !important; outline: 0; }
.card-image-wrapper img, .content-poster img, .content-card img { width: 100% !important; height: 100% !important; object-fit: cover; display: block; border-radius: 0 !important; transition: transform .4s ease !important; }
.content-card:hover .card-image-wrapper img { transform: scale(1.05) !important; }
.play-overlay { background: linear-gradient(180deg, transparent 50%, rgba(7,8,13,.7)) !important; opacity: 0 !important; display: flex !important; align-items: flex-end !important; justify-content: flex-end !important; padding: 10px !important; }
.content-card:hover .play-overlay { opacity: 1 !important; }
.play-icon { width: 40px !important; height: 40px !important; border-radius: 50% !important; background: var(--accent) !important; color: #fff !important; box-shadow: none !important; transform: none !important; }
.content-card-info { padding: 10px 2px 0 !important; background: none !important; border: 0 !important; }
.content-card-title { font: 700 14px/1.3 var(--font) !important; color: var(--text) !important; margin: 0 0 3px !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.content-card:hover .content-card-title { color: var(--accent) !important; }
.content-card-meta { display: flex !important; gap: 0 !important; justify-content: flex-start !important; }
.content-card-meta > * { background: none !important; border: 0 !important; padding: 0 !important; font: 500 12.5px/1.3 var(--font) !important; color: var(--mute) !important; }
.content-card-meta > * + *::before { content: "·"; margin: 0 6px; }
.content-card-meta > *:empty { display: none !important; }
.loading-card { background: var(--surface) !important; border-radius: var(--r) !important; }
.loading-spinner { border-color: var(--line-2) !important; border-top-color: var(--accent) !important; }
.anilist-attribution, .anilist-attribution * { color: var(--mute) !important; }
.anilist-attribution a { color: var(--accent) !important; }

/* Sports listing (sports.js) */
.match-card, .sport-card, #sports-grid .match-card, #sports-grid .sport-card, .sports-carousel-slide .match-card {
  background: var(--surface) !important; border: 1px solid var(--line) !important; border-radius: var(--r) !important; box-shadow: none !important;
  transform: none !important; overflow: hidden !important; height: auto !important; min-height: 0 !important;
}
.match-card:hover, .sport-card:hover, #sports-grid .match-card:hover { border-color: var(--accent) !important; transform: none !important; box-shadow: none !important; }
.match-card.live, #sports-grid .match-card.live { border-color: rgba(255,61,85,.5) !important; }
.match-card::before, .match-card::after, #sports-grid .match-card::before, #sports-grid .sport-card::before { display: none !important; }
.match-poster, #sports-grid .match-poster { border-radius: 0 !important; background: var(--surface-2) !important; }
#sports-grid .match-poster::before { background: linear-gradient(0deg, rgba(16,19,28,.85), transparent 60%) !important; }
.sports-carousel-slide > * { height: auto !important; }
.match-card-content, #sports-grid .match-card-content { padding: 12px 14px 14px !important; background: none !important; }
.match-title, #sports-grid .match-title { font: 700 14.5px/1.3 var(--font) !important; color: var(--text) !important; }
.match-time, .match-meta-row, .match-metadata, .countdown-timer { font: 600 12.5px/1.3 var(--font) !important; color: var(--mute) !important; background: none !important; border: 0 !important; }
.countdown-timer { color: var(--aqua) !important; }
.team-name { font-family: var(--font) !important; font-weight: 700 !important; color: var(--text) !important; }
.vs, .vs-text, .vs-divider { color: var(--mute) !important; background: none !important; border: 0 !important; font-family: var(--font) !important; font-weight: 800 !important; }
.team-badge, .team-badge-small { background: rgba(255,255,255,.06) !important; border: 0 !important; border-radius: 50% !important; box-shadow: none !important; object-fit: contain; padding: 4px; }
.badge-placeholder { font-size: 0 !important; width: 44px; height: 44px; border-radius: 50%; background: var(--surface-3) !important; border: 0 !important; }
.sports-carousel-btn, .carousel-btn, .featured-sports-nav { width: 40px !important; height: 40px !important; border-radius: 50% !important; background: var(--surface-2) !important; border: 1px solid var(--line-2) !important; color: var(--text) !important; box-shadow: none !important; }
.sports-carousel-btn:hover, .carousel-btn:hover { background: var(--accent) !important; border-color: var(--accent) !important; }
.sports-carousel-wrapper, .sports-carousel-container { margin-bottom: 0 !important; }
#sports-grid .content-section-modern, #sports-grid > section, #sports-grid > div { padding-top: 24px !important; margin-bottom: 0 !important; }

/* Watch pages (old layout under the new detail hero) */
.modern-watch-layout { gap: 24px !important; padding-top: 8px !important; }
.modern-watch-layout > * { min-width: 0 !important; max-width: 100%; }
@media (max-width: 1024px) { .modern-watch-layout { grid-template-columns: minmax(0, 1fr) !important; } }
.watch-player-section, .info-card, .sport-live-chat, .player-container, .watch-sidebar-section > * {
  background: var(--surface) !important; background-image: none !important; border: 1px solid var(--line) !important; border-radius: var(--r-l) !important; box-shadow: none !important;
}
.watch-player-section { overflow: hidden; }
.watch-player-section::before, .watch-player-section::after, .info-card::before, .info-card::after, .sport-live-chat::before, .sport-live-chat::after,
.player-header::before, .player-header::after, .player-container::before, .player-container::after, .watch-sidebar-section > *::before, #sport-event-info-card::before,
.detail-item::before, .detail-item::after { display: none !important; }
.player-container { background: none !important; border: 0 !important; }
.player-header { background: none !important; border: 0 !important; padding: 20px 22px 16px !important; }
.player-title { font-size: clamp(22px, 2.4vw, 30px) !important; margin: 0 0 10px !important; }
.player-meta { display: flex !important; flex-wrap: wrap; gap: 8px !important; }
.player-wrapper-modern { position: relative; background: #000 !important; border-radius: 0 !important; overflow: hidden; margin: 0 !important; width: auto !important; }
.player-wrapper-modern::before, .player-wrapper-modern::after { display: none !important; }
.player-loading { background: #000 !important; color: var(--mute) !important; }
.player-controls-bar, .episode-controls-bar, .anime-episode-bar { background: none !important; border: 0 !important; padding: 18px 22px 22px !important; }
.controls-label { font: 700 14px/1.2 var(--font) !important; color: var(--text) !important; letter-spacing: 0 !important; text-transform: none !important; }
.controls-label svg { color: var(--accent) !important; }
.source-buttons, .stream-buttons, .anime-server-buttons { gap: 8px !important; }
.source-icon, .stream-btn-icon { display: none !important; }
.stream-btn-source, .stream-btn-main, .stream-btn-lang { color: inherit !important; }
.stream-hd { background: var(--accent) !important; color: #fff !important; border-radius: var(--pill) !important; }
.episode-selectors, .anime-watch-selectors { gap: 12px !important; }
.episode-selectors > *, .anime-watch-selectors > * { min-width: 0; max-width: 100%; }
.anime-watch-selectors label, .episode-selectors label { color: var(--text-2) !important; }
.watch-sidebar-section { max-height: none !important; height: auto !important; overflow: visible !important; align-self: start; gap: 18px !important; }
.watch-sidebar-section img { border-radius: var(--r) !important; max-height: 520px; object-fit: cover; }
.watch-sidebar-section > *:empty { display: none !important; }
.info-card { padding: 20px 22px !important; }
.info-heading, .details-heading { font: 800 17px/1.2 var(--font) !important; letter-spacing: -.01em !important; text-transform: none !important; color: var(--text) !important; border: 0 !important; padding: 0 !important; margin: 0 0 12px !important; }
.info-heading svg, .details-heading svg { color: var(--accent) !important; }
.overview-text { color: var(--text-2) !important; line-height: 1.7 !important; font-size: 15px !important; }
.detail-item { display: grid !important; grid-template-columns: 120px 1fr; gap: 12px; border: 0 !important; border-bottom: 1px solid var(--line) !important; padding: 11px 0 !important; margin: 0 !important; background: none !important; border-radius: 0 !important; box-shadow: none !important; }
.detail-item:last-child { border-bottom: 0 !important; }
.detail-label { color: var(--mute) !important; font: 500 13px/1.4 var(--font) !important; text-transform: none !important; letter-spacing: 0 !important; }
.detail-value { color: var(--text) !important; font: 600 14px/1.4 var(--font) !important; }
.cast-grid { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 14px 10px !important; max-height: none !important; }
.cast-member { text-align: center; background: none !important; border: 0 !important; padding: 0 !important; }
.cast-photo { width: 100% !important; height: auto !important; aspect-ratio: 1; object-fit: cover; border-radius: 50% !important; margin: 0 auto 8px !important; }
.cast-name { color: var(--text) !important; font-weight: 700 !important; }
.cast-character { color: var(--mute) !important; font-size: 12px !important; }
.sport-watch-inline-details { display: grid !important; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)) !important; background: none !important; padding: 0 22px 22px !important; gap: 14px !important; }
.sport-watch-inline-details .info-card { background: var(--surface-2) !important; border: 0 !important; border-radius: var(--r) !important; }
.sport-player-cover-shade { background: radial-gradient(ellipse at center, rgba(7,8,13,.25), rgba(7,8,13,.85)) !important; }
.sport-player-play-ring { width: 84px !important; height: 84px !important; display: grid !important; place-items: center; border-radius: 50% !important; background: var(--accent) !important; color: #fff !important; box-shadow: 0 0 0 10px rgba(255,107,61,.18) !important; border: 0 !important; animation: none !important; }
.sport-player-play-icon { background: none !important; color: #fff !important; width: auto !important; height: auto !important; }
.sport-player-play-label { font: 800 15px/1 var(--font) !important; color: #fff !important; letter-spacing: 0 !important; text-transform: none !important; }
.sport-live-chat { padding: 18px !important; }
.sport-live-chat-title { font: 800 19px/1.2 var(--font) !important; color: var(--text) !important; text-transform: none !important; }
.sport-live-chat-pulse { background: var(--live) !important; box-shadow: none !important; }
.sport-live-chat-viewers, .sport-live-chat-status { font: 700 12px/1 var(--font) !important; border-radius: var(--pill) !important; background: rgba(255,255,255,.07) !important; border: 0 !important; color: var(--text-2) !important; display: inline-block; width: auto; padding: 6px 10px !important; text-transform: none !important; letter-spacing: 0 !important; }
.sport-live-chat-tagline, .sport-live-chat-placeholder { color: var(--mute) !important; }
.sport-live-chat-messages { background: var(--bg-2) !important; border: 1px solid var(--line) !important; border-radius: var(--r) !important; }
.sport-live-chat-msg-bubble { background: var(--surface-2) !important; border: 0 !important; border-radius: var(--r-s) !important; }
.sport-live-chat-msg-text { color: var(--text) !important; }
.sport-live-chat-msg-user { color: var(--accent) !important; font-weight: 700 !important; }
.sport-live-chat-msg-time { color: var(--mute) !important; }
.sport-live-chat-send { background: var(--accent) !important; color: #fff !important; border: 0 !important; border-radius: var(--r-s) !important; font: 700 14px/1 var(--font) !important; text-transform: none !important; letter-spacing: 0 !important; }

/* Ended / unlisted match message (watch-sport.js) */
.ms-empty-state { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; padding: clamp(40px, 7vw, 88px) 24px; }
.ms-empty-state__icon { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 50%; background: var(--accent-soft); color: var(--accent); }
.ms-empty-state__title { font-size: clamp(22px, 2.6vw, 30px) !important; max-width: 24ch; margin: 0 !important; }
.ms-empty-state__text { color: var(--text-2); max-width: 44ch; margin: 0; }
.ms-empty-state__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 8px; }
.ms-match-unavailable .player-meta, .ms-match-unavailable .player-controls-bar, .ms-match-unavailable .sport-watch-inline-details, .ms-match-unavailable .watch-sidebar-section { display: none !important; }
.ms-match-unavailable .modern-watch-layout { grid-template-columns: 1fr !important; max-width: 960px; margin-left: auto !important; margin-right: auto !important; }

/* Search modal */
.global-search-backdrop { background: rgba(4,5,8,.82) !important; }
.global-search-panel { background: var(--surface) !important; border: 1px solid var(--line-2) !important; border-radius: var(--r-l) !important; box-shadow: var(--shadow) !important; }
.global-search-heading { font-size: 22px !important; }
.global-search-close { border-radius: 50% !important; background: var(--surface-2) !important; color: var(--text) !important; border: 0 !important; }
.global-search-input-row, .global-search-input-row:focus-within { background: var(--bg-2) !important; border: 1px solid var(--line-2) !important; border-radius: var(--r) !important; box-shadow: none !important; }
.global-search-input-row:focus-within { border-color: var(--accent) !important; }
.global-search-input-row input { background: none !important; border: 0 !important; box-shadow: none !important; font: 600 19px/1 var(--font) !important; color: var(--text) !important; }
.global-search-input-icon { color: var(--accent) !important; }
.global-search-kbd { border-radius: 6px !important; background: var(--surface-3) !important; color: var(--text-2) !important; border: 0 !important; }
.global-search-section-title { font: 800 12px/1 var(--font) !important; letter-spacing: .06em; text-transform: uppercase; color: var(--mute) !important; }
.global-search-row { border-radius: var(--r) !important; border: 0 !important; background: none !important; }
.global-search-row:hover, .global-search-row:focus-visible { background: var(--surface-2) !important; }
.global-search-title { font: 700 15px/1.3 var(--font) !important; color: var(--text) !important; }
.global-search-meta, .global-search-sub, .global-search-stats, .global-search-empty { font: 500 13px/1.4 var(--font) !important; color: var(--mute) !important; }
.global-search-thumb { border-radius: 8px !important; }
.global-search-thumb-badge { display: none !important; }

/* ---------- Footer ---------- */
.footer { margin-top: clamp(60px, 8vw, 110px) !important; background: var(--bg-2) !important; border: 0 !important; border-top: 1px solid var(--line) !important; padding: 44px 0 30px !important; box-shadow: none !important; }
.footer-accent, .ms-footer-giant { display: none !important; }
.ms-foot { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 28px; }
.ms-foot h4 { margin: 0 0 12px; font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--mute); }
.ms-foot a { display: block; color: var(--text-2); font-size: 14.5px; padding: 5px 0; }
.ms-foot a:hover { color: var(--accent); }
.ms-foot p { color: var(--mute); font-size: 14px; line-height: 1.6; margin: 12px 0 0; max-width: 42ch; }
.ms-foot__bottom { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--mute); font-size: 13px; }
.footer-nav, .footer-copy, .footer-brand-wrap { display: none !important; }
.footer-signature { display: block !important; margin: 0 !important; }
.signature-content { background: none !important; border: 0 !important; box-shadow: none !important; padding: 0 !important; color: var(--mute) !important; font-size: 13px; gap: 6px; }
.signature-icon { color: var(--accent) !important; animation: none !important; }
.signature-name, .signature-text { color: var(--text-2) !important; background: none !important; -webkit-text-fill-color: currentColor !important; }

/* ---------- Phone ---------- */
@media (max-width: 900px) {
  :root { --nav-h: 60px; }
  .navbar > .container { gap: 12px; }
  .nav-links { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1001; height: 64px; justify-content: space-around; background: rgba(11,13,20,.98) !important; border-top: 1px solid var(--line) !important; padding: 0 6px env(safe-area-inset-bottom) !important; }
  .nav-links li { flex: 1; }
  .nav-links a { flex-direction: column; justify-content: center; gap: 4px; width: 100%; height: 56px; padding: 0 !important; font-size: 11px !important; border-radius: var(--r-s) !important; }
  .nav-links a::before { content: ""; width: 22px; height: 22px; background: currentColor; -webkit-mask: var(--ic) center / contain no-repeat; mask: var(--ic) center / contain no-repeat; }
  .nav-links a.active::after { display: none; }
  .nav-links a.active { color: var(--accent) !important; }
  .ms-nav-live { position: absolute; top: 4px; left: 50%; margin-left: 4px; height: 16px; padding: 0 5px; font-size: 10px; }
  .ms-nav-live::before { display: none; }
  body { padding-bottom: 70px; }
  .nav-search-trigger { min-width: 0; width: 44px; justify-content: center; padding: 0 !important; margin-left: auto !important; }
  .nav-search-trigger-label, .nav-search-trigger-kbd { display: none !important; }
  .ms-live__grid { grid-template-columns: minmax(0, 1fr); }
  .ms-match-hero { min-height: 330px; }
  .ms-livelist { max-height: 420px; }
  .ms-foot { grid-template-columns: 1fr 1fr; }
  .ms-foot > :first-child { grid-column: 1 / -1; }
  .page-header-content { flex-direction: column !important; align-items: stretch !important; }
  .search-bar-modern { min-width: 0; width: 100%; }
  .content-grid-modern { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 18px 10px !important; }
  .ms-spot::after { background: linear-gradient(0deg, rgba(7,8,13,.96) 15%, rgba(7,8,13,.3) 70%) !important; }
  .player-header, .player-controls-bar, .episode-controls-bar, .anime-episode-bar { padding-left: 16px !important; padding-right: 16px !important; }
  .sport-watch-inline-details { padding: 0 16px 18px !important; }
}
/* Bottom-nav icons (mask images) */
.nav-links a[href="/"] { --ic: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'><path d='M3 10.5 12 3l9 7.5V20a1 1 0 0 1-1 1h-5v-6H9v6H4a1 1 0 0 1-1-1z'/></svg>"); }
.nav-links a[href="/sports"] { --ic: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'><circle cx='12' cy='12' r='9'/><path d='M12 7l4 3-1.5 5h-5L8 10z'/></svg>"); }
.nav-links a[href="/movies"] { --ic: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'><rect x='3' y='4' width='18' height='16' rx='2'/><path d='M7 4v16M17 4v16M3 9h4M3 15h4M17 9h4M17 15h4'/></svg>"); }
.nav-links a[href="/tv"] { --ic: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'><rect x='3' y='6' width='18' height='13' rx='2'/><path d='M8 2l4 4 4-4'/></svg>"); }
.nav-links a[href="/anime"] { --ic: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'><path d='M12 3l2.6 5.6 6 .7-4.5 4.1 1.2 6L12 16.4 6.7 19.4l1.2-6L3.4 9.3l6-.7z'/></svg>"); }
.nav-links a[href="/list"] { --ic: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'><path d='M6 3h12v18l-6-4-6 4z'/></svg>"); }

@media (prefers-reduced-motion: reduce) {
  .ms-rail { scroll-behavior: auto; }
  .ms-card__art img, .ms-wide__art img, .ms-spot__bg img, .ms-genre img { transition: none !important; }
  .ms-pill--live::before, .ms-nav-live::before, .ms-skel { animation: none; }
}

/* ---------- Fixes after first render ---------- */
.ms-top { display: grid; grid-template-columns: 34% 1fr; align-items: end; }
.ms-top__n { margin-right: -18px; text-align: right; }
.ms-match-hero__bg { opacity: .16; }
.footer, .footer * { text-align: left; }
.ms-foot__bottom { align-items: center; }

/* ---------- Watch pages with the new hero ---------- */
body.ms-watch .ms-detail { margin-top: 0; padding-top: clamp(36px, 6vw, 86px); }
body.ms-watch .player-header { display: none !important; }
body.ms-watch--movie .watch-sidebar-section, body.ms-watch--tv .watch-sidebar-section, body.ms-watch--anime .watch-sidebar-section { display: none !important; }
body.ms-watch .modern-watch-layout { display: block !important; max-width: var(--max) !important; }
body.ms-watch .watch-player-section { max-width: 1180px; margin: 0 auto; scroll-margin-top: calc(var(--nav-h) + 16px); }
body.ms-watch--movie .watch-player-section .info-card:has(#overview-inline) { display: none !important; }
body.ms-watch--tv .watch-player-section .info-card:has(#overview-inline), body.ms-watch--tv .watch-player-section .info-card:has(#overview) { display: none !important; }
body.ms-watch .watch-player-section .info-card { margin: 0 22px 22px !important; background: var(--surface-2) !important; border: 0 !important; }
.ms-ep.is-on .ms-wide__art { box-shadow: 0 0 0 3px var(--accent); }
.ms-ep.is-on .ms-wide__play { background: #fff; }
.ms-ep.is-on .ms-wide__play svg { fill: var(--accent); }
.ms-detail__meta a { color: inherit; }
.ms-detail__meta a:hover { color: var(--accent); }
.ms-detail .ms-btn--ghost { background: rgba(255,255,255,.12) !important; }

/* ---------- Sports listing (sports-v2.js) ---------- */
.ms-mgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.ms-match { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 16px; border-radius: var(--r-l); background: var(--surface); border: 1px solid var(--line); transition: border-color .15s ease, background-color .15s ease; min-width: 0; }
.ms-match:hover { border-color: rgba(255,107,61,.6); background: var(--surface-2); }
.ms-match.is-live { border-color: rgba(255,61,85,.35); }
.ms-match__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12.5px; color: var(--mute); font-weight: 600; }
.ms-match__top span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ms-match__teams { display: grid; gap: 10px; }
.ms-match__team { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 15px; min-width: 0; }
.ms-match__team .ms-mini { width: 36px; height: 36px; box-shadow: none; flex: none; }
.ms-match__team b { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ms-match__single { display: flex; align-items: center; gap: 12px; }
.ms-match__single img { width: 64px; height: 40px; object-fit: cover; border-radius: 8px; background: var(--surface-2); flex: none; }
.ms-match__single b { font-size: 15px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ms-match__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13px; color: var(--text-2); font-weight: 600; }
.ms-match__foot .ms-in { color: var(--aqua); }
.ms-group { padding-top: 30px; }
.ms-group h2 { font-size: 20px !important; margin: 0 0 14px !important; display: flex; align-items: center; gap: 10px; }
.ms-group h2 .filter-count { font-size: 12px !important; }
/* Sports watch page: match header, player + chat side by side */
body.ms-watch--sport .modern-watch-layout { display: grid !important; grid-template-columns: minmax(0, 1fr) 360px; max-width: var(--max) !important; padding-top: 16px !important; }
@media (max-width: 1024px) { body.ms-watch--sport .modern-watch-layout { grid-template-columns: minmax(0, 1fr) !important; } }
body.ms-watch--sport .watch-sidebar-section { display: flex !important; flex-direction: column; }
body.ms-watch--sport .watch-sidebar-section > .info-card:has(img) { display: none !important; }
body.ms-watch--sport .watch-player-section { max-width: none; }
.ms-sporthead { padding-top: 22px; }
.ms-sporthead .ms-match-hero { padding: clamp(16px, 2vw, 26px); }
.ms-sporthead .ms-match-hero__teams { margin: 12px 0 4px; }
.ms-sporthead .ms-team__badge { width: clamp(60px, 6vw, 88px); height: clamp(60px, 6vw, 88px); }
body.ms-match-unavailable .ms-sporthead { display: none; }
body.ms-watch--sport .watch-player-section { width: 100% !important; margin: 0 !important; justify-self: stretch; }
body.ms-watch--sport .modern-watch-layout > * { width: auto !important; }
@media (max-width: 900px) {
  .navbar > .container { justify-content: space-between !important; flex-wrap: nowrap !important; }
  .brand-logo-link { margin: 0 !important; position: static !important; transform: none !important; width: auto !important; justify-content: flex-start !important; }
  .navbar-actions { flex: 0 0 auto !important; width: auto !important; justify-content: flex-end !important; }
  .ms-top { grid-template-columns: 30% 1fr; }
  .ms-top__n { font-size: 84px; }
}
/* Sports watch: the header already shows the teams */
body.ms-watch--sport .watch-sidebar-section > .info-card:has(.team-badge, .team-badge-small, .teams-info-modern, .teams-display) { display: none !important; }
.sport-player-cover-img { object-fit: cover; opacity: .55; }
body.ms-watch--sport #teams-info { display: none !important; }
