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

:root {
    /* Primary Colors - Minimalist Slate Palette */
    --primary-50: #f8fafc;
    --primary-100: #f1f5f9;
    --primary-200: #e2e8f0;
    --primary-300: #cbd5e1;
    --primary-400: #94a3b8;
    --primary-500: #64748b;
    --primary-600: #334155;
    --primary-700: #1e293b;
    --primary-800: #0f172a;
    --primary-900: #020617;
    
    /* Accent Colors */
    --accent-green: #10b981;
    --accent-emerald: #059669;
    --accent-orange: #f59e0b;
    --accent-red: #ef4444;
    --accent-purple: #8b5cf6;
    
    /* Neutral Grays */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    
    /* Semantic Colors (using minimalist slate palette) */
    --primary-color: var(--primary-600);
    --secondary-color: var(--accent-green);
    --text-color: var(--gray-900);
    --text-light: var(--gray-600);
    --text-lighter: var(--gray-500);
    --bg-color: #ffffff;
    --bg-light: var(--gray-50);
    --bg-lighter: var(--gray-100);
    --border-color: var(--gray-200);
    --border-light: var(--gray-100);
    --link-color: var(--accent-green);
    --link-hover: var(--accent-emerald);
    --success-color: var(--accent-green);
    --warning-color: var(--accent-orange);
    --error-color: var(--accent-red);
    
    /* Spacing Scale (rem units) */
    --space-1: 0.25rem;   /* 4px */
    --space-2: 0.5rem;    /* 8px */
    --space-3: 0.75rem;   /* 12px */
    --space-4: 1rem;      /* 16px */
    --space-5: 1.25rem;   /* 20px */
    --space-6: 1.5rem;    /* 24px */
    --space-8: 2rem;      /* 32px */
    --space-10: 2.5rem;   /* 40px */
    --space-12: 3rem;     /* 48px */
    --space-16: 4rem;     /* 64px */
    
    /* Typography Scale */
    --text-xs: 0.75rem;     /* 12px */
    --text-sm: 0.875rem;    /* 14px */
    --text-base: 1rem;      /* 16px */
    --text-lg: 1.125rem;    /* 18px */
    --text-xl: 1.25rem;     /* 20px */
    --text-2xl: 1.5rem;     /* 24px */
    --text-3xl: 1.875rem;   /* 30px */
    --text-4xl: 2.25rem;    /* 36px */
    --text-5xl: 3rem;       /* 48px */
    
    /* Font Weights */
    --font-normal: 400;
    --font-medium: 500;
    --font-semibold: 600;
    --font-bold: 700;
    
    /* Border Radius */
    --radius-sm: 0.375rem;  /* 6px */
    --radius-md: 0.5rem;    /* 8px */
    --radius-lg: 0.75rem;   /* 12px */
    --radius-xl: 1rem;      /* 16px */
    --radius-full: 9999px;  /* Full rounded */
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.site-header {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    text-decoration: none;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}

.nav-links > li {
    position: relative;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.2s;
    display: block;
    padding: 0.5rem 0.75rem;
}

.nav-links > li > a:hover {
    opacity: 0.8;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 0.25rem;
}

/* Mega Menu Dropdown */
.mega-menu {
    display: none;
    position: absolute;
    top: calc(100% - 5px);
    left: 50%;
    transform: translateX(-50%);
    background-color: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-radius: 0.5rem;
    padding: 1.5rem;
    min-width: 240px;
    z-index: 1000;
    padding-top: 1.25rem;
}

.mega-menu::before {
    content: '';
    position: absolute;
    top: -25px;
    left: 0;
    right: 0;
    height: 30px;
    background: transparent;
}

.nav-links > li:hover .mega-menu,
.nav-links > li.menu-open .mega-menu {
    display: block;
}

.mega-menu ul {
    list-style: none;
}

.mega-menu li {
    margin-bottom: 0.5rem;
}

.mega-menu li:last-child {
    margin-bottom: 0;
}

.mega-menu a {
    color: var(--text-color);
    font-weight: 400;
    padding: 0.5rem 0.75rem;
    transition: background-color 0.2s;
}

.mega-menu a:hover {
    background-color: var(--bg-light);
    border-radius: 0.25rem;
}

/* Modern Hamburger Icon */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0.5rem;
    width: 40px;
    height: 40px;
    position: relative;
    z-index: 1001;
}

.hamburger-line {
    display: block;
    width: 25px;
    height: 3px;
    background-color: white;
    margin: 5px auto;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Make mega menus keyboard and touch accessible */
.nav-links > li > a {
    cursor: pointer;
}

.nav-links > li.menu-open .mega-menu {
    display: block;
}

/* Mobile Navigation */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }
    
    /* Dark backdrop overlay */
    .nav-links::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.5);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
        z-index: 998;
    }
    
    .nav-links.mobile-open::before {
        opacity: 1;
        visibility: visible;
    }
    
    .nav-links {
        display: flex;
        flex-direction: column;
        width: 80%;
        max-width: 320px;
        gap: 0;
        background: #334155 !important;
        background-color: #334155 !important;
        opacity: 1 !important;
        padding: 1rem 0;
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        box-shadow: -4px 0 12px rgba(0,0,0,0.15);
        transition: right 0.3s ease;
        z-index: 9999 !important;
        overflow-y: auto;
        padding-top: 4rem;
    }
    
    .nav-links.mobile-open {
        right: 0;
    }
    
    .nav-links > li {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        position: relative;
        z-index: 10000;
    }
    
    .nav-links > li > a {
        padding: 1rem 1.5rem;
        width: 100%;
        display: block;
        font-size: 1.1rem;
        transition: background-color 0.2s ease;
        position: relative;
        z-index: 10001;
    }
    
    .nav-links > li > a:hover,
    .nav-links > li > a:active {
        background-color: rgba(255, 255, 255, 0.1);
    }
    
    .mega-menu {
        position: static;
        transform: none;
        box-shadow: none;
        margin: 0;
        border-radius: 0;
        padding: 0;
        background-color: rgba(255, 255, 255, 0.05);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    
    .nav-links > li.menu-open .mega-menu {
        max-height: 500px;
    }
    
    .mega-menu a {
        color: rgba(255, 255, 255, 0.9);
        padding: 0.75rem 1.5rem 0.75rem 2.5rem;
        font-size: 0.95rem;
        display: block;
        transition: background-color 0.2s ease;
    }
    
    .mega-menu a:hover,
    .mega-menu a:active {
        background-color: rgba(255, 255, 255, 0.1);
    }
    
    .main-nav {
        position: relative;
    }
}

.main-content {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

.breadcrumbs {
    margin-bottom: 1.5rem;
}

.breadcrumbs ol {
    display: flex;
    list-style: none;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-light);
}

.breadcrumbs li:not(:last-child)::after {
    content: "›";
    margin-left: 0.5rem;
}

.breadcrumbs a {
    color: var(--link-color);
    text-decoration: none;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

.hero {
    text-align: center;
    padding: 3rem 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 0.5rem;
    margin-bottom: 2rem;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.tagline {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    opacity: 0.95;
}

.description {
    font-size: 1rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

.search-section {
    max-width: 600px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.search-section h2 {
    margin-bottom: 1rem;
    text-align: center;
}

.search-input {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    transition: border-color 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.search-results {
    margin-top: 1rem;
    max-height: 400px;
    overflow-y: auto;
}

.search-result-item {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.25rem;
    margin-bottom: 0.5rem;
    background-color: var(--bg-light);
    transition: background-color 0.2s;
}

.search-result-item:hover {
    background-color: #edf2f7;
}

.search-result-item a {
    color: var(--text-color);
    text-decoration: none;
    display: block;
    font-weight: 500;
}

.quick-links {
    padding: 2rem 1rem;
}

.quick-links h2 {
    text-align: center;
    margin-bottom: 2rem;
}

.link-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.link-card {
    background-color: var(--bg-light);
    padding: 1.5rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
}

.link-card h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.link-card ul {
    list-style: none;
}

.link-card li {
    margin-bottom: 0.5rem;
}

.link-card a {
    color: var(--link-color);
    text-decoration: none;
}

.link-card a:hover {
    text-decoration: underline;
}

.player-header,
.team-header,
.leaders-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.player-header h1,
.team-header h1,
.leaders-header h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.given-name,
.league-info,
.period {
    color: var(--text-light);
    font-size: 1rem;
}

.player-bio {
    margin: 2rem 0;
    padding: 1.5rem;
    background-color: var(--bg-light);
    border-left: 4px solid var(--primary-color);
    border-radius: 0.5rem;
}

.player-bio h2 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
    color: var(--primary-color);
}

.bio-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-color);
}

.bio-content p {
    margin-bottom: 1rem;
}

.bio-content p:last-child {
    margin-bottom: 0;
}

.player-vitals,
.team-record,
.team-batting,
.team-pitching,
.career-batting,
.career-pitching,
.season-batting,
.season-pitching,
.team-roster,
.leaders-table {
    margin-bottom: 2rem;
}

section h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.vitals-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.5rem 2rem;
    max-width: 600px;
}

.vitals-grid dt {
    font-weight: 600;
    color: var(--text-light);
}

.vitals-grid dd {
    color: var(--text-color);
}

.stats-table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    overflow: hidden;
}

.stats-table thead {
    background-color: var(--bg-light);
}

.stats-table th {
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid var(--border-color);
    white-space: nowrap;
}

.stats-table td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.stats-table tbody tr:hover {
    background-color: var(--bg-light);
}

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

.roster-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.5rem;
}

.roster-list li {
    padding: 0.5rem;
    background-color: var(--bg-light);
    border-radius: 0.25rem;
}

.roster-list a {
    color: var(--link-color);
    text-decoration: none;
}

.roster-list a:hover {
    text-decoration: underline;
}

.ballpark,
.attendance {
    margin-top: 1rem;
    color: var(--text-light);
}

.site-footer {
    background-color: var(--bg-light);
    padding: 2rem 0;
    margin-top: 4rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-light);
    font-size: 0.875rem;
}

.site-footer p {
    margin-bottom: 0.5rem;
}

.site-footer a {
    color: var(--link-color);
    text-decoration: none;
}

.site-footer a:hover {
    text-decoration: underline;
}

.about-page section {
    margin-bottom: 2rem;
}

.about-page h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
}

.about-page h2 {
    font-size: 1.75rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.about-page ul {
    margin-left: 2rem;
    margin-top: 0.5rem;
}

.about-page li {
    margin-bottom: 0.5rem;
}

.about-page a {
    color: var(--link-color);
    text-decoration: none;
}

.about-page a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }

    .nav-links {
        gap: 1rem;
    }

    .link-grid {
        grid-template-columns: 1fr;
    }

    .stats-table {
        font-size: 0.875rem;
    }

    .stats-table th,
    .stats-table td {
        padding: 0.5rem 0.25rem;
    }

    .vitals-grid {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }

    .player-header h1,
    .team-header h1 {
        font-size: 1.75rem;
    }
}

.sortable th {
    cursor: pointer;
    user-select: none;
}

.sortable th:hover {
    background-color: #e2e8f0;
}

.sortable th::after {
    content: '';
    display: inline-block;
    margin-left: 0.5rem;
    opacity: 0.3;
}

/* Homepage Styles */
.homepage {
    background: var(--bg-light);
}

.hero {
    background: linear-gradient(135deg, #334155 0%, #1e293b 100%);
    color: white;
    padding: 5rem 0;
    margin-bottom: 0;
}

.hero-content {
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.2rem;
    opacity: 0.95;
    margin-bottom: 2.5rem;
}

.search-box {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    border: none;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.search-box input:focus {
    outline: none;
    box-shadow: 0 6px 16px rgba(0,0,0,0.25);
}

.stats-overview {
    padding: 3rem 0;
    background: white;
}

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

.stat-item {
    text-align: center;
    padding: 1.5rem;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1rem;
    color: var(--text-light);
    font-weight: 500;
}

.browse-section,
.highlights-section {
    padding: 4rem 0;
}

.browse-section h2,
.highlights-section h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--text-color);
}

.browse-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.browse-card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
    display: block;
}

.browse-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    border-color: var(--primary-color);
}

.browse-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--primary-color);
}

.browse-card p {
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.browse-link {
    color: var(--link-color);
    font-weight: 500;
}

.highlights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.highlight-card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.highlight-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.highlight-list {
    list-style: none;
}

.highlight-list li {
    margin-bottom: 0.75rem;
}

.highlight-list a {
    color: var(--link-color);
    text-decoration: none;
}

.highlight-list a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .browse-grid,
    .highlights-grid {
        grid-template-columns: 1fr;
    }
}

.season-playoffs h2 {
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    font-size: 1.75rem;
}

.playoff-rounds {
    display: grid;
    gap: 1.5rem;
}

.playoff-series {
    background-color: white;
    padding: 1.25rem;
    border-radius: 6px;
    border-left: 4px solid var(--secondary-color);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.playoff-series h3 {
    color: var(--primary-color);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.playoff-series .series-result {
    color: var(--text-color);
    font-size: 1rem;
    line-height: 1.5;
}

.playoff-series .series-result strong {
    color: var(--secondary-color);
    font-weight: 700;
}

/* ============================================
   ANCHOR NAVIGATION & MODERN COMPONENTS
   ============================================ */

/* Section Anchor Targets */
.section-anchor {
    scroll-margin-top: 100px;
    position: relative;
}

/* Sticky Table of Contents Component */
.page-toc {
    position: sticky;
    top: 100px;
    background: white;
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    z-index: 0;
}

.page-toc h2,
.page-toc h3 {
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    color: var(--text-color);
    margin-bottom: var(--space-4);
}

.toc-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.toc-list li {
    margin-bottom: var(--space-2);
}

.toc-list li:last-child {
    margin-bottom: 0;
}

.toc-link {
    display: block;
    color: var(--text-light);
    text-decoration: none;
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-sm);
    font-size: var(--text-sm);
    transition: all var(--transition-fast);
    border-left: 3px solid transparent;
}

.toc-link:hover {
    color: var(--primary-color);
    background-color: var(--bg-light);
    border-left-color: var(--primary-color);
}

.toc-link.active {
    color: var(--primary-color);
    background-color: var(--primary-50);
    border-left-color: var(--primary-color);
    font-weight: var(--font-medium);
}

/* Nested TOC Items */
.toc-list .toc-list {
    margin-top: var(--space-2);
    margin-left: var(--space-4);
}

.toc-list .toc-list .toc-link {
    font-size: var(--text-xs);
    padding: var(--space-1) var(--space-2);
}

/* Mobile TOC - Collapsible */
@media (max-width: 768px) {
    .page-toc {
        position: relative;
        top: auto;
        margin-bottom: var(--space-6);
        max-height: none;
    }
    
    .page-toc.collapsed .toc-list {
        display: none;
    }
    
    .page-toc h2,
    .page-toc h3 {
        cursor: pointer;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .page-toc h2::after,
    .page-toc h3::after {
        content: '▼';
        font-size: var(--text-sm);
        transition: transform var(--transition-fast);
    }
    
    .page-toc.collapsed h2::after,
    .page-toc.collapsed h3::after {
        transform: rotate(-90deg);
    }
}

/* Jump Link Chips */
.jump-chips {
    display: flex;
    gap: var(--space-2);
    margin: var(--space-6) 0;
    padding: var(--space-4) 0;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--gray-300) transparent;
    position: relative;
    z-index: 10;
}

.jump-chips::-webkit-scrollbar {
    height: 6px;
}

.jump-chips::-webkit-scrollbar-track {
    background: transparent;
}

.jump-chips::-webkit-scrollbar-thumb {
    background-color: var(--gray-300);
    border-radius: 3px;
}

.jump-chips::-webkit-scrollbar-thumb:hover {
    background-color: var(--gray-400);
}

.jump-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-2) var(--space-4);
    background-color: white;
    color: var(--text-color);
    text-decoration: none;
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    white-space: nowrap;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-sm);
    position: relative;
    z-index: 1;
    cursor: pointer;
}

.jump-chip:hover {
    background-color: var(--primary-50);
    border-color: var(--primary-300);
    color: var(--primary-700);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.jump-chip:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

.jump-chip.active {
    background-color: var(--primary-600);
    color: white;
    border-color: var(--primary-600);
}

/* Mobile Jump Chips - Horizontal Scroll */
@media (max-width: 768px) {
    .jump-chips {
        margin: var(--space-4) calc(-1 * var(--space-4));
        padding: var(--space-3) var(--space-4);
        gap: var(--space-3);
    }
    
    .jump-chip {
        font-size: var(--text-sm);
        padding: var(--space-3) var(--space-5);
        min-height: 44px;
        min-width: 90px;
    }
}

/* Modern Card Component */
.card {
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: all var(--transition-base);
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.card-header {
    padding: var(--space-6);
    background-color: var(--bg-light);
    border-bottom: 1px solid var(--border-color);
}

.card-header h2,
.card-header h3 {
    margin: 0;
    font-size: var(--text-xl);
    font-weight: var(--font-semibold);
    color: var(--text-color);
}

.card-header p {
    margin: var(--space-2) 0 0;
    color: var(--text-light);
    font-size: var(--text-sm);
}

.card-body {
    padding: var(--space-6);
}

.card-body > *:first-child {
    margin-top: 0;
}

.card-body > *:last-child {
    margin-bottom: 0;
}

.card-footer {
    padding: var(--space-4) var(--space-6);
    background-color: var(--bg-light);
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
}

.card-footer .btn,
.card-footer a {
    font-size: var(--text-sm);
}

/* Card Variations */
.card.card-flat {
    box-shadow: none;
    border: 1px solid var(--border-color);
}

.card.card-flat:hover {
    box-shadow: var(--shadow-sm);
}

.card.card-bordered {
    border: 2px solid var(--border-color);
}

.card.card-primary {
    border-color: var(--primary-300);
}

.card.card-primary .card-header {
    background-color: var(--primary-50);
    border-bottom-color: var(--primary-200);
}

/* Responsive Card Padding */
@media (max-width: 768px) {
    .card-header,
    .card-body {
        padding: var(--space-4);
    }
    
    .card-footer {
        padding: var(--space-3) var(--space-4);
        flex-direction: column;
        align-items: stretch;
    }
}

/* Table Container - Desktop: No scroll, Tablet/Mobile: Scroll */
.table-container {
    width: 100%;
    margin: var(--space-4) 0;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    background-color: white;
    box-shadow: var(--shadow-sm);
}

.table-container::-webkit-scrollbar {
    height: 8px;
}

.table-container::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.table-container::-webkit-scrollbar-thumb {
    background-color: var(--gray-300);
    border-radius: 4px;
}

.table-container::-webkit-scrollbar-thumb:hover {
    background-color: var(--gray-400);
}

/* Modern Table Styles - Compact for Desktop */
.table-modern {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
    font-size: 13px;
}

.table-modern thead {
    background-color: var(--bg-light);
    position: sticky;
    top: 0;
    z-index: 1;
}

.table-modern th {
    padding: 0.5rem 0.75rem;
    text-align: left;
    font-weight: var(--font-semibold);
    color: var(--text-color);
    border-bottom: 2px solid var(--border-color);
    font-size: 13px;
    background-color: var(--bg-light);
}

.table-modern th:first-child {
    padding-left: 1rem;
}

.table-modern th:last-child {
    padding-right: 1rem;
}

.table-modern td {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-color);
}

.table-modern td:first-child {
    padding-left: 1rem;
    font-weight: var(--font-medium);
}

.table-modern td:last-child {
    padding-right: 1rem;
}

/* Zebra Striping */
.table-modern tbody tr:nth-child(even) {
    background-color: var(--gray-50);
}

.table-modern tbody tr:hover {
    background-color: var(--primary-50);
}

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

/* Sticky Table Headers on Long Tables */
.table-container.sticky-header .table-modern thead {
    position: sticky;
    top: 0;
    z-index: 1;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* Table Cell Alignment Utilities */
.table-modern .text-right {
    text-align: right;
}

.table-modern .text-center {
    text-align: center;
}

.table-modern .text-nowrap {
    white-space: nowrap;
}

/* Compact Table Variant */
.table-modern.table-compact th,
.table-modern.table-compact td {
    padding: var(--space-2) var(--space-3);
}

.table-modern.table-compact th:first-child,
.table-modern.table-compact td:first-child {
    padding-left: var(--space-4);
}

.table-modern.table-compact th:last-child,
.table-modern.table-compact td:last-child {
    padding-right: var(--space-4);
}

/* Tablet and below - Enable horizontal scrolling */
@media (max-width: 1024px) {
    .table-container {
        overflow-x: auto;
        overflow-y: visible;
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
    }
    
    .table-modern th {
        white-space: nowrap;
    }
}

/* Mobile Table Responsiveness */
@media (max-width: 768px) {
    .table-container {
        margin: var(--space-4) calc(-1 * var(--space-4));
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
    
    .table-modern {
        font-size: var(--text-xs);
    }
    
    .table-modern th,
    .table-modern td {
        padding: var(--space-3) var(--space-2);
    }
    
    .table-modern th:first-child,
    .table-modern td:first-child {
        padding-left: var(--space-4);
        position: sticky;
        left: 0;
        background-color: white;
        z-index: 5;
    }
    
    .table-modern thead th:first-child {
        z-index: 15;
        background-color: var(--bg-light);
    }
    
    .table-modern tbody tr:nth-child(even) td:first-child {
        background-color: var(--gray-50);
    }
    
    .table-modern tbody tr:hover td:first-child {
        background-color: var(--primary-50);
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

/* Responsive Display Utilities */
.desktop-only {
    display: block;
}

.mobile-only {
    display: none;
}

@media (max-width: 768px) {
    .desktop-only {
        display: none;
    }
    
    .mobile-only {
        display: block;
    }
    
    /* Preserve flex display for jump-chips container */
    .jump-chips.mobile-only {
        display: flex !important;
    }
}

/* Page Layout for Player Pages */
.player-page-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--space-4);
}

.page-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: var(--space-8);
    align-items: start;
    margin-top: var(--space-6);
}

.page-main-content {
    min-width: 0;
}

.page-main-content > section {
    margin-bottom: var(--space-8);
}

.page-main-content > section:last-child {
    margin-bottom: 0;
}

@media (max-width: 1024px) {
    .page-layout {
        grid-template-columns: 240px 1fr;
        gap: var(--space-6);
    }
}

@media (max-width: 768px) {
    .player-page-container {
        padding: 0 var(--space-2);
    }
    
    .page-layout {
        grid-template-columns: 1fr;
        gap: 0;
        margin-top: var(--space-4);
    }
    
    .page-main-content > section {
        margin-bottom: var(--space-6);
    }
}

/* Player Header Modern Styles */
.player-header {
    margin-bottom: var(--space-6);
    padding: var(--space-6);
    background: linear-gradient(135deg, var(--primary-50) 0%, white 100%);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.player-header-layout {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: var(--space-8);
    align-items: start;
}

.player-headshot-container {
    flex-shrink: 0;
}

.player-headshot {
    width: 120px;
    height: 120px;
    border-radius: var(--radius-lg);
    object-fit: cover;
    border: 3px solid white;
    box-shadow: var(--shadow-lg);
}

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

.player-header h1 {
    font-size: var(--text-4xl);
    font-weight: var(--font-bold);
    color: var(--text-color);
    margin-bottom: var(--space-3);
    line-height: 1.2;
}

.player-header-badges {
    margin-bottom: var(--space-3);
}

.player-header .badge {
    display: inline-block;
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-md);
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    margin-right: var(--space-2);
    margin-bottom: var(--space-2);
}

.badge-active {
    background-color: var(--success-color);
    color: white;
}

.badge-team {
    background-color: var(--primary-600);
    color: white;
}

.badge-hof {
    background-color: var(--accent-orange);
    color: white;
}

.player-vitals-summary {
    margin-top: var(--space-4);
    padding: var(--space-4);
    background-color: var(--bg-light);
    border-radius: var(--radius-md);
    border-left: 3px solid var(--primary-color);
}

.player-vitals-summary p {
    margin-bottom: var(--space-3);
    color: var(--text-color);
    font-size: var(--text-sm);
    line-height: 1.6;
}

.player-vitals-summary p:last-child {
    margin-bottom: 0;
}

.player-vitals-summary strong {
    color: var(--text-color);
    font-weight: var(--font-semibold);
}

.player-vitals-summary a {
    color: var(--link-color);
    text-decoration: none;
}

.player-vitals-summary a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .player-header {
        padding: var(--space-4);
    }
    
    .player-header-layout {
        grid-template-columns: 1fr;
        gap: var(--space-4);
    }
    
    .player-headshot {
        width: 100px;
        height: 100px;
    }
    
    .player-header h1 {
        font-size: var(--text-2xl);
    }
}

/* Player Tools */
.player-tools {
    margin-bottom: var(--space-6);
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-4);
}

.tool-button {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4);
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: var(--text-color);
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    position: relative;
    z-index: 10;
}

.tool-button:hover {
    border-color: var(--primary-300);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.tool-icon {
    font-size: var(--text-2xl);
    pointer-events: none;
}

.tool-text {
    font-weight: var(--font-medium);
    color: var(--primary-600);
    pointer-events: none;
}

/* Player Vitals Grid */
.vitals-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: var(--space-4) var(--space-6);
    margin: 0;
}

.vitals-grid dt {
    font-weight: var(--font-semibold);
    color: var(--text-light);
    font-size: var(--text-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.vitals-grid dd {
    margin: 0;
    color: var(--text-color);
    font-size: var(--text-base);
}

.vitals-grid dd a {
    color: var(--primary-600);
    text-decoration: none;
}

.vitals-grid dd a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .vitals-grid {
        grid-template-columns: 1fr;
        gap: var(--space-3);
    }
    
    .vitals-grid dt {
        margin-bottom: var(--space-1);
    }
    
    .vitals-grid dd {
        margin-bottom: var(--space-4);
    }
    
    .vitals-grid dd:last-child {
        margin-bottom: 0;
    }
}

/* Section Heading Improvements */
.card-body h3 {
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    color: var(--text-color);
    margin-top: var(--space-6);
    margin-bottom: var(--space-4);
    padding-bottom: var(--space-2);
    border-bottom: 2px solid var(--border-color);
}

.card-body h3:first-child {
    margin-top: 0;
}

/* Bio Content Styling */
.bio-content {
    line-height: 1.8;
    font-size: var(--text-base);
    color: var(--text-color);
}

.bio-content p {
    margin-bottom: var(--space-4);
}

.bio-content p:last-child {
    margin-bottom: 0;
}

/* Current Season Highlight */
.current-season {
    background-color: var(--primary-50) !important;
    font-weight: var(--font-medium);
}

/* Manager Link Styling */
.manager-link {
    margin-top: var(--space-2);
    font-size: var(--text-base);
}

.manager-link a {
    color: var(--primary-600);
    text-decoration: none;
    font-weight: var(--font-medium);
}

.manager-link a:hover {
    text-decoration: underline;
}

/* Given Name, Birth Name, Alt Name Styling */
.given-name,
.birth-name,
.alt-name {
    margin: var(--space-2) 0;
    font-size: var(--text-sm);
    color: var(--text-light);
}

/* Family Connections List Styling */
#family ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

#family li {
    padding: var(--space-3);
    border-bottom: 1px solid var(--border-light);
    font-size: var(--text-base);
}

#family li:last-child {
    border-bottom: none;
}

#family a {
    color: var(--primary-600);
    text-decoration: none;
    font-weight: var(--font-medium);
}

#family a:hover {
    text-decoration: underline;
}

/* ============================================
   HALL OF FAME PAGE STYLES
   ============================================ */

.directory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--space-4);
    margin-top: var(--space-8);
}

.hof-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
    height: 100%;
    overflow: hidden;
}

.hof-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.hof-card .card-link {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: var(--text-color);
    height: 100%;
    position: relative;
}

.hof-card .player-photo {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, var(--primary-50) 0%, var(--primary-100) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: var(--space-2);
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.hof-card .player-photo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

.hof-card .card-content {
    padding: var(--space-3);
    text-align: center;
    background: white;
    flex-grow: 1;
}

.hof-card .card-title {
    font-size: var(--text-base);
    font-weight: var(--font-bold);
    color: var(--text-color);
    margin: 0;
}

.hof-card .year-badge-container {
    padding: var(--space-2) var(--space-3);
    text-align: center;
    background: white;
}

.hof-card .year-badge {
    display: inline-block;
    background: var(--primary-600);
    color: white;
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.hof-card .year-badge:hover {
    background: var(--primary-700);
    color: white;
}

.no-results {
    text-align: center;
    padding: var(--space-12);
    color: var(--text-light);
}

@media (max-width: 768px) {
    .directory-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: var(--space-3);
    }
    
    .hof-card .player-photo {
        height: 160px;
    }
    
    .hof-card .card-title {
        font-size: var(--text-sm);
    }
    
    .hof-card .year-badge {
        font-size: 0.65rem;
        padding: 2px 8px;
    }
}

@media (max-width: 480px) {
    .directory-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
}
