/* ============================================================
   CBS Sports Society - Volleyball
   Shared theme. Dark, athletic, scoreboard energy.
   Fonts (add to each page <head>):
   Anton (display) + Manrope (body)
   ============================================================ */

:root {
  --bg:        #0a0c10;
  --bg-2:      #0e1117;
  --surface:   #14181f;
  --surface-2: #1a1f29;
  --surface-3: #232a36;
  --line:        rgba(255,255,255,.08);
  --line-strong: rgba(255,255,255,.16);

  --text:   #eef1f5;
  --muted:  #909aa8;
  --faint:  #5d6675;

  --volt:     #c9fc4e;   /* primary accent */
  --volt-dim: #9fcf3a;
  --cyan:     #38d6ff;   /* secondary accent */
  --danger:   #ff5d5d;
  --gold:     #ffce47;
  --silver:   #cfd6e0;
  --bronze:   #e0915a;

  --r-sm: 10px;
  --r:    14px;
  --r-lg: 22px;

  --shadow:    0 18px 50px -18px rgba(0,0,0,.7);
  --shadow-sm: 0 8px 24px -12px rgba(0,0,0,.6);

  --font-display: 'Anton', system-ui, sans-serif;
  --font-body:    'Manrope', system-ui, sans-serif;

  --maxw: 1120px;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 500;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  position: relative;
  min-height: 100vh;
}

/* Atmosphere: accent glows + faint court grid */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(60vw 60vw at 12% -10%, rgba(201,252,78,.10), transparent 55%),
    radial-gradient(55vw 55vw at 100% 110%, rgba(56,214,255,.09), transparent 55%),
    repeating-linear-gradient(0deg,  rgba(255,255,255,.022) 0 1px, transparent 1px 84px),
    repeating-linear-gradient(90deg, rgba(255,255,255,.022) 0 1px, transparent 1px 84px),
    var(--bg);
}
/* Grain */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .035;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

/* ---------- Typography ---------- */
.kicker {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: .74rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--volt);
}
h1, h2, h3 { margin: 0; }
.muted { color: var(--muted); }
.tabnum { font-variant-numeric: tabular-nums; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  padding: 14px 22px;
  background: rgba(10,12,16,.72);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.wordmark {
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  display: flex; align-items: center; gap: 2px;
  color: var(--text);
}
.wordmark .dot { color: var(--volt); transform: translateY(-2px); }
.topbar-right { display: flex; align-items: center; gap: 12px; }

.role-badge {
  font-weight: 800; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase;
  padding: 6px 12px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line-strong); color: var(--text);
}
.role-badge.admin  { background: rgba(201,252,78,.12); border-color: rgba(201,252,78,.4); color: var(--volt); }
.role-badge.scorer { background: rgba(56,214,255,.12); border-color: rgba(56,214,255,.4); color: var(--cyan); }

/* ---------- Buttons ---------- */
.btn {
  font-family: var(--font-body); font-weight: 800; font-size: .9rem;
  letter-spacing: .02em;
  padding: 12px 20px; border-radius: var(--r-sm);
  border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--text);
  cursor: pointer; transition: transform .12s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn:hover { transform: translateY(-1px); border-color: var(--line-strong); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 2px solid var(--volt); outline-offset: 2px; }

.btn-primary { background: var(--volt); color: #0c1005; border-color: var(--volt); }
.btn-primary:hover { box-shadow: 0 10px 30px -8px rgba(201,252,78,.5); }

.btn-cyan { background: var(--cyan); color: #04222b; border-color: var(--cyan); }
.btn-cyan:hover { box-shadow: 0 10px 30px -8px rgba(56,214,255,.5); }

.btn-danger { background: transparent; color: var(--danger); border-color: rgba(255,93,93,.45); }
.btn-danger:hover { background: rgba(255,93,93,.12); }

.btn-ghost { background: transparent; }
.btn-ghost:hover { background: var(--surface-2); }

.btn-sm { padding: 8px 14px; font-size: .8rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }

/* ---------- Pills ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 7px;
  font-weight: 800; font-size: .74rem; letter-spacing: .1em; text-transform: uppercase;
  padding: 6px 12px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--muted);
}
.pill-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.is-setup    { color: var(--muted); }
.pill.is-active   { color: var(--cyan);  border-color: rgba(56,214,255,.35); }
.pill.is-complete { color: var(--volt);  border-color: rgba(201,252,78,.35); }

/* ---------- Cards & panels ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 26px;
  box-shadow: var(--shadow);
}

/* ---------- Fields ---------- */
.field {
  width: 100%;
  font-family: var(--font-body); font-size: 1rem; font-weight: 600; color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  padding: 13px 15px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.field::placeholder { color: var(--faint); font-weight: 500; }
.field:focus { outline: none; border-color: var(--volt); box-shadow: 0 0 0 3px rgba(201,252,78,.16); }
.label { display: block; font-weight: 800; font-size: .76rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }

.error { color: var(--danger); font-weight: 700; font-size: .85rem; }

/* ---------- Entrance animation ---------- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
.stagger > * { animation: fadeUp .55s cubic-bezier(.2,.7,.2,1) both; }
.stagger > *:nth-child(1) { animation-delay: .04s; }
.stagger > *:nth-child(2) { animation-delay: .10s; }
.stagger > *:nth-child(3) { animation-delay: .16s; }
.stagger > *:nth-child(4) { animation-delay: .22s; }
.stagger > *:nth-child(5) { animation-delay: .28s; }
.stagger > *:nth-child(6) { animation-delay: .34s; }
.stagger > *:nth-child(7) { animation-delay: .40s; }
.stagger > *:nth-child(8) { animation-delay: .46s; }

@media (prefers-reduced-motion: reduce) {
  .stagger > * { animation: none; }
}