/* Современный стиль для списка турниров */

body {
    background: linear-gradient(135deg, #000000, #22009f, #d10000);
    margin: 0;
    padding-top: 70px;
    min-height: 100vh;
    color: white;
    font-family: 'Open Sans', sans-serif;
    overflow-y: auto !important;
}

.tournaments-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Заголовок страницы */
.page-header {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.page-title {
    font-family: 'Teko', sans-serif;
    font-size: 3.5rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Фильтры и поиск */
.filters-section {
    margin-bottom: 2rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.filters-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.search-row {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.search-box {
    display: flex;
    gap: 0.5rem;
    flex: 1;
    min-width: 300px;
}

.date-country-filters {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.date-inputs-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.search-btn-mobile {
    display: none;
}

.date-input {
    padding: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 1rem;
    min-width: 150px;
}

.date-input:focus {
    outline: none;
    border-color: #4ecdc4;
    box-shadow: 0 0 20px rgba(78, 205, 196, 0.3);
    background: rgba(255, 255, 255, 0.15);
}

.date-input::-webkit-calendar-picker-indicator {
    filter: invert(1);
    cursor: pointer;
}

.country-select {
    padding: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    min-width: 200px;
}

.country-select:focus {
    outline: none;
    border-color: #ff6b6b;
    box-shadow: 0 0 20px rgba(255, 107, 107, 0.3);
}

.country-select option {
    background: #2c3e50;
    color: #fff;
}

.search-box input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 1rem;
}

.search-box input:focus {
    outline: none;
    border-color: #4ecdc4;
    box-shadow: 0 0 20px rgba(78, 205, 196, 0.3);
    background: rgba(255, 255, 255, 0.15);
}

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

.search-box button {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    background: #007bff;
    color: #fff;
    cursor: pointer;
    transition: background 0.3s ease;
}

.search-box button:hover {
    background: #0056b3;
}

.filters {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.filters select {
    flex: 1;
    min-width: 200px;
    padding: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
}

.filters .reset-filters-link {
    align-self: stretch;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.25rem;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-size: 0.95rem;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.filters .reset-filters-link:hover {
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
}

.filters select:focus {
    outline: none;
    border-color: #ff6b6b;
    box-shadow: 0 0 20px rgba(255, 107, 107, 0.3);
}

.filters select option {
    background: #2c3e50;
    color: #fff;
}

/* Статистика */
.tournament-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
}

.stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    background: rgba(255, 255, 255, 0.08);
}

.stat-label {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #fff;
}

/* Сетка турниров - табличный вид (стиль smoothcomp) */
.tournaments-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.tournament-card-link {
    text-decoration: none;
    color: inherit;
}

.tournament-card {
    background: rgba(255, 255, 255, 0.08) !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    position: relative !important;
}

.tournament-card::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 4px !important;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4) !important;
    transform: scaleX(0) !important;
    transition: transform 0.3s ease !important;
    z-index: 1 !important;
}

.tournament-card:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
    background: rgba(255, 255, 255, 0.12) !important;
}

.tournament-card:hover::before {
    transform: scaleX(1) !important;
}

/* Обертка для изображения - фиксированный размер (стиль smoothcomp) */
.card-image-wrapper {
    width: 100%;
    height: 220px;
    min-height: 220px;
    max-height: 220px;
    overflow: hidden;
    background: #1a1a1a;
    position: relative;
}

.card-img-top {
    width: 100%;
    height: 100%;
    min-height: 220px;
    object-fit: cover;
    display: block;
}

.tournament-info {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card-title {
    color: #fff;
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Локация с иконкой */
.card-location {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.location-icon {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Информация о дате */
.card-date-info {
    margin-top: auto;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.card-date {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.card-days-left {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.75rem;
    margin: 0;
}

/* Прогресс-бар */
.tournament-progress {
    height: 4px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    margin-top: 0.75rem;
    overflow: hidden;
}

.tournament-progress-bar {
    background: #007bff;
    transition: width 0.3s ease;
}



/* Пагинация */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.page-link {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-radius: 4px;
    text-decoration: none;
    transition: background 0.3s ease;
}

.page-link:hover {
    background: rgba(255, 255, 255, 0.2);
}

.current-page {
    padding: 0.5rem 1rem;
    color: rgba(255, 255, 255, 0.7);
}

/* Сообщение об отсутствии турниров */
.no-tournaments {
    grid-column: 1 / -1;
    text-align: center;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.7);
}

.no-tournaments h3 {
    font-family: 'Teko', sans-serif;
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #ff6b6b;
}

.no-tournaments p {
    font-size: 1.1rem;
    line-height: 1.6;
}

/* Адаптивность: 992px — при повороте экрана (ландшафт) остаётся мобильный вид */
@media (max-width: 992px) {
    .tournaments-container {
        padding: 1rem;
        padding-top: 72px;
    }
    
    .search-row {
        flex-direction: column;
        gap: 1rem;
    }
    
    .search-box {
        width: 100%;
        min-width: 0;
    }
    
    .search-btn-desktop {
        display: none;
    }
    
    .date-country-filters {
        display: none !important;
    }
    
    .tournaments-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    
    .card-image-wrapper {
        height: 140px;
        min-height: 140px;
        max-height: 140px;
    }
    
    .card-img-top {
        height: 100%;
        min-height: 140px;
    }
    
    .tournament-info {
        padding: 0.75rem;
    }
    
    .card-title {
        font-size: 0.95rem;
        margin-bottom: 0.5rem;
        -webkit-line-clamp: 2;
    }
    
    .card-location {
        font-size: 0.75rem;
        margin-bottom: 0.4rem;
    }
    
    .card-date {
        font-size: 0.8rem;
    }
    
    .card-days-left {
        font-size: 0.7rem;
    }
    
    .search-btn-mobile {
        display: block;
        width: 100%;
        padding: 0.75rem 1.5rem;
        margin-top: 1rem;
        border: none;
        border-radius: 4px;
        background: #007bff;
        color: #fff;
        font-size: 1rem;
        font-weight: 500;
        cursor: pointer;
        transition: background 0.3s ease;
    }
    
    .search-btn-mobile:hover,
    .search-btn-mobile:active {
        background: #0056b3;
    }
    
    .page-title {
        font-size: 2.5rem;
    }
    
    .filters {
        flex-direction: column;
    }
    
    .filters select {
        width: 100%;
        min-width: 0;
    }
    
    .filters select:nth-child(2),
    .filters select:nth-child(3) {
        display: none !important;
    }
    
    .tournament-stats {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
        margin-bottom: 1rem !important;
    }
    
    .tournament-stats .stat-item {
        padding: 10px 8px !important;
    }
    
    .tournament-stats .stat-label {
        font-size: 0.75rem !important;
        margin-bottom: 2px !important;
    }
    
    .tournament-stats .stat-value {
        font-size: 1.2rem !important;
    }
    
    .pagination {
        flex-wrap: wrap;
        gap: 0.35rem;
        justify-content: center;
    }
    
    .page-link,
    .current-page {
        font-size: 0.9rem;
        padding: 0.4rem 0.75rem;
    }
}

@media (max-width: 768px) {
    .page-title {
        font-size: 2rem;
    }
    
    .card-image-wrapper {
        height: 120px;
        min-height: 120px;
        max-height: 120px;
    }
    
    .card-img-top {
        min-height: 120px;
    }
    
    .card-title {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .tournament-stats {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .search-box {
        flex-direction: column;
    }
    
    .search-box button {
        width: 100%;
    }
}

/* Дополнительная мобильная правка: ссылка «Сбросить фильтры» только для десктопа */
@media (max-width: 768px) {
    .filters .reset-filters-link {
        display: none !important;
    }
}

