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

body {
  min-height: 100vh;
  background: #0a0a1a;
  color: #fff;
  font-family: 'Exo 2', 'Segoe UI', sans-serif;
  padding: 24px;
}

a {
  color: #00ff88;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.shell {
  max-width: 1100px;
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.brand h1 {
  font-family: 'Bungee', 'Arial Black', sans-serif;
  font-size: 2rem;
  color: #ffd700;
  letter-spacing: 0.04em;
}

.brand p {
  color: #00ff88;
  font-size: 0.9rem;
  margin-top: 4px;
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn {
  border: 2px solid #1a1a3a;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  padding: 10px 16px;
  border-radius: 4px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s;
}

.btn:hover {
  border-color: #00ff88;
  transform: translateY(-1px);
}

.btn-primary {
  border-color: #00ff88;
  color: #00ff88;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.stat-card {
  background: rgba(0, 0, 0, 0.45);
  border: 2px solid #1a1a3a;
  border-radius: 4px;
  padding: 16px;
}

.stat-card span {
  display: block;
  color: #bbb;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.stat-card strong {
  font-size: 1.5rem;
  color: #ffd700;
}

.panel {
  background: rgba(0, 0, 0, 0.45);
  border: 2px solid #1a1a3a;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 0 40px rgba(0, 255, 136, 0.08);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 2px solid #1a1a3a;
  flex-wrap: wrap;
}

.panel-head h2 {
  font-size: 1rem;
  color: #00ff88;
}

.filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.filters select {
  background: #111;
  color: #fff;
  border: 1px solid #333;
  border-radius: 4px;
  padding: 8px 10px;
  font-family: inherit;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid #1a1a3a;
}

th {
  color: #bbb;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

tbody tr:hover {
  background: rgba(0, 255, 136, 0.05);
}

.rank {
  font-weight: 800;
  color: #ffd700;
  width: 56px;
}

.rank-1 { color: #ffd700; }
.rank-2 { color: #c0c0c0; }
.rank-3 { color: #cd7f32; }

.player {
  font-weight: 700;
}

.score {
  color: #00ff88;
  font-weight: 800;
}

.badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.badge-victory {
  background: rgba(0, 255, 136, 0.15);
  color: #00ff88;
}

.badge-gameover {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.empty,
.error,
.loading {
  padding: 40px 18px;
  text-align: center;
  color: #888;
}

.error {
  color: #ef4444;
}

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 8px;
  background: #666;
}

.status-dot.online {
  background: #00ff88;
  box-shadow: 0 0 8px #00ff88;
}

@media (max-width: 720px) {
  body {
    padding: 16px;
  }

  .brand h1 {
    font-size: 1.5rem;
  }

  th:nth-child(4),
  td:nth-child(4) {
    display: none;
  }
}