/* FPL Prices - Modern Dashboard Styling */

:root {
    /* Simplified Modern Color Palette - Light Mode */
    --primary: #2563eb;
    --primary-hover: #1d4ed8;

    /* Semantic Colors */
    --success: #10b981;
    --success-bg: #d1fae5;
    --danger: #ef4444;
    --danger-bg: #fee2e2;
    --danger-hover: #dc2626;
    --warning: #f59e0b;
    --warning-bg: #fef3c7;

    /* Neutral Colors */
    --background: #f9fafb;
    --surface: #ffffff;
    --surface-secondary: #f3f4f6;
    --border: #e5e7eb;

    /* Text Colors */
    --text: #111827;
    --text-muted: #6b7280;
    --text-light: #9ca3af;

    /* Shadows */
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);

    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 0.75rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;

    /* Transitions */
    --transition: 150ms ease;
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
    :root {
        --primary: #3b82f6;
        --primary-hover: #2563eb;

        --success: #10b981;
        --success-bg: #064e3b;
        --danger: #ef4444;
        --danger-bg: #7f1d1d;
        --danger-hover: #dc2626;
        --warning: #f59e0b;
        --warning-bg: #78350f;

        --background: #111827;
        --surface: #1f2937;
        --surface-secondary: #374151;
        --border: #374151;

        --text: #f9fafb;
        --text-muted: #d1d5db;
        --text-light: #9ca3af;

        --shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
        --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
    }
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--background);
    color: var(--text);
    line-height: 1.6;
    transition: background var(--transition), color var(--transition);
}

.container {
    max-width: 95%;
    width: 100%;
    margin: 0 auto;
    padding: var(--space-lg);
}

@media (min-width: 2000px) {
    .container {
        max-width: 1900px;
    }
}

/* Header */
.header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem var(--space-lg);
    margin-bottom: var(--space-lg);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

@media (prefers-color-scheme: dark) {
    .header {
        background: rgba(31, 41, 55, 0.95);
    }
}

.header-content {
    max-width: 95%;
    width: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-md);
}

@media (min-width: 2000px) {
    .header-content {
        max-width: 1900px;
    }
}

.header-branding {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.header-branding h1 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    margin: 0;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.header-tagline {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.2;
}

.tagline-separator {
    margin: 0 0.35rem;
    color: var(--text-light);
}

/* Deadline Display */
.deadline-display {
    margin: 0;
    padding: 0;
    background: none;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.deadline-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0;
}

.deadline-countdown {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary);
    font-variant-numeric: tabular-nums;
}

/* Urgent deadline styling (less than 24 hours) */
.deadline-display.urgent .deadline-countdown {
    color: var(--danger);
    animation: pulse-text 2s ease-in-out infinite;
}

@keyframes pulse-text {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.header-controls {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

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

.date-selector label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
}

.date-select {
    padding: var(--space-sm) var(--space-md);
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--surface);
    color: var(--text);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    min-width: 180px;
    transition: all var(--transition);
}

.date-select:hover {
    border-color: var(--primary);
}

.date-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.nav-buttons {
    display: flex;
    gap: var(--space-xs);
}

.nav-btn {
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}

.nav-btn:hover:not(:disabled) {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Quick Stats Dashboard */
.quick-stats-dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.stats-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: var(--space-lg);
}

.stats-section-primary {
    grid-column: 1 / -1;
}

.stats-section-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 var(--space-md) 0;
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--border);
}

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

.stats-section-primary .stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.stat-card-compact {
    background: var(--surface-secondary);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: var(--space-md);
    display: flex;
    align-items: center;
    gap: var(--space-md);
    transition: all var(--transition);
}

.stat-card-compact:hover {
    background: var(--border);
    transform: translateY(-1px);
}

.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
    flex-shrink: 0;
}

.stat-icon.rise {
    background: var(--success-bg);
    color: var(--success);
}

.stat-icon.fall {
    background: var(--danger-bg);
    color: var(--danger);
}

.stat-icon.neutral {
    background: var(--surface-secondary);
    color: var(--text-muted);
}

.stat-content {
    flex: 1;
    min-width: 0;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
}

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

.stat-meta {
    color: var(--text-light);
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

.stat-value.rise {
    color: var(--success);
}

.stat-value.fall {
    color: var(--danger);
}

/* Header tagline separator */
.tagline-separator {
    margin: 0 0.5rem;
    opacity: 0.5;
}

/* Stat Info Tooltips */
.stat-info {
    display: inline-block;
    margin-left: 0.25rem;
    font-size: 0.7rem;
    color: var(--text-muted);
    cursor: help;
    opacity: 0.6;
    transition: opacity var(--transition);
    position: relative;
}

.stat-info:hover {
    opacity: 1;
}

.stat-info::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: var(--space-sm) var(--space-md);
    font-size: 0.75rem;
    line-height: 1.4;
    white-space: normal;
    width: 220px;
    text-align: left;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    z-index: 1000;
    pointer-events: none;
}

.stat-info::before {
    content: '';
    position: absolute;
    bottom: 115%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--border);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    z-index: 1001;
}

.stat-info:hover::after,
.stat-info:hover::before {
    opacity: 1;
    visibility: visible;
}

/* Dark mode tooltip adjustments */
@media (prefers-color-scheme: dark) {
    .stat-info::after {
        background: #1f2937;
        border-color: #374151;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    }

    .stat-info::before {
        border-top-color: #374151;
    }
}

/* Charts Dashboard */
.charts-dashboard {
    margin-bottom: var(--space-xl);
}

.charts-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: var(--space-lg);
}

.charts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
}

.chart-container {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: var(--space-lg);
    min-height: 300px;
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0; /* Allow grid shrinking */
}

.chart-container.chart-wide {
    grid-column: span 2;
}

.chart-header {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--border);
}

.chart-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin: 0;
}

.chart-info {
    display: inline-block;
    font-size: 0.7rem;
    color: var(--text-muted);
    cursor: help;
    opacity: 0.6;
    transition: opacity var(--transition);
    position: relative;
}

.chart-info:hover {
    opacity: 1;
}

.chart-info::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: var(--space-sm) var(--space-md);
    font-size: 0.75rem;
    line-height: 1.4;
    white-space: normal;
    width: 220px;
    text-align: left;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    z-index: 1000;
    pointer-events: none;
}

.chart-info::before {
    content: '';
    position: absolute;
    bottom: 115%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--border);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    z-index: 1001;
}

.chart-info:hover::after,
.chart-info:hover::before {
    opacity: 1;
    visibility: visible;
}

.chart {
    width: 100% !important;
    height: 280px !important;
    min-width: 0; /* Allow flexbox shrinking */
    flex: 1; /* Grow to fill container */
}

/* Dark mode chart tooltip adjustments */
@media (prefers-color-scheme: dark) {
    .chart-info::after {
        background: #1f2937;
        border-color: #374151;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    }

    .chart-info::before {
        border-top-color: #374151;
    }
}

/* Unified Navigation Bar */
.unified-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-lg);
    background: var(--surface);
    border-radius: 8px;
    padding: var(--space-sm);
    margin-bottom: var(--space-lg);
    border: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

@media (prefers-color-scheme: dark) {
    .unified-nav {
        background: rgba(31, 41, 55, 0.95);
    }
}

.unified-nav-sections {
    display: flex;
    gap: var(--space-xs);
    flex: 1;
    overflow-x: auto;
    scrollbar-width: none; /* Firefox */
}

.unified-nav-sections::-webkit-scrollbar {
    display: none; /* Chrome, Safari */
}

.unified-nav-btn {
    padding: var(--space-sm) var(--space-lg);
    background: transparent;
    border: none;
    border-radius: 6px;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
    min-width: 80px;
}

.unified-nav-btn:hover {
    background: var(--surface-secondary);
    color: var(--text);
}

.unified-nav-btn.active {
    background: var(--primary);
    color: white;
    font-weight: 600;
}

.unified-nav-view {
    display: flex;
    gap: var(--space-xs);
    padding-left: var(--space-md);
    border-left: 1px solid var(--border);
    flex-shrink: 0;
}

.unified-view-btn {
    padding: var(--space-sm) var(--space-md);
    background: var(--surface-secondary);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
    min-width: 70px;
}

.unified-view-btn:hover {
    background: var(--border);
    color: var(--text);
}

.unified-view-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    font-weight: 600;
}

/* Legacy Top-Level Navigation (kept for backwards compatibility) */
.top-nav {
    display: flex;
    gap: var(--space-md);
    background: var(--surface);
    border-radius: 8px;
    padding: var(--space-sm);
    margin-bottom: var(--space-md);
    border: 1px solid var(--border);
    overflow-x: auto;
}

.top-nav-button {
    flex: 1;
    min-width: 140px;
    padding: var(--space-md) var(--space-lg);
    background: transparent;
    border: none;
    border-radius: 6px;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
    white-space: nowrap;
}

.top-nav-button .nav-icon {
    font-size: 1.5rem;
}

.top-nav-button .nav-label {
    font-size: 0.875rem;
    font-weight: 500;
}

.top-nav-button:hover {
    background: var(--surface-secondary);
    color: var(--text);
}

.top-nav-button.active {
    background: var(--primary);
    color: white;
}

/* Secondary Tab Navigation (within sections) */
.tab-nav {
    display: flex;
    gap: var(--space-xs);
    background: var(--surface);
    border-radius: 8px;
    padding: 4px;
    margin-bottom: var(--space-lg);
    border: 1px solid var(--border);
}

.tab-button {
    flex: 1;
    padding: var(--space-sm) var(--space-md);
    background: transparent;
    border: none;
    border-radius: 6px;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all var(--transition);
}

.tab-button:hover {
    background: var(--surface-secondary);
    color: var(--text);
}

.tab-button.active {
    background: var(--primary);
    color: white;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Section Content (top-level sections) */
.section-content {
    display: none;
}

.section-content.active {
    display: block;
}

/* Dashboard Layout - 50/50 Split */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
    min-height: calc(100vh - 400px); /* Account for header, summary, tabs, and padding */
}

.dashboard-main {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.dashboard-sidebar {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

/* Sections */
.section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: var(--space-lg);
    display: flex;
    flex-direction: column;
    min-height: 0; /* Allow flex children to shrink */
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--border);
}

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

.beta-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

.section-count {
    background: var(--primary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 600;
}

/* Player Cards */
.player-grid {
    display: flex;
    flex-direction: column;
    flex: 1; /* Take remaining space in section */
    min-height: 0; /* Allow shrinking */
}

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

.player-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: var(--space-md);
    transition: all var(--transition);
    position: relative;
    overflow: visible;
    cursor: pointer;
}

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

.player-card.expanded {
    z-index: 200;
    cursor: default;
}



/* Card Stats Panel */
.card-stats-panel {
    position: absolute;
    top: 0;
    left: 100%;
    width: 250px;
    min-height: 100%;
    height: auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-left: 16px;
    padding: 16px;
    box-shadow: var(--shadow-md);
    z-index: 300;
    opacity: 0;
    pointer-events: none;
    transform: translateX(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    overflow: visible;
    visibility: hidden;
}

.player-card.expanded .card-stats-panel,
.prediction-card.expanded .card-stats-panel {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
    visibility: visible;
}

/* Mobile-friendly stats panel - overlay approach */
@media (max-width: 768px) {

    /* Backdrop for modal effect */
    .player-card.expanded::before,
    .prediction-card.expanded::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 250;
        opacity: 0;
        animation: fadeIn 0.3s ease forwards;
    }

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

    /* Stats panel as centered modal */
    .card-stats-panel {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%) scale(0.95);
        margin: 0;
        width: calc(100vw - 32px);
        max-width: 400px;
        max-height: calc(100vh - 100px);
        overflow-y: auto;
        z-index: 500;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    }

    .player-card.expanded .card-stats-panel,
    .prediction-card.expanded .card-stats-panel {
        transform: translate(-50%, -50%) scale(1);
    }

    /* Ensure close button is always visible on mobile */
    .card-stats-close {
        position: sticky;
        top: 0;
        z-index: 10;
        background: var(--danger);
        color: white;
    }

    .card-stats-close:hover {
        background: var(--danger-hover);
    }
}

/* Very small mobile screens */
@media (max-width: 480px) {
    .card-stats-panel {
        width: calc(100vw - 16px);
        max-height: calc(100vh - 80px);
        border-radius: 12px;
    }
}

.card-stats-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--surface-secondary);
    color: var(--text);
    border: none;
    cursor: pointer;
    font-size: 1.25rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}

.card-stats-close:hover {
    background: var(--danger);
    color: white;
}

/* Reuse player-tooltip styles for card panel */
.card-stats-panel .player-tooltip {
    position: static;
    opacity: 1;
    pointer-events: auto;
    transform: none;
    margin: 0;
    padding: 0;
    padding-top: 24px;
    border: none;
    box-shadow: none;
    background: transparent;
}

.player-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-sm);
}

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

.player-avatar {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.125rem;
}

/* Team badge styling with shirt/kit design */
.player-avatar.team-badge {
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.025em;
    border-radius: 4px 4px 8px 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: visible;
    border: none;
    /* Clip path to create sleeve cutouts */
    clip-path: polygon(0 12px,
            /* Top left - start of sleeve cutout */
            12px 0,
            /* Left shoulder peak */
            20px 4px,
            /* Left shoulder curve */
            50% 0,
            /* Center top (collar area) */
            calc(100% - 20px) 4px,
            /* Right shoulder curve */
            calc(100% - 12px) 0,
            /* Right shoulder peak */
            100% 12px,
            /* Top right - end of sleeve cutout */
            100% 100%,
            /* Bottom right */
            0 100%
            /* Bottom left */
        );
}

/* Sleeve accent borders - creates the sleeve "seam" effect */
.player-avatar.team-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.15) 0%, rgba(0, 0, 0, 0.1) 100%);
    border-radius: 4px 4px 8px 8px;
    pointer-events: none;
    z-index: 1;
    /* Add sleeve seam lines */
    box-shadow:
        inset 12px 8px 0 -6px rgba(0, 0, 0, 0.2),
        inset -12px 8px 0 -6px rgba(0, 0, 0, 0.2);
}

/* Shirt collar (V-neck style) */
.player-avatar.team-badge::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 8px solid rgba(0, 0, 0, 0.3);
    filter: blur(0.5px);
    z-index: 2;
}

/* Special handling for light-colored teams */
.player-avatar.team-badge[style*="#FFFFFF"],
.player-avatar.team-badge[style*="#FDB913"],
.player-avatar.team-badge[style*="#FFCD00"],
.player-avatar.team-badge[style*="#F78F1E"] {
    color: #1a1a1a;
    text-shadow: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2), inset 0 0 0 1px rgba(0, 0, 0, 0.1);
}

/* Enhanced collar for light teams */
.player-avatar.team-badge[style*="#FFFFFF"]::after,
.player-avatar.team-badge[style*="#FDB913"]::after,
.player-avatar.team-badge[style*="#FFCD00"]::after,
.player-avatar.team-badge[style*="#F78F1E"]::after {
    border-top-color: rgba(0, 0, 0, 0.3);
}

@media (prefers-color-scheme: dark) {
    .player-avatar.team-badge {
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
    }
}

.player-details h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.player-team {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Player Status/Injury Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-left: 0.5rem;
}

.status-badge.status-injured {
    background: var(--danger-bg);
    color: var(--danger);
}

.status-badge.status-doubtful {
    background: var(--warning-bg);
    color: var(--warning);
}

.status-badge.status-suspended {
    background: var(--danger-bg);
    color: var(--danger);
}

.status-badge.status-unavailable {
    background: var(--danger-bg);
    color: var(--danger);
}

/* Injury badge in card header */
.player-details .status-badge {
    display: block;
    width: fit-content;
    margin-left: 0;
    margin-top: 0.25rem;
}

/* News/injury details tooltip */
.injury-news {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
    padding: 0.5rem;
    background: var(--surface-secondary);
    border-radius: 4px;
    border-left: 3px solid var(--warning);
}

.injury-news.injury-severe {
    border-left-color: var(--danger);
}

.price-change {
    text-align: right;
}

.price-value {
    font-size: 1.125rem;
    font-weight: 700;
}

.price-value.rise {
    color: var(--success);
}

.price-value.fall {
    color: var(--danger);
}

.price-old {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-decoration: line-through;
}

.player-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: var(--space-sm);
    margin-top: var(--space-sm);
    padding-top: var(--space-sm);
    border-top: 1px solid var(--border);
}

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

.stat-item-value {
    font-weight: 600;
    color: var(--text);
}

.stat-item-label {
    font-size: 0.75rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Fixtures Display */
.player-fixtures {
    margin-top: var(--space-sm);
    margin-bottom: var(--space-xs);
}

.fixtures-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    align-items: center;
}

.fixtures-list.empty {
    color: var(--text-muted);
    font-size: 0.875rem;
    font-style: italic;
}

.fixture-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.025em;
    transition: all var(--transition);
    cursor: default;
}

.fixture-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.fixture-location {
    font-size: 0.65rem;
    opacity: 0.8;
    font-weight: 500;
}

/* Difficulty colors - Green (easy) to Red (hard) gradient */
/* FPL API uses difficulty 2-5 (no 1) */
.fixture-badge.difficulty-2 {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.fixture-badge.difficulty-3 {
    background: #fef08a;
    color: #854d0e;
    border: 1px solid #fde047;
}

.fixture-badge.difficulty-4 {
    background: #fed7aa;
    color: #9a3412;
    border: 1px solid #fdba74;
}

.fixture-badge.difficulty-5 {
    background: #fecaca;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* Dark mode adjustments */
@media (prefers-color-scheme: dark) {
    .fixture-badge.difficulty-2 {
        background: #064e3b;
        color: #6ee7b7;
        border-color: #047857;
    }

    .fixture-badge.difficulty-3 {
        background: #713f12;
        color: #fde047;
        border-color: #a16207;
    }

    .fixture-badge.difficulty-4 {
        background: #7c2d12;
        color: #fdba74;
        border-color: #c2410c;
    }

    .fixture-badge.difficulty-5 {
        background: #7f1d1d;
        color: #fca5a5;
        border-color: #b91c1c;
    }
}

/* Transfer List (Compact) */
.transfer-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    flex: 1; /* Take remaining space in section */
    min-height: 0; /* Allow shrinking */
    overflow-y: auto; /* Add scroll when needed */
}

.transfer-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-sm);
    background: var(--surface-secondary);
    border-radius: 6px;
    transition: background var(--transition);
}

.transfer-item:hover {
    background: var(--border);
}

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

.transfer-rank {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
}

.transfer-player {
    flex: 1;
}

.transfer-name {
    font-weight: 600;
    color: var(--text);
    font-size: 0.95rem;
}

.transfer-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.transfer-count {
    font-weight: 700;
    color: var(--text);
}

.transfer-count.positive {
    color: var(--success);
}

.transfer-count.negative {
    color: var(--danger);
}

/* Predictions Section */
.predictions-grid {
    display: flex;
    flex-direction: column;
    flex: 1; /* Take remaining space in section */
    min-height: 0; /* Allow shrinking */
}

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

.prediction-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: var(--space-md);
    border-left: 4px solid var(--border);
    transition: all var(--transition);
    position: relative;
    overflow: visible;
    cursor: pointer;
}

.prediction-card.rise {
    border-left-color: var(--success);
}

.prediction-card.fall {
    border-left-color: var(--danger);
}

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

.prediction-card.expanded {
    z-index: 200;
    cursor: default;
}

.prediction-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-sm);
}

.prediction-direction {
    font-size: 1.5rem;
}

.prediction-direction.rise {
    color: var(--success);
}

.prediction-direction.fall {
    color: var(--danger);
}

.prediction-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
    margin-top: var(--space-sm);
    padding-top: var(--space-sm);
    border-top: 1px solid var(--border);
}

.confidence-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.confidence-high {
    background: var(--success-bg);
    color: var(--success);
}

.confidence-medium {
    background: var(--warning-bg);
    color: var(--warning);
}

.confidence-low {
    background: var(--danger-bg);
    color: var(--danger);
}

/* Forecast Badges */
.forecast-badge {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.forecast-badge.urgency-critical {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
    animation: pulse-glow 2s ease-in-out infinite;
}

.forecast-badge.urgency-high {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.3);
}

.forecast-badge.urgency-medium {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

.forecast-badge.urgency-low {
    background: var(--surface-secondary);
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.stat-forecast {
    grid-column: 1 / -1;
    padding: 0.75rem;
    background: var(--surface-secondary);
    border-radius: 6px;
    margin-bottom: 0.5rem;
}

@keyframes pulse-glow {

    0%,
    100% {
        box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
    }

    50% {
        box-shadow: 0 4px 16px rgba(239, 68, 68, 0.6);
    }
}

/* Recent Change Badges */
.recent-change-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-top: 0.5rem;
    border: 1px solid;
}

.recent-change-badge.rise {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.3);
    color: var(--success);
}

.recent-change-badge.fall {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: var(--danger);
}

.recent-change-icon {
    font-size: 1rem;
}

.recent-change-tooltip {
    position: relative;
    cursor: help;
}

.recent-change-tooltip:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 0.5rem;
    padding: 0.5rem;
    background: var(--surface-secondary);
    border: 1px solid var(--border);
    border-radius: 4px;
    white-space: nowrap;
    font-size: 0.75rem;
    z-index: 1000;
    box-shadow: var(--shadow-md);
}

/* Prediction card with recent change */
.prediction-card.has-recent-change {
    background: rgba(59, 130, 246, 0.02);
}

/* Filter controls */
.filter-controls {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
    padding: var(--space-md);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.filter-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-toggle input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.filter-toggle label {
    cursor: pointer;
    user-select: none;
    color: var(--text);
    font-size: 0.9rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: var(--space-xl);
    color: var(--text-muted);
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: var(--space-md);
    opacity: 0.5;
}

/* Info Note */
.info-note {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: var(--space-md);
    color: var(--text);
    font-size: 0.9rem;
    line-height: 1.5;
}

.info-note strong {
    color: var(--primary);
    display: inline-block;
    margin-right: 0.25rem;
}

/* Loading State */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-xl);
    color: var(--text-muted);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* View Toggle */
.view-toggle-container {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
    padding: var(--space-md);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.view-toggle-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
}

.view-toggle-buttons {
    display: flex;
    gap: var(--space-xs);
}

.view-toggle-btn {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-md);
    background: var(--surface-secondary);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all var(--transition);
}

.view-toggle-btn:hover {
    background: var(--border);
    color: var(--text);
}

.view-toggle-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.view-toggle-btn svg {
    flex-shrink: 0;
}

/* Table View */
.player-table-container {
    overflow: auto;
    border-radius: 8px;
    border: 1px solid var(--border);
    flex: 1; /* Take remaining space in flex container */
    min-height: 0; /* Allow shrinking */
}

.player-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
}

.player-table thead {
    background: var(--surface-secondary);
    position: sticky;
    top: 0;
    z-index: 10;
}

.player-table th {
    padding: var(--space-md);
    text-align: left;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
}

.player-table th.text-right {
    text-align: right;
}

.player-table th.text-center {
    text-align: center;
}

.player-table tbody tr {
    border-bottom: 1px solid var(--border);
    transition: background var(--transition);
}

.player-table tbody tr:hover {
    background: var(--surface-secondary);
}

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

.player-table td {
    padding: var(--space-md);
    font-size: 0.95rem;
    color: var(--text);
}

.player-table td.text-right {
    text-align: right;
}

.player-table td.text-center {
    text-align: center;
}

/* Table player info cell */
.table-player-info {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.table-player-badge {
    width: 36px;
    height: 36px;
    border-radius: 3px 3px 6px 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.025em;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
    position: relative;
    overflow: visible;
    border: none;
    /* Clip path to create sleeve cutouts */
    clip-path: polygon(0 9px,
            /* Top left - start of sleeve cutout */
            9px 0,
            /* Left shoulder peak */
            15px 3px,
            /* Left shoulder curve */
            50% 0,
            /* Center top (collar area) */
            calc(100% - 15px) 3px,
            /* Right shoulder curve */
            calc(100% - 9px) 0,
            /* Right shoulder peak */
            100% 9px,
            /* Top right - end of sleeve cutout */
            100% 100%,
            /* Bottom right */
            0 100%
            /* Bottom left */
        );
}

/* Sleeve accent borders - creates the sleeve "seam" effect */
.table-player-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.15) 0%, rgba(0, 0, 0, 0.1) 100%);
    border-radius: 3px 3px 6px 6px;
    pointer-events: none;
    z-index: 1;
    /* Add sleeve seam lines */
    box-shadow:
        inset 9px 6px 0 -5px rgba(0, 0, 0, 0.2),
        inset -9px 6px 0 -5px rgba(0, 0, 0, 0.2);
}

/* Shirt collar (V-neck style) */
.table-player-badge::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 6px solid rgba(0, 0, 0, 0.3);
    filter: blur(0.5px);
    z-index: 2;
}

.table-player-badge[style*="#FFFFFF"],
.table-player-badge[style*="#FDB913"],
.table-player-badge[style*="#FFCD00"],
.table-player-badge[style*="#F78F1E"] {
    color: #1a1a1a;
    text-shadow: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2), inset 0 0 0 1px rgba(0, 0, 0, 0.1);
}

/* Enhanced collar for light teams */
.table-player-badge[style*="#FFFFFF"]::after,
.table-player-badge[style*="#FDB913"]::after,
.table-player-badge[style*="#FFCD00"]::after,
.table-player-badge[style*="#F78F1E"]::after {
    border-top-color: rgba(0, 0, 0, 0.3);
}

@media (prefers-color-scheme: dark) {
    .table-player-badge {
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    }
}

.table-player-details {
    min-width: 0;
}

.table-player-name {
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.table-player-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Table price values */
.table-price-value {
    font-weight: 700;
}

.table-price-value.rise {
    color: var(--success);
}

.table-price-value.fall {
    color: var(--danger);
}

.table-price-change {
    font-weight: 600;
    font-size: 0.9rem;
}

.table-price-change.rise {
    color: var(--success);
}

.table-price-change.fall {
    color: var(--danger);
}

/* View-specific display */
.view-cards .player-grid-cards,
.view-cards .predictions-grid-cards {
    display: grid;
}

.view-cards .player-table-container {
    display: none;
}

.view-table .player-grid-cards,
.view-table .predictions-grid-cards {
    display: none;
}

.view-table .player-table-container {
    display: block;
}

/* Hide split tables in table view, show unified table */
.view-table .player-table-container:not(.unified-table) {
    display: none;
}

.view-table .unified-table {
    display: block;
}

.view-cards .unified-table {
    display: none;
}

/* Hide the 2-column dashboard grid in table view for Price Changes section */
#section-changes.view-table .dashboard-grid {
    display: none !important;
}

/* Show unified table full width in table view for Price Changes section */
#section-changes.view-table .unified-table {
    display: block !important;
    width: 100%;
}

/* Hide split predictions sections in table view for Predictions section */
#section-predictions.view-table .section {
    display: none !important;
}

/* Show unified table full width in table view for Predictions section */
#section-predictions.view-table .unified-table {
    display: block !important;
    width: 100%;
}

/* Hide the 2-column dashboard grid in table view for Transfer Trends section */
#section-trends.view-table .dashboard-grid {
    display: none !important;
}

/* Show unified table full width in table view for Transfer Trends section */
#section-trends.view-table .unified-table {
    display: block !important;
    width: 100%;
}

/* Table confidence badge */
.table-confidence-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.table-confidence-badge.confidence-high {
    background: var(--success-bg);
    color: var(--success);
}

.table-confidence-badge.confidence-medium {
    background: var(--warning-bg);
    color: var(--warning);
}

.table-confidence-badge.confidence-low {
    background: var(--danger-bg);
    color: var(--danger);
}

/* Table forecast badge */
.table-forecast-badge {
    display: inline-block;
    padding: 0.25rem 0.625rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    white-space: nowrap;
}

.table-forecast-badge.urgency-critical {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 1px 4px rgba(239, 68, 68, 0.3);
}

.table-forecast-badge.urgency-high {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    box-shadow: 0 1px 4px rgba(245, 158, 11, 0.3);
}

.table-forecast-badge.urgency-medium {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

.table-forecast-badge.urgency-low {
    background: var(--surface-secondary);
    color: var(--text-muted);
    border: 1px solid var(--border);
}

/* Sortable table headers */
.sortable-table th.sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
    transition: background var(--transition);
}

.sortable-table th.sortable:hover {
    background: var(--border);
}

.sortable-table th.sortable .sort-indicator {
    display: inline-block;
    margin-left: 0.25rem;
    font-size: 0.75rem;
    color: var(--primary);
    min-width: 12px;
}

.sortable-table th.sortable.sort-asc,
.sortable-table th.sortable.sort-desc {
    background: rgba(37, 99, 235, 0.1);
}

.sortable-table th.sortable.sort-asc .sort-indicator,
.sortable-table th.sortable.sort-desc .sort-indicator {
    font-weight: bold;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
        min-height: auto; /* Remove min-height constraint on smaller screens */
    }

    .player-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }

    /* Charts on tablet */
    .charts-grid {
        grid-template-columns: 1fr;
    }

    .chart-container.chart-wide {
        grid-column: span 1;
    }
}

@media (max-width: 768px) {
    .container {
        padding: var(--space-md);
    }

    .header {
        padding: 0.5rem var(--space-md);
    }

    .header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .header-branding {
        width: 100%;
        gap: 0.5rem;
    }

    .header-branding h1 {
        font-size: 1.1rem;
    }

    .header-tagline {
        font-size: 0.75rem;
    }

    /* Mobile-friendly deadline display */
    .deadline-display {
        margin: 0;
        padding: 0;
    }

    .deadline-label {
        font-size: 0.75rem;
    }

    .deadline-countdown {
        font-size: 0.75rem;
    }

    .header-controls {
        width: 100%;
        gap: 0.5rem;
    }

    .date-selector {
        flex: 1;
        min-width: 0;
    }

    .date-selector label {
        display: none;
    }

    .date-select {
        flex: 1;
        min-width: 0;
        font-size: 0.85rem;
        padding: 0.5rem;
    }

    .quick-stats-dashboard {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }

    .stats-section-primary {
        grid-column: 1;
    }

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

    .stats-section-primary .stats-grid {
        grid-template-columns: 1fr;
    }

    /* Mobile tooltip adjustments */
    .stat-info::after {
        width: 180px;
        font-size: 0.7rem;
        padding: var(--space-xs) var(--space-sm);
    }

    /* Make tooltips appear on tap for mobile */
    .stat-info:active::after,
    .stat-info:active::before {
        opacity: 1;
        visibility: visible;
    }

    .tab-button {
        font-size: 0.875rem;
        padding: var(--space-xs) var(--space-sm);
    }

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

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

@media (max-width: 480px) {
    .quick-stats-dashboard {
        gap: var(--space-sm);
    }

    .stat-card-compact {
        padding: var(--space-sm);
        gap: var(--space-sm);
    }

    .stat-icon {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    .stat-value {
        font-size: 1.25rem;
    }

    /* Unified nav mobile styles */
    .unified-nav {
        flex-direction: column;
        align-items: stretch;
        gap: var(--space-sm);
        padding: var(--space-sm);
    }

    .unified-nav-sections {
        order: 1;
        justify-content: flex-start;
    }

    .unified-nav-view {
        order: 2;
        border-left: none;
        border-top: 1px solid var(--border);
        padding-left: 0;
        padding-top: var(--space-sm);
        justify-content: stretch;
    }

    .unified-view-btn {
        flex: 1;
        text-align: center;
        min-width: 0;
    }

    .unified-nav-btn {
        padding: var(--space-sm) var(--space-md);
        font-size: 0.8125rem;
        min-width: 70px;
    }

    /* Legacy styles */
    .top-nav {
        gap: var(--space-xs);
        padding: var(--space-xs);
    }

    .top-nav-button {
        min-width: 100px;
        padding: var(--space-sm);
    }

    .top-nav-button .nav-icon {
        font-size: 1.25rem;
    }

    .top-nav-button .nav-label {
        font-size: 0.75rem;
    }

    .tab-nav {
        flex-direction: column;
        gap: 0;
        padding: 0;
    }

    .tab-button {
        border-radius: 0;
    }

    .tab-button:first-child {
        border-radius: 8px 8px 0 0;
    }

    .tab-button:last-child {
        border-radius: 0 0 8px 8px;
    }

    .view-toggle-container {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-sm);
    }

    .view-toggle-buttons {
        width: 100%;
    }

    .view-toggle-btn {
        flex: 1;
        justify-content: center;
    }

    .player-table {
        font-size: 0.85rem;
    }

    .player-table th,
    .player-table td {
        padding: var(--space-sm);
    }

    .table-player-badge {
        width: 32px;
        height: 32px;
        font-size: 0.65rem;
    }
}

/* Player Tooltip */
.player-info-with-tooltip {
    position: relative;
}

.player-tooltip {
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    margin-left: 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
    min-width: 200px;
    box-shadow: var(--shadow-md);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition);
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
}

.player-info-with-tooltip:hover .player-tooltip {
    opacity: 1;
    pointer-events: auto;
}

/* Card Info Icon and Tooltip */
.card-info-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.info-icon {
    font-size: 1.25rem;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity var(--transition), transform var(--transition);
    user-select: none;
}

.info-icon:hover {
    opacity: 1;
    transform: scale(1.1);
}

.card-info-icon .player-tooltip {
    left: auto;
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    margin-left: 0;
    margin-right: 10px;
}

.card-info-icon:hover .player-tooltip {
    opacity: 1;
    pointer-events: auto;
}

/* Adjust player-stats grid to accommodate info icon */
.player-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: var(--space-sm);
    margin-top: var(--space-sm);
    padding-top: var(--space-sm);
    border-top: 1px solid var(--border);
}

.prediction-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
    gap: var(--space-sm);
    margin-top: var(--space-sm);
    padding-top: var(--space-sm);
    border-top: 1px solid var(--border);
}

.tooltip-header {
    font-size: 1rem;
    color: var(--text);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--border);
}

.tooltip-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    padding: 4px 0;
    border-bottom: 1px solid var(--border);
}

.tooltip-stat:last-child {
    border-bottom: none;
}

.tooltip-label {
    color: var(--text-muted);
    font-weight: 500;
}

.tooltip-value {
    color: var(--text);
    font-weight: 600;
}

/* Responsive tooltip positioning */
@media (max-width: 1024px) {
    .player-tooltip {
        left: auto;
        right: 100%;
        margin-left: 0;
        margin-right: 10px;
    }
}

@media (max-width: 768px) {
    .player-tooltip {
        position: fixed;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        margin: 0;
        max-width: 90vw;
    }
}

/* Utility Classes */
.text-success {
    color: var(--success);
}

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

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

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

.bg-success {
    background: var(--success-bg);
}

.bg-danger {
    background: var(--danger-bg);
}

.bg-warning {
    background: var(--warning-bg);
}

/* ===================================
   TRANSFER TIPS SECTION
   =================================== */

.tips-grid {
    /* Container will hold both cards and table */
}

/* Tips grid cards wrapper */
.tips-grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

@media (max-width: 768px) {
    .tips-grid-cards {
        grid-template-columns: 1fr;
        gap: var(--space-sm);
    }
}

.tip-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: var(--space-md);
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

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

/* Tier indicators (left border accent) */
.tip-card.tier-essential {
    border-left: 4px solid #4CAF50;
}

.tip-card.tier-strong {
    border-left: 4px solid #2196F3;
}

.tip-card.tier-differential {
    border-left: 4px solid #FF9800;
}

.tip-card.tier-watchlist {
    border-left: 4px solid #9E9E9E;
}

/* Tip Card Header */
.tip-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-sm);
}

.tip-card-player {
    flex: 1;
}

.tip-card-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

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

.tip-card-score {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.tip-score-value {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.tip-score-value.score-high {
    color: #4CAF50;
}

.tip-score-value.score-medium {
    color: #2196F3;
}

.tip-score-value.score-low {
    color: #FF9800;
}

.tip-score-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Tip Card Body */
.tip-card-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    margin-bottom: var(--space-sm);
    padding: var(--space-sm) 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

@media (min-width: 769px) {
    .tip-card-stats {
        /* 2x2 grid on desktop for better readability */
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .tip-card-stats {
        /* 2 columns on mobile/tablet */
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .tip-card-stats {
        /* Single column on very small screens */
        grid-template-columns: 1fr;
    }
}

.tip-stat {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
}

.tip-stat-label {
    color: var(--text-secondary);
}

.tip-stat-value {
    font-weight: 600;
    color: var(--text-primary);
}

/* Fixtures Display */
.tip-fixtures {
    display: flex;
    gap: 0.25rem;
    align-items: center;
    margin-bottom: var(--space-sm);
}

.tip-fixture-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    border: 1px solid var(--border);
    white-space: nowrap;
}

.tip-fixture-badge.fdr-1 {
    background: #4CAF50;
    color: white;
    border-color: #4CAF50;
}

.tip-fixture-badge.fdr-2 {
    background: #8BC34A;
    color: white;
    border-color: #8BC34A;
}

.tip-fixture-badge.fdr-3 {
    background: #FFC107;
    color: #333;
    border-color: #FFC107;
}

.tip-fixture-badge.fdr-4 {
    background: #FF9800;
    color: white;
    border-color: #FF9800;
}

.tip-fixture-badge.fdr-5 {
    background: #F44336;
    color: white;
    border-color: #F44336;
}

/* Reasoning Text */
.tip-reasoning {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
    padding: var(--space-sm);
    background: var(--surface-secondary);
    border-radius: 4px;
    margin-bottom: var(--space-sm);
}

/* Score Breakdown (collapsible) */
.tip-breakdown {
    margin-top: var(--space-sm);
    padding-top: var(--space-sm);
    border-top: 1px solid var(--border);
}

.tip-breakdown-toggle {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 0.85rem;
    cursor: pointer;
    padding: 0.25rem 0;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    transition: all var(--transition);
}

.tip-breakdown-toggle:hover {
    color: var(--primary-hover);
}

.tip-breakdown-content {
    margin-top: var(--space-sm);
    display: none;
}

.tip-breakdown-content.active {
    display: block;
}

.tip-breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.tip-breakdown-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.tip-breakdown-bar {
    flex: 1;
    height: 6px;
    background: var(--surface-secondary);
    border-radius: 3px;
    margin: 0 0.75rem;
    overflow: hidden;
}

.tip-breakdown-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-hover));
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* Context Grid (replaces old breakdown) */
.tip-context-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.tip-context-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.tip-context-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tip-context-value {
    font-size: 0.9rem;
    color: var(--text);
    font-weight: 500;
    text-transform: capitalize;
}

.tip-breakdown-value {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    min-width: 35px;
    text-align: right;
}

/* Empty State */
.tips-empty {
    text-align: center;
    padding: var(--space-xl);
    color: var(--text-muted);
}

.tips-empty-icon {
    font-size: 3rem;
    margin-bottom: var(--space-sm);
    opacity: 0.3;
}

/* View-specific display for Tips section */
.view-cards .tips-grid-cards {
    display: grid;
}

.view-cards .tips-table-container {
    display: none;
}

.view-table .tips-grid-cards {
    display: none;
}

.view-table .tips-table-container {
    display: block;
}

/* Tips Table Styles */
.tips-table-container {
    overflow: auto;
    border-radius: 8px;
    border: 1px solid var(--border);
    margin-bottom: var(--space-lg);
}

.tips-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
}

.tips-table thead {
    background: var(--surface-secondary);
    border-bottom: 2px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 10;
}

.tips-table th {
    padding: var(--space-md);
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.9rem;
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
}

.tips-table th:hover {
    background: var(--surface-hover);
    color: var(--text-primary);
}

.tips-table th.sortable {
    position: relative;
    padding-right: 2rem;
}

.tips-table tbody tr {
    border-bottom: 1px solid var(--border);
    transition: background var(--transition);
}

.tips-table tbody tr:hover {
    background: var(--surface-hover);
}

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

.tips-table td {
    padding: var(--space-md);
    color: var(--text);
    font-size: 0.9rem;
}

.tips-table .text-right {
    text-align: right;
}

/* Table-specific player info */
.tips-table .table-player-info {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.tips-table .table-player-name {
    font-weight: 600;
    color: var(--text-primary);
}

.tips-table .table-player-meta {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* xP Score styling in table */
.tips-table .xp-score {
    font-weight: 700;
    font-size: 1rem;
}

.tips-table .xp-score.score-high {
    color: #4CAF50;
}

.tips-table .xp-score.score-medium {
    color: #2196F3;
}

.tips-table .xp-score.score-low {
    color: #FF9800;
}

/* Fixture badges in table */
.tips-table .tip-fixtures-table {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .tips-table {
        font-size: 0.85rem;
    }

    .tips-table th,
    .tips-table td {
        padding: var(--space-sm);
    }

    .tips-grid-cards {
        grid-template-columns: 1fr;
    }
}

.tips-empty-text {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.tips-empty-subtext {
    font-size: 0.9rem;
}

/* Confidence Badge */
.tip-confidence {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tip-confidence.confidence-high {
    background: rgba(76, 175, 80, 0.15);
    color: #4CAF50;
}

.tip-confidence.confidence-medium {
    background: rgba(255, 152, 0, 0.15);
    color: #FF9800;
}

.tip-confidence.confidence-low {
    background: rgba(158, 158, 158, 0.15);
    color: #9E9E9E;
}

/* ========================================
   FREE HIT DRAFT STYLES
   ======================================== */

.free-hit-draft {
    width: 100%;
}

/* Draft Summary */
.draft-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1.25rem;
    background: var(--surface-secondary);
    border-radius: 8px;
    border: 1px solid var(--border);
}

.draft-summary-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.draft-summary-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.draft-summary-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.draft-summary-value.highlight {
    color: var(--accent-primary);
}

/* Draft Description & Reasoning */
.draft-description,
.draft-reasoning {
    padding: 1rem;
    background: var(--surface-secondary);
    border-radius: 6px;
    margin-bottom: 1rem;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.draft-reasoning {
    background: rgba(33, 150, 243, 0.1);
    border-left: 3px solid #2196F3;
}

/* Draft Captain */
.draft-captain {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(255, 215, 0, 0.05));
    border: 2px solid #FFD700;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.captain-label {
    font-size: 1.1rem;
    font-weight: 700;
    color: #DAA520;
}

.captain-player {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Pitch Container */
.pitch-container {
    margin: 2rem 0;
    padding: 3rem 1.5rem;
    background:
        /* Grass texture pattern */
        repeating-linear-gradient(
            0deg,
            #2d5016 0px,
            #2d5016 10px,
            #35601a 10px,
            #35601a 20px
        );
    border-radius: 12px;
    border: 3px solid #1a3a0d;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

/* Field lines overlay */
.pitch-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        /* Center circle */
        radial-gradient(circle at center, transparent 60px, rgba(255, 255, 255, 0.15) 60px, rgba(255, 255, 255, 0.15) 63px, transparent 63px),
        /* Center line */
        linear-gradient(to bottom, transparent calc(50% - 1.5px), rgba(255, 255, 255, 0.15) calc(50% - 1.5px), rgba(255, 255, 255, 0.15) calc(50% + 1.5px), transparent calc(50% + 1.5px)),
        /* Side lines */
        linear-gradient(to right, transparent 0%, rgba(255, 255, 255, 0.1) 2%, transparent 2%, transparent 98%, rgba(255, 255, 255, 0.1) 98%, transparent 100%),
        /* Top/bottom lines */
        linear-gradient(to bottom, transparent 0%, rgba(255, 255, 255, 0.1) 2%, transparent 2%, transparent 98%, rgba(255, 255, 255, 0.1) 98%, transparent 100%);
    pointer-events: none;
}

/* Center dot */
.pitch-container::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    pointer-events: none;
}

.pitch {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.pitch-line {
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Pitch Player */
.pitch-player {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    min-width: 120px;
    max-width: 150px;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
}

.pitch-player:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.pitch-player-shirt {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.75rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.pitch-player-name {
    font-weight: 700;
    font-size: 0.9rem;
    color: #1a1a1a;
    text-align: center;
}

.pitch-player-team {
    font-size: 0.75rem;
    font-weight: 600;
    color: #666;
    text-align: center;
    margin-top: -0.25rem;
}

.pitch-player-info {
    display: flex;
    gap: 0.75rem;
    font-size: 0.85rem;
    color: #666;
}

.pitch-player-price {
    font-weight: 600;
}

.pitch-player-xp {
    font-weight: 700;
    color: #e91e63;
}

.pitch-player-fixture {
    font-size: 0.75rem;
    color: #888;
    text-align: center;
}

/* Fixture Difficulty Colors */
.pitch-player.diff-1 {
    border-left: 4px solid #00ff85;
}

.pitch-player.diff-2 {
    border-left: 4px solid #01fc7c;
}

.pitch-player.diff-3 {
    border-left: 4px solid #e7e7e7;
}

.pitch-player.diff-4 {
    border-left: 4px solid #ff1751;
}

.pitch-player.diff-5 {
    border-left: 4px solid #861537;
}

/* Bench Container */
.bench-container {
    margin: 2rem 0;
}

.bench-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.bench-title::before {
    content: '━━━';
    color: var(--text-muted);
}

.bench-title::after {
    content: '━━━';
    color: var(--text-muted);
    flex: 1;
}

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

.bench-player {
    display: grid;
    grid-template-columns: 30px 40px 1fr auto auto auto;
    gap: 0.75rem;
    align-items: center;
    padding: 0.75rem;
    background: var(--surface-secondary);
    border-radius: 6px;
    border: 1px solid var(--border);
}

.bench-number {
    font-weight: 700;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.bench-pos {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
}

.bench-name {
    font-weight: 600;
    color: var(--text-primary);
}

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

.bench-price,
.bench-xp {
    font-size: 0.85rem;
    font-weight: 600;
}

.bench-xp {
    color: var(--accent-primary);
}

/* Squad List Mobile (fallback) */
.squad-list-mobile {
    display: none;
}

.player-list-item {
    padding: 0.75rem;
    background: var(--surface-secondary);
    border-radius: 6px;
    border: 1px solid var(--border);
    margin-bottom: 0.5rem;
}

.player-list-main {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.player-list-pos {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    min-width: 40px;
}

.player-list-name {
    font-weight: 600;
    color: var(--text-primary);
}

.player-list-team {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.player-list-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.player-list-fixture {
    color: var(--text-muted);
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .draft-summary {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
        padding: 1rem;
    }

    .draft-summary-value {
        font-size: 1.25rem;
    }

    .draft-captain {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    /* Hide pitch view on mobile, show list instead */
    .pitch-container,
    .bench-container {
        display: none;
    }

    .squad-list-mobile {
        display: block;
    }

    .squad-list-mobile h3 {
        font-size: 1rem;
        font-weight: 700;
        margin: 1.5rem 0 1rem 0;
        padding-bottom: 0.5rem;
        border-bottom: 2px solid var(--border);
        color: var(--text-primary);
    }
}

/* Tablet: Show pitch but make it more compact */
@media (min-width: 769px) and (max-width: 1024px) {
    .pitch-player {
        min-width: 100px;
        max-width: 120px;
        padding: 0.5rem;
    }

    .pitch-player-shirt {
        width: 40px;
        height: 40px;
        font-size: 0.7rem;
    }

    .pitch-player-name {
        font-size: 0.8rem;
    }

    .bench-players {
        grid-template-columns: 1fr;
    }
}

/* ================================
   WILDCARD DRAFT STYLES
   ================================ */

/* Wildcard uses same .draft-summary, .pitch-container, .bench-container as Free Hit */
/* Additional Wildcard-specific styles below */

.wildcard-draft {
    width: 100%;
}

/* Special Gameweek Alerts */
.special-gw-alerts {
    margin-bottom: 1.5rem;
}

.alert-dgw,
.alert-bgw {
    padding: 0.875rem 1.125rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.alert-dgw {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border-left: 4px solid #047857;
}

.alert-bgw {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border-left: 4px solid #b91c1c;
}

.alert-dgw strong,
.alert-bgw strong {
    color: white;
    font-weight: 700;
}

/* Fixture Timeline */
.fixture-timeline {
    margin: 1.5rem 0 2rem 0;
    background: var(--surface-secondary);
    border-radius: 8px;
    padding: 1.25rem;
    border: 1px solid var(--border);
}

.timeline-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.timeline-title::before {
    content: '📅';
    font-size: 1.2rem;
}

.timeline-scroll {
    overflow-x: auto;
    overflow-y: visible;
    margin: 0 -0.5rem;
    padding: 0 0.5rem;
}

/* Hide scrollbar but keep functionality */
.timeline-scroll::-webkit-scrollbar {
    height: 6px;
}

.timeline-scroll::-webkit-scrollbar-track {
    background: var(--surface-primary);
    border-radius: 3px;
}

.timeline-scroll::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

.timeline-scroll::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

.timeline-header,
.timeline-row {
    display: grid;
    grid-template-columns: 180px repeat(5, minmax(90px, 1fr));
    gap: 0.5rem;
    align-items: center;
    min-width: 650px;
}

.timeline-header {
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    color: var(--text-muted);
    border-bottom: 2px solid var(--border);
    padding-bottom: 0.75rem;
    margin-bottom: 0.5rem;
}

.timeline-row {
    padding: 0.625rem 0;
    border-bottom: 1px solid var(--border-light);
}

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

.timeline-row:hover {
    background: var(--surface-primary);
    border-radius: 4px;
}

.timeline-player-col {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    padding: 0.25rem 0;
}

.timeline-player-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.timeline-player-team {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.timeline-gw-col {
    text-align: center;
    font-size: 0.85rem;
}

.timeline-fixture {
    display: inline-block;
    padding: 0.375rem 0.5rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.8rem;
    min-width: 75px;
    text-align: center;
}

/* Fixture difficulty colors for timeline */
.timeline-fixture.diff-1 {
    background: #10b981;
    color: white;
}

.timeline-fixture.diff-2 {
    background: #84cc16;
    color: white;
}

.timeline-fixture.diff-3 {
    background: #f59e0b;
    color: white;
}

.timeline-fixture.diff-4 {
    background: #f97316;
    color: white;
}

.timeline-fixture.diff-5 {
    background: #dc2626;
    color: white;
}

.timeline-fixture-empty {
    color: var(--text-muted);
    font-size: 0.75rem;
}

/* Wildcard-specific player list (mobile) */
.player-list-form {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.player-list-fixtures {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-light);
}

.player-list-fixtures small {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Mobile Optimizations for Wildcard */
@media (max-width: 768px) {
    .fixture-timeline {
        padding: 1rem;
    }

    .timeline-scroll {
        margin: 0 -1rem;
        padding: 0 1rem;
    }

    .timeline-header,
    .timeline-row {
        grid-template-columns: 120px repeat(5, minmax(70px, 1fr));
        gap: 0.375rem;
        min-width: 550px;
    }

    .timeline-player-name {
        font-size: 0.8rem;
    }

    .timeline-fixture {
        font-size: 0.7rem;
        padding: 0.25rem 0.375rem;
        min-width: 60px;
    }

    .timeline-title {
        font-size: 1rem;
    }

    .alert-dgw,
    .alert-bgw {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
    }
}

/* Tablet: Slightly smaller timeline */
@media (min-width: 769px) and (max-width: 1024px) {
    .timeline-header,
    .timeline-row {
        grid-template-columns: 150px repeat(5, minmax(80px, 1fr));
    }

    .timeline-fixture {
        font-size: 0.75rem;
        min-width: 70px;
    }
}

/* ================================
   ANALYTICS SECTION STYLES
   ================================ */

/* Analytics uses existing player-card and prediction-card styles */
/* Additional label for price-change area in analytics */
.price-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

/* Fixture Swing Badges */
.fixture-swing-badge {
    display: inline-block;
    margin-left: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    vertical-align: middle;
    transition: all 0.2s ease;
}

.fixture-swing-badge.improving {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.fixture-swing-badge.worsening {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.fixture-swing-badge:hover {
    transform: scale(1.05);
    cursor: help;
}

/* Tooltip for fixture swing badges */
.fixture-swing-badge {
    position: relative;
}

.fixture-swing-badge::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: var(--space-sm) var(--space-md);
    font-size: 0.75rem;
    font-weight: normal;
    line-height: 1.4;
    white-space: normal;
    width: 280px;
    text-align: left;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    z-index: 1000;
    pointer-events: none;
}

.fixture-swing-badge::before {
    content: '';
    position: absolute;
    bottom: 105%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--border);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    z-index: 1001;
}

.fixture-swing-badge:hover::after,
.fixture-swing-badge:hover::before {
    opacity: 1;
    visibility: visible;
}

/* Mobile: Use bottom positioned tooltip to avoid overflow */
@media (max-width: 768px) {
    .fixture-swing-badge::after {
        bottom: auto;
        top: 125%;
        width: 240px;
    }

    .fixture-swing-badge::before {
        bottom: auto;
        top: 105%;
        border-top-color: transparent;
        border-bottom-color: var(--border);
    }
}

/* Dark mode adjustments */
@media (prefers-color-scheme: dark) {
    .fixture-swing-badge.improving {
        background: rgba(16, 185, 129, 0.2);
        color: #34d399;
    }

    .fixture-swing-badge.worsening {
        background: rgba(239, 68, 68, 0.2);
        color: #f87171;
    }
}
