body {
  font-family: 'Segoe UI', Arial, sans-serif;
  background: #f9fafb;
  color: #1e293b;
  margin: 0;
  padding: 20px;
}

body.dark {
  background: #0f172a;
  color: #f1f5f9;
}

.container {
  max-width: 1000px;
  margin: auto;
  padding: 20px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

body.dark .container {
  background: #1e293b;
}

h1 {
  text-align: left;
  margin-bottom: 15px;
  font-size: 24px;
  color: #3b82f6;
}

body.dark h1 { color: #60a5fa; }

.controls {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;
}

.controls button {
  background: #3b82f6;
  border: none;
  color: white;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.2s;
}

.controls button:hover { background: #2563eb; }

body.dark .controls button { background: #2563eb; }

#autoRefreshStatus {
  font-size: 13px;
  margin-left: auto;
  color: #475569;
}

body.dark #autoRefreshStatus { color: #cbd5e1; }

/* -----------------------------
  Table
----------------------------- */
table {
  width: 100%;
  border-collapse: collapse;
}

thead {
  background: #e5e7eb;
}

body.dark thead { background: #334155; }

th, td {
  padding: 12px 10px;
  text-align: left;
  border-bottom: 1px solid #d1d5db;
  font-size: 14px;
}

body.dark th, body.dark td { border-bottom: 1px solid #475569; }

th {
  font-weight: 600;
  color: #1e293b;
}

body.dark th { color: #f1f5f9; }

td small {
  display: block;
  font-size: 12px;
  color: #6b7280;
}

body.dark td small { color: #94a3b8; }

.online-badge {
  display: inline-block;
  background: #10b981;
  color: white;
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 11px;
  margin-right: 6px;
}

body.dark .online-badge { background: #22c55e; }

.offline-badge {
  display: inline-block;
  background: #ef4444;
  color: white;
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 11px;
  margin-right: 6px;
}

body.dark .offline-badge { background: #f87171; }

tr:hover { background: #f3f4f6; }

body.dark tr:hover { background: #475569; }

td.version {
  font-weight: 600;
  color: #facc15;
}

body.dark td.version { color: #fcd34d; }

td.map {
  font-weight: 500;
  color: #3b82f6;
}

body.dark td.map { color: #60a5fa; }

td.players {
  font-weight: 500;
}

td.mode {
  font-size: 13px;
  color: #6b7280;
}

body.dark td.mode { color: #94a3b8; }

/* Responsive */
@media screen and (max-width: 800px) {
  table, thead, tbody, th, td, tr { display: block; }
  thead tr { display: none; }
  tr { margin-bottom: 15px; border-bottom: 2px solid #d1d5db; }
  td {
    padding-left: 50%;
    position: relative;
    text-align: left;
    border: none;
  }
  td::before {
    position: absolute;
    left: 15px;
    top: 12px;
    white-space: nowrap;
    font-weight: 600;
    color: #6b7280;
  }
  td.version::before { content: "Address"; }
  td.name::before { content: "Name"; }
  td.players::before { content: "Players"; }
  td.map::before { content: "Map"; }
  td.mode::before { content: "Mode"; }
}
.copyable {
  cursor: pointer;
}

.copyable.copied {
  background-color: rgba(34,197,94,0.2); /* light green highlight */
  transition: background-color 0.3s;
}
.copyable {
  cursor: pointer;
  position: relative;
}

.copy-tooltip {
  position: absolute;
  transform: translateX(-50%);
  background: #1e293b;
  color: white;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.95;
}

body.light .copy-tooltip {
  background: #3b82f6;
  color: white;
}


body.light .copy-tooltip {
  background: #3b82f6;
  color: white;
}

/* GitHub link style */
#githubLink {
  font-size: 20px;
  color: #1e293b;
  margin-left: 10px;
  text-decoration: none;
}

#githubLink:hover {
  color: #3b82f6;
}

body.dark #githubLink {
  color: #f1f5f9;
}

body.dark #githubLink:hover {
  color: #60a5fa;
}
