/* Основные стили */
.tournaments-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
}

.level-titleh {
    text-align: center;
    margin-bottom: 40px;
    padding-top: 20px;
}

.level-titleh h1 {
    color: #333;
    font-size: 32px;
    font-weight: 600;
    margin: 0;
}

/* Контейнер уровней */
.levels-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    margin-bottom: 40px;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #dee2e6;
}


.levels-container a {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #333;
    padding: 20px 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
    width: 160px;
    border: 2px solid transparent;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    justify-content: center;
}

.levels-container a:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* Активное состояние */
.levels-container a.active {
    border-width: 2px;
    font-weight: 600;
}

/* Все турниры (фиолетовый) */
.levels-container a.all-levels {
    color: #6f42c1;
    border-color: #6f42c1;
}

.levels-container a.all-levels.active {
    background: #6f42c1;
    color: white;
}

/* Муниципальный уровень (синий) */
.levels-container a.municipal {
    color: #0d6efd;
    border-color: #0d6efd;
}

.levels-container a.municipal.active {
    background: #0d6efd;
    color: white;
}

/* Региональный уровень (зеленый) */
.levels-container a.regional {
    color: #198754;
    border-color: #198754;
}

.levels-container a.regional.active {
    background: #198754;
    color: white;
}

/* Межрегиональный уровень (оранжевый) */
.levels-container a.interregional {
    color: #fd7e14;
    border-color: #fd7e14;
}

.levels-container a.interregional.active {
    background: #fd7e14;
    color: white;
}

/* Всероссийский уровень (красный) */
.levels-container a.national {
    color: #dc3545;
    border-color: #dc3545;
}

.levels-container a.national.active {
    background: #dc3545;
    color: white;
}

/* Международный уровень (темно-синий) */
.levels-container a.international {
    color: #0b5ed7;
    border-color: #0b5ed7;
}

.levels-container a.international.active {
    background: #0b5ed7;
    color: white;
}

/* Дефолтный цвет */
.levels-container a.default {
    color: #6c757d;
    border-color: #6c757d;
}

.levels-container a.default.active {
    background: #6c757d;
    color: white;
}

/* Иконки */
.level-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 10px;
    background: #f8f9fa;
    border-radius: 8px;
}

.levels-container a.active .level-icon {
    background: rgba(255, 255, 255, 0.2);
}

/* Текст в карточках */
.levels-container h5 {
    margin: 0;
    font-size: 14px;
    text-align: center;
    font-weight: 500;
}

/* Заголовок выбранного уровня */
.selected-level-title {
    text-align: center;
    margin: 30px 0;
    color: #333;
    font-size: 24px;
}

.selected-level-title .level-name {
    font-weight: bold;
    margin-left: 8px;
}

/* Цвета для текста выбранного уровня */
.selected-level-title .level-name.municipal {
    color: #0d6efd;
}

.selected-level-title .level-name.regional {
    color: #198754;
}

.selected-level-title .level-name.interregional {
    color: #fd7e14;
}

.selected-level-title .level-name.national {
    color: #dc3545;
}

.selected-level-title .level-name.international {
    color: #0b5ed7;
}

/* Секция турниров */
.tournaments-section {
    background: white;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: 1px solid #dee2e6;
}

/* Карточки турниров */
.tournament-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.tournament-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #dee2e6;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: box-shadow 0.3s ease;
}

.tournament-card:hover {
    box-shadow: 0 3px 6px rgba(0,0,0,0.1);
}

/* Границы по цветам */
.tournament-card.municipal-border {
    border-left: 4px solid #0d6efd;
}

.tournament-card.regional-border {
    border-left: 4px solid #198754;
}

.tournament-card.interregional-border {
    border-left: 4px solid #fd7e14;
}

.tournament-card.national-border {
    border-left: 4px solid #dc3545;
}

.tournament-card.international-border {
    border-left: 4px solid #0b5ed7;
}

.tournament-card.default-border {
    border-left: 4px solid #6c757d;
}

/* Заголовок карточки */
.tournament-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

/* Цвета заголовков */
.tournament-name.municipal {
    color: #0d6efd;
}

.tournament-name.regional {
    color: #198754;
}

.tournament-name.interregional {
    color: #fd7e14;
}

.tournament-name.national {
    color: #dc3545;
}

.tournament-name.international {
    color: #0b5ed7;
}

/* Бейдж уровня */
.tournament-level-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 15px;
    color: white;
}

.tournament-level-badge.municipal {
    background: #0d6efd;
}

.tournament-level-badge.regional {
    background: #198754;
}

.tournament-level-badge.interregional {
    background: #fd7e14;
}

.tournament-level-badge.national {
    background: #dc3545;
}

.tournament-level-badge.international {
    background: #0b5ed7;
}

.tournament-level-badge.default {
    background: #6c757d;
}

/* Описание */
.tournament-desc {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 15px;
}

/* Мета информация */
.tournament-meta {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 15px;
}

.meta-item {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    border-bottom: 1px solid #e9ecef;
}

.meta-item:last-child {
    border-bottom: none;
}

.meta-label {
    color: #666;
    font-weight: 500;
}

.meta-value {
    color: #333;
}

/* Статусы */
.status-активный,
.status-active {
    color: #198754;
    font-weight: 600;
}

.status-завершен,
.status-completed {
    color: #6c757d;
}

.status-предстоящий,
.status-upcoming {
    color: #0dcaf0;
}

/* Кнопки действий */
.tournament-actions {
    text-align: center;
    padding-top: 15px;
    border-top: 1px solid #dee2e6;
}

/* Сообщение "нет турниров" */
.no-tournaments {
    text-align: center;
    padding: 40px;
    color: #666;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 20px 0;
}

.no-tournaments h5 {
    margin: 0;
    font-size: 18px;
    color: #666;
}

/* Адаптивность */
@media (max-width: 768px) {
    .levels-container {
        padding: 15px;
        gap: 10px;
    }

    .levels-container a {
        width: 140px;
        padding: 15px 10px;
    }

    .level-icon {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }

    .tournament-list {
        grid-template-columns: 1fr;
    }

    .tournaments-section {
        padding: 20px;
    }

    .tournament-header {
        margin-bottom: 15px;
    }
}