:root {
  --card-blue: #374979;
  --panel-blue: #192f3f;
  --ball-blue: #739bff;
  --soft-sky: #dff6ff;
  --orange: #ff8a00;
  --green: #00a83b;
  --text-dark: #1f2937;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
  color: #ffffff;
  background-color: #33d5df;
  background-image: url("bg-2d777.webp");
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  background-attachment: fixed;
  font-family: Arial, Helvetica, sans-serif;
}

img,
svg {
  display: block;
}

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

.page-shell {
  width: 100%;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 48px 16px 44px;
}

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

.hero-art {
  width: clamp(360px, 50vw, 820px);
  max-width: 92vw;
  height: auto;
  margin-bottom: -20px;
}

.lottery-title {
  width: min(85vw, 800px);
  height: clamp(54px, 5vw, 80px);
  display: flex;
  align-items: center;
  justify-content: center;
  background-image: url("lotto-title.webp");
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}

.lottery-title h1 {
  margin: 0;
  color: var(--text-dark);
  font-size: clamp(18px, 1.65vw, 32px);
  font-weight: 800;
  line-height: 1;
  text-align: center;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.45);
}

.results-grid {
  width: min(90vw, 1024px);
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: -12px;
}

.lotto-card {
  width: 100%;
  min-width: 0;
  height: 150px;
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  background: var(--card-blue);
  border-radius: 32px 0 32px 0;
  box-shadow: 4px 4px 7px rgba(0, 0, 0, 0.55);
}

.lotto-card__main {
  padding: 14px 18px 8px;
}

.lotto-card__topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.lotto-card__brand {
  display: flex;
  align-items: center;
  min-width: 128px;
}

.lotto-card__brand img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  flex: 0 0 auto;
}

.lotto-card__brand h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.1;
  white-space: nowrap;
}

.number-row {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.number-ball {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid var(--ball-blue);
  border-radius: 50%;
}

.number-ball span {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: var(--ball-blue);
  border-radius: 50%;
  font-size: 17px;
  font-weight: 800;
  line-height: 1;
}

.draw-line {
  display: flex;
  justify-content: center;
  gap: 5px;
  margin: 4px 0 0;
  color: #ffffff;
  font-size: 14px;
  line-height: 1.2;
}

.draw-line strong,
.next-draw strong {
  color: #ffffff;
  font-weight: 700;
}

.lotto-card__footer {
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 18px;
  background: rgba(129, 140, 248, 0.32);
  border-radius: 0 0 32px 0;
}

.countdown-line,
.next-draw {
  margin: 0;
  display: flex;
  align-items: center;
  white-space: nowrap;
}

.countdown-line {
  gap: 4px;
  color: var(--orange);
  font-size: 14px;
  font-weight: 700;
}

.countdown-line svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.next-draw {
  color: #b9beca;
  font-size: 12px;
  gap: 4px;
}

.links-panel {
  width: min(65vw, 1330px);
  min-height: 200px;
  display: flex;
  align-items: stretch;
  justify-content: space-around;
  gap: 16px;
  margin-top: 16px;
  padding: 24px;
  background: rgba(223, 246, 255, 0.95);
  border-radius: 14px;
}

.play-card {
  min-width: 0;
  height: auto;
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px 8px;
  background: var(--panel-blue);
  border-radius: 9px;
  color: #ffffff;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease;
}

.play-card:hover,
.play-card:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.24);
}

.play-card:focus-visible {
  outline: 3px solid #8bdcff;
  outline-offset: 3px;
}

.play-card__title {
  font-size: 18px;
  font-weight: 800;
  white-space: nowrap;
}

.play-card__divider {
  width: 100%;
  height: 1px;
  background: rgba(255, 255, 255, 0.75);
}

.play-card__speed {
  color: var(--green);
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}

.play-card__speed.is-medium {
  color: #1d4ed8;
}

.play-card__speed.is-slow {
  color: var(--orange);
}

.play-card__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 5px 13px;
  color: #075985;
  background: linear-gradient(90deg, #bae6fd, #7dd3fc);
  border-radius: 999px;
  font-size: 14px;
  line-height: 1;
  white-space: nowrap;
}

@media (max-width: 1100px) {
  .links-panel,
  .results-grid {
    width: min(90vw, 1024px);
  }
}

@media (max-width: 767px) {
  .page-shell {
    justify-content: flex-start;
    gap: 14px;
    padding: 86px 16px 90px;
  }

  .hero-art {
    width: min(76vw, 560px);
    min-width: 360px;
    margin-bottom: -12px;
  }

  .lottery-title {
    width: min(76vw, 520px);
    height: 50px;
  }

  .lottery-title h1 {
    font-size: 18px;
  }

  .results-grid {
    width: min(92vw, 650px);
    gap: 16px;
    margin-top: 0;
  }

  .lotto-card {
    height: 150px;
  }

  .lotto-card__main {
    padding: 12px 12px 6px;
  }

  .lotto-card__brand {
    min-width: 120px;
  }

  .lotto-card__brand img {
    width: 56px;
    height: 56px;
  }

  .lotto-card__brand h2 {
    font-size: 16px;
  }

  .number-ball {
    width: 43px;
    height: 43px;
  }

  .number-ball span {
    width: 37px;
    height: 37px;
  }

  .draw-line {
    font-size: 14px;
  }

  .lotto-card__footer {
    padding: 12px;
  }

  .links-panel {
    width: min(88vw, 604px);
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 26px;
    padding: 10px;
    background: var(--panel-blue);
    border-radius: 11px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  }

  .play-card {
    min-height: 44px;
    display: grid;
    grid-template-columns: minmax(90px, 1fr) 1px minmax(92px, 1fr) 1px minmax(
        112px,
        1fr
      );
    gap: 12px;
    padding: 6px 8px;
    border-radius: 0;
    background: transparent;
  }

  .play-card:first-child {
    border-radius: 9px 9px 0 0;
  }

  .play-card:last-child {
    border-radius: 0 0 9px 9px;
  }

  .play-card + .play-card {
    border-top: 1px solid rgba(255, 255, 255, 0.75);
  }

  .play-card:hover,
  .play-card:focus-visible {
    transform: none;
    box-shadow: none;
    background: rgba(255, 255, 255, 0.04);
  }

  .play-card__title,
  .play-card__speed,
  .play-card__button {
    justify-self: center;
  }

  .play-card__title {
    font-size: 14px;
  }

  .play-card__divider {
    width: 1px;
    height: 30px;
  }
}

@media (max-width: 639px) {
  .page-shell {
    padding-top: 46px;
  }

  .hero-art {
    width: 92vw;
    min-width: 0;
  }

  .lottery-title {
    width: 86vw;
  }

  .results-grid {
    width: 90vw;
    flex-direction: column;
    align-items: stretch;
  }

  .lotto-card {
    flex: 0 0 132px;
    height: 132px;
  }

  .links-panel {
    width: 90vw;
    margin-top: 14px;
  }

  .play-card {
    grid-template-columns: minmax(66px, 1fr) 1px minmax(74px, 1fr) 1px minmax(
        96px,
        1fr
      );
    gap: 8px;
  }

  .play-card__button {
    padding-inline: 10px;
    font-size: 13px;
  }
}

@media (max-width: 420px) {
  .lotto-card__brand {
    min-width: 104px;
  }

  .lotto-card__brand img {
    width: 48px;
    height: 48px;
  }

  .number-ball {
    width: 36px;
    height: 36px;
  }

  .number-ball span {
    width: 30px;
    height: 30px;
    font-size: 14px;
  }

  .draw-line,
  .countdown-line {
    font-size: 12px;
  }

  .next-draw {
    font-size: 11px;
  }
}
