/* Аналитика команд - dark theme, compact */
.analytics-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
    padding: 1rem 0;
    border-bottom: 2px solid #1e3a5f;
}
.analytics-header-main {
    text-align: center;
    flex: 1;
    min-width: 0;
}
.analytics-header-actions {
    flex-shrink: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}
.analytics-header .btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.5rem 1rem;
    margin: 0;
    font-size: 0.9rem;
    font-weight: 500;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    background: #10b981;
    color: white;
}

.analytics-header .btn:hover {
    background: #059669;
}

.analytics-header .btn:disabled {
    background: #64748b;
    cursor: not-allowed;
}
.analytics-header h1 {
    font-size: 1.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
    background: linear-gradient(135deg, #60a5fa, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.analytics-header p {
    color: #9ca3af;
    margin: 0;
    font-size: 0.85rem;
}

.analytics-stats {
    margin-bottom: 1rem;
}
.analytics-stats-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}
.analytics-stat-card {
    flex: 1;
    min-width: 200px;
    max-width: 320px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.75rem;
    background: linear-gradient(145deg, #1e293b, #0f172a);
    border: 1px solid #334155;
    border-radius: 8px;
    font-size: 0.8rem;
}
.analytics-stat-name {
    font-weight: 600;
    color: #f1f5f9;
    min-width: 120px;
}
.analytics-stat-wins {
    color: #22c55e;
}
.analytics-stat-losses {
    color: #f87171;
}

.teams-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    margin-bottom: 1rem;
}

.analytics-team-card {
    flex: 1;
    min-width: 200px;
    max-width: 320px;
    background: linear-gradient(145deg, #1e293b, #0f172a);
    border: 1px solid #334155;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    transition: border-color 0.2s;
}
.analytics-team-card:hover {
    border-color: #3b82f6;
}

.analytics-team-header {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #1e3a5f;
}
.analytics-team-header .team-select-wrapper {
    flex: 1;
    min-width: 0;
}
.analytics-team-header select {
    width: 100%;
    padding: 0.4rem 0.6rem;
    font-size: 0.8rem;
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 6px;
    color: #e5e7eb;
}
.analytics-team-header select option {
    background: #1e293b;
    color: #e5e7eb;
}
.analytics-players {
    font-size: 0.8rem;
}
.analytics-player {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0;
    border-bottom: 1px solid #334155;
}
.analytics-player-info {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    flex-wrap: wrap;
}
.analytics-departed-block {
    margin-top: 0.75rem;
    border-top: 1px dashed #475569;
    background: rgba(71, 85, 105, 0.2);
    border-radius: 6px;
    padding: 0.5rem 0.5rem 0.25rem;
    margin-left: -0.25rem;
    margin-right: -0.25rem;
}
.analytics-departed-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: #94a3b8;
    margin: 0 0 0.35rem 0;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid #475569;
}
.analytics-player-inactive {
    color: #94a3b8;
    font-size: 0.75em;
    font-style: italic;
    background: #334155;
    padding: 1px 4px;
    border-radius: 8px;
}
.analytics-player-first-season {
    color: #4ade80;
    font-size: 0.75em;
    font-style: italic;
    background: rgba(34, 197, 94, 0.2);
    padding: 1px 4px;
    border-radius: 8px;
    white-space: nowrap;
}
.analytics-player-prev {
    color: #64748b;
    font-size: 0.8em;
    font-style: italic;
}
.analytics-player-new {
    color: #f59e0b;
    font-size: 0.8em;
    font-style: italic;
}
.analytics-player-seasons {
    color: #64748b;
    font-size: 0.8em;
    font-style: italic;
}
.analytics-player-departed {
    color: #94a3b8;
}
.analytics-player-departed .analytics-player-name--departed {
    color: #64748b;
}
.analytics-player-link {
    color: #f1f5f9;
    text-decoration: none;
}
.analytics-player-link:hover {
    color: #60a5fa;
}
.analytics-player-departed .analytics-player-link {
    color: #64748b;
}
.analytics-player-departed .analytics-player-link:hover {
    color: #94a3b8;
}
.analytics-player-num--departed {
    background: transparent !important;
    border: 1px solid #64748b;
    color: #94a3b8 !important;
}
.analytics-player-num {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    background: rgba(59, 130, 246, 0.4);
    color: #e5e7eb;
    border-radius: 50%;
    font-size: 0.7rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.analytics-matches-section {
    background: linear-gradient(145deg, #1e293b, #0f172a);
    border: 1px solid #334155;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    margin-top: 0.75rem;
}
.analytics-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 0.25rem 0;
    margin-bottom: 0.25rem;
    border-bottom: 1px solid #1e3a5f;
}
.analytics-section-header h2 {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0;
    color: #94a3b8;
}
.analytics-section-header button {
    background: none;
    border: none;
    color: #60a5fa;
    font-size: 1rem;
    cursor: pointer;
    padding: 0 0.25rem;
}
.analytics-section-content {
    font-size: 0.8rem;
}
.analytics-season-divider {
    margin-top: 0.5rem;
    margin-bottom: 0.25rem;
}
.analytics-season-divider:first-child {
    margin-top: 0;
}
.analytics-season-divider h3 {
    font-size: 0.75rem;
    font-weight: 600;
    color: #60a5fa;
    margin: 0 0 0.25rem 0;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.analytics-match-item {
    padding: 0.15rem 0;
}
.analytics-match-item p {
    margin: 0;
    color: #cbd5e1;
}
.analytics-match-link {
    color: #60a5fa;
    text-decoration: underline;
}
.analytics-match-link:hover {
    color: #93c5fd;
}

.analytics-muted {
    color: #9ca3af;
}
.analytics-error {
    color: #f87171;
}

@media (max-width: 768px) {
    .analytics-header {
        flex-direction: column;
        text-align: center;
    }
    .analytics-header-main {
        text-align: center;
    }
    .analytics-header h1 {
        font-size: 1.4rem;
    }
    .analytics-team-card,
    .analytics-stat-card {
        min-width: 100%;
        max-width: none;
    }
}
