.contest {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  flex: 0 0 100%;
  scroll-snap-align: start;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(185, 164, 255, 0.35);
  background: linear-gradient(
    145deg,
    rgba(124, 92, 246, 0.34),
    rgba(10, 49, 112, 0.6) 58%,
    rgba(79, 216, 242, 0.12)
  );
}

.contest__main {
  padding: clamp(24px, 4vw, 48px);
}
.contest__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 15px;
}
.contest__pool {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 7px 16px;
  border-radius: 999px;
  background: var(--buoy);
  color: var(--ink);
  font-weight: 700;
  font-size: 14px;
}
.contest__pool b {
  font: 700 18px var(--font-display);
}
.contest__title {
  margin-top: 22px;
  font: 900 clamp(40px, 6vw, 76px) / 0.95 var(--font-display);
  letter-spacing: -0.03em;
}
.contest__sub {
  max-width: 36ch;
  margin-top: 16px;
  font-size: 18px;
  color: var(--muted);
}

/* Podio: l'altezza dei gradini è il premio */
.podium {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  height: 200px;
  margin-top: 34px;
}
.podium__step {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  padding-top: 12px;
  border-radius: 16px 16px 0 0;
  color: var(--ink);
}
.podium__step b {
  font: 700 clamp(18px, 2.4vw, 26px) var(--font-display);
}
.podium__label {
  font-size: 13px;
  font-weight: 700;
}
.podium__medal {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--foam);
  font: 700 14px var(--font-display);
}
.pd1 {
  height: 100%;
  background: linear-gradient(180deg, #ffe37a, #ff9a2e);
}
.pd2 {
  height: 72%;
  background: linear-gradient(180deg, #f1f8fc, #9db8c8);
}
.pd3 {
  height: 52%;
  background: linear-gradient(180deg, #f6c593, #bd6c3d);
}

.contest__paypal {
  margin-top: 20px;
  font-size: 15px;
  color: var(--muted);
}

.contest__side {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: clamp(24px, 4vw, 48px);
  background: rgba(3, 12, 40, 0.4);
  border-left: 1px solid var(--line);
}
.contest__box h4 {
  margin-bottom: 8px;
  font-size: 15px;
  font-weight: 600;
}
.contest__box p {
  color: var(--muted);
  font-size: 16px;
}
.contest__warn {
  padding: 12px 14px;
  border-left: 3px solid var(--buoy);
  border-radius: 4px 10px 10px 4px;
  background: rgba(255, 138, 31, 0.14);
  font-size: 15px;
}
.contest__warn > b:first-child {
  color: var(--buoy);
}

.countdown {
  display: flex;
  gap: 10px;
}
.countdown__unit {
  display: grid;
  min-width: 82px;
  padding: 10px 14px 8px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--glass);
  text-align: center;
}
.countdown__num {
  font: 700 clamp(28px, 3.4vw, 36px) / 1.1 var(--font-display);
  font-variant-numeric: tabular-nums;
}
.countdown__lbl {
  font-size: 13px;
  color: var(--muted);
}
.contest__status {
  margin-top: -6px;
  font-size: 15px;
  color: var(--muted);
}

.draw {
  display: flex;
  align-items: center;
  gap: 16px;
}
.draw__cal {
  display: flex;
  flex: none;
  flex-direction: column;
  width: 58px;
  overflow: hidden;
  border-radius: 12px;
  background: var(--foam);
  color: var(--ink);
  text-align: center;
}
.draw__cal span {
  padding: 2px 0;
  background: var(--coral);
  color: #fff;
  font: 700 11px var(--font-display);
}
.draw__cal b {
  padding: 4px 0 6px;
  font: 700 24px/1 var(--font-display);
}
.draw__k {
  display: block;
  font-size: 13.5px;
  color: var(--muted);
}
.draw__when {
  display: block;
  font: 600 16px var(--font-display);
}
.draw p {
  font-size: 15px;
  color: var(--muted);
}
.draw a {
  font-weight: 700;
  color: var(--foam);
  text-underline-offset: 3px;
}
.contest .btn--telegram {
  align-self: flex-start;
}

@media (max-width: 900px) {
  .contest {
    grid-template-columns: 1fr;
  }
  .contest__side {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}
.contests-heading {
  margin-bottom: 32px;
}
.contests-heading h2 {
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1.2;
  margin-top: 12px;
}
.contests-list {
  display: grid;
  gap: 32px;
}
.contest__dates {
  font-size: 14px;
  line-height: 1.6;
  color: var(--foam);
}
.contest__title,
.contest__sub,
.contest__box,
.contest__warn,
.draw__when {
  overflow-wrap: anywhere;
}
.contest__box p,
.contest__sub,
.contest__warn,
.contest__paypal {
  white-space: pre-line;
}
.contest[data-contest-id] .countdown__num {
  font-variant-numeric: tabular-nums;
  font-family: Arial, sans-serif;
}
/* Managed contests may have longer titles; keep the original Mega Contest typography unchanged. */
.contest[data-contest-id] .contest__title {
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1.08;
}
