:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  background: #10131b;
  color: #f3f5fa;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(ellipse at 10% 0%, rgb(77 66 155 / 18%), transparent 42rem),
    #10131b;
}

button {
  font: inherit;
}

.page {
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
  padding: 64px 0 40px;
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 36px;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 6vw, 3.25rem);
  letter-spacing: -0.045em;
}

.page-description {
  max-width: 700px;
  margin: -16px 0 28px;
  color: #b6bac8;
  line-height: 1.65;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.telegram-link {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid #34394a;
  border-radius: 12px;
  background: #1b1f2b;
  color: #a5a9b8;
  transition: color 150ms ease, background 150ms ease, border-color 150ms ease;
}

.telegram-link:hover {
  border-color: #2787c8;
  background: #172a3a;
  color: #39a9ed;
}

.telegram-link svg {
  width: 21px;
  height: 21px;
  fill: currentColor;
}

.notification-button {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid #34394a;
  border-radius: 12px;
  background: #1b1f2b;
  color: #a5a9b8;
  cursor: pointer;
  transition: color 150ms ease, background 150ms ease, border-color 150ms ease;
}

.notification-button:hover,
.notification-button.notification-enabled {
  border-color: #7164d8;
  background: #292541;
  color: #b7adff;
}

.notification-button svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.status {
  margin: 0 0 18px;
  color: #b6bac8;
}

.giveaways {
  display: grid;
  gap: 16px;
}

.giveaway-card {
  border: 1px solid #2a3040;
  border-radius: 16px;
  padding: 22px;
  background: linear-gradient(145deg, #1a1e2a, #171a24);
  box-shadow: 0 14px 36px rgb(0 0 0 / 14%);
}

.giveaway-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.giveaway-title-row h2 {
  min-width: 0;
  margin: 0;
  font-size: 1.2rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.countdown {
  flex: 0 0 auto;
  padding: 5px 9px;
  border: 1px solid rgb(87 217 138 / 24%);
  border-radius: 8px;
  background: rgb(87 217 138 / 8%);
  color: #8ce2b0;
  font-variant-numeric: tabular-nums;
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
}

.countdown-ended {
  border-color: #34394a;
  background: #20232d;
  color: #9298aa;
}

.prize-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.prize-text {
  min-width: 0;
  color: #f3f5fa;
  font-size: 0.96rem;
  font-weight: 650;
  white-space: nowrap;
}

.giveaway-link-actions {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 4px;
}

.link-action {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: #9298aa;
  cursor: pointer;
  text-decoration: none;
}

.link-action:hover {
  border-color: #34394a;
  background: #252a38;
  color: #f3f5fa;
}

.link-action svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

@media (max-width: 600px) {
  .page {
    padding-top: 40px;
  }

  .header {
    margin-bottom: 28px;
  }

  .page-description {
    margin-top: -12px;
    margin-bottom: 24px;
  }

  .giveaway-title-row {
    gap: 8px;
  }

  .countdown {
    padding: 4px 6px;
    font-size: 0.72rem;
  }

  .prize-row {
    gap: 6px;
  }

  .prize-text {
    font-size: 0.84rem;
  }

  .giveaway-link-actions {
    gap: 0;
  }

  .link-action {
    width: 30px;
    height: 30px;
  }
}
