.page {
    justify-content: flex-start !important;
}


/* Эффект для карточек игроков в составе */
.player-card {
    transition: all 0.2s ease-in-out;
}
.player-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color) !important; /* Подсветка рамки основным цветом */
}

.app-sidebar {
    display: flex;
    flex-direction: column;
}

.main-sidebar {
    flex-grow: 1; 
}

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid #e9edf4; 
    flex-shrink: 0; 
}

.side-menu__item_custom {
    padding: 0.65rem 0.75rem;
    position: relative;
    display: flex;
    align-items: center;
    text-decoration: none;
    font-size: 0.85rem;
    color: var(--menu-prime-color);
    font-weight: 500;
    border: 1px solid transparent;
    border-radius: 0.25rem;
}

.form-circle { display: inline-flex; width: 22px; height: 22px; border-radius: 50%; align-items: center; justify-content: center; color: white; font-size: 0.8em; margin: 0 1px; }
.form-win { background-color: #28a745; } 
.form-loss { background-color: #dc3545; }
.form-draw { background-color: #6c757d; }

/* Стили для авт/* Стили для авто-генерируемых аватаров-заглушек */
.avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    border-radius: inherit; /* Наследует скругление от родителя */
    color: white;
    font-size: 1.25rem;
    font-weight: 600;
    text-transform: uppercase; /* <-- Это свойство делает букву заглавной */
}

/* 5 вариантов градиентов для фона */
.avatar-bg-1 { background: linear-gradient(135deg, #FF6B6B, #FFC371); }
.avatar-bg-2 { background: linear-gradient(135deg, #6B8DFF, #71FFC3); }
.avatar-bg-3 { background: linear-gradient(135deg, #8E2DE2, #4A00E0); }
.avatar-bg-4 { background: linear-gradient(135deg, #11998e, #38ef7d); }
.avatar-bg-5 { background: linear-gradient(135deg, #f7971e, #ffd200); }

/* Стили для больших заглушек на карточках (например, на странице leagues_list) */
.avatar-placeholder-lg {
    width: 80px;
    height: 80px;
    font-size: 2.5rem;
    border-radius: 8px;
}

.card-img-top-container {
    height: 150px; /* This sets a fixed height for the image area */
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa; /* A light background for any empty space */
}

/* Styles for the image OR the placeholder inside the container */
.card-img-top-container img,
.card-img-top-container .avatar-placeholder {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain; /* This is the key: it scales the image to fit without distortion */
}

/* Styles for the large placeholder avatar on cards */
.avatar-placeholder-lg {
    width: 80px;
    height: 80px;
    font-size: 2.5rem;
    border-radius: 8px;
}

.app-sidebar .main-sidebar-header .header-logo img {
    height: 2.5rem;
}

/* Контейнер таблицы должен позволять прокрутку */
.table-responsive {
    overflow-x: auto;
}

.table-sticky-columns {
    border-collapse: separate; /* Необходимо для работы sticky */
}

/* Общие стили для "липких" ячеек */
.table-sticky-columns th:first-child,
.table-sticky-columns td:first-child,
.table-sticky-columns th:nth-child(2),
.table-sticky-columns td:nth-child(2) {
    position: -webkit-sticky;
    position: sticky;
    z-index: 1;
}

/* Первая колонка (#) */
.table-sticky-columns th:first-child,
.table-sticky-columns td:first-child {
    left: 0;
    z-index: 2; /* Должна быть поверх второй колонки */
}

/* Вторая колонка (Команда) */
.table-sticky-columns th:nth-child(2),
.table-sticky-columns td:nth-child(2) {
    left: 45px; /* Ширина первой колонки, подберите по своему вкусу */
}

/* Важно: задаем фон, чтобы текст под "липкими" ячейками не просвечивал */
.table-sticky-columns thead th {
    background: #f8f9fa; /* Цвет фона заголовка из вашей темы */
}
.table-sticky-columns tbody td {
    background: var(--bs-table-bg, #fff); /* Фон ячеек таблицы */
}

.landing-body .section-bg-2 {
    background-color: #eeefef;
}

.img-fluid {
    max-height: 320px;
}

.text-stat-page a {
    color: rgb(var(--info-rgb));
    text-decoration: underline;
    text-decoration-color: rgba(var(--info-rgb), 0.25);
    text-underline-offset: 0.25em;
    transition: text-decoration-color 0.2s ease-in-out;
}

.text-stat-page a:hover {
    text-decoration-color: rgba(var(--info-rgb), 1);
}

.h2, h2 {
    font-size: calc(1.325rem + .2vw);
}

.card-icon {
    display: inline-block;
    width: 12px;
    height: 16px;
    border-radius: 2px;
    vertical-align: middle;
}

.card-icon.yellow { background-color: #ffc107; }
.card-icon.red { background-color: #dc3545; }

/* Стили для иконок карточек */
    .card-icon {
        display: inline-block;
        width: 12px;
        height: 16px;
        border-radius: 2px;
        vertical-align: middle;
    }
    .card-icon.yellow { background-color: #ffc107; }
    .card-icon.red { background-color: #dc3545; }

    /* Новые стили для нашего кастомного таймлайна */
    .timeline-chat-container {
        padding: 1rem;
    }
    .timeline-half {
        text-align: center;
        font-weight: 600;
        font-size: 0.8rem;
        color: var(--text-muted);
        text-transform: uppercase;
        margin: 1.5rem 0;
    }
    .timeline-event-row {
        display: flex;
        margin-bottom: 1rem;
    }
    .event-bubble {
        padding: 0.5rem 0.75rem;
        border-radius: 0.5rem;
        max-width: 320px;
    }
    .bubble-left {
        background-color: var(--light);
        margin-left: 0.75rem;
    }
    .bubble-right {
        background-color: var(--primary-transparent);
        margin-right: 0.75rem;
        text-align: right;
    }
    .event-player-time {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 0.25rem;
    }
    .bubble-right .event-player-time {
        flex-direction: row-reverse;
    }
    .event-minute {
        font-size: 0.8rem;
        font-weight: 500;
        color: var(--text-muted);
    }
    .event-description {
        display: flex;
        align-items: center;
        font-size: 0.9rem;
    }
    .bubble-right .event-description {
        justify-content: flex-end;
    }
    .event-assistant {
        font-size: 0.8rem;
        color: var(--text-muted);
        margin-top: 0.25rem;
    }
.avatar img {
    width: auto;
}

/* Kanban Board Container */
.bracket-kanban-wrapper {
    overflow-x: auto;
    overflow-y: hidden;
    padding: 1.5rem 0;
    margin: 0 -1rem;
}

.ZYNIX-kanban-board {
    display: flex;
    gap: 1.5rem;
    min-width: max-content;
    padding: 0 1rem;
}

/* Kanban Column */
.kanban-round-column {
    width: 350px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

/* Round Header */
.round-header-custom {
    background: linear-gradient(135deg, var(--primary-color) 0%, #5a67d8 100%);
    color: white;
    padding: 1rem 1.25rem;
    border-radius: 8px 8px 0 0;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Matches Container */
.kanban-matches-container {
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 0 0 8px 8px;
    border: 1px solid #e9ecef;
    border-top: none;
    min-height: 200px;
}

/* Match Card */
.match-kanban-card {
    background: white;
    border-radius: 8px;
    margin-bottom: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.06);
    transition: all 0.2s;
    overflow: hidden;
}

.match-kanban-card:last-child {
    margin-bottom: 0;
}

.match-kanban-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}

/* Match Header with Status */
.match-header {
    padding: 0.75rem 1rem;
    background: linear-gradient(to right, #f8f9fa, white);
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.match-number {
    font-size: 0.75rem;
    color: #6c757d;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Team Rows */
.team-row {
    padding: 1rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
    position: relative;
}

.team-row:first-of-type {
    border-bottom: 2px solid #f0f0f0;
}

.team-row.winner {
    background: linear-gradient(90deg, #d4edda 0%, #f8f9fa 100%);
}

.team-row.winner::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #28a745;
}

.team-row.tbd {
    background: #fafafa;
    opacity: 0.7;
}

.team-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.team-avatar {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.team-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: #212529;
}

.team-name.tbd {
    color: #adb5bd;
    font-style: italic;
    font-weight: 400;
}

/* Score Display */
.match-score-display {
    font-size: 1.75rem;
    font-weight: 800;
    color: #495057;
    min-width: 45px;
    text-align: center;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

.match-score-display.winner-score {
    color: #28a745;
}

/* Match Footer */
.match-footer {
    padding: 0.875rem 1rem;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.match-datetime {
    font-size: 0.8rem;
    color: #6c757d;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Badges */
.badge-live-pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { 
        opacity: 1;
        transform: scale(1);
    }
    50% { 
        opacity: 0.8;
        transform: scale(1.05);
    }
}

/* Winner Crown */
.winner-crown {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
}

/* Empty state */
.empty-matches {
    text-align: center;
    padding: 2rem;
    color: #6c757d;
}

.tab-content .tab-pane {
    padding: 0;
}

/* Cookie Consent Banner — добавить в конец core/static/core/css/custom.css */

.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--custom-white, #fff);
    border-top: 1px solid var(--default-border, #e9ebec);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
    z-index: 1060;
    transition: opacity 0.3s ease;
}

[data-theme-mode="dark"] .cookie-consent-banner {
    background: var(--custom-white, #1a1d21);
    border-top-color: var(--default-border, #2b2f33);
}

/* Lighthouse: improve contrast ratio for WCAG AA */
.landing-body .text-muted {
    color: #525960 !important;
}
.landing-footer .op-6 {
    opacity: 0.75 !important;
}