/* ==========================================================================
   Birds vs Cats NFL - Premium Styling
   ========================================================================== */

/* CSS Variables */
:root {
    /* Primary palette */
    --primary: #1a365d;
    --primary-light: #2c5282;
    --secondary: #dd6b20;
    --secondary-light: #ed8936;
    --accent: #ecc94b;
    
    /* Backgrounds */
    --bg: #f7fafc;
    --bg-alt: #edf2f7;
    --card-bg: #ffffff;
    
    /* Text */
    --text: #1a202c;
    --text-muted: #4a5568;
    --text-light: #718096;
    
    /* Team colors */
    --bird-color: #1E3A8A;
    --bird-light: #2b6cb0;
    --cat-color: #C2410C;
    --cat-light: #ed8936;
    
    /* Status */
    --win: #1E3A8A;
    --loss: #dc2626;
    --tie: #d69e2e;
    
    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    
    /* Typography */
    --font-heading: 'Bitter', Georgia, serif;
    --font-body: 'Source Sans 3', -apple-system, BlinkMacSystemFont, sans-serif;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.07);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 40px rgba(0,0,0,0.15);
    
    /* Borders */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;
}

/* ==========================================================================
   Base Styles
   ========================================================================== */

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text);
    background: var(--bg);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Screen reader only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ==========================================================================
   Typography
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 800;
    line-height: 1.2;
    color: var(--text);
    margin: 0 0 var(--space-md);
}

h1 { font-size: clamp(1.75rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.25rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.5rem); }
h4 { font-size: 1.125rem; }

p {
    margin: 0 0 var(--space-md);
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--secondary);
}

strong {
    font-weight: 700;
}

/* ==========================================================================
   Animations
   ========================================================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   Header
   ========================================================================== */

header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: #fff;
    padding: var(--space-sm) 0;
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 1000;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 var(--space-md);
    gap: var(--space-md);
}

header .site-title {
    margin: 0;
}

header .site-title a {
    color: #fff;
    font-size: 1.25rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    text-decoration: none;
}

header .site-title a:hover {
    color: var(--accent);
}

nav {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

nav a {
    color: rgba(255,255,255,0.9);
    font-weight: 600;
    font-size: 0.95rem;
    padding: var(--space-xs) 0;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

nav a:hover {
    color: #fff;
    border-bottom-color: var(--accent);
}

/* Search */
.search-container {
    position: relative;
    width: 220px;
}

.search-container input {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-full);
    border: 2px solid transparent;
    background: rgba(255,255,255,0.15);
    color: #fff;
    font-size: 0.9rem;
    font-family: var(--font-body);
    transition: all 0.3s ease;
}

.search-container input::placeholder {
    color: rgba(255,255,255,0.6);
}

.search-container input:focus {
    background: #fff;
    color: var(--text);
    outline: none;
    border-color: var(--accent);
}

.search-container input:focus::placeholder {
    color: var(--text-muted);
}

#search-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 100%;
    background: #fff;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    display: none;
    z-index: 200;
    overflow: hidden;
    max-height: 300px;
    overflow-y: auto;
}

.search-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-sm) var(--space-md);
    color: var(--text);
    border-bottom: 1px solid var(--bg-alt);
    transition: background 0.15s ease;
}

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

.search-item:hover {
    background: var(--bg-alt);
}

.search-item .team-type {
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.search-item .team-type.bird {
    background: rgba(30, 58, 138, 0.1);
    color: var(--bird-color);
}

.search-item .team-type.cat {
    background: rgba(194, 65, 12, 0.1);
    color: var(--cat-color);
}

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

/* ==========================================================================
   Main Content
   ========================================================================== */

main {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-xl) var(--space-md);
    width: 100%;
}

/* Page Headers */
.page-header {
    text-align: center;
    margin-bottom: var(--space-2xl);
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: #fff;
    padding: var(--space-2xl) var(--space-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.page-header h1 {
    color: #fff;
    margin-bottom: var(--space-sm);
}

.page-subtitle {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.85);
    max-width: 700px;
    margin: 0 auto;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero {
    text-align: center;
    padding: var(--space-2xl) var(--space-md);
    background: 
        radial-gradient(ellipse at top, rgba(255,255,255,0.1) 0%, transparent 60%),
        linear-gradient(135deg, var(--primary) 0%, #0f2744 100%);
    color: #fff;
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-2xl);
    box-shadow: var(--shadow-xl);
    animation: scaleIn 0.6s ease-out;
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 20px,
        rgba(255,255,255,0.02) 20px,
        rgba(255,255,255,0.02) 40px
    );
    pointer-events: none;
}

.hero > * {
    position: relative;
    z-index: 1;
}

.badge {
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: var(--space-md);
    display: inline-block;
    border: 1px solid rgba(255,255,255,0.2);
}

.hero h1 {
    font-size: clamp(2.5rem, 8vw, 4rem);
    margin: var(--space-sm) 0;
    color: #fff;
    text-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.hero .subtitle {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    opacity: 0.9;
    max-width: 650px;
    margin: 0 auto var(--space-lg);
    line-height: 1.6;
}

/* Scoreboard */
.score-board {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-xl);
    margin: var(--space-xl) 0;
    flex-wrap: wrap;
}

.score-card {
    background: #fff;
    color: var(--text);
    padding: var(--space-lg) var(--space-xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    text-align: center;
    min-width: 180px;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.score-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px rgba(0,0,0,0.2);
}

.score-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
}

.score-card.bird::before {
    background: linear-gradient(90deg, var(--bird-color), var(--bird-light));
}

.score-card.cat::before {
    background: linear-gradient(90deg, var(--cat-color), var(--cat-light));
}

.score-card .icon {
    font-size: 2.5rem;
    margin-bottom: var(--space-sm);
}

.score-card h2, .score-card h3 {
    margin: 0;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    font-weight: 600;
}

.score-card .score {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    margin: var(--space-xs) 0;
    line-height: 1;
    color: var(--primary);
}

.score-card .label {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: block;
}

.score-card .win-pct {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: var(--space-xs);
    display: block;
}

.vs-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
}

.vs {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 800;
    color: rgba(255,255,255,0.4);
    font-style: italic;
}

.ties-badge {
    background: rgba(255,255,255,0.1);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    margin: 0;
}

.lead-statement {
    font-size: 1.1rem;
    margin: var(--space-md) 0;
    padding: var(--space-sm) var(--space-md);
    background: rgba(255,255,255,0.1);
    border-radius: var(--radius-md);
    display: inline-block;
}

/* CTA Buttons */
.cta-group {
    margin-top: var(--space-xl);
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-sm) var(--space-xl);
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 1rem;
    font-family: var(--font-body);
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    min-width: 160px;
}

.button.primary {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-light) 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(221, 107, 32, 0.4);
}

.button.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(221, 107, 32, 0.5);
    color: #fff;
}

.button.secondary {
    background: rgba(255,255,255,0.15);
    color: #fff;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.3);
}

.button.secondary:hover {
    background: rgba(255,255,255,0.25);
    transform: translateY(-2px);
    color: #fff;
}

/* ==========================================================================
   Content Sections
   ========================================================================== */

.intro-section {
    text-align: center;
    padding: var(--space-2xl) var(--space-md);
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-2xl);
    box-shadow: var(--shadow-md);
}

.intro-section h2 {
    color: var(--primary);
    margin-bottom: var(--space-lg);
}

.intro-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
}

.intro-content p {
    color: var(--text-muted);
    font-size: 1.05rem;
}

/* Grid Layout */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-xl);
    margin: var(--space-xl) 0;
}

/* Cards */
.card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: var(--space-lg);
    transition: all 0.3s ease;
}

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

.card h3 {
    margin-top: 0;
    color: var(--primary);
    padding-bottom: var(--space-sm);
    border-bottom: 2px solid var(--bg-alt);
    margin-bottom: var(--space-md);
}

/* Alliance Cards */
.alliance-card {
    border-top: 5px solid transparent;
}

.alliance-card.bird-bg {
    border-top-color: var(--bird-color);
}

.alliance-card.cat-bg {
    border-top-color: var(--cat-color);
}

.alliance-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: var(--space-md);
}

.cohort-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: var(--space-md);
}

.cohort-team-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: var(--space-sm);
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    text-decoration: none;
    color: var(--text);
}

.cohort-team-link:hover {
    background: var(--bg-alt);
    transform: translateY(-3px);
}

.cohort-logo {
    height: 50px;
    width: auto;
    margin-bottom: var(--space-xs);
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
    transition: transform 0.2s ease;
}

.cohort-team-link:hover .cohort-logo {
    transform: scale(1.1);
}

.cohort-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
}

/* Features */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-xl);
    margin: var(--space-2xl) 0;
}

.feature-item {
    background: var(--card-bg);
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-item h3 {
    color: var(--primary);
    font-size: 1.25rem;
    margin-bottom: var(--space-sm);
}

.feature-item p {
    color: var(--text-muted);
    margin: 0;
}

/* FAQ Section */
.faq-section {
    background: var(--card-bg);
    padding: var(--space-2xl);
    border-radius: var(--radius-lg);
    margin: var(--space-2xl) 0;
    box-shadow: var(--shadow-md);
}

.faq-section h2 {
    text-align: center;
    color: var(--primary);
    margin-bottom: var(--space-xl);
}

.faq-grid {
    display: grid;
    gap: var(--space-md);
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--bg);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.faq-item summary {
    padding: var(--space-md);
    font-weight: 700;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s ease;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '+';
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--text-muted);
    transition: transform 0.3s ease;
}

.faq-item[open] summary::after {
    transform: rotate(45deg);
}

.faq-item summary:hover {
    background: var(--bg-alt);
}

.faq-item p {
    padding: 0 var(--space-md) var(--space-md);
    margin: 0;
    color: var(--text-muted);
    line-height: 1.7;
}

/* ==========================================================================
   Tables
   ========================================================================== */

.table-wrapper {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    margin: var(--space-lg) 0;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: var(--space-md);
    text-align: left;
}

th {
    background: var(--bg-alt);
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
}

tbody tr {
    border-bottom: 1px solid var(--bg-alt);
    transition: background 0.15s ease;
}

tbody tr:last-child {
    border-bottom: none;
}

tbody tr:hover {
    background: var(--bg);
}

.bird-cell {
    color: var(--bird-color);
    font-weight: 600;
}

.cat-cell {
    color: var(--cat-color);
    font-weight: 600;
}

.result-w {
    color: var(--win);
    font-weight: 700;
}

.result-l {
    color: var(--loss);
    font-weight: 700;
}

.result-t {
    color: var(--tie);
    font-weight: 700;
}

/* ==========================================================================
   Seasons Page
   ========================================================================== */

.season-summary {
    margin-bottom: var(--space-2xl);
}

.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--space-md);
}

.summary-card {
    background: var(--card-bg);
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease;
}

.summary-card:hover {
    transform: translateY(-3px);
}

.summary-card.bird-accent {
    border-top: 4px solid var(--bird-color);
}

.summary-card.cat-accent {
    border-top: 4px solid var(--cat-color);
}

.summary-card.positive {
    border-top: 4px solid var(--win);
}

.summary-card.negative {
    border-top: 4px solid var(--loss);
}

.summary-number {
    display: block;
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
}

.summary-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: var(--space-sm);
}

.season-analysis,
.methodology {
    background: var(--card-bg);
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
    margin: var(--space-xl) 0;
    box-shadow: var(--shadow-md);
}

.season-analysis h2,
.methodology h2 {
    color: var(--primary);
    margin-bottom: var(--space-md);
}

.analysis-content p,
.methodology p {
    color: var(--text-muted);
    margin-bottom: var(--space-sm);
}

.data-table-section h2 {
    color: var(--primary);
    margin-bottom: var(--space-md);
}

/* ==========================================================================
   Stats Page
   ========================================================================== */

.stats-page {
    max-width: 1200px;
    margin: 0 auto;
}

.stats-section {
    margin-bottom: var(--space-2xl);
}

.stats-section h2 {
    color: var(--primary);
    margin-bottom: var(--space-sm);
    padding-bottom: var(--space-sm);
    border-bottom: 3px solid var(--bg-alt);
}

.section-intro {
    color: var(--text-muted);
    margin-bottom: var(--space-lg);
    max-width: 800px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--space-lg);
}

.stat-card {
    text-align: center;
    padding: var(--space-xl);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.stat-card h3, .stat-card h4 {
    margin: var(--space-sm) 0;
    color: var(--primary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-logo {
    height: 70px;
    width: auto;
    margin-bottom: var(--space-sm);
}

.stat-logos {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    align-items: center;
    margin-bottom: var(--space-sm);
}

.stat-value {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 800;
    margin: var(--space-xs) 0;
    color: var(--text);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: var(--space-xs) 0;
}

.stat-sublabel {
    font-size: 0.8rem;
    color: var(--text-light);
}

.stat-score {
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 600;
    margin-top: var(--space-xs);
}

.stat-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: inherit;
}

.big-number {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1;
    color: var(--primary);
}

.bird-bg {
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.05) 0%, rgba(30, 58, 138, 0.1) 100%);
    border-top: 4px solid var(--bird-color);
}

.cat-bg {
    background: linear-gradient(135deg, rgba(194, 65, 12, 0.05) 0%, rgba(194, 65, 12, 0.1) 100%);
    border-top: 4px solid var(--cat-color);
}

.highlight-card {
    background: linear-gradient(135deg, rgba(221, 107, 32, 0.05) 0%, rgba(221, 107, 32, 0.1) 100%);
    border-top: 4px solid var(--secondary);
}

.bird-text {
    color: var(--bird-color);
}

.cat-text {
    color: var(--cat-color);
}

.chart-card {
    padding: var(--space-xl);
    min-height: 300px;
    max-height: 450px;
    position: relative;
}

.chart-card canvas {
    max-height: 350px !important;
    width: 100% !important;
}

.recent-form-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-lg);
}

.recent-form-stats {
    display: flex;
    gap: var(--space-2xl);
}

.recent-stat {
    text-align: center;
}

.recent-number {
    display: block;
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
}

/* Dual Stats */
.dual-stat {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xl);
    width: 100%;
}

.dual-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.vs-divider {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-light);
}

.avg-stats {
    display: flex;
    gap: var(--space-2xl);
    margin-top: var(--space-md);
}

.avg-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.avg-value {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 800;
}

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

/* Shutouts */
.shutout-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.shutout-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-sm) var(--space-md);
    background: var(--bg);
    border-radius: var(--radius-md);
}

.shutout-logos {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.shutout-score {
    font-weight: 700;
    font-size: 1rem;
}

.shutout-details {
    flex: 1;
}

.shutout-date {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-left: var(--space-sm);
}

/* Decades */
.decade-grid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.decade-card {
    padding: var(--space-md);
}

.decade-card h4 {
    margin: 0 0 var(--space-sm);
    font-size: 1.3rem;
}

.decade-stats {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
}

.stat-winner {
    font-size: 0.85rem;
    font-weight: 700;
    margin-top: var(--space-xs);
}

.bird-winner {
    border-left: 4px solid var(--bird-color);
}

.cat-winner {
    border-left: 4px solid var(--cat-color);
}

/* Rankings Table */
.rankings-table {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ranking-header,
.ranking-row {
    display: grid;
    grid-template-columns: 50px 1fr 50px 50px 70px 60px;
    align-items: center;
    padding: var(--space-sm) var(--space-md);
}

.ranking-header {
    font-weight: 700;
    background: var(--bg-alt);
    border-radius: var(--radius-md);
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.ranking-row {
    border-bottom: 1px solid var(--bg-alt);
    transition: background 0.15s ease;
}

.ranking-row:hover {
    background: var(--bg);
}

.ranking-row.bird {
    border-left: 3px solid var(--bird-color);
}

.ranking-row.cat {
    border-left: 3px solid var(--cat-color);
}

.rank {
    font-weight: 700;
    color: var(--primary);
}

.team-cell {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.team-cell a {
    color: var(--text);
    font-weight: 600;
}

.team-cell a:hover {
    color: var(--primary);
}

.win-pct {
    font-weight: 700;
}

/* Rivalry Card */
.rivalry-card {
    padding: var(--space-xl);
}

.rivalry-vs {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 900;
    color: var(--text-light);
    margin: 0 var(--space-md);
}

/* ==========================================================================
   Teams Page
   ========================================================================== */

.teams-intro,
.teams-note {
    background: var(--card-bg);
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-xl);
    box-shadow: var(--shadow-md);
}

.teams-intro p,
.teams-note p {
    color: var(--text-muted);
    margin-bottom: var(--space-sm);
}

.teams-note h2 {
    color: var(--primary);
    margin-bottom: var(--space-md);
}

.teams-grid {
    margin-bottom: var(--space-xl);
}

.teams-section h2 {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.bird-title {
    color: var(--bird-color);
}

.cat-title {
    color: var(--cat-color);
}

.team-count {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
}

.teams-desc {
    color: var(--text-muted);
    margin-bottom: var(--space-lg);
}

.team-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: var(--space-md);
}

.team-card-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--bg);
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    text-decoration: none;
    color: var(--text);
    transition: all 0.2s ease;
    text-align: center;
}

.team-card-link:hover {
    border-color: var(--secondary);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.team-logo-placeholder {
    width: 70px;
    height: 70px;
    margin-bottom: var(--space-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.team-logo-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.team-card-link strong {
    font-size: 0.95rem;
    margin-bottom: var(--space-xs);
}

.team-record {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
}

.team-meta {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-top: var(--space-xs);
}

/* ==========================================================================
   Team Detail Page
   ========================================================================== */

.team-page {
    max-width: 900px;
    margin: 0 auto;
}

.team-header {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
    margin-bottom: var(--space-2xl);
    flex-wrap: wrap;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: #fff;
    padding: var(--space-xl) var(--space-xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.team-header-logo {
    width: 100px;
    height: 100px;
    background: var(--card-bg);
    border-radius: 50%;
    box-shadow: var(--shadow-lg);
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.team-header-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.team-header-info h1 {
    margin: 0 0 var(--space-sm);
    font-size: clamp(1.75rem, 5vw, 2.5rem);
    color: #fff;
}

.team-badge {
    display: inline-block;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.team-badge.bird {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.team-badge.cat {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.team-location {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    color: var(--text-muted);
    margin-top: var(--space-sm);
}

.team-summary {
    margin-bottom: var(--space-2xl);
}

.team-analysis,
.game-log,
.opponent-breakdown {
    margin-bottom: var(--space-2xl);
}

.team-analysis h2,
.game-log h2,
.opponent-breakdown h2 {
    color: var(--primary);
    margin-bottom: var(--space-md);
}

.team-analysis p {
    color: var(--text-muted);
    line-height: 1.8;
}

.opponent-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: var(--space-md);
}

.opponent-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--space-md);
    background: var(--card-bg);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    color: var(--text);
    transition: all 0.2s ease;
    text-align: center;
}

.opponent-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.opponent-card-logo {
    width: 50px;
    height: 50px;
    object-fit: contain;
    margin-bottom: var(--space-sm);
}

.opponent-card-name {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: var(--space-xs);
}

.opponent-card-record {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-muted);
}

.opponent-card-record.positive {
    color: var(--win);
}

.opponent-card-record.negative {
    color: var(--loss);
}

.opponent-cell {
    display: flex;
    align-items: center;
}

.opponent-link {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--text);
    text-decoration: none;
}

.opponent-link:hover {
    color: var(--primary);
}

.opponent-icon {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--card-bg);
    border-radius: 50%;
    border: 1px solid var(--bg-alt);
    padding: 4px;
    box-shadow: var(--shadow-sm);
}

.opponent-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.team-nav {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
    margin-top: var(--space-2xl);
    padding-top: var(--space-xl);
    border-top: 2px solid var(--bg-alt);
}

/* Season Navigation in Header */
.season-nav-header {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    align-items: center;
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

.season-nav-link {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-full);
    background: rgba(255,255,255,0.1);
    transition: all 0.2s ease;
    display: inline-block;
    min-width: 100px;
    text-align: center;
}

.season-nav-link:hover:not(.disabled) {
    background: rgba(255,255,255,0.25);
    color: #fff;
    transform: translateY(-1px);
}

.season-nav-link.all-seasons {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
}

.season-nav-link.all-seasons:hover {
    background: rgba(255,255,255,0.3);
}

.season-nav-link.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

/* Season Navigation (for bottom of page) */
.season-nav {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
    margin: var(--space-xl) 0;
}

.season-nav .button.disabled {
    opacity: 0.4;
    pointer-events: none;
    cursor: not-allowed;
}

/* ==========================================================================
   Footer
   ========================================================================== */

footer {
    background: var(--primary);
    color: #fff;
    padding: var(--space-2xl) var(--space-md);
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-nav {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--space-xl);
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-xl);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-section h4 {
    font-family: var(--font-heading);
    font-size: 1rem;
    margin: 0 0 var(--space-md);
    color: var(--accent);
}

.footer-section a {
    display: block;
    color: rgba(255,255,255,0.8);
    font-size: 0.9rem;
    padding: var(--space-xs) 0;
    transition: color 0.2s ease;
}

.footer-section a:hover {
    color: #fff;
}

.footer-bottom {
    text-align: center;
}

.footer-bottom p {
    margin: var(--space-sm) 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

.footer-bottom .disclaimer {
    font-size: 0.8rem;
    opacity: 0.7;
    max-width: 600px;
    margin: var(--space-sm) auto 0;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 768px) {
    :root {
        --space-xl: 1.5rem;
        --space-2xl: 2rem;
    }
    
    /* Header */
    .header-container {
        display: grid;
        grid-template-columns: 1fr auto;
        grid-template-areas: 
            "title nav"
            "search search";
        gap: var(--space-sm);
        padding: var(--space-sm) var(--space-md);
    }
    
    header .site-title {
        grid-area: title;
    }
    
    header .site-title a {
        font-size: 1rem;
    }
    
    nav {
        grid-area: nav;
        gap: var(--space-sm);
    }
    
    nav a {
        font-size: 0.85rem;
    }
    
    .search-container {
        grid-area: search;
        width: 100%;
    }
    
    /* Hero */
    .hero {
        padding: var(--space-xl) var(--space-md);
        min-height: auto;
        border-radius: var(--radius-md);
    }
    
    .badge {
        font-size: 0.75rem;
        padding: var(--space-xs) var(--space-sm);
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero .subtitle {
        font-size: 0.95rem;
    }
    
    .score-board {
        gap: var(--space-sm);
        width: 100%;
    }
    
    .score-card {
        padding: var(--space-md);
        min-width: 0;
        flex: 1;
    }
    
    .score-card .icon {
        font-size: 1.75rem;
    }
    
    .score-card h2, .score-card h3 {
        font-size: 0.7rem;
    }
    
    .score-card .score {
        font-size: 2rem;
    }
    
    .score-card .label,
    .score-card .win-pct {
        font-size: 0.7rem;
    }
    
    .vs {
        font-size: 1.25rem;
    }
    
    .ties-badge {
        font-size: 0.75rem;
    }
    
    .lead-statement {
        font-size: 0.9rem;
    }
    
    .cta-group {
        flex-direction: column;
        width: 100%;
    }
    
    .button {
        width: 100%;
    }
    
    /* Content */
    main {
        padding: var(--space-lg) var(--space-md);
    }
    
    .intro-section {
        padding: var(--space-lg);
    }
    
    .grid {
        grid-template-columns: 1fr;
    }
    
    .features {
        grid-template-columns: 1fr;
    }
    
    .faq-section {
        padding: var(--space-lg);
    }
    
    /* Tables */
    .table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    th, td {
        padding: var(--space-sm);
        font-size: 0.85rem;
    }
    
    /* Stats */
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .stat-card {
        padding: var(--space-md);
    }
    
    .big-number {
        font-size: 2rem;
    }
    
    .dual-stat {
        flex-direction: column;
        gap: var(--space-md);
    }
    
    .avg-stats {
        gap: var(--space-lg);
    }
    
    .avg-value {
        font-size: 1.75rem;
    }
    
    .ranking-header,
    .ranking-row {
        grid-template-columns: 35px 1fr 35px 35px 55px 45px;
        font-size: 0.8rem;
        padding: var(--space-sm);
    }
    
    .decade-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Teams */
    .team-list {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .team-card-link {
        padding: var(--space-md);
    }
    
    .team-logo-placeholder {
        width: 50px;
        height: 50px;
    }
    
    /* Page Header */
    .page-header {
        padding: var(--space-lg) var(--space-md);
    }
    
    /* Team Detail */
    .team-header {
        flex-direction: column;
        text-align: center;
        padding: var(--space-lg);
    }
    
    .team-header-logo {
        width: 80px;
        height: 80px;
    }
    
    .summary-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .opponent-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Footer */
    .footer-nav {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .team-list {
        grid-template-columns: 1fr;
    }
    
    .summary-cards {
        grid-template-columns: 1fr;
    }
    
    .opponent-cards {
        grid-template-columns: 1fr;
    }
    
    .footer-nav {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .cohort-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ==========================================================================
   Season Insights (Additional Stats)
   ========================================================================== */

.insight-stats {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    width: 100%;
}

.insight-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--bg-alt);
}

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

.insight-value {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
    color: var(--primary);
}

.insight-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: var(--space-xs);
    text-align: center;
}

/* Perfect/Winless Teams */
.perfect-team {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--bg-alt);
}

.perfect-team:last-child {
    border-bottom: none;
}

.perfect-team a {
    flex: 1;
    color: var(--text);
    font-weight: 600;
}

.perfect-team a:hover {
    color: var(--primary);
}

.perfect-team .record {
    font-weight: 700;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Monthly Breakdown */
.monthly-breakdown {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.monthly-row {
    display: grid;
    grid-template-columns: 60px 1fr 70px 70px auto;
    align-items: center;
    padding: var(--space-sm) var(--space-md);
    background: var(--bg);
    border-radius: var(--radius-sm);
    gap: var(--space-sm);
}

.monthly-row:hover {
    background: var(--bg-alt);
}

.month-name {
    font-weight: 700;
    color: var(--primary);
}

.month-games {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.month-birds {
    font-weight: 600;
}

.month-cats {
    font-weight: 600;
}

.month-ties {
    font-size: 0.8rem;
    color: var(--text-light);
}

/* Season Navigation Enhancement */
.season-nav .button {
    min-width: 140px;
}

@media (max-width: 768px) {
    .insight-value {
        font-size: 1.5rem;
    }
    
    .monthly-row {
        grid-template-columns: 50px 1fr 50px 50px;
        font-size: 0.85rem;
        padding: var(--space-sm);
    }
    
    .month-ties {
        display: none;
    }
    
    .season-nav .button {
        min-width: 100px;
        font-size: 0.85rem;
        padding: var(--space-sm) var(--space-md);
    }
    
    .season-nav-header {
        gap: var(--space-sm);
        margin-bottom: var(--space-md);
        padding-bottom: var(--space-sm);
    }
    
    .season-nav-link {
        font-size: 0.8rem;
        padding: var(--space-xs) var(--space-sm);
        min-width: 70px;
    }
}

@media (max-width: 480px) {
    .monthly-row {
        grid-template-columns: 45px 1fr 45px 45px;
        font-size: 0.8rem;
    }
}

/* Print styles */
@media print {
    header, footer, .cta-group, .search-container, nav {
        display: none;
    }
    
    body {
        background: #fff;
        color: #000;
    }
    
    .hero {
        background: #f0f0f0;
        color: #000;
        min-height: auto;
    }
}
