* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html, body {
  margin: 0;
  padding: 0;
  background: #ffffff;
  color: #000000;
}

body {
  font-family: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.layout {
  display: flex;
  align-items: stretch;
  min-height: 100vh;
}

.page {
  flex: 1;
  min-width: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4rem;
  padding: 6rem 1.5rem 5rem;
  text-align: center;
}

.leaderboard {
  flex-shrink: 0;
  width: 15rem;
  padding: 3rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-self: center;
}

.leaderboard-title {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.4);
  margin: 0;
}

.leaderboard-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.leaderboard-list li {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  font-size: 0.8rem;
}

.leaderboard-rank {
  color: rgba(0, 0, 0, 0.4);
  font-variant-numeric: tabular-nums;
  width: 1.2rem;
  flex-shrink: 0;
}

.leaderboard-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leaderboard-amount {
  font-variant-numeric: tabular-nums;
  color: rgba(0, 0, 0, 0.6);
  flex-shrink: 0;
}

.big-counter-value {
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  margin: 0;
  line-height: 1;
}

@media (max-width: 900px) {
  .layout {
    flex-direction: column;
  }

  .leaderboard {
    width: 100%;
    align-self: stretch;
    padding: 2rem 1.5rem 0;
  }

  .leaderboard-list {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
  }
}

.content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  max-width: 40rem;
}

.state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.headline {
  font-size: clamp(2rem, 6vw, 3.75rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0;
}

.subtext {
  font-size: clamp(1.05rem, 2.5vw, 1.25rem);
  color: rgba(0, 0, 0, 0.6);
  margin: 0;
}

.prompt {
  font-size: clamp(1.05rem, 2.5vw, 1.25rem);
  margin: 0.5rem 0 0;
}

.block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  margin: 0.5rem 0;
}

.label {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.4);
  margin: 0 0 0.25rem;
}

.value {
  font-size: 1.1rem;
  font-weight: 500;
  margin: 0;
}

.value.muted {
  font-weight: 400;
  color: rgba(0, 0, 0, 0.6);
}

.btn {
  margin-top: 1.5rem;
  border: 1px solid #000000;
  background: #ffffff;
  color: #000000;
  padding: 1rem 2.5rem;
  font-family: inherit;
  font-size: 1rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.btn:hover {
  background: #000000;
  color: #ffffff;
}

.btn:disabled {
  opacity: 0.4;
  cursor: default;
}

.btn.full {
  width: 100%;
  margin-top: 0.5rem;
}

.timer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.timer .value {
  font-variant-numeric: tabular-nums;
  font-size: 0.9rem;
}

.stats-bar {
  position: fixed;
  bottom: 1.5rem;
  left: 0;
  right: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.5rem;
  padding: 0 1rem;
  font-size: 0.7rem;
  letter-spacing: 0.02em;
  color: rgba(0, 0, 0, 0.4);
  font-variant-numeric: tabular-nums;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.97);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  z-index: 50;
}

.modal-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  max-width: 26rem;
  width: 100%;
  text-align: center;
}

.modal-title {
  font-size: clamp(1.25rem, 3vw, 1.5rem);
  font-weight: 500;
  line-height: 1.4;
  margin: 0;
}

.modal-subtitle {
  color: rgba(0, 0, 0, 0.6);
  margin: 0;
  line-height: 1.5;
}

.input {
  width: 100%;
  border: 1px solid rgba(0, 0, 0, 0.2);
  background: #ffffff;
  color: #000000;
  padding: 0.9rem 1rem;
  font-family: inherit;
  font-size: 1rem;
  text-align: center;
  outline: none;
}

.input:focus {
  border-color: #000000;
}

.amount-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.euro {
  color: rgba(0, 0, 0, 0.6);
}

.modal-error {
  font-size: 0.9rem;
  color: rgba(0, 0, 0, 0.6);
  margin: 0;
}

.link {
  background: none;
  border: none;
  font-family: inherit;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.4);
  cursor: pointer;
  padding: 0.25rem;
}

.link:hover {
  color: #000000;
}
