:root {
  --bg: #0b1020;
  --bg-2: #131a33;
  --panel: #1b2444;
  --accent: #ffc93c;
  --accent-2: #4f8cff;
  --team-a: #4f8cff;
  --team-b: #ff6b6b;
  --ok: #35d07f;
  --danger: #ff4d4d;
  --text: #f4f6ff;
  --muted: #9aa4c7;
  --radius: 16px;
  --font: 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: radial-gradient(circle at 50% 0%, var(--bg-2), var(--bg) 70%);
  color: var(--text);
  font-family: var(--font);
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  border-radius: var(--radius);
  transition: transform 0.08s ease, filter 0.15s ease;
}

button:active {
  transform: scale(0.97);
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn {
  padding: 14px 22px;
  font-size: 1rem;
  font-weight: 600;
  background: var(--panel);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.btn:hover:not(:disabled) {
  filter: brightness(1.15);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #ffb020);
  color: #1a1400;
}

.btn-danger {
  background: linear-gradient(135deg, var(--danger), #c62828);
  color: #fff;
}

.btn-ok {
  background: linear-gradient(135deg, var(--ok), #1f9d5c);
  color: #04170c;
}

.card {
  background: var(--panel);
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.07);
  padding: 20px;
}

input,
select,
textarea {
  font-family: inherit;
  font-size: 1rem;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  width: 100%;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--accent-2);
  outline-offset: 1px;
}

.muted {
  color: var(--muted);
}

.hidden {
  display: none !important;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  background: var(--danger);
  color: #fff;
  padding: 12px 20px;
  border-radius: 12px;
  font-weight: 600;
  z-index: 1000;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.connection-badge {
  position: fixed;
  top: 12px;
  right: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--danger);
  color: #fff;
  z-index: 900;
}

.connection-badge.online {
  background: var(--ok);
  color: #04170c;
}
