:root {
    --bg-white: #FFFFFF;
    --primary-burgundy: #800020;
    --gold: #D4AF37;
    --gray-100: #F5F5F5;
    --gray-200: #E1E1E1;
    --gray-500: #6E6E6E;
    --text-black: #212121;
    --font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
}

body {
    background-color: var(--bg-white);
    color: var(--text-black);
    font-family: var(--font-family);
    margin: 0;
}

/* Десктопная сетка */
.desktop-grid {
    display: grid;
    grid-template-columns: 280px 1fr 320px;
    gap: 20px;
    padding: 20px;
    height: calc(100vh - 60px);
}

.column-sidebar { overflow-y: auto; }
.column-main { overflow-y: auto; border-left: 1px solid var(--gray-200); border-right: 1px solid var(--gray-200); padding: 0 20px; }
.column-stats { overflow-y: auto; }

/* Капсулы турниров */
.league-capsule {
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: 10px 16px;
    margin-bottom: 8px;
    text-align: center;
    font-weight: 700;
    cursor: pointer;
    background: white;
    transition: all 0.2s;
    font-size: 14px;
}

.league-capsule.active {
    border-color: var(--gold);
    border-width: 2px;
}

/* Сетка туров */
.tours-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
    margin-top: 10px;
}

.tour-btn {
    border: 1px solid var(--gray-200);
    background: white;
    aspect-ratio: 1;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}

.tour-btn.active {
    border-color: var(--gold);
    border-width: 2px;
}

/* Заголовки */
.section-title {
    color: var(--primary-burgundy);
    text-align: center;
    font-size: 18px;
    font-weight: 800;
    margin: 20px 0;
    text-transform: uppercase;
}

/* Матчи */
.match-item-desktop {
    display: grid;
    grid-template-columns: 60px 1fr 60px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-100);
}

.m-time { font-size: 12px; color: var(--gray-500); }
.m-main { display: flex; align-items: center; justify-content: space-between; gap: 15px; }

.m-team { flex: 1; font-weight: 600; font-size: 14px; }
.m-team.left { text-align: right; }
.m-team.right { text-align: left; }

.m-score-box {
    border: 1px solid var(--gray-200);
    border-radius: 6px;
    padding: 6px 16px;
    font-weight: 800;
    min-width: 60px;
    text-align: center;
    color: var(--gray-500);
}

.m-points { text-align: right; font-weight: 700; color: var(--gray-500); }

/* Кружки формы */
.form-dots { display: flex; gap: 3px; margin-top: 4px; }
.m-team.left .form-dots { justify-content: flex-end; }

.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot.w { background-color: #7FCF7F; }
.dot.d { background-color: #FFD700; }
.dot.l { background-color: #E53935; }

/* Кнопки входа */
.btn-accent-maui {
    background-color: var(--primary-burgundy);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px;
    font-weight: 700;
    cursor: pointer;
}

/* Мобильная адаптация */
@media (max-width: 768px) {
    .desktop-grid {
        display: flex;
        flex-direction: column;
        padding: 10px;
        height: auto;
    }
    .column-sidebar {
        border: none;
        padding: 0;
        margin-bottom: 5px;
        display: flex;
        flex-direction: column;
    }
    .leagues-list, .tours-grid {
        display: flex;
        overflow-x: auto;
        gap: 8px;
        padding-bottom: 5px;
        margin-top: 5px;
        /* Убираем scrollbar для красоты */
        scrollbar-width: none; 
    }
    .leagues-list::-webkit-scrollbar, .tours-grid::-webkit-scrollbar {
        display: none;
    }
    .tours-grid {
        grid-template-columns: none;
    }
    .league-capsule {
        flex: 0 0 auto;
        margin-bottom: 0;
        white-space: nowrap;
        font-size: 13px;
        padding: 8px 12px;
    }
    .tour-btn {
        flex: 0 0 auto;
        width: 38px;
        height: 38px;
        aspect-ratio: auto;
        font-size: 13px;
    }
    .column-main {
        border-left: none;
        border-right: none;
        padding: 0;
    }
    
    /* Стили матчей для мобильных */
    .match-item-desktop {
        grid-template-columns: 40px 1fr 40px;
        padding: 12px 0;
        gap: 5px;
    }
    .m-time {
        font-size: 11px;
    }
    .m-points {
        font-size: 12px;
    }
    .m-main {
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        gap: 6px;
        align-items: center;
    }
    .m-team {
        font-size: 11px;
        line-height: 1.2;
        /* Перенос длинных названий */
        white-space: pre-wrap;
        word-break: break-word;
        text-align: center !important;
    }
    .m-predict-box {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .m-predict-box input {
        width: 32px;
        height: 32px;
        font-size: 14px;
        padding: 0;
        text-align: center;
    }
    .m-score-box {
        min-width: 45px;
        padding: 6px 8px;
        font-size: 13px;
    }
    .m-predict-box > span {
        font-size: 14px;
        margin: 0 2px;
    }

    /* Скрываем десктопные элементы на мобилке */
    .desktop-only {
        display: none !important;
    }
    
    .mobile-tabbar {
        display: flex !important;
    }
}

@media (min-width: 769px) {
    .mobile-only {
        display: none !important;
    }
    .mobile-tabbar {
        display: none !important;
    }
}