@import url('https://fonts.googleapis.com/css2?family=Pixelify+Sans:wght@400;500;700&display=swap');

/* Apply the legal pixel font to the server entry container */
.server-name, .server-motd, .server-status {
  font-family: 'Pixelify Sans', system-ui, sans-serif;
  letter-spacing: 0.5px;
}

/* Ensure the player count sub-text inherits the font */
.server-status .players {
  font-family: 'Pixelify Sans', system-ui, sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  background-color: #1a1a1a;
  background-image: 
    linear-gradient(rgba(0,0,0,0.8), rgba(0, 0, 0, 0.8)), /* Darkens the dirt for text readability */
    url('dirt.png');
  background-repeat: repeat;
  background-size: 64px 64px;
  image-rendering: pixelated;
  font-family: 'Segoe UI', system-ui, sans-serif;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

h1 {
  font-family: 'VT323', monospace;
  font-size: 2.8rem;
  text-shadow: 3px 3px 0 #000;
  margin-bottom: 30px;
  letter-spacing: 2px;
}

.server-list {
  background: #3a3a3a;
  border: 3px solid #1a1a1a;
  border-radius: 4px;
  width: 100%;
  max-width: 620px;
  padding: 8px;
  box-shadow: 0 0 0 2px #000;
}

.server-entry {
  background: #000;
  border: 2px solid #2a2a2a;
  display: flex;
  align-items: center;
  padding: 10px 14px;
  gap: 14px;
  cursor: default;
  transition: background 0.15s;
}

.server-entry:hover {
  background: rgb(20, 20, 20);
}

.server-icon {
  width: 64px;
  height: 64px;
  background: #222;
  border: 2px solid #111;
  image-rendering: pixelated;
  flex-shrink: 0;
}

.server-info {
  flex: 1;
  min-width: 0;
}

.server-name {
  font-family: 'Minecraft', monospace;
  font-size: 1.15rem;
  color: #fff;
  text-shadow: 1px 1px 0 #000;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.server-motd {
  font-size: 0.9rem;
  color: #aaa;
  margin-top: 2px;
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow: hidden;
  text-overflow: ellipsis;
}

.server-status {
  text-align: right;
  font-size: 0.85rem;
  color: #55ff55;
  font-family: 'Minecraft', monospace;
  text-shadow: 1px 1px 0 #000;
  flex-shrink: 0;
}

.server-status .players {
  font-family: 'Segoe UI', system-ui, sans-serif;
  color: #aaa;
  font-size: 0.8rem;
  margin-top: 2px;
}

/* ===== Discord Codeblock ===== */
.ip-container {
  background: #2b2d31; 
  border: 1px solid #1e1f22;
  border-radius: 6px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 15px;
  width: 100%;
  max-width: 620px;
  justify-content: space-between;
}

#ip-text {
  font-family: Consolas, 'Courier New', monospace;
  color: #dbdee1;
  font-size: 0.95rem;
}

#copy-btn, #copy-port-btn {
  background: #5865F2;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-family: 'Segoe UI', system-ui, sans-serif;
  font-weight: 500;
  font-size: 0.85rem;
  transition: background 0.15s;
}

#copy-btn:hover, #copy-port-btn:hover {
  background: #4752c4;
}

#copy-btn.copied, #copy-port-btn.copied {
  background: #23a559;
}

/* ===== Buttons ===== */
.buttons {
  display: flex;
  gap: 16px;
  margin-top: 28px;
  flex-wrap: wrap;
  justify-content: center;
}

.buttons.secondary-row {
  margin-top: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  background: #3d3d3d;
  border: 3px solid #1a1a1a;
  color: #fff;
  text-decoration: none;
  font-family: 'Minecraft', monospace;
  font-size: 1rem;
  text-shadow: 1px 1px 0 #000;
  transition: all 0.15s;
  box-shadow: 0 0 0 1px #000;
}

.btn:hover {
  background: #5a5a5a;
  transform: translateY(-2px);
}

.btn.discord {
  background: #5865F2;
  border-color: #3a45c2;
}

.btn.discord:hover {
  background: #4752c4;
}

.btn.map {
  background: #2d8a4e;
  border-color: #1a5c32;
}

.btn.map:hover {
  background: #247a42;
}

.btn.buy {
  background: #e67e22;
  border-color: #ba6014;
}

.btn.buy:hover {
  background: #d35400;
}

.btn.download {
  background: #2980b9;
  border-color: #1a5276;
}

.btn.download:hover {
  background: #2471a3;
}

/* ===== Active Players List ===== */
.active-players {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 8px;
  padding: 8px 14px;
  background: #2a2a2a;
  border-top: 2px solid #1a1a1a;
  min-height: 48px; /* Maintains structure if empty */
}

/* Custom scrollbar for player list */
.active-players::-webkit-scrollbar {
  height: 6px;
}
.active-players::-webkit-scrollbar-track {
  background: #1a1a1a;
}
.active-players::-webkit-scrollbar-thumb {
  background: #555;
}
.active-players::-webkit-scrollbar-thumb:hover {
  background: #777;
}

.player-head {
  width: 32px;
  height: 32px;
  image-rendering: pixelated;
  border: 2px solid #111;
  border-radius: 2px;
  background: #111;
  transition: transform 0.1s;
}

.player-head:hover {
  transform: scale(1.1);
}