/* Загальні стилі */
.statistics-page
{
    background-color: #fff;
    padding: 20px;
}
.statistics-container {
    margin: 20px auto;
    max-width: 1200px;
    padding: 15px;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.statistics-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.statistics-header h1 {
    font-size: 24px;
    font-weight: bold;
    color: #333;
}

.statistics-header .filter {
    display: flex;
    align-items: center;
    gap: 10px;
}

.statistics-header .filter select {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
    background: #fff;
}

/* Таблиця статистики */
.statistics-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.statistics-table th,
.statistics-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.statistics-table th {
    background-color: #007bff;
    color: #fff;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 14px;
}

.statistics-table td {
    font-size: 14px;
    color: #555;
}

.statistics-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

/* Стільки для логотипів */
.statistics-table .team-logo {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
}

.statistics-table .team-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Сортування за колонками */
.statistics-table th.sortable {
    cursor: pointer;
    position: relative;
}

.statistics-table th.sortable:hover {
    background-color: #0056b3;
}

.statistics-table th.sortable::after {
    content: '';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-top-color: #fff;
}

.statistics-table th.sortable.sorted-asc::after {
    border-top-color: transparent;
    border-bottom-color: #fff;
}

.statistics-table th.sortable.sorted-desc::after {
    border-top-color: #fff;
}


.team-row {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.team-row:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.team-logo {
    flex: 0 0 64px;
    height: 64px;
    width: 64px;
    margin-right: 15px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #007bff;
    background-color: #f9f9f9;
}

.team-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.team-details {
    flex: 1;
    width: 100%;
}

.team-name {
    margin: 0 0 10px;
    font-size: 20px;
    font-weight: bold;
    color: #007bff;
    text-transform: capitalize;
}

.team-name a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s;
}

.team-name a:hover {
    color: #0056b3;
}

.team-statistics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    font-size: 14px;
    color: #555;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-row .stat-label {
    font-weight: bold;
    color: #333;
}

.stat-row .stat-value {
    font-size: 14px;
    font-weight: normal;
    color: #007bff;
    text-align: right;
}

/* Адаптивність */
@media (max-width: 768px) {
    .statistics-filter
    {
        text-align: right;
    }
    .team-row {
        flex-direction: column;
        align-items: flex-start;
        padding: 10px;
    }

    .team-logo {
        margin-bottom: 10px;
    }

    .team-statistics {
        grid-template-columns: 1fr;
    }
}

.statistics-filter {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 14px;
    margin: 0 0 24px;
    padding: 18px 20px;
    background: #121821;
    border: 1px solid rgba(166, 215, 25, 0.22);
    border-radius: 6px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.statistics-filter label {
    margin: 0;
    color: #f6f5f5;
    font-family: var(--title-font, "Unbounded", sans-serif);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
}

.statistics-filter select {
    width: min(100%, 360px);
    min-height: 48px;
    padding: 0 48px 0 18px;
    color: #f6f5f5;
    font-family: var(--body-font, "Poppins", sans-serif);
    font-size: 15px;
    font-weight: 600;
    line-height: 48px;
    background-color: #1c2430;
    background-image:
        linear-gradient(45deg, transparent 50%, #a6d719 50%),
        linear-gradient(135deg, #a6d719 50%, transparent 50%);
    background-position:
        calc(100% - 22px) 21px,
        calc(100% - 15px) 21px;
    background-size: 7px 7px, 7px 7px;
    background-repeat: no-repeat;
    border: 1px solid rgba(246, 245, 245, 0.12);
    border-radius: 6px;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}

.statistics-filter select:hover,
.statistics-filter select:focus {
    background-color: #202a37;
    border-color: #a6d719;
    box-shadow: 0 0 0 3px rgba(166, 215, 25, 0.14);
}

.statistics-filter select option {
    color: #f6f5f5;
    background-color: #1c2430;
}

@media (max-width: 768px) {
    .statistics-filter {
        align-items: stretch;
        flex-direction: column;
        gap: 10px;
        padding: 16px;
        text-align: left;
    }

    .statistics-filter select {
        width: 100%;
    }
}
