@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/vendor/fonts/outfit-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/vendor/fonts/outfit-latin-500-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/vendor/fonts/outfit-latin-600-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/vendor/fonts/outfit-latin-700-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('/vendor/fonts/outfit-latin-800-normal.woff2') format('woff2');
}

:root {
  --bg: #070a12;
  --text: #f2f5ff;
  --text-muted: rgba(226, 232, 255, 0.62);
  --text-faint: rgba(226, 232, 255, 0.38);
  --accent: #2ce6a4;
  --accent-dim: rgba(44, 230, 164, 0.16);
  --danger: #ff6b6b;
  --line: rgba(255, 255, 255, 0.07);
  --line-strong: rgba(255, 255, 255, 0.1);
  --panel: rgba(255, 255, 255, 0.027);
  --panel-strong: rgba(255, 255, 255, 0.06);
  --radius-lg: 26px;
  --radius-md: 15px;
  --radius-pill: 999px;
  --shadow-card: 0 20px 50px -24px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Outfit', -apple-system, 'system-ui', 'Segoe UI', sans-serif;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 40%, transparent 100%);
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background: radial-gradient(ellipse 60% 40% at 20% 0%, rgba(38, 78, 158, 0.35), transparent 60%);
}

a {
  color: inherit;
}

.page {
  max-width: 880px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.page-narrow {
  max-width: 480px;
}

.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}

.top-nav a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 14px;
}

.top-nav a:hover {
  color: var(--text);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line-strong);
  background: var(--panel-strong);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.eyebrow .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

h1.title {
  font-size: 42px;
  font-weight: 700;
  line-height: 1.15;
  margin: 18px 0 8px;
}

h1.title .accent {
  color: var(--accent);
}

.subtitle {
  font-size: 16px;
  font-weight: 300;
  color: var(--text-muted);
  margin: 0 0 32px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(22px) saturate(1.5);
  -webkit-backdrop-filter: blur(22px) saturate(1.5);
}

.card + .card {
  margin-top: 20px;
}

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

.card-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--panel-strong);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 17px;
}

.card-title {
  font-size: 18px;
  font-weight: 600;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line-strong);
  background: var(--panel-strong);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
}

.badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.6;
}

.badge-active {
  color: var(--accent);
  border-color: rgba(44, 230, 164, 0.35);
  background: var(--accent-dim);
}

.badge-active .dot {
  background: var(--accent);
  opacity: 1;
  box-shadow: 0 0 6px var(--accent);
}

.badge-danger {
  color: var(--danger);
  border-color: rgba(255, 107, 107, 0.35);
  background: rgba(255, 107, 107, 0.12);
}

.stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 0;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

.stat-row:first-of-type {
  border-top: none;
}

.stat-label {
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
}

.stat-value {
  color: var(--text);
  font-weight: 500;
}

.stat-value.muted {
  color: var(--text-faint);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line-strong);
  background: var(--panel-strong);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn:active {
  transform: scale(0.97);
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #06231a;
}

.btn-primary:hover {
  background: #3ff0b3;
}

.btn-danger {
  border-color: rgba(255, 107, 107, 0.4);
  color: var(--danger);
}

.btn-danger:hover {
  background: rgba(255, 107, 107, 0.12);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}

.field {
  flex: 1;
  min-width: 160px;
  padding: 12px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line-strong);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
}

.field::placeholder {
  color: var(--text-faint);
}

.field:focus {
  outline: none;
  border-color: var(--accent);
}

form.inline {
  display: flex;
  gap: 8px;
  align-items: center;
}

table.grid {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

table.grid th {
  text-align: left;
  padding: 10px 14px;
  color: var(--text-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  border-bottom: 1px solid var(--line);
}

table.grid td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

table.grid tr:last-child td {
  border-bottom: none;
}

table.grid .rank {
  color: var(--accent);
  font-weight: 700;
  width: 32px;
}

.empty-state {
  text-align: center;
  color: var(--text-faint);
  padding: 24px 0;
  font-size: 14px;
}

.footer-pill {
  display: block;
  width: fit-content;
  margin: 32px auto 0;
  padding: 11px 22px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line-strong);
  background: var(--panel-strong);
  color: var(--text-muted);
  font-size: 13.5px;
  font-weight: 500;
  text-align: center;
}

.qr {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: #fff;
  padding: 4px;
}

.team-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.team-row:first-of-type {
  border-top: none;
  padding-top: 0;
}

.team-row-main {
  flex: 1;
  min-width: 0;
}

.team-row-name {
  font-weight: 600;
  font-size: 15px;
}

.team-row-link {
  font-size: 12.5px;
  color: var(--text-faint);
  word-break: break-all;
}

.error-banner {
  background: rgba(255, 107, 107, 0.12);
  border: 1px solid rgba(255, 107, 107, 0.35);
  color: var(--danger);
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-size: 14px;
  margin-bottom: 20px;
}

/* Team buzz page */
.buzz-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
}

.buzz-team-name {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 6px;
}

.buzz-status {
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 40px;
  min-height: 1.4em;
}

#buzz {
  width: min(60vw, 260px);
  height: min(60vw, 260px);
  border-radius: 50%;
  border: 1px solid rgba(44, 230, 164, 0.4);
  background: radial-gradient(circle at 30% 25%, rgba(44, 230, 164, 0.5), rgba(44, 230, 164, 0.14) 70%);
  color: #06231a;
  font-family: inherit;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 0.04em;
  cursor: pointer;
  box-shadow: 0 0 60px -10px rgba(44, 230, 164, 0.55), var(--shadow-card);
  transition: transform 0.1s ease, opacity 0.2s ease;
}

#buzz:active:not(:disabled) {
  transform: scale(0.95);
}

#buzz:disabled {
  color: var(--text-faint);
  border-color: var(--line-strong);
  background: var(--panel-strong);
  box-shadow: none;
  cursor: not-allowed;
}

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
