/* Team Midnite Roster (v2)
   Keep selectors under .roster-page to avoid affecting other pages. */

.roster-page {
  /* Compatibility vars used in includes/inline styles on this site */
  --primary-yellow: #ffd600;
  --primary-purple: #8a4dff;
  --primary-cyan: #45e3ff;
  --dark-bg: #05060a;
  --dark-surface: rgba(10, 11, 20, 0.88);
  --darker-surface: rgba(7, 8, 14, 0.90);
  --text-primary: rgba(255, 255, 255, 0.95);
  --text-secondary: rgba(255, 255, 255, 0.70);
  --gradient-primary: linear-gradient(135deg, rgba(138, 77, 255, 0.95) 0%, rgba(69, 227, 255, 0.55) 55%, rgba(255, 214, 0, 0.30) 100%);
  --gradient-secondary: linear-gradient(135deg, var(--primary-yellow) 0%, var(--primary-purple) 100%);

  --r-bg0: #05060a;
  --r-bg1: #0a0b14;
  --r-surface: rgba(18, 20, 35, 0.72);
  --r-surface-2: rgba(11, 12, 22, 0.72);

  --r-text: rgba(255, 255, 255, 0.95);
  --r-muted: rgba(255, 255, 255, 0.70);
  --r-dim: rgba(255, 255, 255, 0.55);

  --r-yellow: var(--primary-yellow);
  --r-cyan: var(--primary-cyan);
  --r-purple: var(--primary-purple);
  --r-red: #ff3b5c;

  --r-radius: 22px;
  --r-radius-sm: 14px;

  --r-shadow: 0 18px 60px rgba(0, 0, 0, 0.55);
  --r-ring: 0 0 0 1px rgba(69, 227, 255, 0.24), 0 10px 40px rgba(69, 227, 255, 0.10);
  --r-ring-strong: 0 0 0 1px rgba(69, 227, 255, 0.40), 0 10px 46px rgba(69, 227, 255, 0.16);

  color: var(--r-text);
  background: radial-gradient(1200px 900px at 18% 8%, rgba(138, 77, 255, 0.16), transparent 58%),
    radial-gradient(900px 700px at 82% 18%, rgba(69, 227, 255, 0.12), transparent 60%),
    radial-gradient(1100px 900px at 70% 90%, rgba(255, 214, 0, 0.10), transparent 62%),
    linear-gradient(180deg, var(--r-bg0), var(--r-bg1));
  min-height: 100vh;
  overflow-x: hidden;
}

.roster-page body,
body.roster-page {
  font-family: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
}

.roster-page .navbar,
body.roster-page .navbar {
  /* Let the include keep its layout; just add a subtle glass polish on this page. */
  background: rgba(10, 11, 20, 0.80) !important;
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.roster-page .roster-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.roster-page .roster-bg::before {
  content: "";
  position: absolute;
  inset: -200px;
  background:
    radial-gradient(circle at 20% 12%, rgba(69, 227, 255, 0.12), transparent 42%),
    radial-gradient(circle at 78% 22%, rgba(255, 214, 0, 0.10), transparent 44%),
    radial-gradient(circle at 55% 92%, rgba(138, 77, 255, 0.10), transparent 42%);
  filter: blur(18px);
  opacity: 0.95;
  transform: translateZ(0);
}

.roster-page .roster-bg::after {
  /* Subtle noise to prevent flat gradients */
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.20;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='.35'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
  transform: translateZ(0);
}

.roster-page .hero-roster {
  position: relative;
  z-index: 1;
  padding: 110px 0 56px;
}

.roster-page .hero-roster::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(138, 77, 255, 0.30), rgba(69, 227, 255, 0.12), rgba(255, 214, 0, 0.06));
  opacity: 0.58;
  clip-path: polygon(0 0, 100% 0, 100% 70%, 0 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  z-index: -1;
}

.roster-page .roster-title {
  font-family: "Tektur", system-ui, sans-serif;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-weight: 900;
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  line-height: 1.02;
  margin-bottom: 0.65rem;
  color: rgba(255, 255, 255, 0.96);
  text-shadow: 0 0 0 rgba(0, 0, 0, 0), 0 12px 60px rgba(138, 77, 255, 0.22);
}

.roster-page .roster-subtitle {
  color: var(--r-muted);
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  max-width: 62ch;
  margin: 0 auto;
}

.roster-page .hero-stats {
  display: flex;
  gap: 1.2rem;
  justify-content: center;
  margin-top: 1.8rem;
  flex-wrap: wrap;
}

.roster-page .hero-stat {
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(12, 13, 25, 0.48);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.40);
  min-width: 160px;
}

.roster-page .hero-stat-value {
  font-family: "Tektur", system-ui, sans-serif;
  font-weight: 900;
  font-size: 2.1rem;
  color: var(--r-yellow);
  text-shadow: 0 0 22px rgba(255, 214, 0, 0.18);
}

.roster-page .hero-stat-label {
  color: var(--r-dim);
  letter-spacing: 0.02em;
  font-weight: 600;
}

.roster-page .roster-section {
  position: relative;
  z-index: 1;
  padding: 34px 0 80px;
}

.roster-page .roster-controls {
  margin-top: -36px;
  margin-bottom: 26px;
  padding: 16px;
  border-radius: var(--r-radius);
  background: var(--r-surface);
  box-shadow: var(--r-shadow);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
}

.roster-page .roster-controls-top {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: center;
}

.roster-page .roster-search {
  position: relative;
}

.roster-page .roster-search .form-control {
  border-radius: 18px;
  padding: 14px 46px 14px 16px;
  border: 1px solid rgba(69, 227, 255, 0.18);
  background: rgba(7, 8, 14, 0.62);
  color: var(--r-text);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.roster-page .roster-search .form-control:focus {
  border-color: rgba(69, 227, 255, 0.38);
  box-shadow: var(--r-ring);
  background: rgba(7, 8, 14, 0.75);
  color: var(--r-text);
}

.roster-page .roster-search-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.55);
  pointer-events: none;
}

.roster-page .roster-toggles {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.roster-page .roster-toggle {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(7, 8, 14, 0.55);
  color: rgba(255, 255, 255, 0.80);
  user-select: none;
  cursor: pointer;
}

.roster-page .roster-toggle input {
  width: 16px;
  height: 16px;
  accent-color: var(--r-cyan);
}

.roster-page .roster-sort .form-select {
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(7, 8, 14, 0.55);
  color: rgba(255, 255, 255, 0.88);
  padding: 10px 12px;
  min-width: 160px;
}

.roster-page .roster-sort .form-select:focus {
  box-shadow: var(--r-ring);
  border-color: rgba(69, 227, 255, 0.38);
}

.roster-page .roster-filters {
  margin-top: 12px;
}

.roster-page .roster-chips {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.roster-page .roster-chip {
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(7, 8, 14, 0.55);
  color: rgba(255, 255, 255, 0.80);
  padding: 9px 12px;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}

.roster-page .roster-chip:hover {
  transform: translateY(-1px);
  border-color: rgba(69, 227, 255, 0.24);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.30);
}

.roster-page .roster-chip[aria-pressed="true"] {
  background: linear-gradient(135deg, rgba(69, 227, 255, 0.20), rgba(138, 77, 255, 0.14));
  border-color: rgba(69, 227, 255, 0.40);
  box-shadow: var(--r-ring);
  color: rgba(255, 255, 255, 0.92);
}

.roster-page .roster-chip-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.85em;
}

.roster-page .team-section {
  margin-top: 38px;
}

.roster-page .team-title {
  font-family: "Tektur", system-ui, sans-serif;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.92);
  margin: 0 0 14px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.roster-page .team-title .team-title-accent {
  color: var(--r-cyan);
  text-shadow: 0 16px 56px rgba(69, 227, 255, 0.16);
}

.roster-page .team-meta {
  color: var(--r-dim);
  font-weight: 700;
  font-size: 0.95rem;
  white-space: nowrap;
}

.roster-page .roster-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.roster-page .roster-card {
  position: relative;
  border-radius: var(--r-radius);
  padding: 14px;
  background: linear-gradient(180deg, rgba(11, 12, 22, 0.86), rgba(7, 8, 14, 0.66));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.38);
  overflow: hidden;
  transform: translateZ(0);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.roster-page .roster-card::before {
  content: "";
  position: absolute;
  inset: -2px;
  background: radial-gradient(800px 220px at 30% 10%, rgba(69, 227, 255, 0.22), transparent 55%),
    radial-gradient(900px 240px at 90% 0%, rgba(255, 214, 0, 0.10), transparent 60%),
    radial-gradient(900px 240px at 12% 100%, rgba(138, 77, 255, 0.16), transparent 62%);
  opacity: 0.22;
  pointer-events: none;
}

.roster-page .roster-card:hover {
  transform: translateY(-3px);
  border-color: rgba(69, 227, 255, 0.22);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
}

.roster-page .roster-card:focus-within {
  box-shadow: var(--r-ring-strong);
  border-color: rgba(69, 227, 255, 0.40);
}

.roster-page .roster-card-top {
  display: flex;
  gap: 12px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.roster-page .roster-avatar {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.40);
  flex: 0 0 auto;
}

.roster-page .roster-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.roster-page .roster-titleline {
  min-width: 0;
  flex: 1 1 auto;
}

.roster-page .roster-name {
  font-weight: 900;
  letter-spacing: 0.01em;
  margin: 0;
  line-height: 1.05;
  color: rgba(255, 255, 255, 0.92);
  font-size: 1.10rem;
}

.roster-page .roster-subline {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.roster-page .pill {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.82);
}

.roster-page .pill.pill-category {
  border-color: rgba(69, 227, 255, 0.18);
  background: rgba(69, 227, 255, 0.08);
  color: rgba(69, 227, 255, 0.96);
}

.roster-page .pill.pill-live {
  border-color: rgba(255, 59, 92, 0.28);
  background: rgba(255, 59, 92, 0.12);
  color: rgba(255, 255, 255, 0.92);
}

.roster-page .pill.pill-live::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--r-red);
  box-shadow: 0 0 0 4px rgba(255, 59, 92, 0.14);
}

.roster-page .pill.pill-badge {
  border-color: rgba(255, 214, 0, 0.22);
  background: rgba(255, 214, 0, 0.10);
  color: rgba(255, 214, 0, 0.95);
}

.roster-page .roster-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  position: relative;
  z-index: 1;
}

.roster-page .roster-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 36px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(7, 8, 14, 0.55);
  color: rgba(255, 255, 255, 0.80);
  text-decoration: none;
  transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.roster-page .roster-actions a:hover {
  transform: translateY(-1px);
  border-color: rgba(69, 227, 255, 0.22);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.roster-page .roster-actions a:focus-visible {
  outline: none;
  box-shadow: var(--r-ring);
}

.roster-page .roster-actions a.action-primary {
  border-color: rgba(69, 227, 255, 0.18);
  background: linear-gradient(135deg, rgba(69, 227, 255, 0.14), rgba(138, 77, 255, 0.10));
}

.roster-page .roster-empty {
  margin: 40px 0 10px;
  padding: 22px;
  border-radius: var(--r-radius);
  background: var(--r-surface-2);
  border: 1px dashed rgba(255, 255, 255, 0.14);
  color: var(--r-muted);
  text-align: center;
}

.roster-page .loading-indicator {
  margin: 36px 0 10px;
}

@media (max-width: 991.98px) {
  .roster-page .hero-roster {
    padding: 92px 0 46px;
  }
  .roster-page .roster-controls-top {
    grid-template-columns: 1fr;
  }
  .roster-page .roster-toggles {
    justify-content: flex-start;
  }
  .roster-page .roster-sort .form-select {
    min-width: 0;
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .roster-page * {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}
