/* ================================================
   BASEBALLKORT — Los Angeles Dodgers Theme
   ================================================ */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --dodger-blue: #005A9C;
  --dodger-blue-light: #1A7BC4;
  --dodger-blue-bright: #3399FF;
  --dodger-blue-dark: #003D6B;
  --dodger-blue-glow: rgba(0, 90, 156, 0.4);
  --bg: #06101C;
  --bg-surface: #0A1828;
  --bg-card: #0D1F35;
  --bg-card-hover: #112840;
  --bg-modal: rgba(6, 16, 28, 0.95);
  --text: #FFFFFF;
  --text-muted: #7A9BBF;
  --text-dim: #4A6A8A;
  --border: #1A3354;
  --border-light: #254D7A;
  --gold: #C9A84C;
  --red: #C8102E;
  --success: #22C55E;
  --danger: #EF4444;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-blue: 0 0 24px rgba(0, 90, 156, 0.3);
  --transition: all 0.2s ease;
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(0, 90, 156, 0.15), transparent),
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23005A9C' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

a { color: var(--dodger-blue-light); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--dodger-blue-bright); }

h1, h2, h3, h4 { font-family: 'Bebas Neue', sans-serif; letter-spacing: 0.04em; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--dodger-blue-dark); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--dodger-blue); }

/* ── Navbar ── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(135deg, #060F1A 0%, #091520 50%, #060F1A 100%);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  height: 64px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  backdrop-filter: blur(12px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.6rem;
  letter-spacing: 0.08em;
  color: var(--text) !important;
  text-decoration: none;
}

.navbar-brand .brand-ball {
  font-size: 1.4rem;
  filter: drop-shadow(0 0 8px rgba(0, 90, 156, 0.8));
}

.navbar-brand .brand-accent {
  color: var(--dodger-blue-bright);
}

.navbar-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  list-style: none;
}

.navbar-end {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-muted) !important;
  font-size: 0.875rem;
  font-weight: 500;
  transition: var(--transition);
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--text) !important;
  background: rgba(0, 90, 156, 0.15);
}

.nav-link.active {
  color: var(--text) !important;
  background: rgba(0, 90, 156, 0.25);
  border: 1px solid rgba(0, 90, 156, 0.4);
}

.nav-link svg { width: 15px; height: 15px; opacity: 0.8; }

.btn-add {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  background: var(--dodger-blue);
  color: white !important;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  box-shadow: 0 2px 12px rgba(0, 90, 156, 0.4);
}

.btn-add:hover {
  background: var(--dodger-blue-light);
  box-shadow: 0 4px 20px rgba(0, 90, 156, 0.6);
  transform: translateY(-1px);
}

/* ── Main Content ── */
.main-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem 2rem 4rem;
}

/* ── Page Header ── */
.page-header {
  margin-bottom: 2rem;
}

.page-title {
  font-size: 2.8rem;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.page-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ── Stats Grid ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--dodger-blue), var(--dodger-blue-bright));
}

.stat-card:hover {
  border-color: var(--border-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-blue);
}

.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: rgba(0, 90, 156, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.stat-info .stat-value {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.4rem;
  color: var(--text);
  line-height: 1;
}

.stat-info .stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 2px;
}

/* ── Section Header ── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.section-title {
  font-size: 1.8rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-title::after {
  content: '';
  display: inline-block;
  width: 4px;
  height: 28px;
  background: var(--dodger-blue);
  border-radius: 2px;
  margin-left: 6px;
}

/* ── Cards Grid ── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
}

.card-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
}

.card-item:hover {
  border-color: var(--dodger-blue);
  transform: translateY(-4px);
  box-shadow: var(--shadow-blue);
  color: inherit;
}

.card-img-wrapper {
  position: relative;
  aspect-ratio: 2.5 / 3.5;
  background: linear-gradient(135deg, #0a1828 0%, #0d2040 100%);
  overflow: hidden;
}

.card-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.card-item:hover .card-img-wrapper img {
  transform: scale(1.05);
}

.card-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: var(--text-dim);
}

.card-img-placeholder span { font-size: 2.5rem; }
.card-img-placeholder p { font-size: 0.75rem; }

.card-year-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--dodger-blue);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
}

.card-info {
  padding: 0.85rem;
}

.card-player-name {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.card-brand { color: var(--dodger-blue-light); font-weight: 500; }

/* ── Table ── */
.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.data-table th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  font-weight: 600;
  background: rgba(0, 0, 0, 0.2);
}

.data-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(26, 51, 84, 0.5);
  vertical-align: middle;
  font-size: 0.9rem;
}

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

.data-table tbody tr {
  transition: var(--transition);
}

.data-table tbody tr:hover {
  background: var(--bg-card-hover);
}

.table-card-img {
  width: 40px;
  height: 56px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--border);
}

.table-container {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

/* ── Filters ── */
.filters-bar {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.search-input {
  flex: 1;
  min-width: 200px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--text);
  font-size: 0.9rem;
  transition: var(--transition);
}

.search-input:focus {
  outline: none;
  border-color: var(--dodger-blue);
  box-shadow: 0 0 0 3px rgba(0, 90, 156, 0.2);
}

.filter-select {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--text);
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
}

.filter-select:focus {
  outline: none;
  border-color: var(--dodger-blue);
}

.btn-filter {
  padding: 10px 20px;
  background: var(--dodger-blue);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.btn-filter:hover { background: var(--dodger-blue-light); }

/* ── Gallery ── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}

.gallery-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: var(--transition);
  aspect-ratio: 2.5 / 3.5;
}

.gallery-item:hover {
  border-color: var(--dodger-blue);
  transform: scale(1.03);
  box-shadow: var(--shadow-blue);
  z-index: 1;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-item .gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(6,16,28,0.95) 0%, transparent 50%);
  opacity: 0;
  transition: var(--transition);
  display: flex;
  align-items: flex-end;
  padding: 0.75rem;
}

.gallery-item:hover .gallery-overlay { opacity: 1; }

.gallery-overlay-text {
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.3;
}

.gallery-no-img {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: var(--text-dim);
}

/* ── Lightbox ── */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
}

.lightbox.open { display: flex; }

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  gap: 1rem;
  align-items: center;
}

.lightbox-img {
  max-height: 80vh;
  max-width: 40vw;
  border-radius: var(--radius);
  object-fit: contain;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

.lightbox-info {
  color: white;
  padding: 1.5rem;
  min-width: 220px;
}

.lightbox-close {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.lightbox-close:hover { background: rgba(255,255,255,0.2); }

.lightbox-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 90, 156, 0.5);
  border: 1px solid rgba(0, 90, 156, 0.6);
  color: white;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.lightbox-nav:hover { background: var(--dodger-blue); }
.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }

/* ── Card Detail (Flip) ── */
.card-detail-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

@media (max-width: 768px) {
  .card-detail-layout { grid-template-columns: 1fr; }
}

.card-flip-container {
  display: flex;
  gap: 1.5rem;
  flex-direction: column;
}

.card-view-wrapper {
  position: relative;
}

.card-view-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card-view-img {
  width: 100%;
  border-radius: var(--radius);
  border: 2px solid var(--border);
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.card-view-img:hover {
  border-color: var(--dodger-blue);
  box-shadow: var(--shadow-blue);
}

/* ── Info Card ── */
.info-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  position: relative;
  overflow: hidden;
}

.info-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--dodger-blue), var(--dodger-blue-bright));
}

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.65rem 0;
  border-bottom: 1px solid rgba(26, 51, 84, 0.5);
}

.info-row:last-child { border-bottom: none; }

.info-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.info-value {
  font-weight: 600;
  font-size: 0.95rem;
  text-align: right;
}

.info-value.highlight { color: var(--dodger-blue-bright); }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--dodger-blue);
  color: white;
  box-shadow: 0 2px 12px rgba(0, 90, 156, 0.4);
}

.btn-primary:hover {
  background: var(--dodger-blue-light);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(0, 90, 156, 0.6);
}

.btn-secondary {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  color: var(--text);
  border-color: var(--border-light);
  background: rgba(255,255,255,0.05);
}

.btn-danger {
  background: transparent;
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: var(--danger);
}

.btn-sm { padding: 6px 12px; font-size: 0.8rem; }

/* ── Forms ── */
.form-container {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
}

.form-section {
  margin-bottom: 2rem;
}

.form-section-title {
  font-size: 1.4rem;
  color: var(--text);
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.25rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group.full-width { grid-column: 1 / -1; }

.form-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  font-weight: 600;
}

.form-input, .form-select {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--text);
  font-size: 0.9rem;
  font-family: inherit;
  transition: var(--transition);
  width: 100%;
}

.form-input:focus, .form-select:focus {
  outline: none;
  border-color: var(--dodger-blue);
  box-shadow: 0 0 0 3px rgba(0, 90, 156, 0.2);
}

.form-input::placeholder { color: var(--text-dim); }

.form-select option { background: var(--bg-surface); }

/* ── Image Upload Area ── */
.img-upload-area {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.img-preview-box {
  aspect-ratio: 2.5 / 3.5;
  background: var(--bg-surface);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: var(--transition);
  max-width: 200px;
}

.img-preview-box.has-image { border-style: solid; border-color: var(--dodger-blue); }

.img-preview-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.img-preview-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-dim);
  font-size: 0.8rem;
}

.img-preview-placeholder span { font-size: 2rem; }

.img-buttons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.btn-camera {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--dodger-blue);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.btn-camera:hover {
  background: var(--dodger-blue-light);
  transform: translateY(-1px);
}

.btn-upload-file {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.btn-upload-file:hover {
  color: var(--text);
  border-color: var(--border-light);
}

/* ── Camera Modal ── */
.camera-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  z-index: 500;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
}

.camera-modal.open { display: flex; }

.camera-box {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 560px;
  max-width: 96vw;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7);
}

.camera-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.3);
}

.camera-title {
  font-size: 1.3rem;
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 0.06em;
}

.camera-close {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.camera-close:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: var(--danger);
  color: var(--danger);
}

.camera-body { padding: 1.25rem 1.5rem; }

.camera-select-row {
  margin-bottom: 1rem;
}

.camera-select-row select {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  color: var(--text);
  font-size: 0.85rem;
  cursor: pointer;
}

#cameraView { display: block; }
#previewView { display: none; }

.video-container {
  position: relative;
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 1rem;
}

#cameraVideo {
  width: 100%;
  display: block;
  max-height: 340px;
  object-fit: cover;
}

.camera-frame-guide {
  position: absolute;
  inset: 10%;
  border: 2px solid rgba(0, 90, 156, 0.6);
  border-radius: 6px;
  pointer-events: none;
}

.camera-frame-guide::before,
.camera-frame-guide::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border-color: var(--dodger-blue-bright);
  border-style: solid;
}

.camera-frame-guide::before {
  top: -2px; left: -2px;
  border-width: 3px 0 0 3px;
  border-radius: 4px 0 0 0;
}

.camera-frame-guide::after {
  bottom: -2px; right: -2px;
  border-width: 0 3px 3px 0;
  border-radius: 0 0 4px 0;
}

.camera-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 0.75rem;
}

.btn-capture {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--dodger-blue);
  border: 4px solid rgba(255,255,255,0.2);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(0, 90, 156, 0.6);
}

.btn-capture:hover {
  background: var(--dodger-blue-light);
  transform: scale(1.05);
  box-shadow: 0 0 30px rgba(0, 90, 156, 0.8);
}

.btn-capture-inner {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: white;
}

.preview-img-container {
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 1rem;
}

#capturedPreview {
  width: 100%;
  display: block;
  max-height: 340px;
  object-fit: contain;
  background: #000;
}

.preview-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 0.75rem;
}

.camera-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1rem 0;
  color: var(--text-dim);
  font-size: 0.8rem;
}

.camera-divider::before,
.camera-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.camera-info-note {
  font-size: 0.75rem;
  color: var(--text-dim);
  text-align: center;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border);
  background: rgba(0,0,0,0.2);
}

.camera-info-note a { color: var(--dodger-blue-light); }

/* ── Player Card ── */
.player-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: var(--transition);
  text-decoration: none;
  color: inherit;
}

.player-card:hover {
  border-color: var(--dodger-blue);
  background: var(--bg-card-hover);
  color: inherit;
}

.player-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--dodger-blue-dark), var(--dodger-blue));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.3rem;
  flex-shrink: 0;
  color: white;
}

.player-info { flex: 1; min-width: 0; }

.player-name {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.player-card-count {
  background: rgba(0, 90, 156, 0.2);
  border: 1px solid rgba(0, 90, 156, 0.4);
  color: var(--dodger-blue-bright);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 20px;
  white-space: nowrap;
}

.players-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 0.75rem;
}

/* ── New Player Toggle ── */
.new-player-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-top: 0.75rem;
  display: none;
}

.new-player-panel.visible { display: block; }

/* ── Badge ── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.badge-blue {
  background: rgba(0, 90, 156, 0.2);
  border: 1px solid rgba(0, 90, 156, 0.4);
  color: var(--dodger-blue-bright);
}

.badge-gold {
  background: rgba(201, 168, 76, 0.2);
  border: 1px solid rgba(201, 168, 76, 0.4);
  color: var(--gold);
}

/* ── Toast ── */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--dodger-blue);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1.25rem;
  color: var(--text);
  font-size: 0.875rem;
  box-shadow: var(--shadow);
  animation: slideIn 0.3s ease;
  max-width: 300px;
}

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ── Empty State ── */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-dim);
}

.empty-state .empty-icon { font-size: 4rem; margin-bottom: 1rem; }
.empty-state h3 { font-size: 1.5rem; color: var(--text-muted); margin-bottom: 0.5rem; }
.empty-state p { font-size: 0.9rem; margin-bottom: 1.5rem; }

/* ── Breadcrumb ── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--text); }
.breadcrumb span { color: var(--text-dim); }

/* ── Confirm Dialog ── */
.confirm-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  z-index: 600;
  align-items: center;
  justify-content: center;
}

.confirm-modal.open { display: flex; }

.confirm-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  max-width: 360px;
  width: 90%;
  text-align: center;
}

.confirm-box h3 { font-size: 1.5rem; margin-bottom: 0.75rem; }
.confirm-box p { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 1.5rem; }

.confirm-actions { display: flex; gap: 0.75rem; justify-content: center; }

/* ── Baseball decoration ── */
.baseball-bg-deco {
  position: fixed;
  bottom: -100px;
  right: -100px;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  border: 2px solid rgba(0, 90, 156, 0.06);
  pointer-events: none;
  z-index: 0;
}

.baseball-bg-deco::before {
  content: '';
  position: absolute;
  inset: 30px;
  border-radius: 50%;
  border: 2px solid rgba(0, 90, 156, 0.04);
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .navbar { padding: 0 1rem; }
  .main-content { padding: 1.5rem 1rem 3rem; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .nav-link span { display: none; }
}

@media (max-width: 600px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .players-grid { grid-template-columns: 1fr; }
  .filters-bar { flex-direction: column; }
  .search-input { min-width: unset; width: 100%; }
}

/* ================================================
   STATISTICS — stats.html + player_detail stats
   ================================================ */

/* ── Tabs ── */
.stats-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border);
  margin-bottom: 1.5rem;
}

.stats-tab {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: var(--transition);
  text-decoration: none;
}

.stats-tab:hover { color: var(--text); }

.stats-tab.active {
  color: var(--text);
  border-bottom-color: var(--dodger-blue);
}

.tab-count {
  background: rgba(0,90,156,0.2);
  border: 1px solid rgba(0,90,156,0.3);
  color: var(--dodger-blue-light);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 20px;
}

/* ── Stats table container ── */
/* .stats-table-container — full definition further down in STICKY HEADER section */

.stats-table {
  white-space: nowrap;
  font-size: 0.85rem;
}

.stats-table th {
  font-size: 0.72rem;
  padding: 0.6rem 0.75rem;
  user-select: none;
}

.stats-table td {
  padding: 0.6rem 0.75rem;
  font-variant-numeric: tabular-nums;
}

.stats-table .sortable {
  cursor: pointer;
}

.stats-table .sortable:hover {
  background: rgba(0,90,156,0.15);
  color: var(--text);
}

.stats-table .sort-active {
  background: rgba(0,90,156,0.2);
  color: var(--dodger-blue-bright);
}

.sort-icon {
  font-size: 0.65rem;
  margin-left: 3px;
  opacity: 0.7;
}

/* ── Stat cell highlights ── */
.stat-great {
  color: var(--gold) !important;
  font-weight: 700;
}

.stat-good {
  color: #6EE7B7 !important;
  font-weight: 600;
}

.stat-poor {
  color: #F87171 !important;
}

.stat-highlight-col {
  background: rgba(0,90,156,0.08);
}

/* ── Player name in table ── */
.stats-player-name {
  font-weight: 600;
  min-width: 160px;
}

.player-link {
  color: var(--dodger-blue-bright);
  text-decoration: none;
  transition: var(--transition);
}

.player-link:hover {
  color: white;
  text-decoration: underline;
}

/* ── Legend ── */
.stats-legend {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.legend-dot.great { background: var(--gold); }
.legend-dot.good  { background: #6EE7B7; }

/* ── Pagination ── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  margin-top: 1.75rem;
  flex-wrap: wrap;
}

.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  text-decoration: none;
  transition: var(--transition);
}

.page-btn:hover:not(.disabled) {
  background: var(--bg-card-hover);
  border-color: var(--border-light);
  color: var(--text);
}

.page-btn.active {
  background: var(--dodger-blue);
  border-color: var(--dodger-blue);
  color: white;
  font-weight: 700;
}

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

.page-ellipsis {
  color: var(--text-dim);
  font-size: 0.85rem;
  padding: 0 4px;
}

/* ── Autocomplete ── */
.stats-autocomplete {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  z-index: 50;
  box-shadow: var(--shadow);
  max-height: 240px;
  overflow-y: auto;
}

.ac-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  cursor: pointer;
  transition: background 0.15s;
  font-size: 0.88rem;
  border-bottom: 1px solid rgba(26,51,84,0.3);
}

.ac-item:last-child { border-bottom: none; }

.ac-item:hover { background: var(--bg-card-hover); }

.ac-name { font-weight: 500; }

.ac-type {
  font-size: 0.75rem;
  color: var(--text-muted);
  background: rgba(0,90,156,0.15);
  padding: 2px 8px;
  border-radius: 20px;
}

/* ── Player stats grid (on player detail page) ── */
.player-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 0.75rem;
}

.player-stat-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 0.75rem;
  text-align: center;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.player-stat-box::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--border);
}

.player-stat-box.pstat-rate::before {
  background: linear-gradient(90deg, var(--dodger-blue), var(--dodger-blue-bright));
}

.player-stat-box.pstat-power::before {
  background: linear-gradient(90deg, var(--gold), #E8C96E);
}

.player-stat-box:hover {
  border-color: var(--border-light);
  transform: translateY(-2px);
}

.pstat-value {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.7rem;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.pstat-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

/* Mini stat table on player detail */
.stats-mini-table {
  font-size: 0.82rem;
  white-space: nowrap;
}

.stats-mini-table th {
  font-size: 0.7rem;
  padding: 0.5rem 0.65rem;
}

.stats-mini-table td {
  padding: 0.6rem 0.65rem;
  font-variant-numeric: tabular-nums;
}

/* ================================================
   PLAYER PROFILE — player_detail.html
   ================================================ */

/* ── Player Hero Layout ── */
.player-hero {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 2.5rem;
  align-items: start;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
}

.player-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--dodger-blue), var(--dodger-blue-bright), var(--gold));
}

/* ── Photo Column ── */
.player-photo-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
}

.player-photo-frame {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  border: 3px solid var(--border);
  background: linear-gradient(135deg, var(--dodger-blue-dark), #0A1628);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.player-photo-frame:hover {
  border-color: var(--dodger-blue);
  box-shadow: 0 0 0 4px rgba(0, 90, 156, 0.25);
}

.player-photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.player-photo-initials {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 3.5rem;
  color: white;
  letter-spacing: 0.05em;
  line-height: 1;
  user-select: none;
}

.photo-paste-hint {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 90, 156, 0.85);
  color: white;
  font-size: 0.72rem;
  font-weight: 600;
  text-align: center;
  padding: 6px;
  opacity: 0;
  transition: opacity 0.2s ease;
  backdrop-filter: blur(4px);
}

.player-photo-frame:hover .photo-paste-hint {
  opacity: 1;
}

.photo-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.photo-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.photo-action-btn:hover {
  color: var(--text);
  border-color: var(--border-light);
  background: rgba(255, 255, 255, 0.05);
}

.photo-paste-tip {
  font-size: 0.72rem;
  color: var(--text-dim);
  text-align: center;
  line-height: 1.4;
}

.photo-paste-tip kbd {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 5px;
  font-family: monospace;
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* ── Bio Column ── */
.player-bio-col {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-top: 0.25rem;
}

.player-hero-name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 3.2rem;
  line-height: 1;
  letter-spacing: 0.04em;
  color: var(--text);
}

/* ── Dodger Career Period Badge ── */
.dodger-period-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: linear-gradient(135deg, rgba(0, 90, 156, 0.25), rgba(0, 90, 156, 0.12));
  border: 1px solid rgba(0, 90, 156, 0.5);
  border-radius: var(--radius);
  padding: 0.75rem 1.25rem;
  width: fit-content;
}

.dp-icon {
  font-size: 1.6rem;
  line-height: 1;
}

.dp-years {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.6rem;
  letter-spacing: 0.06em;
  color: var(--dodger-blue-bright);
  line-height: 1;
}

.dp-label {
  font-size: 0.73rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-top: 2px;
}

/* ── Bio Meta Chips ── */
.player-bio-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.bio-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: var(--text-muted);
  white-space: nowrap;
}

.bio-chip-blue {
  background: rgba(0, 90, 156, 0.2);
  border-color: rgba(0, 90, 156, 0.5);
  color: var(--dodger-blue-bright);
}

.bio-chip-gold {
  background: rgba(201, 168, 76, 0.15);
  border-color: rgba(201, 168, 76, 0.45);
  color: var(--gold);
}

/* ── Bio Links ── */
.player-bio-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.25rem;
}

/* ── Key Stats Section ── */
.key-stats-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  position: relative;
  overflow: hidden;
}

.key-stats-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--dodger-blue), var(--dodger-blue-bright));
}

.key-stats-secondary::before {
  background: linear-gradient(90deg, var(--gold), #E8C96E);
}

.key-stats-eyebrow {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.eyebrow-note {
  font-size: 0.68rem;
  color: var(--gold);
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
}

.key-stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1rem;
}

/* ── Key Stat Card ── */
.key-stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1rem;
  text-align: center;
  position: relative;
  transition: var(--transition);
}

.key-stat-card:hover {
  border-color: var(--border-light);
  transform: translateY(-2px);
}

.key-stat-card.primary {
  background: linear-gradient(135deg, rgba(0, 90, 156, 0.2), rgba(0, 90, 156, 0.08));
  border-color: rgba(0, 90, 156, 0.5);
}

.key-stat-card.primary:hover {
  border-color: var(--dodger-blue);
  box-shadow: var(--shadow-blue);
}

.key-stat-number {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.8rem;
  line-height: 1;
  color: var(--text);
  margin-bottom: 0.35rem;
}

.key-stat-card.primary .key-stat-number {
  color: var(--dodger-blue-bright);
}

.key-stat-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 600;
}

.key-stat-badge {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 2px 8px;
  background: rgba(201, 168, 76, 0.2);
  border: 1px solid rgba(201, 168, 76, 0.45);
  border-radius: 20px;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── Profile Stats Block (full table) ── */
.profile-stats-block {
  margin-bottom: 1.5rem;
}

.profile-stats-title {
  font-size: 1.2rem;
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
  padding-left: 0.25rem;
}

.profile-no-stats {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  text-align: center;
  margin-bottom: 1.5rem;
}

/* ── Responsive: player hero ── */
@media (max-width: 768px) {
  .player-hero {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 1.5rem;
  }
  .player-photo-col {
    align-items: center;
  }
  .player-photo-frame {
    width: 140px;
    height: 140px;
  }
  .player-hero-name {
    font-size: 2.4rem;
  }
  .key-stats-row {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 480px) {
  .key-stats-row {
    grid-template-columns: repeat(2, 1fr);
  }
  .key-stat-number {
    font-size: 2.2rem;
  }
}

/* ================================================
   CSV PLAYER SEARCH — add_card.html
   ================================================ */

.csv-result-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(26, 51, 84, 0.4);
  cursor: pointer;
  transition: background 0.15s ease;
}

.csv-result-item:last-child {
  border-bottom: none;
}

.csv-result-item:hover {
  background: var(--bg-card-hover);
}

.csv-result-left {
  flex: 1;
  min-width: 0;
}

.csv-result-name {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 3px;
}

.csv-result-meta {
  font-size: 0.76rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.csv-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}

.csv-badge-db {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.4);
  color: #4ade80;
}

.csv-badge-new {
  background: rgba(0, 90, 156, 0.2);
  border: 1px solid rgba(0, 90, 156, 0.5);
  color: var(--dodger-blue-bright);
}

/* ================================================
   HOMEPAGE PLAYER SEARCH
   ================================================ */

.player-search-hero {
  margin-bottom: 2rem;
}

.player-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0.25rem 0.25rem 0.25rem 1.25rem;
  transition: var(--transition);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

.player-search-wrap:focus-within {
  border-color: var(--dodger-blue);
  box-shadow: 0 0 0 3px rgba(0, 90, 156, 0.2), 0 4px 24px rgba(0, 0, 0, 0.3);
}

.player-search-icon {
  font-size: 1.2rem;
  margin-right: 0.75rem;
  flex-shrink: 0;
}

.player-search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 1.05rem;
  font-family: inherit;
  padding: 0.85rem 0;
}

.player-search-input::placeholder { color: var(--text-dim); }

.player-search-results {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  z-index: 200;
  overflow: hidden;
  max-height: 360px;
  overflow-y: auto;
}

.hero-result-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid rgba(26, 51, 84, 0.4);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s;
}

.hero-result-item:last-child { border-bottom: none; }
.hero-result-item:hover { background: var(--bg-card-hover); }

.hero-result-left { flex: 1; min-width: 0; }

.hero-result-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
  margin-bottom: 2px;
}

.hero-result-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.hero-result-period {
  color: var(--dodger-blue-light);
}

.hero-result-cards {
  background: rgba(0, 90, 156, 0.15);
  border: 1px solid rgba(0, 90, 156, 0.3);
  color: var(--dodger-blue-bright);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 20px;
}

.hero-search-empty {
  padding: 1.25rem;
  color: var(--text-muted);
  text-align: center;
  font-size: 0.88rem;
}

/* ================================================
   GAMES PAGE
   ================================================ */

/* ── Stats overview grid ── */
.game-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.game-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

.game-stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--dodger-blue), var(--dodger-blue-bright));
}

.game-stat-card:hover {
  border-color: var(--border-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-blue);
}

.game-stat-icon {
  font-size: 1.75rem;
  flex-shrink: 0;
  line-height: 1;
}

.game-stat-value {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.8rem;
  line-height: 1;
  color: var(--text);
}

.game-stat-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 3px;
  line-height: 1.3;
}

/* ── Year bar chart / filter ── */
.game-years-bar {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem 0.75rem;
  margin-bottom: 1.75rem;
  min-height: 90px;
}

.year-bar-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 1;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.3rem 0.2rem;
  border-radius: 6px;
  transition: background 0.15s;
}
.year-bar-btn:hover {
  background: rgba(255,255,255,0.06);
}
.year-bar-btn--active {
  background: rgba(0, 90, 156, 0.18);
  outline: 1px solid var(--dodger-blue);
}

.year-bar-fill {
  width: 100%;
  max-width: 48px;
  background: linear-gradient(180deg, var(--dodger-blue-bright), var(--dodger-blue));
  border-radius: 3px 3px 0 0;
  transition: opacity 0.2s, transform 0.15s;
}
.year-bar-btn:hover .year-bar-fill { opacity: 0.8; }
.year-bar-btn--active .year-bar-fill {
  background: linear-gradient(180deg, #7ec8ff, var(--dodger-blue-bright));
  transform: scaleY(1.06);
  transform-origin: bottom;
}

.year-bar-fill-all {
  background: linear-gradient(180deg, #aaa, #666);
  opacity: 0.5;
}
.year-bar-btn--active .year-bar-fill-all {
  background: linear-gradient(180deg, var(--dodger-blue-bright), var(--dodger-blue));
  opacity: 1;
}

.year-bar-count {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--dodger-blue-bright);
}
.year-bar-btn--active .year-bar-count {
  color: #7ec8ff;
}

.year-bar-label {
  font-size: 0.65rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.year-bar-btn--active .year-bar-label {
  color: var(--dodger-blue-light);
  font-weight: 600;
}

/* ── Game list ── */
.games-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.game-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

.game-card:hover {
  border-color: var(--dodger-blue);
  background: var(--bg-card-hover);
  transform: translateX(3px);
  color: inherit;
}

/* Date column */
.game-card-date {
  text-align: center;
  min-width: 44px;
  flex-shrink: 0;
}

.game-date-day {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.8rem;
  line-height: 1;
  color: var(--text);
}

.game-date-month {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--dodger-blue-bright);
  font-weight: 700;
}

.game-date-year {
  font-size: 0.65rem;
  color: var(--text-dim);
  margin-top: 1px;
}

/* Divider line */
.game-card-date + .game-card-main {
  border-left: 1px solid var(--border);
  padding-left: 1.25rem;
}

.game-card-main { flex: 1; min-width: 0; }

.game-matchup {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
  flex-wrap: wrap;
}

.game-team {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-muted);
  flex: 1;
  min-width: 120px;
}

.game-team:last-child { text-align: right; }

.game-team-dodger {
  color: var(--dodger-blue-bright);
  font-weight: 700;
}

.game-score-box {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.game-score-num {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--text-muted);
  min-width: 24px;
  text-align: center;
}

.game-score-win {
  color: var(--text);
}

.game-score-sep {
  color: var(--text-dim);
  font-size: 1rem;
}

.game-card-meta {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* Result badge */
.game-result-badge {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.3rem;
  letter-spacing: 0.06em;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 2px solid;
}

.game-result-w {
  color: var(--success);
  border-color: rgba(34, 197, 94, 0.4);
  background: rgba(34, 197, 94, 0.1);
}

.game-result-l {
  color: var(--danger);
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.1);
}

.game-result-t {
  color: var(--text-dim);
  border-color: var(--border);
  background: transparent;
}

/* ── Game Detail Hero ── */
.game-detail-hero {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 1.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.game-detail-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--dodger-blue), var(--dodger-blue-bright), var(--gold));
}

.game-detail-result {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.4rem;
  letter-spacing: 0.08em;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid;
}

.game-detail-date {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1.5rem;
}

.game-detail-scoreboard {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.game-detail-team {
  flex: 1;
  min-width: 140px;
  max-width: 260px;
}

.game-detail-team:first-child { text-align: right; }
.game-detail-team:last-child { text-align: left; }

.game-detail-team-name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.6rem;
  letter-spacing: 0.04em;
  line-height: 1.1;
  color: var(--text-muted);
}

.game-detail-team-dodger .game-detail-team-name {
  color: var(--dodger-blue-bright);
}

.game-detail-team-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin-top: 4px;
}

.game-detail-score {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.game-detail-score-num {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 4rem;
  line-height: 1;
  color: var(--text-muted);
  min-width: 60px;
  text-align: center;
}

.game-detail-score-num.game-score-win { color: var(--text); }

.game-detail-score-dash {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.5rem;
  color: var(--text-dim);
}

/* ── Game detail info grid ── */
.game-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

.game-seat-display {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  padding: 0.5rem 0;
}

.game-seat-item { text-align: center; }

.game-seat-value {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.4rem;
  color: var(--dodger-blue-bright);
  line-height: 1;
}

.game-seat-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin-top: 4px;
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .game-card { flex-wrap: wrap; gap: 0.75rem; }
  .game-matchup { gap: 0.5rem; }
  .game-team { min-width: 80px; font-size: 0.82rem; }
  .game-detail-scoreboard { gap: 1rem; }
  .game-detail-score-num { font-size: 3rem; }
  .game-detail-team-name { font-size: 1.2rem; }
}


/* ══════════════════════════════════════════════
   ── Stadionreisen ──────────────────────────── */

/* Hero card */
.stadium-hero {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 2rem 1.5rem;
  margin-bottom: 2rem;
  text-align: center;
}

.stadium-hero-inner { margin-bottom: 1.5rem; }

.stadium-hero-stat {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.4rem;
  margin-bottom: 0.4rem;
}

.stadium-hero-number {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 6rem;
  line-height: 1;
  color: var(--dodger-blue);
  letter-spacing: -0.02em;
}

.stadium-hero-slash {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 3.5rem;
  color: var(--text-dim);
  line-height: 1;
}

.stadium-hero-total {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 3.5rem;
  color: var(--text-muted);
  line-height: 1;
}

.stadium-hero-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

/* 30-segment progress bar */
.stadium-segments {
  display: flex;
  gap: 4px;
  justify-content: center;
  max-width: 540px;
  margin: 0 auto 0.75rem;
  flex-wrap: wrap;
}

.stadium-segment {
  height: 10px;
  flex: 1;
  min-width: 10px;
  max-width: 18px;
  background: var(--border);
  border-radius: 3px;
  transition: background 0.4s ease;
}

.stadium-segment.filled {
  background: var(--dodger-blue);
  box-shadow: 0 0 6px rgba(0, 90, 156, 0.5);
}

.stadium-hero-pct {
  font-size: 0.88rem;
  color: var(--text-dim);
}

/* League summary row in hero */
.stadium-league-summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  border-top: 1px solid var(--border);
  padding-top: 1.25rem;
}

.league-summary-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.league-summary-stat {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.4rem;
  color: var(--text);
  letter-spacing: 0.04em;
}

.league-summary-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.league-summary-divider {
  font-size: 1.5rem;
  color: var(--border);
}

/* League pills */
.league-pill {
  display: inline-block;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  padding: 0.15rem 0.55rem;
  border-radius: 4px;
  flex-shrink: 0;
}

.league-pill.nl { background: #b22222; color: #fff; }
.league-pill.al { background: var(--dodger-blue); color: #fff; }

/* League blocks */
.league-block { margin-bottom: 2.5rem; }

.league-block-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.6rem;
  letter-spacing: 0.06em;
  color: var(--text);
  padding-bottom: 0.6rem;
  margin-bottom: 1rem;
  border-bottom: 2px solid var(--border);
}

.nl-header { border-bottom-color: rgba(178, 34, 34, 0.4); }
.al-header { border-bottom-color: rgba(0, 90, 156, 0.4); }

/* Division columns */
.division-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.division-col-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
  padding-left: 0.25rem;
}

/* Stadium cards */
.stadium-card {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.7rem 0.85rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 0.45rem;
  transition: var(--transition);
}

.stadium-card.visited {
  border-color: var(--dodger-blue);
  background: rgba(0, 90, 156, 0.07);
}

.stadium-card.visited:hover {
  background: rgba(0, 90, 156, 0.13);
  transform: translateX(3px);
}

.stadium-card.unvisited { opacity: 0.38; }

.stadium-card-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
  line-height: 1;
}

.stadium-card-body {
  flex: 1;
  min-width: 0;
}

.stadium-card-name {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.stadium-card.unvisited .stadium-card-name { color: var(--text-muted); }

.stadium-card-team {
  font-size: 0.72rem;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 0.1rem;
}

/* Visit count badge */
.visit-badge {
  display: flex;
  align-items: baseline;
  gap: 1px;
  background: var(--dodger-blue);
  color: #fff;
  border-radius: 5px;
  padding: 0.22rem 0.5rem;
  flex-shrink: 0;
}

.visit-badge-num {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.1rem;
  letter-spacing: 0.02em;
  line-height: 1;
}

.visit-badge-x {
  font-size: 0.68rem;
  opacity: 0.8;
  line-height: 1;
}

/* Unvisited circle indicator */
.unvisited-circle {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-radius: 50%;
  flex-shrink: 0;
}

/* Other stadiums section */
.other-stadiums-section {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.other-stadiums-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.5rem;
}

/* Responsive */
@media (max-width: 900px) {
  .division-row { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
}

@media (max-width: 600px) {
  .division-row { grid-template-columns: 1fr; gap: 1.25rem; }
  .stadium-hero-number { font-size: 4.5rem; }
  .stadium-hero-slash, .stadium-hero-total { font-size: 2.8rem; }
  .stadium-league-summary { flex-direction: column; gap: 0.75rem; }
  .league-summary-divider { display: none; }
  .stadium-segment { min-width: 7px; height: 8px; }
}

/* ══════════════════════════════════════════════
   ── Game Photos ────────────────────────────── */

/* Photo upload area (in add_game form) */
.photo-upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background: var(--bg-surface);
}

.photo-upload-area:hover {
  border-color: var(--dodger-blue);
  background: rgba(0, 90, 156, 0.04);
}

.photo-upload-icon { font-size: 2rem; margin-bottom: 0.5rem; }

.photo-upload-text {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
}

.photo-upload-sub {
  display: block;
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-top: 0.2rem;
  font-weight: 400;
}

/* Preview row (before submit) */
.photo-preview-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}

.photo-preview-thumb {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid var(--dodger-blue);
  flex-shrink: 0;
}

.photo-preview-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Photo grid (in game detail + edit form) */
.game-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.5rem;
}

.game-photo-thumb {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  background: var(--bg-surface);
}

.game-photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.game-photo-thumb:hover img { transform: scale(1.05); }

.photo-delete-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(0,0,0,0.65);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  font-size: 0.7rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 2;
}

.game-photo-thumb:hover .photo-delete-btn { opacity: 1; }

.photo-empty-state {
  text-align: center;
  padding: 2rem;
  color: var(--text-dim);
}

/* Upload progress */
.upload-progress-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-top: 1px solid var(--border);
  margin-top: 0.75rem;
}

.upload-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-top-color: var(--dodger-blue);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Lightbox ── */
.photo-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.93);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
}

.photo-lightbox.open { display: flex; }

.lightbox-img {
  max-width: 90vw;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.6);
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.8rem;
  cursor: pointer;
  line-height: 1;
  opacity: 0.8;
  transition: opacity 0.2s;
}
.lightbox-close:hover { opacity: 1; }

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.12);
  border: none;
  color: #fff;
  font-size: 2.2rem;
  width: 50px;
  height: 60px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }
.lightbox-prev:hover,
.lightbox-next:hover { background: rgba(255,255,255,0.22); }

/* ── W/L inline badge on team name ── */
.game-team-result {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  margin-left: 0.3rem;
  vertical-align: middle;
  line-height: 1.3;
}

/* ── W/L badge on game_detail scoreboard ── */
.game-detail-wl-badge {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1rem;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  margin-top: 0.3rem;
  display: inline-block;
}

/* ══════════════════════════════════════════════
   ── Album Page ─────────────────────────────── */

.album-game-block {
  margin-bottom: 2.5rem;
}

.album-game-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1.1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius) var(--radius) 0 0;
  text-decoration: none;
  color: var(--text);
  transition: var(--transition);
}

.album-game-header:hover {
  background: rgba(0, 90, 156, 0.06);
  border-color: var(--dodger-blue);
}

.album-game-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 44px;
  flex-shrink: 0;
}

.album-date-day {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.8rem;
  line-height: 1;
  color: var(--dodger-blue);
}

.album-date-mon {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  line-height: 1;
}

.album-date-yr {
  font-size: 0.68rem;
  color: var(--text-dim);
  line-height: 1.4;
}

.album-game-info { flex: 1; min-width: 0; }

.album-game-matchup {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.album-game-score {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1rem;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  padding: 0 0.2rem;
}

.album-team-dodger { color: var(--dodger-blue-light); }

.album-game-stadium {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-top: 0.2rem;
}

.album-result-badge {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  padding: 0.18rem 0.55rem;
  border-radius: 4px;
}

.album-photo-count {
  font-size: 0.8rem;
  color: var(--text-dim);
  white-space: nowrap;
}

/* Album photo grid */
.album-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 3px;
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  overflow: hidden;
  background: var(--bg-surface);
}

.album-photo-cell {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  cursor: pointer;
  background: var(--bg-card);
}

.album-photo-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
  display: block;
}

.album-photo-cell:hover img { transform: scale(1.06); }

.album-photo-hover {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  opacity: 0;
  transition: opacity 0.2s;
}

.album-photo-cell:hover .album-photo-hover { opacity: 1; }

/* Responsive */
@media (max-width: 600px) {
  .album-game-header { flex-wrap: wrap; gap: 0.6rem; }
  .album-photo-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
  .game-photo-grid { grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); }
}


/* ═══════════════════════════════════════════════════
   STADIUM CARDS - CLICKABLE
   ═══════════════════════════════════════════════════ */
.stadium-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease;
}
.stadium-card-link:hover .stadium-card.visited {
  border-color: var(--dodger-blue);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(30, 100, 200, 0.2);
}
.stadium-card-link:hover .stadium-card.unvisited {
  opacity: 0.55;
  transform: translateY(-1px);
}

/* ═══════════════════════════════════════════════════
   STADIUM DETAIL PAGE
   ═══════════════════════════════════════════════════ */
.sd-hero {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2rem 2rem 1.5rem;
  margin-bottom: 1.5rem;
  text-align: center;
}
.sd-hero-league {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}
.sd-league-nl { background: rgba(0, 90, 200, 0.2); color: #5b9ef8; border: 1px solid rgba(0,90,200,0.3); }
.sd-league-al { background: rgba(200, 30, 30, 0.15); color: #f87171; border: 1px solid rgba(200,30,30,0.25); }

.sd-hero-name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 3rem;
  letter-spacing: 0.05em;
  color: var(--text);
  line-height: 1;
  margin: 0 0 0.3rem;
}
.sd-hero-team { font-size: 1.1rem; color: var(--dodger-blue-light); font-weight: 600; margin-bottom: 0.25rem; }
.sd-hero-city { font-size: 0.88rem; color: var(--text-muted); margin-bottom: 1rem; }

.sd-visit-pill {
  display: inline-block;
  padding: 0.4rem 1.1rem;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  background: rgba(30, 160, 90, 0.15);
  color: #4ade80;
  border: 1px solid rgba(30, 160, 90, 0.3);
}
.sd-not-visited {
  background: rgba(120, 120, 140, 0.1);
  color: var(--text-muted);
  border-color: var(--border);
}

/* INFO CHIPS */
.sd-info-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.sd-info-chip {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  text-align: center;
  flex: 1;
  min-width: 120px;
}
.sd-chip-icon { font-size: 1.4rem; margin-bottom: 0.3rem; }
.sd-chip-val { font-family: 'Bebas Neue', sans-serif; font-size: 1.5rem; letter-spacing: 0.05em; color: var(--text); }
.sd-chip-lbl { font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.07em; margin-top: 0.15rem; }

.sd-info-chip-dim { min-width: 180px; }
.sd-dim-row { display: flex; align-items: center; justify-content: center; gap: 0.5rem; }
.sd-dim-item { text-align: center; }
.sd-dim-val { font-family: 'Bebas Neue', sans-serif; font-size: 1.3rem; color: var(--text); }
.sd-dim-lbl { font-size: 0.65rem; color: var(--text-muted); text-transform: uppercase; }
.sd-dim-sep { color: var(--text-dim); font-size: 1.2rem; }

/* HISTORY */
.sd-section-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.5rem;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}
.sd-history {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--dodger-blue);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
}
.sd-history-text {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.75;
  margin: 0;
}

/* GAMES AT STADIUM */
.sd-games-section { margin-bottom: 2rem; }
.sd-games-list { display: flex; flex-direction: column; gap: 0.6rem; }

.sd-game-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0.85rem 1.1rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, transform 0.15s;
}
.sd-game-card:hover {
  border-color: var(--dodger-blue);
  transform: translateX(3px);
}
.sd-game-date-block { text-align: center; min-width: 44px; }
.sd-game-day { font-family: 'Bebas Neue', sans-serif; font-size: 1.5rem; line-height: 1; color: var(--text); }
.sd-game-mon { font-size: 0.7rem; text-transform: uppercase; color: var(--text-muted); letter-spacing: 0.06em; }
.sd-game-yr { font-size: 0.68rem; color: var(--text-dim); }
.sd-game-info { flex: 1; min-width: 0; }
.sd-game-matchup { font-size: 0.95rem; font-weight: 600; color: var(--text); margin-bottom: 0.2rem; }
.sd-game-at { color: var(--text-muted); margin: 0 0.25rem; }
.sd-team-dodger { color: var(--dodger-blue-light); }
.sd-game-score { font-size: 0.85rem; color: var(--text-muted); }
.sd-game-seat { font-size: 0.78rem; color: var(--text-dim); margin-top: 0.15rem; }
.sd-result-badge {
  display: inline-block;
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  margin-left: 0.4rem;
}
.sd-result-w { background: rgba(30,200,90,0.2); color: #4ade80; }
.sd-result-l { background: rgba(200,60,60,0.2); color: #f87171; }
.sd-result-t { background: rgba(150,150,150,0.2); color: var(--text-muted); }
.sd-game-photo-count { font-size: 0.8rem; color: var(--text-muted); white-space: nowrap; }
.sd-game-arrow { color: var(--text-dim); font-size: 1.3rem; }

/* PHOTO STRIP */
.sd-photos-section { margin-bottom: 2rem; }
.sd-photo-strip {
  display: flex;
  gap: 0.6rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scrollbar-width: thin;
}
.sd-photo-thumb {
  flex-shrink: 0;
  width: 160px;
  height: 110px;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  border: 2px solid var(--border);
  transition: border-color 0.15s, transform 0.15s;
}
.sd-photo-thumb:hover { border-color: var(--dodger-blue); transform: scale(1.03); }
.sd-photo-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* ═══════════════════════════════════════════════════
   HOMEPAGE - STADIUM STAT CARD
   ═══════════════════════════════════════════════════ */
.stat-card-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  transition: border-color 0.15s, transform 0.15s;
}
.stat-card-link:hover {
  border-color: var(--dodger-blue);
  transform: translateY(-2px);
}
.stat-value-sub {
  font-size: 1.1rem;
  color: var(--text-muted);
  font-weight: 400;
}
.stat-sublabel {
  font-size: 0.73rem;
  color: var(--text-dim);
  margin-top: 0.15rem;
}

/* ═══════════════════════════════════════════════════
   MLB DATA PANEL (Game Detail)
   ═══════════════════════════════════════════════════ */
.mlb-fetch-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 1.25rem 1.5rem;
  margin-top: 1.25rem;
}
.mlb-fetch-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.mlb-fetch-actions { display: flex; align-items: center; gap: 0.75rem; }
.mlb-fetched-at { font-size: 0.78rem; color: var(--text-dim); }
.mlb-empty-state { color: var(--text-muted); font-size: 0.9rem; padding: 1rem 0 0.5rem; }
.mlb-loading { display: flex; align-items: center; gap: 0.75rem; padding: 1rem 0; color: var(--text-muted); font-size: 0.9rem; }
.mlb-error { color: #f87171; font-size: 0.9rem; padding: 0.5rem 0; }

.mlb-data-wrap { display: flex; flex-direction: column; gap: 1.5rem; }

/* Rosters row */
.mlb-rosters-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
@media (max-width: 700px) { .mlb-rosters-row { grid-template-columns: 1fr; } }

.mlb-roster-col {}
.mlb-roster-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.1rem;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.35rem;
}
.mlb-roster-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}
.mlb-roster-table th {
  text-align: left;
  color: var(--text-dim);
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.3rem 0.4rem;
  border-bottom: 1px solid var(--border);
}
.mlb-roster-table td {
  padding: 0.28rem 0.4rem;
  color: var(--text-muted);
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.mlb-order { color: var(--text-dim); font-size: 0.75rem; width: 20px; }
.mlb-name { font-weight: 500; color: var(--text); }
.mlb-pos { color: var(--text-dim); font-size: 0.75rem; }
.mlb-linked-player td { background: rgba(30, 100, 200, 0.06); }
.mlb-player-link { text-decoration: none; }
.mlb-player-link.dodger-name { color: var(--dodger-blue-light); font-weight: 600; }
.mlb-player-link.dodger-name:hover { text-decoration: underline; }

/* Field full row (no side pitchers column) */
.mlb-fields-full-row {
  margin-top: 1.25rem;
}
.mlb-field-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.05rem;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.35rem;
}
.mlb-field-svg-container { width: 100%; margin: 0 auto; }
.mlb-field-svg { width: 100%; height: auto; border-radius: var(--radius-lg); }

/* Under-field pitchers list */
.mlb-under-pitchers {
  margin-top: 1rem;
  padding-top: 0.25rem;
}
.mlb-opp-pitchers .mlb-starter {
  border-color: var(--border);
  background: var(--bg-elevated);
}
.mlb-starter-badge-opp {
  background: rgba(180, 30, 30, 0.25);
  color: #e07070;
}

.mlb-dh-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: rgba(30, 100, 200, 0.08);
  border-radius: var(--radius-md);
  font-size: 0.88rem;
}
.mlb-dh-label {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1rem;
  color: var(--dodger-blue-light);
  letter-spacing: 0.05em;
  min-width: 28px;
}
.mlb-dh-name { color: var(--text); font-weight: 500; }

/* Pitchers */
.mlb-pitchers-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.1rem;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.35rem;
}
.mlb-pitcher-team-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-dim);
  margin: 0.75rem 0 0.4rem;
}
.mlb-pitcher-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.7rem 0.85rem;
  margin-bottom: 0.5rem;
  transition: border-color 0.15s;
}
.mlb-starter {
  border-color: var(--border);
  background: var(--bg-elevated);
}
.mlb-pitcher-name-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}
.mlb-starter-badge {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  background: rgba(30, 100, 200, 0.25);
  color: var(--dodger-blue-light);
}
.mlb-pitcher-name { font-weight: 500; color: var(--text); font-size: 0.9rem; }
.mlb-pitcher-stats { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.mlb-pstat { font-size: 0.78rem; color: var(--text-muted); display: flex; align-items: baseline; gap: 0.2rem; }
.mlb-pstat-lbl { font-size: 0.68rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.05em; }

/* Pitcher decision colours */
.mlb-pitcher-winner {
  border-color: rgba(40, 167, 69, 0.55) !important;
  background: rgba(40, 167, 69, 0.09) !important;
}
.mlb-pitcher-loser {
  border-color: rgba(220, 53, 69, 0.55) !important;
  background: rgba(220, 53, 69, 0.09) !important;
}
.mlb-pitcher-save {
  border-color: rgba(30, 100, 200, 0.55) !important;
  background: rgba(30, 100, 200, 0.09) !important;
}

/* Decision badge pills (W / L / SV) */
.mlb-dec-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}
.mlb-dec-w  { background: rgba(40, 167, 69, 0.25);  color: #5cb85c; }
.mlb-dec-l  { background: rgba(220, 53, 69, 0.25);  color: #e07070; }
.mlb-dec-sv { background: rgba(30, 100, 200, 0.25);  color: var(--dodger-blue-light); }

/* Side-by-side pitcher lists below field diagrams */
.mlb-pitcher-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 1.25rem;
  align-items: start;
}
@media (max-width: 640px) {
  .mlb-pitcher-pair { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════
   SEEN GAMES ON PLAYER PAGE
   ═══════════════════════════════════════════════════ */
.seen-games-list { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 2rem; }

.seen-game-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0.75rem 1rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, transform 0.15s;
  flex-wrap: wrap;
}
.seen-game-item:hover {
  border-color: var(--dodger-blue);
  transform: translateX(3px);
}
.seen-game-date { font-size: 0.8rem; color: var(--text-dim); white-space: nowrap; min-width: 90px; }
.seen-game-matchup { font-size: 0.9rem; font-weight: 500; color: var(--text); flex: 1; min-width: 180px; }
.seen-game-score { font-size: 0.85rem; color: var(--text-muted); white-space: nowrap; }
.seen-game-pos {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  background: rgba(30, 100, 200, 0.15);
  color: var(--dodger-blue-light);
}
.seen-game-result {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
}
.seen-game-stadium { font-size: 0.75rem; color: var(--text-dim); flex-basis: 100%; }
.seen-game-arrow { color: var(--text-dim); font-size: 1.2rem; margin-left: auto; }

/* ═══════════════════════════════════════════════
   SCORECARD SECTION
   ═══════════════════════════════════════════════ */
.scorecard-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-top: 1.25rem;
  overflow: hidden;
}
.scorecard-header {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.4rem;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}
.scorecard-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 1rem;
}
.scorecard-table {
  border-collapse: collapse;
  font-size: 0.85rem;
  min-width: 100%;
}
.scorecard-table thead th {
  padding: 0.35rem 0.55rem;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-dim);
  letter-spacing: 0.04em;
  border-bottom: 2px solid var(--border);
}
.scorecard-table .sc-team-col {
  text-align: left;
  min-width: 140px;
}
.scorecard-table .sc-sep {
  width: 8px;
  background: var(--border);
  padding: 0;
}
.scorecard-table .sc-total {
  font-weight: 800;
  color: var(--text);
  min-width: 32px;
}
.scorecard-table tbody tr:first-child td {
  border-bottom: 1px solid var(--border-subtle, rgba(255,255,255,0.06));
}
.sc-team-name {
  padding: 0.55rem 0.55rem 0.55rem 0;
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--text-muted);
  white-space: nowrap;
}
.sc-team-name.sc-dodger {
  color: var(--dodger-blue-light);
}
.sc-inn {
  text-align: center;
  padding: 0.55rem 0.45rem;
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
  min-width: 24px;
}
.sc-total-val {
  text-align: center;
  padding: 0.55rem 0.45rem;
  font-weight: 700;
  color: var(--text);
  font-size: 0.9rem;
}

/* Decisions row */
.scorecard-decisions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-top: 1px solid var(--border);
  margin-top: 0.25rem;
}
.sc-decision {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.sc-dec-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 20px;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.sc-dec-w  { background: rgba(40, 167, 69, 0.2); color: #5cb85c; }
.sc-dec-l  { background: rgba(220, 53, 69, 0.2); color: #e07070; }
.sc-dec-sv { background: rgba(30, 100, 200, 0.2); color: var(--dodger-blue-light); }

/* Game summary */
.game-summary-box {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  background: rgba(30, 100, 200, 0.06);
  border: 1px solid rgba(30, 100, 200, 0.15);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  margin-top: 1rem;
}
.game-summary-icon { font-size: 1.2rem; flex-shrink: 0; }
.game-summary-text {
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--text-muted);
  margin: 0;
}

/* ═══════════════════════════════════════════════
   DUAL FIELD DIAGRAMS
   ═══════════════════════════════════════════════ */
.mlb-fields-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
}
.mlb-field-single {
  min-width: 0;
}
@media (max-width: 640px) {
  .mlb-fields-pair { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════
   SEEN PLAYERS STATS PAGE
   ═══════════════════════════════════════════════ */
.sp-hero-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}
.sp-hero-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.25rem;
  text-align: center;
  flex: 1;
  min-width: 140px;
  box-shadow: var(--shadow);
  transition: border-color 0.2s, transform 0.15s;
}
.sp-hero-card:hover {
  border-color: var(--border-light);
  transform: translateY(-2px);
}
.sp-hero-num {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 3rem;
  line-height: 1;
  color: var(--dodger-blue-light);
  margin-bottom: 0.3rem;
}
.sp-hero-lbl {
  font-size: 0.82rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
@media (max-width: 480px) {
  .sp-hero-row { grid-template-columns: 1fr; }
  .sp-hero-num { font-size: 2.4rem; }
}

.sp-section {
  margin-bottom: 2.5rem;
}
.sp-section-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text);
}
.sp-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
}
.sp-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.87rem;
}
.sp-table th {
  padding: 0.6rem 0.9rem;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-dim);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
  white-space: nowrap;
}
.sp-th-rank, .sp-th-center { text-align: center; width: 48px; }
.sp-th-last { white-space: nowrap; }
.sp-tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.1s;
}
.sp-tr:last-child { border-bottom: none; }
.sp-tr:hover { background: rgba(255,255,255,0.03); }
.sp-td-rank {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-dim);
  padding: 0.7rem 0.5rem;
  width: 36px;
}
.sp-td-name {
  padding: 0.6rem 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.sp-player-thumb {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.sp-thumb-placeholder {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-hover, rgba(255,255,255,0.05));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}
.sp-player-link {
  color: var(--dodger-blue-light);
  text-decoration: none;
  font-weight: 500;
}
.sp-player-link:hover { text-decoration: underline; }
.sp-td-pos, .sp-td-team {
  padding: 0.6rem 0.9rem;
  white-space: nowrap;
}
.sp-td-team { color: var(--text-muted); font-size: 0.82rem; }
.sp-pos-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(30, 100, 200, 0.12);
  color: var(--dodger-blue-light);
}
.sp-td-center {
  text-align: center;
  padding: 0.6rem 0.9rem;
}
.sp-seen-count {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.sp-seen-few { color: var(--dodger-blue-light); }
.sp-seen-many { color: #ffd700; }
.sp-td-last {
  padding: 0.6rem 0.9rem;
  font-size: 0.8rem;
  color: var(--text-dim);
  white-space: nowrap;
}

/* Position breakdown grid */
.sp-pos-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.sp-pos-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.9rem 1.2rem;
  text-align: center;
  min-width: 80px;
}
.sp-pos-name {
  font-weight: 800;
  font-size: 0.75rem;
  color: var(--dodger-blue-light);
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}
.sp-pos-count {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.8rem;
  line-height: 1;
  color: var(--text);
}
.sp-pos-label {
  font-size: 0.72rem;
  color: var(--text-dim);
}

/* ══════════════════════════════════════════════════════
   SEEN PLAYERS — HERO LEADER CARDS (stat leaders)
══════════════════════════════════════════════════════ */
.sp-hero-leader {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-align: left;
  padding: 1rem 1.25rem;
}
.sp-hero-leader-photo {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--dodger-blue);
}
.sp-hero-leader-placeholder {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface);
  font-size: 1.4rem;
  flex-shrink: 0;
}
.sp-hero-leader-body { min-width: 0; }
.sp-hero-leader-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.15rem;
}
.sp-hero-leader-num {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  color: var(--dodger-blue-light);
  line-height: 1;
  margin-bottom: 0.15rem;
}
.sp-hero-leader-name {
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: normal;
  word-break: break-word;
  line-height: 1.3;
}

/* ══════════════════════════════════════════════════════
   SEEN PLAYERS — TOP 5 CARDS
══════════════════════════════════════════════════════ */
.sp-top5-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.sp-top5-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1rem 1.25rem;
  flex: 1;
  min-width: 150px;
  max-width: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  position: relative;
  box-shadow: var(--shadow);
  transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s;
}
.sp-top5-card:hover {
  border-color: var(--dodger-blue-light);
  transform: translateY(-4px);
  box-shadow: var(--shadow-blue);
}
.sp-top5-rank-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--dodger-blue);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
}
.sp-top5-photo-wrap { margin-top: 0.5rem; }
.sp-top5-photo {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--dodger-blue);
  display: block;
}
.sp-top5-photo-placeholder {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  border: 3px solid var(--border);
}
.sp-top5-name {
  text-align: center;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}
.sp-top5-link { color: inherit; text-decoration: none; }
.sp-top5-link:hover { color: var(--dodger-blue-bright); }
.sp-top5-seen-badge {
  background: rgba(0, 90, 156, 0.2);
  color: var(--dodger-blue-bright);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 20px;
  border: 1px solid rgba(0, 90, 156, 0.3);
}
.sp-top5-stats {
  display: flex;
  gap: 0.4rem;
  justify-content: center;
  margin-top: 0.15rem;
  width: 100%;
  border-top: 1px solid var(--border);
  padding-top: 0.65rem;
}
.sp-top5-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}
.sp-top5-stat-val {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
}
.sp-top5-stat-lbl {
  font-size: 0.65rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 2px;
}

/* ══════════════════════════════════════════════════════
   SEEN PLAYERS — DUAL FIELD DIAGRAMS
══════════════════════════════════════════════════════ */
.sp-fields-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
}
.sp-field-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1rem 1rem;
  box-shadow: var(--shadow);
}
.sp-field-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  margin-bottom: 0.75rem;
  letter-spacing: 0.03em;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border);
}
.sp-field-svg {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}
.sp-field-dh {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.65rem;
  padding: 0.4rem 0.75rem;
  background: rgba(0, 90, 156, 0.1);
  border: 1px solid rgba(0, 90, 156, 0.2);
  border-radius: 8px;
  font-size: 0.83rem;
}
.sp-field-dh-opp {
  background: rgba(139, 26, 26, 0.1);
  border-color: rgba(139, 26, 26, 0.2);
}
.sp-field-dh-lbl {
  font-weight: 700;
  color: var(--dodger-blue-bright);
  min-width: 28px;
}
.sp-field-dh-opp .sp-field-dh-lbl { color: #e06060; }
.sp-field-dh-name { flex: 1; color: var(--text); font-weight: 500; }
.sp-field-dh-seen { color: var(--text-dim); font-size: 0.75rem; }

@media (max-width: 700px) {
  .sp-fields-pair { grid-template-columns: 1fr; }
  .sp-top5-row { justify-content: center; }
  .sp-top5-card { min-width: 140px; }
  .sp-hero-leader { flex-direction: column; text-align: center; }
  .sp-hero-leader-name { white-space: normal; }
}

/* ══════════════════════════════════════════════════════
   SEEN PLAYERS — STATS PANEL WRAPPER
══════════════════════════════════════════════════════ */
.sp-stats-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow);
}
.sp-stats-panel-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border);
}
.sp-stats-panel .sp-hero-row {
  margin-bottom: 0;
}
.sp-stats-panel .sp-hero-card {
  box-shadow: none;
  background: var(--bg-surface);
}
.sp-stats-panel .sp-hero-card:hover {
  transform: translateY(-1px);
}

/* ══════════════════════════════════════════════════════
   FETCH ALL GAMES — BOTTOM SECTION
══════════════════════════════════════════════════════ */
.fetch-all-section {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.fetch-all-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.6rem 1.4rem;
  font-size: 0.9rem;
}

.fetch-all-btn svg {
  flex-shrink: 0;
  transition: transform 0.6s linear;
}

.fetch-all-btn--loading svg {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.fetch-all-progress {
  width: 100%;
  max-width: 520px;
}

.fetch-progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.45rem;
}

.fetch-progress-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.fetch-progress-count {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}

.fetch-progress-track {
  width: 100%;
  height: 6px;
  background: var(--bg-surface);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.fetch-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--dodger-blue), var(--dodger-blue-light));
  border-radius: 999px;
  transition: width 0.35s ease;
}

.fetch-result-text {
  margin-top: 0.65rem;
  text-align: center;
  font-size: 0.88rem;
  color: var(--text-muted);
  min-height: 1.2em;
}

.fetch-result-ok    { color: #5cb85c; }
.fetch-result-error { color: #e07070; }

/* ══════════════════════════════════════════════════════
   SEEN PLAYERS — IP / AB EXTRA STAT COLUMN
══════════════════════════════════════════════════════ */
.sp-extra-stat {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}
.sp-extra-lbl {
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ══════════════════════════════════════════
   GRAND SLAM GAME BANNER
   ══════════════════════════════════════════ */
.gs-banner {
  background: linear-gradient(135deg, rgba(201,168,76,0.12) 0%, rgba(201,168,76,0.05) 100%);
  border: 1px solid rgba(201,168,76,0.4);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  animation: gsGlow 3s ease-in-out infinite alternate;
}
@keyframes gsGlow {
  from { box-shadow: 0 0 12px rgba(201,168,76,0.1); }
  to   { box-shadow: 0 0 24px rgba(201,168,76,0.25); }
}
.gs-banner-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.3rem;
  letter-spacing: 0.06em;
  color: var(--gold);
  margin-bottom: 1rem;
}
.gs-banner-rocket { font-size: 1.5rem; line-height: 1; }
.gs-banner-count {
  margin-left: auto;
  background: rgba(201,168,76,0.2);
  color: var(--gold);
  font-size: 1rem;
  border-radius: 999px;
  padding: 0.1rem 0.7rem;
  font-weight: 800;
  font-family: 'Inter', sans-serif;
}
.gs-banner-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.gs-banner-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  background: rgba(201,168,76,0.08);
  border: 1px solid rgba(201,168,76,0.25);
  border-radius: var(--radius);
  padding: 0.6rem 1rem;
  min-width: 200px;
}
.gs-banner-photo {
  width: 38px; height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(201,168,76,0.5);
}
.gs-banner-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 2px solid rgba(201,168,76,0.3);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
}
.gs-avatar-dodger { border-color: rgba(0,90,156,0.5); background: rgba(0,90,156,0.1); }
.gs-banner-info { display: flex; flex-direction: column; gap: 0.2rem; }
.gs-banner-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
  text-decoration: none;
}
.gs-banner-name--dodger {
  color: var(--dodger-blue-light);
}
.gs-banner-name--dodger:hover { color: var(--dodger-blue-bright); text-decoration: underline; }
.gs-banner-tag {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--dodger-blue-light);
  background: rgba(0,90,156,0.15);
  border-radius: 3px;
  padding: 0.1rem 0.4rem;
  width: fit-content;
}

/* ══════════════════════════════════════════
   GRAND SLAM FORM ROWS
   ══════════════════════════════════════════ */
.gs-row {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
}
.gs-search-wrap {
  position: relative;
  flex: 1;
}
.gs-search-results {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  z-index: 50;
  max-height: 200px;
  overflow-y: auto;
  box-shadow: var(--shadow);
}
.gs-result-item {
  padding: 0.55rem 0.8rem;
  font-size: 0.85rem;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: background 0.12s;
}
.gs-result-item:hover { background: var(--bg-card-hover); }
.gs-result-pos { font-size: 0.72rem; color: var(--text-dim); margin-left: auto; }
.gs-remove-btn {
  flex-shrink: 0;
  background: rgba(200,16,46,0.12);
  border: 1px solid rgba(200,16,46,0.3);
  color: var(--red);
  border-radius: var(--radius-sm);
  width: 34px; height: 38px;
  cursor: pointer;
  font-size: 0.8rem;
  transition: background 0.15s;
}
.gs-remove-btn:hover { background: rgba(200,16,46,0.25); }
.gs-dodger-tag {
  display: inline-block;
  margin-top: 0.3rem;
  font-size: 0.72rem;
  color: var(--dodger-blue-light);
  background: rgba(0,90,156,0.15);
  border-radius: 4px;
  padding: 0.15rem 0.5rem;
}

/* ══════════════════════════════════════════
   DODGER STADIUM SEATING MAP
   ══════════════════════════════════════════ */
.seating-hero {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem 2.5rem;
  margin-bottom: 1.5rem;
}
.seating-hero-stat { text-align: center; }
.seating-hero-num {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 3rem;
  color: var(--dodger-blue-light);
  line-height: 1;
}
.seating-hero-lbl { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.3rem; text-transform: uppercase; letter-spacing: 0.06em; }
.seating-hero-divider { width: 1px; height: 60px; background: var(--border); }

/* Legend */
.seating-legend {
  display: flex; flex-wrap: wrap; gap: 1rem 1.5rem;
  margin-bottom: 1.5rem;
  padding: 0.75rem 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.legend-item { display: flex; align-items: center; gap: 0.45rem; font-size: 0.8rem; color: var(--text-muted); }
.legend-dot {
  width: 12px; height: 12px; border-radius: 50%;
}
.legend-dot.level-field_deck { background: #c9a84c; }
.legend-dot.level-field      { background: #005a9c; }
.legend-dot.level-loge       { background: #22c55e; }
.legend-dot.level-reserve    { background: #a855f7; }
.legend-dot.level-field_side { background: #f97316; }

/* SVG map */
.seating-map-wrap {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem;
  margin-bottom: 2rem;
  overflow-x: auto;
}
.seating-svg {
  width: 100%;
  max-width: 900px;
  display: block;
  margin: 0 auto;
}

/* Seat markers inside SVG */
.seat-glow { opacity: 0; transition: opacity 0.2s; }
.seat-marker:hover .seat-glow { opacity: 0.35; }

.seat-glow--field_deck { fill: #c9a84c; }
.seat-glow--field      { fill: #005a9c; }
.seat-glow--loge       { fill: #22c55e; }
.seat-glow--reserve    { fill: #a855f7; }
.seat-glow--field_side { fill: #f97316; }

.seat-circle { stroke-width: 2; cursor: pointer; transition: r 0.15s; }
.seat-circle--field_deck { fill: rgba(201,168,76,0.25);  stroke: #c9a84c; }
.seat-circle--field      { fill: rgba(0,90,156,0.35);    stroke: #1a7bc4; }
.seat-circle--loge       { fill: rgba(34,197,94,0.25);   stroke: #22c55e; }
.seat-circle--reserve    { fill: rgba(168,85,247,0.25);  stroke: #a855f7; }
.seat-circle--field_side { fill: rgba(249,115,22,0.25);  stroke: #f97316; }

.seat-label {
  font-family: 'Inter', sans-serif;
  font-size: 8.5px;
  font-weight: 700;
  fill: #ffffff;
  dominant-baseline: middle;
  pointer-events: none;
}
.seat-badge { fill: #c8102e; }
.seat-badge-num {
  font-family: 'Inter', sans-serif;
  font-size: 8px;
  font-weight: 800;
  fill: white;
  dominant-baseline: middle;
  pointer-events: none;
}

/* Section detail cards */
.seating-sections-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}
.seating-section-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.level-border--field_deck { border-left: 3px solid #c9a84c; }
.level-border--field      { border-left: 3px solid #1a7bc4; }
.level-border--loge       { border-left: 3px solid #22c55e; }
.level-border--reserve    { border-left: 3px solid #a855f7; }
.level-border--field_side { border-left: 3px solid #f97316; }

.ssc-header {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.65rem 0.9rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-surface);
}
.ssc-label {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.1rem;
  letter-spacing: 0.04em;
  padding: 0.1rem 0.5rem;
  border-radius: 6px;
}
.level-badge--field_deck { color: #c9a84c; background: rgba(201,168,76,0.15); }
.level-badge--field      { color: #3399ff; background: rgba(0,90,156,0.2);    }
.level-badge--loge       { color: #22c55e; background: rgba(34,197,94,0.15);  }
.level-badge--reserve    { color: #c084fc; background: rgba(168,85,247,0.15); }
.level-badge--field_side { color: #fb923c; background: rgba(249,115,22,0.15); }

.ssc-level-name { font-size: 0.72rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.06em; flex: 1; }
.ssc-count { font-weight: 700; font-size: 0.85rem; color: var(--text-muted); }

.ssc-games { padding: 0.5rem 0; }
.ssc-game-row {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.4rem 0.9rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: background 0.15s;
  flex-wrap: wrap;
}
.ssc-game-row:hover { background: var(--bg-card-hover); color: var(--text); }
.ssc-date { font-weight: 600; color: var(--text-muted); font-size: 0.72rem; white-space: nowrap; }
.ssc-opp  { flex: 1; font-weight: 500; color: var(--text); font-size: 0.78rem; }
.ssc-seat { font-size: 0.7rem; color: var(--text-dim); }
.ssc-result { font-size: 0.65rem; font-weight: 800; padding: 0.1rem 0.35rem; border-radius: 4px; }
.ssc-result--w { background: rgba(34,197,94,0.2);  color: #22c55e; }
.ssc-result--l { background: rgba(200,16,46,0.2);  color: #e07070; }
.ssc-result--t { background: rgba(120,120,120,0.2); color: #aaa; }

.game-result-chip { font-size: 0.65rem; font-weight: 800; padding: 0.1rem 0.35rem; border-radius: 4px; }
.game-result-chip--w { background: rgba(34,197,94,0.2);  color: #22c55e; }
.game-result-chip--l { background: rgba(200,16,46,0.2);  color: #e07070; }
.game-result-chip--t { background: rgba(120,120,120,0.2); color: #aaa; }

/* ══════════════════════════════════════════════════════════
   Grand Slams Overview Page  (.gs-page-*)
   ══════════════════════════════════════════════════════════ */

.gs-page-hero {
  text-align: center;
  padding: 2rem 1rem 1.5rem;
  background: linear-gradient(135deg, rgba(201,168,76,0.12), rgba(201,168,76,0.04));
  border: 1px solid rgba(201,168,76,0.25);
  border-radius: var(--radius-lg);
  margin-bottom: 2rem;
}
.gs-page-hero-num {
  font-size: 3.5rem;
  font-weight: 800;
  color: #C9A84C;
  line-height: 1;
}
.gs-page-hero-lbl {
  font-size: 1rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
  font-weight: 500;
}

.gs-page-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.gs-page-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0.9rem 1.1rem;
  transition: border-color 0.2s, background 0.2s;
}
.gs-page-item:hover {
  border-color: rgba(201,168,76,0.4);
  background: var(--bg-card-hover);
}

/* Avatar */
.gs-page-avatar { flex-shrink: 0; }
.gs-page-photo {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(201,168,76,0.5);
  display: block;
}
.gs-page-avatar-circle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255,255,255,0.07);
  border: 2px solid rgba(201,168,76,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}
.gs-page-avatar-circle.gs-avatar-dodger {
  background: rgba(0,90,156,0.15);
  border-color: rgba(0,90,156,0.5);
}

/* Info block */
.gs-page-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.gs-page-player {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.gs-page-player-link,
.gs-page-player-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}
.gs-page-player-link.gs-page-player-dodger { color: #5aabff; }
.gs-page-player-link.gs-page-player-dodger:hover { text-decoration: underline; }
.gs-page-dodger-tag {
  font-size: 0.65rem;
  font-weight: 700;
  background: rgba(0,90,156,0.2);
  color: var(--dodger-blue-light);
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  border: 1px solid rgba(0,90,156,0.4);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.gs-page-game-link {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.82rem;
  transition: color 0.15s;
}
.gs-page-game-link:hover { color: var(--text); }
.gs-page-date {
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}
.gs-page-matchup {
  color: var(--text-dim);
  font-size: 0.78rem;
}
.gs-page-score {
  font-weight: 600;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.gs-page-result {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.12rem 0.38rem;
  border-radius: 4px;
  text-transform: uppercase;
}
.gs-page-result--w { background: rgba(34,197,94,0.18);  color: #22c55e; }
.gs-page-result--l { background: rgba(200,16,46,0.18);  color: #e07070; }
.gs-page-result--t { background: rgba(120,120,120,0.18); color: #aaa; }

/* YouTube button */
.gs-page-yt-btn {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  background: rgba(255,0,0,0.1);
  border: 1px solid rgba(255,0,0,0.25);
  border-radius: var(--radius-md);
  color: #ff6b6b;
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 600;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  white-space: nowrap;
}
.gs-page-yt-btn:hover {
  background: rgba(255,0,0,0.2);
  border-color: rgba(255,0,0,0.45);
  color: #ff4444;
}

/* Clickable sp-hero-card */
.sp-hero-card-link {
  text-decoration: none;
  cursor: pointer;
  border-color: rgba(201,168,76,0.2) !important;
}
.sp-hero-card-link:hover {
  border-color: rgba(201,168,76,0.55) !important;
  background: rgba(201,168,76,0.07);
  transform: translateY(-2px);
}

@media (max-width: 600px) {
  .gs-page-item { flex-wrap: wrap; gap: 0.75rem; }
  .gs-page-yt-btn span { display: none; }
  .gs-page-yt-btn { padding: 0.45rem 0.65rem; }
}

/* MLB.com external link in game detail */
.mlb-com-link {
  color: var(--dodger-blue-light);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.88rem;
  transition: color 0.15s;
}
.mlb-com-link:hover {
  color: #fff;
  text-decoration: underline;
}

/* Substitute batter rows in game detail roster table */
.mlb-sub-row {
  opacity: 0.78;
  background: rgba(255,255,255,0.02);
}
.mlb-sub-row td {
  border-top: 1px dashed rgba(255,255,255,0.06);
}
.mlb-sub-badge {
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 3px;
  padding: 0.1rem 0.3rem;
}

/* Sub-row arrow indent */
.mlb-sub-name { padding-left: 0.25rem !important; }
.mlb-sub-arrow {
  color: var(--text-dim);
  font-size: 0.75rem;
  margin-right: 0.3rem;
  opacity: 0.6;
}

/* ═══════════════════════════════════════════════
   PLAYER LIST PAGES (dodgers_players / other_players)
   ═══════════════════════════════════════════════ */

/* Filter bar */
.pl-filter-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.pl-search-input {
  flex: 1;
  min-width: 200px;
  max-width: 380px;
  padding: 0.55rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
}
.pl-search-input:focus { border-color: var(--dodger-blue); }

.pl-filter-pills { display: flex; gap: 0.5rem; }
.pl-pill {
  padding: 0.35rem 0.85rem;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.15s;
}
.pl-pill:hover { border-color: var(--dodger-blue); color: var(--dodger-blue); }
.pl-pill-active {
  background: var(--dodger-blue);
  border-color: var(--dodger-blue);
  color: #fff;
  font-weight: 600;
}

/* Sortable table headers */
.pl-th { padding: 0.6rem 0.9rem; }
.pl-th-rank { width: 2.5rem; text-align: center; }
.pl-th-center { text-align: center; }
.pl-th-last { text-align: right; white-space: nowrap; }
.pl-sortable { cursor: pointer; user-select: none; white-space: nowrap; }
.pl-sortable:hover { color: var(--dodger-blue-light); }
.pl-sort-icon { font-size: 0.75rem; opacity: 0.5; margin-left: 2px; }
.pl-sort-asc .pl-sort-icon,
.pl-sort-desc .pl-sort-icon { opacity: 1; color: var(--dodger-blue-light); }

/* Rank cell */
.pl-rank-cell { text-align: center; color: var(--text-muted); font-size: 0.8rem; }

/* ERA badge */
.pl-era-badge {
  display: block;
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* HR badge */
.pl-hr-badge {
  display: inline-block;
  background: rgba(255, 100, 50, 0.15);
  color: #ff8040;
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 0.8rem;
  font-weight: 700;
}
.pl-hr-opp {
  background: rgba(200, 50, 50, 0.15);
  color: #ff6060;
}

/* Team badge for opponents */
.pl-team-badge {
  font-size: 0.78rem;
  color: var(--text-secondary);
  white-space: nowrap;
}

/* No results */
.pl-no-results {
  text-align: center;
  color: var(--text-muted);
  padding: 2rem;
  font-size: 0.95rem;
}

/* Pitcher position badge color */
.sp-pos-pitcher {
  background: rgba(100, 160, 255, 0.15);
  color: var(--dodger-blue-light);
}

/* ═══════════════════════════════════════════════
   REFRESH BUTTON
   ═══════════════════════════════════════════════ */
.sp-refresh-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1.1rem;
  border-radius: 8px;
  border: 1px solid var(--dodger-blue);
  background: transparent;
  color: var(--dodger-blue-light);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.sp-refresh-btn:hover {
  background: var(--dodger-blue);
  color: #fff;
  transform: translateY(-1px);
}
.sp-refresh-btn:active { transform: translateY(0); }

/* ═══════════════════════════════════════════════
   FIELD DIAGRAM — FULL NAME LEGEND
   ═══════════════════════════════════════════════ */
.sp-field-legend {
  margin-top: 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  font-size: 0.78rem;
}
.sp-field-legend-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.15rem 0.25rem;
  border-radius: 4px;
}
.sp-field-legend-row:hover { background: rgba(255,255,255,0.05); }
.sp-field-legend-pos {
  font-weight: 700;
  font-size: 0.72rem;
  color: var(--dodger-blue-light);
  width: 2rem;
  flex-shrink: 0;
}
.sp-field-legend-opp .sp-field-legend-pos { color: #ff9999; }
.sp-field-legend-name {
  flex: 1;
  color: var(--text-primary);
}
.sp-field-legend-seen {
  color: var(--text-muted);
  font-size: 0.72rem;
  white-space: nowrap;
}

/* ═══════════════════════════════════════════════
   TOP 5 — ANDRE SPILLERE (opponents)
   ═══════════════════════════════════════════════ */
.sp-top5-card-opp {
  border-color: rgba(200, 60, 60, 0.3);
}
.sp-top5-card-opp:hover {
  border-color: #cc4444;
  box-shadow: 0 4px 16px rgba(200,60,60,0.2);
}
.sp-top5-rank-opp {
  background: rgba(180, 40, 40, 0.25);
  color: #ff9999;
}
.sp-top5-opp-icon {
  font-size: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(200, 60, 60, 0.1);
  border: 2px solid rgba(200,60,60,0.3);
}
.sp-top5-team-badge {
  font-size: 0.72rem;
  color: #ff9999;
  background: rgba(180,40,40,0.15);
  border: 1px solid rgba(200,60,60,0.25);
  border-radius: 4px;
  padding: 1px 7px;
  margin-top: 0.2rem;
  text-align: center;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sp-top5-seen-opp {
  background: rgba(180, 40, 40, 0.2);
  color: #ff9999;
  border-color: rgba(200,60,60,0.3);
}

/* ═══════════════════════════════════════════════
   STATS — SCROLLABLE TABLE CONTAINER + STICKY HEADER
   overflow-x AND overflow-y both set → container is
   the scroll ancestor, so sticky top:0 works reliably.
   ═══════════════════════════════════════════════ */
.stats-table-container {
  overflow-x: auto;
  overflow-y: auto;
  max-height: max(320px, calc(100vh - 370px)); /* leaves room for navbar + page controls; min 320px */
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.stats-table thead th {
  position: sticky;
  top: 0;           /* top of the scroll container */
  z-index: 10;
  background: #0d1e30;
  box-shadow: 0 1px 0 var(--border);
}

/* Tbody cells need a solid background so they are cleanly
   hidden behind the sticky header when scrolling up. */
.stats-table tbody td {
  background: var(--bg-surface);
}
.stats-table tbody tr:hover td {
  background: var(--bg-card-hover);
}
.stats-table tbody tr:nth-child(even) td {
  background: var(--bg-card);
}
.stats-table tbody tr:nth-child(even):hover td {
  background: var(--bg-card-hover);
}

/* ═══════════════════════════════════════════════
   STATS — COLUMN HEADER TOOLTIP
   ═══════════════════════════════════════════════ */
.stats-table th[data-tip] {
  cursor: help;
  border-bottom: 1px dashed rgba(100,160,255,0.4);
}
.stats-table th[data-tip]:hover {
  color: var(--dodger-blue-light);
}
/* Custom tooltip bubble — no position:relative needed; sticky already makes th positioned */
.stats-table th[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: #0d1e30;
  color: var(--text-primary);
  border: 1px solid var(--dodger-blue);
  border-radius: 6px;
  padding: 0.4rem 0.7rem;
  font-size: 0.75rem;
  font-weight: 400;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
  z-index: 200;
  max-width: 260px;
  white-space: normal;
  text-align: left;
  width: max-content;
  min-width: 140px;
}
.stats-table th[data-tip]:hover::after {
  opacity: 1;
}

/* ═══════════════════════════════════════════════
   STATS — MIN GAMES TOGGLE BUTTON
   ═══════════════════════════════════════════════ */
.stats-mingames-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.82rem;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s;
  white-space: nowrap;
}
.stats-mingames-btn:hover {
  border-color: var(--dodger-blue);
  color: var(--dodger-blue-light);
}
.stats-mingames-btn.active {
  background: rgba(0,90,156,0.2);
  border-color: var(--dodger-blue);
  color: var(--dodger-blue-bright);
  font-weight: 600;
}
.stats-mingames-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
  flex-shrink: 0;
  transition: background 0.15s;
}
.stats-mingames-btn.active .stats-mingames-dot {
  background: var(--dodger-blue-bright);
}

/* ═══════════════════════════════════════════════
   STATS — FUN FACTS BANNER
   ═══════════════════════════════════════════════ */
.stats-funfact {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: linear-gradient(135deg, rgba(0,60,120,0.35) 0%, rgba(10,30,60,0.5) 100%);
  border: 1px solid rgba(0,90,156,0.4);
  border-radius: var(--radius-lg);
  padding: 0.9rem 1.25rem;
  margin-bottom: 1.5rem;
  min-height: 58px;
}
.stats-funfact-icon {
  font-size: 1.6rem;
  flex-shrink: 0;
  line-height: 1;
}
.stats-funfact-text {
  flex: 1;
  font-size: 0.92rem;
  color: var(--text-primary);
  line-height: 1.45;
}
.stats-funfact-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--dodger-blue-light);
  margin-bottom: 0.2rem;
}
.stats-funfact-next {
  background: none;
  border: 1px solid rgba(0,90,156,0.4);
  border-radius: 6px;
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
  padding: 0.3rem 0.55rem;
  transition: all 0.15s;
  flex-shrink: 0;
}
.stats-funfact-next:hover {
  border-color: var(--dodger-blue);
  color: var(--dodger-blue-light);
}

/* ═══════════════════════════════════════════════
   SETEKART — IMAGE + RED RING OVERLAY
   ═══════════════════════════════════════════════ */
.seating-img-wrap {
  position: relative;
  display: block;
  width: 100%;
  max-width: 860px;
  margin: 1.5rem auto 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 4px 32px rgba(0,0,0,0.5);
}

.seating-base-img {
  display: block;
  width: 100%;
  height: auto;
}

/* ── Red ring pin ───────────────────────────── */
.seating-pin {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 3px solid #e63946;
  background: rgba(230, 57, 70, 0.18);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: default;
  transition: transform 0.15s, background 0.15s;
  z-index: 10;
}
.seating-pin:hover {
  background: rgba(230, 57, 70, 0.40);
  transform: translate(-50%, -50%) scale(1.15);
  z-index: 20;
}

/* Level-specific ring colours */
.seating-pin--field_deck { border-color: #ff6b6b; }
.seating-pin--field      { border-color: #e63946; }
.seating-pin--loge       { border-color: #ff9500; }
.seating-pin--reserve    { border-color: #ff6b35; }
.seating-pin--field_side { border-color: #ff4d6d; }

.seating-pin-label {
  font-size: 0.58rem;
  font-weight: 700;
  color: #fff;
  text-align: center;
  line-height: 1.1;
  text-shadow: 0 1px 3px rgba(0,0,0,0.9);
  letter-spacing: 0.02em;
}
.seating-pin-badge {
  font-size: 0.5rem;
  font-weight: 800;
  color: #ffd700;
  text-shadow: 0 1px 3px rgba(0,0,0,0.9);
  line-height: 1;
  margin-top: 1px;
}

/* ── Legend dots ────────────────────────────── */
.seating-pin-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid currentColor;
  margin-right: 4px;
  vertical-align: middle;
}
.seating-pin-dot--field_deck { border-color: #ff6b6b; background: rgba(255,107,107,0.25); }
.seating-pin-dot--field      { border-color: #e63946; background: rgba(230,57,70,0.25); }
.seating-pin-dot--loge       { border-color: #ff9500; background: rgba(255,149,0,0.25); }
.seating-pin-dot--reserve    { border-color: #ff6b35; background: rgba(255,107,53,0.25); }
.seating-pin-dot--field_side { border-color: #ff4d6d; background: rgba(255,77,109,0.25); }

/* ═══════════════════════════════════════════════════
   SEASON STATS PAGE  (/spillere/sesong)
   ═══════════════════════════════════════════════════ */

/* Season selector */
.season-selector-wrap {
  display: flex;
  justify-content: center;
  margin: 2rem 0 1.5rem;
}
.season-selector-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}
.season-selector-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.season-select-box {
  position: relative;
  display: flex;
  align-items: center;
}
.season-select {
  appearance: none;
  background: var(--bg-card);
  border: 2px solid var(--dodger-blue);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  font-size: 1.75rem;
  font-weight: 900;
  padding: 0.4rem 3rem 0.4rem 1.25rem;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  min-width: 160px;
  text-align: center;
}
.season-select:focus {
  border-color: var(--dodger-light);
  box-shadow: 0 0 0 3px rgba(82,153,255,0.25);
}
.season-select option { background: var(--bg-card); color: var(--text-primary); }
.season-select-arrow {
  position: absolute;
  right: 1rem;
  pointer-events: none;
  color: var(--dodger-blue);
  font-size: 1rem;
}

/* Empty / error states */
.season-empty {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
}
.season-empty-icon { font-size: 3.5rem; margin-bottom: 1rem; }
.season-error {
  background: rgba(220,38,38,0.12);
  border: 1px solid rgba(220,38,38,0.4);
  border-radius: var(--radius);
  padding: 1rem 1.5rem;
  color: #f87171;
  margin: 1.5rem 0;
}

/* Team card */
.season-team-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 2rem;
  margin-bottom: 1.25rem;
}
.season-record-num {
  font-size: 2.25rem;
  font-weight: 900;
  color: var(--dodger-blue);
  line-height: 1;
}
.season-standing-num {
  font-size: 2.25rem;
  font-weight: 900;
  color: var(--text-primary);
  line-height: 1;
}
.season-standing-trophy { font-size: 1.5rem; }
.season-record-lbl {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 0.25rem;
}
.season-team-divider {
  width: 1px;
  height: 3rem;
  background: var(--border);
  flex-shrink: 0;
}
.season-team-agg {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.season-agg-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
}
.season-agg-lbl {
  color: var(--text-muted);
  width: 2.5rem;
  font-weight: 600;
  font-size: 0.75rem;
}
.season-agg-val {
  color: var(--text-primary);
  font-weight: 700;
}

/* Legend */
.season-legend {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}
.season-legend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #22c55e;
  flex-shrink: 0;
}
.season-legend-info {
  cursor: help;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
}

/* Side-by-side layout */
.season-tables-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
}
@media (max-width: 1000px) {
  .season-tables-grid { grid-template-columns: 1fr; }
}

.season-table-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.season-table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem 0.75rem;
  border-bottom: 1px solid var(--border);
}
.season-table-title {
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
}
.season-table-count {
  font-size: 0.75rem;
  color: var(--text-muted);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 0.15rem 0.6rem;
}
.season-table-container {
  overflow-x: auto;
  max-height: 70vh;
  overflow-y: auto;
}
.season-no-data {
  padding: 2rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Season stats table tweaks */
.season-stats-table { font-size: 0.8rem; }
.season-stats-table thead th {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #0d1e30;
  white-space: nowrap;
  font-size: 0.72rem;
  padding: 0.45rem 0.6rem;
}
.season-stats-table tbody td { padding: 0.35rem 0.6rem; }

/* Player name column */
.season-player-name {
  white-space: nowrap;
  font-weight: 600;
  min-width: 120px;
}
.season-player-link {
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.15s;
}
.season-player-link:hover { color: var(--dodger-blue); }
.season-pos-badge {
  display: inline-block;
  margin-left: 0.35rem;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 0 0.3rem;
  vertical-align: middle;
}

/* Career comparison row */
.season-career-row td {
  background: rgba(255,255,255,0.025) !important;
  color: var(--text-muted) !important;
  font-size: 0.72rem;
  font-style: italic;
  border-top: none !important;
}
.season-career-lbl {
  font-weight: 600;
  font-style: italic;
  color: var(--text-muted) !important;
}
.season-career-row:hover td { background: rgba(255,255,255,0.04) !important; }

/* Green "better than career" highlight */
.stat-better {
  color: #22c55e !important;
  font-weight: 700;
}

/* Manager block in team card */
.season-manager-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

/* ── Sortable column headers ─────────────────────── */
.season-stats-table thead th.sortable {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  transition: color 0.15s, background 0.15s;
}
.season-stats-table thead th.sortable:hover {
  color: var(--dodger-light);
  background: rgba(82,153,255,0.08);
}
.season-stats-table thead th.sortable::after {
  content: ' ⇅';
  opacity: 0.3;
  font-size: 0.6em;
}
.season-stats-table thead th.sort-active { color: var(--dodger-light); }
.season-stats-table thead th.sort-active::after { content: ' ▼'; opacity: 0.9; font-size: 0.65em; }
.season-stats-table thead th.sort-active.sort-asc::after { content: ' ▲'; }

/* ── World Series banner ─────────────────────────── */
.season-ws-banner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background: linear-gradient(135deg, rgba(255,195,0,0.12), rgba(255,195,0,0.03));
  border: 2px solid #f59e0b;
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.75rem;
  margin-bottom: 1.25rem;
}
.season-ws-trophy { font-size: 2.8rem; flex-shrink: 0; }
.season-ws-title {
  font-size: 1.25rem;
  font-weight: 900;
  color: #f59e0b;
  letter-spacing: 0.02em;
}
.season-ws-sub {
  font-size: 0.83rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

/* ── Playoff result card ─────────────────────────── */
.season-playoff-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem 1.5rem;
  margin-bottom: 1.25rem;
}
.season-playoff-title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}
.season-playoff-rounds {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.season-playoff-round {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.55rem 0.9rem;
  min-width: 145px;
}
.season-playoff-round.won  { border-color: rgba(34,197,94,0.45); }
.season-playoff-round.lost { border-color: rgba(239,68,68,0.35); }
.season-playoff-round-name {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.season-playoff-vs {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}
.season-playoff-result { font-size: 0.78rem; color: var(--text-muted); }

/* No playoffs notice */
.season-no-playoffs {
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: 0.5rem 0;
  margin-bottom: 1rem;
}

/* ── Coaching staff section ──────────────────────── */
.season-coaches-wrap { margin-top: 2.5rem; }
.season-coaches-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
}
.season-coaches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.65rem;
}
.season-coach-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.7rem 0.9rem;
  transition: border-color 0.15s;
}
.season-coach-card:hover { border-color: var(--dodger-blue); }
.season-coach-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
}
.season-coach-role {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}


/* ═══════════════════════════════════════════════════════
   CLUB HISTORY PAGE
   ═══════════════════════════════════════════════════════ */

/* ── Page wrapper ─────────────────────────────────────── */
.hist-page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.25rem 4rem;
}

/* ── Hero ─────────────────────────────────────────────── */
.hist-hero {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 2rem;
  padding: 3.5rem 2rem;
  text-align: center;
}
.hist-hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,
    rgba(0,90,180,0.55) 0%,
    rgba(8,14,34,0.85) 50%,
    rgba(180,0,0,0.25) 100%);
  backdrop-filter: blur(1px);
}
.hist-hero-content {
  position: relative;
  z-index: 1;
}
.hist-hero-logo { font-size: 3.5rem; margin-bottom: .5rem; line-height: 1; }
.hist-hero-title {
  font-size: clamp(1.8rem, 5vw, 3.2rem);
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.01em;
  margin: 0 0 .3rem;
  text-transform: uppercase;
}
.hist-hero-sub {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.65);
  margin-bottom: 1.4rem;
}
.hist-hero-pills { display: flex; gap: .6rem; justify-content: center; flex-wrap: wrap; }
.hist-pill {
  display: inline-block;
  padding: .35rem .9rem;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.hist-pill.blue  { background: rgba(59,130,246,.25); color: #93c5fd; border: 1px solid rgba(59,130,246,.4); }
.hist-pill.gold  { background: rgba(245,158,11,.2);  color: #fcd34d; border: 1px solid rgba(245,158,11,.4); }
.hist-pill.teal  { background: rgba(6,182,212,.2);   color: #67e8f9; border: 1px solid rgba(6,182,212,.4); }

/* ── Quick stats row ──────────────────────────────────── */
.hist-quickstats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: .75rem;
  margin-bottom: 2.5rem;
}
.hist-qs-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.1rem .75rem;
  text-align: center;
  transition: border-color .15s, transform .15s;
}
.hist-qs-card:hover { border-color: var(--dodger-blue); transform: translateY(-2px); }
.hist-qs-icon { font-size: 1.6rem; margin-bottom: .25rem; }
.hist-qs-val  { font-size: 1.6rem; font-weight: 900; color: var(--text-primary); line-height: 1.1; }
.hist-qs-lbl  { font-size: .7rem; color: var(--text-muted); margin-top: .25rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }

/* ── Section wrapper ──────────────────────────────────── */
.hist-section { margin-bottom: 3rem; }
.hist-section-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 1.1rem;
  display: flex;
  align-items: center;
  gap: .5rem;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.hist-section-icon { font-size: 1.2rem; }

/* ── Front office ─────────────────────────────────────── */
.hist-office-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: .9rem;
}
.hist-office-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.4rem;
  border-top: 3px solid var(--dodger-blue);
  transition: border-color .15s;
}
.hist-office-card:hover { border-color: var(--dodger-blue); border-top-color: #f59e0b; }
.hist-office-role {
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: .35rem;
}
.hist-office-name {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: .25rem;
}
.hist-office-since { font-size: .72rem; color: var(--text-muted); }

/* ── History text ─────────────────────────────────────── */
.hist-text-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
}
.hist-text-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
}
.hist-text-col h3 {
  font-size: .85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--dodger-blue);
  margin-bottom: .75rem;
}
.hist-text-col p {
  font-size: .9rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: .75rem;
}
.hist-text-col p:last-child { margin-bottom: 0; }
@media (max-width: 720px) {
  .hist-text-cols { grid-template-columns: 1fr; gap: 1.5rem; }
}

/* ── World Series grid ────────────────────────────────── */
.hist-ws-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(245px, 1fr));
  gap: 1rem;
}
.hist-ws-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.4rem 1.25rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: border-color .15s, transform .15s;
}
.hist-ws-card:hover { border-color: #f59e0b; transform: translateY(-3px); }
.hist-ws-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #f59e0b, #fcd34d, #f59e0b);
}
.hist-ws-year {
  font-size: 2rem;
  font-weight: 900;
  color: var(--text-primary);
  line-height: 1;
}
.hist-ws-trophy { font-size: 2rem; margin: .3rem 0; }
.hist-ws-opponent {
  font-size: .78rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: .15rem;
}
.hist-ws-series {
  display: inline-block;
  background: rgba(245,158,11,.15);
  color: #f59e0b;
  font-size: .72rem;
  font-weight: 700;
  padding: .15rem .55rem;
  border-radius: 999px;
  margin-bottom: .6rem;
}
.hist-ws-mvp {
  margin-bottom: .6rem;
  display: flex;
  flex-direction: column;
  gap: .1rem;
}
.hist-ws-mvp-lbl { font-size: .6rem; text-transform: uppercase; letter-spacing: .1em; color: var(--text-muted); }
.hist-ws-mvp-name { font-size: .82rem; font-weight: 700; color: var(--text-primary); }
.hist-ws-note {
  font-size: .73rem;
  color: var(--text-muted);
  line-height: 1.5;
  text-align: left;
}

/* ── Pennants / division titles ───────────────────────── */
.hist-pennant-wrap {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.hist-pennant-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.4rem;
}
.hist-pennant-label {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--text-muted);
  margin-bottom: .75rem;
}
.hist-year-pills {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}
.hist-year-pill {
  font-size: .75rem;
  font-weight: 700;
  padding: .25rem .6rem;
  border-radius: 999px;
}
.hist-year-pill.pennant {
  background: rgba(245,158,11,.15);
  color: #fcd34d;
  border: 1px solid rgba(245,158,11,.3);
}
.hist-year-pill.div {
  background: rgba(99,102,241,.15);
  color: #a5b4fc;
  border: 1px solid rgba(99,102,241,.3);
}

/* ── Retired numbers ──────────────────────────────────── */
.hist-retired-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: .9rem;
}
.hist-retired-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.1rem 1.1rem;
  text-align: center;
  transition: border-color .15s, transform .15s;
  position: relative;
}
.hist-retired-card:hover { border-color: var(--dodger-blue); transform: translateY(-2px); }
.hist-retired-card.mlb-wide {
  border-color: rgba(245,158,11,.4);
  background: linear-gradient(135deg, var(--bg-card), rgba(245,158,11,.04));
}
.hist-retired-num {
  font-size: 2.8rem;
  font-weight: 900;
  color: var(--dodger-blue);
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  margin-bottom: .3rem;
}
.hist-mlb-badge {
  font-size: .5rem;
  font-weight: 900;
  background: #f59e0b;
  color: #000;
  padding: .1rem .3rem;
  border-radius: 4px;
  letter-spacing: .06em;
  vertical-align: middle;
  align-self: flex-start;
  margin-top: .4rem;
}
.hist-retired-name {
  font-size: .9rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: .15rem;
}
.hist-retired-pos {
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--dodger-blue);
  margin-bottom: .1rem;
}
.hist-retired-years {
  font-size: .65rem;
  color: var(--text-muted);
  margin-bottom: .5rem;
}
.hist-retired-note {
  font-size: .7rem;
  color: var(--text-muted);
  line-height: 1.4;
  text-align: left;
}

/* ── All-time leaders ─────────────────────────────────── */
.hist-leaders-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.hist-leaders-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.hist-leaders-header {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  padding: .75rem 1.1rem;
  font-size: .75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--text-secondary);
}
.hist-leaders-list { padding: .35rem 0; }
.hist-leader-row {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .65rem 1.1rem;
  border-bottom: 1px solid rgba(255,255,255,.04);
  transition: background .1s;
}
.hist-leader-row:last-child { border-bottom: none; }
.hist-leader-row:hover { background: var(--bg-surface); }
.hist-leader-icon { font-size: 1.2rem; flex-shrink: 0; width: 1.6rem; text-align: center; }
.hist-leader-info { flex: 1; min-width: 0; }
.hist-leader-stat {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text-muted);
}
.hist-leader-player {
  font-size: .88rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: baseline;
  gap: .4rem;
  flex-wrap: wrap;
}
.hist-leader-years {
  font-size: .65rem;
  color: var(--text-muted);
  font-weight: 400;
}
.hist-leader-val {
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--dodger-blue);
  flex-shrink: 0;
  text-align: right;
  min-width: 4rem;
}
@media (max-width: 800px) {
  .hist-leaders-wrap { grid-template-columns: 1fr; }
}

/* ── Perfect games ────────────────────────────────────── */
.hist-perfect-list { display: flex; flex-direction: column; gap: .85rem; }
.hist-perfect-card {
  background: var(--bg-card);
  border: 1px solid rgba(245,158,11,.35);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: auto auto;
  gap: .5rem 1.5rem;
  align-items: start;
  background: linear-gradient(135deg, var(--bg-card), rgba(245,158,11,.04));
}
.hist-perfect-left {
  display: flex;
  align-items: center;
  gap: .75rem;
}
.hist-perfect-emoji { font-size: 2rem; flex-shrink: 0; }
.hist-perfect-pitcher {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary);
}
.hist-perfect-date { font-size: .75rem; color: var(--text-muted); }
.hist-perfect-center { }
.hist-perfect-opp { font-size: .85rem; font-weight: 600; color: var(--text-secondary); }
.hist-perfect-score {
  display: inline-block;
  background: rgba(245,158,11,.15);
  color: #f59e0b;
  font-size: .75rem;
  font-weight: 700;
  padding: .15rem .5rem;
  border-radius: 999px;
  margin-top: .2rem;
}
.hist-perfect-right { text-align: right; }
.hist-perfect-k {
  font-size: 1.8rem;
  font-weight: 900;
  color: #f59e0b;
  line-height: 1;
}
.hist-perfect-klbl { font-size: .65rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .08em; }
.hist-perfect-note {
  grid-column: 1 / -1;
  font-size: .78rem;
  color: var(--text-muted);
  line-height: 1.55;
  padding-top: .25rem;
  border-top: 1px solid var(--border);
}

/* ── Fun facts ────────────────────────────────────────── */
.hist-facts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 1rem;
}
.hist-fact-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.35rem 1.4rem;
  border-left: 4px solid var(--fact-color, var(--dodger-blue));
  transition: transform .15s, border-color .15s;
}
.hist-fact-card:hover { transform: translateY(-2px); }
.hist-fact-icon { font-size: 1.8rem; margin-bottom: .5rem; }
.hist-fact-title {
  font-size: .9rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: .45rem;
}
.hist-fact-text {
  font-size: .82rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ── No-hitter cards ──────────────────────────────────── */
.hist-nh-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(265px, 1fr));
  gap: .85rem;
}
.hist-nh-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem 1.1rem;
  position: relative;
  transition: border-color .15s, transform .15s;
}
.hist-nh-card:hover { border-color: var(--dodger-blue); transform: translateY(-2px); }
.hist-nh-card.is-perfect {
  border-color: rgba(245,158,11,.5);
  background: linear-gradient(135deg, var(--bg-card), rgba(245,158,11,.05));
}
.hist-nh-badge {
  display: inline-block;
  background: rgba(245,158,11,.18);
  color: #f59e0b;
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .18rem .55rem;
  border-radius: 999px;
  margin-bottom: .55rem;
}
.hist-nh-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .5rem;
  margin-bottom: .25rem;
}
.hist-nh-pitcher {
  font-size: .95rem;
  font-weight: 800;
  color: var(--text-primary);
}
.hist-nh-score {
  font-size: .82rem;
  font-weight: 700;
  color: #22c55e;
  flex-shrink: 0;
}
.hist-nh-meta {
  font-size: .72rem;
  color: var(--text-muted);
  margin-bottom: .55rem;
  display: flex;
  align-items: center;
  gap: .35rem;
  flex-wrap: wrap;
}
.hist-nh-sep { opacity: .4; }
.hist-nh-k {
  display: flex;
  align-items: baseline;
  gap: .3rem;
  margin-bottom: .55rem;
}
.hist-nh-kval {
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--dodger-blue);
  line-height: 1;
}
.hist-nh-klbl {
  font-size: .65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .07em;
}
.hist-nh-note {
  font-size: .73rem;
  color: var(--text-muted);
  line-height: 1.5;
  border-top: 1px solid var(--border);
  padding-top: .5rem;
}
.hist-nh-footnote {
  font-size: .72rem;
  color: var(--text-muted);
  margin-top: .75rem;
  font-style: italic;
}


/* ═══════════════════════════════════════════════════════
   MANAGERS HISTORY PAGE
   ═══════════════════════════════════════════════════════ */

.mgr-page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.25rem 4rem;
}

/* ── Hero ─────────────────────────────────────────────── */
.mgr-hero {
  background: linear-gradient(135deg, rgba(0,90,180,.4) 0%, rgba(8,14,34,.9) 60%, rgba(30,10,60,.4) 100%);
  border-radius: var(--radius-lg);
  padding: 2.8rem 2rem;
  text-align: center;
  margin-bottom: 1.75rem;
}
.mgr-hero-icon { font-size: 3rem; margin-bottom: .4rem; }
.mgr-hero-title {
  font-size: clamp(1.5rem, 4vw, 2.4rem);
  font-weight: 900;
  color: #fff;
  text-transform: uppercase;
  margin: 0 0 .35rem;
}
.mgr-hero-sub { font-size: .9rem; color: rgba(255,255,255,.55); }

/* ── Top records row ──────────────────────────────────── */
.mgr-records {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: .75rem;
  margin-bottom: 1.75rem;
}
.mgr-rec-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem .9rem;
  text-align: center;
  transition: border-color .15s;
}
.mgr-rec-card:hover { border-color: var(--dodger-blue); }
.mgr-rec-icon { font-size: 1.5rem; margin-bottom: .2rem; }
.mgr-rec-val {
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--dodger-blue);
  line-height: 1.1;
}
.mgr-rec-name {
  font-size: .78rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: .15rem 0 .1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mgr-rec-lbl { font-size: .62rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .07em; }

/* ── Filter bar ───────────────────────────────────────── */
.mgr-filter-bar {
  display: flex;
  gap: .5rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.mgr-filter-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: .4rem 1.1rem;
  font-size: .8rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  transition: all .15s;
}
.mgr-filter-btn:hover { border-color: var(--dodger-blue); color: var(--text-primary); }
.mgr-filter-btn.active { background: var(--dodger-blue); border-color: var(--dodger-blue); color: #fff; }

/* ── Manager grid ─────────────────────────────────────── */
.mgr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

/* ── Manager card ─────────────────────────────────────── */
.mgr-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.3rem;
  position: relative;
  transition: border-color .15s, transform .15s;
  overflow: hidden;
}
.mgr-card:hover { border-color: var(--dodger-blue); transform: translateY(-2px); }

.mgr-era-badge {
  display: inline-block;
  font-size: .62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .09em;
  padding: .18rem .6rem;
  border-radius: 999px;
  margin-bottom: .65rem;
}
.mgr-era-badge.brooklyn {
  background: rgba(245,158,11,.15);
  color: #fbbf24;
  border: 1px solid rgba(245,158,11,.3);
}
.mgr-era-badge.la {
  background: rgba(59,130,246,.15);
  color: #93c5fd;
  border: 1px solid rgba(59,130,246,.3);
}

.mgr-hof-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: linear-gradient(135deg, #f59e0b, #fcd34d);
  color: #000;
  font-size: .55rem;
  font-weight: 900;
  letter-spacing: .08em;
  padding: .2rem .45rem;
  border-radius: 4px;
}

.mgr-card-head {
  display: flex;
  align-items: center;
  gap: .85rem;
  margin-bottom: .85rem;
}
.mgr-avatar {
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--dodger-blue), #1e3a8a);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .95rem;
  font-weight: 900;
  color: #fff;
  flex-shrink: 0;
  letter-spacing: -.02em;
}
.mgr-name {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
}
.mgr-years { font-size: .75rem; color: var(--text-muted); margin-top: .1rem; }
.mgr-seasons { opacity: .7; }

/* Win% bar */
.mgr-wpct-row {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-bottom: .85rem;
}
.mgr-wpct-bar-wrap {
  flex: 1;
  height: 6px;
  background: rgba(255,255,255,.07);
  border-radius: 999px;
  overflow: hidden;
}
.mgr-wpct-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--dodger-blue), #60a5fa);
  border-radius: 999px;
  transition: width .4s ease;
  min-width: 4px;
}
.mgr-wpct-num {
  font-size: .75rem;
  font-weight: 700;
  color: var(--dodger-blue);
  flex-shrink: 0;
  min-width: 2.8rem;
  text-align: right;
}

/* W-L stats */
.mgr-wl-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .4rem;
  margin-bottom: .85rem;
}
.mgr-stat-box {
  background: var(--bg-surface);
  border-radius: var(--radius);
  padding: .45rem .3rem;
  text-align: center;
}
.mgr-stat-val {
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.1;
}
.mgr-stat-val.green { color: #22c55e; }
.mgr-stat-val.red   { color: #ef4444; }
.mgr-stat-val.blue  { color: var(--dodger-blue); }
.mgr-stat-lbl { font-size: .58rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; margin-top: .1rem; }

/* Trophies */
.mgr-trophies {
  display: flex;
  align-items: center;
  gap: .2rem;
  flex-wrap: wrap;
  margin-bottom: .75rem;
  padding: .55rem .65rem;
  background: var(--bg-surface);
  border-radius: var(--radius);
}
.mgr-trophy { font-size: 1.1rem; line-height: 1; }
.mgr-trophy-lbl {
  font-size: .68rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-left: .25rem;
}

/* Note */
.mgr-note {
  font-size: .76rem;
  color: var(--text-muted);
  line-height: 1.55;
  border-top: 1px solid var(--border);
  padding-top: .65rem;
}

.mgr-approx-note {
  font-size: .72rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 2rem;
}

/* ── Section header ───────────────────────────────────── */
.mgr-section { margin-bottom: 2.5rem; }
.mgr-section-title {
  font-size: 1rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text-primary);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: .45rem;
}

/* ── Win% chart ───────────────────────────────────────── */
.mgr-chart {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .55rem;
  margin-bottom: .75rem;
}
.mgr-chart-row {
  display: grid;
  grid-template-columns: 9rem 1fr 3.2rem 5.5rem;
  align-items: center;
  gap: .6rem;
}
.mgr-chart-name {
  font-size: .8rem;
  font-weight: 700;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mgr-chart-bar-wrap {
  height: 12px;
  background: rgba(255,255,255,.06);
  border-radius: 999px;
  overflow: hidden;
}
.mgr-chart-bar {
  height: 100%;
  border-radius: 999px;
  min-width: 4px;
  transition: width .4s ease;
}
.mgr-chart-bar.brooklyn { background: linear-gradient(90deg, #d97706, #fbbf24); }
.mgr-chart-bar.la       { background: linear-gradient(90deg, var(--dodger-blue), #60a5fa); }
.mgr-chart-val {
  font-size: .72rem;
  font-weight: 700;
  color: var(--dodger-blue);
  text-align: right;
  white-space: nowrap;
}
.mgr-chart-wl {
  font-size: .68rem;
  color: var(--text-muted);
  text-align: right;
  white-space: nowrap;
}
.mgr-chart-legend {
  display: flex;
  gap: 1.2rem;
  font-size: .72rem;
  color: var(--text-muted);
}
.mgr-chart-leg { display: flex; align-items: center; gap: .3rem; }

/* ── Era summary cards ────────────────────────────────── */
.mgr-era-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 2rem;
}
.mgr-era-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.4rem;
}
.mgr-era-title {
  font-size: .8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
  margin-bottom: .85rem;
}
.mgr-era-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .5rem;
}
.mgr-era-stats > div {
  background: var(--bg-surface);
  border-radius: var(--radius);
  padding: .55rem .7rem;
  display: flex;
  flex-direction: column;
  gap: .15rem;
}
.mgr-era-stats span { font-size: .62rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; }
.mgr-era-stats strong { font-size: 1.1rem; font-weight: 900; color: var(--text-primary); }

@media (max-width: 700px) {
  .mgr-era-summary { grid-template-columns: 1fr; }
  .mgr-chart-row { grid-template-columns: 6rem 1fr 2.8rem 4.5rem; gap: .4rem; }
  .mgr-chart-name { font-size: .72rem; }
}

/* ═══════════════════════════════════════════════════════════════
   World Series Detail Page  (.ws-*)
   ═══════════════════════════════════════════════════════════════ */

/* ── Page wrapper ─────────────────────────────────────────────── */
.ws-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem 4rem;
}

/* ── Breadcrumb ───────────────────────────────────────────────── */
.ws-breadcrumb {
  padding: 1rem 0 .5rem;
}
.ws-breadcrumb-link {
  font-size: .8rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color .2s;
}
.ws-breadcrumb-link:hover { color: var(--dodger-blue); }

/* ── Hero ─────────────────────────────────────────────────────── */
.ws-hero {
  background: linear-gradient(135deg, #003087 0%, #005a9c 40%, #1d4ed8 100%);
  border-radius: 1.1rem;
  padding: 2.5rem 1.5rem 2rem;
  text-align: center;
  color: #fff;
  margin-bottom: 1rem;
  position: relative;
  overflow: hidden;
}
.ws-hero::before {
  content: '🏆🏆🏆';
  position: absolute;
  top: -1.5rem;
  right: -1.5rem;
  font-size: 5rem;
  opacity: .07;
  transform: rotate(15deg);
  pointer-events: none;
}
.ws-hero-inner { position: relative; z-index: 1; }
.ws-hero-trophy { font-size: 3rem; line-height: 1; margin-bottom: .4rem; }
.ws-hero-year {
  font-size: 4rem;
  font-weight: 900;
  letter-spacing: -.04em;
  color: #f0c040;
  line-height: 1;
}
.ws-hero-title {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255,255,255,.9);
  margin: .25rem 0 .6rem;
}
.ws-hero-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  font-size: .95rem;
  color: rgba(255,255,255,.85);
}
.ws-hero-sep { opacity: .5; }
.ws-hero-series { font-weight: 700; color: #f0c040; }
.ws-hero-mvp {
  margin-top: .8rem;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 2rem;
  padding: .3rem .9rem;
  font-size: .82rem;
}
.ws-hero-mvp-lbl { color: rgba(255,255,255,.65); text-transform: uppercase; letter-spacing: .08em; font-size: .7rem; }
.ws-hero-mvp-name { font-weight: 700; color: #fff; }

/* ── Year navigation ──────────────────────────────────────────── */
.ws-year-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.ws-nav-btn {
  font-size: .82rem;
  font-weight: 600;
  color: var(--dodger-blue);
  text-decoration: none;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: .5rem;
  padding: .3rem .85rem;
  transition: background .2s, color .2s;
  min-width: 5rem;
  text-align: center;
}
.ws-nav-btn:hover { background: var(--dodger-blue); color: #fff; }
.ws-nav-btn.disabled { visibility: hidden; }
.ws-nav-title { font-size: .8rem; color: var(--text-muted); }

/* ── Summary card ─────────────────────────────────────────────── */
.ws-summary-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-left: 4px solid #f0c040;
  border-radius: var(--radius);
  padding: 1.4rem 1.6rem 1.4rem 1.8rem;
  margin-bottom: 1.5rem;
  position: relative;
}
.ws-summary-quote {
  position: absolute;
  top: .6rem;
  left: 1rem;
  font-size: 2.5rem;
  color: #f0c040;
  opacity: .4;
  font-family: Georgia, serif;
  line-height: 1;
}
.ws-summary-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--dodger-blue);
  margin: 0 0 .55rem;
}
.ws-summary-text {
  font-size: .88rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin: 0;
}

/* ── Fetch notice ─────────────────────────────────────────────── */
.ws-fetch-notice {
  background: rgba(var(--dodger-blue-rgb,0,83,148),.07);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: .85rem 1.1rem;
  font-size: .85rem;
  color: var(--text-muted);
  display: flex;
  gap: .6rem;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}

/* ── Season record band ───────────────────────────────────────── */
.ws-record-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: .9rem 1.3rem;
  margin-bottom: 1.8rem;
}
.ws-record-block {
  text-align: center;
  padding: .3rem .9rem;
}
.ws-record-num {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--text-primary);
  letter-spacing: -.02em;
}
.ws-record-mgr {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}
.ws-record-lbl {
  font-size: .65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
  margin-top: .15rem;
}
.ws-record-sep {
  width: 1px;
  height: 2.5rem;
  background: var(--border-color);
  flex-shrink: 0;
}
.ws-record-agg {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  padding: .3rem .9rem;
}
.ws-agg-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .5rem;
  font-size: .72rem;
}
.ws-agg-row span { color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; }
.ws-agg-row strong { font-weight: 700; color: var(--text-primary); }

/* ── Section wrapper ──────────────────────────────────────────── */
.ws-section {
  margin-bottom: 2.2rem;
}
.ws-section-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: .07em;
  margin: 0 0 1rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.ws-section-title span { font-size: 1.1rem; }

/* ── Playoff bracket ──────────────────────────────────────────── */
.ws-bracket {
  display: flex;
  align-items: flex-start;
  gap: .5rem;
  overflow-x: auto;
  padding-bottom: .5rem;
}
.ws-bracket-arrow {
  font-size: 1.4rem;
  color: var(--text-muted);
  align-self: center;
  flex-shrink: 0;
  padding: 0 .2rem;
}
.ws-round {
  background: var(--bg-surface);
  border: 2px solid var(--border-color);
  border-radius: var(--radius);
  padding: .9rem 1rem;
  min-width: 170px;
  flex: 1;
  max-width: 240px;
  transition: border-color .2s;
}
.ws-round.won  { border-color: #22c55e; }
.ws-round.lost { border-color: #ef4444; }

.ws-round-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: .4rem;
}
.ws-round-name {
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-muted);
}
.ws-round-result {
  font-size: .78rem;
  font-weight: 700;
  border-radius: .35rem;
  padding: .1rem .45rem;
}
.ws-won  { color: #16a34a; background: rgba(34,197,94,.12); }
.ws-lost { color: #dc2626; background: rgba(239,68,68,.12); }

.ws-round-opp {
  font-size: .9rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: .7rem;
  line-height: 1.2;
}

/* Per-game log */
.ws-games-log {
  display: flex;
  flex-direction: column;
  gap: .28rem;
}
.ws-game-row {
  display: grid;
  grid-template-columns: 1.8rem 3rem 1fr 1.2rem;
  align-items: center;
  gap: .3rem;
  font-size: .75rem;
  padding: .2rem .35rem;
  border-radius: .3rem;
}
.ws-game-w { background: rgba(34,197,94,.08); }
.ws-game-l { background: rgba(239,68,68,.08); }
.ws-game-num {
  font-weight: 700;
  color: var(--text-muted);
  font-size: .68rem;
}
.ws-game-date { color: var(--text-muted); font-size: .68rem; }
.ws-game-score { font-weight: 700; color: var(--text-primary); }
.ws-game-score strong { color: var(--dodger-blue); }
.ws-game-badge { text-align: center; }
.ws-game-w .ws-game-badge { color: #16a34a; }
.ws-game-l .ws-game-badge { color: #dc2626; }

/* ── Standings table ──────────────────────────────────────────── */
.ws-standings-wrap {
  overflow-x: auto;
  max-width: 600px;
}
.ws-standings-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .82rem;
}
.ws-standings-table th {
  background: var(--bg-surface);
  color: var(--text-muted);
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  padding: .55rem .7rem;
  text-align: left;
  border-bottom: 2px solid var(--border-color);
}
.ws-standings-table td {
  padding: .45rem .7rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
}
.ws-standings-table tr:last-child td { border-bottom: none; }
.ws-standings-rank { font-weight: 700; color: var(--text-muted); }
.ws-standings-team { font-weight: 600; color: var(--text-primary); }
.ws-standings-badge { margin-left: .35rem; font-size: .8rem; }
.ws-standings-dodgers td {
  background: rgba(0,83,148,.06);
  font-weight: 700;
  color: var(--text-primary) !important;
}
.ws-standings-dodgers .ws-standings-team { color: var(--dodger-blue) !important; }

/* ── Coach manager highlight ──────────────────────────────────── */
.ws-coach-manager {
  border: 2px solid var(--dodger-blue) !important;
}

/* ── club_history.html WS card as link ───────────────────────── */
.hist-ws-card {
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
.hist-ws-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
  border-color: var(--dodger-blue);
}
.hist-ws-view-link {
  margin-top: .8rem;
  font-size: .72rem;
  font-weight: 600;
  color: var(--dodger-blue);
  text-align: center;
  letter-spacing: .04em;
  opacity: .8;
}
.hist-ws-card:hover .hist-ws-view-link { opacity: 1; }

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 700px) {
  .ws-hero-year { font-size: 2.8rem; }
  .ws-record-band { gap: .5rem; }
  .ws-record-sep { display: none; }
  .ws-bracket { flex-direction: column; align-items: stretch; }
  .ws-bracket-arrow { transform: rotate(90deg); align-self: center; }
  .ws-round { max-width: 100%; }
}

/* ── NL League standings grid (ws_detail) ─────────────────────── */
.ws-league-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}
.ws-standings-block {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
}
.ws-standings-div-label {
  font-size: .68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--dodger-blue);
  background: rgba(0,83,148,.06);
  padding: .45rem .7rem;
  border-bottom: 1px solid var(--border-color);
}
.ws-standings-block .ws-standings-table {
  border-radius: 0;
}
.ws-standings-block .ws-standings-table th:first-child,
.ws-standings-block .ws-standings-table td:first-child {
  padding-left: .7rem;
}

/* ── Season page: bracket + standings additions ───────────────── */
.season-bracket-wrap,
.season-standings-wrap {
  margin-bottom: 1.5rem;
}
.season-bracket-header {
  display: flex;
  align-items: center;
  margin-bottom: .75rem;
}
.season-bracket-title {
  font-size: .9rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text-primary);
}

/* WS-detail link button inside WS banner */
.season-ws-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}
.season-ws-detail-btn {
  margin-left: auto;
  font-size: .78rem;
  font-weight: 700;
  color: #fff;
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.35);
  border-radius: .5rem;
  padding: .35rem .9rem;
  text-decoration: none;
  white-space: nowrap;
  transition: background .2s;
}
.season-ws-detail-btn:hover { background: rgba(255,255,255,.28); }

@media (max-width: 700px) {
  .season-ws-detail-btn { margin-left: 0; width: 100%; text-align: center; }
}

/* ── Auth pages (login / register) ─────────────────────────────────────── */
.auth-page {
  min-height: calc(100vh - 4rem);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}
.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 8px 32px rgba(0,0,0,.35);
}
.auth-logo {
  text-align: center;
  font-size: 3rem;
  line-height: 1;
  margin-bottom: 0.5rem;
}
.auth-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2rem;
  text-align: center;
  letter-spacing: 0.05em;
  margin-bottom: 1.75rem;
  color: var(--text);
}
.auth-error {
  background: rgba(127, 29, 29, 0.35);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
  border-radius: 6px;
  padding: 0.75rem 1rem;
  margin-bottom: 1.25rem;
  font-size: 0.875rem;
}

/* Nav user chip */
.nav-user {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-left: 0.5rem;
}
.nav-username {
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
}
.nav-logout {
  font-size: 0.78rem;
  color: var(--text-dim);
  text-decoration: none;
  padding: 0.25rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  white-space: nowrap;
  transition: color .15s, border-color .15s;
}
.nav-logout:hover {
  color: var(--text);
  border-color: var(--text-dim);
}

/* ═══════════════════════════════════════════════════════════════════════════
   MOBILE — alle regler under her påvirker KUN mobil (≤768px).
   Ingen eksisterende desktop-stiler er endret.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Bunn-navigasjon (skjult på desktop) ──────────────────────────────── */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: calc(60px + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: linear-gradient(180deg, #081422 0%, #060F1A 100%);
  border-top: 1px solid var(--border);
  z-index: 200;
  justify-content: space-around;
  align-items: center;
}

.mob-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: var(--text-dim);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  background: none;
  border: none;
  padding: 6px 4px;
  cursor: pointer;
  transition: color .15s;
}
.mob-nav-item svg { width: 22px; height: 22px; }
.mob-nav-item.active { color: var(--dodger-blue-bright); }
.mob-nav-item:hover  { color: var(--text); }

/* ── Mer-drawer overlay ───────────────────────────────────────────────── */
.mob-menu-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.65);
  z-index: 300;
  align-items: flex-end;
  animation: fadeIn .15s ease;
}
.mob-menu-overlay.open { display: flex; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.mob-menu-drawer {
  width: 100%;
  background: var(--bg-surface);
  border-radius: 16px 16px 0 0;
  border-top: 1px solid var(--border);
  padding: 0 0 calc(env(safe-area-inset-bottom) + 80px);
  max-height: 82vh;
  overflow-y: auto;
  animation: slideUp .2s ease;
}

@keyframes slideUp {
  from { transform: translateY(40px); opacity: .6; }
  to   { transform: translateY(0);    opacity: 1; }
}

.mob-menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem 0.75rem;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg-surface);
  z-index: 1;
}
.mob-menu-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.2rem;
  letter-spacing: 0.1em;
  color: var(--text);
}
.mob-menu-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
}
.mob-menu-close:hover { color: var(--text); }

.mob-menu-links {
  padding: 0.5rem 0.75rem;
}
.mob-menu-link {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 0.5rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  border-bottom: 1px solid rgba(255,255,255,.04);
  transition: color .15s, background .15s;
  border-radius: 8px;
}
.mob-menu-link svg { width: 20px; height: 20px; flex-shrink: 0; }
.mob-menu-link.active { color: var(--dodger-blue-bright); }
.mob-menu-link:hover  { color: var(--text); background: rgba(0,90,156,.1); }
.mob-menu-link:last-child { border-bottom: none; }
.mob-menu-divider  { height: 1px; background: var(--border); margin: 0.5rem 0; }
.mob-menu-user     { font-size: 0.8rem; color: var(--text-dim); padding: 0.5rem 0.5rem 0.25rem; }
.mob-menu-logout   { color: #f87171 !important; }
.mob-menu-logout:hover { background: rgba(248,113,113,.08) !important; }

/* ── Aktiver bunn-nav + juster layout på mobil ────────────────────────── */
@media (max-width: 768px) {
  /* Vis bunn-nav, skjul topp-navbar */
  .navbar           { display: none; }
  .mobile-bottom-nav { display: flex; }

  /* Gi plass til bunn-nav */
  .main-content {
    padding: 1.25rem 1rem calc(76px + env(safe-area-inset-bottom));
  }

  /* Mindre sidetitler */
  .page-title { font-size: 1.75rem; }
  .page-subtitle { font-size: 0.85rem; }

  /* Brødsmule kompakt */
  .breadcrumb { font-size: 0.8rem; flex-wrap: wrap; }

  /* Tabeller horisontal scroll */
  table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
    width: 100%;
  }

  /* Kortdetalj stables vertikalt */
  .card-detail-layout {
    grid-template-columns: 1fr !important;
  }

  /* Kampdetalj scoreboard */
  .game-detail-scoreboard {
    flex-direction: column;
    gap: 0.75rem;
  }

  /* Stats-grid 2 kolonner på mobil */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Spiller-hero stack */
  .player-hero-layout {
    flex-direction: column;
  }

  /* Info-rad kompakt */
  .info-row {
    font-size: 0.875rem;
  }

  /* Knapper full bredde i action-rader */
  .game-detail-actions {
    flex-wrap: wrap;
  }
  .game-detail-actions .btn {
    flex: 1;
    justify-content: center;
    min-width: 120px;
  }
}
