/* smp.css */

.smp-wrap {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 4rem 2rem 6rem;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.smp-header { margin-bottom: 0.5rem; }
.smp-title {
  font-family: var(--display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  color: var(--accent);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 0.4rem;
}
.smp-sub { font-size: 0.78rem; color: var(--muted); }

/* Status bar */
.smp-status-bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 1rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.82rem;
}
.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--faint);
  flex-shrink: 0;
  transition: background 0.3s;
}
.status-dot.online  { background: #4ade80; box-shadow: 0 0 6px rgba(74,222,128,0.4); }
.status-dot.offline { background: #f87171; }
.status-dot.loading { animation: pulse 1.4s ease infinite; }
@keyframes pulse { 0%,100% { opacity:1; } 50% { opacity:0.3; } }
#statusText { color: var(--text); }
.status-meta { color: var(--muted); margin-left: auto; font-size: 0.75rem; }

/* Stat grid */
.smp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.smp-stat { background: var(--card); padding: 1rem 1.1rem; }
.stat-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--faint);
  margin-bottom: 0.35rem;
}
.stat-value { font-size: 0.9rem; color: var(--text); }

/* Server IP row */
.smp-ip-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.1rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.smp-ip-row > div {
  flex: 1;
  min-width: 0;
}

.smp-ip-row:hover { border-color: var(--border-hi); background: #141a24; }
.ip-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--faint);
  margin-bottom: 0.2rem;
}
.copy-ip {
  font-family: var(--mono);
  font-size: 0.88rem;
  color: var(--void);
  cursor: pointer;
  user-select: none;
  transition: color 0.2s;

  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.copy-ip:hover { color: var(--accent); }
.copy-hint { font-size: 0.72rem; color: var(--faint); flex-shrink: 0; }

/* Modpack row */
.smp-modpack-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.1rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.modpack-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--faint);
  margin-bottom: 0.2rem;
}
.modpack-name { font-size: 0.88rem; color: var(--text); }
.modpack-dl {
  font-size: 0.75rem;
  color: var(--void);
  white-space: nowrap;
  transition: color 0.2s;
}
.modpack-dl:hover { color: var(--accent); }

/* Players section */
.smp-players {
  padding: 1rem 1.1rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.players-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--faint);
  margin-bottom: 0.75rem;
}
#players { display: flex; flex-direction: column; gap: 0.4rem; }
.player { display: flex; align-items: center; gap: 0.6rem; font-size: 0.85rem; color: var(--muted); }
.avatar { width: 22px; height: 22px; border-radius: 3px; image-rendering: pixelated; opacity: 0.85; flex-shrink: 0; }
.no-players { font-size: 0.82rem; color: var(--faint); }

/* Updated timestamp */
.smp-updated { font-size: 0.72rem; color: var(--faint); text-align: right; }

.online-text  { color: #4ade80; }
.offline-text { color: #f87171; }
.warn-text    { color: #facc15; }

@media (max-width: 500px) {
  .smp-wrap {
    padding: 3rem 1.5rem 5rem;
  }

  .smp-grid {
    grid-template-columns: 1fr;
  }

  .smp-ip-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .copy-hint {
    margin-top: 0.5rem;
  }
}