/* ========= Global reset ========= */
* { box-sizing: border-box; }

/* ========= Page layout & background ========= */
html, body {
  width: 100%;
  min-height: 100vh;
  overflow-x: hidden;
  display: block;
  margin: 0;
}

body {
  background:
    linear-gradient(rgba(20, 26, 35, 0.55), rgba(20, 26, 35, 0.55)),
    url("../img/minecraft.jpg") no-repeat center center fixed;
  background-size: cover;
  font-family: "Open Sans", Helvetica, Arial, sans-serif;
  position: relative;
  padding-top: env(safe-area-inset-top, 0);
}

a { text-decoration: none; }
p { margin: 0; padding: 3px; }

/* ========= Container ========= */
.container {
  text-align: center;
  padding-top: clamp(24px, 8vh, 96px);
}

/* ========= Footer ========= */
footer {
  text-align: center;
  padding: 3px;
  color: white;
}

/* ========= Logo ========= */
.logo img {
  width: 225px;
  max-width: 90vw;
  height: auto;
  object-fit: contain;
  margin-top: 0;

  animation-name: logoPulse;
  animation-duration: 5s;
  animation-iteration-count: infinite;
  animation-timing-function: ease-in-out;
}

@keyframes logoPulse {
  0%   { transform: scale(0.96); }
  50%  { transform: scale(1.00); }
  100% { transform: scale(0.96); }
}

/* ========= Player count badge ========= */
.playercount {
  display: inline-block;
  margin: 20px 15px 0 15px;
  padding: 2px 0;
  background-color: rgba(15, 199, 209, 0.75);
  font-size: 1em;
  color: white;
  text-align: center;
  border-radius: 5px 0 5px 0;
  line-height: 27px;
}

.playercount > p > span {
  font-weight: bold;
  padding: 1px 4px;
  border-radius: 3px;
  background: rgba(9, 150, 158, 0.7);
  margin: 0 2px;
}

.extrapad { padding: 0; }
.ip { cursor: pointer; }

/* ========= Items / navigace ========= */
.items {
  display: flex;
  justify-content: space-around;
  flex-basis: 100px;
  padding: 18px 0 10px 0;
  flex-wrap: wrap;
  gap: 12px;
}

.item img {
  transition: all 0.2s ease;
  margin-bottom: 7px;
}
.item img:hover { transform: scale(1.1); }

.img { width: 80%; }

.title {
  font-weight: bold;
  font-size: 17px;
  color: white;
}

.subtitle {
  color: #cfcfcf;
  font-size: 12px;
}

.title, .subtitle {
  margin: 0;
  padding: 0;
}

/* ========= Breakpoints ========= */
@media (min-width: 400px) {
  .logo img {
    width: 280px;
    max-width: 90vw;
  }

  .playercount {
    margin-top: 30px;
    padding: 5px;
  }

  .playercount > p > span { padding: 2px 7px; }
}

@media (min-width: 1000px) {
  .items { justify-content: center; }
  .item:not(:first-child) { margin-left: 90px; }
}

@media (min-width: 1250px) {
  .title { font-size: 24px; }
  .subtitle { font-size: 15px; }

  .logo img {
    width: 470px;
    max-width: 90vw;
  }

  .logo { margin-bottom: 28px; }
  .img { width: 100%; }
  .items { padding: 30px 0 20px 0; }

  .playercount {
    font-size: 1.22em;
    padding: 10px;
  }

  .extrapad { padding: 0 42.5px; }
  .playercount > p > span { padding: 4px 7px; }
}

/* ===== ARC LAYOUT: krajní nahoru, prostřední níž ===== */
@media (max-width: 899px) {
  .items {
    justify-content: center !important;
    gap: 28px !important;
    flex-wrap: wrap;
  }
  .items .item {
    --shift: 0px;
    transform: translateY(var(--shift));
    margin-left: 0 !important;
  }
  .items .item .img {
    width: min(150px, 42vw);
    height: auto;
  }
}

@media (min-width: 900px) {
  .items {
    display: flex;
    justify-content: center !important;
    align-items: flex-end;
    gap: clamp(32px, 6vw, 96px) !important;
    flex-wrap: nowrap;
    padding: 30px 0 20px 0;
  }

  .items .item {
    --shift: 0px; /* výchozí posun */
    margin-left: 0 !important;
    text-align: center;
    transform: translateY(var(--shift));
    transition: transform .3s ease;
  }

  .items .item .img {
    width: min(180px, 18vw);
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto 7px auto;
  }

  /* PROHNUTÍ: krajní nahoru, prostřední níž (±40px) */
  .items a.item:nth-of-type(1) { --shift: -40px; }
  .items a.item:nth-of-type(2) { --shift:  40px; }
  .items a.item:nth-of-type(3) { --shift:  40px; }
  .items a.item:nth-of-type(4) { --shift: -40px; }

  /* při hoveru všechny ikony výš o 10px */
  .items a.item:hover {
    transform: translateY(calc(var(--shift) - 10px));
  }
}
