:root {
  --grond: #1b1b1b;
  --paneel: rgba(0, 0, 0, 0.62);
  --rand: #000000;
  --rand-licht: #3c3c3c;
  --tekst: #ffffff;
  --tekst-zacht: #b0b0b0;
  --geel: #ffff55;
  --xp: #80ff20;
  --knop: #6f6f6f;
  --knop-hover: #808080;
  --knop-licht: #ababab;
  --knop-donker: #4a4a4a;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--grond);
  color: var(--tekst);
  font-family: "Pixelify Sans", ui-monospace, monospace;
}

a {
  color: var(--tekst);
}

a:hover {
  color: var(--geel);
}

:focus-visible {
  outline: 3px solid var(--geel);
  outline-offset: 2px;
}

/* Achtergrond: wazige render van de gekozen wereld, met een zachte overgang. */
.achtergrond {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: 0;
}

.achtergrond .laag {
  position: absolute;
  inset: -24px;
  width: calc(100% + 48px);
  height: calc(100% + 48px);
  object-fit: cover;
  filter: blur(4px) brightness(0.36);
  opacity: 0;
  transition: opacity 0.5s ease;
}

.achtergrond .laag.zichtbaar {
  opacity: 1;
}

.pagina {
  position: relative;
  z-index: 1;
  max-width: 1240px;
  margin: 0 auto;
  padding: 48px 20px 32px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* Kop */
.kop {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px 32px;
}

.logo {
  position: relative;
  padding-right: 40px;
}

.logo h1 {
  margin: 0;
  font-size: clamp(40px, 6vw, 80px);
  font-weight: 700;
  letter-spacing: 3px;
  line-height: 1;
  color: #dcdcdc;
  text-shadow: 0 5px 0 #555555, 0 9px 0 #262626;
}

.splash {
  position: absolute;
  right: -24px;
  bottom: -22px;
  margin: 0;
  color: var(--geel);
  font-size: 20px;
  text-shadow: 2px 2px 0 #3f3f15;
  white-space: nowrap;
  transform: rotate(-14deg);
  animation: splash 0.9s ease-in-out infinite alternate;
}

@keyframes splash {
  from { transform: rotate(-14deg) scale(1); }
  to { transform: rotate(-14deg) scale(1.08); }
}

.samenvatting {
  margin: 0;
  font-size: 19px;
  color: #dddddd;
}

/* Panelen */
.inhoud {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 20px;
}

.paneel {
  min-width: 0;
  background: var(--paneel);
  border: 2px solid var(--rand);
  box-shadow: inset 0 0 0 2px var(--rand-licht);
}

.lijst {
  flex: 1 1 380px;
  padding: 12px;
}

.lijst h2 {
  margin: 0 0 12px;
  text-align: center;
  font-size: 20px;
  font-weight: 400;
}

.werelden {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wereld {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 84px;
  padding: 8px;
  background: rgba(0, 0, 0, 0.35);
  border: 2px solid transparent;
  color: var(--tekst);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.wereld:hover {
  background: rgba(255, 255, 255, 0.08);
}

.wereld[aria-pressed="true"] {
  border-color: #ffffff;
}

.icoon {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  object-fit: cover;
  border: 2px solid var(--rand);
}

.icoon.leeg {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed #6a6a6a;
  font-size: 28px;
  color: #8a8a8a;
}

.wereld-tekst {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.wereld-naam {
  font-size: 22px;
}

.wereld-regel {
  font-size: 16px;
  color: var(--tekst-zacht);
}

.details {
  flex: 1.5 1 560px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.voorbeeld {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 8;
  object-fit: cover;
  border: 2px solid var(--rand);
}

.voorbeeld.leeg {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed #6a6a6a;
  font-size: 22px;
  color: var(--tekst-zacht);
}

.titelrij {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 16px;
}

.titelrij h2 {
  margin: 0;
  font-size: 34px;
  font-weight: 700;
}

.sub {
  font-size: 17px;
  color: var(--tekst-zacht);
}

.tegels {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tegel {
  flex: 1 1 110px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 2px solid var(--rand);
  box-shadow: inset 0 0 0 2px var(--rand-licht);
}

.tegel dt {
  font-size: 15px;
  color: var(--tekst-zacht);
}

.tegel dd {
  margin: 4px 0 0;
  font-size: 28px;
}

.spelers h3 {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 400;
  color: var(--geel);
}

.balken {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.balk {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 17px;
}

.balk-naam {
  flex: 0 0 170px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.xp {
  flex: 1 1 auto;
  height: 14px;
  background: #1a1a1a;
  border: 2px solid var(--rand);
}

.xp span {
  display: block;
  height: 100%;
  background-color: var(--xp);
  background-image: repeating-linear-gradient(90deg, transparent 0 18px, rgba(0, 0, 0, 0.35) 18px 20px);
}

.balk-uren {
  flex: 0 0 56px;
  text-align: right;
}

.noot {
  margin: 10px 0 0;
  font-size: 15px;
  color: var(--tekst-zacht);
}

.leeg-uitleg {
  margin: 0;
  font-size: 18px;
  line-height: 1.5;
  color: #dddddd;
}

/* Knoppen in Minecraft-stijl */
.knoppen {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.knop {
  flex: 1 1 180px;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  background: var(--knop);
  color: #ffffff;
  text-decoration: none;
  font-size: 19px;
  text-align: center;
  border: 2px solid var(--rand);
  box-shadow: inset 2px 2px 0 var(--knop-licht), inset -2px -4px 0 var(--knop-donker);
  text-shadow: 2px 2px 0 #3a3a3a;
}

.knop:hover {
  background: var(--knop-hover);
  color: #ffffff;
}

.knop.groot {
  flex: 2 1 240px;
  font-size: 21px;
}

.knop[aria-disabled="true"] {
  background: #3c3c3c;
  color: #b5b5b5;
  box-shadow: inset 2px 2px 0 #555555, inset -2px -4px 0 #2a2a2a;
  cursor: default;
}

/* Voet */
.voet p {
  margin: 8px 0 0;
  text-align: center;
  font-size: 14px;
  line-height: 1.5;
  color: #c2c2c2;
}

.zonder-js {
  position: relative;
  z-index: 2;
  margin: 24px;
  font-size: 18px;
}

/* Telefoon */
@media (max-width: 640px) {
  .pagina {
    padding: 32px 16px 24px;
    gap: 24px;
  }

  .logo {
    padding-right: 0;
  }

  .splash {
    position: static;
    display: inline-block;
    margin-top: 12px;
    font-size: 18px;
    transform: rotate(-4deg);
    animation: none;
  }

  .details {
    padding: 12px;
  }

  /* Naam en uren op één regel, de balk eronder over de volle breedte. */
  .balk {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 4px 12px;
  }

  .balk-naam {
    grid-column: 1;
    grid-row: 1;
  }

  .balk-uren {
    grid-column: 2;
    grid-row: 1;
  }

  .xp {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .titelrij h2 {
    font-size: 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .splash {
    animation: none;
  }

  .achtergrond .laag {
    transition: none;
  }
}
