/* Premium Dark Theme for My Keeper Coach */
:root {
    --bg-dark: #0f172a;
    --bg-glass: rgba(30, 41, 59, 0.7);
    --border-glass: rgba(255, 255, 255, 0.1);
    --text-primary: #f8fafc;
    --text-muted: #94a3b8;
    --accent: #10b981; /* Neon green */
    --accent-glow: rgba(16, 185, 129, 0.3);
    --accent-hover: #059669;
    --danger: #ef4444;
}

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

body {
    font-family: 'Outfit', sans-serif;
    color: var(--text-primary);
    background-color: var(--bg-dark);
    line-height: 1.6;
    min-height: 100vh;
}

body.login-bg {
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at top right, #1e293b, var(--bg-dark));
}

.glassmorphism {
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

/* Typography & General Classes */
a { color: var(--accent); text-decoration: none; transition: all 0.2s; }
a:hover { color: var(--accent-hover); }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    gap: 8px;
}

.primary-btn {
    background-color: var(--accent);
    color: #fff;
    box-shadow: 0 4px 14px var(--accent-glow);
}
.primary-btn:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
}

.sm-btn { padding: 8px 16px; font-size: 0.875rem; }
.lg-btn { padding: 16px 32px; font-size: 1.125rem; }

.outline-btn {
    background: transparent;
    border: 1px solid var(--border-glass);
    color: var(--text-primary);
}
.outline-btn:hover { background: rgba(255, 255, 255, 0.05); }

.input-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}
.input-group label {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-muted);
}
.input-group input {
    padding: 12px;
    border-radius: 8px;
    border: 1px solid var(--border-glass);
    background: rgba(0,0,0,0.2);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.2s;
}
.input-group input:focus {
    outline: none;
    border-color: var(--accent);
}

.input-group select,
.input-group textarea {
    padding: 12px;
    border-radius: 8px;
    border: 1px solid var(--border-glass);
    background: rgba(0,0,0,0.2);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.2s;
    width: 100%;
}
.input-group select:focus,
.input-group textarea:focus {
    outline: none;
    border-color: var(--accent);
}

@media (max-width: 768px) {
    .input-group input, 
    .input-group select, 
    .input-group textarea {
        font-size: 16px; /* Prevents auto-zoom on iOS */
        width: 100%;
        box-sizing: border-box;
    }
}

.error-msg { color: var(--danger); font-size: 0.875rem; margin-top: 10px; display: none; }
.status-msg { font-size: 0.875rem; margin-top: 10px; display: none; }

/* Components */
.login-container {
    width: 100%;
    max-width: 400px;
    padding: 40px;
}
@media (max-width: 768px) {
    .login-container { padding: 24px; }
}

.logo-container h1 { font-size: 2.5rem; margin-bottom: 4px; }
@media (max-width: 768px) { .logo-container h1 { font-size: 2rem; } }
.logo-container h1 span { color: var(--accent); }
.logo-container p { color: var(--text-muted); margin-bottom: 32px; }

.login-form button { width: 100%; margin-top: 10px; }
.admin-link { margin-top: 24px; text-align: center; font-size: 0.875rem;}

/* Nav */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 5%;
    position: sticky;
    top: 0;
    z-index: 100;
    border-radius: 0 0 16px 16px;
    border-top: none;
}
.nav-brand { font-size: 1.5rem; font-weight: 800; }
.nav-brand span { color: var(--accent); }
.nav-brand .badge { font-size: 0.75rem; background: var(--border-glass); padding: 4px 8px; border-radius: 4px; vertical-align: middle; margin-left: 8px;}
.nav-user { display: flex; align-items: center; gap: 12px; }

/* Admin impersonation indicator */
.admin-impersonate-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 100px;
    padding: 5px 14px 5px 12px;
    font-size: 0.78rem;
}
.admin-view-label {
    color: rgba(148, 163, 184, 0.7);
    font-weight: 500;
}
.admin-view-name {
    color: #a5b4fc;
    font-weight: 700;
}
.admin-back-btn {
    color: #818cf8;
    font-weight: 700;
    font-size: 0.78rem;
    text-decoration: none;
    border-left: 1px solid rgba(99, 102, 241, 0.3);
    padding-left: 8px;
    margin-left: 2px;
    transition: color 0.2s;
    white-space: nowrap;
}
.admin-back-btn:hover { color: #a5b4fc; }

@media (max-width: 768px) {
    .top-nav { flex-direction: column; gap: 12px; padding: 16px; border-radius: 0; }
    .nav-user { width: 100%; justify-content: space-between; }
    #userNameDisplay { display: none; } /* Hide name on mobile to save space */
    .admin-impersonate-bar { font-size: 0.72rem; padding: 4px 10px; }
}

/* Dashboard Grid */
.dashboard-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 5%;
}

.profile-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 32px;
    margin-bottom: 24px;
}
.profile-info h2 { font-size: 2rem; margin-bottom: 16px; }
@media (max-width: 768px) { .profile-info h2 { font-size: 1.5rem; } }
.stat-card {
    display: inline-flex;
    flex-direction: column;
    background: rgba(0,0,0,0.2);
    padding: 12px 24px;
    border-radius: 12px;
    border: 1px solid var(--border-glass);
}
.stat-label { font-size: 0.875rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px;}
.stat-value { font-size: 1.5rem; font-weight: 800; color: var(--accent); }

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

@media (max-width: 768px) {
    .dashboard-grid { grid-template-columns: 1fr; }
    .profile-banner { flex-direction: column; gap: 24px; text-align: center; }
    .stat-card { width: 100%; box-sizing: border-box; }
    .profile-banner > div { width: 100%; }
    .weather-widget { margin: 0 auto; }
}

section { padding: 32px; }
section h3 { font-size: 1.25rem; margin-bottom: 24px; color: #fff;}

/* Skill Bars */
.skill-item { margin-bottom: 20px; }
.skill-header { display: flex; justify-content: space-between; margin-bottom: 8px; font-weight: 600; font-size: 0.875rem;}
.progress-bar-bg { width: 100%; height: 8px; background: rgba(0,0,0,0.3); border-radius: 4px; overflow: hidden; }
.progress-bar-fill { height: 100%; background: var(--accent); border-radius: 4px; box-shadow: 0 0 10px var(--accent-glow);}
.highlight-fill { background: #f59e0b; box-shadow: 0 0 10px rgba(245, 158, 11, 0.3); } /* Yellow warning */
.na-fill { background: repeating-linear-gradient(135deg, rgba(255,255,255,0.05), rgba(255,255,255,0.05) 4px, rgba(255,255,255,0.1) 4px, rgba(255,255,255,0.1) 8px); box-shadow: none; }
.skill-na { opacity: 0.6; }
.skill-na .skill-header span:last-child { color: var(--text-muted); font-style: italic; }
.feedback-snippet { font-size: 0.875rem; color: var(--text-muted); margin-top: 8px; font-style: italic; border-left: 2px solid #f59e0b; padding-left: 8px;}

/* Video List */
.video-card { display: flex; gap: 16px; align-items: center; background: rgba(0,0,0,0.2); border: 1px solid var(--border-glass); border-radius: 12px; padding: 16px; margin-bottom: 16px; transition: transform 0.2s; position: relative; }
.video-card:hover { transform: translateX(4px); border-color: var(--accent-glow); }
.placeholder-thumb { width: 80px; height: 60px; background: var(--border-glass); border-radius: 8px; }
.video-info { flex: 1; min-width: 0; }
.video-info h4 { font-size: 1rem; margin-bottom: 4px; }
.video-info .date { font-size: 0.875rem; color: var(--text-muted); margin-bottom: 8px; }
.view-link { font-size: 0.875rem; font-weight: 600; }

/* Admin Widgets */
.admin-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 24px; }
@media (max-width: 768px) { .admin-grid { grid-template-columns: 1fr; } }
.subtitle { color: var(--text-muted); font-size: 0.875rem; margin-bottom: 24px; }
.roster-list { display: flex; flex-direction: column; gap: 12px; }
.roster-item { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 16px; 
    background: rgba(0,0,0,0.2); 
    border-radius: 8px; 
    border: 1px solid var(--border-glass);
    gap: 12px;
    flex-wrap: wrap;
}
.roster-player-info { flex: 1; min-width: 0; }
.roster-actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.player-name { font-weight: 600; display: block; }
.player-email { font-size: 0.875rem; color: var(--text-muted); }

.field-hint { color: var(--text-muted); font-size: 0.75rem; font-weight: 400; margin-left: 4px; }

body.admin-bg {
    background: var(--bg-dark);
}

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

/* Muted text */
.muted-text { color: var(--text-muted); font-size: 0.875rem; }

/* Status Badges */
.status-badge { display: inline-block; font-size: 0.75rem; font-weight: 600; padding: 4px 10px; border-radius: 100px; margin-bottom: 8px; }
.status-badge.ready { background: rgba(16, 185, 129, 0.15); color: var(--accent); border: 1px solid var(--accent-glow); }
.status-badge.processing { background: rgba(245, 158, 11, 0.15); color: #f59e0b; border: 1px solid rgba(245,158,11,0.3); }
.status-badge.pending { background: rgba(148, 163, 184, 0.1); color: var(--text-muted); border: 1px solid var(--border-glass); }

/* Video thumbnail with icon */
.placeholder-thumb { display: flex; align-items: center; justify-content: center; }

/* Modal */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal {
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    padding: 0;
    animation: modalIn 0.2s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

@media (max-width: 768px) {
    .modal {
        max-width: 95%;
        max-height: 95vh;
        margin: auto;
    }
    .modal-body { padding: 16px; }
    .modal-header { padding: 16px 16px 0; }
    .modal-header h3 { font-size: 1.1rem; }
    
    .modal-footer { 
        padding: 0 16px 16px; 
        flex-direction: column; 
        gap: 12px; 
    }
    .modal-footer .btn { 
        width: 100%; 
        justify-content: center; 
    }
}
@keyframes modalIn {
    from { opacity: 0; transform: scale(0.96) translateY(10px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 28px 0;
}
.modal-header h3 { font-size: 1.25rem; }
.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.75rem;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: color 0.2s;
}
.modal-close:hover { color: var(--text-primary); }
.modal-body { padding: 24px 28px; overflow-y: auto; flex: 1; min-height: 0; }
.modal-footer { display: flex; justify-content: flex-end; gap: 12px; padding: 0 28px 24px; }

/* Drop Zone */
.drop-zone {
    border: 2px dashed var(--border-glass);
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: var(--text-muted);
}
.drop-zone.drag-over {
    border-color: var(--accent);
    background: rgba(16, 185, 129, 0.05);
}
.drop-zone svg { opacity: 0.5; margin-bottom: 8px; }

.coach-note {
    margin-top: 24px;
    padding: 16px;
    border-radius: 10px;
    background: rgba(16, 185, 129, 0.07);
    border: 1px solid var(--accent-glow);
}
.coach-note h4 { font-size: 0.875rem; color: var(--accent); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.5px; }
.coach-note p { color: var(--text-muted); font-size: 0.9rem; line-height: 1.6; }

/* File list items in upload modal */
.file-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px 12px;
    background: rgba(0,0,0,0.2);
    border-radius: 8px;
    border: 1px solid var(--border-glass);
    margin-bottom: 8px;
    position: relative;
}
.file-item-info {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
    font-size: 0.875rem;
    padding-right: 24px;
}
.file-item-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
}
.file-item-size { color: var(--text-muted); font-size: 0.75rem; white-space: nowrap; }
.file-item-progress { margin-top: 2px; }
.file-remove-btn {
    position: absolute;
    top: 8px;
    right: 10px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.875rem;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 4px;
    transition: color 0.2s;
}
.file-remove-btn:hover { color: var(--danger); }

/* ── Weather Widget ───────────────────────────────────────── */
.profile-banner {
    flex-wrap: wrap;
    gap: 20px;
}

.weather-widget {
    min-width: 190px;
    max-width: 220px;
    padding: 18px 20px;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(255,255,255,0.08);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

/* subtle shimmer line at top */
.weather-widget::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(16,185,129,0.5), transparent);
}

.weather-content { width: 100%; }

.weather-top {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.weather-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    flex-shrink: 0;
}

.weather-icon-wrap svg {
    filter: drop-shadow(0 0 6px rgba(16,185,129,0.4));
}

.weather-temp-block {
    display: flex;
    align-items: flex-start;
    line-height: 1;
}

.weather-temp {
    font-size: 2.6rem;
    font-weight: 800;
    color: #f8fafc;
    letter-spacing: -1px;
    line-height: 1;
}

.weather-unit {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-top: 4px;
}

.weather-condition {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 12px;
}

.weather-details {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.weather-detail-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.weather-detail-item svg {
    opacity: 0.6;
    flex-shrink: 0;
}

.precip-item {
    gap: 5px;
}

.precip-bar-wrap {
    flex: 1;
    height: 4px;
    background: rgba(255,255,255,0.08);
    border-radius: 10px;
    overflow: hidden;
}

.precip-bar {
    height: 100%;
    border-radius: 10px;
    background: linear-gradient(90deg, #38bdf8, #818cf8);
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
    width: 0%;
    box-shadow: 0 0 6px rgba(56,189,248,0.4);
}

.weather-location {
    font-size: 0.7rem;
    color: rgba(148,163,184,0.5);
    margin-top: 10px;
    letter-spacing: 0.3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.field-condition {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 8px;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 3px 8px;
    border-radius: 100px;
}

.field-condition.good {
    background: rgba(16,185,129,0.12);
    color: #10b981;
    border: 1px solid rgba(16,185,129,0.25);
}

.field-condition.moderate {
    background: rgba(245,158,11,0.1);
    color: #f59e0b;
    border: 1px solid rgba(245,158,11,0.25);
}

.field-condition.poor {
    background: rgba(239,68,68,0.1);
    color: #ef4444;
    border: 1px solid rgba(239,68,68,0.25);
}

/* Loading spinner */
.weather-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.weather-spinner {
    width: 22px;
    height: 22px;
    border: 2px solid rgba(255,255,255,0.1);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.weather-error {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 0.75rem;
}

/* Sun animation */
@keyframes sunPulse {
    0%, 100% { filter: drop-shadow(0 0 4px rgba(251,191,36,0.5)); }
    50% { filter: drop-shadow(0 0 12px rgba(251,191,36,0.9)); }
}
@keyframes cloudFloat {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(2px); }
}
@keyframes rainDrop {
    0% { opacity: 0; transform: translateY(-3px); }
    50% { opacity: 1; }
    100% { opacity: 0; transform: translateY(3px); }
}

.icon-sun { animation: sunPulse 2.5s ease-in-out infinite; }
.icon-cloud { animation: cloudFloat 3s ease-in-out infinite; }
.icon-rain svg { animation: rainDrop 1.2s ease-in-out infinite; }

@media (max-width: 768px) {
    .weather-widget {
        max-width: 100%;
        width: 100%;
    }
    .weather-top { justify-content: center; }
}


/* ── Game Info Row (Upload Modal) ─────────────────────────── */
.game-info-row {
    display: flex;
    align-items: flex-end;
    gap: 12px;
}
.game-info-row .input-group { flex: 1; margin: 0; }
.game-info-vs {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    padding-bottom: 10px;
    flex-shrink: 0;
}

/* ── Upload Hint ──────────────────────────────────────────── */
.upload-hint {
    margin-top: 12px;
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.5;
    text-align: left;
    padding: 8px 12px;
    background: rgba(251,191,36,0.07);
    border: 1px solid rgba(251,191,36,0.2);
    border-radius: 8px;
}
.upload-hint strong { color: #fcd34d; }
.upload-hint kbd {
    background: rgba(255,255,255,0.1);
    border: 1px solid var(--border-glass);
    border-radius: 4px;
    padding: 1px 5px;
    font-size: 0.75rem;
    font-family: monospace;
}

/* ── AI Analysis: Stat Pills ─────────────────────────────── */
.report-stats-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
}
.stat-pill {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(0,0,0,0.25);
    border: 1px solid var(--border-glass);
    border-radius: 10px;
    padding: 10px 16px;
    min-width: 70px;
}
.stat-pill--green {
    border-color: var(--accent-glow);
    background: rgba(16,185,129,0.08);
}
.stat-pill-val {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
}
.stat-pill-lbl {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
    text-align: center;
}

/* ── AI Analysis: Analyzing Spinner ─────────────────────── */
.analyzing-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 40px 20px;
    color: var(--text-muted);
    text-align: center;
}
.analyzing-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255,255,255,0.1);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
.analyzing-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    margin-right: 5px;
    vertical-align: middle;
    animation: pulse 1.2s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 0.3; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1.2); }
}

/* ── AI Analysis: Status Badges ─────────────────────────── */
.status-badge.failed {
    background: rgba(239,68,68,0.12);
    color: #ef4444;
    border: 1px solid rgba(239,68,68,0.3);
}

/* ── AI Analysis: Session Rating Badge ──────────────────── */
.video-card--ready { border-color: rgba(16,185,129,0.2); }
.session-rating {
    position: absolute;
    bottom: 4px;
    right: 4px;
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--accent);
    background: rgba(0,0,0,0.5);
    padding: 2px 5px;
    border-radius: 4px;
}
.placeholder-thumb { position: relative; }

/* ── AI Analysis: Full Report Modal ─────────────────────── */
.analysis-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.overall-badge {
    font-size: 1rem;
    color: var(--text-muted);
}
.overall-badge strong {
    font-size: 1.4rem;
    color: var(--accent);
}
.analysis-summary {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 20px;
    padding: 14px;
    border-left: 2px solid var(--accent-glow);
    background: rgba(16,185,129,0.04);
    border-radius: 0 8px 8px 0;
}
.strengths-section, .areas-section {
    margin-top: 20px;
    padding: 14px 16px;
    border-radius: 10px;
}
.strengths-section {
    background: rgba(16,185,129,0.06);
    border: 1px solid rgba(16,185,129,0.15);
}
.areas-section {
    background: rgba(245,158,11,0.06);
    border: 1px solid rgba(245,158,11,0.15);
}
.strengths-section h4 { color: var(--accent); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 10px; }
.areas-section h4 { color: #f59e0b; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 10px; }
.strengths-section ul, .areas-section ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.strengths-section li { color: #a7f3d0; font-size: 0.88rem; }
.areas-section li { color: #fde68a; font-size: 0.88rem; }
.modal-stats { margin-top: 8px; }

/* ── Pipeline Status Stepper ────────────────────────────── */
.pipeline-steps {
    margin-top: 6px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.step-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.step-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 700;
}
.step-done {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 0 6px var(--accent-glow);
}
.step-active {
    background: rgba(245,158,11,0.2);
    border: 2px solid #f59e0b;
    color: #f59e0b;
}
.step-waiting {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-glass);
}
.step-label {
    font-size: 0.78rem;
    color: var(--text-muted);
}
.step-label--active {
    color: #f59e0b;
    font-weight: 600;
}
.step-label--done {
    color: var(--accent);
}
.step-eta-row {
    margin-top: 4px;
    padding-left: 26px;
}
.step-eta {
    font-size: 0.72rem;
    font-weight: 700;
    color: #f59e0b;
    background: rgba(245,158,11,0.08);
    border: 1px solid rgba(245,158,11,0.2);
    border-radius: 100px;
    padding: 2px 8px;
}
.step-timestamp {
    display: inline-block;
    margin-left: 6px;
    font-size: 0.68rem;
    font-weight: 500;
    color: rgba(148,163,184,0.55);
    font-variant-numeric: tabular-nums;
}

/* ── Re-analyze Button ──────────────────────────────────── */
.reanalyze-btn {
    margin-top: 8px;
    padding: 5px 12px;
    border-radius: 8px;
    border: 1px solid rgba(16,185,129,0.3);
    background: rgba(16,185,129,0.08);
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}
.reanalyze-btn:hover { background: rgba(16,185,129,0.15); border-color: var(--accent); }
.reanalyze-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Section Header Row ─────────────────────────────────── */
.section-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
.section-header-row h3 { margin-bottom: 0; }

.select-mode-btn {
    padding: 5px 14px;
    border-radius: 8px;
    border: 1px solid var(--border-glass);
    background: rgba(255,255,255,0.05);
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.select-mode-btn:hover, .select-mode-btn.select-mode-active {
    background: rgba(239,68,68,0.1);
    color: #ef4444;
    border-color: rgba(239,68,68,0.3);
}

/* ── Bulk Delete Bar ────────────────────────────────────── */
.bulk-delete-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(239,68,68,0.08);
    border: 1px solid rgba(239,68,68,0.2);
    border-radius: 10px;
    padding: 10px 14px;
    margin-bottom: 12px;
    gap: 12px;
}
.bulk-delete-bar #bulkCountLabel {
    font-size: 0.85rem;
    font-weight: 600;
    color: #ef4444;
}
.bulk-actions { display: flex; gap: 8px; }

/* ── Card Checkbox ──────────────────────────────────────── */
.card-checkbox-wrap {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    cursor: pointer;
    padding-right: 4px;
}
.card-checkbox-wrap input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
    cursor: pointer;
}
.card-selected {
    border-color: rgba(239,68,68,0.4) !important;
    background: rgba(239,68,68,0.06) !important;
}
.select-mode-card { cursor: pointer; }

/* ── Color Select Dropdown ──────────────────────────────── */

.color-select {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid var(--border-glass);
    background: rgba(0,0,0,0.2);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.2s;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}
.color-select:focus {
    outline: none;
    border-color: var(--accent);
}
.color-select option {
    background: #1e293b;
    color: var(--text-primary);
}

/* ── Video Card Actions (Edit / Delete) ─────────── */
.video-card-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-left: auto;
    flex-shrink: 0;
}
.card-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: 1px solid var(--border-glass);
    background: rgba(255,255,255,0.04);
    color: var(--text-muted);
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.card-action-btn:hover { background: rgba(255,255,255,0.1); color: var(--text-primary); border-color: rgba(255,255,255,0.2); }
.delete-session-btn:hover { background: rgba(239,68,68,0.12); color: #ef4444; border-color: rgba(239,68,68,0.3); }
.edit-session-btn:hover { background: rgba(16,185,129,0.1); color: var(--accent); border-color: var(--accent-glow); }

/* ── Danger Button ──────────────────────────────── */
.danger-btn {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
    border: none;
    padding: 0.6rem 1.25rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: opacity 0.15s;
}
.danger-btn:hover { opacity: 0.85; }
.danger-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Delete Warning Modal ───────────────────────── */
.delete-warning-icon {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 0.5rem;
}
.delete-warning-title {
    text-align: center;
    font-size: 1.05rem;
    font-weight: 700;
    color: #ef4444;
    margin-bottom: 0;
}
.delete-session-label {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    padding: 8px 12px;
    font-style: italic;
}

/* ─────────────────────────────────────────────────────────────
 * Trial specific CSS
 * ───────────────────────────────────────────────────────────── */

/* Trial Callout (Login Page) */
.trial-callout {
    margin-top: 1.5rem;
    padding: 1rem 1.25rem;
    border-radius: 12px;
    background: rgba(0, 230, 118, 0.08); /* Brand Accent Green with opacity */
    border: 1px solid rgba(0, 230, 118, 0.2);
    text-align: center;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.trial-callout-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}
.trial-callout-headline {
    color: var(--accent);
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0 0 0.25rem;
}
.trial-callout-sub {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin: 0;
    line-height: 1.4;
}

/* Dashboard Trial Banner */
.trial-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    margin-bottom: 1rem;
    border-radius: 12px;
    background: rgba(0, 230, 118, 0.08);
    border: 1px solid rgba(0, 230, 118, 0.2);
    /* Avoid shrinking under flex layout */
    flex-shrink: 0; 
}

/* Dynamic Classes for Expiration */
.trial-banner.trial-expiring {
    background: rgba(245, 158, 11, 0.08); 
    border-color: rgba(245, 158, 11, 0.3);
}
.trial-banner.trial-expiring .trial-badge {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.trial-banner.trial-expired {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.3);
}
.trial-banner.trial-expired .trial-badge {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.trial-banner-content {
    display: flex;
    align-items: center;
    gap: 12px;
}
.trial-badge {
    background: rgba(0, 230, 118, 0.15);
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 800;
    padding: 4px 8px;
    border-radius: 6px;
    letter-spacing: 0.05em;
}
#trialBannerText {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}
.trial-banner-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}
.trial-dismiss {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s;
}
.trial-dismiss:hover { opacity: 1; }

/* Trial Modals */
.trial-modal {
    text-align: center;
    padding: 40px;
}
.trial-modal-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 0 0 20px rgba(0, 230, 118, 0.4);
}
.trial-modal-icon.emoji-lock {
    text-shadow: 0 0 20px rgba(239, 68, 68, 0.4);
}
.trial-modal-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}
.trial-modal-sub {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 1.5rem;
}
.trial-modal-note {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 1rem;
    font-style: italic;
}

/* ── Analytics & Trends ──────────────────────────────────── */

.analytics-trends {
    display: flex;
    flex-direction: column;
}

.time-range-pills {
    display: flex;
    gap: 8px;
    background: rgba(0, 0, 0, 0.2);
    padding: 4px;
    border-radius: 8px;
    border: 1px solid var(--border-glass);
}

.pill-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.pill-btn:hover {
    color: var(--text-primary);
}

.pill-btn.active {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 2px 8px var(--accent-glow);
}

.chart-container {
    flex: 1;
    min-height: 250px;
}

/* ── Trends Chart Legend Pills ───────────────────────────── */
.legend-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px 4px 8px;
    border-radius: 100px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.05);
    color: rgba(255,255,255,0.82);
    font-size: 0.75rem;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
    transition: opacity 0.18s, border-color 0.18s, background 0.18s;
    white-space: nowrap;
}
.legend-pill::before {
    content: '';
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--pill-color, #fff);
    flex-shrink: 0;
    box-shadow: 0 0 5px var(--pill-color, transparent);
}
.legend-pill:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.22);
}
/* Hidden/toggled-off state */
.legend-pill--hidden {
    opacity: 0.38;
    text-decoration: line-through;
    border-color: rgba(255,255,255,0.06);
    background: transparent;
}
.legend-pill--hidden::before {
    opacity: 0.3;
    box-shadow: none;
}


/* ═══════════════════════════════════════════════════════════
 * DASHBOARD V2 — Mobile-first redesign
 * ═══════════════════════════════════════════════════════════ */

/* ── Nav player name truncation ──────────────────────────── */
.nav-player-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}

/* ── Hero Profile Banner ─────────────────────────────────── */
.profile-hero {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.hero-left {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
    min-width: 0;
}

.hero-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981, #059669);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 0 16px rgba(16, 185, 129, 0.35);
    letter-spacing: -0.5px;
}

.hero-text {
    min-width: 0;
}

.hero-text h2 {
    font-size: 1.4rem;
    font-weight: 800;
    line-height: 1.15;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hero-subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 2px 0 0;
}

.hero-stats {
    display: flex;
    align-items: center;
    gap: 0;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-glass);
    border-radius: 14px;
    overflow: hidden;
    flex-shrink: 0;
}

.hero-stat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 20px;
}

.hero-stat-divider {
    width: 1px;
    height: 36px;
    background: var(--border-glass);
}

.hero-stat-val {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
}

.hero-stat-lbl {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-top: 4px;
    white-space: nowrap;
}

.hero-upload-cta {
    flex-shrink: 0;
    /* Visible on desktop, hidden on mobile (FAB is used instead) */
    display: none;
}

/* ── Mobile Tab Navigation ───────────────────────────────── */
.dash-tabs {
    display: flex;
    gap: 4px;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: 14px;
    padding: 5px;
    margin-bottom: 16px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.dash-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 12px;
    border-radius: 10px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-family: 'Outfit', sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.dash-tab.active {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 2px 12px rgba(16, 185, 129, 0.35);
}

.dash-tab svg {
    flex-shrink: 0;
}

/* ── Dashboard Grid V2 ───────────────────────────────────── */
.dashboard-grid-v2 {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.tab-panel {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.tab-panel.panel-active {
    display: flex;
}

/* Override section defaults for v2 */
.dashboard-grid-v2 section {
    padding: 24px;
    margin: 0;
}

.dashboard-grid-v2 section h3 {
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.section-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin: 0;
}

/* ── Radar Chart Card ────────────────────────────────────── */
.radar-section {
    position: relative;
}

.radar-chart-wrap {
    margin-top: 16px;
}

.radar-empty {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
    padding: 24px;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border-radius: 12px;
    z-index: 10;
}

.radar-empty-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
    color: var(--accent);
}

.radar-overall-badge {
    display: flex;
    align-items: baseline;
    gap: 2px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: 10px;
    padding: 6px 14px;
}

.radar-score {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
}

.radar-score-lbl {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* ── Sticky Mobile Upload FAB ────────────────────────────── */
.upload-fab-wrap {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 200;
    pointer-events: none;
}

.upload-fab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 100px;
    border: none;
    background: var(--accent);
    color: #fff;
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 30px rgba(16, 185, 129, 0.45);
    transition: transform 0.2s, box-shadow 0.2s;
    pointer-events: all;
    white-space: nowrap;
}

.upload-fab:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 36px rgba(16, 185, 129, 0.55);
}

.upload-fab:active {
    transform: scale(0.97);
}

/* ── Quick-stat pills removed (moved to hero) ────────────── */
.quick-stats { display: none; }
.upload-cta { display: none; }

/* Old profile-banner reset (hero replaces it) */
.profile-banner:not(.hero-compat) {
    display: none !important;
}

/* ── Match Card Improvements ─────────────────────────────── */
.video-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.video-card {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--border-glass);
    border-radius: 14px;
    padding: 14px;
    margin: 0;
    transition: border-color 0.2s, transform 0.15s;
    position: relative;
}

.video-card:hover {
    border-color: rgba(16,185,129,0.3);
    transform: translateY(-1px);
}

.video-card--ready {
    border-color: rgba(16,185,129,0.18);
}

.placeholder-thumb {
    width: 64px;
    height: 64px;
    flex-shrink: 0;
    background: rgba(255,255,255,0.04);
    border-radius: 10px;
    border: 1px solid var(--border-glass);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* ── Desktop layout (≥860px) ─────────────────────────────── */
@media (min-width: 860px) {
    .dashboard-container {
        max-width: 1280px;
        padding: 0 4%;
        padding-bottom: 40px;
    }

    .profile-hero {
        padding: 24px 28px;
        margin-bottom: 20px;
    }

    .hero-text h2 {
        font-size: 1.8rem;
    }

    /* Hide mobile tabs on desktop */
    .dash-tabs {
        display: none;
    }

    /* Show all panels simultaneously on desktop */
    .tab-panel {
        display: flex !important;
    }

    /* Show desktop upload button inside hero, hide FAB */
    .hero-upload-cta {
        display: block;
        margin-left: auto;
    }

    .upload-fab-wrap {
        display: none;
    }

    /* 3-column grid */
    .dashboard-grid-v2 {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto;
        gap: 20px;
        align-items: start;
    }

    .grid-col-left {
        grid-column: 1;
        grid-row: 1 / 3;
    }

    .grid-col-right {
        grid-column: 2;
        grid-row: 1;
    }

    .grid-col-trends {
        grid-column: 1 / -1;
        grid-row: 3;
    }

    .radar-chart-wrap {
        height: 320px !important;
    }
}

@media (min-width: 1100px) {
    /* 3-col true grid */
    .dashboard-grid-v2 {
        grid-template-columns: 1fr 1fr 1fr;
    }

    .grid-col-left {
        grid-column: 1;
        grid-row: 1;
    }

    .grid-col-right {
        grid-column: 2;
        grid-row: 1;
    }

    .grid-col-trends {
        grid-column: 3;
        grid-row: 1;
    }

    .grid-col-trends .chart-container {
        height: 260px;
    }

    /* Trends chart height override for sidebar */
    .grid-col-trends .analytics-trends canvas {
        max-height: 260px;
    }
}

/* Ensure main content doesn't get cut behind FAB on mobile */
@media (max-width: 859px) {
    .dashboard-container {
        padding-bottom: 88px;
    }
}
