/* Минималистичная стилистика в стиле betting-reports */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: inherit;
    max-width: 660px;
    width: 100%;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

.app-container {
    width: 100%;
    padding: 20px;
    background: #fff;
    border-radius: 12px;
}



/* Панель фильтров */
.filters-panel {
    background: #f6f6f6;
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 16px;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
    align-items: end;
}

.filter-group {
    margin-bottom: 0;
}

/* Убираем стили для filter-label, так как они уже не нужны */

/* Выпадающие селекторы */
.dropdown-container {
    position: relative;
    width: 100%;
}

.dropdown-trigger {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background: #fff;
    border: 1px solid #d1d1d6;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 13px;
    color: #1d1d1f;
    min-width: 0;
}

.dropdown-trigger:hover {
    background: #f9f9f9;
    border-color: #007aff;
}

.dropdown-trigger.active {
    border-color: #007aff;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.dropdown-text {
    flex: 1;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

/* Убираем стили для стрелок */

.dropdown-content {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #d1d1d6;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    margin-top: 4px;
}

.dropdown-content.active {
    max-height: 300px;
    overflow-y: auto;
}

.dropdown-content .year-checkbox,
.dropdown-content .bookmaker-checkbox,
.dropdown-content .category-checkbox {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #fff;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 400;
    color: #1d1d1f;
    user-select: none;
    border-bottom: 1px solid #f0f0f0;
}

.dropdown-content .year-checkbox:last-child,
.dropdown-content .bookmaker-checkbox:last-child,
.dropdown-content .category-checkbox:last-child {
    border-bottom: none;
}

.dropdown-content .year-checkbox:hover,
.dropdown-content .bookmaker-checkbox:hover,
.dropdown-content .category-checkbox:hover {
    background: #f9f9f9;
}





/* Общие стили для чекбоксов внутри dropdown */
.year-checkbox input[type="checkbox"],
.bookmaker-checkbox input[type="checkbox"],
.category-checkbox input[type="checkbox"] {
    display: none;
}

.year-checkbox .checkmark,
.bookmaker-checkbox .checkmark,
.category-checkbox .checkmark {
    width: 12px;
    height: 12px;
    background: transparent;
    border: 1px solid #d1d1d6;
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.year-checkbox input[type="checkbox"]:checked + .checkmark,
.bookmaker-checkbox input[type="checkbox"]:checked + .checkmark,
.category-checkbox input[type="checkbox"]:checked + .checkmark {
    background: #007aff;
    border-color: #007aff;
}

.year-checkbox input[type="checkbox"]:checked + .checkmark::after,
.bookmaker-checkbox input[type="checkbox"]:checked + .checkmark::after,
.category-checkbox input[type="checkbox"]:checked + .checkmark::after {
    content: "✓";
    color: white;
    font-size: 8px;
    font-weight: bold;
}

/* Действия с фильтрами */
/* Убираем стили для кнопки сброса фильтров */

/* Секция результатов */
.results-section {
    margin-bottom: 16px;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.results-count {
    font-size: 14px;
    font-weight: 600;
    color: #1d1d1f;
}

/* Сетка кейсов */
.cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}

.case-card {
    background: #f6f6f6;
    border-radius: 12px;
    padding: 12px;
    transition: all 0.2s ease;
    cursor: default;
    max-width: 320px;
}

.case-card:hover {
    background: #ebebeb;
    transform: translateY(-1px);
}



.case-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.case-logo {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    flex-shrink: 0;
    object-fit: cover;
    background: #fff;
    border: 1px solid #e0e0e0;
}



.case-meta {
    flex: 1;
    min-width: 0;
}

.case-title {
    font-size: 14px;
    font-weight: 600;
    color: #1d1d1f;
    line-height: 1.3;
    word-wrap: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.case-year {
    font-size: 11px;
    color: #6e6e73;
    font-weight: 500;
    background: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    flex-shrink: 0;
    margin-left: auto;
}

/* Пустое состояние */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #6e6e73;
}

.empty-icon {
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #1d1d1f;
}

.empty-state p {
    font-size: 14px;
    color: #6e6e73;
}

/* Адаптивность */
@media (max-width: 640px) {
    .app-container {
        padding: 12px;
    }

    .filters-panel {
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 10px;
    }

    .main-title {
        font-size: 20px;
    }

    .cases-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }

    .case-card {
        max-width: none;
    }
}

@media (max-width: 480px) {
    .year-selector {
        grid-template-columns: 1fr;
    }

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

    .case-title {
        font-size: 13px;
    }

    .case-year {
        font-size: 10px;
    }
}