/* ===== CEBL Scout - Honey Badgers Theme ===== */
:root {
  --black: #0A0A0A;
  --dark: #111111;
  --dark-2: #1A1A1A;
  --dark-3: #222222;
  --dark-4: #2A2A2A;
  --gold: #D4AF37;
  --gold-light: #FFD700;
  --gold-dark: #B8860B;
  --gold-muted: rgba(212, 175, 55, 0.15);
  --gold-glow: rgba(212, 175, 55, 0.3);
  --white: #F5F5F5;
  --gray: #888888;
  --gray-light: #AAAAAA;
  --green: #4CAF50;
  --red: #E53935;
  --blue: #42A5F5;
  --orange: #FF9800;
  --radius: 12px;
  --radius-sm: 8px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--black);
  color: var(--white);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ===== Auth Gate ===== */
#auth-gate {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: var(--black);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s, visibility 0.5s;
}
#auth-gate.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.gate-content { text-align: center; max-width: 420px; padding: 2rem; width: 100%; }
.gate-logo-row { margin-bottom: 1rem; }
.gate-cebl-logo { height: 60px; filter: brightness(0) invert(1); opacity: 0.9; }
.gate-content h2 {
  font-family: 'Oswald', sans-serif;
  font-size: 2.5rem;
  letter-spacing: 6px;
  margin: 0.5rem 0 0.25rem;
}
.gate-sub { font-size: 0.75rem; color: var(--gray); letter-spacing: 1px; margin-bottom: 2rem; }
.gate-form-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.gate-form-group input {
  padding: 0.85rem 1rem;
  background: var(--dark-2);
  border: 1px solid var(--dark-3);
  border-radius: var(--radius-sm);
  color: var(--white);
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  outline: none;
  transition: var(--transition);
  width: 100%;
}
.gate-form-group input:focus { border-color: var(--gold); }
.gate-btn {
  padding: 0.85rem 1.5rem;
  border: none;
  border-radius: var(--radius-sm);
  font-family: 'Oswald', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 1px;
  cursor: pointer;
  transition: var(--transition);
  width: 100%;
}
.gate-btn.primary {
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  color: var(--black);
}
.gate-btn.primary:hover { transform: scale(1.02); box-shadow: 0 0 20px var(--gold-glow); }
.gate-btn.secondary {
  background: var(--dark-3);
  color: var(--white);
  border: 1px solid var(--gold-dark);
}
.gate-btn.secondary:hover { background: var(--dark-4); }
.gate-btn.gold {
  background: var(--gold);
  color: var(--black);
}
.gate-btn.text {
  background: transparent;
  color: var(--gray);
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 0.75rem;
}
.gate-switch { font-size: 0.8rem; color: var(--gray); margin-top: 0.5rem; }
.gate-switch a { color: var(--gold); text-decoration: none; }
.gate-switch a:hover { text-decoration: underline; }
.gate-error { color: #EF5350; font-size: 0.75rem; min-height: 1rem; margin-top: 0.5rem; }
.gate-note { font-size: 0.625rem; color: var(--gray); margin-top: 1.5rem; opacity: 0.5; }

/* ===== Overlay Screens (Welcome + Paywall) ===== */
.overlay-screen {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s, visibility 0.4s;
}
.overlay-screen.show { opacity: 1; visibility: visible; }
.overlay-card {
  background: var(--dark);
  border: 1px solid var(--dark-3);
  border-radius: var(--radius);
  padding: 2.5rem;
  max-width: 560px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  text-align: center;
}
.welcome-icon { font-size: 3rem; margin-bottom: 0.5rem; }
.welcome-logo { margin-bottom: 1rem; }
.welcome-logo svg { filter: drop-shadow(0 0 12px rgba(212,175,55,0.4)); }
.wf-dot {
  width: 8px;
  height: 8px;
  min-width: 8px;
  border-radius: 50%;
  background: var(--gold);
  display: inline-block;
  margin-right: 0.5rem;
  box-shadow: 0 0 6px var(--gold-glow);
}
.welcome-card h2 { font-family: 'Oswald', sans-serif; font-size: 1.75rem; letter-spacing: 2px; margin-bottom: 0.75rem; }
.welcome-headline { color: var(--gray-light); font-size: 0.875rem; margin-bottom: 1.5rem; line-height: 1.5; }
.welcome-features { text-align: left; margin-bottom: 1.5rem; }
.wf-item { display: flex; align-items: center; gap: 0.5rem; padding: 0.6rem 0; border-bottom: 1px solid var(--dark-3); font-size: 0.8rem; }
.welcome-note { font-size: 0.75rem; color: var(--gray); line-height: 1.5; margin-bottom: 0.75rem; }
.welcome-trial { font-size: 0.8rem; color: var(--gold); }

/* Paywall */
.paywall-card h2 { font-family: 'Oswald', sans-serif; font-size: 1.5rem; letter-spacing: 2px; margin-bottom: 0.5rem; }
.pricing-box { display: flex; gap: 1rem; margin-bottom: 1rem; }
.price-option {
  flex: 1;
  background: var(--dark-2);
  border: 1px solid var(--dark-3);
  border-radius: var(--radius-sm);
  padding: 1.5rem 1rem;
  position: relative;
}
.price-option.featured { border-color: var(--gold); }
.price-badge {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gold);
  color: var(--black);
  font-size: 0.6rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 20px;
  letter-spacing: 0.5px;
}
.price-badge.save { background: #81C784; }
.price-option h3 { font-family: 'Oswald', sans-serif; font-size: 1rem; letter-spacing: 1px; margin-bottom: 0.5rem; }
.price-amount { font-family: 'Oswald', sans-serif; font-size: 2.5rem; font-weight: 700; color: var(--gold); }
.price-cents { font-size: 1.5rem; }
.price-period { font-size: 0.875rem; color: var(--gray); font-weight: 400; }
.price-subtext { font-size: 0.7rem; color: var(--gray); margin-bottom: 0.75rem; }
.price-features { list-style: none; text-align: left; margin: 1rem 0; font-size: 0.75rem; }
.price-features li { padding: 0.25rem 0; color: var(--gray-light); }
.price-option .gate-btn { margin-top: 0.75rem; font-size: 0.75rem; padding: 0.6rem; }

/* User Menu */
.user-menu {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--dark-2);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
}
#user-display { color: var(--white); font-weight: 600; }
.admin-tag {
  background: var(--gold);
  color: var(--black);
  font-size: 0.55rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 4px;
  letter-spacing: 1px;
}
.logout-btn {
  background: none;
  border: none;
  color: var(--gray);
  cursor: pointer;
  font-size: 0.875rem;
  padding: 0 0.25rem;
  transition: var(--transition);
}
.logout-btn:hover { color: #EF5350; }

/* Legacy compat */
.gate-form {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.gate-form input {
  flex: 1;
  padding: 0.75rem 1rem;
  background: var(--dark-2);
  border: 1px solid var(--dark-3);
  border-radius: var(--radius-sm);
  color: var(--white);
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  outline: none;
  transition: var(--transition);
}
.gate-form input:focus { border-color: var(--gold); }
.gate-form button {
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  border: none;
  border-radius: var(--radius-sm);
  color: var(--black);
  font-family: 'Oswald', sans-serif;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 1px;
  cursor: pointer;
  transition: var(--transition);
}
.gate-form button:hover { transform: scale(1.02); box-shadow: 0 0 20px var(--gold-glow); }
.gate-error { color: #EF5350; font-size: 0.75rem; min-height: 1rem; }
.gate-note { font-size: 0.625rem; color: var(--gray); margin-top: 1rem; opacity: 0.5; }

/* ===== Loading Screen ===== */
#loading-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--black);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s, visibility 0.6s;
}
#loading-screen.hidden { opacity: 0; visibility: hidden; pointer-events: none; }

.loader-content { text-align: center; }
.loader-content h2 {
  font-family: 'Oswald', sans-serif;
  font-size: 2rem;
  letter-spacing: 6px;
  color: var(--gold);
  margin-top: 1.5rem;
}
.loader-content p { color: var(--gray); margin-top: 0.5rem; font-size: 0.875rem; }

.basketball-pulse {
  width: 60px; height: 60px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, var(--gold-light), var(--gold-dark));
  margin: 0 auto;
  animation: pulse 1.2s ease-in-out infinite;
  box-shadow: 0 0 30px var(--gold-glow);
}
@keyframes pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 30px var(--gold-glow); }
  50% { transform: scale(1.15); box-shadow: 0 0 50px var(--gold-glow); }
}

.loader-bar {
  width: 200px;
  height: 3px;
  background: var(--dark-3);
  border-radius: 3px;
  margin: 1.5rem auto 0;
  overflow: hidden;
}
.loader-bar-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold-light));
  border-radius: 3px;
  animation: loadFill 2s ease-in-out forwards;
}
@keyframes loadFill { to { width: 100%; } }

/* ===== Header ===== */
#main-header {
  background: linear-gradient(180deg, var(--dark) 0%, var(--black) 100%);
  border-bottom: 1px solid var(--dark-3);
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
}
.header-inner {
  max-width: 1600px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.brand-icon svg { width: 40px; height: 40px; }
.brand h1 {
  font-family: 'Oswald', sans-serif;
  font-size: 1.5rem;
  letter-spacing: 4px;
  font-weight: 700;
}
.gold { color: var(--gold); }
.brand-sub {
  font-size: 0.75rem;
  color: var(--gray);
  letter-spacing: 1px;
}
.header-actions { display: flex; gap: 0.75rem; }
.salary-cap-badge {
  background: var(--gold-muted);
  border: 1px solid rgba(212,175,55,0.3);
  border-radius: var(--radius-sm);
  padding: 0.5rem 1rem;
  text-align: center;
}
.cap-label { display: block; font-size: 0.625rem; color: var(--gray); text-transform: uppercase; letter-spacing: 1px; }
.cap-value { display: block; font-family: 'Oswald', sans-serif; font-size: 1.125rem; color: var(--gold); font-weight: 600; }

/* ===== Navigation ===== */
#main-nav {
  background: var(--dark);
  border-bottom: 1px solid var(--dark-3);
  position: sticky;
  top: 64px;
  z-index: 99;
  overflow-x: auto;
}
.nav-inner {
  max-width: 1600px;
  margin: 0 auto;
  display: flex;
  gap: 0;
  padding: 0 2rem;
}
.nav-tab {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 1.25rem;
  background: none;
  border: none;
  color: var(--gray);
  font-family: 'Inter', sans-serif;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: var(--transition);
}
.nav-tab:hover { color: var(--white); background: var(--dark-2); }
.nav-tab.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
}
.nav-tab svg { opacity: 0.6; }
.nav-tab.active svg { opacity: 1; stroke: var(--gold); }
.admin-nav-tab { border: 1px solid rgba(212,175,55,0.3) !important; }
.admin-nav-tab.active { background: rgba(212,175,55,0.15) !important; }

/* ===== Admin Console ===== */
.admin-stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.admin-stat {
  background: var(--dark-2);
  border: 1px solid var(--dark-3);
  border-radius: var(--radius-sm);
  padding: 1rem;
  text-align: center;
}
.admin-stat.paid { border-color: rgba(76,175,80,0.3); }
.admin-stat.warn { border-color: rgba(255,152,0,0.3); }
.admin-stat.danger { border-color: rgba(229,57,53,0.3); }
.admin-stat-num {
  font-family: 'Oswald', sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--gold);
}
.admin-stat.paid .admin-stat-num { color: #4CAF50; }
.admin-stat.warn .admin-stat-num { color: #FF9800; }
.admin-stat.danger .admin-stat-num { color: #E53935; }
.admin-stat-lbl { font-size: 0.65rem; color: var(--gray); margin-top: 0.25rem; }

.admin-toolbar {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
  align-items: center;
}
.admin-toolbar .search-input { flex: 1; }

.admin-table-wrap { overflow-x: auto; }
.admin-table { font-size: 0.75rem; }
.admin-table th { font-size: 0.65rem; }
.flagged-row { background: rgba(255,152,0,0.05) !important; }
.blocked-row { background: rgba(229,57,53,0.05) !important; opacity: 0.7; }

.admin-badge-paid {
  background: rgba(76,175,80,0.2);
  color: #81C784;
  font-size: 0.55rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}
.admin-badge-free {
  background: rgba(255,255,255,0.05);
  color: var(--gray);
  font-size: 0.55rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
}
.admin-badge-blocked {
  background: rgba(229,57,53,0.2);
  color: #EF9A9A;
  font-size: 0.55rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 4px;
}
.admin-badge-flagged {
  background: rgba(255,152,0,0.2);
  color: #FFB74D;
  font-size: 0.55rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 4px;
  cursor: help;
}

.admin-actions {
  display: flex;
  gap: 4px;
}
.admin-act-btn {
  width: 28px;
  height: 28px;
  border: 1px solid var(--dark-4);
  background: var(--dark-2);
  border-radius: 4px;
  color: var(--gray);
  font-size: 0.65rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}
.admin-act-btn:hover { border-color: var(--gold); color: var(--white); }
.admin-act-btn.grant:hover { border-color: #4CAF50; color: #4CAF50; }
.admin-act-btn.revoke:hover { border-color: #FF9800; color: #FF9800; }
.admin-act-btn.block:hover { border-color: #E53935; color: #E53935; }
.admin-act-btn.unblock:hover { border-color: #4CAF50; color: #4CAF50; }
.admin-act-btn.clear:hover { border-color: #4CAF50; color: #4CAF50; }
.admin-act-btn.reset:hover { border-color: #42A5F5; color: #42A5F5; }

/* ===== Team Bar ===== */
#team-bar {
  background: var(--dark-2);
  border-bottom: 1px solid var(--dark-3);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.team-bar-inner {
  max-width: 1600px;
  margin: 0 auto;
  display: flex;
  gap: 0.5rem;
  padding: 0.625rem 2rem;
  white-space: nowrap;
}
.team-chip {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  border-radius: 20px;
  background: var(--dark-3);
  border: 1px solid var(--dark-4);
  color: var(--gray-light);
  font-family: 'Inter', sans-serif;
  font-size: 0.6875rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}
.team-chip:hover { background: var(--dark-4); color: var(--white); }
.team-chip.active { background: var(--gold-muted); border-color: var(--gold); color: var(--gold); }
.team-chip.hb { border-color: rgba(212,175,55,0.3); }
.team-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.team-chip-logo {
  width: 20px;
  height: 20px;
  object-fit: contain;
  border-radius: 4px;
  flex-shrink: 0;
}
.team-logo-img {
  object-fit: contain;
  border-radius: 4px;
  vertical-align: middle;
  margin-right: 4px;
}

/* ===== Main Content ===== */
#main-content {
  max-width: 1600px;
  margin: 0 auto;
  padding: 1.5rem 2rem 4rem;
}
.tab-content { display: none; animation: fadeIn 0.3s ease; }
.tab-content.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ===== Dashboard Grid ===== */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
.stat-card {
  background: var(--dark-2);
  border: 1px solid var(--dark-3);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: var(--transition);
}
.stat-card:hover { border-color: var(--dark-4); transform: translateY(-2px); }
.stat-card.gold-accent { border-color: rgba(212,175,55,0.3); background: linear-gradient(135deg, var(--dark-2), rgba(212,175,55,0.05)); }
.stat-icon { font-size: 2rem; }
.stat-icon-svg {
  width: 44px;
  height: 44px;
  min-width: 44px;
  background: var(--gold-muted);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
}
.stat-icon-svg svg { width: 28px; height: 28px; }
.stat-number {
  font-family: 'Oswald', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--gold);
  display: block;
}
.stat-label { font-size: 0.75rem; color: var(--gray); }

/* ===== Panels ===== */
.panel {
  background: var(--dark-2);
  border: 1px solid var(--dark-3);
  border-radius: var(--radius);
  padding: 1.5rem;
  overflow: hidden;
}
.panel.full-width { grid-column: 1 / -1; }
.panel.half-width { grid-column: span 2; }
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}
.panel-header h2 {
  font-family: 'Oswald', sans-serif;
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: 1px;
}
.badge {
  font-size: 0.6875rem;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  background: var(--dark-4);
  color: var(--gray-light);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.badge.gold { background: var(--gold-muted); color: var(--gold); border: 1px solid rgba(212,175,55,0.3); }

/* ===== Roster Grid ===== */
.roster-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
}
.roster-card {
  background: var(--dark-3);
  border-radius: var(--radius-sm);
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border: 1px solid var(--dark-4);
  transition: var(--transition);
}
.roster-card:hover { border-color: var(--gold); transform: translateY(-1px); }
.roster-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Oswald', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--black);
  flex-shrink: 0;
}
.roster-card-info h4 { font-size: 0.875rem; font-weight: 600; }
.roster-card-info .roster-meta {
  font-size: 0.6875rem;
  color: var(--gray);
  margin-top: 0.125rem;
}
.roster-card-info .roster-stat {
  font-size: 0.6875rem;
  color: var(--gold);
  margin-top: 0.25rem;
  font-weight: 500;
}

/* ===== Cap Visual ===== */
.cap-bar-container { margin-bottom: 1rem; }
.cap-bar-bg {
  height: 24px;
  background: var(--dark-4);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}
.cap-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold), var(--gold-light));
  border-radius: 12px;
  transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 15px var(--gold-glow);
}
.cap-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.6875rem;
  color: var(--gray);
  margin-top: 0.5rem;
}
.cap-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}
.cap-detail-item {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem;
  background: var(--dark-3);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
}
.cap-detail-item .cdl { color: var(--gray); }
.cap-detail-item .cdv { color: var(--gold); font-weight: 600; }

/* ===== Rules ===== */
.rules-list { display: grid; gap: 0.5rem; }
.rule-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.75rem;
  background: var(--dark-3);
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
}
.rule-item.highlight { border: 1px solid rgba(212,175,55,0.3); background: rgba(212,175,55,0.05); }
.rule-num {
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--gold);
  min-width: 32px;
  text-align: center;
}

/* ===== Scout Targets ===== */
.scout-targets {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}
.scout-card {
  background: var(--dark-3);
  border: 1px solid var(--dark-4);
  border-radius: var(--radius);
  padding: 1.25rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.scout-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold-light));
  opacity: 0;
  transition: var(--transition);
}
.scout-card:hover { border-color: var(--gold); transform: translateY(-2px); }
.scout-card:hover::before { opacity: 1; }
.scout-card-top {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.scout-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  color: var(--black);
  font-size: 1rem;
  flex-shrink: 0;
}
.scout-name { font-weight: 700; font-size: 1rem; }
.scout-detail { font-size: 0.75rem; color: var(--gray); }
.scout-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin: 0.75rem 0;
}
.scout-stat-item {
  text-align: center;
  padding: 0.5rem;
  background: var(--dark-4);
  border-radius: var(--radius-sm);
}
.scout-stat-val {
  font-family: 'Oswald', sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--gold);
}
.scout-stat-lbl { font-size: 0.625rem; color: var(--gray); text-transform: uppercase; letter-spacing: 0.5px; }
.scout-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-top: 0.75rem;
}
.scout-tag {
  font-size: 0.625rem;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  background: var(--dark-4);
  color: var(--gray-light);
}
.scout-tag.fit-high { background: rgba(76,175,80,0.2); color: #81C784; }
.scout-tag.fit-medium { background: rgba(255,152,0,0.2); color: #FFB74D; }
.scout-tag.canadian { background: rgba(212,175,55,0.15); color: var(--gold); }
.scout-salary {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--dark-4);
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
}
.scout-salary-val { color: var(--gold); font-weight: 600; }

/* ===== Tab Headers ===== */
.tab-header-row {
  margin-bottom: 1.5rem;
}
.tab-header-row h2 {
  font-family: 'Oswald', sans-serif;
  font-size: 1.5rem;
  letter-spacing: 1px;
  margin-bottom: 0.25rem;
}
.tab-subtitle { font-size: 0.8125rem; color: var(--gray); margin-bottom: 1rem; }

/* ===== Filters ===== */
.filter-row {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}
.search-input {
  flex: 1;
  min-width: 200px;
  padding: 0.625rem 1rem;
  background: var(--dark-2);
  border: 1px solid var(--dark-3);
  border-radius: var(--radius-sm);
  color: var(--white);
  font-family: 'Inter', sans-serif;
  font-size: 0.8125rem;
  outline: none;
  transition: var(--transition);
}
.search-input:focus { border-color: var(--gold); }
.search-input::placeholder { color: var(--gray); }
.filter-select {
  padding: 0.625rem 1rem;
  background: var(--dark-2);
  border: 1px solid var(--dark-3);
  border-radius: var(--radius-sm);
  color: var(--white);
  font-family: 'Inter', sans-serif;
  font-size: 0.8125rem;
  cursor: pointer;
  outline: none;
  transition: var(--transition);
}
.filter-select:focus { border-color: var(--gold); }

/* ===== Data Tables ===== */
.table-container {
  overflow-x: auto;
  border: 1px solid var(--dark-3);
  border-radius: var(--radius);
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}
.data-table thead {
  background: var(--dark-2);
  position: sticky;
  top: 0;
}
.data-table th {
  padding: 0.875rem 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gray);
  border-bottom: 1px solid var(--dark-3);
  white-space: nowrap;
  cursor: pointer;
}
.data-table th:hover { color: var(--gold); }
.data-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--dark-3);
  white-space: nowrap;
}
.data-table tbody tr { transition: var(--transition); }
.data-table tbody tr:hover { background: rgba(212,175,55,0.05); }
.data-table .player-cell {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}
.data-table .player-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--dark-4), var(--dark-3));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--gold);
  flex-shrink: 0;
  border: 1px solid var(--dark-4);
}
.data-table .player-name { font-weight: 600; }
.fit-badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.6875rem;
  font-weight: 600;
}
.fit-high { background: rgba(76,175,80,0.2); color: #81C784; }
.fit-medium { background: rgba(255,152,0,0.2); color: #FFB74D; }
.fit-low { background: rgba(233,57,53,0.2); color: #EF9A9A; }
.character-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.6875rem;
}
.char-good { background: rgba(76,175,80,0.15); color: #81C784; }
.char-neutral { background: rgba(158,158,158,0.15); color: #BDBDBD; }

/* ===== Signings Grid ===== */
.signings-grid {
  display: grid;
  gap: 1rem;
}
.signing-team-section {
  background: var(--dark-2);
  border: 1px solid var(--dark-3);
  border-radius: var(--radius);
  overflow: hidden;
}
.signing-team-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: var(--dark-3);
  border-bottom: 1px solid var(--dark-4);
  cursor: pointer;
}
.signing-team-header:hover { background: var(--dark-4); }
.signing-team-logo {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  flex-shrink: 0;
}
.signing-team-name {
  font-family: 'Oswald', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}
.signing-team-count {
  margin-left: auto;
  font-size: 0.75rem;
  color: var(--gray);
}
.signing-team-name.hb { color: var(--gold); }
.signing-players {
  padding: 0.75rem;
  display: grid;
  gap: 0.5rem;
}
.signing-player {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.75rem;
  background: var(--dark-3);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.signing-player:hover { background: var(--dark-4); }
.sp-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--dark-4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--gold);
  border: 1px solid var(--dark-4);
}
.sp-info { flex: 1; }
.sp-name { font-weight: 600; font-size: 0.875rem; }
.sp-meta { font-size: 0.6875rem; color: var(--gray); }
.sp-type {
  font-size: 0.625rem;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-weight: 600;
}
.type-new { background: rgba(76,175,80,0.2); color: #81C784; }
.type-re { background: rgba(66,165,245,0.2); color: #90CAF9; }
.type-draft { background: rgba(255,152,0,0.2); color: #FFB74D; }

/* ===== Cap Calculator ===== */
.cap-calculator {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1.5rem;
}
.calc-panel {
  background: var(--dark-2);
  border: 1px solid var(--dark-3);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.calc-panel h3 {
  font-family: 'Oswald', sans-serif;
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
}
.calc-desc { font-size: 0.8125rem; color: var(--gray); margin-bottom: 1.25rem; }
.calc-slots { display: grid; gap: 0.5rem; }
.calc-slot {
  display: grid;
  grid-template-columns: 30px 1.5fr 0.5fr 100px;
  gap: 0.75rem;
  align-items: center;
  padding: 0.5rem 0.75rem;
  background: var(--dark-3);
  border-radius: var(--radius-sm);
  border: 1px solid var(--dark-4);
}
.calc-slot-num {
  font-family: 'Oswald', sans-serif;
  font-size: 0.875rem;
  color: var(--gray);
  text-align: center;
}
.calc-slot input[type="text"] {
  background: var(--dark-4);
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 0.375rem 0.5rem;
  color: var(--white);
  font-family: 'Inter', sans-serif;
  font-size: 0.8125rem;
  outline: none;
  width: 100%;
}
.calc-slot input[type="text"]:focus { border-color: var(--gold); }
.calc-slot select {
  background: var(--dark-4);
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 0.375rem 0.5rem;
  color: var(--white);
  font-size: 0.75rem;
  outline: none;
}
.calc-slot input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 4px;
  background: var(--dark-4);
  border-radius: 4px;
  outline: none;
}
.calc-slot input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--gold);
  cursor: pointer;
}
.calc-summary {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--dark-4);
}
.calc-total, .calc-remaining {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}
.calc-total span:last-child { font-family: 'Oswald', sans-serif; font-size: 1.25rem; color: var(--gold); font-weight: 700; }
.calc-remaining span:last-child { font-family: 'Oswald', sans-serif; font-size: 1.125rem; color: var(--green); font-weight: 600; }
.calc-bar-container { margin-top: 0.75rem; }
.calc-bar-bg {
  height: 12px;
  background: var(--dark-4);
  border-radius: 6px;
  overflow: hidden;
}
.calc-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold));
  border-radius: 6px;
  transition: width 0.5s;
  width: 0%;
}
.salary-tiers { display: grid; gap: 1rem; }
.tier { padding: 0; }
.tier-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.375rem;
}
.tier-label { font-weight: 600; font-size: 0.8125rem; }
.tier-range { font-size: 0.75rem; color: var(--gold); font-family: 'Oswald', sans-serif; }
.tier-bar { height: 6px; border-radius: 3px; margin-bottom: 0.375rem; }
.tier p { font-size: 0.6875rem; color: var(--gray); }
.highlight-tier {
  background: var(--gold-muted);
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(212,175,55,0.2);
}

/* ===== Footer ===== */
footer {
  background: var(--dark);
  border-top: 1px solid var(--dark-3);
  padding: 2rem;
  text-align: center;
}
.footer-inner { max-width: 1600px; margin: 0 auto; }
.footer-brand {
  font-family: 'Oswald', sans-serif;
  font-size: 0.875rem;
  letter-spacing: 2px;
  color: var(--gold);
  margin-bottom: 0.5rem;
}
.footer-links { font-size: 0.6875rem; color: var(--gray); margin-bottom: 0.375rem; }
.footer-note { font-size: 0.625rem; color: var(--gray); opacity: 0.6; }

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--dark); }
::-webkit-scrollbar-thumb { background: var(--dark-4); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray); }

/* ===== Mobile Card View ===== */
.mobile-cards { display: none; }
.mobile-card {
  background: var(--dark-2);
  border: 1px solid var(--dark-3);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 0.75rem;
  transition: var(--transition);
}
.mobile-card:hover { border-color: var(--gold-dark); }
.mobile-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.mobile-card-header .player-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  color: var(--black); display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 0.8rem; flex-shrink: 0;
}
.mobile-card-header .mc-info { flex: 1; min-width: 0; }
.mobile-card-header .mc-name { font-weight: 700; font-size: 0.9rem; color: var(--white); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mobile-card-header .mc-meta { font-size: 0.7rem; color: var(--gray); margin-top: 2px; }
.mc-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  text-align: center;
}
.mc-stat-val { font-weight: 700; font-size: 1rem; color: var(--white); }
.mc-stat-lbl { font-size: 0.6rem; color: var(--gray); text-transform: uppercase; letter-spacing: 1px; }
.mc-details {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
}
.mc-tag {
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.6rem;
  font-weight: 600;
  background: var(--dark-3);
  color: var(--light-gray);
  white-space: nowrap;
}
.mc-tag.fit-high { background: rgba(76,175,80,0.15); color: #81C784; border: 1px solid rgba(76,175,80,0.3); }
.mc-tag.fit-medium { background: rgba(255,183,28,0.15); color: #FFB81C; border: 1px solid rgba(255,183,28,0.3); }
.mc-tag.fit-low { background: rgba(239,83,80,0.15); color: #EF9A9A; border: 1px solid rgba(239,83,80,0.3); }
.mc-tag.gold { background: rgba(212,175,55,0.15); color: var(--gold); border: 1px solid rgba(212,175,55,0.3); }
.mc-note { font-size: 0.65rem; color: var(--gray); line-height: 1.4; }

/* ===== Responsive ===== */
@media (max-width: 1200px) {
  .dashboard-grid { grid-template-columns: repeat(2, 1fr); }
  .panel.half-width { grid-column: span 1; }
  .cap-calculator { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  /* Switch tables to card view */
  .table-wrap { display: none !important; }
  .mobile-cards { display: block !important; }

  /* Nav tabs: scrollable, compact */
  .nav-tab { padding: 0.6rem 0.75rem; font-size: 0.7rem; gap: 0.35rem; white-space: nowrap; }
  .nav-tab svg { width: 14px; height: 14px; }

  /* Team bar: smaller chips */
  .team-chip { padding: 0.4rem 0.75rem; font-size: 0.65rem; }

  /* Filter row: stack */
  .filter-row { flex-direction: column; gap: 0.5rem; }
  .filter-row input, .filter-row select { width: 100%; font-size: 0.8rem; }

  /* Header */
  #main-header { padding: 0.75rem 1rem; }
  .brand h1 { font-size: 1.2rem; letter-spacing: 3px; }
  .brand-sub { font-size: 0.55rem; }
  .header-actions { display: none; }
  .brand-icon svg { width: 28px; height: 28px; }

  /* Content */
  #main-content { padding: 0.75rem; }

  /* Dashboard */
  .dashboard-grid { grid-template-columns: 1fr; gap: 0.75rem; }
  .panel.half-width { grid-column: 1; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
  .stat-number { font-size: 1.5rem; }

  /* Scout targets */
  .scout-targets { grid-template-columns: 1fr; }

  /* Roster cards */
  .roster-card { padding: 0.75rem; }

  /* Signings */
  .signing-player { padding: 0.6rem; }

  /* Cap calculator */
  .calc-slot { grid-template-columns: 30px 1fr 80px; }
  .calc-slot input[type="range"] { display: none; }

  /* Gate */
  .gate-content h2 { font-size: 1.8rem; letter-spacing: 4px; }
  .gate-form { flex-direction: column; }
  .gate-form input, .gate-form button { width: 100%; }
}

@media (max-width: 480px) {
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .stat-number { font-size: 1.25rem; }
  .stat-label { font-size: 0.55rem; }
  #main-content { padding: 0.5rem; }
  .panel { padding: 0.75rem; }
  .panel-header h3 { font-size: 0.8rem; }
  .mc-stats { grid-template-columns: repeat(3, 1fr); }
  .nav-tab span { display: none; }
  .nav-tab svg { width: 18px; height: 18px; }
  .nav-tab { padding: 0.6rem 1rem; }
}

/* ===== Onboarding Tutorial ===== */
#onboard-root {
  position: fixed;
  inset: 0;
  z-index: 8000;
  transition: opacity 0.4s;
}
.ob-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  cursor: pointer;
}
.ob-card {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 380px;
  max-width: calc(100vw - 2rem);
  background: var(--dark);
  border: 1px solid var(--dark-3);
  border-radius: var(--radius);
  padding: 1.5rem;
  color: var(--white);
  box-shadow: 0 12px 40px rgba(0,0,0,0.6);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s, transform 0.3s;
  z-index: 8001;
}
.ob-card.visible { opacity: 1; transform: translateY(0); }
.ob-card.wide { width: 500px; }
.ob-step-label {
  font-size: 0.6rem;
  color: var(--gold);
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.ob-title {
  font-family: 'Oswald', sans-serif;
  font-size: 1.15rem;
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
}
.ob-text {
  font-size: 0.825rem;
  color: var(--gray-light);
  line-height: 1.55;
  margin-bottom: 1rem;
}
.ob-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 1rem;
}
.ob-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--dark-4);
  transition: var(--transition);
}
.ob-dot.on {
  background: var(--gold);
  box-shadow: 0 0 6px var(--gold-glow);
}
.ob-btns {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ob-nav { display: flex; gap: 0.5rem; }
.ob-btn {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: var(--radius-sm);
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.ob-btn.ob-next {
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  color: var(--black);
}
.ob-btn.ob-next:hover { transform: scale(1.04); box-shadow: 0 0 12px var(--gold-glow); }
.ob-btn.ob-prev {
  background: var(--dark-3);
  color: var(--white);
  border: 1px solid var(--dark-4);
}
.ob-btn.ob-prev:hover { background: var(--dark-4); }
.ob-btn.ob-skip {
  background: transparent;
  color: var(--gray);
  font-size: 0.7rem;
}
.ob-btn.ob-skip:hover { color: var(--white); }

/* Onboarding Team Picker */
.ob-teams {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin: 1rem 0;
}
.ob-team {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.75rem;
  background: var(--dark-2);
  border: 1px solid var(--dark-3);
  border-radius: var(--radius-sm);
  color: var(--white);
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  text-align: left;
}
.ob-team:hover { border-color: var(--gold); background: var(--dark-3); transform: scale(1.03); }

/* Agent tag */
.mc-tag.agent-tag {
  background: rgba(100, 100, 255, 0.15);
  color: #8888ff;
}

@media (max-width: 600px) {
  .ob-card { bottom: 1rem; right: 1rem; left: 1rem; width: auto; }
  .ob-card.wide { width: auto; }
  .ob-teams { grid-template-columns: 1fr; }
  .ob-team { font-size: 0.65rem; }
}

/* ===== Live Update Indicator ===== */
.live-indicator {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(76, 175, 80, 0.1);
  border: 1px solid rgba(76, 175, 80, 0.3);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.75rem;
  cursor: default;
}
.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4CAF50;
  animation: livePulse 2s ease-in-out infinite;
  box-shadow: 0 0 6px rgba(76, 175, 80, 0.5);
}
@keyframes livePulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 6px rgba(76,175,80,0.5); }
  50% { opacity: 0.4; box-shadow: 0 0 2px rgba(76,175,80,0.2); }
}
.live-text {
  font-family: 'Oswald', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: #4CAF50;
}
.live-indicator.checking .live-dot { background: var(--gold); box-shadow: 0 0 6px var(--gold-glow); animation: none; }
.live-indicator.checking .live-text { color: var(--gold); }
.live-indicator.error .live-dot { background: var(--red); box-shadow: 0 0 6px rgba(229,57,53,0.5); animation: none; }
.live-indicator.error .live-text { color: var(--red); }
.live-last-update {
  font-size: 0.55rem;
  color: var(--gray);
  margin-left: 0.25rem;
}

/* ===== Player Profile Modal ===== */
.player-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9500;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}
.player-modal-overlay.show {
  opacity: 1;
  visibility: visible;
}
.player-modal {
  background: var(--dark);
  border: 1px solid var(--dark-3);
  border-radius: var(--radius);
  width: 95%;
  max-width: 1000px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  padding: 2rem;
  animation: modalSlide 0.3s ease;
}
@keyframes modalSlide {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.player-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--dark-3);
  border: 1px solid var(--dark-4);
  color: var(--white);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  z-index: 10;
}
.player-modal-close:hover { background: var(--red); border-color: var(--red); }

/* Player Profile Header */
.pm-header {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--dark-3);
}
.pm-avatar {
  width: 80px;
  height: 80px;
  min-width: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Oswald', sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--black);
}
.pm-info h2 {
  font-family: 'Oswald', sans-serif;
  font-size: 1.75rem;
  letter-spacing: 1px;
  margin-bottom: 0.25rem;
}
.pm-bio-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.5rem;
}
.pm-bio-item {
  font-size: 0.75rem;
  color: var(--gray);
}
.pm-bio-item strong {
  color: var(--white);
}
.pm-bio-item .pm-val {
  color: var(--gold);
  font-weight: 600;
}

/* Tab Switcher inside modal */
.pm-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--dark-3);
}
.pm-tab {
  padding: 0.75rem 1.25rem;
  background: none;
  border: none;
  color: var(--gray);
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: var(--transition);
}
.pm-tab:hover { color: var(--white); }
.pm-tab.active { color: var(--gold); border-bottom-color: var(--gold); }
.pm-tab-content { display: none; }
.pm-tab-content.active { display: block; }

/* Career Stats Table */
.career-table-wrap {
  overflow-x: auto;
  margin-bottom: 1rem;
}
.career-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.75rem;
}
.career-table th {
  background: var(--dark-2);
  color: var(--gray);
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.6rem 0.5rem;
  text-align: center;
  white-space: nowrap;
  border-bottom: 2px solid var(--dark-4);
  position: sticky;
  top: 0;
}
.career-table td {
  padding: 0.5rem 0.5rem;
  text-align: center;
  border-bottom: 1px solid var(--dark-3);
  white-space: nowrap;
}
.career-table tr:hover {
  background: var(--dark-2);
}
.career-table .season-col { text-align: left; font-weight: 600; color: var(--gold); }
.career-table .team-col { text-align: left; }
.career-table .league-col { font-size: 0.65rem; color: var(--gray); }
.career-table .highlight-stat { color: var(--gold); font-weight: 700; }
.career-table .career-avg-row {
  background: var(--dark-2);
  font-weight: 700;
  border-top: 2px solid var(--gold-dark);
}
.career-table .career-avg-row td { color: var(--gold); }
.career-table .nba-row { background: rgba(66, 165, 245, 0.05); }
.career-table .cebl-row { background: rgba(212, 175, 55, 0.05); }

/* Medical History */
.medical-timeline {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.medical-entry {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem;
  background: var(--dark-2);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--gray);
}
.medical-entry.severity-minor { border-left-color: #81C784; }
.medical-entry.severity-moderate { border-left-color: #FFB74D; }
.medical-entry.severity-major { border-left-color: #E57373; }
.medical-date {
  font-family: 'Oswald', sans-serif;
  font-size: 0.8rem;
  color: var(--gold);
  min-width: 80px;
}
.medical-details h4 {
  font-size: 0.85rem;
  margin-bottom: 0.25rem;
}
.medical-details p {
  font-size: 0.7rem;
  color: var(--gray);
}
.medical-severity {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  margin-left: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.medical-severity.minor { background: rgba(129,199,132,0.2); color: #81C784; }
.medical-severity.moderate { background: rgba(255,183,77,0.2); color: #FFB74D; }
.medical-severity.major { background: rgba(229,115,115,0.2); color: #E57373; }
.medical-games-out {
  font-size: 0.7rem;
  color: var(--gray-light);
  margin-top: 0.25rem;
}
.no-medical {
  text-align: center;
  padding: 2rem;
  color: var(--gray);
  font-size: 0.85rem;
}

/* ===== Team Stats Page ===== */
.team-stats-standings {
  overflow-x: auto;
  margin-bottom: 2rem;
}
.standings-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}
.standings-table th {
  background: var(--dark-2);
  color: var(--gray);
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.75rem 0.75rem;
  text-align: center;
  border-bottom: 2px solid var(--dark-4);
}
.standings-table th:first-child { text-align: left; }
.standings-table td {
  padding: 0.65rem 0.75rem;
  text-align: center;
  border-bottom: 1px solid var(--dark-3);
}
.standings-table td:first-child { text-align: left; }
.standings-table tr:hover { background: var(--dark-2); }
.standings-table .team-name-cell {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.standings-table .team-dot-lg {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  min-width: 12px;
}
.standings-table .team-name-text {
  font-weight: 600;
  color: var(--white);
}
.standings-table .win-col { color: #81C784; font-weight: 600; }
.standings-table .loss-col { color: #E57373; }
.standings-table .pct-col { color: var(--gold); font-weight: 700; }
.standings-table .leader-cell { font-size: 0.7rem; color: var(--gray-light); text-align: left; }
.standings-table .best-stat { color: var(--gold); font-weight: 700; }

.team-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
}
.team-stat-card {
  background: var(--dark-2);
  border: 1px solid var(--dark-3);
  border-radius: var(--radius);
  padding: 1.25rem;
  transition: var(--transition);
  border-top: 3px solid var(--gray);
}
.team-stat-card:hover { border-color: var(--dark-4); transform: translateY(-2px); }
.tsc-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.tsc-emoji { font-size: 1.5rem; }
.tsc-name {
  font-family: 'Oswald', sans-serif;
  font-size: 1rem;
  letter-spacing: 1px;
}
.tsc-record {
  margin-left: auto;
  font-family: 'Oswald', sans-serif;
  font-size: 1.1rem;
  color: var(--gold);
}
.tsc-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.tsc-stat {
  text-align: center;
  padding: 0.5rem 0.25rem;
  background: var(--dark-3);
  border-radius: var(--radius-sm);
}
.tsc-stat-val {
  font-family: 'Oswald', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--white);
}
.tsc-stat-lbl {
  font-size: 0.55rem;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.tsc-leaders {
  border-top: 1px solid var(--dark-3);
  padding-top: 0.75rem;
}
.tsc-leader-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  padding: 0.2rem 0;
}
.tsc-leader-label { color: var(--gray); }
.tsc-leader-val { color: var(--gold); font-weight: 600; }

/* Clickable player rows */
.data-table tbody tr[data-clickable],
.mobile-card[data-clickable],
.roster-card[data-clickable] {
  cursor: pointer;
}
.data-table tbody tr[data-clickable]:hover {
  background: var(--dark-2) !important;
  outline: 1px solid var(--gold-dark);
}
.mobile-card[data-clickable]:hover,
.roster-card[data-clickable]:hover {
  border-color: var(--gold-dark);
  transform: translateY(-1px);
}
.player-name.has-profile {
  color: var(--gold);
  text-decoration: underline;
  text-decoration-color: rgba(212,175,55,0.3);
  text-underline-offset: 2px;
}

/* No profile available message */
.no-profile {
  text-align: center;
  padding: 3rem 2rem;
}
.no-profile h3 {
  font-family: 'Oswald', sans-serif;
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}
.no-profile p {
  color: var(--gray);
  font-size: 0.85rem;
}

@media (max-width: 768px) {
  .player-modal { padding: 1.25rem; width: 98%; }
  .pm-header { flex-direction: column; align-items: center; text-align: center; }
  .pm-bio-row { justify-content: center; }
  .pm-avatar { width: 60px; height: 60px; font-size: 1.25rem; }
  .pm-info h2 { font-size: 1.25rem; }
  .career-table { font-size: 0.65rem; }
  .career-table th, .career-table td { padding: 0.4rem 0.3rem; }
  .tsc-stats { grid-template-columns: repeat(2, 1fr); }
  .team-stats-grid { grid-template-columns: 1fr; }
  .live-indicator { padding: 0.3rem 0.5rem; }
  .live-text { font-size: 0.6rem; letter-spacing: 1px; }
}

/* ===== Saved Roster Builds ===== */
.calc-build-actions {
  display: flex;
  gap: 0.75rem;
  margin: 1rem 0;
}
.build-btn {
  padding: 0.6rem 1.2rem;
  border: 1px solid var(--gold-dark);
  border-radius: 6px;
  background: var(--dark-3);
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.build-btn:hover { background: var(--dark-4); border-color: var(--gold); }
.build-btn.save-btn { background: linear-gradient(135deg, var(--gold-dark), var(--gold)); color: var(--black); }
.build-btn.save-btn:hover { box-shadow: 0 0 12px rgba(212,175,55,0.4); }
.build-btn.reset-btn { color: var(--text-dim); }

.saved-build-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  margin-bottom: 0.5rem;
  background: var(--dark-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: border-color 0.2s;
}
.saved-build-card:hover { border-color: var(--gold-dark); }
.sb-info { flex: 1; min-width: 0; }
.sb-name { font-weight: 600; color: var(--text); margin-bottom: 0.15rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-meta { font-size: 0.75rem; color: var(--text-dim); }
.sb-actions { display: flex; gap: 0.5rem; margin-left: 0.75rem; flex-shrink: 0; }
.sb-btn {
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--dark-3);
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
}
.sb-btn.load { color: var(--gold); border-color: var(--gold-dark); }
.sb-btn.load:hover { background: var(--gold-dark); color: var(--black); }
.sb-btn.delete { color: #e74c3c; border-color: #5a2020; }
.sb-btn.delete:hover { background: #5a2020; color: #fff; }
.no-builds { color: var(--text-dim); font-size: 0.85rem; text-align: center; padding: 1.5rem; }

/* ===== PRO Badge & Feature Gate ===== */
.pro-badge {
  display: none;
  font-size: 0.5rem;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  color: var(--black);
  margin-left: 0.35rem;
  vertical-align: middle;
  line-height: 1;
}

.feature-gate-card {
  max-width: 440px;
  text-align: center;
}
.feature-gate-card h2 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}
.feature-gate-perks {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 1.25rem 0;
  text-align: left;
}
.fg-perk {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.75rem;
  background: var(--dark-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.8rem;
  color: var(--text);
}
.fg-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  color: var(--black);
  font-size: 0.85rem;
  font-weight: 700;
  flex-shrink: 0;
}
.feature-gate-pricing {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1rem;
}
.feature-gate-pricing .gate-btn {
  width: 100%;
}

/* ===== NEW Badge ===== */
.new-badge {
  font-size: 0.45rem;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 0.12rem 0.35rem;
  border-radius: 3px;
  background: #2E7D32;
  color: #fff;
  margin-left: 0.35rem;
  vertical-align: middle;
  line-height: 1;
}

/* ===== Section Titles ===== */
.section-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--gold);
  margin: 2rem 0 1rem;
  letter-spacing: 0.5px;
}

/* ===== Canadian Pipeline ===== */
.pipeline-summary { margin-bottom: 1.5rem; }
.pipeline-stat-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.pipeline-stat {
  flex: 1;
  min-width: 100px;
  padding: 1rem;
  background: var(--dark-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  text-align: center;
}
.pipeline-stat.nba { border-color: #C9082A; }
.pipeline-stat.gleague { border-color: #1D428A; }
.pipeline-stat.europe { border-color: #2E7D32; }
.pipeline-stat.aus { border-color: #FFB81C; }
.pipeline-stat.cebl-tier { border-color: var(--gold); }
.ps-num { font-size: 1.5rem; font-weight: 800; color: var(--text); }
.ps-label { font-size: 0.7rem; color: var(--text-dim); margin-top: 0.25rem; text-transform: uppercase; letter-spacing: 0.5px; }

.pipeline-tier-section { margin-bottom: 1rem; }
.pt-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 1rem;
  background: var(--dark-2);
  border-radius: 8px;
  margin-bottom: 0.5rem;
}
.pt-label { font-weight: 700; font-size: 0.95rem; }
.pt-count { font-size: 0.75rem; color: var(--text-dim); margin-left: auto; }

.pt-player {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--border);
  transition: background 0.2s;
}
.pt-player:hover { background: var(--dark-2); }
.pt-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--dark-3);
  border: 1px solid var(--gold-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--gold);
  flex-shrink: 0;
}
.pt-info { min-width: 0; flex: 1; }
.pt-name { font-weight: 600; font-size: 0.85rem; color: var(--text); }
.pt-meta { font-size: 0.7rem; color: var(--text-dim); }
.pt-team-info { text-align: right; min-width: 140px; }
.pt-team { font-size: 0.8rem; font-weight: 600; color: var(--text); }
.pt-league { font-size: 0.65rem; color: var(--text-dim); }
.pt-stats-mini {
  display: flex;
  gap: 0.5rem;
  font-size: 0.7rem;
  color: var(--text-dim);
  min-width: 160px;
}
.pt-stats-mini span { white-space: nowrap; }
.pt-status {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  text-transform: uppercase;
  flex-shrink: 0;
}
.pt-status.active { background: rgba(46,125,50,0.2); color: #81C784; }
.pt-status.fa { background: rgba(255,183,77,0.2); color: #FFB74D; }

/* ===== Elam Ending Analytics ===== */
.elam-overview, .target-overview { margin-bottom: 1.5rem; }
.elam-stat-row, .target-stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.elam-stat, .target-stat {
  padding: 1rem 0.75rem;
  background: var(--dark-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  text-align: center;
}
.target-stat.highlight { border-color: var(--gold); background: rgba(212,175,55,0.08); }
.es-num, .ts-num { font-size: 1.4rem; font-weight: 800; color: var(--text); }
.es-label, .ts-label { font-size: 0.6rem; color: var(--text-dim); margin-top: 0.25rem; text-transform: uppercase; letter-spacing: 0.5px; }
.elam-explainer, .target-explainer {
  font-size: 0.8rem;
  color: var(--text-dim);
  line-height: 1.6;
  padding: 0.75rem 1rem;
  background: var(--dark-2);
  border-radius: 8px;
  border-left: 3px solid var(--gold-dark);
}
.elam-table { font-size: 0.8rem; }
.elam-table th, .elam-table td { padding: 0.6rem 0.75rem; white-space: nowrap; }

/* Clutch Grid */
.clutch-grid, .target-leaders-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 0.75rem;
}
.clutch-card, .target-leader-card {
  display: grid;
  grid-template-columns: 30px 1fr auto auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: var(--dark-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: border-color 0.2s;
}
.clutch-card:hover, .target-leader-card:hover { border-color: var(--gold-dark); }
.clutch-card.top-3, .target-leader-card.top-3 { border-color: var(--gold-dark); background: rgba(212,175,55,0.05); }
.clutch-rank, .tl-rank {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--gold);
  text-align: center;
}
.clutch-info, .tl-info { min-width: 0; }
.clutch-name, .tl-name { font-weight: 600; font-size: 0.85rem; color: var(--text); }
.clutch-team, .tl-team { font-size: 0.7rem; color: var(--text-dim); }
.clutch-stats, .tl-stats {
  display: flex;
  gap: 0.75rem;
}
.clutch-stat, .tl-stat { text-align: center; }
.cs-val, .tls-val { font-size: 0.85rem; font-weight: 700; color: var(--text); display: block; }
.cs-lbl, .tls-lbl { font-size: 0.55rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.3px; }
.clutch-rating {
  width: 80px;
  position: relative;
  padding-top: 16px;
}
.cr-bar {
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold));
}
.cr-val {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--gold);
  position: absolute;
  right: 0;
  top: 0;
}

/* Target Insights */
.target-insights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.target-insight-card {
  padding: 1rem;
  background: var(--dark-2);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.target-insight-card h4 {
  font-size: 0.85rem;
  color: var(--gold);
  margin-bottom: 0.5rem;
}
.target-insight-card p {
  font-size: 0.75rem;
  color: var(--text-dim);
  line-height: 1.5;
}

/* ===== Advanced Stats ===== */
.adv-glossary-toggle { margin-bottom: 0.75rem; }
.adv-glossary {
  display: none;
  background: var(--dark-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
}
.adv-glossary.show { display: block; }
.adv-glossary-item {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-bottom: 0.4rem;
  line-height: 1.5;
}
.adv-glossary-item strong { color: var(--gold); }
.adv-table td { vertical-align: middle; }
.adv-cell { display: flex; flex-direction: column; gap: 0.2rem; }
.adv-bar {
  width: 60px;
  height: 4px;
  background: var(--dark-4);
  border-radius: 2px;
  overflow: hidden;
}
.adv-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.4s ease;
}
.role-badge {
  font-size: 0.6rem;
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  background: var(--dark-3);
  border: 1px solid var(--border);
  color: var(--text-dim);
  white-space: nowrap;
}

/* ===== Player Comparison ===== */
.compare-selectors {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.compare-col { flex: 1; }
.compare-col label {
  display: block;
  font-size: 0.7rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.3rem;
}
.compare-select { width: 100%; }
.compare-vs {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--gold);
  flex-shrink: 0;
}
.compare-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.compare-player-label {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
}
.compare-player-label span {
  font-weight: 400;
  font-size: 0.75rem;
  color: var(--text-dim);
}
.compare-bars { display: flex; flex-direction: column; gap: 0.75rem; }
.compare-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.compare-val {
  width: 55px;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dim);
  flex-shrink: 0;
}
.compare-val.winner { color: var(--gold); font-weight: 800; }
.compare-bar-area {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.compare-label {
  font-size: 0.65rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  text-align: center;
  min-width: 90px;
  flex-shrink: 0;
}
.compare-bar-left, .compare-bar-right {
  flex: 1;
  height: 8px;
  background: var(--dark-3);
  border-radius: 4px;
  overflow: hidden;
}
.compare-bar-left { direction: rtl; }
.compare-fill-left, .compare-fill-right {
  height: 100%;
  border-radius: 4px;
  background: var(--dark-4);
  transition: width 0.4s ease;
}
.compare-fill-left.winner, .compare-fill-right.winner {
  background: linear-gradient(90deg, var(--gold-dark), var(--gold));
}

/* ===== Watchlist ===== */
.watchlist-actions {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.watchlist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 0.75rem;
}
.watchlist-card {
  background: var(--dark-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem;
  transition: border-color 0.2s;
}
.watchlist-card:hover { border-color: var(--gold-dark); }
.wl-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}
.wl-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--dark-3);
  border: 1.5px solid var(--gold-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--gold);
  flex-shrink: 0;
}
.wl-info { flex: 1; min-width: 0; }
.wl-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: rgba(212,175,55,0.3);
}
.wl-name:hover { color: var(--gold); }
.wl-meta { font-size: 0.7rem; color: var(--text-dim); }
.wl-remove {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--dark-3);
  color: var(--text-dim);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}
.wl-remove:hover { background: #5a2020; color: #e74c3c; border-color: #e74c3c; }
.wl-stats {
  display: flex;
  gap: 1rem;
  margin-bottom: 0.5rem;
}
.wl-stat-val { font-size: 1rem; font-weight: 700; color: var(--text); display: block; }
.wl-stat-lbl { font-size: 0.6rem; color: var(--text-dim); text-transform: uppercase; }
.wl-note { font-size: 0.7rem; color: var(--text-dim); line-height: 1.4; }

/* ===== Responsive for new features ===== */
@media (max-width: 768px) {
  .pipeline-stat-row, .elam-stat-row, .target-stat-row { flex-wrap: wrap; }
  .pipeline-stat, .elam-stat, .target-stat { min-width: 80px; }
  .pt-player { flex-wrap: wrap; }
  .pt-team-info { text-align: left; min-width: auto; }
  .pt-stats-mini { min-width: auto; }
  .clutch-grid, .target-leaders-grid { grid-template-columns: 1fr; }
  .compare-selectors { flex-direction: column; }
  .compare-vs { font-size: 1rem; }
  .compare-row { flex-wrap: wrap; }
  .compare-bar-area { order: 3; width: 100%; }
  .watchlist-grid { grid-template-columns: 1fr; }
  .target-insights-grid { grid-template-columns: 1fr; }
}

/* ===== DRILL-DOWN EXPANDABLE CARDS ===== */

/* Pipeline player expandable */
.pt-player { cursor: pointer; position: relative; flex-wrap: wrap; }
.pt-player::after { content: '▼'; position: absolute; top: 12px; right: 12px; font-size: 0.6rem; color: #555; transition: transform 0.2s; }
.pt-player.expanded::after { transform: rotate(180deg); }
.pt-drilldown { display: none; width: 100%; padding: 10px 0 4px 44px; border-top: 1px solid rgba(255,255,255,0.05); margin-top: 8px; }
.pt-player.expanded .pt-drilldown { display: block; }
.pt-detail { font-size: 0.78rem; color: #aaa; margin-bottom: 4px; }
.pt-detail strong { color: #ccc; margin-right: 4px; }

/* Asia / Americas tier stat colors */
.pipeline-stat.asia-tier .ps-num { color: #E91E63; }
.pipeline-stat.americas-tier .ps-num { color: #FF6D00; }

/* Clutch card expandable drill-down */
.clutch-card { cursor: pointer; position: relative; }
.clutch-card::after { content: '▼'; position: absolute; top: 10px; right: 10px; font-size: 0.55rem; color: #555; transition: transform 0.2s; }
.clutch-card.expanded::after { transform: rotate(180deg); }
.clutch-drilldown { display: none; grid-column: 1 / -1; padding-top: 10px; border-top: 1px solid rgba(255,255,255,0.06); margin-top: 8px; }
.clutch-card.expanded .clutch-drilldown { display: block; }

/* Target leader card expandable */
.target-leader-card { cursor: pointer; position: relative; }
.target-leader-card::after { content: '▼'; position: absolute; top: 10px; right: 10px; font-size: 0.55rem; color: #555; transition: transform 0.2s; }
.target-leader-card.expanded::after { transform: rotate(180deg); }
.tl-drilldown { display: none; grid-column: 1 / -1; padding-top: 10px; border-top: 1px solid rgba(255,255,255,0.06); margin-top: 8px; }
.target-leader-card.expanded .tl-drilldown { display: block; }

/* Shared drill-down stat row */
.dd-row { display: flex; gap: 16px; flex-wrap: wrap; }
.dd-stat { text-align: center; min-width: 60px; }
.dd-val { display: block; font-size: 0.9rem; font-weight: 700; color: #D4AF37; }
.dd-lbl { display: block; font-size: 0.65rem; color: #888; text-transform: uppercase; letter-spacing: 0.5px; }

/* Elam play type bars */
.dd-play-types { margin-top: 10px; }
.dd-pt-label { font-size: 0.7rem; color: #888; text-transform: uppercase; margin-bottom: 6px; }
.dd-pt-bars { display: flex; flex-direction: column; gap: 4px; }
.dd-pt-bar { position: relative; height: 18px; background: rgba(255,255,255,0.04); border-radius: 3px; overflow: hidden; }
.dd-pt-fill { height: 100%; border-radius: 3px; transition: width 0.3s ease; }
.dd-pt-bar span { position: absolute; top: 1px; left: 8px; font-size: 0.68rem; color: #fff; font-weight: 600; z-index: 1; }

/* ===== Player Headshots ===== */
.headshot-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.headshot-fallback {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
}
.has-headshot { overflow: hidden; }
.roster-avatar.has-headshot,
.scout-avatar.has-headshot,
.player-avatar.has-headshot,
.sp-avatar.has-headshot,
.pt-avatar.has-headshot,
.wl-avatar.has-headshot {
  overflow: hidden;
  padding: 0;
}
.roster-avatar .headshot-img { background: linear-gradient(135deg, var(--gold-dark), var(--gold)); }
.mobile-card-header .player-avatar { overflow: hidden; }
