/* public/style.css */


@font-face {
  font-family: 'MinecraftRegular';
  src: url('fonts/MinecraftRegular-Bmg3.otf') format('opentype');
}

@font-face {
  font-family: 'MinecraftBold';
  src: url('fonts/MinecraftBold-nMK1.otf') format('opentype');
}

@font-face {
  font-family: 'MinecraftItalic';
  src: url('fonts/MinecraftItalic-R8Mo.otf') format('opentype');
}

@font-face {
  font-family: 'MinecraftBoldItalic';
  src: url('fonts/MinecraftBoldItalic-1y1e.otf') format('opentype');
}

/* Example styles */
body, main {
  font-family: 'MinecraftRegular', sans-serif;
}

h1, h2, h3 {
  font-family: 'MinecraftBold', sans-serif;
}

em, i {
  font-family: 'MinecraftItalic', sans-serif;
}

strong, b {
  font-family: 'MinecraftBoldItalic', sans-serif;
}

ul {
  list-style-type: none; /* Removes the bullets */
  padding-left: 0; /* Removes default padding */
}

nav a {
  color: inherit;
}

.server {
  border-top: 2px solid #888;
  margin-top: 1.5em;
  padding-top: 0.5em;
}

.meta {
  color: #666;
  margin-top: -0.5em;
}

h4 {
  margin-bottom: 0.2em;
}

.dot {
  display: inline-block;
  width: 0.7em;
  height: 0.7em;
  border-radius: 50%;
  margin-right: 0.3em;
}

.dot.up {
  background: #3c3;
}

.dot.down {
  background: #c33;
}
.edition { font-size: 0.6em; font-weight: normal; color: #888; }

/* ---------------------------------------------------------------- admin */
header { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.3em 1em; }
header h1 { margin-bottom: 0.2em; }
.logout { margin-left: auto; color: #666; }
button.link { background: none; border: 0; padding: 0; color: inherit; text-decoration: underline; font: inherit; cursor: pointer; }

.card {
  border: 2px solid #888;
  background: #fafafa;
  padding: 0.6em 0.9em 0.9em;
  min-width: 0;
}
.card h2 { margin: 0.2em 0 0.5em; font-size: 1.2em; }
.card h3 { margin: 0.8em 0 0.3em; font-size: 0.95em; color: #555; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1em; margin-top: 1em; }
.cards .wide { grid-column: 1 / -1; }

.row { display: flex; flex-wrap: wrap; gap: 0.4em; align-items: center; margin: 0.35em 0; }
.row input:not([type=checkbox]), .row select {
  font: inherit; padding: 0.35em 0.5em; border: 2px solid #888; background: #fff; min-width: 0;
}
.row input[name=item], .row input[name=message], .row input[name=command], .row input[name=reason], #player { flex: 1 1 10em; }
.row input[type=number] { width: 5.5em; }
#rules-text { font: inherit; width: 100%; box-sizing: border-box; padding: 0.4em 0.5em; border: 2px solid #888; background: #fff; resize: vertical; }
label.inline { display: inline-flex; align-items: center; gap: 0.3em; }

/* Minecraft-style stone buttons */
button.mc {
  font-family: 'MinecraftRegular', sans-serif;
  font-size: 0.95em;
  color: #fff;
  text-shadow: 1px 1px 0 #3f3f3f;
  background: #7d7d7d;
  border: 2px solid #000;
  box-shadow: inset 2px 2px 0 #a9a9a9, inset -2px -2px 0 #555;
  padding: 0.45em 0.8em;
  cursor: pointer;
  text-transform: capitalize;
}
button.mc:hover:not(:disabled) { background: #8f9bd6; box-shadow: inset 2px 2px 0 #bcc5f0, inset -2px -2px 0 #5a65a0; }
button.mc:active:not(:disabled) { box-shadow: inset -2px -2px 0 #a9a9a9, inset 2px 2px 0 #555; }
button.mc:disabled { color: #aaa; background: #5a5a5a; cursor: default; }
button.mc.danger { background: #a33; box-shadow: inset 2px 2px 0 #d66, inset -2px -2px 0 #722; }
button.mc.small { padding: 0.25em 0.55em; font-size: 0.85em; }
button.mc.toggle.on { background: #3a8a3a; box-shadow: inset 2px 2px 0 #6c6, inset -2px -2px 0 #262; }
button.mc.toggle { min-width: 3.5em; margin-left: auto; }

.servers { display: flex; flex-wrap: wrap; gap: 0.5em; margin-top: 0.8em; }
.servers a {
  border: 2px solid #888; padding: 0.35em 0.7em; text-decoration: none; color: inherit; background: #fafafa;
}
.servers a.current { border-color: #000; background: #e4e8fb; }
.servers small { display: block; color: #777; font-size: 0.75em; }

.picker { position: sticky; top: 0; z-index: 2; box-shadow: 0 3px 6px rgba(0, 0, 0, 0.12); }
.chips { display: flex; gap: 0.4em; overflow-x: auto; padding-bottom: 0.2em; }
.chip { font: inherit; white-space: nowrap; border: 2px solid #888; background: #fff; padding: 0.2em 0.6em; cursor: pointer; }
.chip.online::before { content: '●'; color: #3c3; margin-right: 0.3em; }
.chip.picked { border-color: #000; background: #e4e8fb; }
.hint { color: #777; font-size: 0.85em; margin: 0.3em 0 0; }

.rule { justify-content: space-between; border-bottom: 1px solid #e3e3e3; padding-bottom: 0.3em; }
.rule span { flex: 1 1 10em; }

#output { max-height: 24em; overflow-y: auto; }
.result { border-left: 4px solid #3a8a3a; padding: 0.2em 0.6em; margin: 0.5em 0; background: #fff; }
.result.fail { border-left-color: #a33; }
.result .cmd { color: #555; font-size: 0.85em; }
.result pre, pre.log { white-space: pre-wrap; word-break: break-word; margin: 0.2em 0; font-family: ui-monospace, Menlo, monospace; font-size: 0.85em; }
pre.log { background: #222; color: #ddd; padding: 0.6em; max-height: 28em; overflow-y: auto; }

.login { max-width: 22em; margin-top: 1em; display: grid; gap: 0.7em; }
.login label { display: grid; gap: 0.2em; }
.login input { font: inherit; padding: 0.4em; border: 2px solid #888; }
.error { color: #a33; }

body.admin { max-width: 80em; margin: 0 auto; padding: 0 16px 2em; }
@media (max-width: 400px) { .cards { grid-template-columns: 1fr; } }
header h1 a, .card h2 a { color: inherit; text-decoration: none; }
.sessions ul { margin: 0.1em 0 0.4em 1em; }
details summary { cursor: pointer; margin-top: 0.6em; color: #555; }
a.mc-link {
  color: #fff; text-decoration: none; text-shadow: 1px 1px 0 #3f3f3f; background: #7d7d7d;
  border: 2px solid #000; box-shadow: inset 2px 2px 0 #a9a9a9, inset -2px -2px 0 #555; padding: 0.35em 0.8em;
}
a.mc-link:hover { background: #8f9bd6; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(9em, 1fr)); gap: 0.6em; }
.tile { border: 2px solid #888; background: #fff; padding: 0.5em 0.7em; }
.tile b { display: block; font-size: 1.5em; font-family: 'MinecraftBold', sans-serif; }
.tile span { color: #666; font-size: 0.85em; }
.join { font-size: 0.9em; }
code { background: #eee; padding: 0 0.25em; }
table.players { width: 100%; border-collapse: collapse; margin-top: 0.4em; font-size: 0.9em; }
table.players th { text-align: left; color: #666; font-weight: normal; }
table.players td, table.players th { padding: 0.2em 0.4em 0.2em 0; border-bottom: 1px solid #e3e3e3; }
.card.for-player { border-color: #4a63c8; }
.card.for-player > h2 { background: #e4e8fb; margin: -0.6em -0.9em 0.5em; padding: 0.4em 0.9em; }
.card.for-server { border-color: #c8873a; }
.card.for-server > h2 { background: #fbeedc; margin: -0.6em -0.9em 0.5em; padding: 0.4em 0.9em; }
.who { color: #2a3f9e; }
.who.none { color: #a33; font-family: 'MinecraftRegular', sans-serif; font-size: 0.9em; }
.picker { border-color: #4a63c8; }
.item-chips { flex-wrap: wrap; max-height: 11em; overflow-y: auto; margin: 0.3em 0; }
