/* Dardos Pop: a pub look (green wall, cream HUD) on top of the shared Pop menu and HUD. */
:root {
  --dp-ink: #1b2a3a;
  --dp-wall: #1d4a44;
  --dp-cream: #f6eedb;
}
/* Each world (html[data-world], set by the page) has its own colours. */
html {
  --dp-bg:
    radial-gradient(90% 45% at 18% 0%, rgba(255, 196, 110, 0.35) 0%, rgba(255, 196, 110, 0) 70%),
    linear-gradient(180deg, #24584f 0%, #1d4a44 45%, #153a35 100%);
  --dp-play: linear-gradient(180deg, #102a3f 0, #183b40 60px, var(--dp-wall) 120px);
  --dp-ol: #6b0f1f;
  --dp-acc: #1e7a4e;
  --dp-foot: #c4213a;
  --dp-glow: rgba(255, 214, 140, 0.32);
}
html[data-world="feria"] {
  --dp-bg:
    radial-gradient(90% 45% at 50% 0%, rgba(255, 210, 63, 0.35) 0%, rgba(255, 210, 63, 0) 70%),
    linear-gradient(180deg, #a8327a 0%, #7a1f5e 50%, #4b1a6b 100%);
  --dp-play: linear-gradient(180deg, #3a0f33 0, #6e1d58 60px, #8e2466 120px);
  --dp-ol: #5a0a3a;
  --dp-acc: #b8237a;
  --dp-foot: #b8237a;
  --dp-glow: rgba(255, 220, 120, 0.38);
}
html[data-world="isla"] {
  --dp-bg:
    radial-gradient(70% 40% at 85% 0%, rgba(255, 244, 170, 0.6) 0%, rgba(255, 244, 170, 0) 70%),
    linear-gradient(180deg, #2aa2ec 0%, #1a8fc9 45%, #0d5c80 100%);
  --dp-play: linear-gradient(180deg, #0f6fa8 0, #2aa2ec 120px);
  --dp-ol: #0b4a6e;
  --dp-acc: #0d7a8c;
  --dp-foot: #0d7a8c;
  --dp-glow: rgba(255, 250, 200, 0.4);
}
html[data-world="espacio"] {
  --dp-bg:
    radial-gradient(70% 40% at 20% 5%, rgba(150, 70, 255, 0.4) 0%, rgba(150, 70, 255, 0) 70%),
    radial-gradient(50% 30% at 90% 60%, rgba(30, 200, 210, 0.22) 0%, rgba(30, 200, 210, 0) 70%),
    linear-gradient(180deg, #1b0f4d 0%, #120a38 50%, #07051f 100%);
  --dp-play: linear-gradient(180deg, #07051f 0, #120a38 120px);
  --dp-ol: #2a0f7a;
  --dp-acc: #5a3fd6;
  --dp-foot: #5a3fd6;
  --dp-glow: rgba(95, 240, 255, 0.28);
}
html,
body {
  background: var(--dp-bg);
}

/* ---------- Menu ---------- */
.pop-menu {
  padding-top: 8px;
}
.pop-menu > * {
  position: relative;
  z-index: 1;
}
.pop-menu > .pop-deco {
  display: none;
}
.pop-menu > .dp-deco {
  position: absolute;
  inset: 0 0 auto 0;
  height: 100%;
  min-height: 640px;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.dp-deco svg {
  position: absolute;
}
.dp-glow {
  position: absolute;
  left: 50%;
  top: 84px;
  width: 520px;
  height: 520px;
  margin: -260px 0 0 -260px;
  background: radial-gradient(circle, var(--dp-glow) 0%, rgba(255, 255, 255, 0) 62%);
}
.dp-board-l {
  left: -70px;
  top: 150px;
  width: 190px;
  opacity: 0.16;
}
.dp-board-r {
  right: -80px;
  top: 20px;
  width: 170px;
  opacity: 0.14;
}
.dp-dart-a {
  right: 14px;
  top: 150px;
  width: 64px;
  transform: rotate(28deg);
  opacity: 0.35;
}
.dp-dart-b {
  left: 18px;
  top: 40px;
  width: 54px;
  transform: rotate(-32deg);
  opacity: 0.3;
}

.pop-logo {
  width: 136px;
  height: 136px;
  margin-top: 4px;
  font-size: 0;
  filter: drop-shadow(0 10px 14px rgba(0, 20, 15, 0.45));
}
.pop-logo svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}
.pop-title {
  margin-top: -2px;
  font-size: clamp(42px, 12.5vw, 64px);
  letter-spacing: -0.5px;
  color: #fffaf0;
  text-shadow:
    3px 0 0 var(--dp-ol),
    -3px 0 0 var(--dp-ol),
    0 3px 0 var(--dp-ol),
    0 -3px 0 var(--dp-ol),
    2px 2px 0 var(--dp-ol),
    -2px 2px 0 var(--dp-ol),
    2px -2px 0 var(--dp-ol),
    -2px -2px 0 var(--dp-ol),
    0 7px 0 var(--dp-ol),
    3px 7px 0 var(--dp-ol),
    -3px 7px 0 var(--dp-ol),
    0 12px 16px rgba(0, 20, 15, 0.45);
}
.pop-how {
  max-width: 440px;
  margin-top: 10px;
  font-size: 17px;
  text-shadow: 0 1px 2px rgba(0, 20, 15, 0.5);
}
.pop-reto-row {
  width: 100%;
  max-width: 460px;
  flex-wrap: nowrap;
  gap: 12px;
  margin-top: 14px;
}
.pop-reto-row .pop-btn {
  flex: 1 1 0;
  min-width: 0;
  min-height: 58px;
  padding: 8px 14px;
  font-size: 21px;
  white-space: nowrap;
  color: var(--dp-ink);
}
.pop-btn.pop-reto {
  flex-grow: 1.25;
  font-size: 22px;
}
.pop-btn.ghost {
  background: linear-gradient(180deg, #fffdf6, var(--dp-cream));
  box-shadow:
    inset 0 2px 0 #fff,
    0 5px 0 rgba(0, 30, 20, 0.45),
    0 8px 16px rgba(0, 20, 15, 0.3);
}
.pop-reto-how {
  font-size: 15px;
  opacity: 1;
  text-shadow: 0 1px 2px rgba(0, 20, 15, 0.5);
}
/* World tabs and the line saying what each world is about */
.pop-worlds {
  max-width: 460px;
  margin: 4px 0 6px;
}
.pop-world {
  background: rgba(0, 20, 30, 0.28);
}
.pop-world.on {
  color: var(--dp-ink);
}
.dp-world-how {
  max-width: 440px;
  min-height: 2.6em;
  margin: 4px 0 12px;
  color: #fffaf0;
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0, 20, 15, 0.55);
}
.pop-total {
  margin: 2px 0 14px;
  padding: 4px 22px;
  background: rgba(0, 25, 20, 0.4);
  font-size: 20px;
}
.pop-levels {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  max-width: 460px;
}
.pop-level {
  min-height: 92px;
  border-radius: 22px;
  background: linear-gradient(180deg, #fffdf6 0%, var(--dp-cream) 60%, #eadcb9 100%);
  box-shadow:
    inset 0 -3px 0 rgba(170, 140, 80, 0.35),
    0 5px 0 rgba(0, 30, 20, 0.5),
    0 8px 14px rgba(0, 20, 15, 0.3);
  color: var(--dp-ink);
  font-size: 38px;
}
.pop-level small {
  margin-top: 2px;
  color: var(--dp-acc);
  font-size: 12.5px;
  /* the whole name on up to two lines instead of "Desde to…" */
  white-space: normal;
  text-overflow: clip;
  line-height: 1.1;
  text-align: center;
}
.pop-level[disabled] {
  background: rgba(255, 255, 255, 0.12);
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.15);
  font-size: 32px;
}
.pop-level[disabled] small {
  color: #fff;
  font-size: 13px;
}
.pop-level.next {
  animation: dp-glow 1.6s ease-in-out infinite;
}
.pop-menu > .pop-row:not(.pop-reto-row) {
  margin-top: 22px;
}
.pop-menu > .pop-row:not(.pop-reto-row) .pop-btn {
  min-width: 190px;
  min-height: 54px;
  font-size: 22px;
}
.pop-foot {
  margin-top: 18px;
  background: var(--dp-cream);
  color: var(--dp-foot);
}

/* ---------- Play ---------- */
.pop-play {
  background: var(--dp-play);
}
.pop-hud {
  margin: 4px 0 0;
  padding: 8px 10px;
  padding-top: calc(8px + env(safe-area-inset-top, 0px));
  gap: 8px;
  border-radius: 26px;
  background: linear-gradient(180deg, #fbf6ea 0%, #f1e7cf 100%);
  box-shadow:
    inset 0 -2px 0 rgba(170, 140, 80, 0.3),
    0 6px 16px rgba(0, 15, 10, 0.45);
}
.pop-icon {
  width: 46px;
  height: 46px;
  color: var(--dp-ink);
  background: #fff;
  box-shadow:
    0 3px 0 rgba(120, 95, 50, 0.3),
    0 4px 10px rgba(80, 60, 20, 0.15);
}
.pop-icon svg {
  width: 22px;
  height: 22px;
}
.pop-hud .pop-icon:last-child {
  border-radius: 14px;
  background: linear-gradient(180deg, #8fb3d9, #5b86b8);
  color: #fff;
  box-shadow:
    inset 0 0 0 3px #fff,
    0 3px 0 rgba(120, 95, 50, 0.3);
}
.pop-lvl {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 1 auto;
  min-width: 0;
  color: var(--dp-ink);
  font-size: 19px;
  text-shadow: none;
}
.pop-lvl > svg {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  filter: drop-shadow(0 2px 1px rgba(150, 90, 0, 0.3));
}
.pop-lvl > span {
  min-width: 0;
}
.pop-lvl > .dp-wico {
  flex: 0 0 auto;
  font-size: 26px;
  font-style: normal;
  line-height: 1;
}
.pop-lvl small {
  max-width: 100%;
  font-size: 14px;
  opacity: 0.8;
}
.pop-chips {
  flex-shrink: 0;
  flex-wrap: nowrap;
  gap: 6px;
}
.pop-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px 4px 6px;
  font-size: 17px;
  background: #fff;
  color: var(--dp-ink);
  box-shadow:
    0 2px 0 rgba(120, 95, 50, 0.25),
    0 3px 8px rgba(80, 60, 20, 0.12);
}
.pop-chip svg {
  width: 22px;
  height: 22px;
}
.pop-chip .ok {
  color: #13924b;
}
.pop-overlay {
  background: rgba(8, 26, 22, 0.55);
}

@keyframes dp-glow {
  50% {
    box-shadow:
      0 0 0 4px #ffe14d,
      0 0 22px 6px rgba(255, 230, 80, 0.85),
      0 5px 0 rgba(0, 30, 20, 0.5);
  }
}
@media (max-width: 380px) {
  .pop-hud {
    gap: 5px;
    padding-left: 7px;
    padding-right: 7px;
  }
  .pop-icon {
    width: 40px;
    height: 40px;
  }
  .pop-lvl > svg {
    width: 26px;
    height: 26px;
  }
  .pop-lvl {
    font-size: 17px;
    gap: 4px;
  }
  .pop-lvl small {
    font-size: 12px;
  }
  .pop-chips {
    gap: 4px;
  }
  .pop-chip {
    font-size: 15px;
    padding: 3px 8px 3px 5px;
    gap: 3px;
  }
  .pop-chip svg {
    width: 18px;
    height: 18px;
  }
  .pop-reto-row .pop-btn {
    font-size: 18px;
    padding: 8px 10px;
  }
  .pop-level {
    font-size: 32px;
  }
  .pop-world b {
    font-size: 12px;
  }
  .pop-world small {
    font-size: 10px;
  }
  /* "Campeonato" is one word and can't wrap: it was cut at 360-375 px
     (locked names were even bigger, 13 px) */
  .pop-level small,
  .pop-level[disabled] small {
    font-size: 10.5px;
    letter-spacing: -0.02em;
  }
}
@media (prefers-reduced-motion: reduce) {
  .pop-level.next {
    animation: none;
  }
}
