        /* Основные стили liquid glass */
    :root {
        --primary-gold: rgba(243, 194, 17, 0.377);
        --primary-gold-hover: rgba(245, 213, 99, 0.35);
        --success-color: rgba(56, 142, 60, 0.3);
        --danger-color: rgba(255, 100, 118, 0.3);
        --info-color: rgba(33, 150, 243, 0.3);
    }

    body {
        font-family: 'Manrope', sans-serif;
        background: #333;;
        min-height: 100vh;
        margin: 0;
        color: #fff;
        position: relative;
    }

    .container {
        max-width: 1200px;
        margin: 0 auto;
        padding-bottom: 80px;
        position: relative;
        z-index: 1; /* Нормальный z-index для контейнера */
    }

/* Стили для выпадающих фильтров */
.tournament-filters {
    background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.15) 100%);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.2);
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    position: relative;
    z-index: 100; /* ДОБАВЛЯЕМ z-index для контейнера фильтров */
}

.tournament-filters::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, transparent 0%, rgba(255,255,255,0.1) 50%, transparent 100%);
    opacity: 0.6;
    pointer-events: none;
}

/* СОВРЕМЕННЫЙ ВЫПАДАЮЩИЙ СПИСОК В СТИЛЕ LIQUID GLASS */
.filter-group {
    position: relative;
    margin-bottom: 20px;
}

.filter-label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    font-size: 15px;
    color: rgba(255,255,255,0.9);
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

/* Основной контейнер select */
.liquid-select {
    position: relative;
    width: 100%;
}

/* Триггер (видимая часть) */
.select-trigger {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 14px 20px;
    color: white;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 50%, rgba(255,255,255,0.1) 100%);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 15px;
    cursor: pointer;
    font-weight: 600;
    font-family: 'Manrope', sans-serif;
    font-size: 15px;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 -1px 0 rgba(0, 0, 0, 0.05);
}

/* Стрелка */
.select-trigger::after {
    content: "";
    width: 20px;
    height: 20px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='1.5' stroke='%23FFF'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='m19.5 8.25-7.5 7.5-7.5-7.5' /%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    transition: transform 0.3s ease-out;
    flex-shrink: 0;
}

/* Анимация стрелки при открытии */
.liquid-select.open .select-trigger::after {
    transform: rotate(180deg);
}

.select-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, rgba(53, 53, 54, 0.98) 0%, rgba(47, 47, 48, 0.95) 100%);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 15px;
    margin-top: 8px;
    box-shadow: 
        0 20px 50px rgba(0,0,0,0.4),
        inset 0 1px 0 rgba(255,255,255,0.1);
    z-index: 10000; /* УВЕЛИЧИВАЕМ z-index */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    max-height: 300px;
    overflow-y: auto;
}

/* ТОЛЬКО ДЛЯ МОБИЛЬНЫХ, КОГДА МЕСТА НЕ ХВАТАЕТ */
@media (max-width: 768px) {
    .select-dropdown.fixed-position {
        position: fixed;
        top: auto !important;
        bottom: 20px;
        left: 20px !important;
        right: 20px !important;
        max-height: 50vh;
        border-radius: 15px;
        transform: translateY(100%);
        margin: 0;
        z-index: 1000001;
    }
    
    .liquid-select.open .select-dropdown.fixed-position {
        transform: translateY(0);
    }
    
    /* Затемнение фона при открытом списке */
    .select-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 100000; /* ВЫСОКИЙ z-index для оверлея */
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }
    
    .liquid-select.open ~ .select-overlay {
        opacity: 1;
        visibility: visible;
    }
}

/* Анимация открытия */
.liquid-select.open .select-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Опции */
.select-option {
    padding: 14px 20px;
    color: rgba(255,255,255,0.9);
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    position: relative;
    font-size: 14px;
}

.select-option:last-child {
    border-bottom: none;
}

/* Ховер эффект для опций */
.select-option:hover {
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 50%, rgba(255,255,255,0.1) 100%);
    color: #fff;
    transform: translateX(5px);
}

/* Выбранная опция */
.select-option.selected {
    background: linear-gradient(135deg, rgba(243,194,17,0.25) 0%, rgba(240,193,25,0.15) 100%);
    color: #fff;
}

.select-option.selected::after {
    content: '✓';
    position: absolute;
    right: 20px;
    color: var(--primary-gold);
    font-weight: bold;
    font-size: 16px;
}

/* Эффекты при взаимодействии */
.select-trigger:hover {
    background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.15) 100%);
    border: 1px solid rgba(255,255,255,0.25);
    transform: translateY(-2px);
    box-shadow: 
        0 8px 30px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.25),
        inset 0 -1px 0 rgba(0, 0, 0, 0.08);
}

.liquid-select.open .select-trigger {
    border: 1px solid rgba(243, 194, 17, 0.4);
    background: linear-gradient(135deg, rgba(255,255,255,0.18) 0%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.18) 100%);
    box-shadow: 
        0 0 0 3px rgba(243, 194, 17, 0.15),
        0 8px 30px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}


/* Скрытый нативный select для доступности */
.hidden-select {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 1px;
    height: 1px;
}

/* Стили для скроллбара в выпадающем списке */
.select-dropdown::-webkit-scrollbar {
    width: 4px;
}

.select-dropdown::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.05);
    border-radius: 3px;
    margin: 5px;
}

.select-dropdown::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 3px;
}

.select-dropdown::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.3);
}

/* АДАПТИВНОСТЬ */
@media (max-width: 768px) {
    .select-trigger {
        padding: 16px 18px;
        font-size: 16px;
    }
    
    .select-option {
        padding: 16px 18px;
        font-size: 15px;
    }
    
    .select-trigger::after {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 480px) {
    .select-trigger {
        padding: 14px 16px;
    }
    
    .select-option {
        padding: 14px 16px;
    }
}






/* Кастомный контейнер для select */
.select-container {
    position: relative;
    width: 100%;
}

.filter-select {
    width: 100%;
    padding: 14px 16px;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 50%, rgba(255,255,255,0.1) 100%);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 15px;
    color: #fff;
    font-family: 'Manrope', sans-serif;
    font-size: 15px;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 18px;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 -1px 0 rgba(0, 0, 0, 0.05);
    margin-bottom: 0;
}

@keyframes centerFadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) scale(1);
    }
}

@keyframes centerFadeOut {
    from {
        opacity: 1;
        transform: translateX(-50%) scale(1);
    }
    to {
        opacity: 0;
        transform: translateX(-50%) scale(0.9);
    }
}

.filter-select:hover {
    background-color: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.3);
    transform: translateY(-1px);
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary-gold);
    box-shadow: 0 0 0 2px rgba(243, 194, 17, 0.2);
    background-color: rgba(255,255,255,0.12);
}

/* Стили для опций в выпадающем списке */
.filter-select option {
    background: rgba(40, 40, 60, 0.95);
    color: #fff;
    border: none;
    padding: 10px;
}

       /* ПОЛЕ ПОИСКА */
.search-box {
    position: relative;
}

.search-input {
    width: 100%;
    padding: 12px 16px 12px 45px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 12px;
    color: #fff;
    font-family: 'Manrope', sans-serif;
    font-size: 14px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.search-input::placeholder {
    color: rgba(255,255,255,0.6);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-gold);
    box-shadow: 0 0 0 2px rgba(243, 194, 17, 0.2);
    background-color: rgba(255,255,255,0.12);
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 53px;
    transform: translateY(-50%);
    color: rgba(255,255,255,0.6);
    z-index: 2;
}


      /* Сетка турниров */
.tournaments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.tournament-card {
    background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.15) 100%);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.2);
    padding: 25px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
    z-index: 1; /* НИЗКИЙ z-index для карточек */
}

.tournament-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, transparent 0%, rgba(255,255,255,0.1) 50%, transparent 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.tournament-card:hover::before {
    opacity: 1;
}

.tournament-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
}

.tournament-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--primary-gold);
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 15px;
    backdrop-filter: blur(10px);
}

.tournament-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.3;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.tournament-description {
    font-size: 14px;
    color: rgba(255,255,255,0.8);
    margin-bottom: 15px;
    line-height: 1.4;
}

.tournament-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.tournament-difficulty {
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    backdrop-filter: blur(5px);
}

.difficulty-easy { 
    background: rgba(76, 175, 80, 0.3); 
    border: 1px solid rgba(76, 175, 80, 0.5);
}
.difficulty-medium { 
    background: rgba(255, 152, 0, 0.3); 
    border: 1px solid rgba(255, 152, 0, 0.5);
}
.difficulty-hard { 
    background: rgba(244, 67, 54, 0.3); 
    border: 1px solid rgba(244, 67, 54, 0.5);
}

.tournament-stats {
    display: flex;
    gap: 15px;
    font-size: 13px;
}

.stat {
    display: flex;
    align-items: center;
    gap: 5px;
    color: rgba(255,255,255,0.8);
}

       /* Лобби */
.lobby-container {
    display: none;
    background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.15) 100%);
    backdrop-filter: blur(20px);
    border-radius: 25px;
    border: 1px solid rgba(255,255,255,0.25);
    padding: 30px;
    margin-bottom: 20px;
    box-shadow: 0 12px 50px rgba(0,0,0,0.15);
    position: relative;
}

.lobby-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, transparent 0%, rgba(255,255,255,0.1) 50%, transparent 100%);
    opacity: 0.6;
    pointer-events: none;
    border-radius: 25px;
}

.lobby-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
    position: relative;
    z-index: 2;
}

.lobby-title {
    font-size: 24px;
    font-weight: 700;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.lobby-info {
    display: flex;
    gap: 15px;
    align-items: center;
}

.lobby-code {
    background: rgba(255,255,255,0.1);
    padding: 8px 16px;
    border-radius: 15px;
    font-family: monospace;
    display: flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
}

.copy-btn {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.copy-btn:hover {
    background: rgba(255,255,255,0.1);
}

.participants-section {
    margin-bottom: 30px;
    position: relative;
    z-index: 2;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.participants-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 20px;
}

.participant {
    text-align: center;
    position: relative;
}

.participant-avatar {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    margin: 0 auto 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    border: 2px solid rgba(255,255,255,0.3);
    position: relative;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.participant-avatar.ready {
    border-color: #4CAF50;
    box-shadow: 0 0 15px rgba(76, 175, 80, 0.4);
}

.participant-avatar.host::before {
    content: '👑';
    position: absolute;
    top: -5px;
    right: -5px;
    font-size: 16px;
    background: var(--primary-gold);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    backdrop-filter: blur(5px);
}

.participant-name {
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 2px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.participant-status {
    font-size: 10px;
    color: rgba(255,255,255,0.6);
}

.status-ready { color: #4CAF50; }
.status-not-ready { color: #ff9800; }

.participant-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.8);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 10;
    backdrop-filter: blur(10px);
}

.participant:hover .participant-tooltip {
    opacity: 1;
}

.add-participant {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.add-icon {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    border: 2px dashed rgba(255,255,255,0.3);
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    margin-bottom: 20px;
}

.add-icon:hover {
    background: rgba(255,255,255,0.15);
    transform: scale(1.05);
}

.lobby-controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
    z-index: 2;
}

.ready-btn, .start-btn, .settings-btn {
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    font-family: 'Manrope', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.ready-btn {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.3);
    color: #fff;
}

.ready-btn.ready {
    background: var(--success-color);
    border-color: rgba(76,175,80,0.5);
}

.start-btn {
    background: var(--primary-gold);
    border: 1px solid rgba(255,255,255,0.4);
    color: #fff;
}

.start-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.start-btn:not(:disabled):hover {
    background: var(--primary-gold-hover);
    transform: translateY(-2px);
}

.settings-btn {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
}

        /* Настройки лобби */
        .lobby-settings {
            background: rgba(255,255,255,0.1);
            border-radius: 15px;
            padding: 20px;
            margin-top: 20px;
            display: none;
        }

        .settings-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 15px;
        }

        /* Таблица результатов */
.results-container {
    display: none;
    background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.15) 100%);
    backdrop-filter: blur(20px);
    border-radius: 25px;
    border: 1px solid rgba(255,255,255,0.25);
    padding: 25px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.results-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, transparent 0%, rgba(255,255,255,0.1) 50%, transparent 100%);
    opacity: 0.6;
    pointer-events: none;
    border-radius: 25px;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
    position: relative;
    z-index: 2;
}

.results-title {
    font-size: 24px;
    font-weight: 700;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.results-stats {
    display: flex;
    gap: 20px;
    font-size: 14px;
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-gold);
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.stat-label {
    font-size: 12px;
    color: rgba(255,255,255,0.7);
}

      /* АДАПТИВНАЯ ТАБЛИЦА ДЛЯ МОБИЛЬНЫХ */
.results-table-container {
    position: relative;
    z-index: 2;
    overflow-x: auto;
    margin-bottom: 20px;
    border-radius: 15px;
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(10px);
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px; /* Минимальная ширина для скролла на мобильных */
}

.results-table th {
    text-align: left;
    padding: 15px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    font-weight: 600;
    color: rgba(255,255,255,0.9);
    font-size: 14px;
    white-space: nowrap;
}

.results-table td {
    padding: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    font-size: 14px;
}

.results-table tr:hover {
    background: rgba(255,255,255,0.05);
}

.results-table tr:last-child td {
    border-bottom: none;
}

.player-info {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 150px;
}

.player-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
    backdrop-filter: blur(5px);
}

.player-name {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100px;
}

.medal {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    margin-right: 8px;
    flex-shrink: 0;
}

.medal.gold {
    background: linear-gradient(135deg, #FFD700, #FFEC8B);
    color: #000;
}

.medal.silver {
    background: linear-gradient(135deg, #C0C0C0, #E8E8E8);
    color: #000;
}

.medal.bronze {
    background: linear-gradient(135deg, #CD7F32, #E8B886);
    color: #000;
}

.score-excellent { color: #4CAF50; font-weight: 600; }
.score-good { color: #FFC107; font-weight: 600; }
.score-average { color: #FF9800; font-weight: 600; }
.score-poor { color: #F44336; font-weight: 600; }


        .share-results {
            text-align: center;
            margin-top: 20px;
        }

        .action-buttons {
            display: flex;
            gap: 10px;
            justify-content: center;
            flex-wrap: wrap;
        }

        /* Адаптивность */
        @media (max-width: 768px) {
            .tournaments-grid {
                grid-template-columns: 1fr;
            }
            
            .lobby-header, .results-header {
                flex-direction: column;
                text-align: center;
            }
            
            .participants-grid {
                grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
            }
            
            .participant-avatar {
                width: 60px;
                height: 60px;
                font-size: 20px;
            }

            .filters-grid {
                grid-template-columns: 1fr;
            }
        }

        /* Анимации */
        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(20px); }
            to { opacity: 1; transform: translateY(0); }
        }

        .fade-in {
            animation: fadeIn 0.5s ease-out;
        }

        @keyframes pulse {
            0%, 100% { transform: scale(1); }
            50% { transform: scale(1.05); }
        }
        
        .pulse {
            animation: pulse 2s infinite;
        }

/* КОМПАКТНЫЙ ВАРИАНТ ТАБЛИЦЫ ДЛЯ ОЧЕНЬ МАЛЕНЬКИХ ЭКРАНОВ */
.results-table.compact td,
.results-table.compact th {
    padding: 10px 8px;
    font-size: 13px;
}

.results-table.compact .player-info {
    min-width: 120px;
}

.results-table.compact .player-avatar {
    width: 28px;
    height: 28px;
    font-size: 12px;
}

.results-table.compact .player-name {
    max-width: 80px;
}

.results-table.compact .medal {
    width: 20px;
    height: 20px;
    font-size: 10px;
    margin-right: 6px;
}

.share-results {
    text-align: center;
    margin-top: 20px;
    position: relative;
    z-index: 2;
}

.action-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

/* АДАПТИВНОСТЬ */
@media (max-width: 768px) {
    .container {
        padding-bottom: 100px;
    }
    
    .tournaments-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .tournament-card {
        padding: 20px;
    }
    
    .filters-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .lobby-header, .results-header {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .participants-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 15px;
    }
    
    .participant-avatar {
        width: 60px;
        height: 60px;
        font-size: 20px;
    }
    
    .lobby-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .ready-btn, .start-btn, .settings-btn {
        width: 100%;
        max-width: 300px;
    }
    
    .results-stats {
        gap: 15px;
    }
    
    .stat-item {
        flex: 1;
    }
    
    .stat-value {
        font-size: 16px;
    }
    
    .stat-label {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .container {
        padding-bottom: 100px;
    }
    
    .tournament-filters {
        padding: 20px;
    }
    
    .tournament-card {
        padding: 15px;
    }
    
    .tournament-title {
        font-size: 16px;
    }
    
    .tournament-description {
        font-size: 13px;
    }
    
    .lobby-container, .results-container {
        padding: 20px;
        border-radius: 20px;
    }
    
    .lobby-title, .results-title {
        font-size: 20px;
    }
    
    .participants-grid {
        grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
        gap: 12px;
    }
    
    .participant-avatar {
        width: 55px;
        height: 55px;
        font-size: 18px;
    }
    
    
    /* Активируем компактную таблицу на маленьких экранах */
    .results-table {
        min-width: 500px;
    }
    
    .results-table.compact {
        min-width: 400px;
    }
    
    .action-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .action-buttons button {
        width: 100%;
        max-width: 280px;
    }
}

@media (max-width: 360px) {
    .participants-grid {
        grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
        gap: 10px;
    }
    
    .participant-avatar {
        width: 50px;
        height: 50px;
        font-size: 16px;
    }
    
    .participant-name {
        font-size: 10px;
    }
    
    .results-table {
        min-width: 350px;
    }
    
    .results-table.compact {
        min-width: 320px;
    }
    
    .results-table.compact td,
    .results-table.compact th {
        padding: 8px 6px;
        font-size: 12px;
    }
}

/* Анимации */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

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

.pulse {
    animation: pulse 2s infinite;
}

/* Скрытие скроллбара для таблицы */
.results-table-container::-webkit-scrollbar {
    height: 6px;
}

.results-table-container::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
}

.results-table-container::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.3);
    border-radius: 3px;
}

.results-table-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.5);
}