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

:root {
  --bg-panel: rgba(46, 50, 87, 0.92);
  --bg-panel-border: rgba(123, 137, 216, 0.34);
  --gold: #ffbf1e;
  --gold-soft: #ffd860;
  --text-main: #ffffff;
  --text-soft: #c0c4de;
  --footer-text: #b7b7c8;
  --accent: #13bee8;
  --accent-dark: #0897c5;
  --shadow-deep: rgba(0, 0, 0, 0.45);
}

html,
body {
  min-height: 100%;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text-main);
  background:
    linear-gradient(rgba(11, 8, 30, 0.22), rgba(11, 8, 30, 0.22)),
    url("like777-bg.png") center top / cover no-repeat fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 50% 66%, rgba(255, 184, 40, 0.25), transparent 32%),
    radial-gradient(circle at 16% 54%, rgba(255, 208, 80, 0.1), transparent 18%),
    radial-gradient(circle at 84% 52%, rgba(255, 208, 80, 0.1), transparent 18%);
  pointer-events: none;
}

.page-shell {
  position: relative;
  z-index: 1;
  width: min(100%, 1040px);
  margin: 0 auto;
  padding: 34px 20px 24px;
}

.site-header {
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
}

.site-logo {
  width: min(100%, 220px);
  height: auto;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.34));
}

.main-grid {
  display: grid;
  grid-template-columns: minmax(410px, 1fr) minmax(388px, 1.04fr);
  gap: 28px;
  align-items: start;
}

.links-panel {
  padding-top: 24px;
}

.link-list {
  display: grid;
  gap: 14px;
}

.link-card {
  display: grid;
  grid-template-columns: 140px auto 110px;
  justify-content: space-between;
  align-items: center;
  gap: 22px;
  padding: 16px 18px;
  background: var(--bg-panel);
  border: 1px solid var(--bg-panel-border);
  border-radius: 6px;
  color: var(--text-main);
  text-decoration: none;
  box-shadow: 0 10px 22px rgba(8, 10, 27, 0.22);
  transition:
    transform 0.24s ease,
    border-color 0.24s ease,
    box-shadow 0.24s ease;
}

.link-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 196, 50, 0.5);
  box-shadow: 0 14px 26px rgba(8, 10, 27, 0.32);
}

.link-card.is-loading {
  border-color: rgba(255, 191, 30, 0.5);
}

.link-card.is-ready .link-latency {
  color: var(--gold);
}

.link-card.is-ready.latency-fast .link-latency {
  color: #6ce885;
}

.link-card.is-ready.latency-slow .link-latency {
  color: #ffb24a;
}

.link-latency {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--gold-soft);
  font-size: 0.98rem;
  white-space: nowrap;
}

.latency-value {
  display: inline-block;
  min-width: 28px;
  text-align: right;
}

.wifi-icon {
  position: relative;
  width: 28px;
  height: 28px;
  border: 2px solid currentColor;
  border-radius: 50%;
  flex: 0 0 auto;
}

.wifi-icon::before,
.wifi-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  border: 2px solid currentColor;
  border-bottom: 0;
  border-left-color: transparent;
  border-right-color: transparent;
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  transform: translateX(-50%);
}

.wifi-icon::before {
  top: 7px;
  width: 12px;
  height: 6px;
}

.wifi-icon::after {
  top: 11px;
  width: 6px;
  height: 3px;
}

.link-domain {
  font-size: 1rem;
  font-weight: 700;
  text-align: left;
  justify-self: start;
  white-space: nowrap;
  padding-right: 0;
}

.enter-btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 42px;
  min-width: 110px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 9px;
  font-size: 0.98rem;
  letter-spacing: 0.3px;
  color: var(--text-main);
  justify-self: end;
}

.refresh-btn {
  display: block;
  margin: 18px auto 0;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(180deg, #1ed0ef, #0da8da);
  color: #ffffff;
  font-size: 1rem;
  padding: 10px 24px;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(13, 168, 218, 0.25);
}

.refresh-btn:disabled {
  opacity: 0.72;
  cursor: wait;
}

.right-panel {
  display: grid;
  gap: 10px;
}

.jackpot-display {
  position: relative;
  width: min(100%, 392px);
  justify-self: center;
}

.jackpot-image {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.38));
}

.jackpot-counter {
  position: absolute;
  left: 10.8%;
  right: 8.8%;
  bottom: 4.6%;
  height: 15.6%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.03em;
  padding-inline: 0.02em;
  overflow: hidden;
  font-weight: 900;
  font-size: clamp(1.46rem, 2.35vw, 2.28rem);
  line-height: 1;
  color: #ffe06f;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.015em;
  text-shadow:
    0 2px 0 #7f5e06,
    0 5px 14px rgba(0, 0, 0, 0.6);
}

.jackpot-static,
.jackpot-digit {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  flex: 0 0 auto;
}

.jackpot-static {
  white-space: nowrap;
}

.jackpot-currency {
  width: 0.7em;
  margin-right: 0.03em;
}

.jackpot-comma {
  width: 0.24em;
}

.jackpot-decimal {
  width: 0.2em;
}

.jackpot-digit {
  position: relative;
  width: 0.58em;
  overflow: hidden;
}

.jackpot-digit-track {
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: transform 0.34s cubic-bezier(0.22, 0.8, 0.22, 1);
  will-change: transform;
}

.jackpot-digit-cell {
  flex: 0 0 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.winners-board {
  width: 100%;
}

.winner-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.winner-column {
  position: relative;
  height: 272px;
  overflow: hidden;
  border-radius: 10px;
}

.winner-column::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 28px;
  background: linear-gradient(180deg, rgba(14, 9, 30, 0), rgba(14, 9, 30, 0.9));
  pointer-events: none;
}

.winner-track {
  display: grid;
  gap: 14px;
  animation: winnerScroll 16s linear infinite;
}

.winner-track-offset {
  animation-duration: 18s;
  animation-delay: -4s;
}

@keyframes winnerScroll {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(calc(-50% - 8px));
  }
}

.winner-card {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 72px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(58, 65, 115, 0.94);
  border: 1px solid rgba(255, 196, 50, 0.86);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.winner-thumb {
  width: 54px;
  height: 54px;
  border-radius: 12px;
  object-fit: cover;
}

.winner-copy {
  min-width: 0;
}

.winner-user {
  color: #d0d5eb;
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 3px;
  letter-spacing: 0.3px;
}

.winner-game {
  font-size: 0.92rem;
  font-weight: 800;
}

.winner-amount {
  font-size: 0.92rem;
  font-weight: 800;
  white-space: nowrap;
}

.lotto-section {
  margin-top: 28px;
}

.lotto-shell {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.lotto-card {
  background: rgba(49, 55, 96, 0.94);
  border: 1px solid rgba(255, 191, 30, 0.78);
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.24);
}

.lotto-card-top,
.lotto-title-wrap,
.lotto-balls,
.lotto-info,
.lotto-footer,
.lotto-countdown,
.lotto-row {
  display: flex;
  align-items: center;
}

.lotto-card-top {
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.lotto-title-wrap {
  gap: 10px;
}

.lotto-icon {
  width: 42px;
  height: 42px;
  object-fit: contain;
  border-radius: 10px;
  background: #f6db67;
  padding: 2px;
}

.lotto-title {
  font-size: 0.95rem;
  font-weight: 800;
}

.lotto-subtitle {
  color: var(--text-soft);
  font-size: 0.76rem;
}

.lotto-balls {
  gap: 8px;
}

.lotto-ball {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #fff2b6, #e1a917 78%);
  border: 2px solid rgba(99, 59, 0, 0.5);
  color: #ffffff;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1;
  padding-bottom: 1px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.24);
}

.lotto-info {
  justify-content: center;
  margin-bottom: 10px;
}

.lotto-row {
  gap: 6px;
  font-size: 0.84rem;
  font-weight: 700;
}

.lotto-label {
  color: var(--text-soft);
}

.lotto-footer {
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(255, 201, 57, 0.16), rgba(255, 153, 24, 0.24));
  font-size: 0.78rem;
}

.lotto-countdown {
  gap: 8px;
}

.lotto-timer-icon {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  position: relative;
}

.lotto-timer-icon::after {
  content: "";
  position: absolute;
  width: 2px;
  height: 5px;
  left: 50%;
  top: 2px;
  background: #ffffff;
  transform: translateX(-50%);
}

.bottom-nav {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 18px;
  padding-top: 6px;
}

.bottom-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-height: 54px;
  color: var(--footer-text);
  text-decoration: none;
  font-size: 0.98rem;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
}

.bottom-link:first-child {
  border-left: 0;
}

.bottom-icon {
  width: 36px;
  height: 36px;
  color: #ffffff;
  flex: 0 0 auto;
}

.bottom-icon svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: currentColor;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.34));
}

@media (max-width: 980px) {
  .page-shell {
    padding-inline: 16px;
  }

  .main-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .links-panel {
    padding-top: 0;
  }

  .right-panel {
    order: 2;
  }

  .links-panel {
    order: 1;
  }
}

@media (max-width: 760px) {
  body {
    background-attachment: scroll;
  }

  .page-shell {
    padding-top: 28px;
    padding-bottom: 24px;
  }

  .site-logo {
    width: min(100%, 210px);
  }

  .jackpot-display {
    width: min(100%, 380px);
  }

  .jackpot-counter {
    left: 10.8%;
    right: 8.6%;
    bottom: 4.7%;
    height: 15.4%;
    font-size: clamp(1.28rem, 5.2vw, 1.92rem);
  }

  .link-card {
    grid-template-columns: 1fr auto;
    gap: 10px 14px;
    padding: 16px;
  }

  .link-latency {
    grid-column: 1;
    grid-row: 1;
  }

  .link-domain {
    grid-column: 1;
    grid-row: 2;
    text-align: left;
    font-size: 0.98rem;
  }

  .enter-btn {
    grid-column: 2;
    grid-row: 1 / span 2;
    min-width: 96px;
  }

  .winner-columns,
  .lotto-shell,
  .bottom-nav {
    grid-template-columns: 1fr;
  }

  .winner-column {
    height: 286px;
  }

  .winner-column:last-child {
    display: none;
  }

  .bottom-link {
    justify-content: flex-start;
    border-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding: 8px 6px;
  }

  .bottom-link:first-child {
    border-top: 0;
  }
}

@media (max-width: 520px) {
  .page-shell {
    padding: 24px 12px 24px;
  }

  .main-grid {
    gap: 22px;
  }

  .lotto-section {
    margin-top: 22px;
  }

  .link-list {
    gap: 12px;
  }

  .link-card {
    padding: 14px 12px;
  }

  .link-latency,
  .link-domain,
  .enter-btn {
    font-size: 0.92rem;
  }

  .wifi-icon {
    width: 24px;
    height: 24px;
  }

  .jackpot-display {
    width: min(100%, 420px);
  }

  .jackpot-counter {
    left: 10.4%;
    right: 8.4%;
    bottom: 4.8%;
    height: 15.1%;
    font-size: clamp(1.12rem, 6.2vw, 1.6rem);
  }

  .winner-card {
    grid-template-columns: 50px minmax(0, 1fr);
    grid-template-areas:
      "thumb copy"
      "thumb amount";
    align-items: center;
  }

  .winner-thumb {
    grid-area: thumb;
    width: 50px;
    height: 50px;
  }

  .winner-copy {
    grid-area: copy;
  }

  .winner-amount {
    grid-area: amount;
    padding-left: 2px;
  }

  .lotto-card-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .lotto-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}
