/* ============================================
   كورة لايف - تصميم حديث احترافي
   ============================================ */

:root {
  /* الألوان الأساسية */
  --bg: #070b15;
  --bg-soft: #0d1422;
  --surface: #121a2b;
  --surface-2: #182236;
  --surface-hover: #1d2942;
  --border: rgba(255, 255, 255, 0.06);
  --border-strong: rgba(255, 255, 255, 0.12);

  /* النصوص */
  --text: #eef2fb;
  --text-dim: #93a1bd;
  --text-mute: #5d6b86;

  /* الألوان المميزة */
  --accent: #00e5a0;
  --accent-2: #00b4d8;
  --live: #ff3b5c;
  --live-glow: rgba(255, 59, 92, 0.5);
  --gold: #ffc857;
  --purple: #8b5cf6;

  /* تدرجات */
  --grad-accent: linear-gradient(135deg, #00e5a0, #00b4d8);
  --grad-live: linear-gradient(135deg, #ff3b5c, #ff7847);
  --grad-gold: linear-gradient(135deg, #ffc857, #ff9838);

  /* قياسات */
  --radius: 18px;
  --radius-sm: 12px;
  --radius-lg: 26px;
  --header-h: 116px;
  --nav-h: 68px;

  --shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 8px 32px rgba(0, 229, 160, 0.15);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Cairo', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom));
  -webkit-font-smoothing: antialiased;
}

/* ============ الخلفية المتحركة ============ */
.bg-gradient {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(0, 180, 216, 0.12), transparent),
    radial-gradient(ellipse 60% 40% at 100% 100%, rgba(139, 92, 246, 0.08), transparent),
    var(--bg);
  z-index: -2;
}

.bg-orbs { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.4;
  animation: float 20s ease-in-out infinite;
}
.orb-1 { width: 320px; height: 320px; background: var(--accent); top: -80px; right: -60px; animation-delay: 0s; }
.orb-2 { width: 260px; height: 260px; background: var(--accent-2); top: 40%; left: -100px; animation-delay: -7s; }
.orb-3 { width: 300px; height: 300px; background: var(--purple); bottom: -120px; right: 20%; animation-delay: -14s; opacity: 0.25; }

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(-30px, 40px) scale(1.1); }
  66% { transform: translate(40px, -20px) scale(0.95); }
}

/* ============ الهيدر ============ */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 14, 26, 0.72);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid var(--border);
  padding-top: env(safe-area-inset-top);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px 12px;
  max-width: 680px;
  margin: 0 auto;
}

.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo {
  width: 80px; height: 80px;
  display: grid; place-items: center;
  border-radius: 14px;
  overflow: hidden;
  animation: logoPulse 3s ease-in-out infinite;
}
.brand-logo img { width: 100%; height: 100%; object-fit: contain; }
.brand-logo svg { width: 26px; height: 26px; }
@keyframes logoPulse {
  0%, 100% { filter: drop-shadow(0 4px 14px rgba(0, 229, 160, 0.15)); }
  50% { filter: drop-shadow(0 4px 18px rgba(0, 229, 160, 0.3)); }
}

.brand-text h1 { font-size: 21px; font-weight: 800; line-height: 1.1; letter-spacing: -0.5px; }
.brand-text h1 span {
  background: var(--grad-accent);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.brand-text p { font-size: 11px; color: var(--text-mute); font-weight: 600; margin-top: 1px; }

.header-actions { display: flex; align-items: center; gap: 10px; }

.live-pill {
  display: flex; align-items: center; gap: 7px;
  background: rgba(255, 59, 92, 0.12);
  border: 1px solid rgba(255, 59, 92, 0.3);
  color: #ff8095;
  padding: 7px 13px;
  border-radius: 100px;
  font-size: 12.5px;
  font-weight: 700;
}
.live-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--live);
  box-shadow: 0 0 0 0 var(--live-glow);
  animation: pulse 1.8s ease-out infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 var(--live-glow); }
  70% { box-shadow: 0 0 0 8px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.icon-btn {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.2s ease;
}
.icon-btn:active { transform: scale(0.92); }
.icon-btn:hover { background: var(--surface-hover); color: var(--text); }
.icon-btn svg { width: 20px; height: 20px; }

/* ============ شريط التاريخ ============ */
.date-bar {
  display: flex;
  gap: 8px;
  padding: 4px 18px 14px;
  overflow-x: auto;
  scrollbar-width: none;
  max-width: 680px;
  margin: 0 auto;
}
.date-bar::-webkit-scrollbar { display: none; }

.date-chip {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 62px;
  padding: 9px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.date-chip:active { transform: scale(0.94); }
.date-chip .day { font-size: 11px; color: var(--text-mute); font-weight: 600; }
.date-chip .num { font-size: 16px; font-weight: 800; color: var(--text-dim); }
.date-chip.active {
  background: var(--grad-accent);
  border-color: transparent;
  box-shadow: var(--shadow-glow);
}
.date-chip.active .day { color: rgba(6, 36, 28, 0.7); }
.date-chip.active .num { color: #06241c; }
.date-chip.today:not(.active) .num { color: var(--accent); }

/* ============ تبويبات الفلترة ============ */
.filter-tabs {
  display: flex;
  gap: 8px;
  padding: 14px 18px;
  overflow-x: auto;
  scrollbar-width: none;
  max-width: 680px;
  margin: 0 auto;
  position: sticky;
  top: var(--header-h);
  z-index: 90;
  transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1),
              opacity 0.25s ease,
              max-height 0.35s cubic-bezier(0.32, 0.72, 0, 1),
              padding 0.35s cubic-bezier(0.32, 0.72, 0, 1);
  max-height: 70px;
  overflow-y: hidden;
}
.filter-tabs::-webkit-scrollbar { display: none; }
/* إخفاء شريط التبويبات عند النزول · إظهاره عند الصعود */
body.tabs-hidden .filter-tabs {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  opacity: 0;
  transform: translateY(-12px);
  pointer-events: none;
}

.tab {
  flex-shrink: 0;
  display: flex; align-items: center; gap: 7px;
  padding: 9px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--text-dim);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
}
.tab svg { width: 16px; height: 16px; }
.tab:active { transform: scale(0.95); }
.tab.active {
  background: var(--text);
  color: var(--bg);
  border-color: transparent;
}
.tab[data-filter="live"].active {
  background: var(--grad-live);
  color: #fff;
}
.tab-live-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--live);
  animation: pulse 1.8s ease-out infinite;
}
.tab[data-filter="important"].active { background: var(--grad-gold); color: #2a1c00; }

/* ============ المحتوى ============ */
.content {
  max-width: 680px;
  margin: 0 auto;
  padding: 4px 14px 30px;
}

/* مجموعة بطولة */
.league-group {
  margin-bottom: 16px;
  animation: slideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.league-header {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 16px;
  background: linear-gradient(135deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.league-header:active { transform: scale(0.99); }
.league-header:hover { border-color: var(--border-strong); }

.league-logo {
  width: 30px; height: 30px;
  object-fit: contain;
  border-radius: 8px;
  background: rgba(255,255,255,0.04);
  padding: 2px;
}
.league-meta { flex: 1; }
.league-name { font-size: 14.5px; font-weight: 800; }
.league-country { font-size: 11px; color: var(--text-mute); font-weight: 600; }
.league-chevron {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  color: var(--text-mute);
  background: rgba(255,255,255,0.04);
  border-radius: 9px;
  transition: all 0.2s ease;
}
.league-chevron svg { width: 16px; height: 16px; }
.league-header:hover .league-chevron { background: var(--accent); color: #06241c; }

/* بطاقة المباراة */
.match-list { display: flex; flex-direction: column; gap: 8px; }

.match-card {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  padding: 18px 16px;
  background: linear-gradient(150deg, rgba(255,255,255,0.05), rgba(255,255,255,0.015));
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--radius);
  cursor: pointer;
  overflow: hidden;
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 8px 28px -16px rgba(0,0,0,0.7), inset 0 1px 0 rgba(255,255,255,0.05);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
  animation: cardIn 0.45s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.match-card:active { transform: scale(0.985); }
.match-card:hover { border-color: rgba(255,255,255,0.14); }

/* توهّج علوي زجاجي للمباريات المباشرة (بدل الخط الأحمر) */
.match-card.is-live {
  border-color: rgba(255,59,92,0.22);
  background: linear-gradient(150deg, rgba(255,59,92,0.08), rgba(255,255,255,0.015) 55%);
}
.match-card.is-live::before {
  content: '';
  position: absolute;
  top: -40%; inset-inline-end: -10%;
  width: 160px; height: 160px;
  background: radial-gradient(circle, rgba(255,59,92,0.22), transparent 70%);
  pointer-events: none;
}

/* الفريق */
.team {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.team.home { flex-direction: row-reverse; }
.team.away { flex-direction: row; }

.team-logo {
  width: 40px; height: 40px;
  flex-shrink: 0;
  object-fit: contain;
  border-radius: 11px;
  background: rgba(255,255,255,0.05);
  padding: 4px;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.match-card:hover .team-logo { transform: scale(1.1); }
.team-name {
  flex: 1;
  font-size: 13.5px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.team.home .team-name { text-align: right; }
.team.away .team-name { text-align: left; }

/* وسط البطاقة - النتيجة / الوقت */
.match-center {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 130px;
}

.match-status-label {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-mute);
  white-space: nowrap;
  letter-spacing: 0.2px;
  text-align: center;
}
.match-status-label.live { color: var(--live); }
.match-card.is-finished .match-status-label { color: var(--text-dim); }
/* نص الشوط للمباراة المباشرة: تحت الدائرة دون دفع الأرقام لأعلى */
.match-card.is-live .match-status-label {
  position: absolute;
  top: 100%;
  margin-top: 4px;
  left: 0; right: 0;
}
/* مساحة سفلية للمباراة المباشرة كي لا يُقص نص الشوط */
.match-card.is-live { padding-bottom: 30px; }
.match-card.is-live.has-watch { padding-bottom: 52px; }

/* المباراة المباشرة: نتيجة | دائرة | نتيجة */
.live-center {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}
.live-center .lc-score {
  font-size: 26px;
  font-weight: 900;
  color: #fff;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  min-width: 18px;
  text-align: center;
}
.live-center .lc-score.lead { color: var(--accent); }

/* دائرة التقدّم الزجاجية */
.live-ring {
  position: relative;
  width: 54px; height: 54px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.live-ring .ring-svg {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  transform: rotate(-90deg);
}
.live-ring .ring-bg {
  fill: none;
  stroke: rgba(255,255,255,0.08);
  stroke-width: 2.5;
}
.live-ring .ring-fg {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.5;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.6s cubic-bezier(0.16,1,0.3,1);
}
.live-ring .ring-dot { display: none; }
.live-ring .ring-time {
  font-size: 12.5px;
  font-weight: 800;
  color: #fff;
  font-variant-numeric: tabular-nums;
  z-index: 1;
  letter-spacing: -0.3px;
}

.score-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 24px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.score-box .sep { color: var(--text-mute); font-size: 17px; font-weight: 700; }
.match-card.is-finished .score-box .win { color: var(--accent); }

/* وقت البداية للمباريات القادمة */
.kickoff {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
.kickoff .time {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.kickoff .vs {
  font-size: 9px;
  color: var(--text-mute);
  font-weight: 800;
  letter-spacing: 1px;
  background: var(--surface-2);
  padding: 2px 8px;
  border-radius: 100px;
}

/* ============ Skeleton ============ */
.skeleton-wrap { display: flex; flex-direction: column; gap: 10px; padding-top: 8px; }
.sk-league, .sk-match {
  border-radius: var(--radius);
  background: linear-gradient(100deg, var(--surface) 30%, var(--surface-2) 50%, var(--surface) 70%);
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
}
.sk-league { height: 56px; }
.sk-match { height: 76px; }
@keyframes shimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

/* ============ شريط التنقل السفلي ============ */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-around;
  align-items: center;
  height: var(--nav-h);
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(10, 14, 26, 0.85);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-top: 1px solid var(--border);
}
.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  color: var(--text-mute);
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 14px;
  transition: all 0.25s ease;
  position: relative;
}
.nav-item span { white-space: nowrap; }
.nav-item svg { width: 23px; height: 23px; transition: transform 0.25s cubic-bezier(0.34,1.56,0.64,1); }
.nav-item:active svg { transform: scale(0.85); }
.nav-item.active { color: var(--accent); }
.nav-item.active svg { transform: translateY(-2px); }
.nav-item.active::after {
  content: '';
  position: absolute;
  bottom: 2px;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--accent);
}

/* ============ حالة فارغة ============ */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 70px 20px;
  text-align: center;
  color: var(--text-mute);
  animation: slideUp 0.5s ease backwards;
}
.empty-state svg { width: 64px; height: 64px; opacity: 0.35; margin-bottom: 18px; }
.empty-state h3 { font-size: 16px; color: var(--text-dim); margin-bottom: 6px; }
.empty-state p { font-size: 13px; }

/* ============ نافذة الترتيب المنبثقة ============ */
.sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}
.sheet-overlay.open { opacity: 1; visibility: visible; }

.sheet {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 201;
  max-width: 680px;
  margin: 0 auto;
  max-height: 82vh;
  background: var(--bg-soft);
  border-radius: 28px 28px 0 0;
  border-top: 1px solid var(--border-strong);
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1);
  display: flex;
  flex-direction: column;
  padding-bottom: env(safe-area-inset-bottom);
}
.sheet.open { transform: translateY(0); }
.sheet-handle {
  width: 42px; height: 5px;
  background: var(--border-strong);
  border-radius: 3px;
  margin: 12px auto 6px;
  flex-shrink: 0;
}
.sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 18px 14px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.sheet-header h3 { font-size: 17px; font-weight: 800; }
/* شريط التبويبات الثابت (لا يتمرّر · يحجب المحتوى تحته) */
.sheet-tabs {
  flex-shrink: 0;
  padding: 10px 14px;
  background: var(--bg-soft);
  position: relative;
  z-index: 5;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 6px 14px -6px rgba(0,0,0,0.6);
}
.sheet-tabs:empty { display: none; }
.sheet-body {
  overflow-y: auto;
  padding: 8px 12px 20px;
  -webkit-overflow-scrolling: touch;
}

/* جدول الترتيب */
.standings-table { width: 100%; }
.st-row {
  display: grid;
  grid-template-columns: 28px 1fr repeat(4, 26px) 38px;
  align-items: center;
  gap: 4px;
  padding: 11px 8px;
  border-radius: 10px;
  font-size: 12.5px;
  animation: cardIn 0.4s ease backwards;
}
.st-row.head {
  font-size: 10.5px;
  color: var(--text-mute);
  font-weight: 700;
  position: sticky;
  top: 0;
  background: var(--bg-soft);
}
.st-row:not(.head):nth-child(even) { background: rgba(255,255,255,0.02); }
.st-row .pos {
  text-align: center;
  font-weight: 800;
  color: var(--text-dim);
}
.st-row .team-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-direction: row-reverse;
  text-align: right;
  overflow: hidden;
}
.st-row .team-cell img { width: 22px; height: 22px; object-fit: contain; flex-shrink: 0; }
.st-row .team-cell span {
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.st-row .stat { text-align: center; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.st-row .pts { text-align: center; font-weight: 900; color: var(--accent); font-variant-numeric: tabular-nums; }

/* تلوين مراكز التأهل/الهبوط */
.st-row.zone-champions { box-shadow: inset 3px 0 0 var(--accent); }
.st-row.zone-europa { box-shadow: inset 3px 0 0 var(--accent-2); }
.st-row.zone-relegation { box-shadow: inset 3px 0 0 var(--live); }

/* قائمة الدوريات */
.leagues-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  animation: slideUp 0.5s ease backwards;
}
.league-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 20px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.25s ease;
  text-align: center;
}
.league-card:active { transform: scale(0.96); }
.league-card:hover { border-color: var(--accent); background: var(--surface-2); }
.league-card img { width: 48px; height: 48px; object-fit: contain; }
.league-card .lc-name { font-size: 12.5px; font-weight: 700; line-height: 1.3; }
.league-card .lc-badge {
  font-size: 10px;
  color: var(--accent);
  font-weight: 700;
  background: rgba(0,229,160,0.1);
  padding: 3px 10px;
  border-radius: 100px;
}

/* عنوان قسم */
.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 800;
  margin: 6px 4px 14px;
}
.section-title .bar { width: 4px; height: 18px; background: var(--grad-accent); border-radius: 3px; }

/* toast */
.toast {
  position: fixed;
  bottom: calc(var(--nav-h) + 20px);
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  color: var(--text);
  padding: 12px 20px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 700;
  z-index: 300;
  opacity: 0;
  transition: all 0.3s ease;
  box-shadow: var(--shadow);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* تحديث وميض النتيجة */
@keyframes scoreFlash {
  0% { transform: scale(1); }
  40% { transform: scale(1.35); color: var(--accent); }
  100% { transform: scale(1); }
}
.score-flash { animation: scoreFlash 0.6s ease; }

/* شاشات أكبر */
@media (min-width: 600px) {
  :root { --header-h: 120px; }
  .leagues-grid { grid-template-columns: repeat(3, 1fr); }
  .team-name { font-size: 14.5px; }
}
@media (max-width: 360px) {
  .team-name { font-size: 12px; }
  .team-logo { width: 32px; height: 32px; }
  .match-center { min-width: 74px; }
}

/* تقليل الحركة لمن يفضل ذلك */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .orb { animation: none; }
}

/* ============ شاشة تفاصيل المباراة ============ */
.match-detail-screen {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: var(--bg);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
  padding-bottom: calc(env(safe-area-inset-bottom) + 30px);
}
.match-detail-screen.open { transform: translateX(0); }

.md-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  padding-top: calc(env(safe-area-inset-top) + 12px);
  background: rgba(10, 14, 26, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  font-weight: 800;
}

/* شريحة البطولة في منتصف الشريط العلوي */
.md-comp {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 0 8px;
  text-align: center;
}
.md-comp-name {
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.md-comp-round {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-mute);
}

.md-content { max-width: 680px; margin: 0 auto; padding: 16px 14px; }

/* هيدر المباراة (الفرق والنتيجة) */
.md-hero {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 24px 16px;
  background: linear-gradient(160deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}
.md-hero::before {
  content: '';
  position: absolute;
  top: -50%; left: 50%; transform: translateX(-50%);
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(0,229,160,0.15), transparent 70%);
}
.md-hero-team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  z-index: 1;
}
.md-hero-team img { width: 64px; height: 64px; object-fit: contain; }
.md-hero-team .name { font-size: 14px; font-weight: 800; text-align: center; }
.md-hero-center { text-align: center; z-index: 1; }
.md-hero-score {
  font-size: 38px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  letter-spacing: 2px;
}
.md-hero-status {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-dim);
  margin-top: 4px;
}
.md-hero-status.live { color: var(--live); }

/* تفاصيل تحت الهيدر: الملعب + التاريخ */
.md-hero-details {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 18px;
  margin: -8px 0 16px;
  padding: 10px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.md-hero-details .hd-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-dim);
}
.md-hero-details .hd-item svg { width: 15px; height: 15px; color: var(--accent); flex-shrink: 0; }

/* تبويبات التفاصيل */
.md-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  margin-bottom: 16px;
  padding-bottom: 2px;
}
.md-tabs::-webkit-scrollbar { display: none; }
.md-tab {
  flex-shrink: 0;
  padding: 9px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--text-dim);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.md-tab.active { background: var(--grad-accent); color: #06241c; border-color: transparent; }

.md-section { animation: slideUp 0.4s ease backwards; }
.md-section-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 800; margin: 4px 4px 12px;
}
.md-section-title .bar { width: 4px; height: 16px; background: var(--grad-accent); border-radius: 3px; }

/* الأحداث (timeline احترافي) */
.timeline {
  position: relative;
  padding: 4px 0;
}
/* الخط العمودي المركزي */
.timeline::before {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  background: linear-gradient(to bottom, transparent, var(--border-strong) 10%, var(--border-strong) 90%, transparent);
}

.tl-period {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  margin: 14px auto;
  padding: 6px 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 100px;
  width: fit-content;
}
.tl-period-label { font-size: 11px; font-weight: 800; color: var(--text-dim); }
.tl-period-score { font-size: 13px; font-weight: 900; color: var(--accent); font-variant-numeric: tabular-nums; }

.tl-row {
  display: grid;
  grid-template-columns: 1fr 44px 1fr;
  align-items: center;
  gap: 4px;
  padding: 7px 0;
  animation: cardIn 0.4s ease backwards;
}
.tl-side { min-width: 0; }
.tl-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 2;
}
.tl-min {
  font-size: 11px;
  font-weight: 800;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 100px;
  padding: 3px 7px;
  font-variant-numeric: tabular-nums;
  min-width: 32px;
  text-align: center;
}

/* بطاقة الحدث */
.tl-event {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 11px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.tl-row.away .tl-event { flex-direction: row-reverse; text-align: right; }
.tl-row.home .tl-event { flex-direction: row; text-align: left; }

.tl-ico { flex-shrink: 0; display: grid; place-items: center; width: 38px; height: 38px; }
.tl-ico svg { width: 22px; height: 22px; }
.tl-info { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.tl-player {
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tl-assist { font-size: 10.5px; color: var(--text-mute); font-weight: 600; }
.tl-sub-out { font-size: 10.5px; color: var(--live); font-weight: 700; }
.tl-in { color: var(--accent); display: inline-flex; vertical-align: middle; }
.tl-in svg { width: 13px; height: 13px; }
.tl-player-img {
  width: 30px; height: 30px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface-2);
  flex-shrink: 0;
}
.tl-video { font-size: 14px; text-decoration: none; flex-shrink: 0; }

/* تمييز أنواع الأحداث بلون الحدود */
.tl-goal { border-color: rgba(0,229,160,0.4); }
.tl-own_goal, .tl-goal_disallowed { border-color: rgba(255,59,92,0.35); }
.tl-substitution { border-color: rgba(0,180,216,0.3); }
.tl-red_card { border-color: rgba(255,59,92,0.5); }

/* بطاقات صفراء/حمراء */
.card-ico {
  display: inline-block;
  width: 12px; height: 16px;
  border-radius: 2px;
}
.card-ico.yellow { background: #ffcf33; }
.card-ico.red { background: #ff3b5c; }
.card-ico.yellow2 {
  background: linear-gradient(135deg, #ffcf33 50%, #ff3b5c 50%);
}


/* الإحصائيات */
.stat-item { margin-bottom: 16px; }
.stat-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 6px;
}
.stat-head .val { font-weight: 900; font-variant-numeric: tabular-nums; }
.stat-head .label { color: var(--text-dim); font-size: 12px; }
.stat-bars {
  display: flex;
  gap: 4px;
  height: 7px;
}
.stat-bar {
  height: 100%;
  border-radius: 4px;
  transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.stat-bar.home { background: var(--grad-accent); }
.stat-bar.away { background: linear-gradient(135deg, #ff7847, #ff3b5c); }
.stat-bar.dim { background: var(--surface-2); }

/* التشكيلة - الملعب */
.lineup-pitch {
  position: relative;
  background:
    linear-gradient(0deg, rgba(0,229,160,0.04), rgba(0,180,216,0.04)),
    repeating-linear-gradient(0deg, #0d2818 0px, #0d2818 40px, #0f2e1c 40px, #0f2e1c 80px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 8px;
  margin-bottom: 16px;
  min-height: 360px;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  overflow: hidden;
}
.lineup-pitch::before {
  content: '';
  position: absolute;
  top: 50%; left: 8px; right: 8px;
  height: 2px;
  background: rgba(255,255,255,0.15);
}
.lineup-pitch::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 70px; height: 70px;
  border: 2px solid rgba(255,255,255,0.15);
  border-radius: 50%;
}
.pitch-row {
  display: flex;
  justify-content: space-around;
  align-items: center;
  position: relative;
  z-index: 1;
}

.pitch-player {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  width: 58px;
  animation: cardIn 0.5s ease backwards;
}
.pitch-player .shirt {
  position: relative;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 2px solid var(--accent);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.pitch-player.away .shirt { border-color: #ff7847; }
.pitch-player .shirt img { width: 100%; height: 100%; object-fit: cover; }
.pitch-player .shirt .num {
  font-size: 13px; font-weight: 800; color: var(--text);
}
.pitch-player .pname {
  font-size: 10px;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 58px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}
.pitch-player .badge-mini {
  position: absolute;
  top: -4px; right: -4px;
  font-size: 9px;
  display: grid;
  place-items: center;
}
.pitch-player .badge-mini svg { width: 14px; height: 14px; filter: drop-shadow(0 1px 2px rgba(0,0,0,0.6)); }
.pitch-player .badge-mini .badge-c {
  display: grid; place-items: center;
  width: 14px; height: 14px;
  background: var(--accent); color: #06241c;
  border-radius: 50%; font-weight: 800; font-size: 9px;
}
.pitch-player .rating-mini {
  font-size: 9px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 6px;
  background: var(--accent);
  color: #06241c;
}
.rating-mini.mid { background: var(--gold); color: #2a1c00; }
.rating-mini.low { background: var(--text-mute); color: #fff; }

/* قائمة التشكيلة (بديل النص) */
.lineup-team-tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.lineup-team-tab {
  flex: 1;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
  font-size: 13px;
  color: var(--text-dim);
}
.lineup-team-tab.active { border-color: var(--accent); color: var(--text); }
.lineup-team-tab img { width: 24px; height: 24px; object-fit: contain; }
.formation-pill {
  text-align: center;
  font-size: 12px;
  color: var(--accent);
  font-weight: 800;
  margin-bottom: 10px;
}

/* المدرب */
.coach-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
}
.coach-row img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: var(--surface-2); }
.coach-row .c-label { font-size: 11px; color: var(--text-mute); }
.coach-row .c-name { font-size: 13px; font-weight: 700; }

/* قائمة البدلاء */
.subs-list { display: flex; flex-direction: column; gap: 6px; }
.sub-player {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
}
.sub-player .s-num {
  width: 24px; height: 24px;
  display: grid; place-items: center;
  background: var(--surface-2);
  border-radius: 7px;
  font-size: 11px; font-weight: 800;
  color: var(--text-dim);
  flex-shrink: 0;
}
.sub-player .s-name { font-weight: 700; flex: 1; }
.sub-player .s-rating { font-size: 11px; font-weight: 800; color: var(--accent); }
.sub-player .s-sub { font-size: 10px; color: var(--text-mute); display: inline-flex; align-items: center; gap: 2px; }
.sub-player .s-sub-ico { width: 12px; height: 12px; }
.sub-player img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }

/* معلومات اللقاء */
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.info-box {
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.info-box .i-label { font-size: 11px; color: var(--text-mute); font-weight: 600; margin-bottom: 3px; }
.info-box .i-value { font-size: 13px; font-weight: 700; }
.info-box.full { grid-column: 1 / -1; }

/* آخر 5 مباريات (الفورم) */
.form-hint {
  font-size: 11px;
  color: var(--text-mute);
  text-align: center;
  margin-bottom: 12px;
}
.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 10px;
  animation: cardIn 0.4s ease backwards;
}
.form-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.form-team { display: flex; align-items: center; gap: 9px; font-size: 13.5px; font-weight: 800; }
.form-team img { width: 28px; height: 28px; object-fit: contain; }
.form-summary { display: flex; gap: 8px; font-size: 11.5px; font-weight: 800; }
.form-summary .fs-win { color: var(--accent); }
.form-summary .fs-draw { color: var(--text-mute); }
.form-summary .fs-lose { color: var(--live); }

.form-strip {
  display: flex;
  flex-direction: row-reverse;
  justify-content: flex-start;
  gap: 8px;
}
.form-pill {
  width: 34px; height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  text-decoration: none;
  transition: transform 0.2s ease;
}
.form-pill:active { transform: scale(0.9); }
.form-pill--win { background: linear-gradient(135deg, #00e5a0, #00b478); }
.form-pill--draw { background: var(--surface-hover); color: var(--text-dim); }
.form-pill--lose { background: linear-gradient(135deg, #ff5c7a, #ff3b5c); }

/* تصويت الجمهور (التوقعات) */
.predict-head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
}
.predict-col {
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-align: center;
  flex: 1;
}
.predict-col:first-child { text-align: right; }
.predict-col:last-child { text-align: left; }
.predict-pct {
  font-size: 22px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}
.predict-pct.home { color: var(--purple); }
.predict-pct.draw { color: var(--text-dim); }
.predict-pct.away { color: var(--accent-2); }
.predict-team {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-mute);
}
.predict-bar {
  display: flex;
  height: 10px;
  border-radius: 100px;
  overflow: hidden;
  gap: 2px;
}
.predict-bar .pb {
  height: 100%;
  transition: width 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}
.predict-bar .pb.home { background: var(--purple); border-radius: 100px 0 0 100px; }
.predict-bar .pb.draw { background: var(--text-mute); }
.predict-bar .pb.away { background: var(--accent-2); border-radius: 0 100px 100px 0; }

/* ملاحظة الإحصائيات المحدودة */
.stats-note {
  font-size: 12px;
  color: var(--text-mute);
  text-align: center;
  margin-top: 14px;
  padding: 12px;
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
}

/* ============ مشغّل البث المباشر ============ */
.watch-section { animation: slideUp 0.4s ease backwards; }
.player-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}
.live-player {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}
.player-loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: rgba(0,0,0,0.7);
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 700;
}
.player-loading .spinner {
  width: 36px; height: 36px;
  border: 3px solid rgba(255,255,255,0.15);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.channel-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  flex-wrap: wrap;
}
.channel-info { display: flex; align-items: center; gap: 12px; }
.channel-logo { width: 40px; height: 40px; object-fit: contain; border-radius: 8px; background: rgba(255,255,255,0.05); padding: 3px; }
.channel-name { font-size: 14px; font-weight: 800; }
.channel-cat { font-size: 11px; color: var(--text-mute); font-weight: 600; }

.source-switch { display: flex; gap: 6px; }
.src-btn {
  padding: 7px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--text-dim);
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}
.src-btn.active { background: var(--grad-accent); color: #06241c; border-color: transparent; }

.watch-note {
  font-size: 11px;
  color: var(--text-mute);
  text-align: center;
  margin-top: 12px;
}

/* شارة المشاهدة على بطاقة اللايف - ركن سفلي */
.watch-badge {
  position: absolute;
  bottom: 10px;
  inset-inline-start: 14px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #ff3b3b, #c81d25);
  padding: 5px 12px 5px 10px;
  border-radius: 100px;
  white-space: nowrap;
  box-shadow: 0 4px 14px -4px #ff3b3b;
  z-index: 2;
}
.watch-badge svg { width: 14px; height: 14px; }
/* المباريات التي فيها زر مشاهدة تحتاج مساحة سفلية */
.match-card.has-watch { padding-bottom: 44px; }

/* ============ صفحة القنوات ============ */
.ch-filters {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  margin-bottom: 14px;
  padding-bottom: 2px;
}
.ch-filters::-webkit-scrollbar { display: none; }
.ch-filter {
  flex-shrink: 0;
  padding: 8px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--text-dim);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}
.ch-filter.active { background: var(--grad-accent); color: #06241c; border-color: transparent; }

.channels-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.channel-card-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s ease;
  animation: cardIn 0.4s ease backwards;
}
.channel-card-item:active { transform: scale(0.98); }
.channel-card-item:hover { border-color: var(--border-strong); background: var(--surface-2); }
.channel-card-item.no-stream { opacity: 0.55; }

.cc-logo {
  width: 56px; height: 56px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  background: #fff;
  border-radius: 14px;
  font-size: 28px;
  overflow: hidden;
}
.cc-logo img { width: 100%; height: 100%; object-fit: cover; padding: 0; }
.cc-info { flex: 1; min-width: 0; }
.cc-name { font-size: 14.5px; font-weight: 800; }
.cc-cat { font-size: 11.5px; color: var(--text-mute); font-weight: 600; margin-top: 2px; }

.cc-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 800;
  color: var(--accent);
  background: rgba(0,229,160,0.12);
  border: 1px solid rgba(0,229,160,0.25);
  padding: 5px 12px;
  border-radius: 100px;
  flex-shrink: 0;
}
.cc-live-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 1.8s ease-out infinite;
}
.cc-off {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-mute);
  background: var(--surface-2);
  padding: 5px 12px;
  border-radius: 100px;
  flex-shrink: 0;
}

@media (min-width: 600px) {
  .channels-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ============ شاشة مشغّل القناة ============ */
.channel-player-screen {
  position: fixed;
  inset: 0;
  z-index: 310;
  background: var(--bg);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
  padding-bottom: calc(env(safe-area-inset-bottom) + 30px);
}
.channel-player-screen.open { transform: translateX(0); }
.cp-content { max-width: 680px; margin: 0 auto; padding: 16px 14px; }

/* قنوات kora الناقلة */
.kora-channels {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 8px;
  margin-top: 12px;
}
.kora-ch {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 11px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  cursor: pointer;
  text-align: right;
  transition: all 0.2s ease;
}
.kora-ch:active { transform: scale(0.97); }
.kora-ch:hover { border-color: var(--border-strong); background: var(--surface-2); }
.kora-ch.active {
  background: var(--grad-accent);
  border-color: transparent;
  color: #06241c;
}
.kora-ch .kch-name { font-size: 13px; font-weight: 800; }
.kora-ch .kch-q { font-size: 10.5px; opacity: 0.7; font-weight: 600; }
.kora-ch.active .kch-q { opacity: 0.85; }

/* شارة عدد القنوات في عنوان القسم */
.sec-badge {
  font-size: 11px;
  font-weight: 800;
  color: var(--accent);
  background: rgba(0,229,160,0.12);
  padding: 2px 9px;
  border-radius: 100px;
  margin-inline-start: 4px;
}
/* بطاقة قناة kora (مباشرة) */
.channel-card-item.kora-card {
  border-color: rgba(0,229,160,0.25);
  background: linear-gradient(90deg, rgba(0,229,160,0.05), var(--surface) 50%);
}
.channel-card-item.kora-card .cc-logo {
  background: #fff;
}

/* تبويبات الترتيب (المجموعات/الهدافون) */
.st-tabs {
  display: flex;
  gap: 8px;
}
.st-tab {
  flex: 1;
  padding: 9px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}
.st-tab.active { background: var(--grad-accent); color: #06241c; border-color: transparent; }

/* كتلة المجموعة */
.group-block {
  margin-bottom: 18px;
  animation: cardIn 0.4s ease backwards;
}
.group-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--accent);
  padding: 8px 12px;
  background: var(--surface);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  border: 1px solid var(--border);
  border-bottom: none;
}

/* شارة التأهل */
.qualified {
  display: block;
  font-size: 9.5px;
  color: var(--accent);
  font-weight: 700;
  margin-top: 1px;
}

/* قائمة الهدافين */
.scorers-list { display: flex; flex-direction: column; gap: 6px; }
.scorer-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  animation: cardIn 0.4s ease backwards;
}
.scorer-row .sc-pos {
  width: 22px;
  text-align: center;
  font-weight: 800;
  color: var(--text-mute);
  font-size: 12px;
}
.scorer-row .sc-img {
  width: 32px; height: 32px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface-2);
  flex-shrink: 0;
}
.scorer-row .sc-info { flex: 1; min-width: 0; }
.scorer-row .sc-name { font-size: 13px; font-weight: 700; display: block; }
.scorer-row .sc-team { font-size: 11px; color: var(--text-mute); }
.scorer-row .sc-goals { font-size: 13px; font-weight: 800; color: var(--accent); white-space: nowrap; display: inline-flex; align-items: center; gap: 3px; }
.scorer-row .sc-ball { width: 15px; height: 15px; }

/* أزرار الفيديو (ملخص المباراة) */
.video-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}
.video-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 18px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 700;
  text-align: center;
  transition: all 0.2s ease;
}
.video-btn:active { transform: scale(0.97); }
.video-btn:hover { border-color: var(--accent-2); background: var(--surface-2); }
.video-btn svg { width: 30px; height: 30px; color: var(--accent-2); }

/* زر فيديو الهدف في الأحداث */
.tl-video {
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  text-decoration: none;
  transition: transform 0.2s ease;
}
.tl-video:active { transform: scale(0.85); }
.tl-video svg { width: 26px; height: 26px; }

/* أزرار سريعة في تبويب آخر المباريات */
.form-quick-links {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.fql-btn {
  flex: 1;
  min-width: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 11px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
}
.fql-btn:active { transform: scale(0.96); }
.fql-btn:hover { border-color: var(--accent); background: var(--surface-2); }
.fql-btn svg { width: 18px; height: 18px; color: var(--accent); }

/* ============================================
   أيقونة تبويب "بث حي"
   ============================================ */
.md-tab .tab-ico { width: 16px; height: 16px; vertical-align: -3px; margin-left: 4px; }

/* ============================================
   قسم الأخبار / الفيديوهات / الإنتقالات (Hub)
   ============================================ */
.news-hub-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  position: sticky;
  top: 0;
  z-index: 5;
  padding: 4px 0;
}
.nh-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 12px 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--text-dim);
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.22s ease;
}
.nh-tab svg { width: 18px; height: 18px; flex-shrink: 0; }
.nh-tab:active { transform: scale(0.96); }
.nh-tab.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #06241c;
  border-color: transparent;
  box-shadow: 0 8px 20px -8px var(--accent);
}

/* --- الأخبار --- */
.news-big {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 16px;
  text-decoration: none;
  color: inherit;
  animation: fadeUp 0.4s both;
}
.news-big .nb-img { width: 100%; aspect-ratio: 16/9; overflow: hidden; background: var(--surface-2); }
.news-big .nb-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.news-big:active .nb-img img { transform: scale(1.03); }
.news-big .nb-img.no-img { display: none; }
.nb-body { padding: 14px 16px 16px; }
.nb-title { font-size: 16px; font-weight: 800; line-height: 1.5; color: var(--accent); }
.nb-lead { font-size: 13px; color: var(--text-dim); margin-top: 8px; line-height: 1.7; }

.news-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.news-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  animation: fadeUp 0.4s both;
}
.news-card .nc-img { width: 100%; aspect-ratio: 16/10; overflow: hidden; background: var(--surface-2); }
.news-card .nc-img img { width: 100%; height: 100%; object-fit: cover; }
.news-card .nc-img.no-img { background: linear-gradient(135deg, var(--surface-2), var(--surface)); }
.nc-body { padding: 10px 12px 12px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.nc-title { font-size: 13px; font-weight: 700; line-height: 1.55; color: var(--text); }

.nx-date {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-mute);
}
.nx-date .nx-clock { width: 13px; height: 13px; }

/* --- الفيديوهات --- */
.videos-grid { display: flex; flex-direction: column; gap: 14px; }
.video-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  animation: fadeUp 0.4s both;
}
.video-card .vc-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.video-card .vc-thumb img { width: 100%; height: 100%; object-fit: cover; }
.video-card .nv-play {
  position: absolute;
  width: 54px; height: 54px;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.5));
  transition: transform 0.25s cubic-bezier(0.34,1.56,0.64,1);
}
.video-card:active .nv-play { transform: scale(0.88); }
.video-card.no-thumb .vc-thumb,
.video-card .vc-thumb.no-thumb {
  background: linear-gradient(135deg, var(--surface-2), #0a0f1c);
}
.vc-source {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 10px;
  font-weight: 800;
  padding: 4px 9px;
  border-radius: 8px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  backdrop-filter: blur(6px);
}
.vc-source.fifa { background: #0a3d8f; }
.vc-source.twitter { background: #000; }
.vc-source.youtube { background: #ff0000; }
.vc-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 7px; }
.vc-title { font-size: 14px; font-weight: 700; line-height: 1.55; }

/* --- الإنتقالات --- */
.transfers-list { display: flex; flex-direction: column; gap: 10px; }
.transfer-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  animation: fadeUp 0.4s both;
  position: relative;
}
.transfer-card.featured {
  background: linear-gradient(135deg, rgba(124,77,255,0.14), var(--surface));
  border-color: rgba(124,77,255,0.3);
}
.tr-player { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.tr-pimg { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; background: var(--surface-2); flex-shrink: 0; }
.tr-pinfo { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tr-pname { font-size: 13.5px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tr-ppos { font-size: 11px; color: var(--text-mute); font-weight: 600; }
.tr-move { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.tr-club { width: 30px; height: 30px; object-fit: contain; flex-shrink: 0; }
.tr-arrow { display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--text-mute); }
.tr-arrow svg { width: 30px; height: 14px; transform: scaleX(-1); }
.tr-type {
  font-size: 10.5px; font-weight: 800;
  color: #06241c;
  background: var(--accent);
  padding: 3px 9px;
  border-radius: 20px;
  white-space: nowrap;
}
.tr-price { font-size: 11px; font-weight: 800; color: var(--accent); white-space: nowrap; }
.tr-date {
  position: absolute;
  bottom: 4px; left: 14px;
  font-size: 9.5px;
  color: var(--text-mute);
  font-weight: 700;
}

/* ============================================
   شاشة تفاصيل الخبر / الفيديو (داخل موقعنا)
   ============================================ */
.news-big, .news-card, .video-card { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.news-big:active, .news-card:active, .video-card:active { transform: scale(0.985); }

.article { margin-bottom: 8px; }
.article-img {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface-2);
  margin-bottom: 16px;
}
.article-img img { width: 100%; height: 100%; object-fit: cover; }
.article-title {
  font-size: 21px;
  font-weight: 900;
  line-height: 1.5;
  color: var(--text);
  margin-bottom: 12px;
}
.article-date {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-mute);
  margin-bottom: 18px;
}
.article-date svg { width: 15px; height: 15px; color: var(--accent); }
.article-body p {
  font-size: 15.5px;
  line-height: 2;
  color: var(--text-dim);
  margin-bottom: 16px;
}
.article-body p:first-child { color: var(--text); font-weight: 600; }

/* مشغّل الفيديو (يوتيوب) */
.video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
  margin-bottom: 16px;
}
.video-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.video-frame #ytPlayerHost { width: 100%; height: 100%; }
.video-detail-title { font-size: 18px; }

/* بديل عند منع التضمين */
.video-frame.video-blocked { display: grid; place-items: center; }
.video-frame .vf-thumb {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  filter: brightness(0.32) saturate(0.9);
}
.video-frame .vf-overlay {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 20px;
  text-align: center;
}
.video-frame .vf-yt { width: 54px; height: 54px; filter: drop-shadow(0 4px 12px rgba(0,0,0,0.5)); }
.video-frame .vf-overlay p { font-size: 13.5px; font-weight: 700; color: #fff; max-width: 280px; line-height: 1.6; }
.video-frame .vf-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 22px;
  background: #ff0000;
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  border-radius: 30px;
  text-decoration: none;
  transition: transform 0.2s ease;
}
.video-frame .vf-btn:active { transform: scale(0.95); }

/* ============================================
   زر إظهار المزيد
   ============================================ */
.show-more-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 16px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  color: var(--accent);
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.22s ease;
}
.show-more-btn:hover { background: var(--surface-2); }
.show-more-btn:active { transform: scale(0.98); }
.show-more-btn svg { width: 18px; height: 18px; }

/* ============================================
   صورة الكرة الحقيقية في الأحداث/الهدافين/التشكيلة
   ============================================ */
.tl-ico .ev-ball { width: 38px; height: 38px; object-fit: contain; display: block; }
.tl-ico .ev-ball-own,
.tl-ico .ev-ball-pen,
.tl-ico .ev-ball-off {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 38px; height: 38px;
}
.tl-ico .ev-ball-own .ev-ball,
.tl-ico .ev-ball-pen .ev-ball,
.tl-ico .ev-ball-off .ev-ball { width: 38px; height: 38px; object-fit: contain; }
/* هدف عكسي: حلقة حمراء حول الكرة */
.tl-ico .ev-ball-own { border-radius: 50%; box-shadow: 0 0 0 2px var(--live); }
/* ركلة جزاء: حرف P صغير */
.tl-ico .ev-ball-pen b {
  position: absolute;
  bottom: -3px; inset-inline-end: -3px;
  font-size: 8px; font-weight: 900;
  color: #06241c; background: var(--accent);
  width: 12px; height: 12px;
  display: grid; place-items: center;
  border-radius: 50%;
  line-height: 1;
}
/* هدف ملغي: خط أحمر مائل فوق الكرة */
.tl-ico .ev-ball-off::after {
  content: '';
  position: absolute;
  width: 26px; height: 2.4px;
  background: var(--live);
  transform: rotate(-45deg);
  border-radius: 2px;
}

/* الكرة بجانب عدد أهداف الهدافين */
.scorer-row .sc-ball { width: 16px; height: 16px; object-fit: contain; vertical-align: -3px; }

/* شارة الكرة على لاعب التشكيلة */
.pitch-player .badge-mini .badge-ball { width: 15px; height: 15px; object-fit: contain; filter: drop-shadow(0 1px 2px rgba(0,0,0,0.6)); }

/* ============================================
   شاشة البحث
   ============================================ */
.search-screen {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1);
}
.search-screen.open { transform: translateX(0); }

.search-topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  padding-top: calc(env(safe-area-inset-top) + 12px);
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
}
.search-input-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  padding: 0 12px;
  height: 44px;
}
.search-input-wrap .search-ico { width: 18px; height: 18px; color: var(--text-mute); flex-shrink: 0; }
.search-input-wrap input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  min-width: 0;
}
.search-input-wrap input::placeholder { color: var(--text-mute); font-weight: 500; }
.search-clear {
  display: none;
  place-items: center;
  width: 26px; height: 26px;
  background: var(--surface-2);
  border: none;
  border-radius: 50%;
  color: var(--text-dim);
  cursor: pointer;
  flex-shrink: 0;
}
.search-clear svg { width: 14px; height: 14px; }

.search-results {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 12px 14px 30px;
  max-width: 680px;
  margin: 0 auto;
  width: 100%;
}

.search-section-title {
  font-size: 12px;
  font-weight: 800;
  color: var(--accent);
  margin: 16px 4px 8px;
  letter-spacing: 0.3px;
}
.search-section-title:first-child { margin-top: 4px; }

.sr-item {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.18s ease;
  animation: fadeUp 0.3s both;
}
.sr-item:active { transform: scale(0.98); }
.sr-item:hover { border-color: var(--border-strong); background: var(--surface-2); }
.sr-logo { width: 30px; height: 30px; object-fit: contain; flex-shrink: 0; }
.sr-name { font-size: 14px; font-weight: 700; flex: 1; }
.sr-badge {
  font-size: 10px; font-weight: 800;
  color: var(--accent);
  background: rgba(0,229,160,0.12);
  padding: 3px 9px; border-radius: 20px;
}
.sr-meta-inline { font-size: 11px; color: var(--text-mute); font-weight: 600; }

.sr-teams {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  flex-wrap: wrap;
}
.sr-teams img { width: 22px; height: 22px; object-fit: contain; }
.sr-teams span { font-size: 13px; font-weight: 700; }
.sr-score { font-size: 13px; font-weight: 900; color: var(--text-dim); padding: 0 4px; }
.sr-score.live { color: var(--live); }
.sr-item .sr-meta { font-size: 11px; color: var(--text-mute); font-weight: 600; width: 100%; margin-top: 4px; }

.search-hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 60px 20px;
  text-align: center;
  color: var(--text-mute);
}
.search-hint svg { width: 48px; height: 48px; opacity: 0.4; }
.search-hint p { font-size: 15px; font-weight: 700; color: var(--text-dim); }
.search-hint-sub { font-size: 12.5px; color: var(--text-mute); }

/* ============================================
   شاشة التحميل (Loader)
   ============================================ */
.app-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
.app-loader.hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.loader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}
.loader-logo {
  width: 130px; height: 130px;
  display: grid;
  place-items: center;
  animation: loaderLogoPulse 1.8s ease-in-out infinite;
}
.loader-logo img { width: 100%; height: 100%; object-fit: contain; }
@keyframes loaderLogoPulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 6px 24px rgba(0,229,160,0.25)); }
  50% { transform: scale(1.07); filter: drop-shadow(0 8px 32px rgba(0,229,160,0.5)); }
}

/* نص التحميل بتأثير البلور */
.loading {
  font-family: "Cairo", sans-serif;
  font-weight: 900;
  font-size: 26px;
  text-align: center;
  color: #fff;
  letter-spacing: 1px;
  display: flex;
  gap: 12px;
  justify-content: center;
}
.loading span { display: inline-block; }
.loading02 span { animation: loading02 1.4s infinite alternate; }
.loading02 span:nth-child(1) { animation-delay: 0s; }
.loading02 span:nth-child(2) { animation-delay: 0.35s; }
@keyframes loading02 {
  0% { filter: blur(0); opacity: 1; }
  100% { filter: blur(5px); opacity: 0.2; }
}

/* لودر داخلي للصفحات (نفس شكل لودر البداية بحجم أصغر) */
.inline-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 70px 20px;
  min-height: 50vh;
}
.inline-loader .loader-logo {
  width: 90px; height: 90px;
  display: grid;
  place-items: center;
  animation: loaderLogoPulse 1.8s ease-in-out infinite;
}
.inline-loader .loader-logo img { width: 100%; height: 100%; object-fit: contain; }
.inline-loader .loading { font-size: 20px; }

/* ════════════════════════════════════════════════════════════════════════════
   تحسين الأداء على الهاتف (داخل WebView بالتطبيق + المتصفح المحمول)
   ────────────────────────────────────────────────────────────────────────────
   backdrop-filter (blur) وكرات الـ orb الضبابية المتحركة هي أثقل العناصر على
   معالج الموبايل وتسبب تقطّع التمرير. نستبدلها بخلفيات صلبة شبه شفافة ونوقف
   الأنيميشن المستمرة. الشكل يبقى قريباً جداً لكن الحركة تصير سلسة.
   ════════════════════════════════════════════════════════════════════════════ */
@media (max-width: 820px), (pointer: coarse) {
  /* أوقف كرات الخلفية الضبابية المتحركة (أثقل عنصر بصري) */
  .bg-orbs { display: none !important; }

  /* استبدل كل backdrop-filter بخلفية صلبة (بلا حساب بلور كل فريم) */
  .app-header {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: rgba(9, 13, 24, 0.97) !important;
  }
  .bottom-nav {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: rgba(9, 13, 24, 0.98) !important;
  }
  .match-card {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: var(--surface) !important;
    box-shadow: none !important;
  }
  .md-header, .vc-source, .sheet-overlay {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  .sheet-overlay { background: rgba(0,0,0,0.72) !important; }

  /* أوقف أنيميشن الدخول لكل بطاقة (تتراكم وتثقّل التمرير) */
  .league-group, .match-card, .md-section, .timeline-row, .pitch-player,
  .form-card, .group-block, .scorer-row, .channel-card-item, .news-big,
  .news-card, .video-card, .sr-item, .stat-row, .st-row {
    animation: none !important;
  }

  /* استبدل transition: all بـ transform فقط (الأرخص) على العناصر التفاعلية */
  .icon-btn, .date-chip, .tab, .league-header, .league-chevron, .md-tab,
  .src-btn, .ch-filter, .channel-card-item, .kora-ch, .st-tab, .video-btn,
  .fql-btn, .nh-tab, .show-more-btn, .sr-item, .nav-item, .odds-btn {
    transition: transform 0.15s ease, background-color 0.15s ease !important;
  }

  /* تمرير سلس بتسريع عتادي */
  body { -webkit-overflow-scrolling: touch; }
}
