:root {
  /* Colors */
  --bg: oklch(98% 0.01 259);
  --border-default: oklch(85% 0.04 259);
  --card-bg: oklch(100% 0 0);
  --muted: oklch(50% 0.04 259);
  --text: oklch(25% 0.04 259);

  /* Game Identity Colors */
  --color-cs2: #d99a0d;
  --color-et: #556b2f;
  --color-hl2: #54626f;
  --color-l4d2: #b31d0a;
  --color-mc: #3e5c21;
  --color-q2: #5d4037;
  --color-q3: #a31d1d; /* Quake 3 Arena Red */
  --color-sof2: #475569;
  --color-tf2: #b85c1d;
  --color-ut2004: #1d4ed8;

  /* Status Colors */
  --offline: oklch(50% 0.2 25);
  --online: oklch(50% 0.18 150);

  /* Geometry & Effects */
  --card-pad: 16px;
  --gap-main: 24px;
  --glass-border: rgba(255, 255, 255, 0.1);
  --overlay-dark: rgba(0, 0, 0, 0.4);
  --overlay-light: rgba(255, 255, 255, 0.05);
  --radius: 12px;

  /* Typography */
  --font-mono: ui-monospace, monospace;
  --fs-mono: 0.8rem;
  --fs-small: 0.65rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: oklch(18% 0.04 259);
    --border-default: oklch(35% 0.04 259);
    --card-bg: oklch(25% 0.04 259);
    --muted: oklch(70% 0.04 259);
    --text: oklch(98% 0.01 259);

    --color-cs2: #e8af30;
    --color-hl2: #708090;
    --color-l4d2: #d42f19;
    --color-mc: #4a6f28;
    --offline: oklch(65% 0.2 25);
    --online: oklch(75% 0.15 150);
  }
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, sans-serif;
  line-height: 1.5;
  margin: 0;
  padding: 40px 20px;
}

#audit-container {
  column-count: 3;
  column-gap: var(--gap-main);
  margin: 20px auto;
  max-width: 1600px;
}

@media (max-width: 1200px) {
  #audit-container {
    column-count: 2;
  }
}

@media (max-width: 800px) {
  #audit-container {
    column-count: 1;
  }
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--border-default);
  border-radius: var(--radius);
  break-inside: avoid;
  display: inline-block;
  margin-bottom: var(--gap-main);
  overflow: hidden;
  transition: border-color 0.3s ease;
  vertical-align: top;
  width: 100%;
}

.card-header {
  align-items: center;
  color: white;
  display: flex;
  gap: 15px;
  padding: var(--card-pad);
  position: relative;
}

.loader-container {
  align-items: center;
  bottom: 12px;
  display: flex;
  justify-content: center;
  position: absolute;
  right: 12px;
  z-index: 10;
}

.loader {
  animation: spin 0.8s linear infinite;
  border: 2px solid var(--glass-border);
  border-radius: 50%;
  border-top: 2px solid white;
  height: 14px;
  width: 14px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.server-logo {
  background: var(--overlay-dark);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  flex-shrink: 0;
  height: 90px;
  object-fit: cover;
  width: 90px;
}

.header-main {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  min-width: 0;
}

.meta-prefix {
  display: flex;
  font-size: var(--fs-small);
  font-weight: 900;
  gap: 6px;
  letter-spacing: 0.08em;
  margin-bottom: 2px;
  overflow: hidden;
  text-transform: uppercase;
  white-space: nowrap;
}

.meta-game {
  color: rgba(255, 255, 255, 0.95);
  overflow: hidden;
  text-overflow: ellipsis;
}
.meta-site {
  color: rgba(255, 255, 255, 0.45);
  flex-shrink: 0;
}

.header-main h2 {
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.2;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
  white-space: nowrap;
}

.address {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  margin-top: 2px;
  opacity: 0.7;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-pill {
  background: var(--overlay-dark);
  border-radius: 20px;
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  margin-top: 10px;
  padding: 3px 10px;
  text-transform: uppercase;
  width: fit-content;
}

.status-online {
  border: 1px solid var(--online);
  color: var(--online);
}
.status-offline {
  border: 1px solid var(--offline);
  color: var(--offline);
}

.body {
  padding: 10px 20px;
}

/* STABLE DATA ROW: No shifting, top-aligned */
.data-row {
  border-bottom: 1px solid var(--overlay-light);
  display: flex;
  font-size: 0.9rem;
  justify-content: space-between;
  align-items: flex-start; /* Aligns label to top of value */
  padding: 8px 0;
  gap: 16px;
}

.label {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  flex-shrink: 0;
  padding-top: 3px; /* Visual alignment with mono text */
  white-space: nowrap;
}

.value {
  color: var(--text);
  font-family: var(--font-mono);
  text-align: right;
  flex-grow: 1;
  word-break: break-word; /* Prevents overflow */
  overflow-wrap: anywhere;
  line-height: 1.4;
  text-wrap: balance; /* Prettier line breaks */
}

.tag-container {
  border-bottom: 1px solid var(--overlay-light);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 12px 0;
}

.mod-tag {
  background: rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border-default);
  border-radius: 4px;
  color: var(--text);
  font-size: var(--fs-small);
  font-weight: 700;
  padding: 3px 8px;
  text-transform: uppercase;
}

@media (prefers-color-scheme: dark) {
  .mod-tag {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
  }
}

.player-list {
  margin-top: 15px;
  padding-top: 5px;
}

.roster-title {
  color: var(--muted);
  display: block;
  font-size: 0.7rem;
  font-weight: 900;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.player-row {
  align-items: center;
  display: flex;
  gap: 10px;
  margin-bottom: 8px;
  min-height: 24px;
}

.player-name {
  color: var(--text);
  flex-grow: 1;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-stats {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  margin-left: auto;
  opacity: 0.5;
  flex-shrink: 0;
}

.bot-pill {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 3px;
  color: var(--muted);
  font-size: 0.55rem;
  font-weight: 800;
  margin-left: 8px;
  padding: 1px 4px;
}

.empty-msg {
  color: var(--muted);
  font-size: 0.85rem;
  font-style: italic;
}
