:root {
  --bg: #0a0a0f;
  --surface: rgba(255, 255, 255, 0.05);
  --surface-strong: rgba(255, 255, 255, 0.08);
  --line: rgba(255, 255, 255, 0.12);
  --text: #f7fbff;
  --muted: #b4c3d6;
  --primary: #22c55e;
  --primary-strong: #16a34a;
  --secondary: #3b82f6;
  --danger: #ef4444;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: radial-gradient(circle at 15% 10%, #11182a 0%, var(--bg) 52%);
  color: var(--text);
  font-family: "Outfit", "Segoe UI", sans-serif;
}

button,
input,
select {
  font: inherit;
}

a {
  color: inherit;
}

.player-link {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease;
}

.player-link:hover {
  color: var(--primary);
  text-decoration: underline;
}

.hidden {
  display: none !important;
}

.glass-card {
  backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow);
}

.btn {
  border: 0;
  border-radius: 12px;
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  transform: none;
}

.btn-primary {
  color: #f0fff5;
  background: linear-gradient(120deg, var(--primary), var(--primary-strong));
  box-shadow: 0 8px 20px color-mix(in srgb, var(--primary) 42%, transparent);
}

.btn-soft {
  color: #f2f8ff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.24);
}

.btn-danger {
  color: #fff5f5;
  background: linear-gradient(120deg, #ef4444, #dc2626);
  box-shadow: 0 8px 20px rgba(239, 68, 68, 0.33);
}

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

.modal-shell {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  background: rgba(6, 13, 24, 0.6);
  backdrop-filter: blur(4px);
  animation: fadeIn 0.22s ease;
}

.modal-card {
  width: min(94vw, 520px);
  border-radius: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  background: rgba(9, 21, 35, 0.93);
}

.modal-card h3,
.modal-card h4 {
  margin: 0 0 8px;
}

.auth-modal {
  display: grid;
  gap: 10px;
}

.auth-google-btn {
  width: 100%;
}

.auth-sep {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #bfd1e2;
  font-size: 0.82rem;
}

.auth-sep::before,
.auth-sep::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.18);
}

.auth-sep span {
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.auth-field {
  display: grid;
  gap: 6px;
}

.auth-field span {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #d8e6f3;
}

.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 800;
  color: #ffffff;
  background: linear-gradient(140deg, #3b82f6, #22c55e);
  border: 1px solid rgba(255, 255, 255, 0.34);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  flex-shrink: 0;
}

.user-avatar.large {
  width: 56px;
  height: 56px;
  font-size: 1.15rem;
}

.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.error-text {
  min-height: 20px;
  margin: 8px 0;
  color: #ff9a9a;
  font-size: 0.88rem;
}

input,
select {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  padding: 10px 12px;
}

.toast-root {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 70;
  display: grid;
  gap: 8px;
}

.toast {
  min-width: 220px;
  max-width: 320px;
  border-radius: 10px;
  padding: 9px 12px;
  background: rgba(11, 27, 43, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.24);
  box-shadow: var(--shadow);
  animation: toastIn 0.22s ease;
}

.toast-success {
  border-color: rgba(34, 197, 94, 0.6);
}

.toast-error {
  border-color: rgba(239, 68, 68, 0.64);
}

.toast-out {
  animation: toastOut 0.2s ease forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes toastOut {
  to {
    opacity: 0;
    transform: translateY(8px);
  }
}
