* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }

body {
  min-height: 100dvh;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: #fff;
  background: #0a0a0a;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

img,
svg,
a {
  -webkit-user-drag: none;
}

input,
textarea,
select,
[contenteditable='true'] {
  -webkit-user-select: text;
  user-select: text;
}

.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.28) 0%, rgba(0, 0, 0, 0.12) 40%, rgba(0, 0, 0, 0.35) 100%),
    url("/assets/hero-stadium.jpg") center / cover no-repeat;
}

/* —— Header / nav —— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 12, 18, 0.82);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.top {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  margin: 0;
  padding: 0.7rem 1.35rem 0.7rem 0.65rem;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: #fff;
  margin-right: auto;
  margin-left: 0;
}

.mark {
  width: 40px;
  height: 40px;
  object-fit: contain;
  display: block;
}

.name {
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.nav-toggle {
  display: none;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
}
.nav-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 5px auto;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-open .nav-toggle span:nth-child(1),
.site-header.is-open .nav-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-open .nav-toggle span:nth-child(2),
.site-header.is-open .nav-toggle span:nth-child(2) {
  opacity: 0;
}
.nav-open .nav-toggle span:nth-child(3),
.site-header.is-open .nav-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  margin-left: auto;
  padding-right: 0.15rem;
}
.nav a {
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.55rem 0.85rem;
  border-radius: 8px;
  white-space: nowrap;
}
.nav a:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}
.nav a.active {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}
.nav a:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* —— Downloads: crisp SVG store badges —— */
.downloads {
  min-height: calc(100dvh - 72px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  width: 100%;
  padding: 1.5rem 1rem 3rem;
  margin: 0 auto;
  box-sizing: border-box;
}

.store-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  width: min(21rem, 92vw);
  min-height: 4.25rem;
  padding: 0.7rem 1.1rem;
  box-sizing: border-box;
  text-decoration: none;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0) 42%),
    #0a0a0a;
  border: 1.5px solid rgba(220, 220, 220, 0.92);
  border-radius: 0.85rem;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.12) inset,
    0 10px 28px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}
.store-badge:hover {
  transform: translateY(-2px);
  border-color: #fff;
  filter: brightness(1.06);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.16) inset,
    0 14px 32px rgba(0, 0, 0, 0.42);
}
.store-badge:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 4px;
}
.store-badge__icon {
  flex: 0 0 2.6rem;
  width: 2.6rem;
  height: 2.6rem;
  display: grid;
  place-items: center;
  box-sizing: border-box;
}
.store-badge__icon svg {
  width: 100%;
  height: 100%;
  display: block;
}
.store-badge__text {
  flex: 0 1 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0.2rem;
  min-width: 0;
  max-width: calc(100% - 3.4rem);
  box-sizing: border-box;
  text-align: left;
  line-height: 1.1;
}
.store-badge__text small {
  display: block;
  max-width: 100%;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: none;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.store-badge__text strong {
  display: block;
  max-width: 100%;
  font-size: 1.22rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* —— Contact page —— */
.page {
  min-height: calc(100dvh - 72px);
  display: grid;
  place-items: center;
  padding: 1.5rem 1rem 3rem;
}

.card {
  width: min(92vw, 460px);
  padding: 1.75rem 1.4rem;
  background: rgba(0, 0, 0, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  text-align: center;
  backdrop-filter: blur(8px);
}
.card h1 {
  margin: 0 0 0.65rem;
  font-size: clamp(1.6rem, 4vw, 2rem);
}
.card p {
  margin: 0 0 1.25rem;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.45;
  font-size: 1.02rem;
}
.mail-btn,
.wa-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 48px;
  padding: 0.7rem 1.2rem;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  background: #111;
  border: 2px solid #d0d0d0;
  border-radius: 10px;
}
.mail-btn:hover,
.wa-btn:hover {
  filter: brightness(1.1);
}
.wa-btn {
  background: #128c7e;
  border-color: #25d366;
}
.wa-btn__icon {
  flex: 0 0 auto;
  display: block;
}

/* —— Tablet / phone —— */
@media (max-width: 899px) {
  .nav-toggle {
    display: inline-block;
  }

  .site-header {
    position: sticky;
  }

  .top {
    position: relative;
    flex-wrap: nowrap;
    padding: 0.55rem 0.85rem 0.55rem 0.45rem;
    min-height: 56px;
  }

  .nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
    margin: 0;
    padding: 0.55rem 0.85rem 0.85rem;
    background: rgba(10, 12, 18, 0.96);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
    z-index: 60;
  }
  .site-header.is-open .nav,
  .nav-open .nav {
    display: flex;
  }
  .nav a {
    width: 100%;
    padding: 0.85rem 0.9rem;
    font-size: 1.05rem;
    border-radius: 10px;
  }

  .downloads {
    min-height: calc(100dvh - 56px);
    padding-top: 1rem;
    gap: 1rem;
  }
}

/* —— PC: downloads row (5 badges) —— */
@media (min-width: 900px) {
  .top {
    padding: 0.75rem 1.75rem 0.75rem 0.85rem;
  }

  .downloads {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-content: center;
    align-items: center;
    justify-content: center;
    justify-items: stretch;
    min-height: calc(100dvh - 72px);
    gap: 0.75rem;
    width: min(1180px, calc(100% - 2.5rem));
    margin-inline: auto;
    padding: 2rem 1.25rem;
  }
  .store-badge {
    width: 100%;
    min-height: 3.35rem;
    height: 3.35rem;
    padding: 0.4rem 0.55rem;
    gap: 0.45rem;
  }
  .store-badge__icon {
    flex-basis: 1.85rem;
    width: 1.85rem;
    height: 1.85rem;
  }
  .store-badge__icon svg {
    width: 100%;
    height: 100%;
  }
  .store-badge__text {
    max-width: calc(100% - 2.4rem);
    gap: 0.1rem;
  }
  .store-badge__text strong {
    font-size: 0.98rem;
  }
  .store-badge__text small {
    font-size: 0.58rem;
  }
}

@media (min-width: 1100px) {
  .downloads {
    width: min(1280px, calc(100% - 3rem));
    gap: 0.75rem;
  }
  .store-badge {
    min-height: 3.5rem;
    height: 3.5rem;
    padding: 0.45rem 0.65rem;
    gap: 0.5rem;
  }
  .store-badge__icon {
    flex-basis: 1.95rem;
    width: 1.95rem;
    height: 1.95rem;
  }
  .store-badge__icon svg {
    width: 100%;
    height: 100%;
  }
  .store-badge__text {
    max-width: calc(100% - 2.55rem);
  }
  .store-badge__text strong {
    font-size: 1.05rem;
  }
  .store-badge__text small {
    font-size: 0.6rem;
  }
}

@media (min-width: 1400px) {
  .downloads {
    width: min(1360px, calc(100% - 4rem));
    gap: 0.85rem;
  }
  .store-badge {
    min-height: 3.65rem;
    height: 3.65rem;
    padding: 0.45rem 0.75rem;
    gap: 0.55rem;
  }
  .store-badge__icon {
    flex-basis: 2.05rem;
    width: 2.05rem;
    height: 2.05rem;
  }
  .store-badge__icon svg {
    width: 100%;
    height: 100%;
  }
  .store-badge__text {
    max-width: calc(100% - 2.7rem);
  }
  .store-badge__text strong {
    font-size: 1.1rem;
  }
  .store-badge__text small {
    font-size: 0.64rem;
  }
}

/* —— Narrow desktop: 3 + 2 wrap so badges aren't crushed —— */
@media (min-width: 900px) and (max-width: 1099px) {
  .downloads {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    width: min(980px, calc(100% - 2rem));
  }
  .store-badge:nth-child(1) { grid-column: 1 / 3; }
  .store-badge:nth-child(2) { grid-column: 3 / 5; }
  .store-badge:nth-child(3) { grid-column: 5 / 7; }
  .store-badge:nth-child(4) { grid-column: 2 / 4; }
  .store-badge:nth-child(5) { grid-column: 4 / 6; }
}

/* —— Tablet mid: two-column downloads —— */
@media (min-width: 600px) and (max-width: 899px) {
  .downloads {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-content: center;
    align-items: center;
    justify-items: stretch;
    min-height: calc(100dvh - 56px);
    gap: 1rem;
    width: min(720px, calc(100% - 2rem));
    margin-inline: auto;
    padding: 1.5rem 1rem;
  }

  .store-badge {
    width: 100%;
    min-height: 4.4rem;
  }

  /* Last odd badge spans full width so 5th doesn't look orphaned */
  .store-badge:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    width: min(100%, 21rem);
    justify-self: center;
  }

  .page {
    width: min(720px, calc(100% - 2rem));
    margin-inline: auto;
  }

  .name {
    font-size: 1.25rem;
  }
}

/* —— Phone landscape marketing —— */
@media (orientation: landscape) and (max-height: 480px) {
  .downloads {
    min-height: auto;
    padding-top: 0.75rem;
    padding-bottom: 1.25rem;
    gap: 0.75rem;
  }

  .store-badge {
    min-height: 3.5rem;
    padding-block: 0.5rem;
  }
}

@media (max-width: 380px) {
  .store-badge {
    min-height: 4rem;
    padding: 0.6rem 0.9rem;
    gap: 0.55rem;
  }
  .store-badge__icon {
    flex-basis: 2.2rem;
    width: 2.2rem;
    height: 2.2rem;
  }
  .store-badge__icon svg {
    width: 100%;
    height: 100%;
  }
  .store-badge__text strong {
    font-size: 1.1rem;
  }
  .store-badge__text small {
    font-size: 0.68rem;
  }
}

/* —— Schedules —— */
.schedules-page {
  color: #fff;
}
.schedules-main {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 2px 0 2.5rem;
  position: relative;
}
.schedules-container,
.schedule-list {
  display: grid;
  gap: 0;
  width: auto;
  margin: 0 3px 3px;
}
/* ngx-ui-loader style (same as the3i) */
.ngx-overlay {
  display: none;
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(242, 236, 236, 0.9);
  cursor: progress;
  z-index: 99998;
}
.ngx-overlay.is-on {
  display: block;
}
.ngx-foreground-spinner {
  position: fixed;
  width: 60px;
  height: 60px;
  margin: 0;
  color: #172b4d;
}
.ngx-loading-text {
  position: fixed;
  margin: 0;
  color: #172b4d;
  font-family: sans-serif;
  font-size: 1.2em;
  font-weight: 400;
}
.ngx-background-spinner {
  display: none;
  position: fixed;
  width: 60px;
  height: 60px;
  margin: 0;
  color: #00acc1;
  opacity: 0.5;
  z-index: 99997;
}
.ngx-background-spinner.is-on {
  display: block;
}
.center-center {
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}
.bottom-center {
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
}
.bottom-right {
  bottom: 30px;
  right: 30px;
}
.sk-ball-spin-clockwise {
  position: relative;
  width: 100%;
  height: 100%;
  font-size: 0;
}
.sk-ball-spin-clockwise > div {
  box-sizing: border-box;
  position: absolute;
  display: inline-block;
  width: 25%;
  height: 25%;
  left: 50%;
  top: 50%;
  margin-left: -12.5%;
  margin-top: -12.5%;
  border: 0 solid;
  border-radius: 100%;
  background-color: currentColor;
  animation: ball-spin-clockwise 1s ease-in-out infinite;
}
.sk-ball-spin-clockwise > div:nth-child(1) { animation-delay: -0.875s; left: 50%; top: 5%; }
.sk-ball-spin-clockwise > div:nth-child(2) { animation-delay: -0.75s; left: 81.8198%; top: 18.1802%; }
.sk-ball-spin-clockwise > div:nth-child(3) { animation-delay: -0.625s; left: 95%; top: 50%; }
.sk-ball-spin-clockwise > div:nth-child(4) { animation-delay: -0.5s; left: 81.8198%; top: 81.8198%; }
.sk-ball-spin-clockwise > div:nth-child(5) { animation-delay: -0.375s; left: 50%; top: 95%; }
.sk-ball-spin-clockwise > div:nth-child(6) { animation-delay: -0.25s; left: 18.1802%; top: 81.8198%; }
.sk-ball-spin-clockwise > div:nth-child(7) { animation-delay: -0.125s; left: 5%; top: 50%; }
.sk-ball-spin-clockwise > div:nth-child(8) { animation-delay: 0s; left: 18.1804%; top: 18.1795%; }
@keyframes ball-spin-clockwise {
  0%, 100% { opacity: 1; transform: scale(1); }
  20% { opacity: 1; }
  80% { opacity: 0; transform: scale(0); }
}

.schedule-list .card,
.schedules-container .card {
  width: 100%;
  padding: 0;
  box-sizing: border-box;
  margin-bottom: 3px;
  overflow: hidden;
  box-shadow: 3px 3px 6px #d3d3d3;
  border-radius: 12px;
  color: #fff;
  border: none;
  display: block;
  background-clip: border-box;
  min-width: 0;
}
.schedule-list .card.black,
.schedules-container .card.black {
  background: #232526;
  background: linear-gradient(180deg, #414345, #232526);
}
.schedule-list .card.blue,
.schedules-container .card.blue {
  background: #000428;
  background: linear-gradient(180deg, #004e92, #000428);
}
.schedule-list .card.royal,
.schedules-container .card.royal {
  background: #141e30;
  background: linear-gradient(180deg, #243b55, #141e30);
}
.schedule-list .card.green,
.schedules-container .card.green {
  background: #093028;
  background: linear-gradient(0deg, #237a57, #093028);
}
.schedule-list .card.lawrenc,
.schedules-container .card.lawrenc {
  background: #0f0c29;
  background: linear-gradient(180deg, #24243e, #302b63, #0f0c29);
}

/* Exact ThirdEye component styles */
.series-name {
  margin: 0;
  padding: 14px 12px 4px;
  text-align: center;
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 1px;
  line-height: 1.35;
}

.schedule-list .card > .match-details:first-child,
.schedules-container .card > .match-details:first-child {
  padding-top: 14px;
}
.team-name {
  font-size: 16px;
  font-weight: 700;
}
.match-details {
  margin: 0 0 10px;
  padding: 0;
  text-align: center;
  font-size: 14px;
  color: #c8c3c3;
  font-weight: 500;
}

.team-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2px;
  padding: 12px 0;
  margin-bottom: 3px;
  color: #fff;
  position: relative;
}
.team-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  flex: 1;
}
.team-info.left {
  align-items: flex-start;
  padding-left: 12px;
  text-align: left;
}
.team-info.right {
  align-items: flex-end;
  padding-right: 12px;
  text-align: right;
}
.team-row .team-info img,
.team-logo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 6px #f2f2f2;
  display: block;
}
.vs-wrap {
  align-self: center;
  position: relative;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  z-index: 1;
}
.vs-img {
  width: 32px;
  height: auto;
  display: block;
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 50%;
}

.match-number {
  color: #f2f2f2;
  margin: 0 0 6px;
  font-size: 14px;
  text-align: center;
  font-weight: 600;
}
.countdown {
  font-size: 14px;
  text-align: center;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #fff;
  padding: 10px 20px;
  border-radius: 5px;
  background-color: rgba(185, 244, 245, 0.1);
}
.countdown.starting {
  text-transform: none;
  letter-spacing: 0.4px;
}
.countdown.starting i,
.countdown i {
  font-style: normal;
  font-weight: 700;
}
.red {
  color: red;
}

.schedule-status {
  margin: 1rem 0 0;
  text-align: center;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
}
.schedule-status.is-error {
  color: #ffb4b4;
}
.schedule-sentinel {
  height: 1px;
}

@media (max-width: 420px) {
  .series-name {
    font-size: 15px;
    letter-spacing: 0.6px;
  }
  .team-name {
    font-size: 14px;
  }
  .vs-img {
    width: 32px;
  }
}
