:root {
  --bg: #0b0f14;
  --bg-elevated: #121820;
  --bg-soft: #171d27;
  --line: rgba(255, 255, 255, 0.08);
  --text: #eef2f7;
  --muted: #8b97a8;
  --accent: #0084dd;
  --accent-soft: rgba(0, 132, 221, 0.14);
  --good: #22c55e;
  --warn: #f59e0b;
  --bad: #ef4444;
  --radius: 14px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top left, rgba(0, 132, 221, 0.12), transparent 28%),
    radial-gradient(circle at bottom right, rgba(0, 132, 221, 0.08), transparent 24%),
    var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, sans-serif;
}

.page {
  max-width: 1120px;
  margin: 0 auto;
  padding: 28px 20px 48px;
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 34px;
  height: 46px;
  color: var(--accent);
}

.header h1 {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 700;
}

.header p {
  display: none;
}

.layout {
  display: grid;
  gap: 18px;
}

.btn {
  border: 0;
  border-radius: 12px;
  padding: 12px 16px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.controls {
  display: flex;
  margin-top: 16px;
}

.btn-primary {
  background: var(--accent);
  color: white;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.panel {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent), var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}

.panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.panel-head h2 {
  margin: 0;
  font-size: 1.05rem;
}

.hint, .badge {
  color: var(--muted);
  font-size: 0.84rem;
}

.badge {
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--text);
  font-weight: 600;
}

.item-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  min-height: 44px;
  margin-bottom: 14px;
}

.item-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px 8px 12px;
  border-radius: 999px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  font-size: 0.88rem;
}

.item-chip code {
  color: #9fd4ff;
  font-size: 0.82rem;
}

.chip-remove {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
  line-height: 1;
  font-size: 1rem;
}

.chip-remove:hover {
  color: var(--text);
}

.row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

input, select {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  color: var(--text);
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
}

input:focus, select:focus {
  outline: 2px solid rgba(0, 132, 221, 0.35);
  border-color: rgba(0, 132, 221, 0.55);
}


.btn-primary:disabled {
  opacity: 0.65;
  cursor: wait;
}

.btn-secondary {
  background: var(--bg-soft);
  color: var(--text);
  border: 1px solid var(--line);
}

.error {
  margin: 14px 0 0;
  color: #fecaca;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 0.92rem;
}

.hidden {
  display: none !important;
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.item-card {
  display: flex;
  gap: 12px;
  padding: 14px;
  border-radius: 12px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
}

.item-thumb {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  object-fit: cover;
  background: #0a1018;
  flex-shrink: 0;
}

.item-card h3 {
  margin: 0 0 6px;
  font-size: 0.95rem;
  line-height: 1.3;
}

.item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 0.78rem;
}

.tag {
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
}

.tag.ok {
  color: #86efac;
}

.tag.warn {
  color: #fcd34d;
}

.table-wrap {
  overflow: auto;
}

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

.players-table th,
.players-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 0.92rem;
}

.players-table th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.player-name {
  font-weight: 600;
}

.player-value {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.link-btn {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: #9fd4ff;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
}

.link-btn.alt {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.empty {
  padding: 28px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 12px;
}

@media (max-width: 720px) {
  .header {
    flex-direction: column;
    align-items: flex-start;
  }

  .controls {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-primary {
    width: 100%;
  }
}
