/* SpaceGate Nova — application parity layer v3
   Mobile navigation values and icon treatment mirror the MAUI application source. */
:root {
  --sg-app-red: #f20716;
  --sg-app-bg: #050506;
  --sg-app-muted: #77777b;
  --sg-app-safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* Keep section tabs stable; hovering or selecting never changes their box metrics. */
.sg-content-nav,
.sg-app-category-strip,
.category-tabs,
.cinema-filter-scroll {
  scrollbar-width: none;
  overscroll-behavior-inline: contain;
}
.sg-content-nav::-webkit-scrollbar,
.sg-app-category-strip::-webkit-scrollbar,
.category-tabs::-webkit-scrollbar,
.cinema-filter-scroll::-webkit-scrollbar { display: none; }

.sg-content-nav > a,
.sg-app-category-strip > a,
.sg-app-category-strip > button,
.category-tabs > button,
.cinema-filter-scroll > button {
  box-sizing: border-box;
  transform: none !important;
  line-height: 1.2;
  font-variation-settings: normal;
}
.sg-content-nav > a:hover,
.sg-content-nav > a:focus-visible,
.sg-app-category-strip > a:hover,
.sg-app-category-strip > a:focus-visible,
.category-tabs > button:hover,
.category-tabs > button:focus-visible,
.cinema-filter-scroll > button:hover,
.cinema-filter-scroll > button:focus-visible {
  transform: none !important;
}

/* Complete application section directory. */
.sg-app-sections {
  padding: clamp(22px, 4vw, 46px) clamp(15px, 4vw, 54px);
  background: #050506;
}
.sg-app-sections__head {
  margin-bottom: 18px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}
.sg-app-sections__head small {
  display: block;
  margin-bottom: 4px;
  color: #77777b;
  font-size: .72rem;
  font-weight: 800;
}
.sg-app-sections__head h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(1.35rem, 3.3vw, 2.3rem);
  font-weight: 950;
}
.sg-app-sections__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.sg-app-section-card {
  position: relative;
  min-height: 126px;
  padding: 18px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 14px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.075);
  border-radius: 19px;
  background: linear-gradient(145deg, rgba(26,26,28,.96), rgba(10,10,11,.98));
  color: #fff;
  text-decoration: none;
  box-shadow: 0 14px 34px rgba(0,0,0,.24);
}
.sg-app-section-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 78% 12%, rgba(242,7,22,.14), transparent 42%);
}
.sg-app-section-card > span,
.sg-app-section-card > svg { position: relative; z-index: 1; }
.sg-app-section-card > span { min-width: 0; }
.sg-app-section-card strong,
.sg-app-section-card small { display: block; }
.sg-app-section-card strong { font-size: 1rem; font-weight: 900; }
.sg-app-section-card small { margin-top: 5px; color: #85858a; font-size: .68rem; line-height: 1.55; }
.sg-app-section-card svg { width: 31px; height: 31px; color: #f20716; flex: none; }
.sg-app-section-card:hover,
.sg-app-section-card:focus-visible {
  border-color: rgba(242,7,22,.36);
  background: linear-gradient(145deg, rgba(32,25,27,.98), rgba(10,10,11,.98));
}

/* All real provider categories — no artificial display limit. */
.sg-app-all-categories {
  padding: 10px clamp(15px, 4vw, 54px) 46px;
  background: #050506;
}
.sg-app-all-categories__group + .sg-app-all-categories__group { margin-top: 34px; }
.sg-app-all-categories__head {
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.sg-app-all-categories__head h2 { margin: 0; color: #fff; font-size: clamp(1.18rem, 2.6vw, 1.8rem); font-weight: 900; }
.sg-app-all-categories__head span { color: #77777b; font-size: .72rem; font-weight: 800; }
.sg-app-all-categories__grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}
.sg-app-category-card {
  min-height: 82px;
  padding: 14px;
  display: grid;
  align-content: center;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 15px;
  background: #151516;
  color: #fff;
  text-decoration: none;
}
.sg-app-category-card strong,
.sg-app-category-card small { display: block; }
.sg-app-category-card strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .78rem; font-weight: 850; }
.sg-app-category-card small { margin-top: 4px; color: #77777b; font-size: .62rem; }
.sg-app-category-card:hover,
.sg-app-category-card:focus-visible,
.sg-app-category-card.is-active {
  border-color: rgba(242,7,22,.52);
  background: #201719;
}

/* Exact mobile bottom navigation geometry from the application source. */
.bottom-nav.sg-app-bottom-nav { display: none; }
@media (max-width: 760px) {
  html { background: #000; }
  body {
    padding-bottom: calc(67px + var(--sg-app-safe-bottom)) !important;
  }
  .sg-shell,
  .main,
  #root,
  .sg3-footer {
    scroll-padding-bottom: calc(67px + var(--sg-app-safe-bottom));
  }
  .bottom-nav.sg-app-bottom-nav {
    position: fixed !important;
    z-index: 1200 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: calc(62px + var(--sg-app-safe-bottom)) !important;
    padding: 4px 1px var(--sg-app-safe-bottom) !important;
    display: flex !important;
    grid-template-columns: none !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    direction: rtl !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    background: rgba(5,5,6,.985) !important;
    border: 0 !important;
    border-top: 1px solid rgba(255,255,255,.025) !important;
    border-radius: 0 !important;
    box-shadow: 0 -10px 24px rgba(0,0,0,.5) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    scrollbar-width: none !important;
    overscroll-behavior-inline: contain;
  }
  .bottom-nav.sg-app-bottom-nav::-webkit-scrollbar { display: none !important; }
  .bottom-nav.sg-app-bottom-nav a {
    position: relative !important;
    flex: 1 0 57px !important;
    min-width: 57px !important;
    height: 100% !important;
    padding: 3px 3px 1px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 2px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: #77777b !important;
    text-decoration: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .bottom-nav.sg-app-bottom-nav a:nth-child(n) { display: flex !important; }
  .bottom-nav.sg-app-bottom-nav .nav-icon {
    width: auto !important;
    height: 22px !important;
    display: grid !important;
    place-items: center !important;
    transition: transform .15s ease !important;
  }
  .bottom-nav.sg-app-bottom-nav .oscar-icon {
    width: 23px !important;
    height: 23px !important;
    display: block !important;
    fill: none;
  }
  .bottom-nav.sg-app-bottom-nav b {
    margin: 0 !important;
    color: inherit !important;
    font-size: .54rem !important;
    line-height: 1 !important;
    font-weight: 600 !important;
    white-space: nowrap !important;
  }
  .bottom-nav.sg-app-bottom-nav a.active,
  .bottom-nav.sg-app-bottom-nav a[aria-current="page"] {
    color: #f20716 !important;
  }
  .bottom-nav.sg-app-bottom-nav a.active .nav-icon,
  .bottom-nav.sg-app-bottom-nav a[aria-current="page"] .nav-icon {
    transform: translateY(-1px) scale(1.08) !important;
    filter: drop-shadow(0 3px 8px rgba(242,7,22,.38)) !important;
  }
  .bottom-nav.sg-app-bottom-nav a.active b,
  .bottom-nav.sg-app-bottom-nav a[aria-current="page"] b {
    font-weight: 800 !important;
  }
  .bottom-nav.sg-app-bottom-nav a:active {
    transform: none !important;
    opacity: 1 !important;
  }
  .bottom-nav.sg-app-bottom-nav a:focus-visible {
    outline: 2px solid #f20716;
    outline-offset: -3px;
  }
  .toast,
  .toast-stack { bottom: calc(76px + var(--sg-app-safe-bottom)) !important; }
  .sg3-footer { padding-bottom: 18px; }
}

@media (max-width: 920px) {
  .sg-app-sections__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sg-app-all-categories__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .sg-app-sections { padding-inline: 15px; }
  .sg-app-sections__grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .sg-app-section-card { min-height: 98px; padding: 13px; border-radius: 15px; gap: 8px; }
  .sg-app-section-card strong { font-size: .78rem; }
  .sg-app-section-card small { font-size: .57rem; }
  .sg-app-section-card svg { width: 25px; height: 25px; }
  .sg-app-all-categories { padding-inline: 15px; }
  .sg-app-all-categories__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .sg-app-category-card { min-height: 70px; padding: 12px; }
}

@media (max-width: 760px) {
  body.sg-app-nav-hidden { padding-bottom: 0 !important; }
  body.sg-app-nav-hidden .bottom-nav.sg-app-bottom-nav { display: none !important; }
}
