@media (max-width: 600px) {
    #githubFileSelect {
        width: 100% !important;
        min-width: 0 !important;
        margin: 10px 0 0 0 !important;
        font-size: 0.9em;
        padding: 10px 8px;
        box-sizing: border-box;
        border-radius: 8px;
        margin-left: 0;
        margin-top: 8px;
        text-overflow: ellipsis;
        overflow: hidden;
        white-space: nowrap;
    }
}

/* Responsive: Player cards span full width on small screens */
@media (max-width: 600px) {
    .players-grid,
    #teamActionsGrid {
        grid-template-columns: 1fr !important;
    }
    .stat-card,
    .match-card,
    .team-summary-card {
        width: 100%;
        grid-column: auto !important;
        margin-left: 0;
        margin-right: 0;
        padding: 18px 12px 18px 12px !important;
        font-size: 1rem !important;
        box-sizing: border-box;
    }
}
/* --- GitHub Import UI --- */
#githubFileSelect {
    display: inline-block;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid #2563eb;
    background: #f8fafc;
    color: #2563eb;
    font-size: 1rem;
    font-family: inherit;
    box-shadow: 0 2px 8px rgba(37,99,235,0.08);
    transition: border-color 0.2s, box-shadow 0.2s;
    margin-left: 10px;
    min-width: 160px;
    max-width: 100%;
}
#githubFileSelect:focus, #githubFileSelect:hover {
    border-color: #1d4ed8;
    box-shadow: 0 4px 12px rgba(37,99,235,0.15);
    outline: none;
}
@media (max-width: 600px) {
    #githubFileSelect {
        width: 100% !important;
        min-width: 0 !important;
        margin: 10px 0 0 0 !important;
        font-size: 1.1em;
        padding: 12px 10px;
        box-sizing: border-box;
        border-radius: 8px;
        margin-left: 0;
        margin-top: 8px;
    }
}

.team-summary-card {
    grid-column: span 2;
    background: #f1f5fa;
    border: 2px solid var(--primary);
    box-shadow: 0 4px 16px 0 rgba(37,99,235,0.07);
    padding: 24px 24px 18px 24px;
    font-size: 1.08rem;
    margin-bottom: 10px;
}
/* Modern summary table styles */
.summary-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px 0 rgba(31,41,55,0.06);
    overflow: hidden;
    margin-bottom: 10px;
    font-size: 0.8rem;
    margin-top: 6px;
}
.summary-table th, .summary-table td {
    padding: 10px 14px;
    text-align: center;
    border-bottom: 1px solid #e5e7eb;
}
.summary-table th {
    background: #f3f4f6;
    font-weight: 600;
    color: var(--text-main);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
}
.summary-table tr:last-child td {
    border-bottom: none;
}
.summary-table td:first-child {
    text-align: left;
    font-weight: 600;
    color: var(--text-main);
    background: #f8fafc;
    border-radius: 8px 0 0 8px;
}
.summary-table td:last-child {
    border-radius: 0 8px 8px 0;
}
.summary-table tr {
}
.highlight-good {
    color: #16a34a !important;
    font-weight: bold;
    background: #f0fdf4;
    border-radius: 6px;
}
.highlight-bad {
    color: #dc2626 !important;
    font-weight: bold;
    background: #fef2f2;
    border-radius: 6px;
}
.highlight-regular {
    color: #d97706 !important;
    font-weight: bold;
    background: #fef3c7;
    border-radius: 6px;
}
/* Volleyball Analytics Dashboard Styles */
:root {
    --primary: #2563eb; 
    --success: #16a34a; 
    --warning: #f59e0b; 
    --danger: #dc2626;  
    --bg: #f3f4f6;
    --card-bg: #ffffff;
    --text-main: #1f2937;
    --text-muted: #6b7280;
}

body {
    font-family: 'Segoe UI', system-ui, sans-serif;
    background: linear-gradient(160deg, #eef2ff 0%, #f3f4f6 60%);
    color: var(--text-main);
    margin: 0;
    padding: 20px;
    min-height: 100vh;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
}

.input-section {
    background: var(--card-bg);
    padding: 24px 24px 20px;
    border-radius: 16px;
    box-shadow: 0 4px 24px -4px rgba(37,99,235,0.10), 0 1px 4px rgba(0,0,0,0.06);
    margin-bottom: 30px;
    border-top: 4px solid var(--primary);
}

.input-section h2 {
    margin: 0 0 6px;
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.3px;
    color: var(--primary);
}

.input-section p {
    margin: 0 0 12px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

textarea {
    width: 100%;
    height: 80px;
    padding: 10px 12px;
    border: 1.5px solid #d1d5db;
    border-radius: 10px;
    font-family: monospace;
    font-size: 0.85rem;
    margin-bottom: 10px;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fafbff;
}

textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
    background: #fff;
}

.btn-group { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
button {
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.88rem;
    border: none;
    transition: background 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
    letter-spacing: 0.1px;
}
button:hover { transform: translateY(-1px); }
button:active { transform: translateY(0); }
.btn-primary {
    background: linear-gradient(135deg, #1e293b 0%, #2563eb 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(37,99,235,0.25);
}
.btn-primary:hover {
    background: linear-gradient(135deg, #0f172a 0%, #1d4ed8 100%);
    box-shadow: 0 4px 14px rgba(37,99,235,0.35);
}
.btn-success {
    background: linear-gradient(135deg, #15803d 0%, #16a34a 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(22,163,74,0.25);
}
.btn-success:hover {
    background: linear-gradient(135deg, #166534 0%, #15803d 100%);
    box-shadow: 0 4px 14px rgba(22,163,74,0.35);
}

.dashboard {
    display: none;
    background: white;
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 4px 24px -4px rgba(0,0,0,0.10), 0 1px 4px rgba(0,0,0,0.06);
}

.report-header {
    text-align: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #e5e7eb;
}

.report-header h1 {
    margin: 0;
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #1e293b 0%, #2563eb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.report-header #reportDate {
    color: var(--text-muted);
    margin: 4px 0 0;
    font-size: 0.8rem;
}

.youtube-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 12px;
    padding: 10px 16px;
    background: linear-gradient(135deg, #fff5f5 0%, #fff 100%);
    border: 1px solid #fecaca;
    border-radius: 10px;
    flex-wrap: wrap;
}

.youtube-banner__label {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #dc2626;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    white-space: nowrap;
}

.youtube-banner__icon {
    width: 22px;
    height: 22px;
    color: #dc2626;
    flex-shrink: 0;
}

.youtube-banner__links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.youtube-set-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 14px;
    background: #dc2626;
    color: #fff !important;
    font-size: 0.82rem;
    font-weight: 600;
    border-radius: 20px;
    text-decoration: none !important;
    transition: background 0.15s ease, transform 0.1s ease;
    box-shadow: 0 2px 6px rgba(220, 38, 38, 0.3);
}

.youtube-set-link:hover {
    background: #b91c1c;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(220, 38, 38, 0.4);
}

.youtube-set-link::before {
    content: '▶';
    font-size: 0.65rem;
}

.general-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 28px;
}

.stat-card {
    background: linear-gradient(160deg, #f8faff 0%, #f1f5f9 100%);
    padding: 16px 10px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.stat-value { font-size: 1.8rem; font-weight: 800; color: var(--text-main); line-height: 1; margin-bottom: 4px; }
.stat-label { color: var(--text-muted); font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.7px; font-weight: 600; }

.players-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.stat-card,
.match-card {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    page-break-inside: avoid;
}

.card-header {
    background: linear-gradient(135deg, #1e293b 0%, #2d3f5e 100%);
    color: white;
    padding: 10px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.player-number { font-weight: 800; font-size: 1rem; letter-spacing: 0.2px; }
.player-rating {
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(4px);
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: 800;
    font-size: 0.95rem;
    border: 1px solid rgba(255,255,255,0.25);
    letter-spacing: 0.3px;
}

.card-body { padding: 12px; }

.result-badge {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 20px;
    font-weight: 800;
    font-size: 0.8rem;
    margin-bottom: 8px;
    letter-spacing: 0.3px;
}
.result-win  { background: #dcfce7; color: #16a34a; }
.result-loss { background: #fee2e2; color: #dc2626; }

.position-badge {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.75rem;
    margin-bottom: 8px;
    background: #e0e7ff;
    color: #4338ca;
    -webkit-text-fill-color: #4338ca;
    letter-spacing: 0.3px;
}

.metric-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 2px; font-size: 0.75rem; font-weight: 500; color: #6b7280; }
.metric-row span:last-child { font-weight: 800; font-size: 0.88rem; color: var(--text-main); }
.bar-container { height: 6px; background: #f3f4f6; border-radius: 3px; margin-bottom: 6px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 3px; }

.action-section {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px dashed #e2e8f0;
}

.action-title { font-size: 0.7rem; text-transform: uppercase; color: #94a3b8; margin-bottom: 5px; font-weight: 600; }

.action-grid { display: flex; flex-wrap: wrap; gap: 6px; }

.action-pill {
    display: flex;
    align-items: center;
    background: #f8fafc;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    border: 1px solid #e2e8f0;
    transition: background 0.1s;
}

.action-pill.high-perf { border-color: #86efac; background-color: #f0fdf4; color: #15803d; }
.action-pill.low-perf { border-color: #fca5a5; background-color: #fef2f2; color: #dc2626; }

.action-name { color: #64748b; margin-right: 4px; font-weight: 500; }
.action-count { font-weight: 500; color: #0f172a; }

/* Count inherits the pill's semantic color on high/low performance */
.action-pill.high-perf .action-name { color: #166534; }
.action-pill.high-perf .action-count { color: #15803d; font-weight: 800; }
.action-pill.low-perf .action-name { color: #991b1b; }
.action-pill.low-perf .action-count { color: #dc2626; font-weight: 800; }

/* Section title headings */
.section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    margin: 22px 0 12px;
    padding: 0;
    cursor: pointer;
    user-select: none;
}

.section-title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 16px;
    background: linear-gradient(180deg, var(--primary) 0%, #818cf8 100%);
    border-radius: 2px;
    flex-shrink: 0;
}

.section-title .section-title-text {
}

.section-title .chevron {
    font-size: 1rem;
    line-height: 1;
    transition: transform 0.2s ease;
    color: #94a3b8;
    flex-shrink: 0;
    -webkit-text-fill-color: #94a3b8;
}

.section-title.collapsed .chevron {
    transform: rotate(-90deg);
}

.section-content {
    overflow: hidden;
    transition: max-height 0.35s ease, opacity 0.25s ease;
    max-height: 9999px;
    opacity: 1;
}

.section-content.collapsed {
    max-height: 0 !important;
    opacity: 0;
}

.section-title:first-of-type {
    margin-top: 4px;
}

/* ===== Dashboard Hub Styles ===== */

.hub-hero {
    text-align: center;
    padding: 32px 24px 24px;
    margin-bottom: 28px;
    background: linear-gradient(160deg, #eef2ff 0%, #f8fafc 100%);
    border-radius: 16px;
    border: 1px solid #e2e8f0;
}

.hub-hero h1 {
    margin: 0 0 8px;
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #1e293b 0%, #2563eb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hub-hero .hub-subtitle {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin: 0 0 16px;
}

.hub-hero-stats {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}

.hub-hero-stat {
    text-align: center;
}

.hub-hero-stat .stat-value {
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1.2;
}

.hub-hero-stat .stat-label {
    color: var(--text-muted);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* Navigation Tiles */
.hub-nav {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.hub-tile {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 24px 18px;
    text-align: center;
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.hub-tile:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.12);
    border-color: var(--primary);
}

.hub-tile-icon {
    font-size: 2rem;
    line-height: 1;
}

.hub-tile-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
}

.hub-tile-stat {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.hub-tile-stat strong {
    color: var(--text-main);
    font-weight: 700;
}

.hub-tile-btn {
    display: inline-block;
    margin-top: 8px;
    padding: 8px 20px;
    background: var(--primary);
    color: white;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
}

/* Last match banner */
.hub-last-match {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 20px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    flex-wrap: wrap;
}

.hub-last-match-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    font-weight: 700;
    color: var(--text-muted);
    white-space: nowrap;
}

.hub-last-match-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-main);
}

.hub-last-match-rating {
    font-weight: 800;
    font-size: 0.95rem;
    margin-left: auto;
}

.hub-last-match a {
    padding: 6px 16px;
    background: var(--primary);
    color: white;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.hub-last-match a:hover {
    background: #1d4ed8;
}

/* Page header for intermediate pages */
.page-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.page-header h1 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 800;
    background: linear-gradient(135deg, #1e293b 0%, #2563eb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-header .back-link {
    font-size: 0.85rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.page-header .back-link:hover {
    text-decoration: underline;
}

@media (max-width: 600px) {
    .hub-nav {
        grid-template-columns: 1fr;
    }
    .hub-hero-stats {
        gap: 16px;
    }
    .hub-last-match {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .hub-last-match-rating {
        margin-left: 0;
    }
}
