body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.22;
  background-image:
    url("data:image/svg+xml,%3Csvg width='180' height='180' viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23a100ff' stroke-opacity='.45' stroke-width='3'%3E%3Cpath d='M16 130c23-19 31-53 6-79m75 99c-7-29 10-48 35-56m13-54c-30 6-48-6-60-31'/%3E%3Cpath d='M34 45h40v70H34z' transform='rotate(23 54 80)'/%3E%3Cpath d='M128 114h34v42h-34z' rx='6' transform='rotate(12 145 135)'/%3E%3C/g%3E%3Cg fill='%23ff2caf' fill-opacity='.45'%3E%3Cpath d='M19 23l4 12 12 4-12 4-4 12-4-12-12-4 12-4z'/%3E%3Cpath d='M155 25l3 8 8 3-8 3-3 8-3-8-8-3 8-3z'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 210px 210px;
}

.challenges-screen {
  position: relative;
  z-index: 1;
  width: min(100%, 520px);
  min-height: 100dvh;
  margin-inline: auto;
  padding:
    clamp(20px, 5vw, 34px)
    clamp(18px, 5vw, 34px)
    max(40px, calc(28px + var(--safe-bottom)));
  display: flex;
  flex-direction: column;
  gap: 22px;
  overflow: hidden;
}


.challenges-icon-btn {
  width: clamp(52px, 14vw, 64px);
  aspect-ratio: 1;
  border: 2px solid rgba(255, 44, 175, 0.9);
  border-radius: 20px;

  display: flex;
  align-items: center;
  justify-content: center;

  background: rgba(255, 44, 175, 0.07);
  color: white;
  font-size: 42px;
  line-height: 1;
  text-decoration: none;

  box-shadow:
    0 0 18px rgba(255, 44, 175, 0.75),
    inset 0 0 18px rgba(255, 44, 175, 0.13);
}

.challenges-icon-btn {
  transform: translateY(-1px);
}.challenges-icon-btn span {
  display: block;
  transform: translateY(-2px);
}

.challenges-title-pill {
  height: 58px;
  border: 2px solid rgba(27, 231, 255, 0.95);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(13, 85, 173, 0.86), rgba(7, 45, 103, 0.9));
  box-shadow:
    0 0 18px rgba(27, 231, 255, 0.8),
    inset 0 0 18px rgba(27, 231, 255, 0.12);
}

.challenges-title-pill h1 {
  font-size: clamp(30px, 8vw, 44px);
  letter-spacing: 0.06em;
  line-height: 1;
  font-weight: 900;
  text-shadow:
    0 3px 0 rgba(0, 0, 0, 0.3),
    0 0 10px rgba(255, 255, 255, 0.25);
}

.challenges-add-player {
  height: 72px;
  min-height: 72px;
  flex-shrink: 0;

  border: 2px solid var(--blue);
  border-radius: 20px;
  display: grid;
  grid-template-columns: 58px 1fr 58px;
  align-items: center;
  background: rgba(4, 17, 46, 0.8);
  box-shadow:
    0 0 18px rgba(11, 140, 255, 0.55),
    inset 0 0 18px rgba(11, 140, 255, 0.08);
  overflow: hidden;
  margin-top: 10px;
}

.challenges-add-player .challenges-person,
.challenges-add-player .challenges-plus {
  display: grid;
  place-items: center;
  color: #168cff;
  font-size: 34px;
  font-weight: 300;
}

.challenges-add-player .challenges-plus {
  border: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.14);
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  color: #8addff;
  font-size: 46px;
  text-shadow: 0 0 12px rgba(27, 231, 255, 0.8);
}

.challenges-add-player input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: white;
  font: 600 20px/1.2 inherit;
  min-width: 0;
}

.challenges-add-player input::placeholder {
  color: rgba(255, 255, 255, 0.62);
}

.challenges-message {
  min-height: 0;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateY(-8px);
  border: 2px solid rgba(255, 44, 175, 0.95);
  border-radius: 16px;
  background: rgba(65, 7, 61, 0.88);
  color: white;
  text-align: center;
  font-weight: 900;
  letter-spacing: 0.04em;
  box-shadow:
    0 0 18px rgba(255, 44, 175, 0.65),
    inset 0 0 18px rgba(255, 255, 255, 0.08);
  transition:
    opacity 0.25s ease,
    transform 0.25s ease,
    max-height 0.25s ease,
    padding 0.25s ease;
}

.challenges-message-visible {
  max-height: 70px;
  opacity: 1;
  transform: translateY(0);
  padding: 14px 16px;
}

.challenges-section-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-block: 10px -2px;
  color: white;
  font-weight: 900;
  letter-spacing: 0.08em;
  font-size: 18px;
  text-transform: uppercase;
  position: relative;
}

.challenges-section-title::before,
.challenges-section-title::after {
  content: "";
  height: 2px;
  flex: 1;
  max-width: 110px;
  background: linear-gradient(90deg, transparent, rgba(255, 44, 175, 0.7));
  box-shadow: 0 0 10px rgba(255, 44, 175, 0.75);
}

.challenges-section-title::after {
  transform: scaleX(-1);
}

.challenges-section-title .challenges-group {
  color: var(--pink);
  font-size: 25px;
}

.challenges-players {
  display: flex;
  flex-direction: column;
  gap: 14px;

  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-right: 6px;
  padding-bottom: 8px;
}

.challenges-players::-webkit-scrollbar {
  width: 6px;
}

.challenges-players::-webkit-scrollbar-thumb {
  background: rgba(27, 231, 255, 0.55);
  border-radius: 999px;
}

.challenges-player {
  height: 72px;
  min-height: 72px;
  flex-shrink: 0;

  border-radius: 24px;
  display: grid;
  grid-template-columns: 72px 1fr 56px;
  align-items: center;
  padding: 8px 14px 8px 8px;
  background: rgba(7, 17, 49, 0.76);
  border: 2px solid rgba(11, 140, 255, 0.58);
  box-shadow:
    0 0 14px rgba(11, 140, 255, 0.38),
    inset 0 0 18px rgba(11, 140, 255, 0.1);
}

.challenges-player.challenges-gold {
  border-color: rgba(255, 157, 0, 0.55);
  background: rgba(36, 19, 16, 0.76);
  box-shadow:
    0 0 14px rgba(255, 157, 0, 0.32),
    inset 0 0 18px rgba(255, 157, 0, 0.07);
}

.challenges-avatar {
  width: 56px;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 32px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    inset 0 0 18px rgba(255, 255, 255, 0.06),
    0 0 16px rgba(11, 140, 255, 0.2);
}

.challenges-name {
  font-size: clamp(22px, 6vw, 28px);
  font-weight: 900;
  letter-spacing: 0.03em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.challenges-remove {
  border: 0;
  background: transparent;
  color: #dff5ff;
  font-size: 42px;
  line-height: 1;
  cursor: pointer;
  text-shadow: 0 0 12px rgba(27, 231, 255, 0.8);
}

.challenges-gold .challenges-remove {
  color: #fff0d5;
  text-shadow: 0 0 12px rgba(255, 157, 0, 0.8);
}

.challenges-spacer {
  display: none;
}
.challenges-bottom {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 72px;
  gap: 14px;
  align-items: stretch;
  margin-top: auto;
  flex-shrink: 0;
}


/* START KNOP */
.challenges-start {
  min-height: 74px;
  border: 0;
  border-radius: 20px;

  background: linear-gradient(
    180deg,
    rgba(166, 15, 117, 0.82),
    rgba(65, 7, 61, 0.92)
  );

  box-shadow:
    0 0 18px rgba(255, 44, 175, 0.65),
    inset 0 0 18px rgba(255, 255, 255, 0.07);

  display: grid;
  grid-template-columns: 56px 1fr;
  align-items: center;

  padding: 9px 14px;

  color: white;
  text-align: left;

  cursor: pointer;

  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
}

.challenges-start:active {
  transform: scale(0.98);
}


/* BIER ICOON */
.challenges-beer {
  display: grid;
  place-items: center;

  width: 48px;
  height: 48px;

  margin: 0;

  font-size: 38px;
  line-height: 1;

  filter: drop-shadow(
    0 0 8px rgba(255, 255, 255, 0.3)
  );
}


/* CONTAINER MET START SPEL + MINIMAAL */
.challenges-start > span:last-child {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;

  margin: 0;
  min-width: 0;
}


/* START SPEL */
.challenges-start strong {
  display: block;

  margin: 0;

  font-size: clamp(22px, 6vw, 30px);
  font-weight: 950;

  line-height: 1;
  letter-spacing: 0.08em;

  color: white;
}


/* MINIMAAL X SPELERS */
.challenges-start > span:last-child > span {
  display: block;

  margin-top: 6px;

  color: #ff79c8;

  font-size: 15px;
  font-weight: 800;

  line-height: 1.15;
  letter-spacing: 0.03em;
}


/* GROTE PLUS KNOP */
.challenges-big-plus {
  width: 72px;
  min-width: 72px;
  min-height: 74px;

  border: 2px solid var(--blue);
  border-radius: 20px;

  display: grid;
  place-items: center;

  background: rgba(4, 17, 46, 0.82);

  color: #83d7ff;

  font-size: 48px;
  font-weight: 200;
  line-height: 1;

  cursor: pointer;

  box-shadow:
    0 0 18px rgba(11, 140, 255, 0.7),
    inset 0 0 18px rgba(11, 140, 255, 0.08);
}

@media (max-width: 380px) {
  .challenges-screen {
    padding-inline: 14px;
    gap: 16px;
  }

  .challenges-topbar {
    grid-template-columns: 54px 1fr 54px;
    gap: 10px;
  }

  .challenges-title-pill {
    height: 52px;
  }

  .challenges-title-pill h1 {
    font-size: 28px;
  }

  .challenges-add-player {
    height: 66px;
    grid-template-columns: 48px 1fr 52px;
  }

.challenges-bottom {
  grid-template-columns: minmax(0, 1fr) 64px;
  gap: 10px;
}

.challenges-start {
  min-height: 68px;
  grid-template-columns: 50px 1fr;
  padding: 8px 11px;
  border-radius: 18px;
}

.challenges-beer {
  width: 44px;
  height: 44px;
  font-size: 34px;
}

.challenges-start strong {
  font-size: 21px;
  letter-spacing: 0.07em;
}

.challenges-start > span:last-child > span {
  margin-top: 5px;
  font-size: 13px;
}

.challenges-big-plus {
  width: 64px;
  min-width: 64px;
  min-height: 68px;
  border-radius: 18px;
  font-size: 43px;
}
}

@media (min-width: 700px) {
  body {
    overflow: auto;
  }

  .challenges-screen {
    min-height: 900px;
    height: auto;
  }
}