/*
Theme Name: QRSports
Theme URI: https://example.com/qrsports
Author: QRSports
Description: Premium dark, data-driven sports portal theme powered by the 365Scores API. RTL & translation ready, with a native-app style mobile experience.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: qrsports
Tags: sports, news, rtl-language-support, translation-ready, custom-colors, dark-mode
*/

/* ==========================================================================
   1. Tokens  (primary/secondary/backgrounds are injected from the Dashboard)
   ========================================================================== */
/* Exact palette (Phantom Pro style). Primary / secondary / body / card colours can be
   overridden from the dashboard (--primary, --secondary, --user-bg, --user-card). */
:root { --bg-body: #11161d; --bg-card: #1c222b; --bg-hover: #2a323f; --text-main: #ffffff; --text-muted: #a0aab8; --accent-green: #00e676; --accent-red: #ff4d4f; --accent-yellow: #fadb14; --border-color: #2d3748;
	--live: var(--accent-red); --r-lg: 16px; --r-md: 12px; --r-sm: 8px; --nav-h: 64px; }
html[data-theme="dark"]  { color-scheme: dark;  --bg: var(--user-bg, var(--bg-body)); --card: var(--user-card, var(--bg-card)); --card-2: var(--bg-hover); --text: var(--text-main); --muted: var(--text-muted); --line: var(--border-color); --on-primary: #04210f; }
html[data-theme="light"] { color-scheme: light; --bg: #f3f5f8; --card: #ffffff; --card-2: #e9edf3; --text: #141a22; --muted: #5d6b7d; --line: #d8dfe8; --on-primary: #04210f; }

/* ==========================================================================
   2. Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 15px/1.6 "Tajawal", "Cairo", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif; -webkit-font-smoothing: antialiased; }
img { max-inline-size: 100%; block-size: auto; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--primary, #00e676); }
:focus-visible { outline: 2px solid var(--primary, #00e676); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, h4 { line-height: 1.3; margin: 0 0 .5em; font-weight: 800; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; cursor: pointer; }
.screen-reader-text { position: absolute !important; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.qrs-wrap { inline-size: 100%; max-inline-size: 1240px; margin-inline: auto; padding-inline: 16px; }
.qrs-icon { flex: none; }
.qrs-logo { object-fit: contain; flex: none; }
.qrs-empty { color: var(--muted); margin: 0; padding: 12px 0; font-size: 14px; }
html[data-theme="dark"] .show-dark, html[data-theme="light"] .show-light { display: inline-flex; }
html[data-theme="dark"] .show-light, html[data-theme="light"] .show-dark { display: none; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* ==========================================================================
   3. Header
   ========================================================================== */
.qrs-header { position: sticky; inset-block-start: 0; z-index: 50; background: var(--bg); border-block-end: 1px solid var(--line); }
.qrs-topbar { border-block-end: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.qrs-topbar__in { display: flex; align-items: center; gap: 16px; min-block-size: 44px; }
.qrs-search { flex: 1; max-inline-size: 420px; margin-inline: auto; display: flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding-inline: 14px; }
.qrs-search input { flex: 1; min-inline-size: 0; background: none; border: 0; color: var(--text); padding-block: 8px; font: inherit; outline: none; }
.qrs-topbar__tools { display: flex; align-items: center; gap: 10px; margin-inline-start: auto; }
.qrs-lang { display: flex; gap: 6px; }
.qrs-lang a { padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); }
.qrs-lang .current-lang a, .qrs-lang a[aria-current] { background: var(--primary, #00e676); color: var(--on-primary); border-color: transparent; }
.qrs-iconbtn { inline-size: 36px; block-size: 36px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); display: grid; place-items: center; }
.qrs-iconbtn > span { display: none; }
html[data-theme="dark"] .qrs-iconbtn .show-dark, html[data-theme="light"] .qrs-iconbtn .show-light { display: inline-flex; }

.qrs-mainbar__in { display: flex; align-items: center; gap: 28px; min-block-size: 60px; }
.qrs-brand__text { font-size: 24px; font-weight: 800; letter-spacing: -.01em; color: var(--text); }
.qrs-brand .custom-logo { max-block-size: 40px; inline-size: auto; }
.qrs-nav { margin-inline-start: auto; }
.qrs-nav__list { display: flex; gap: 4px; flex-wrap: wrap; }
.qrs-nav__list > li { position: relative; }
.qrs-nav__list a { display: block; padding: 8px 14px; border-radius: var(--r-sm); font-weight: 600; }
.qrs-nav__list .current-menu-item > a, .qrs-nav__list a:hover { background: var(--card); color: var(--primary, #00e676); }
.qrs-nav__list .sub-menu { position: absolute; inset-inline-start: 0; inset-block-start: 100%; min-inline-size: 200px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); padding: 6px; display: none; }
.qrs-nav__list li:hover > .sub-menu, .qrs-nav__list li:focus-within > .sub-menu { display: block; }

/* Ticker */
.qrs-ticker { background: var(--card); border-block-start: 1px solid var(--line); }
.qrs-ticker__in { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; padding-block: 8px; }
.qrs-ticker__in::-webkit-scrollbar { display: none; }
.qrs-tick { flex: none; scroll-snap-align: start; display: flex; align-items: center; gap: 8px; padding: 4px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; background: var(--bg); }
.qrs-tick small { color: var(--muted); min-inline-size: 34px; text-align: center; }
.qrs-tick.is-live { border-color: color-mix(in srgb, var(--live) 60%, transparent); }
.qrs-tick.is-live small { color: var(--live); font-weight: 700; }

/* ==========================================================================
   4. Layout
   ========================================================================== */
.qrs-main { padding-block: 20px 40px; }
.qrs-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.qrs-layout__side { display: grid; gap: 16px; position: sticky; inset-block-start: 150px; }
.qrs-twocol { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-block-start: 20px; }
.qrs-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; }
.qrs-card__title, .qrs-block__head h2 { font-size: 17px; font-weight: 800; margin: 0; }
.qrs-block__head { display: flex; align-items: center; justify-content: space-between; margin-block-end: 12px; }
.qrs-block__head h2 { padding-inline-start: 10px; border-inline-start: 3px solid var(--primary, #00e676); }
.qrs-ad { text-align: center; margin: 16px auto; max-inline-size: 1240px; overflow: hidden; }

/* ==========================================================================
   5. Hero – featured match
   ========================================================================== */
.qrs-hero { margin-block-end: 20px; padding: 20px 20px 16px; border-radius: 20px; border: 1px solid var(--line);
	background: radial-gradient(120% 140% at 50% -20%, color-mix(in srgb, var(--primary, #00e676) 18%, transparent), transparent 60%), var(--card); }
.qrs-hero__league { display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--muted); font-weight: 600; }
.qrs-livebadge { font-style: normal; font-size: 12px; font-weight: 800; padding: 2px 10px; border-radius: 999px; background: var(--live); color: #fff; animation: qrs-pulse 1.6s ease-in-out infinite; }
@keyframes qrs-pulse { 50% { opacity: .55; } }
.qrs-hero__board { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; padding-block: 18px; }
.qrs-hero__team { display: grid; justify-items: center; gap: 10px; text-align: center; font-size: 17px; }
.qrs-hero__score { display: grid; justify-items: center; gap: 4px; }
.qrs-hero__nums { display: flex; align-items: center; gap: 14px; font-size: clamp(40px, 8vw, 68px); font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.qrs-hero__nums i { font-style: normal; color: var(--muted); }
.qrs-hero__score small { color: var(--primary, #00e676); font-weight: 700; font-size: 15px; }
.qrs-tabs { display: flex; justify-content: center; gap: 6px; margin-block-end: 12px; }
.qrs-tabs button { background: none; border: 1px solid var(--line); border-radius: 999px; padding: 6px 18px; color: var(--muted); font-weight: 600; }
.qrs-tabs button.is-active { background: var(--primary, #00e676); border-color: transparent; color: var(--on-primary); }
.qrs-hero__panel { max-inline-size: 560px; margin-inline: auto; min-block-size: 60px; }

/* Stat bars */
.qrs-stat { margin-block: 10px; }
.qrs-stat__row { display: grid; grid-template-columns: 56px 1fr 56px; text-align: center; font-size: 13px; }
.qrs-stat__row span { color: var(--muted); }
.qrs-bar { display: flex; gap: 3px; block-size: 6px; margin-block-start: 4px; }
.qrs-bar i { display: block; background: var(--primary, #00e676); border-radius: 999px 0 0 999px; transition: inline-size .4s; }
.qrs-bar i.is-away { background: var(--secondary, #00b0ff); border-radius: 0 999px 999px 0; }
.qrs-formations { display: flex; justify-content: space-around; align-items: center; font-weight: 800; font-size: 28px; }
.qrs-formations small { color: var(--muted); font-size: 13px; font-weight: 400; }

/* ==========================================================================
   6. Match lists (sidebar)
   ========================================================================== */
.qrs-league + .qrs-league { margin-block-start: 14px; }
.qrs-league__head { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 13px; color: var(--muted); padding-block-end: 6px; border-block-end: 1px solid var(--line); }
.qrs-match { display: grid; grid-template-columns: 44px 1fr; align-items: center; gap: 10px; padding-block: 9px; border-block-end: 1px solid var(--line); }
.qrs-match:last-child { border-block-end: 0; }
.qrs-match__status { text-align: center; font-size: 12px; color: var(--muted); font-weight: 700; }
.qrs-match.is-live .qrs-match__status { color: var(--live); }
.qrs-match__teams { display: grid; gap: 4px; }
.qrs-match__team { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.qrs-match__team span { flex: 1; min-inline-size: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qrs-match__team b { font-variant-numeric: tabular-nums; min-inline-size: 18px; text-align: end; }

/* ==========================================================================
   7. News grid
   ========================================================================== */
.qrs-newsgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1024px) and (min-width: 769px) { .qrs-newsgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.qrs-news { position: relative; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.qrs-news__thumb { display: block; aspect-ratio: 16 / 9; background: var(--card-2); overflow: hidden; }
.qrs-news__thumb img { inline-size: 100%; block-size: 100%; object-fit: cover; transition: transform .35s; }
.qrs-news:hover .qrs-news__thumb img { transform: scale(1.04); }
.qrs-news__body { padding: 12px 14px 14px; display: grid; gap: 6px; }
.qrs-news__cat { justify-self: start; font-size: 12px; font-weight: 700; color: var(--on-primary); background: var(--primary, #00e676); padding: 1px 10px; border-radius: 999px; }
.qrs-news__title { font-size: 15px; margin: 0; }
.qrs-news__time { color: var(--muted); font-size: 12px; }

/* ==========================================================================
   8. Tables & scorers
   ========================================================================== */
.qrs-tablewrap { overflow-x: auto; }
.qrs-table { inline-size: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.qrs-table th { color: var(--muted); font-weight: 600; padding: 8px 6px; border-block-end: 1px solid var(--line); text-align: center; }
.qrs-table td { padding: 8px 6px; text-align: center; border-block-end: 1px solid var(--line); }
.qrs-table .qrs-table__team { text-align: start; }
.qrs-table__team a { display: flex; align-items: center; gap: 8px; }
.qrs-table__pos { color: var(--muted); }
.qrs-table__pts { font-weight: 800; color: var(--primary, #00e676); }
.qrs-table tbody tr:nth-child(-n+4) .qrs-table__pos { box-shadow: inset 3px 0 0 var(--secondary, #00b0ff); }
[dir="rtl"] .qrs-table tbody tr:nth-child(-n+4) .qrs-table__pos { box-shadow: inset -3px 0 0 var(--secondary, #00b0ff); }
.qrs-scorers li { display: flex; align-items: center; gap: 10px; padding-block: 8px; border-block-end: 1px solid var(--line); }
.qrs-scorers li:last-child { border-block-end: 0; }
.qrs-scorers a { flex: 1; display: flex; align-items: center; gap: 10px; min-inline-size: 0; }
.qrs-scorers .qrs-logo { border-radius: 50%; background: var(--card-2); }
.qrs-scorers__rank { inline-size: 22px; color: var(--muted); text-align: center; }
.qrs-scorers b { font-size: 18px; color: var(--primary, #00e676); }

/* Article */
.qrs-article { padding: 22px; }
.qrs-article h1 { font-size: clamp(24px, 4vw, 34px); }
.qrs-article__body { font-size: 16.5px; line-height: 1.9; max-inline-size: 75ch; }

/* ==========================================================================
   9. Footer
   ========================================================================== */
.qrs-footer { border-block-start: 1px solid var(--line); background: var(--card); color: var(--muted); }
.qrs-footer__in { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 24px; padding-block: 28px; }
.qrs-footer__in p { margin: 6px 0 0; }
.qrs-footer__nav ul { display: grid; gap: 6px; }
.qrs-footer__links { display: flex; flex-wrap: wrap; gap: 10px; align-content: start; }
.qrs-pill { padding: 2px 14px; border: 1px solid var(--line); border-radius: 999px; }
.qrs-footer__copy { text-align: center; padding-block: 14px; border-block-start: 1px solid var(--line); font-size: 13px; }

/* ==========================================================================
   10. Mobile "app" shell
   ========================================================================== */
.qrs-bottomnav, .qrs-fab, .qrs-sheet { display: none; }

@media (max-width: 1024px) {
	.qrs-layout { grid-template-columns: minmax(0, 1fr); }
	.qrs-layout__side { position: static; }
	.qrs-footer__in { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
	body { padding-block-end: calc(var(--nav-h) + env(safe-area-inset-bottom)); }
	.qrs-header { position: static; }
	.qrs-nav, .qrs-date, .qrs-topbar__tools .qrs-iconbtn { display: none; }
	.qrs-topbar__in { gap: 10px; }
	.qrs-search { max-inline-size: none; }
	.qrs-mainbar__in { min-block-size: 52px; justify-content: center; }
	.qrs-hero { padding: 16px 12px 12px; border-radius: var(--r-lg); }
	.qrs-hero__team { font-size: 14px; }
	.qrs-hero__team .qrs-logo { inline-size: 60px; block-size: 60px; }
	.qrs-newsgrid, .qrs-twocol, .qrs-footer__in { grid-template-columns: minmax(0, 1fr); }

	.qrs-bottomnav { position: fixed; inset-inline: 0; inset-block-end: 0; z-index: 60; display: grid; grid-template-columns: repeat(6, 1fr); min-block-size: var(--nav-h); padding-block-end: env(safe-area-inset-bottom); background: color-mix(in srgb, var(--card) 92%, transparent); backdrop-filter: blur(14px); border-block-start: 1px solid var(--line); }
	.qrs-bottomnav__item { display: grid; place-content: center; justify-items: center; gap: 2px; font-size: 11px; color: var(--muted); }
	.qrs-bottomnav__item:hover, .qrs-bottomnav__item:active { color: var(--primary, #00e676); }

	.qrs-fab { position: fixed; z-index: 55; inset-block-end: calc(var(--nav-h) + 14px + env(safe-area-inset-bottom)); inline-size: 46px; block-size: 46px; border-radius: 50%; border: 0; display: grid; place-items: center; box-shadow: 0 6px 18px rgba(0,0,0,.35); }
	.qrs-fab--theme { inset-inline-start: 14px; background: var(--card-2); color: var(--text); }
	.qrs-fab--top { inset-inline-end: 14px; background: var(--primary, #00e676); color: var(--on-primary); }
	.qrs-fab[hidden] { display: none; }

	.qrs-sheet { position: fixed; inset: 0; z-index: 80; background: rgba(0,0,0,.55); align-items: flex-end; }
	.qrs-sheet:not([hidden]) { display: flex; }
	.qrs-sheet__panel { inline-size: 100%; background: var(--card); border-radius: 20px 20px 0 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); display: grid; gap: 10px; }
	.qrs-sheet__row { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--card-2); border: 0; border-radius: var(--r-md); text-align: start; }
	.qrs-sheet__close { padding: 12px; border-radius: var(--r-md); border: 1px solid var(--line); background: none; }
}

/* ==========================================================================
   11. Inner pages – match, standings, player
   ========================================================================== */
.qrs-pagehead { display: flex; align-items: center; gap: 12px; margin-block-end: 14px; }
.qrs-pagehead h1 { margin: 0; font-size: clamp(22px, 4vw, 30px); }

/* Match header meta */
.qrs-info { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 28px; margin: 6px 0 0; padding-block-start: 14px; border-block-start: 1px solid var(--line); }
.qrs-info dt { font-size: 12px; color: var(--muted); }
.qrs-info dd { margin: 0; font-weight: 700; }
.qrs-info > div { text-align: center; }
.qrs-stats__teams { display: flex; justify-content: space-between; font-weight: 700; font-size: 13px; color: var(--muted); }

/* Events timeline: home on the inline-start side, away on the inline-end side. */
.qrs-timeline { position: relative; display: grid; gap: 10px; padding-block: 4px; }
.qrs-timeline::before { content: ""; position: absolute; inset-block: 0; inset-inline-start: 50%; inline-size: 2px; background: var(--line); }
.qrs-ev { display: grid; grid-template-columns: 1fr 76px 1fr; align-items: center; gap: 8px; position: relative; }
.qrs-ev__min { grid-column: 2; grid-row: 1; justify-self: center; z-index: 1; background: var(--card-2); border: 1px solid var(--line); border-radius: 999px; padding-inline: 10px; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.qrs-ev__who { display: grid; font-weight: 600; }
.qrs-ev__who small { color: var(--muted); font-weight: 400; font-size: 12px; }
.qrs-ev__icon { font-size: 18px; line-height: 1; }
.qrs-ev--home .qrs-ev__who { grid-column: 1; grid-row: 1; text-align: end; }
.qrs-ev--away .qrs-ev__who { grid-column: 3; grid-row: 1; text-align: start; }
.qrs-ev--goal .qrs-ev__min { border-color: var(--primary, #00e676); color: var(--primary, #00e676); }
.qrs-ev--red .qrs-ev__min { border-color: var(--live); color: var(--live); }
.qrs-ev--yellow .qrs-ev__min { border-color: #f5d90a; }

/* Tactical pitch (portrait; home top half, away bottom half) */
.qrs-lineups__bar { display: flex; justify-content: space-between; gap: 8px; font-weight: 700; margin-block-end: 10px; }
.qrs-lineups__bar b { color: var(--primary, #00e676); }
.qrs-pitch { position: relative; max-inline-size: 460px; margin-inline: auto; aspect-ratio: 68 / 100; border-radius: var(--r-md); border: 2px solid rgba(255,255,255,.55);
	background: repeating-linear-gradient(180deg, #1d6b3a 0 10%, #1a6034 10% 20%); overflow: hidden; }
.qrs-pitch > span { position: absolute; border: 2px solid rgba(255,255,255,.55); pointer-events: none; }
.qrs-pitch__half { inset-inline: 0; inset-block-start: 50%; block-size: 0; border-width: 2px 0 0; }
.qrs-pitch__circle { inset-block-start: 50%; inset-inline-start: 50%; inline-size: 26%; aspect-ratio: 1; border-radius: 50%; transform: translate(-50%, -50%); }
[dir="rtl"] .qrs-pitch__circle { transform: translate(50%, -50%); }
.qrs-pitch__box { inset-inline-start: 25%; inline-size: 50%; block-size: 15%; }
.qrs-pitch__box--top { inset-block-start: -2px; border-block-start: 0; }
.qrs-pitch__box--bottom { inset-block-end: -2px; border-block-end: 0; }
.qrs-pdot { position: absolute; display: grid; justify-items: center; inline-size: 64px; margin-inline-start: -32px; margin-block-start: -16px; text-align: center; color: #fff; }
[dir="rtl"] .qrs-pdot { margin-inline-start: -32px; }
.qrs-pdot b { inline-size: 30px; block-size: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.4); }
.qrs-pdot--home b { background: var(--primary, #00e676); color: var(--on-primary); }
.qrs-pdot--away b { background: #2b6df0; color: #fff; }
.qrs-pdot em { font-style: normal; font-size: 11px; line-height: 1.2; text-shadow: 0 1px 3px rgba(0,0,0,.8); max-inline-size: 64px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qrs-pdot i { position: absolute; inset-block-start: -8px; inset-inline-end: 4px; font-style: normal; font-size: 10px; font-weight: 700; background: #0b0f14; color: var(--secondary, #00b0ff); padding-inline: 4px; border-radius: 6px; }
.qrs-subs { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-block-start: 16px; }
.qrs-subs h4 { margin: 0 0 6px; font-size: 13px; color: var(--muted); }
.qrs-subs li { display: flex; gap: 8px; padding-block: 3px; font-size: 13.5px; }
.qrs-subs li b { inline-size: 24px; color: var(--primary, #00e676); text-align: center; }

/* Standings page */
.qrs-pills { display: flex; gap: 8px; overflow-x: auto; padding-block-end: 10px; margin-block-end: 6px; scrollbar-width: none; }
.qrs-pills a { flex: none; display: flex; align-items: center; gap: 6px; padding: 5px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); font-size: 13.5px; font-weight: 600; }
.qrs-pills a.is-active { background: var(--primary, #00e676); border-color: transparent; color: var(--on-primary); }
.qrs-table--full { font-size: 13.5px; }
.qrs-table--full td, .qrs-table--full th { padding: 11px 8px; }
.qrs-form { display: inline-flex; gap: 3px; }
.qrs-form__box { inline-size: 20px; block-size: 20px; border-radius: 5px; display: grid; place-items: center; font-style: normal; font-size: 11px; font-weight: 800; color: #fff; background: var(--muted); }
.qrs-form__box--w { background: #1fa971; }
.qrs-form__box--d { background: #8d99aa; }
.qrs-form__box--l { background: var(--live); }

/* Player */
.qrs-player { display: flex; align-items: center; gap: 24px; padding: 22px; }
.qrs-player__photo .qrs-logo { inline-size: 140px; block-size: 140px; border-radius: 50%; background: var(--card-2); object-fit: cover; }
.qrs-player__info h1 { margin: 0 0 6px; font-size: clamp(24px, 4vw, 34px); }
.qrs-info--player { justify-content: flex-start; border: 0; padding: 8px 0 0; }
.qrs-info--player > div { text-align: start; }
.qrs-player__nat { display: inline-flex; vertical-align: middle; }
.qrs-statgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.qrs-statgrid__item { display: grid; gap: 2px; text-align: center; padding: 16px 10px; }
.qrs-statgrid__item b { font-size: 26px; color: var(--primary, #00e676); font-variant-numeric: tabular-nums; }
.qrs-statgrid__item span { color: var(--muted); font-size: 13px; }

@media (max-width: 768px) {
	.hide-sm { display: none; }
	.qrs-player { flex-direction: column; text-align: center; }
	.qrs-info--player { justify-content: center; }
	.qrs-ev { grid-template-columns: 1fr 70px 1fr; font-size: 14px; }
	.qrs-subs { grid-template-columns: 1fr; }
	.qrs-pdot { inline-size: 52px; margin-inline-start: -26px; }
	.qrs-pdot em { font-size: 10px; max-inline-size: 52px; }
}


/* ==========================================================================
   12. Phantom Pro refinements
   ========================================================================== */
/* Yellow match timer circle (86:22) */
.qrs-timer { display: grid; place-items: center; inline-size: 76px; block-size: 76px; border-radius: 50%; background: var(--accent-yellow); color: #1a1500; font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent-yellow) 25%, transparent); }
.qrs-timer--idle { background: var(--card-2); color: var(--text); box-shadow: none; font-size: 16px; }
.qrs-timer[data-live] { animation: qrs-glow 2s ease-in-out infinite; }
@keyframes qrs-glow { 50% { box-shadow: 0 0 0 9px color-mix(in srgb, var(--accent-yellow) 10%, transparent); } }

/* Hero tabs – five Arabic tabs, scroll on small screens, active = green */
.qrs-tabs { overflow-x: auto; justify-content: flex-start; scrollbar-width: none; max-inline-size: 640px; margin-inline: auto; margin-block-end: 14px; }
.qrs-tabs::-webkit-scrollbar { display: none; }
.qrs-tabs button { flex: none; }
.qrs-tabs button.is-active { background: var(--accent-green); color: #04210f; }
@media (min-width: 640px) { .qrs-tabs { justify-content: center; } }
.qrs-hero__panel { max-inline-size: 640px; }

/* Blinking red dot for live matches */
.qrs-match.is-live .qrs-match__status::before, .qrs-tick.is-live small::before { content: ""; display: inline-block; inline-size: 7px; block-size: 7px; margin-inline-end: 4px; border-radius: 50%; background: var(--accent-red); animation: qrs-blink 1s steps(2, start) infinite; }
@keyframes qrs-blink { to { visibility: hidden; } }
.qrs-livebadge, .qrs-tick.is-live small, .qrs-match.is-live .qrs-match__status { color: #fff; }
.qrs-tick.is-live small, .qrs-match.is-live .qrs-match__status { color: var(--accent-red); }

/* Standings: top 4 highlighted */
.qrs-table tr.is-top4 { background: color-mix(in srgb, var(--accent-green) 7%, transparent); }
.qrs-table tr.is-top4 .qrs-table__pos { color: var(--accent-green); font-weight: 800; }
.qrs-table tr:hover { background: var(--card-2); }
.qrs-gap { margin-block-start: 20px; }

/* Scorers: photo · name · team logo · goals */
.qrs-scorers .qrs-logo--player { border-radius: 50%; background: var(--card-2); object-fit: cover; }
.qrs-scorers b { color: var(--accent-green); inline-size: 34px; text-align: center; }

/* Events icons / colours */
.qrs-ev--yellow .qrs-ev__min { border-color: var(--accent-yellow); }
.qrs-ev--red .qrs-ev__min { border-color: var(--accent-red); color: var(--accent-red); }
.qrs-ev--goal .qrs-ev__min { border-color: var(--accent-green); color: var(--accent-green); }

/* Ratings + stream tabs */
.qrs-ratings { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.qrs-ratings h4 { font-size: 13px; color: var(--muted); }
.qrs-ratings__list li { display: flex; align-items: center; gap: 8px; padding-block: 5px; border-block-end: 1px solid var(--line); }
.qrs-ratings__list a { flex: 1; display: flex; align-items: center; gap: 8px; min-inline-size: 0; font-size: 13.5px; }
.qrs-ratings__list .qrs-logo { border-radius: 50%; background: var(--card-2); }
.qrs-ratings__list b { min-inline-size: 38px; text-align: center; border-radius: 6px; padding-inline: 6px; color: #04210f; font-variant-numeric: tabular-nums; }
.qrs-ratings__list b.is-high { background: var(--accent-green); }
.qrs-ratings__list b.is-mid { background: var(--accent-yellow); }
.qrs-ratings__list b.is-low { background: var(--accent-red); color: #fff; }
.qrs-stream iframe { inline-size: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: var(--r-md); }
.qrs-stream__tv { text-align: center; color: var(--muted); }

/* Bottom nav: active icon is green */
.qrs-bottomnav__item.is-active { color: var(--accent-green); font-weight: 700; }
.qrs-form__box--w { background: var(--accent-green); color: #04210f; }
.qrs-form__box--l { background: var(--accent-red); }
.qrs-form__box--d { background: var(--muted); color: #11161d; }
@media (max-width: 768px) { .qrs-ratings { grid-template-columns: 1fr; } }
