/* Shared look of sinslavy.duckdns.org and klubkopacu.duckdns.org (Minecraft-style GUI). */
:root {
  --gui: #c6c6c6;
  --gui-light: #ffffff;
  --gui-dark: #555555;
  --gui-edge: #000000;
  --slot: #8b8b8b;
  --slot-dark: #373737;
  --text: #3f3f3f;
  --text-soft: #5a5a5a;
  --sign: #ffffff;
  --sign-shadow: #3f3f3f;
  --gold: #ffd83d;
  --silver: #e0e0e0;
  --bronze: #d9894a;
  --xp: #80ff20;
  --xp-dark: #2f6b0a;
  --online: #55ff55;
  --pixel: 4px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: "VT323", ui-monospace, monospace;
  font-size: 20px;
  color: var(--text);
  background-color: #593d29;
  background-image: linear-gradient(rgba(0,0,0,.45), rgba(0,0,0,.45)), url(tex/default_dirt.png);
  background-size: auto, 64px 64px;
  image-rendering: pixelated;
  min-height: 100vh;
}
img { image-rendering: pixelated; }

/* header: grass block strip */
header {
  position: relative;
  padding: 36px 16px 28px;
  text-align: center;
  background-image: linear-gradient(rgba(0,0,0,.15), rgba(0,0,0,.35)), url(tex/default_dirt.png);
  background-size: auto, 64px 64px;
  border-top: 16px solid #5fa83a;
  box-shadow: inset 0 -6px 0 rgba(0,0,0,.35), 0 6px 0 rgba(0,0,0,.35);
}
header::before {
  content: "";
  position: absolute; left: 0; right: 0; top: -16px; height: 16px;
  background:
    repeating-linear-gradient(90deg, #6fbf45 0 8px, #5fa83a 8px 16px, #4f9a2f 16px 20px, #6fbf45 20px 32px);
}
header::after {
  content: "";
  position: absolute; left: 0; right: 0; top: 0; height: 8px;
  background: repeating-linear-gradient(90deg, #5fa83a 0 12px, transparent 12px 20px, #4f9a2f 20px 24px, transparent 24px 36px);
}
h1, .section-title {
  font-family: "Press Start 2P", ui-monospace, monospace;
  font-weight: 400;
}
h1 {
  margin: 0;
  font-size: clamp(26px, 6.5vw, 54px);
  line-height: 1.2;
  letter-spacing: 2px;
  color: var(--gold);
  text-shadow: var(--pixel) var(--pixel) 0 #3f2a00, calc(var(--pixel) * 2) calc(var(--pixel) * 2) 0 rgba(0,0,0,.35);
}
.tagline {
  margin: 10px 0 0;
  font-size: clamp(22px, 4vw, 28px);
  color: var(--sign);
  text-shadow: 2px 2px 0 var(--sign-shadow);
}
.status {
  display: inline-flex; flex-wrap: wrap; gap: 8px 18px; justify-content: center;
  margin-top: 18px; padding: 8px 14px;
  background: rgba(0,0,0,.55);
  color: #fff; font-size: 21px;
  box-shadow: 0 0 0 2px #000;
}
.dot { display: inline-block; width: 10px; height: 10px; margin-right: 6px; background: var(--online); box-shadow: 0 0 0 2px #0a3d0a; vertical-align: 1px; }
.dot.off { background: #888; box-shadow: 0 0 0 2px #333; }

/* splash text, like the title screen */
.splash {
  position: absolute; right: 8%; top: 46px;
  color: #ffff55; font-size: 26px;
  text-shadow: 2px 2px 0 #3f3f00;
  transform: rotate(-14deg);
  animation: pulse .55s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes pulse { from { transform: rotate(-14deg) scale(1); } to { transform: rotate(-14deg) scale(1.09); } }
@media (max-width: 700px) { .splash { display: none; } }
@media (prefers-reduced-motion: reduce) { .splash { animation: none; } }

main { max-width: 1240px; margin: 0 auto; padding: 32px 16px 24px; }

.section-title {
  margin: 28px 4px 14px;
  font-size: 18px;
  color: #fff; text-shadow: 3px 3px 0 #000;
  display: flex; align-items: center; gap: 12px;
}
.section-title img { width: 32px; height: 32px; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: 20px;
}

/* inventory GUI panel */
.card {
  background: var(--gui);
  padding: 14px 14px 12px;
  box-shadow:
    inset 4px 4px 0 var(--gui-light),
    inset -4px -4px 0 var(--gui-dark),
    0 0 0 3px var(--gui-edge),
    6px 6px 0 3px rgba(0,0,0,.35);
  display: flex; flex-direction: column;
}
.card-head { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.icon {
  flex: none; width: 52px; height: 52px; padding: 6px;
  background: var(--slot);
  box-shadow: inset 3px 3px 0 var(--slot-dark), inset -3px -3px 0 var(--gui-light);
}
.icon img { width: 40px; height: 40px; display: block; }
.card h2 { margin: 0; font-size: 30px; font-weight: 400; line-height: .9; color: var(--text); text-shadow: 1px 1px 0 #fff; }
.card .sub { margin: 4px 0 0; font-size: 19px; color: var(--text-soft); line-height: 1; }

ol.rank { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
ol.rank li {
  display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 8px;
  padding: 6px 8px;
  background: var(--slot);
  box-shadow: inset 3px 3px 0 var(--slot-dark), inset -3px -3px 0 var(--gui-light);
  color: #fff; text-shadow: 2px 2px 0 #3f3f3f;
  font-size: 24px; line-height: 1;
}
.pos { font-weight: 700; text-align: center; }
li.p1 .pos { color: var(--gold); }
li.p2 .pos { color: var(--silver); }
li.p3 .pos { color: var(--bronze); }
li.p1 { background: #9b8d5a; }
.who { min-width: 0; }
.name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* tied players: same place number, lines joined, a light stripe on the left */
li.tie { box-shadow: inset 5px 0 0 #fffc, inset 3px 3px 0 var(--slot-dark), inset -3px -3px 0 var(--gui-light); }
li.tie-next { margin-top: -6px; }
.bar {
  display: block; height: 6px; margin-top: 4px;
  background: #1d1d1d; box-shadow: 0 0 0 1px #000;
}
.bar > i { display: block; height: 100%; background: linear-gradient(var(--xp) 0 50%, #5fd014 50% 100%); box-shadow: inset 0 -1px 0 var(--xp-dark); }
.val { font-weight: 700; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.val small { font-size: 18px; opacity: .85; }
.empty {
  padding: 14px 10px; text-align: center;
  background: var(--slot);
  box-shadow: inset 3px 3px 0 var(--slot-dark), inset -3px -3px 0 var(--gui-light);
  color: #fff; text-shadow: 2px 2px 0 #3f3f3f; font-size: 21px;
}
.pair { display: flex; gap: 6px; align-items: center; min-width: 0; }
.pair .name { flex: 0 1 auto; }
.pair .sword { width: 18px; height: 18px; flex: none; }

footer {
  max-width: 1240px; margin: 12px auto 0; padding: 16px 16px 40px;
  color: #e8e8e8; text-shadow: 2px 2px 0 #000; font-size: 20px; line-height: 1.3;
}
footer p { margin: 4px 0; }
.err { margin: 40px auto; max-width: 520px; }
.card.wide { grid-column: 1 / -1; }
.nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; }
.nav a {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 6px;
  background: var(--gui); color: var(--text); text-decoration: none; font-size: 20px;
  box-shadow: inset 2px 2px 0 var(--gui-light), inset -2px -2px 0 var(--gui-dark), 0 0 0 2px var(--gui-edge);
}
.nav a:hover, .nav a:focus-visible { background: #d8d8d8; outline: none; }
.nav img { width: 20px; height: 20px; }
.section-title { scroll-margin-top: 12px; }
