@font-face {
  font-family: "Geist";
  src: url("assets/geist-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  font-family: "Geist", Arial, sans-serif;
  color: #171717;
  background: #fff;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  min-width: 320px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}

body {
  width: 100vw;
  min-height: 100vh;
  overflow-x: hidden;
  background: #fff url("assets/bg-full.webp") center / cover no-repeat fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
svg {
  display: block;
}

img {
  max-width: 100%;
  height: auto;
}

.page-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.hero-wrap {
  display: flex;
  justify-content: center;
  width: 100%;
}

.hero {
  width: 50%;
  min-width: 24rem;
  margin-top: 1.5rem;
  margin-bottom: -0.5rem;
}

.link-grid {
  width: 80%;
  margin-top: -2.5rem;
  padding: 0.5rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  border-radius: 1rem;
  background: #fff;
  box-shadow: 4px 4px 6px rgb(0 0 0 / 60%);
}

.link-card {
  width: 100%;
  height: 100%;
  min-width: 0;
  padding: 0.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-around;
  border-radius: 0.75rem;
}

.link-card--1 {
  background: linear-gradient(to bottom, #f3fbf1, #f5d132);
}

.link-card--2 {
  background: linear-gradient(to bottom, #e6f8ed, #83fd10);
}

.link-card--3 {
  background: linear-gradient(to bottom, #eefafd, #1ebdfb);
}

.link-card--4 {
  background: linear-gradient(to bottom, #f1eef9, #f722d9);
}

.link-card--5 {
  background: linear-gradient(to bottom, #f3edf2, #fb1533);
}

.link-card--6 {
  background: linear-gradient(to bottom, #f6fcee, #fef61c);
}

.link-banner {
  width: 75%;
  min-height: 3rem;
  margin-top: -1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  text-align: center;
}

.link-banner--1 {
  background-image: url("assets/link-orange.webp");
}

.link-banner--2 {
  background-image: url("assets/link-green.webp");
}

.link-banner--3 {
  background-image: url("assets/link-blue.webp");
}

.link-banner--4 {
  background-image: url("assets/link-purple.webp");
}

.link-banner--5 {
  background-image: url("assets/link-red.webp");
}

.link-banner--6 {
  background-image: url("assets/link-yellow.webp");
}

.link-banner h1 {
  color: #fff;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.25rem;
  filter: drop-shadow(0 3px 3px rgb(0 0 0 / 12%));
}

.separator {
  width: 80%;
  max-width: 28rem;
  margin: 0.5rem auto;
  border-top: 2px dotted #1293ca;
}

.latency {
  color: #15803d;
  font-weight: 700;
}

.latency[data-range="medium"] {
  color: #1d4ed8;
}

.latency[data-range="slow"] {
  color: #a16207;
}

.latency[data-range="very-slow"] {
  color: #ef4444;
}

.play-button {
  padding: 0.25rem;
  border: 2px solid #0c4a6e;
  border-radius: 9999px;
  color: #0c4a6e;
  background: linear-gradient(to right, #bae6fd, #7dd3fc);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1rem;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.play-button:hover {
  filter: brightness(1.04);
}

.play-button:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
  box-shadow: 0 0 0 5px #0c4a6e;
}

.lotto-results {
  width: 80%;
  padding: 0.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  border-radius: 1.5rem;
  background: transparent;
}

.lottery-ball {
  display: none;
}

.result-card {
  width: 100%;
  height: 7.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  border: 1px solid #0ea5e9;
  border-top-left-radius: 2rem;
  border-bottom-right-radius: 2rem;
  background: linear-gradient(to bottom, #eefafd, #1ebdfb);
  box-shadow: 4px 4px 6px rgb(0 0 0 / 60%);
}

.result-main {
  padding: 0.5rem;
}

.result-row,
.latest-draw,
.next-draw,
.countdown {
  display: flex;
  align-items: center;
}

.result-row,
.next-draw {
  justify-content: space-between;
}

.result-row > img {
  width: 3rem;
  height: 3rem;
}

.winning-numbers {
  display: flex;
  justify-content: center;
  gap: 0.25rem;
}

.winning-number {
  width: 2.25rem;
  height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #01bce7;
  border-radius: 50%;
}

.winning-number span {
  width: 1.875rem;
  height: 1.875rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  background: #01bce7;
  font-weight: 700;
}

.latest-draw {
  justify-content: center;
  gap: 0.25rem;
  color: #334155;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1rem;
}

.next-draw {
  min-height: 3.125rem;
  padding: 0.5rem 1rem;
  border-bottom-right-radius: 2rem;
  color: #fff;
  background: rgb(129 140 248 / 30%);
  font-size: 0.75rem;
  line-height: 1rem;
}

.countdown {
  gap: 0.25rem;
}

.countdown svg {
  width: 0.9375rem;
  height: 0.9375rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (min-width: 40rem) {
  .link-grid {
    padding: 1.5rem;
  }

  .play-button {
    padding-inline: 0.5rem;
  }

  .lotto-results {
    height: 12.5rem;
    flex-wrap: nowrap;
  }

  .result-card {
    width: 50%;
    height: 9.375rem;
  }
}

@media (min-width: 48rem) {
  .hero {
    width: 55%;
    margin-top: 6rem;
  }

  .link-grid {
    width: 90%;
    height: 11.25rem;
    margin-top: -3rem;
    display: flex;
    align-items: center;
    justify-content: space-around;
    background: transparent;
    box-shadow: none;
  }

  .link-card {
    width: 25%;
    padding: 0.5rem;
    justify-content: center;
  }

  .link-banner {
    width: 80%;
    margin-top: -1.875rem;
  }

  .separator {
    margin-block: 0.5rem;
  }

  .lotto-results {
    margin-top: -1rem;
    padding: 1.5rem;
    background: #e6f4fe;
  }

  .lottery-ball {
    width: 7.5rem;
    height: 7.5rem;
    display: block;
    flex: 0 0 auto;
  }

  .result-main {
    padding: 1rem;
  }
}

@media (min-width: 64rem) {
  .hero {
    width: 50%;
    margin-bottom: -1rem;
  }

  .link-banner {
    width: 70%;
    margin-top: -1.5625rem;
  }

  .link-banner h1 {
    font-size: 1.25rem;
    line-height: 1.75rem;
  }

  .lottery-ball {
    width: 9rem;
    height: 9rem;
  }

  .result-main {
    padding: 0.5rem;
  }

  .result-row > img {
    width: 4rem;
    height: 4rem;
  }

  .winning-number {
    width: 2.875rem;
    height: 2.875rem;
  }

  .winning-number span {
    width: 2.5rem;
    height: 2.5rem;
  }

  .latest-draw,
  .next-draw {
    font-size: 0.875rem;
    line-height: 1.25rem;
  }
}

@media (min-width: 80rem) {
  .hero {
    width: 40%;
  }

  .link-banner {
    width: 60%;
  }

  .play-button {
    font-size: 1.125rem;
    line-height: 1.75rem;
  }

  .lottery-ball {
    width: 12rem;
    height: 12rem;
  }
}

@media (min-width: 96rem) {
  .hero {
    width: 35%;
  }

  .link-banner {
    width: 55%;
  }

  .lotto-results {
    padding: 6rem;
  }
}

@media (max-width: 47.9375rem) {
  body {
    background-image: url("assets/bg-mobile.webp");
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
