:root {
  --bg-overlay: rgba(20, 20, 20, 0.65);
  --card-bg: #2f2f2f;
  --card-bg-hover: #343434;
  --text: #ffffff;
  --muted: #c9c9c9;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  --radius: 12px;
  --transition: 180ms ease;
}

* { box-sizing: border-box; }

body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  margin: 0;
  background:
    linear-gradient(180deg, rgba(0,0,0,.55), rgba(0,0,0,.55)),
    url('https://vintagestory.cz/PIC/servqback.jpg') no-repeat center/cover fixed;
  padding: 24px;
}

.container {
  max-width: 1100px;
  margin: auto;
  padding: 18px;
  border-radius: var(--radius);
  background-color: var(--bg-overlay);
  box-shadow: var(--shadow);
}

/* Styly pro hlavní nadpis, nadpis hráčů a jména hráčů */
#mainTitle {
  font-size: 2em;
  color: yellow;
  font-weight: bold;
  text-align: center;
}

.players-title {
  font-size: 1.4em;
  color: #5dade2;
  margin: 10px 0 5px 0;
  font-weight: bold;
}

.player-name {
  font-size: 1.3em;
  color: #f1c40f;
}

.server-title {
  font-size: 1.25rem; /* Zde můžete upravit velikost písma názvu serveru */
  margin-bottom: 12px; /* Přidáno pro lepší odsazení */
}

.welcome-message {
  color: #05e2f1; /* Žlutá barva pro text */
  font-style: italic; /* Kurzíva */
  font-size: 1.15rem; /* Velikost písma, můžete upravit */
  /* Můžete přidat i další vlastnosti, např. font-weight: bold; */
}

h2, h3 {
  margin: 0 0 8px;
  line-height: 1.2;
}

#players {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}

.info {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255,255,255,0.06);
  transition: transform var(--transition), background-color var(--transition), box-shadow var(--transition);
}

.info:hover {
  background: var(--card-bg-hover);
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(0,0,0,0.45);
}

.coords {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  color: #eaeaea;
  font-size: 0.95rem;
}

/* Bars */
.status-bar, .bodytemp-bar, .wetness-bar {
  background: #1b1b1b;
  border-radius: 999px;
  position: relative;
  height: 14px;
  margin: 8px 0;
  overflow: hidden;
}

.health-fill { background: linear-gradient(90deg, #e74c3c, #ff7b6e); height: 100%; }
.hunger-fill { background: linear-gradient(90deg, #2ecc71, #66e697); height: 100%; }
.bodytemp-fill { background: linear-gradient(90deg, #00c3ff, #ffd200, #ff5733); height: 100%; }
.wetness-fill { background: linear-gradient(90deg, #3399ff, #66ccff); height: 100%; }

.bar-label {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: flex-start; /* Zarovnání vlevo */
  align-items: center;
  font-size: 13px; /* Zvětšení písma */
  font-weight: 700;
  color: #000000; /* Černá barva textu */
  text-shadow: none; /* Odstranění stínu pro lepší čitelnost */
  pointer-events: none;
  padding-left: 10px; /* Odsazení zleva */
}

.bodytemp-marker {
  position: absolute;
  top: 0; bottom: 0;
  width: 2px;
  background: #fff;
  opacity: 0.85;
}

/* Intro */
#intro {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255,255,255,0.06);
  margin-bottom: 20px;
}

#intro h2 { font-size: 1.6rem; color: var(--text); }
#intro h3 { margin-bottom: 6px; font-size: 1.2rem; color: var(--text); }
#intro p { color: var(--muted); line-height: 1.55; margin-top: 0; }

#intro ul {
  list-style: none;
  padding-left: 0;
  margin: 12px 0;
}
#intro ul li {
  padding-left: 28px;
  position: relative;
  margin-bottom: 8px;
  color: var(--muted);
}
#intro ul li::before {
  content: "✔";
  position: absolute;
  left: 0;
  color: #66e697;
}
#intro hr {
  border: none;
  border-top: 1px solid rgba(255,255,255,0.1);
  margin: 16px 0;
}

/* IP kiemelés + gombok */
.server-ip {
  font-weight: 700;
  text-decoration: underline;
  color: #66e697;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  word-break: break-all;
}

.rules-button {
  display: inline-block;
  padding: 10px 18px;
  margin-top: 10px;
  background-color: #66e697;
  color: #000;
  font-weight: bold;
  border-radius: var(--radius);
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: var(--transition);
}
.rules-button:hover {
  background-color: #57cc84;
  transform: translateY(-2px);
}

/* Server counter + misc */
.server-count {
  margin: 10px 2px 16px;
  font-weight: 700;
  color: #e7fbe7;
}

.temp-label { font-weight: 700; }

.error-box {
  background: #3a1f1f;
  border: 1px solid rgba(255, 124, 124, 0.35);
  color: #ffdddd;
  padding: 10px 12px;
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.05);
  margin-top: 6px;
}

/* Listák egységesítése */
ul { margin: 8px 0 0; padding-left: 18px; }
li { margin-bottom: 6px; }

/* Mobil finomhangolás */
@media (max-width: 400px) {
  .container { padding: 14px; }
  #players { grid-template-columns: 1fr; }
}
