/* Основные стили для сайта ODP Site */
:root {
    --primary-color: #5cb85c;
    --secondary-color: #343a40;
    --accent-color: #007bff;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --danger-color: #d9534f;
    --warning-color: #ffc107;
    
    /* Переменные для темной темы */
    --background-color: #121212;
    --text-color: #e5e5e5;
    --card-bg: #1e1e1e;
    --navbar-bg: #1a1a1a;
    --navbar-color: #e5e5e5;
    --footer-bg: #1a1a1a;
    --footer-color: #e5e5e5;
    --mobile-footer-link-color: #e5e5e5;
    --border-color: #333333;
    --hover-bg: #333333;
    --muted-text: #adb5bd;
    --secondary-bg: #2d2d2d;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: var(--background-color);
    color: var(--text-color);
    font-family: 'Roboto', Arial, sans-serif;
}

main {
    flex: 1;
}

.site-shell {
    width: min(100% - 2rem, 1720px);
    margin-inline: auto;
}

.site-shell > .container,
.site-shell > .container-fluid {
    max-width: none;
    padding-inline: 0;
}

@media (max-width: 575.98px) {
    .site-shell {
        width: min(100% - 1rem, 1720px);
    }
}

/* Стили для навигации */
.navbar {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    background-color: var(--navbar-bg) !important;
}

.navbar > .site-shell {
    display: flex;
    flex-wrap: inherit;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.navbar .navbar-collapse {
    min-width: 0;
}

.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
}

.navbar-brand .brand-icon {
    margin-right: 0.5rem;
    font-size: 1.5rem;
}

.nav-link {
    font-weight: 500;
    position: relative;
    transition: color 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    white-space: nowrap;
}

.nav-link i {
    line-height: 1;
}

.nav-link-button {
    border: 0;
    padding-inline: var(--bs-navbar-nav-link-padding-x);
    padding-block: var(--bs-navbar-nav-link-padding-y);
    color: inherit;
}

.navbar .nav-item form {
    display: flex;
}

.navbar .navbar-nav {
    row-gap: 0.25rem;
}

@media (min-width: 992px) {
    .navbar .navbar-collapse {
        display: flex !important;
        justify-content: flex-end;
    }

    .navbar .navbar-nav {
        width: 100%;
        flex-wrap: wrap;
        justify-content: flex-end;
        align-items: center;
        column-gap: 0.15rem;
    }
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link:focus::after,
.nav-link:focus-visible::after {
    width: 100%;
}

/* Стили для карточек */
.card {
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    margin-bottom: 1.5rem;
    overflow: hidden;
    background-color: var(--card-bg);
    border-color: #2d2d2d;
}

.card-header {
    border-bottom: none;
    padding: 1rem 1.25rem;
}

.card-title {
    margin-bottom: 0;
}

/* Стили для команд */
.text-success {
    color: #28a745 !important;
}

.text-danger {
    color: #dc3545 !important;
}

/* Стили для таблиц */
.table {
    margin-bottom: 0;
    color: #e9ecef;
}

.table th {
    font-weight: 600;
    background-color: #1e1e1e;
    color: #e9ecef;
    border-color: #2d2d2d;
}

.table td {
    border-color: #2d2d2d;
}

.table-hover tbody tr:hover {
    background-color: rgba(0, 123, 255, 0.05);
}

/* Стили для кнопок */
.btn {
    border-radius: 0.25rem;
    padding: 0.5rem 1rem;
    font-weight: 500;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

.btn-outline-primary, .btn-outline-success {
    background-color: transparent;
}

.btn-outline-primary:hover {
    background-color: #007bff;
    color: white;
}

.btn-outline-success:hover {
    background-color: #28a745;
    color: white;
}

/* Focus styles for buttons */
.btn:focus,
.btn:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    box-shadow: 0 0 0 3px rgba(92, 184, 92, 0.3);
}

.btn-outline-primary:focus,
.btn-outline-primary:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.3);
}

.btn-outline-success:focus,
.btn-outline-success:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    box-shadow: 0 0 0 3px rgba(92, 184, 92, 0.3);
}

/* Focus styles for form controls */
input:focus,
input:focus-visible,
select:focus,
select:focus-visible,
textarea:focus,
textarea:focus-visible,
.form-control:focus,
.form-control:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.3);
}

/* Стили для футера */
footer {
    margin-top: 2rem;
    box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.05);
    background-color: var(--footer-bg);
    color: var(--footer-color);
}

footer a {
    text-decoration: none;
    color: #e9ecef !important;
}

footer a:hover {
    text-decoration: underline;
}

/* Focus styles for footer links */
footer a:focus,
footer a:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    box-shadow: 0 0 0 3px rgba(92, 184, 92, 0.3);
    text-decoration: underline;
}

footer h5,
footer p,
footer .social-icons a,
footer .list-unstyled li a,
footer i.fab,
footer i.fas {
    color: #e9ecef !important;
}

.pwa-install-btn {
    position: fixed;
    right: 1rem;
    bottom: max(1rem, env(safe-area-inset-bottom));
    z-index: 1030;
    display: none;
    max-width: min(12rem, calc(100vw - 2rem));
    padding: 0.6rem 0.9rem;
    border-radius: 0.5rem;
    box-shadow: 0 0.75rem 1.5rem rgba(0, 0, 0, 0.35);
    font-weight: 600;
    white-space: normal;
}

@media (max-width: 575.98px) {
    body {
        padding-bottom: calc(8.5rem + env(safe-area-inset-bottom));
    }

    .pwa-install-btn {
        right: 0.75rem;
        left: auto;
        bottom: calc(4.75rem + env(safe-area-inset-bottom));
        width: 44px;
        height: 44px;
        max-width: 44px;
        padding: 0;
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
    }

    .pwa-install-btn .pwa-install-text {
        display: none;
    }

    .pwa-install-btn i {
        margin: 0 !important;
    }
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .team-image {
        max-width: 100%;
        height: auto;
    }
    
    .team-logo {
        max-width: 400px;
        max-height: 67px;
        width: 100%;
        height: auto;
        aspect-ratio: 6/1;
    }
    
    .placeholder-team {
        max-width: 400px;
        max-height: 67px;
        width: 100%;
        height: auto;
        aspect-ratio: 6/1;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
        border-radius: 8px;
        border: 3px solid rgba(255, 255, 255, 0.1);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 20px;
        font-weight: bold;
        text-align: center;
    }
    
    .card-header h2 {
        font-size: 1.5rem;
    }
    
    .card-header h3 {
        font-size: 1.25rem;
    }
    
    .card-title {
        font-size: 1.25rem;
    }
    
    .table th, .table td {
        padding: 0.5rem;
        font-size: 0.875rem;
    }
}

/* Стили для изображений команд */
.team-image {
    max-width: 100%;
    height: auto;
    overflow: visible;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.team-logo {
    max-width: 600px;
    max-height: 72px;
    width: 100%;
    height: auto;
    aspect-ratio: 6/1;
    object-fit: contain;
}

.match-team-logo {
    width: clamp(96px, 8vw, 140px);
    height: clamp(64px, 6vw, 96px);
    object-fit: contain;
    background: rgba(255,255,255,0.03);
    border-radius: 6px;
    padding: 4px;
    flex-shrink: 0;
}
#matches-table tbody tr { cursor: pointer; transition: background-color .15s ease; }
#matches-table tbody tr:hover { background-color: rgba(255,255,255,0.04); }

/* ========== Двухрядный match-блок (имена → фото героев → время) ========== */
.match-block {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 360px;
    padding: 6px 4px;
}
.match-teams-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 8px;
    text-align: center;
}
.team-name-cell {
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.2;
    word-break: break-word;
    white-space: normal;
}
.vs-sep {
    color: #adb5bd;
    font-size: 0.8rem;
    font-weight: 500;
    padding: 0 4px;
}
.match-heroes-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    align-items: end;
}
.hero-col {
    position: relative;
    display: flex;
    justify-content: center;
}
.hero-col .match-team-logo {
    width: 100%;
    max-width: 180px;
    height: auto;
    aspect-ratio: 5/1;
    object-fit: contain;
    background: rgba(255,255,255,0.03);
    border-radius: 6px;
    padding: 3px;
    transition: transform .2s ease, box-shadow .2s ease;
}
.hero-col .match-team-logo.team-won {
    box-shadow: 0 0 0 2px #ffc107, 0 0 14px rgba(255, 193, 7, 0.35);
}
.team-name-cell.team-won::after {
    content: " 🏆";
}
.match-crown {
    position: absolute;
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.4rem;
    filter: drop-shadow(0 2px 3px rgba(0,0,0,0.6));
    z-index: 3;
    pointer-events: none;
}
.match-time-row {
    font-size: 0.75rem;
    color: #adb5bd;
    text-align: center;
    padding-top: 2px;
    border-top: 1px dashed #2a2a2a;
}

/* Таблица должна скроллиться по горизонтали при длинных именах команд */
.table-responsive { overflow-x: auto; }
#matches-table {
    min-width: 1100px;
    table-layout: auto;
}
#matches-table td, #matches-table th {
    vertical-align: middle;
    word-break: break-word;
}
/* Первая колонка (матч) — фиксированная минимальная ширина с переносом длинных имён */
#matches-table td:first-child .fw-bold { white-space: normal; word-break: break-word; line-height: 1.2; }
#matches-table td:first-child { min-width: 380px; }

.placeholder-team {
    max-width: 600px;
    max-height: 72px;
    width: 100%;
    height: auto;
    aspect-ratio: 6/1;
    background-color: #2b323a;
    color: #ecf0f1;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 8px;
    font-size: 24px;
    font-weight: bold;
    text-transform: uppercase;
    animation: none;
}

/* Стили для имен команд */
.team-name {
    font-weight: bold;
    text-align: center;
    margin-top: 5px;
}

/* Стили для команд Radiant и Dire */
.team-radiant {
    color: #5cb85c !important; /* Зеленый цвет для Radiant */
}

.team-dire {
    color: #d9534f !important; /* Красный цвет для Dire */
}

/* Стили для мобильной версии карточек */
.prediction-card {
    border-radius: 8px;
    box-shadow: 0 0.125rem 0.45rem rgba(0, 0, 0, 0.12);
    overflow: hidden;
    margin-bottom: 15px;
    background-color: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.prediction-card[role="link"]:focus-visible {
    outline: 3px solid #8fd19e;
    outline-offset: 3px;
}

.prediction-card-header {
    background-color: var(--navbar-bg) !important;
    color: var(--navbar-color);
    padding: 0.55rem 0.8rem;
}

.mobile-section {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--card-bg);
}

.mobile-section:last-child {
    border-bottom: none;
}

.team-vs-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.team-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 45%;
}

.vs-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 10%;
    margin-top: -15px;
}

.vs-text {
    font-weight: bold;
    font-size: 1.2rem;
    color: #ced4da !important;
}

.mobile-prediction-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.mobile-prediction-label {
    font-weight: 600;
    width: 40%;
    color: #e9ecef !important;
}

.mobile-prediction-value {
    text-align: right;
    width: 60%;
}

.section-title {
    font-weight: bold;
    margin-bottom: 0.75rem;
    color: #e9ecef !important;
    font-size: 1rem;
}

.percentage-label {
    font-size: 0.9rem;
    margin-bottom: 5px;
    color: #e9ecef !important;
}

.percentage-label strong {
    font-weight: 600;
    color: #e9ecef !important;
}

/* Стили для прогресс-баров (синергия и контр-пики) */
.progress-container {
    height: 10px;
    background-color: #2d2d2d !important;
    border-radius: 5px;
    position: relative;
    margin: 0.5rem 0;
    overflow: hidden;
}

.progress-marker {
    position: absolute;
    width: 2px;
    height: 100%;
    background-color: #fff;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
}

.team-radiant-progress {
    position: absolute;
    height: 100%;
    background-color: #28a745 !important;
    left: 0;
    width: 0;
}

.team-dire-progress {
    position: absolute;
    height: 100%;
    background-color: #dc3545 !important;
    right: 0;
    width: 0;
}

/* Стили для отображения процентов под прогресс-барами в мобильной версии */
.mobile-stats-section-compact .d-flex.justify-content-between small {
    font-size: 0.75rem;
    color: #adb5bd !important;
    font-weight: 500;
}

/* Цвет для времени и бета-предсказаний */
.time-display, 
.beta-prediction-label, 
.neutral-text,
#last-update-time,
small strong,
.mobile-stats-title,
.stats-title-label {
    color: #e9ecef !important;
    font-weight: 500;
}

/* Заголовок страницы */
.page-title {
    position: relative;
    padding-bottom: 10px;
    margin-bottom: 25px;
    color: #e9ecef;
    font-weight: 600;
    background-color: #121212 !important;
}

.page-title:after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 3px;
    background-color: #5cb85c;
}

/* Стили для новой мобильной панели футера */
.mobile-footer {
    border-top: 1px solid var(--border-color);
    z-index: 100;
    background-color: var(--navbar-bg);
}

.mobile-footer .row {
    flex-wrap: nowrap;
    margin-inline: 0;
}

.mobile-footer .col {
    min-width: 0;
    padding-inline: 0.125rem;
}

.mobile-footer a {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 0;
    color: var(--mobile-footer-link-color);
    min-width: 0;
}

.mobile-footer a i {
    font-size: 1.2rem;
    margin-bottom: 4px;
    color: var(--mobile-footer-link-color);
}

.mobile-footer a small {
    font-size: 0.7rem;
    color: var(--mobile-footer-link-color);
    line-height: 1.1;
    white-space: normal;
    overflow-wrap: anywhere;
}

@media (max-width: 380px) {
    .mobile-footer a small { font-size: 0.62rem; }
    .mobile-footer a i { font-size: 1.05rem; }
}

/* Focus styles for mobile footer links */
.mobile-footer a:focus,
.mobile-footer a:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    box-shadow: 0 0 0 3px rgba(92, 184, 92, 0.3);
    background-color: rgba(92, 184, 92, 0.1);
}

/* Добавляем отступ для основного контента, чтобы он не перекрывался мобильным футером */
@media (max-width: 992px) {
    body {
        padding-bottom: 56px; /* Высота мобильного футера */
    }

    /* Основной футер на мобильных виден только когда пролистываем до конца */
    footer:not(.mobile-footer) {
        margin-bottom: 40px;
    }
}

/* Стили для индикатора автообновления */
.update-time {
    font-size: 0.8rem;
    color: #e9ecef !important;
}

/* Стили для компактного отображения команд в таблице */
.team-container-compact {
    min-width: 80px;
}

.team-name-compact {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
    margin: 0 auto;
}

.team-image-compact {
    display: flex;
    justify-content: center;
    align-items: center;
}

.team-logo-compact {
    border-radius: 4px;
    transition: transform 0.2s ease;
}

.team-logo-compact:hover {
    transform: scale(1.1);
}

.placeholder-team-compact {
    transition: transform 0.2s ease;
}

.placeholder-team-compact:hover {
    transform: scale(1.1);
}

.vs-container-compact {
    opacity: 0.7;
}

/* Ограничиваем ширину колонки "Матч" */
.matches-table td:first-child {
    width: 280px;
    max-width: 280px;
    min-width: 260px;
}

.update-time {
    color: #95a5a6;
    font-size: 0.8rem;
}

/* Стили для вертикальной раскладки команд с увеличенными изображениями */
.team-container-vertical {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 120px;
}

.team-image-vertical {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 100%;
    height: auto;
}

.team-logo-large {
    transition: transform 0.3s ease, box-shadow 0.3s ease, filter 0.3s ease;
    border-radius: 6px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    max-width: 600px;
    max-height: 100px;
    width: 100%;
    height: auto;
    aspect-ratio: 6/1;
    object-fit: cover;
}

.team-logo-large:hover {
    transform: scale(1.3);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.3);
    filter: brightness(1.1);
    z-index: 20;
    position: relative;
}

.placeholder-team-large {
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease, filter 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    max-width: 600px;
    max-height: 100px;
    width: 100%;
    height: auto;
    aspect-ratio: 6/1;
    background-color: #2c3e50;
    color: #ecf0f1;
    border-radius: 6px;
    font-size: 14px;
    font-weight: bold;
}

.placeholder-team-large:hover {
    transform: scale(1.3);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.3);
    filter: brightness(1.1);
    z-index: 20;
    position: relative;
}

.vs-container-overlay {
    position: absolute;
    z-index: 10;
    background: rgba(0, 0, 0, 0.85) !important;
    border-radius: 18px;
    padding: 4px 10px;
    backdrop-filter: blur(3px);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.vs-container-overlay .vs-text {
    color: #fff !important;
    font-weight: bold;
    font-size: 0.9rem;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.9);
    letter-spacing: 1px;
}

/* Адаптация высоты строк таблицы для новой раскладки */
.table td.align-middle {
    vertical-align: middle !important;
    padding: 0.5rem;
}

/* Стили для темной темы */
body[data-theme="dark"] .vs-container-overlay {
    background: rgba(255, 255, 255, 0.9) !important;
}

body[data-theme="dark"] .vs-container-overlay .vs-text {
    color: #000 !important;
    text-shadow: 1px 1px 3px rgba(255, 255, 255, 0.8);
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .team-logo-large {
        max-width: 400px;
        max-height: 67px;
        width: 100%;
        height: auto;
        aspect-ratio: 6/1;
    }
    
    .placeholder-team-large {
        max-width: 400px;
        max-height: 67px;
        width: 100%;
        height: auto;
        aspect-ratio: 6/1;
        font-size: 12px !important;
    }
    
    /* Убираем hover эффекты на мобильных */
    .team-logo-large:hover,
    .placeholder-team-large:hover {
        transform: none;
        box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
        filter: none;
        z-index: auto;
    }
    
    .vs-container-overlay {
        padding: 3px 8px !important;
    }
    
    .vs-container-overlay .vs-text {
        font-size: 0.8rem !important;
    }
    
    .team-name-compact {
        font-size: 0.75rem !important;
    }
    
    .matches-table td:first-child {
        width: 200px;
        max-width: 200px;
        min-width: 180px;
    }
    
    /* Компактные стили для мобильной версии */
    .mobile-section {
        padding: 0.75rem;
    }
    
    .prediction-card {
        margin-bottom: 12px;
    }
    
    .mobile-prediction-compact {
        padding: 4px 0;
    }
}

/* Стили для компактной мобильной версии */
.mobile-prediction-compact {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mobile-prediction-label-compact {
    font-weight: 600;
    font-size: 0.8rem;
    color: #e9ecef !important;
    opacity: 0.9;
}

.mobile-prediction-value-compact {
    font-size: 0.85rem;
    font-weight: 500;
}

.mobile-stats-section-compact {
    margin-bottom: 8px;
}

.mobile-stats-title-compact {
    font-size: 0.85rem;
    color: #e9ecef;
    font-weight: 500;
    margin-bottom: 4px;
}

.mobile-stats-title-compact .text-success {
    color: #28a745 !important;
    font-weight: 600;
}

.mobile-stats-title-compact .text-danger {
    color: #dc3545 !important; 
    font-weight: 600;
}

.mobile-stats-title-compact .text-muted {
    color: #adb5bd !important;
    font-weight: 500;
}

/* Дополнительные правила для форсирования цветов в мобильной версии */
.mobile-stats-section-compact small.text-success {
    color: #28a745 !important;
}

.mobile-stats-section-compact small.text-danger {
    color: #dc3545 !important;
}

.mobile-stats-section-compact small.text-muted {
    color: #adb5bd !important;
}

/* Компактная мобильная информация о времени */
.mobile-time-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.mobile-time-info .mobile-prediction-label-compact {
    margin: 0;
}

.mobile-time-info .time-display {
    font-size: 0.8rem;
    font-weight: 500;
}

/* Десктопные карточки */
.card-body-desktop {
    background: var(--card-bg);
    border-radius: 0 0 8px 8px;
}

.teams-section-desktop {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
}

.team-vs-container-desktop {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.team-container-desktop {
    flex: 1;
    text-align: center;
}

.team-image-desktop {
    max-width: 100%;
    height: auto;
    margin: 0 auto 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: visible;
}

.team-logo-desktop {
    max-width: 600px;
    max-height: 58px;
    width: 100%;
    height: auto;
    aspect-ratio: 6/1;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: border-color 0.2s ease;
}

.team-logo-desktop:hover {
    border-color: rgba(255, 255, 255, 0.3);
}

.placeholder-team-desktop {
    max-width: 600px;
    max-height: 58px;
    width: 100%;
    height: auto;
    aspect-ratio: 6/1;
    background: #2b323a;
    color: white;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    transition: border-color 0.2s ease;
    animation: none;
}

.placeholder-team-desktop:hover {
    border-color: rgba(255, 255, 255, 0.3);
}

.team-name-desktop {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-color);
    line-height: 1.2;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.team-mini-stats {
    min-height: 38px;
    margin-top: 6px;
    font-size: 0.78rem;
    color: var(--muted-text);
}

.mini-muted {
    color: var(--muted-text) !important;
}

.mini-form-strip {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 3px;
    margin-top: 6px;
}

.mini-form-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 4px;
    color: #e9ecef;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1;
}

.mini-form-pill.win {
    background: rgba(25, 135, 84, 0.22);
}

.mini-form-pill.loss {
    background: rgba(220, 53, 69, 0.22);
}

.vs-container-desktop {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vs-text-desktop {
    background: rgba(255, 255, 255, 0.06);
    color: #e9ecef;
    padding: 6px 9px;
    border-radius: 6px;
    font-weight: bold;
    font-size: 0.8rem;
    text-shadow: none;
}

.prediction-result-section-desktop {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
    margin-bottom: 8px !important;
}

.insight-strip {
    display: grid;
    grid-template-columns: 1fr 0.8fr;
    gap: 8px;
    margin: 0 0 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

.insight-item {
    min-width: 0;
    min-height: 54px;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.025);
}

.insight-label {
    color: var(--muted-text);
    font-size: 0.74rem;
    font-weight: 600;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0;
}

.insight-value {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.2;
}

.draft-mini-line {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-color);
    font-size: 0.78rem;
    line-height: 1.35;
}

.insight-wide {
    grid-column: 1 / -1;
}

.desktop-context-strip {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(92px, 0.72fr) minmax(0, 0.8fr);
    gap: 8px;
    margin: 0 0 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

.desktop-context-strip .insight-item {
    min-height: auto;
    padding: 6px 8px;
}

.desktop-context-strip .insight-label {
    margin-bottom: 2px;
    font-size: 0.68rem;
}

.desktop-context-strip .insight-value {
    font-size: 0.92rem;
}

.desktop-context-center {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
}

.desktop-context-center .decision-chip,
.desktop-context-center .result-chip {
    padding: 5px 6px;
}

.desktop-context-center .decision-team {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-body-desktop.p-3 {
    padding: 0.75rem !important;
}

.teams-section-desktop {
    padding-bottom: 8px;
    margin-bottom: 8px !important;
}

.stats-section-desktop {
    display: none;
}

.prediction-box-desktop,
.result-box-desktop {
    text-align: center;
}

.prediction-label-desktop,
.result-label-desktop {
    font-size: 0.85rem;
    color: var(--muted-text);
    margin-bottom: 5px;
}

.prediction-value-desktop {
    font-weight: 600;
    font-size: 0.95rem;
}

.beta-prediction-desktop {
    font-size: 0.75rem;
    color: #e9ecef !important;
}

.beta-prediction-desktop .text-success {
    color: #28a745 !important;
}

.beta-prediction-desktop .text-danger {
    color: #dc3545 !important;
}

.beta-prediction-desktop .text-secondary {
    color: #adb5bd !important;
}

.result-value-desktop .badge {
    font-size: 0.75rem;
}

.stats-section-desktop {
    padding-top: 5px;
}

.stat-item-desktop {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 6px;
    padding: 10px;
}

.stat-header-desktop {
    margin-bottom: 8px;
}

.stat-title-desktop {
    font-weight: 600;
    color: var(--text-color);
}

.progress-container-desktop {
    position: relative;
    height: 12px;
    background: var(--secondary-bg);
    border-radius: 6px;
    margin-bottom: 5px;
    overflow: hidden;
}

.progress-marker-desktop {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-color);
    transform: translateX(-50%);
    z-index: 1;
}

.team-radiant-progress-desktop {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    background: linear-gradient(90deg, #28a745, #20c997);
    transition: width 0.3s ease;
}

.team-dire-progress-desktop {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    background: linear-gradient(90deg, #dc3545, #fd7e14);
    transition: width 0.3s ease;
}

.time-display-compact {
    font-size: 0.75rem;
    color: var(--muted-text);
    text-align: right;
    white-space: nowrap;
}

.desktop-match-card {
    min-height: 100%;
    transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}

.desktop-match-card:hover {
    border-color: rgba(255, 255, 255, 0.16);
    transform: translateY(-1px);
    box-shadow: 0 0.4rem 1rem rgba(0, 0, 0, 0.22);
}

.desktop-match-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0.55rem 0.75rem;
    background: var(--navbar-bg);
    border-bottom: 1px solid var(--border-color);
}

.desktop-league {
    min-width: 0;
    color: #e9ecef;
    font-size: 0.84rem;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.desktop-match-body {
    padding: 0.75rem;
}

.desktop-match-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px;
    align-items: stretch;
    margin-bottom: 8px;
}

.desktop-team {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: left;
}

.desktop-team-side {
    font-size: 0.64rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.desktop-team-logo-wrap {
    position: relative;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.desktop-team-brand {
    width: 100%;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.desktop-team-logo {
    width: 34px;
    height: 34px;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    padding: 2px;
}

.desktop-team-placeholder {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #2b323a;
    color: #e9ecef;
    border-radius: 6px;
    font-size: 0.74rem;
    font-weight: 800;
}

.desktop-team-name {
    min-width: 0;
    max-width: min(180px, calc(100% - 42px));
    min-height: 2.05em;
    font-size: 0.9rem;
    font-weight: 800;
    line-height: 1.12;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow-wrap: anywhere;
}

.team-hero-strip {
    width: 100%;
    max-width: 260px;
    height: clamp(40px, 3.4vw, 50px);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    background: rgba(7, 9, 12, 0.62);
}

.team-hero-strip-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.team-hero-strip-img:not([src]) {
    visibility: hidden;
}

.live-compact-shell {
    display: none;
    margin: 0 0 10px;
}

.live-compact-shell.has-live {
    display: block;
}

.live-compact-card {
    padding: 7px;
    border: 1px solid rgba(37, 211, 102, 0.28);
    border-radius: 7px;
    background: rgba(9, 15, 18, 0.74);
}

.live-compact-summary {
    width: 100%;
    min-width: 0;
    display: grid;
    grid-template-columns: auto auto auto minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.live-compact-body {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 8px;
    align-items: stretch;
    margin-top: 8px;
}

.live-compact-body[hidden] {
    display: none;
}

.live-compact-map {
    min-width: 0;
}

.live-compact-info {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.live-compact-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.live-summary-advantage {
    min-width: 0;
    overflow: hidden;
    color: #ced4da;
    font-size: 0.76rem;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.live-summary-advantage.radiant {
    color: #22c55e;
}

.live-summary-advantage.dire {
    color: #ff4d6d;
}

.live-toggle-label {
    padding: 3px 7px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.08);
    color: #dce1e7;
    font-size: 0.68rem;
    font-weight: 800;
}

.live-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #ff5261;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0;
}

.live-pill.sync {
    color: #f5c451;
}

.live-pill.finished {
    color: #8fd19e;
}

.live-pill.pregame {
    color: #8ab4f8;
}

.live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #ff5261;
    box-shadow: 0 0 8px rgba(255, 82, 97, 0.75);
}

.live-pill.sync .live-dot {
    background: #f5c451;
    box-shadow: 0 0 8px rgba(245, 196, 81, 0.65);
}

.live-pill.finished .live-dot {
    background: #8fd19e;
    box-shadow: 0 0 8px rgba(143, 209, 158, 0.65);
    animation: none;
}

.live-pill.pregame .live-dot {
    background: #8ab4f8;
    box-shadow: 0 0 8px rgba(138, 180, 248, 0.65);
}

.live-time,
.live-time-large {
    color: #e9ecef;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.live-kills {
    color: #e9ecef;
    font-size: 1.05rem;
    font-weight: 900;
    line-height: 1;
}

.live-kills .radiant,
.live-score-main .radiant,
.live-metric.radiant strong,
.live-team-title.radiant {
    color: #22c55e;
}

.live-kills .dire,
.live-score-main .dire,
.live-metric.dire strong,
.live-team-title.dire {
    color: #ff4d6d;
}

.live-kills .sep,
.live-score-main .sep {
    color: #adb5bd;
    margin: 0 4px;
}

.live-compact-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
}

.live-metric {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding: 5px 7px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.045);
    color: #ced4da;
    font-size: 0.72rem;
}

.live-metric strong {
    color: #e9ecef;
    font-variant-numeric: tabular-nums;
}

.live-metric-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.live-dota-map {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    min-height: 260px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 7px;
    background:
        radial-gradient(circle at 18% 82%, rgba(37, 211, 102, 0.28), transparent 28%),
        radial-gradient(circle at 82% 18%, rgba(255, 77, 109, 0.3), transparent 30%),
        linear-gradient(135deg, rgba(28, 90, 59, 0.78), transparent 44%),
        linear-gradient(315deg, rgba(96, 34, 48, 0.82), transparent 44%),
        #11161a;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.035), inset 0 0 42px rgba(0, 0, 0, 0.38);
}

.live-dota-map.compact {
    /* Keep square aspect so lane geometry stays correct (not stretched). */
    min-height: 0;
    aspect-ratio: 1 / 1;
}

.live-map-river {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 42%, rgba(65, 140, 170, 0.5) 47%, rgba(65, 140, 170, 0.45) 53%, transparent 58%);
}

.live-map-base {
    position: absolute;
    width: 22%;
    height: 22%;
    border-radius: 50%;
    opacity: 0.34;
}

.live-map-base.radiant {
    left: 5%;
    bottom: 5%;
    background: #22c55e;
}

.live-map-base.dire {
    right: 5%;
    top: 5%;
    background: #ff4d6d;
}

.live-map-tower {
    position: absolute;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    border: 1px solid rgba(255, 255, 255, 0.8);
    background: #adb5bd;
}

.live-map-barrack {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 2px;
    transform: translate(-50%, -50%);
    border: 1px solid rgba(255, 255, 255, 0.75);
    background: #adb5bd;
}

.live-map-ancient {
    position: absolute;
    width: 13px;
    height: 13px;
    transform: translate(-50%, -50%) rotate(45deg);
    border: 2px solid rgba(255, 255, 255, 0.86);
    border-radius: 3px;
    background: #adb5bd;
}

.live-dota-map:not(.compact) .live-map-tower,
.live-dota-map:not(.compact) .live-map-barrack {
    width: 15px;
    height: 15px;
}

.live-dota-map:not(.compact) .live-map-ancient {
    width: 22px;
    height: 22px;
}

.live-map-tower.radiant.alive,
.live-map-barrack.radiant.alive,
.live-map-ancient.radiant.alive {
    background: #22c55e;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.65);
}

.live-map-tower.dire.alive,
.live-map-barrack.dire.alive,
.live-map-ancient.dire.alive {
    background: #ff4d6d;
    box-shadow: 0 0 8px rgba(255, 77, 109, 0.65);
}

.live-map-tower.destroyed,
.live-map-barrack.destroyed,
.live-map-ancient.destroyed {
    background: #20242a;
    border-color: rgba(255, 255, 255, 0.28);
    box-shadow: none;
}

.live-map-tower.unknown,
.live-map-barrack.unknown,
.live-map-ancient.unknown {
    background: #6c757d;
}

.live-map-side-label {
    position: absolute;
    z-index: 1;
    padding: 4px 7px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.38);
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.68rem;
    font-weight: 900;
    text-transform: uppercase;
}

.live-map-side-label.radiant {
    left: 8px;
    bottom: 8px;
}

.live-map-side-label.dire {
    top: 8px;
    right: 8px;
}

.live-dota-map.compact .live-map-side-label {
    display: none;
}

.live-map-legend {
    position: absolute;
    left: 8px;
    right: auto;
    top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-start;
    pointer-events: none;
}

.live-map-legend span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 7px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.44);
    color: #dce1e7;
    font-size: 0.68rem;
    font-weight: 700;
}

.live-legend-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #ced4da;
}

.live-legend-dot.tower {
    border-radius: 50%;
}

.live-legend-dot.barrack {
    border-radius: 2px;
}

.live-legend-dot.ancient {
    transform: rotate(45deg);
    border-radius: 2px;
}

.live-legend-dot.destroyed {
    border-radius: 50%;
    background: #20242a;
    border: 1px solid rgba(255, 255, 255, 0.36);
}

.live-match-detail-shell {
    margin-bottom: 1rem;
}

.live-match-detail-shell.is-hidden {
    display: none;
}

.live-detail-card,
.live-empty-state {
    border: 1px solid rgba(37, 211, 102, 0.22);
    border-radius: 8px;
    background: #1f2329;
    color: #e9ecef;
}

.live-empty-state {
    padding: 0.9rem 1rem;
    color: #adb5bd;
}

.live-empty-diagnostic {
    margin-top: 0.65rem;
    padding: 0.85rem 1rem;
    border: 1px solid rgba(255, 193, 7, 0.24);
    border-radius: 8px;
    background: rgba(255, 193, 7, 0.07);
    color: #d7dde5;
    font-size: 0.9rem;
    line-height: 1.45;
}

.live-empty-diagnostic + .live-history-panel {
    margin-top: 0.75rem;
}

.live-empty-hint {
    margin-top: 0.35rem;
    color: #9aa4b2;
}

.live-detail-card {
    padding: 1rem;
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.18);
}

.live-detail-head,
.live-score-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.live-source,
.live-updated {
    color: #adb5bd;
    font-size: 0.78rem;
}

.live-time-large {
    font-size: 1.2rem;
}

.live-score-row {
    margin: 0.9rem 0;
}

.live-score-side {
    min-width: 0;
    flex: 1;
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.live-score-side.dire {
    text-align: right;
}

.live-score-main {
    flex: 0 0 auto;
    padding: 0.4rem 0.75rem;
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.06);
    font-size: 1.35rem;
    font-weight: 900;
}

.live-detail-grid {
    display: grid;
    grid-template-columns: minmax(330px, 42%) minmax(0, 1fr);
    gap: 1rem;
    align-items: stretch;
}

.live-detail-grid > .live-dota-map {
    min-height: 390px;
}

.live-detail-metrics {
    display: grid;
    gap: 8px;
    align-content: start;
}

.live-structure-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 0.65rem 0.75rem;
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.045);
    color: #ced4da;
}

.live-players-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem;
    margin-top: 1rem;
}

.live-team-title {
    margin-bottom: 0.5rem;
    font-weight: 900;
}

.live-player-row {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    padding: 0.55rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.live-player-hero {
    display: flex;
    align-items: center;
    justify-content: center;
}

.live-hero-token,
.live-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    background: #2b323a;
    color: #e9ecef;
    font-size: 0.62rem;
    font-weight: 800;
}

.live-hero-token {
    width: 48px;
    height: 36px;
}

.live-hero-portrait {
    width: 48px;
    height: 36px;
    border-radius: 5px;
    object-fit: cover;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.live-player-main {
    min-width: 0;
}

.live-player-name {
    overflow: hidden;
    color: #f8f9fa;
    font-size: 0.86rem;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.live-player-sub,
.live-player-stats {
    color: #adb5bd;
    font-size: 0.72rem;
}

.live-player-stats {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    grid-column: 2 / 4;
}

.live-items {
    grid-column: 1 / 4;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    min-height: 20px;
}

.live-item {
    width: 28px;
    height: 20px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: #151a20;
    line-height: 1;
}

.live-item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.live-item-fallback {
    max-width: 100%;
    overflow: hidden;
    padding: 0 2px;
    font-size: 0.5rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.live-item.backpack {
    opacity: 0.56;
}

.live-item.neutral {
    border-color: rgba(192, 132, 252, 0.72);
}

.live-item.empty {
    color: transparent;
    background: rgba(255, 255, 255, 0.05);
}

.live-empty-row {
    padding: 0.7rem;
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.04);
    color: #adb5bd;
    font-size: 0.82rem;
}

.live-history-panel {
    margin-top: 1rem;
}

.live-history-card,
.live-history-empty,
.live-history-loading {
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
}

.live-history-empty,
.live-history-loading {
    padding: 0.75rem;
    color: #adb5bd;
    font-size: 0.84rem;
}

.live-history-card {
    padding: 0.85rem;
}

.live-history-head,
.live-history-selected-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.live-history-title {
    color: #f8f9fa;
    font-weight: 900;
}

.live-history-subtitle {
    color: #adb5bd;
    font-size: 0.78rem;
}

.live-history-current {
    color: #e9ecef;
    font-size: 1rem;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
}

.live-history-bars {
    height: 44px;
    display: flex;
    align-items: flex-end;
    gap: 2px;
    margin-top: 0.75rem;
    padding: 0 2px;
}

.live-history-bar {
    flex: 1;
    min-width: 3px;
    max-width: 12px;
    padding: 0;
    border: 0;
    border-radius: 3px 3px 0 0;
    background: rgba(173, 181, 189, 0.5);
    cursor: pointer;
}

.live-history-bar.radiant {
    background: rgba(34, 197, 94, 0.78);
}

.live-history-bar.dire {
    background: rgba(255, 77, 109, 0.78);
}

.live-history-bar.active {
    outline: 2px solid rgba(255, 255, 255, 0.84);
    outline-offset: 1px;
}

.live-history-slider {
    width: 100%;
    margin: 0.65rem 0 0.75rem;
    accent-color: #25d366;
}

.live-history-selected {
    display: grid;
    grid-template-columns: 132px minmax(0, 1fr);
    gap: 0.85rem;
    align-items: stretch;
}

.live-history-selected-map {
    min-width: 0;
}

.live-history-selected-main {
    min-width: 0;
    display: grid;
    gap: 8px;
}

.live-history-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.live-history-structures {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    color: #ced4da;
    font-size: 0.78rem;
}

.live-history-structures span,
.live-history-events span {
    padding: 5px 7px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.055);
}

.live-history-events {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    color: #dce1e7;
    font-size: 0.78rem;
}

@media (min-width: 1200px) {
    .live-detail-grid {
        grid-template-columns: minmax(420px, 520px) minmax(0, 1fr);
    }

    .live-detail-grid > .live-dota-map {
        min-height: 430px;
    }

    .live-player-row {
        grid-template-columns: 58px minmax(0, 1fr) auto;
    }

    .live-hero-token,
    .live-hero-portrait {
        width: 54px;
        height: 40px;
    }
}

.desktop-team .team-mini-stats {
    min-height: 34px;
    margin-top: 0;
    font-size: 0.72rem;
    text-align: center;
}

.desktop-team .mini-form-strip {
    margin-top: 4px;
}

.desktop-team .mini-form-pill {
    width: 16px;
    height: 16px;
    font-size: 0.62rem;
}

.desktop-center {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 6px;
}

.desktop-vs {
    align-self: center;
    min-width: 36px;
    padding: 4px 8px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.06);
    color: #e9ecef;
    font-size: 0.72rem;
    font-weight: 800;
    text-align: center;
}

.decision-chip,
.result-chip {
    width: 100%;
    min-width: 0;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.035);
    padding: 6px;
    text-align: center;
}

.prediction-help,
.prediction-help[title],
.decision-chip[title],
.decision-label[title],
.decision-team[title],
.decision-meta[title] {
    cursor: help;
}

.decision-label[title],
.decision-meta[title] {
    text-decoration: underline dotted rgba(173, 181, 189, 0.75);
    text-underline-offset: 2px;
}

.match-info-list .prediction-help[title]:not(.badge):not(.progress) {
    text-decoration: underline dotted rgba(173, 181, 189, 0.75);
    text-underline-offset: 2px;
}

.decision-label,
.decision-meta {
    display: block;
    color: var(--muted-text);
    font-size: 0.62rem;
    font-weight: 700;
    line-height: 1.1;
    text-transform: uppercase;
}

.decision-team {
    display: block;
    margin: 2px 0;
    color: #e9ecef;
    font-size: 0.76rem;
    font-weight: 800;
    line-height: 1.12;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.decision-chip.radiant {
    border-color: rgba(92, 184, 92, 0.26);
}

.decision-chip.dire {
    border-color: rgba(217, 83, 79, 0.26);
}

.decision-chip.skip,
.decision-chip.neutral {
    border-color: rgba(173, 181, 189, 0.18);
}

.decision-chip.premium-locked {
    border-color: rgba(255, 193, 7, 0.45);
    background: rgba(255, 193, 7, 0.11);
}

.decision-chip.premium-locked .decision-label {
    color: #ffd66b;
}

.decision-chip.premium-locked .decision-team {
    color: #ffe8a3;
}

.decision-chip.decision-single {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
}

.decision-chip.decision-single .decision-team {
    margin: 0;
    color: #ced4da;
    font-size: 0.82rem;
    text-transform: none;
}

.confidence-green .decision-meta {
    color: #8fd19e;
}

.confidence-yellow .decision-meta {
    color: #ffd66b;
}

.confidence-red .decision-meta {
    color: #ea868f;
}

.confidence-black .decision-meta {
    color: #adb5bd;
}

.confidence-l2 .decision-meta {
    color: #7dd3fc;
}

.result-chip {
    color: #ced4da;
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1.1;
    text-transform: uppercase;
}

.result-chip.correct {
    color: #8fd19e;
    border-color: rgba(92, 184, 92, 0.26);
}

.result-chip.wrong {
    color: #ea868f;
    border-color: rgba(217, 83, 79, 0.26);
}

.result-chip.skipped,
.result-chip.pending {
    color: #ffd66b;
    border-color: rgba(255, 214, 107, 0.2);
}

.desktop-kills-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 8px;
    align-items: center;
    color: var(--muted-text);
    font-size: 0.76rem;
    padding-top: 8px;
    border-top: 1px solid var(--border-color);
}

.desktop-kills-row strong,
.desktop-kills-row .kills-choice-badge {
    color: #e9ecef;
    font-weight: 700;
}

.desktop-kills-row .kills-choice-badge {
    font-size: 0.78rem;
    letter-spacing: 0.02em;
}

.desktop-kills-row .kills-fact {
    color: var(--muted-text);
    white-space: nowrap;
}

.mobile-match-card .desktop-kills-row {
    margin-top: 6px;
}

/* Адаптивность для контейнера карточек */
#desktop-cards-container {
    margin-top: 20px;
    align-items: stretch;
}

#mobile-cards-container {
    margin-top: 20px;
}

.matches-loading-state {
    width: 100%;
    min-height: 92px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    background: #1e1e1e;
    color: #adb5bd;
    font-weight: 600;
}

@media (min-width: 768px) {
    #desktop-cards-container {
        display: flex !important;
    }
    
    #mobile-cards-container {
        display: none !important;
    }
}

@media (max-width: 1199.98px) {
    .desktop-match-main {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }

    .desktop-match-body {
        padding: 0.7rem;
    }

    .desktop-context-strip {
        grid-template-columns: minmax(0, 1fr) minmax(92px, 0.6fr) minmax(0, 0.8fr);
    }
}

@media (max-width: 767.98px) {
    html,
    body {
        max-width: 100%;
        overflow-x: hidden;
    }

    .container-fluid {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    .page-title {
        font-size: 1.55rem;
        line-height: 1.16;
        margin-bottom: 1rem;
        overflow-wrap: anywhere;
    }

    #desktop-cards-container {
        display: none !important;
    }
    
    #mobile-cards-container {
        display: block !important;
    }

    .insight-strip {
        grid-template-columns: 1fr;
        gap: 8px;
        margin-bottom: 0;
        padding-bottom: 0;
        border-bottom: 0;
    }

    .insight-item {
        min-height: auto;
    }

    .live-compact-summary {
        grid-template-columns: auto auto auto minmax(0, 1fr);
        row-gap: 6px;
    }

    .live-toggle-label {
        grid-column: 1 / -1;
        justify-self: stretch;
        text-align: center;
    }

    .live-compact-body {
        grid-template-columns: 78px minmax(0, 1fr);
        gap: 6px;
    }

    .live-compact-metrics {
        grid-template-columns: 1fr;
    }

    .live-detail-grid,
    .live-players-grid {
        grid-template-columns: 1fr;
    }

    .live-detail-grid > .live-dota-map {
        min-height: 310px;
    }

    .live-map-legend {
        max-width: calc(100% - 16px);
    }

    .live-player-row {
        grid-template-columns: 48px minmax(0, 1fr);
    }

    .live-player-stats,
    .live-items {
        grid-column: 1 / -1;
    }

    .live-player-stats {
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .live-hero-token,
    .live-hero-portrait {
        width: 44px;
        height: 33px;
    }

    .live-score-row {
        align-items: stretch;
    }

    .live-score-side {
        white-space: normal;
    }

    .live-history-selected {
        grid-template-columns: 1fr;
    }

    .live-history-metrics {
        grid-template-columns: 1fr;
    }
}

.mobile-match-card {
    border-radius: 8px;
}

.mobile-match-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 0.55rem 0.75rem;
    background: var(--navbar-bg);
    border-bottom: 1px solid var(--border-color);
}

.mobile-match-league {
    min-width: 0;
    color: #e9ecef;
    font-size: 0.88rem;
    font-weight: 800;
    line-height: 1.25;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.mobile-match-body {
    padding: 0.65rem;
}

.mobile-match-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 78px minmax(0, 1fr);
    gap: 6px;
    align-items: stretch;
    margin-bottom: 8px;
}

.mobile-match-team {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-align: center;
}

.mobile-match-logo-wrap {
    position: relative;
    width: 26px;
    height: 26px;
    flex: 0 0 26px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-match-team-brand {
    width: 100%;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.mobile-match-team-logo,
.mobile-match-team-placeholder {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.03);
}

.mobile-match-team-logo {
    object-fit: contain;
    padding: 2px;
}

.mobile-match-team-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #e9ecef;
    font-size: 0.62rem;
    font-weight: 800;
}

.mobile-match-team-name {
    min-width: 0;
    max-width: calc(100% - 31px);
    min-height: 2.15em;
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1.08;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow-wrap: anywhere;
}

.mobile-match-team .team-hero-strip {
    max-width: 170px;
    height: 30px;
}

.mobile-match-team .team-mini-stats {
    min-height: 30px;
    margin-top: 0;
    font-size: 0.66rem;
    line-height: 1.2;
}

.mobile-match-team .mini-form-strip {
    gap: 2px;
    margin-top: 3px;
}

.mobile-match-team .mini-form-pill {
    width: 14px;
    height: 14px;
    font-size: 0.56rem;
}

.mobile-match-center {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 5px;
}

.mobile-match-center .desktop-vs {
    display: none;
}

.mobile-match-center .decision-chip,
.mobile-match-center .result-chip {
    padding: 5px 4px;
}

.mobile-match-center .decision-chip.premium-locked {
    flex-direction: column;
}

.mobile-match-center .decision-chip.premium-locked .decision-team,
.mobile-match-center .result-chip {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    overflow-wrap: anywhere;
}

.mobile-match-center .decision-label,
.mobile-match-center .decision-meta {
    font-size: 0.54rem;
}

.mobile-match-center .decision-team {
    font-size: 0.66rem;
}

.mobile-match-card .insight-strip {
    grid-template-columns: 1fr 0.78fr;
    gap: 6px;
    margin: 0;
    padding-bottom: 0;
    border-bottom: 0;
}

.mobile-match-card .insight-item {
    min-height: auto;
    padding: 7px;
}

.mobile-match-card .insight-label {
    font-size: 0.66rem;
    margin-bottom: 3px;
}

.mobile-match-card .insight-value {
    font-size: 0.9rem;
}

.mobile-match-card .draft-mini-line {
    font-size: 0.7rem;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

@media (max-width: 380px) {
    .mobile-match-main {
        grid-template-columns: minmax(0, 1fr) 72px minmax(0, 1fr);
        gap: 5px;
    }

    .mobile-match-center .decision-team {
        font-size: 0.62rem;
    }

    .mobile-match-card .insight-strip {
        grid-template-columns: 1fr;
    }
}

/* Стили для индикатора победителя */
.winner-indicator {
    position: absolute;
    top: -5px;
    font-size: 1.5em;
    z-index: 10;
    animation: winner-glow 2s ease-in-out infinite alternate;
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.8);
}

.winner-indicator.radiant-winner {
    right: -5px; /* Кубок справа для команды Radiant */
}

.winner-indicator.dire-winner {
    left: -5px; /* Кубок слева для команды Dire */
}

.desktop-team-logo-wrap .winner-indicator,
.mobile-match-logo-wrap .winner-indicator {
    width: 18px;
    height: 18px;
    top: -7px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid rgba(255, 215, 0, 0.55);
    background: rgba(18, 20, 24, 0.9);
    font-size: 0.72rem;
    line-height: 1;
    text-shadow: 0 0 4px rgba(255, 215, 0, 0.85);
}

.desktop-team-logo-wrap .winner-indicator.radiant-winner,
.mobile-match-logo-wrap .winner-indicator.radiant-winner {
    right: -8px;
    left: auto;
}

.desktop-team-logo-wrap .winner-indicator.dire-winner,
.mobile-match-logo-wrap .winner-indicator.dire-winner {
    left: -8px;
    right: auto;
}

.mobile-match-logo-wrap .winner-indicator {
    width: 16px;
    height: 16px;
    top: -6px;
    font-size: 0.64rem;
}

@keyframes winner-glow {
    from {
        text-shadow: 0 0 5px #ffd700, 0 0 10px #ffd700, 0 0 15px #ffd700;
        transform: scale(1);
    }
    to {
        text-shadow: 0 0 10px #ffd700, 0 0 20px #ffd700, 0 0 30px #ffd700;
        transform: scale(1.1);
    }
}

@keyframes placeholder-pulse {
    from {
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
        transform: scale(1);
    }
    to {
        box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4), 0 0 15px rgba(102, 126, 234, 0.3);
        transform: scale(1.02);
    }
}

/* Позиционирование для разных типов контейнеров */
.team-image,
.team-image-desktop,
.team-image-vertical,
.team-image-compact {
    position: relative;
}

/* Адаптация для мобильных устройств */
@media (max-width: 768px) {
    .winner-indicator {
        font-size: 1.2em;
        top: -3px;
    }
    
    .winner-indicator.radiant-winner {
        right: -3px;
    }
    
    .winner-indicator.dire-winner {
        left: -3px;
    }
}

/* Стили для предсказаний по убийствам */
.kills-prediction-box-desktop {
    background: rgba(33, 37, 41, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 12px;
    margin-top: 8px;
}

.kills-prediction-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.kills-choice-badge {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.kills-odds {
    font-size: 0.85em;
    color: #adb5bd;
}

.kills-result {
    padding: 6px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    border-left: 3px solid #007bff;
}

/* Адаптивные стили для мобильных устройств */
@media (max-width: 767px) {
    .kills-prediction-box-desktop {
        padding: 8px;
        margin-top: 6px;
    }
    
    .kills-choice-badge {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .kills-odds {
        font-size: 0.8em;
    }
}

/* Темная тема */
body[data-theme="dark"] .kills-prediction-box-desktop {
    background: rgba(52, 58, 64, 0.9);
    border-color: rgba(255, 255, 255, 0.3);
}

body[data-theme="dark"] .kills-result {
    background: rgba(0, 0, 0, 0.5);
    border-left-color: #17a2b8;
}

/* Улучшения для мобильных карточек предсказаний */
.mobile-prediction-compact .kills-prediction-content {
    gap: 6px;
}

.mobile-prediction-compact .kills-choice-badge {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

/* Анимации для лучшего UX */
.kills-prediction-box-desktop,
.mobile-prediction-compact {
    transition: all 0.3s ease;
}

.kills-prediction-box-desktop:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Стили для индикаторов правильности предсказаний */
.badge.bg-success {
    background-color: #198754 !important;
}

.badge.bg-danger {
    background-color: #dc3545 !important;
}

.badge.bg-info {
    background-color: #0dcaf0 !important;
    color: #000 !important;
}

.badge.bg-warning {
    background-color: #ffc107 !important;
    color: #000 !important;
}

/* Accessibility: Disable animations for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    /* Disable all animations */
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    /* Disable specific animations */
    .placeholder-team,
    .placeholder-team-desktop,
    .winner-indicator {
        animation: none !important;
    }

    /* Disable transitions on navigation */
    .nav-link,
    .nav-link::after {
        transition: none !important;
    }

    /* Disable transitions on team logos and placeholders */
    .team-logo-compact,
    .placeholder-team-compact,
    .team-logo-large,
    .placeholder-team-large,
    .team-logo-desktop,
    .placeholder-team-desktop {
        transition: none !important;
    }

    /* Disable hover transforms */
    .team-logo-compact:hover,
    .placeholder-team-compact:hover,
    .team-logo-large:hover,
    .placeholder-team-large:hover,
    .team-logo-desktop:hover,
    .placeholder-team-desktop:hover {
        transform: none !important;
    }

    /* Disable progress bar transitions */
    .team-radiant-progress-desktop,
    .team-dire-progress-desktop {
        transition: none !important;
    }

    /* Disable prediction box transitions */
    .kills-prediction-box-desktop,
    .mobile-prediction-compact {
        transition: none !important;
    }

    .kills-prediction-box-desktop:hover {
        transform: none !important;
    }
}

/* Global Dark Theme Text Fixes */
body[data-theme="dark"] .text-muted {
    color: #adb5bd !important;
}

body[data-theme="dark"] p,
body[data-theme="dark"] span:not(.badge):not(.btn),
body[data-theme="dark"] div:not(.btn):not(.badge):not(.alert):not(.progress):not(.progress-bar) {
    color: #e9ecef;
}

body[data-theme="dark"] strong,
body[data-theme="dark"] b {
    color: #e9ecef;
}

body[data-theme="dark"] small {
    color: #adb5bd;
}

body[data-theme="dark"] h1,
body[data-theme="dark"] h2,
body[data-theme="dark"] h3,
body[data-theme="dark"] h4,
body[data-theme="dark"] h5,
body[data-theme="dark"] h6 {
    color: #e9ecef;
}

/* Bootstrap light utility classes look broken on dark theme — force dark-theme fallback */
body[data-theme="dark"] .bg-light {
    background-color: #2a2a2a !important;
    color: #e9ecef !important;
}
body[data-theme="dark"] .bg-light .text-muted,
body[data-theme="dark"] .bg-light small {
    color: #adb5bd !important;
}
body[data-theme="dark"] .text-dark {
    color: #e9ecef !important;
}
body[data-theme="dark"] .bg-warning,
body[data-theme="dark"] .bg-warning.text-dark,
body[data-theme="dark"] .bg-warning .text-dark {
    color: #111827 !important;
}
body[data-theme="dark"] .card {
    background-color: var(--card-bg, #1e1e1e);
    color: #e9ecef;
    border-color: #2f2f2f;
}
body[data-theme="dark"] .card-body,
body[data-theme="dark"] .card-footer {
    color: #e9ecef;
}
body[data-theme="dark"] .list-group-item {
    background-color: #1e1e1e;
    color: #e9ecef;
    border-color: #2f2f2f;
}
body[data-theme="dark"] .breadcrumb {
    background-color: transparent;
}
body[data-theme="dark"] .breadcrumb-item.active {
    color: #adb5bd;
}
body[data-theme="dark"] .alert-warning {
    background-color: rgba(255, 193, 7, 0.16);
    border-color: rgba(255, 193, 7, 0.55);
    color: #ffe8a1;
}
body[data-theme="dark"] .alert-info {
    background-color: rgba(13, 110, 253, 0.16);
    border-color: rgba(13, 110, 253, 0.48);
    color: #cfe2ff;
}
body[data-theme="dark"] .alert-success {
    background-color: rgba(25, 135, 84, 0.17);
    border-color: rgba(25, 135, 84, 0.52);
    color: #d1e7dd;
}
body[data-theme="dark"] .alert-danger {
    background-color: rgba(220, 53, 69, 0.17);
    border-color: rgba(220, 53, 69, 0.52);
    color: #f8d7da;
}
/* Bootstrap alert-secondary is light-gray/white with dark text — unreadable on dark site */
body[data-theme="dark"] .alert-secondary {
    background-color: rgba(108, 117, 125, 0.22);
    border-color: rgba(173, 181, 189, 0.45);
    color: #e9ecef;
}
body[data-theme="dark"] .alert-secondary .alert-link,
body[data-theme="dark"] .alert-secondary a {
    color: #9ec5fe;
}
body[data-theme="dark"] .alert-secondary strong,
body[data-theme="dark"] .alert-secondary b,
body[data-theme="dark"] .alert-info strong,
body[data-theme="dark"] .alert-success strong,
body[data-theme="dark"] .alert-warning strong,
body[data-theme="dark"] .alert-danger strong {
    color: inherit;
}
/* Keep secondary/default alerts readable outside match page too */
body[data-theme="dark"] .alert {
    --bs-alert-color: #e9ecef;
    --bs-alert-bg: #2a2d31;
    --bs-alert-border-color: #3d4349;
}
body[data-theme="dark"] .alert-link {
    color: #9ec5fe;
    font-weight: 600;
}
body[data-theme="dark"] .breadcrumb-item a {
    color: #8ab4f8;
}
body[data-theme="dark"] .breadcrumb-item + .breadcrumb-item::before {
    color: #6c757d;
}
/* Avoid near-white utility boxes looking broken on dark */
body[data-theme="dark"] .bg-white {
    background-color: #1e1e1e !important;
    color: #e9ecef !important;
}
body[data-theme="dark"] .text-black-50 {
    color: rgba(233, 236, 239, 0.55) !important;
}
body[data-theme="dark"] .table {
    color: #e9ecef;
    --bs-table-bg: transparent;
    --bs-table-color: #e9ecef;
    --bs-table-striped-bg: rgba(255,255,255,0.03);
}
body[data-theme="dark"] .table thead {
    background-color: #252525;
}
body[data-theme="dark"] .form-control,
body[data-theme="dark"] .form-select {
    background-color: #1e1e1e;
    color: #e9ecef;
    border-color: #3a3a3a;
}
body[data-theme="dark"] .form-control::placeholder { color: #8f989f; }
body[data-theme="dark"] .form-select option {
    background-color: #1e1e1e;
    color: #e9ecef;
}
body[data-theme="dark"] .input-group-text {
    background-color: #2d2d2d;
    color: #e9ecef;
    border-color: #444;
}
body[data-theme="dark"] .form-text {
    color: #adb5bd;
}
body[data-theme="dark"] .modal-content { background-color: #1e1e1e; color: #e9ecef; }
body[data-theme="dark"] .page-title {
    color: #e9ecef;
}

body[data-theme="dark"] label,
body[data-theme="dark"] .form-label {
    color: #e9ecef;
}

body[data-theme="dark"] .form-control,
body[data-theme="dark"] .form-select {
    background-color: #2d2d2d;
    border-color: #444;
    color: #e9ecef;
}

body[data-theme="dark"] .form-control::placeholder {
    color: #6c757d;
}

body[data-theme="dark"] .form-control:focus,
body[data-theme="dark"] .form-select:focus {
    background-color: #2d2d2d;
    border-color: #0d6efd;
    color: #e9ecef;
}

body[data-theme="dark"] .table {
    color: #e9ecef;
}

body[data-theme="dark"] .table th,
body[data-theme="dark"] .table td {
    border-color: #444;
}
