@font-face {
  font-family: "NeoSansArabic";
  src: url("../fonts/NeoSansArabic.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
}

:root {
  --main-color: #00a878;
  --body-bg: #f7f7f7;
  --header-bg: #fff;
  --header-color: #151515;
  --logo-bg: #f1f1f1;
  --logo-color: #151515;
  --site-name-color: #000;
  --light-color: #fff;
  --dark-color: #151515;
  --gray-1: #f4f4f4;
  --gray-2: #e2e2e2;
  --gray-3: #ededed;
  --copy-bg: #f7f7f7;
  --copy-color: #151515;
  --theme-shadow: rgba(0, 0, 0, 0.3);
  --theme-radius: 8px;
  --font-type: "NeoSansArabic", "Segoe UI", sans-serif;
}

html[data-theme="dark"] {
  --body-bg: #000;
  --header-bg: #191919;
  --header-color: #fff;
  --light-color: #1d1d1d;
  --dark-color: #000;
  --gray-1: #1d1d1d;
  --gray-2: #333;
  --gray-3: #242424;
  --copy-bg: #000;
  --copy-color: #fff;
  --site-name-color: #fff;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background: var(--body-bg);
  color: var(--header-color);
  font-family: var(--font-type);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

a,
button {
  -webkit-tap-highlight-color: transparent;
}

button,
input,
select,
textarea {
  font: inherit;
}

.screen-reader,
.site-icon-sprite {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(1px, 1px, 1px, 1px) !important;
}

#mg-header {
  position: relative;
  margin-bottom: 15px;
  border-top: 0;
  z-index: 2000;
}

#mg-header .HdrInner {
  width: 100%;
  background: var(--header-bg);
  box-shadow: 0 0 4px var(--theme-shadow);
}

.site-chrome-container {
  width: min(calc(100% - 24px), 1024px);
  max-width: 1024px;
  min-height: 85px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 20px;
}

.mg-logo {
  width: var(--mg_theme-logo-width, 200px);
  max-width: min(var(--mg_theme-logo-width, 200px), 45vw);
  margin-block: 8px;
  padding: 5px;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: var(--theme-radius);
  background: var(--logo-bg);
  transform: translateX(var(--mg_theme-logo-offset-x, 0px));
}

.mg-logo a {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.mg-logo.site-url-hidden {
  align-self: stretch;
  display: flex;
  align-items: center;
}

.mg-logo.site-url-hidden a {
  width: 100%;
  height: 100%;
}

.mg-logo.imagelogo a {
  width: 100%;
  display: block;
}

.mg-logo.imagelogo img {
  width: 100%;
  height: auto;
  max-height: 69px;
  display: block;
  object-fit: contain;
}

.mg-logo span {
  display: block;
  min-height: 4px;
  color: var(--logo-color);
  text-align: center;
  line-height: 33px;
}

.mg-logo .SiteName {
  font-size: var(--mg_theme-site-name-size, 30px);
  color: var(--site-name-color);
  transform: scaleX(var(--mg_theme-site-name-width, 1));
  transform-origin: center;
}

.mg-logo .SiteUrl {
  font-size: var(--mg_theme-site-url-size, 19px);
}

.mg-main-nav {
  min-width: 0;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 15px;
}

.MainMenu,
.mg-social {
  margin: 0;
  padding: 0;
  list-style: none;
}

.MainMenu {
  flex: 1;
  display: flex;
  align-items: center;
}

.MainMenu a {
  display: block;
  padding: 8px;
  color: var(--header-color);
  font-size: 17px;
  white-space: nowrap;
}

.MainMenu a:hover {
  color: var(--main-color);
}

.mg-social {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-inline-start: auto;
  direction: ltr;
  flex-direction: row;
}

.mg-social.icons-ltr {
  flex-direction: row-reverse;
}

.mg-social li {
  position: relative;
}

.mg-social .moon {
  transform: translateX(var(--mg_theme-theme-offset-x, 0px));
}

.mg-social .mgt-header-search-item {
  transform: translateX(var(--mg_theme-search-offset-x, 0px));
}

.mg-social .mgt-live-filter-item {
  transform: translateX(var(--mg_theme-clock-offset-x, 0px));
}

.hed-btn {
  width: var(--mg_theme-header-button-size, 35px);
  height: var(--mg_theme-header-button-size, 35px);
  padding: 0;
  border: 0;
  border-radius: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: transparent;
  color: var(--header-color);
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}

.hed-btn:hover,
.hed-btn:focus,
.hed-btn:active,
.hed-btn:focus-visible {
  opacity: 0.82;
  outline: 0!important;
  background: transparent!important;
  box-shadow: none!important;
}

.hed-btn .icon {
  width: var(--mg_theme-header-icon-size, 22px);
  height: var(--mg_theme-header-icon-size, 22px);
  color: currentColor;
  pointer-events: none;
}

.mg-social .moon .icon {
  width: var(--mg_theme-theme-icon-size, var(--mg_theme-header-icon-size, 22px));
  height: var(--mg_theme-theme-icon-size, var(--mg_theme-header-icon-size, 22px));
}

.mg-social .mgt-header-search-item .icon,
.mgt-desktop-search button svg {
  width: var(--mg_theme-search-icon-size, var(--mg_theme-header-icon-size, 22px));
  height: var(--mg_theme-search-icon-size, var(--mg_theme-header-icon-size, 22px));
}

.mg-social .mgt-live-filter-item .icon {
  width: var(--mg_theme-clock-icon-size, var(--mg_theme-header-icon-size, 22px));
  height: var(--mg_theme-clock-icon-size, var(--mg_theme-header-icon-size, 22px));
}

.mg-social .twitter .hed-btn {
  background: #000;
}

.mg-social .facebook .hed-btn {
  background: #1877f2;
}

.mg-social .youtube .hed-btn {
  background: #cd201f;
}

.mg-social .telegram .hed-btn {
  background: #24a1de;
}

.language-toggle {
  background: var(--dark-color);
}

.language-menu-list {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 2300;
  display: none;
  min-width: 155px;
  padding: 6px;
  border: 1px solid var(--gray-2);
  border-radius: var(--theme-radius);
  background: var(--light-color);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.2);
  direction: rtl;
}

[dir="ltr"] .language-menu-list {
  right: 0;
  left: auto;
}

.language-control.open .language-menu-list {
  display: grid;
  gap: 4px;
}

.language-menu-item {
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--header-color);
  cursor: pointer;
  text-align: right;
  white-space: nowrap;
}

.language-menu-item:hover,
.language-menu-item:focus-visible {
  background: var(--main-color);
  color: #fff;
  outline: none;
}

html:not([data-theme="dark"]) .sun,
html[data-theme="dark"] .mon {
  display: none;
}

.site-footer {
  width: 100%;
  margin-top: 15px;
  padding: 26px 52px;
  box-shadow: 0 0 4px var(--theme-shadow);
  background: var(--copy-bg);
  color: var(--copy-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 13px;
}

.footer-brand {
  color: var(--copy-color);
  font-size: 14px;
  font-weight: 800;
}

.site-footer p {
  margin: 0;
}

.footer-links-group {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  min-width: 0;
}

.footer-links-group .footer-navigation {
  position: relative;
  padding-inline-start: 14px;
}

.footer-links-group .footer-navigation::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 50%;
  width: 1px;
  height: 18px;
  background: currentColor;
  opacity: 0.25;
  transform: translateY(-50%);
}

.footer-navigation {
  min-width: 0;
}

.footer-menu {
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 16px;
  list-style: none;
}

.footer-menu li {
  margin: 0;
  padding: 0;
}

.footer-menu a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  color: var(--copy-color);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.footer-menu a:hover,
.footer-menu a:focus-visible {
  color: var(--main-color);
  outline: none;
}

.footer-social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  direction: ltr;
}

.footer-social a {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: #fff;
}

.footer-social .icon {
  width: 20px;
  height: 20px;
}

.footer-social .twitter a {
  background: #000;
}
.footer-social .facebook a {
  background: #1877f2;
}
.footer-social .youtube a {
  background: #cd201f;
}
.footer-social .telegram a {
  background: #24a1de;
}

@media (max-width: 768px) {
  #mg-header {
    margin-bottom: 10px;
  }

  .site-chrome-container {
    width: min(100% - 16px, 1024px);
    max-width: 1024px;
    min-height: 65px;
    gap: 8px;
  }

  .mg-logo {
    margin-block: 6px;
    padding: 3px;
  }

  .mg-logo.imagelogo img {
    max-height: 53px;
  }

  .mg-logo .SiteName {
    line-height: 25px;
  }

  .mg-logo .SiteUrl {
    line-height: 18px;
  }

  .mg-main-nav {
    justify-content: flex-end;
  }

  .MainMenu {
    display: none;
  }

  .mg-social {
    gap: 4px;
  }

  .site-footer {
    padding-inline: 16px;
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
  }

  .site-footer p {
    flex-basis: 100%;
  }

  .footer-menu {
    width: 100%;
  }

  .footer-links-group {
    justify-content: center;
    flex-wrap: wrap;
  }

  .footer-navigation {
    flex-basis: auto;
  }
}

@media (max-width: 430px) {
  .site-chrome-container {
    width: calc(100% - 10px);
    gap: 5px;
  }

  .mg-social {
    gap: 3px;
  }

  .hed-btn {
    border-radius: 6px;
  }
}

/* MatchGrid 1.0.3: left-aligned transparent header actions and stable local search. */
.mg-header-actions {
  flex: 0 0 auto;
  margin: 0;
  margin-right: auto;
  margin-left: 0;
  direction: ltr;
  flex-direction: row;
}

.mg-header-actions .mgt-header-search-item {
  display: flex;
  align-items: center;
}

.mgt-desktop-search {
  width: clamp(180px, 23vw, 270px);
  height: var(--mg_theme-header-button-size, 35px);
  padding-inline: 10px 13px;
  border: 1px solid transparent;
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--gray-1);
  color: var(--header-color);
}

.mgt-desktop-search:focus-within {
  border-color: var(--main-color);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--main-color) 22%, transparent);
}

.mgt-desktop-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: right;
}

.mgt-desktop-search input::-webkit-search-cancel-button { display: none; }
.mgt-desktop-search button {
  width: 23px;
  height: 23px;
  padding: 0;
  border: 0;
  display: grid;
  place-items: center;
  background: transparent;
  color: inherit;
  cursor: pointer;
  transform: translateX(var(--mg_theme-search-offset-x, 0px));
  -webkit-tap-highlight-color: transparent;
}
.mgt-mobile-search-button { display: none; }

.mgt-live-filter-item .hed-btn[aria-pressed="true"] {
  background: transparent;
  box-shadow: none;
  color: var(--main-color);
}

@media (min-width: 769px) {
  #mg-header {
    position: sticky;
    top: 0;
  }
  .mg-header-actions .moon { order: 1; }
  .mg-header-actions .mgt-live-filter-item { order: 2; }
  .mg-header-actions .mgt-header-search-item { display: none; }
}

.mgt-search-layer {
  position: fixed;
  z-index: 12000;
  top: 85px;
  right: 0;
  bottom: 0;
  left: 0;
  pointer-events: none;
}
.mgt-search-layer[hidden] { display: none!important; }
.mgt-search-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: rgba(0,0,0,.28);
  pointer-events: auto;
}
.mgt-search-dialog {
  position: relative;
  width: min(680px, calc(100% - 24px));
  max-height: min(690px, calc(100vh - 110px));
  margin: 8px auto 0;
  overflow: hidden;
  border: 1px solid var(--gray-2);
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  background: var(--light-color);
  color: var(--header-color);
  box-shadow: 0 18px 60px rgba(0,0,0,.28);
  pointer-events: auto;
  direction: rtl;
}
.mgt-search-dialog>.mgt-search-form { display: none; }
.mgt-search-form {
  min-height: 64px;
  padding: 10px 14px;
  display: grid;
  grid-template-columns: 38px minmax(0,1fr) 38px;
  gap: 8px;
  align-items: center;
  border-bottom: 1px solid var(--gray-2);
}
.mgt-search-form input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 18px;
  text-align: right;
}
.mgt-search-form input::-webkit-search-cancel-button { display: none; }
.mgt-search-form button {
  width: 38px;
  height: 38px;
  padding: 7px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: transparent;
  color: inherit;
  cursor: pointer;
}
.mgt-search-form button:hover,.mgt-search-form button:focus-visible { background: var(--gray-1); }
.mgt-search-form svg { width: 24px; height: 24px; }
.mgt-search-tabs {
  padding: 12px 14px;
  border-bottom: 1px solid var(--gray-2);
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 9px;
}
.mgt-search-tabs[hidden] { display: none!important; }
.mgt-search-tabs button {
  min-height: 40px;
  padding: 5px 10px;
  border: 0;
  border-radius: 999px;
  background: var(--gray-1);
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.mgt-search-tabs button.is-active { background: var(--header-color); color: var(--light-color); }
.mgt-search-status { padding: 18px; text-align: center; opacity: .72; }
.mgt-search-status:empty { display: none; }
.mgt-search-results { overflow: auto; overscroll-behavior: contain; }
.mgt-search-result {
  min-height: 72px;
  padding: 10px 17px;
  border-bottom: 1px solid var(--gray-2);
  display: grid;
  grid-template-columns: 50px minmax(0,1fr);
  gap: 13px;
  align-items: center;
  color: inherit;
}
.mgt-search-result:last-child { border-bottom: 0; }
.mgt-search-result[href]:hover,.mgt-search-result[href]:focus-visible { background: var(--gray-1); }
.mgt-search-result-logo { width: 50px; min-height: 44px; display: grid; place-items: center; }
.mgt-search-result-logo>img,.mgt-search-result-logo>picture,.mgt-search-result-logo>picture img { width: 42px!important; height: 42px!important; object-fit: contain; }
.mgt-search-match-logos { display: flex; align-items: center; justify-content: center; direction: rtl; }
.mgt-search-match-logos img { width: 30px!important; height: 30px!important; object-fit: contain; }
.mgt-search-match-logos img+img { margin-inline-start: -8px; }
.mgt-search-result-copy { min-width: 0; display: grid; gap: 4px; }
.mgt-search-result-copy strong { font-size: 16px; line-height: 1.45; }
.mgt-search-result-copy small { opacity: .64; font-size: 12.5px; line-height: 1.4; }
.mgt-search-result[hidden] { display: none!important; }
.mgt-live-filter-empty { margin: 14px 0; padding: 24px 12px; text-align: center; border-radius: var(--theme-radius); background: var(--light-color); }
.mgt-live-filter-empty[hidden],.mg-champ-schedule[hidden],.mg-match[hidden],.mg-schedule-match[hidden] { display: none!important; }
body.mgt-search-open { overflow: hidden; }

/* Compact desktop results: keep the mobile sizing rules independent below. */
@media (min-width: 769px) {
  .mgt-search-dialog {
    width: min(620px, calc(100% - 32px));
    max-height: min(570px, calc(100vh - 110px));
    border-radius: 16px;
  }
  .mgt-search-tabs {
    padding: 9px 12px;
    gap: 7px;
  }
  .mgt-search-tabs button {
    min-height: 34px;
    padding: 4px 8px;
    font-size: 14px;
  }
  .mgt-search-status {
    padding: 13px;
    font-size: 13px;
  }
  .mgt-search-result {
    min-height: 54px;
    padding: 6px 14px;
    grid-template-columns: 38px minmax(0,1fr);
    gap: 10px;
  }
  .mgt-search-result-logo {
    width: 38px;
    min-height: 34px;
  }
  .mgt-search-result-logo>img,
  .mgt-search-result-logo>picture,
  .mgt-search-result-logo>picture img {
    width: 32px!important;
    height: 32px!important;
  }
  .mgt-search-match-logos img {
    width: 23px!important;
    height: 23px!important;
  }
  .mgt-search-match-logos img+img { margin-inline-start: -6px; }
  .mgt-search-result-copy { gap: 2px; }
  .mgt-search-result-copy strong {
    font-size: 14px;
    line-height: 1.35;
  }
  .mgt-search-result-copy small {
    font-size: 11.5px;
    line-height: 1.3;
  }
}

@media (max-width: 768px) {
  .mg-header-actions {
    gap: 4px;
    direction: ltr;
    flex-direction: row;
  }
  .mg-header-actions .moon { order: 1; }
  .mg-header-actions .mgt-live-filter-item { order: 2; }
  .mg-header-actions .mgt-header-search-item { order: 3; }
  .mgt-desktop-search { display: none; }
  .mgt-mobile-search-button { display: inline-flex; }
  .mg-header-actions .hed-btn { width: var(--mg_theme-header-button-size, 34px); height: var(--mg_theme-header-button-size, 34px); }
  .mgt-search-backdrop { background: rgba(0,0,0,.58); }
  .mgt-search-layer { inset: 0; }
  .mgt-search-dialog {
    width: calc(100% - 20px);
    height: min(720px, calc(100dvh - 36px));
    max-height: calc(100dvh - 36px);
    margin: 18px auto;
    border-radius: 18px;
  }
  .mgt-search-dialog>.mgt-search-form { display: grid; }
  .mgt-search-form {
    min-height: 59px;
    padding: 9px 10px;
    grid-template-columns: 32px minmax(0,1fr) 32px;
    gap: 6px;
  }
  .mgt-search-form input { font-size: 16px; }
  .mgt-search-form button { width: 32px; height: 32px; padding: 6px; }
  .mgt-search-form svg { width: 19px; height: 19px; }
  .mgt-search-tabs { padding: 9px 8px; gap: 6px; }
  .mgt-search-tabs button { min-height: 34px; padding-inline: 4px; font-size: 13px; }
  .mgt-search-status { padding: 14px; font-size: 13px; }
  .mgt-search-result {
    min-height: 62px;
    padding: 8px 10px;
    grid-template-columns: 40px minmax(0,1fr);
    gap: 10px;
  }
  .mgt-search-result-logo { width: 40px; min-height: 35px; }
  .mgt-search-result-logo>img,
  .mgt-search-result-logo>picture,
  .mgt-search-result-logo>picture img { width: 34px!important; height: 34px!important; }
  .mgt-search-match-logos img { width: 24px!important; height: 24px!important; }
  .mgt-search-match-logos img+img { margin-inline-start: -6px; }
  .mgt-search-result-copy { gap: 3px; }
  .mgt-search-result-copy strong { font-size: 14px; line-height: 1.4; }
  .mgt-search-result-copy small { font-size: 11.5px; line-height: 1.35; }
}

@media (max-width: 430px) {
  .mg-header-actions .hed-btn { width: var(--mg_theme-header-button-size, 29px); height: var(--mg_theme-header-button-size, 29px); }
  .mg-logo { max-width: calc(100vw - 122px); }
}
