/* Базовые стили для select */
select.form-select {
    overflow: hidden !important;
    scrollbar-width: none !important;
}

select.form-select::-webkit-scrollbar {
    display: none !important;
}

/* Слайдер года */
.animated-slider {
    padding: 15px;
}

.display-value {
    font-size: 1rem;
    color: #fff;
    background: #0d6efd;
    padding: 5px 15px;
    border-radius: 15px;
}

.slider-container {
    position: relative;
    height: 35px;
}

.active-range {
    position: absolute;
    height: 4px;
    background: #0d6efd;
    bottom: 0;
    border-radius: 2px;
    z-index: 1;
}

.animated-slider input[type="range"] {
    position: absolute;
    width: 100%;
    pointer-events: none;
    appearance: none;
    height: 4px;
    background: #343a40;
    border-radius: 2px;
    bottom: 0;
}

.animated-slider input[type="range"]::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 4px;
    background: #343a40;
    bottom: 0;
}

.animated-slider input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
    pointer-events: auto;
    z-index: 10;
    position: relative;
    margin-top: -8px;
}

#yearRangeStart::-webkit-slider-thumb {
    border: 10px solid #0dcaf0;
}

#yearRangeEnd::-webkit-slider-thumb {
    border: 10px solid #0d6efd;
}

.start-year, .end-year {
    font-weight: bold;
    font-size: 1rem;
}

.start-year {
    color: #0dcaf0;
}

.end-year {
    color: #0d6efd;
}

.animated-slider .d-flex {
    align-items: flex-start !important;
}

/* Контейнер таблицы */
.modern-table-container {
    background: linear-gradient(135deg, #1a1d20 0%, #212529 100%);
    border: 1px solid #495057;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.modern-table-container:hover {
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.4);
    transform: translateY(-4px);
}

.modern-table-header {
    background: linear-gradient(135deg, #343a40 0%, #495057 100%);
    border-bottom: 2px solid #6c757d;
    padding: 2rem 1.5rem;
}

.modern-table-header .d-flex {
    gap: 1.5rem;
}

.modern-table-header h2 {
    color: #f8f9fa;
    font-weight: 700;
    margin: 0;
    font-size: 1.75rem;
}

.modern-table-header i {
    font-size: 2rem;
    transition: transform 0.3s ease;
}

.modern-table-container:hover .modern-table-header i {
    transform: scale(1.1) rotate(10deg);
}

.modern-table-content {
    background: linear-gradient(135deg, #212529 0%, #1a1d20 100%);
    min-height: 200px;
}

/* Карточки игр */
.game-card {
    transition: all 0.3s ease;
    border: 1px solid #495057 !important;
    background: linear-gradient(135deg, #1a1d20 0%, #212529 100%) !important;
    overflow: hidden;
    border-radius: 0.75rem !important;
}

.game-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    border-color: #6c757d !important;
}

.game-card .card-header {
    background: linear-gradient(135deg, #343a40 0%, #495057 100%) !important;
    border-bottom: 2px solid #6c757d !important;
    padding: 1.25rem !important;
}

.game-card .card-body {
    background: transparent !important;
    padding: 1.5rem !important;
}

.game-card .btn {
    transition: all 0.3s ease;
    border-radius: 0.5rem;
    font-weight: 600;
    text-transform: uppercase;
    padding: 0.75rem 1.25rem;
}

.game-card .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(13, 110, 253, 0.4);
}

.game-card i {
    transition: all 0.3s ease;
}

.game-card:hover .card-header i {
    transform: scale(1.2) rotate(15deg);
}

.game-card .card-title {
    font-weight: 700 !important;
    font-size: 1.1rem !important;
}

.game-card .card-text {
    font-weight: 500;
    font-size: 0.95rem;
}

/* Пагинация */
.pagination {
    margin-top: 2rem;
    gap: 0.5rem;
}

.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, #0d6efd 0%, #0b5ed7 100%);
    border-color: #0d6efd;
    box-shadow: 0 4px 15px rgba(13, 110, 253, 0.4);
    border-radius: 0.5rem;
}

.pagination .page-link {
    background: linear-gradient(135deg, #212529 0%, #343a40 100%);
    border: 1px solid #495057;
    color: #fff;
    transition: all 0.3s ease;
    border-radius: 0.5rem;
    font-weight: 600;
    padding: 0.75rem 1rem;
}

.pagination .page-link:hover {
    background: linear-gradient(135deg, #343a40 0%, #495057 100%);
    border-color: #6c757d;
    color: #fff;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.pagination .page-item.disabled .page-link {
    background: linear-gradient(135deg, #1a1d20 0%, #212529 100%);
    border-color: #343a40;
    color: #6c757d;
    opacity: 0.6;
}

.page-input {
    background: linear-gradient(135deg, #343a40 0%, #495057 100%);
    border: 1px solid #6c757d;
    color: #fff;
    text-align: center;
    font-weight: 600;
    width: 60px;
    height: 32px;
    font-size: 0.875rem;
}

.page-input:focus {
    background: linear-gradient(135deg, #495057 0%, #6c757d 100%);
    border-color: #0d6efd;
    color: #fff;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.page-input::-webkit-outer-spin-button,
.page-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.page-input[type=number] {
    -moz-appearance: textfield;
}

/* Поиск и фильтры */
.search-field-container,
.filter-field-container,
.year-filter-container {
    background: linear-gradient(135deg, #1a1d20 0%, #212529 100%);
    border: 2px solid #495057;
    border-radius: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.search-field-container:hover,
.filter-field-container:hover,
.year-filter-container:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
}

.search-field-header,
.filter-field-header,
.year-filter-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 2px solid #6c757d;
}

.search-field-header {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    border-bottom-color: rgba(13, 202, 240, 0.3);
}

.filter-genre {
    background: linear-gradient(135deg, #8b5a00 0%, #b8860b 100%);
    border-bottom-color: rgba(255, 193, 7, 0.3);
}

.filter-platform {
    background: linear-gradient(135deg, #0a6e7a 0%, #17a2b8 100%);
    border-bottom-color: rgba(13, 202, 240, 0.3);
}

.filter-developer {
    background: linear-gradient(135deg, #721c24 0%, #a71e2a 100%);
    border-bottom-color: rgba(220, 53, 69, 0.3);
}

.filter-publisher {
    background: linear-gradient(135deg, #155724 0%, #1e7e34 100%);
    border-bottom-color: rgba(40, 167, 69, 0.3);
}

.year-filter-header {
    background: linear-gradient(135deg, #155724 0%, #1e7e34 100%);
    border-bottom-color: rgba(25, 135, 84, 0.3);
}

.search-field-header span,
.filter-field-header span,
.year-filter-header span {
    font-size: 1.1rem;
    font-weight: 600;
}

.search-field-header i,
.filter-field-header i,
.year-filter-header i {
    font-size: 1.3rem;
    transition: transform 0.3s ease;
}

.search-field-container:hover .search-field-header i,
.filter-field-container:hover .filter-field-header i,
.year-filter-container:hover .year-filter-header i {
    transform: scale(1.1) rotate(10deg);
}

.search-field-body,
.filter-field-body,
.year-filter-body {
    padding: 1.5rem;
    background: linear-gradient(135deg, #212529 0%, #1a1d20 100%);
}

/* Input поиска */
.search-input-group {
    border-radius: 0.75rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.search-input-icon {
    background: linear-gradient(135deg, #0dcaf0 0%, #0891a5 100%);
    border: 2px solid #0dcaf0;
    color: #fff;
    font-size: 1.2rem;
    padding: 1rem 1.25rem;
    border-right: none;
}

.search-input {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    border: 2px solid #0dcaf0;
    color: #fff;
    font-size: 1.05rem;
    padding: 1rem 1.25rem;
    border-left: none;
    font-weight: 500;
}

.search-input::placeholder {
    color: #bdc3c7;
    opacity: 0.9;
}

.search-input:focus {
    background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
    border-color: #0dcaf0;
    color: #fff;
    box-shadow: 0 0 0 0.25rem rgba(13, 202, 240, 0.3);
}

/* Select фильтров */
.filter-select {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%) !important;
    border: 2px solid #6c757d;
    color: #fff !important;
    font-size: 1.05rem;
    padding: 1rem 1.25rem;
    transition: all 0.3s ease;
    border-radius: 0.75rem;
    min-height: 52px;
    font-weight: 500;
    cursor: pointer;
}

.filter-select:hover {
    background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%) !important;
    border-color: #95a5a6;
}

.filter-select option {
    background: #2c3e50 !important;
    color: #fff !important;
    padding: 0.75rem;
}

.filter-select:focus {
    background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%) !important;
    color: #fff !important;
    outline: none;
}

.filter-select-genre:focus {
    border-color: #ffc107;
    box-shadow: 0 0 0 0.25rem rgba(255, 193, 7, 0.3);
}

.filter-select-platform:focus {
    border-color: #0dcaf0;
    box-shadow: 0 0 0 0.25rem rgba(13, 202, 240, 0.3);
}

/* Поиск в фильтрах */
.searchable-select {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
}

.filter-search {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%) !important;
    border: 2px solid #6c757d;
    color: #fff !important;
    font-size: 0.9rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    font-weight: 500;
}

.filter-search:focus {
    background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%) !important;
    border-color: #0dcaf0;
    color: #fff !important;
    box-shadow: 0 0 0 0.2rem rgba(13, 202, 240, 0.25);
    outline: none;
}

.filter-search::placeholder {
    color: #bdc3c7;
    opacity: 0.8;
}

.filter-select[size],
.filter-select[multiple] {
    min-height: 150px !important;
    max-height: 150px !important;
    overflow-y: scroll !important;
    scrollbar-width: thin;
    scrollbar-color: #6c757d #343a40;
    width: 100% !important;
}

.filter-select[size]::-webkit-scrollbar,
.filter-select[multiple]::-webkit-scrollbar {
    width: 8px;
    display: block !important;
}

.filter-select[size]::-webkit-scrollbar-track,
.filter-select[multiple]::-webkit-scrollbar-track {
    background: #343a40;
    border-radius: 4px;
}

.filter-select[size]::-webkit-scrollbar-thumb,
.filter-select[multiple]::-webkit-scrollbar-thumb {
    background: #6c757d;
    border-radius: 4px;
}

.filter-select[size]::-webkit-scrollbar-thumb:hover,
.filter-select[multiple]::-webkit-scrollbar-thumb:hover {
    background: #adb5bd;
}

.filter-select[size] option,
.filter-select[multiple] option {
    padding: 0.375rem 0.5rem;
    border-radius: 0.25rem;
    margin-bottom: 0.125rem;
    background: transparent !important;
    color: #fff !important;
}

.filter-select[size] option:hover,
.filter-select[multiple] option:hover {
    background: transparent !important;
}

.filter-select[size] option:checked,
.filter-select[multiple] option:checked {
    background: linear-gradient(135deg, #0d6efd 0%, #0b5ed7 100%) !important;
    color: #fff !important;
    font-weight: 600;
    border-left: 3px solid #0dcaf0;
}

/* Слайдер года */
.year-badge {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    border: 2px solid #198754;
    color: #fff;
    padding: 0.75rem 1.25rem;
    border-radius: 0.75rem;
    font-weight: 700;
    font-size: 1rem;
}

.year-badge-start {
    border-color: #0dcaf0;
    color: #0dcaf0;
}

.year-badge-end {
    border-color: #198754;
    color: #198754;
}

.year-range-display {
    background: linear-gradient(135deg, #198754 0%, #20c997 50%, #0d6efd 100%);
    color: #fff;
    padding: 1rem 2rem;
    border-radius: 1.5rem;
    font-weight: 800;
    font-size: 1.2rem;
    box-shadow: 0 6px 25px rgba(25, 135, 84, 0.4);
    border: 3px solid rgba(255, 255, 255, 0.2);
}

/* Формы */
.suggest-game-form .dashboard-card {
    margin-bottom: 1.5rem;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: none;
}

.suggest-game-form .dashboard-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.suggest-game-form .dashboard-header {
    background: rgba(var(--bs-primary-rgb), 0.1);
    border-bottom: 1px solid rgba(var(--bs-primary-rgb), 0.2);
    padding: 1rem 1.25rem;
    font-weight: 600;
    font-size: 1.1rem;
}

.suggest-game-form .dashboard-body {
    padding: 1.5rem 1.25rem;
}

.suggest-game-form .form-control,
.suggest-game-form .form-select {
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
}

.suggest-game-form .form-control:focus,
.suggest-game-form .form-select:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb), 0.25);
}

/* Счетчик игр */
#gamesCounter {
    border-radius: 0.5rem !important;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.3);
}

/* Активные фильтры */
.active-filters-container {
    background: linear-gradient(135deg, #1a1d20 0%, #212529 100%);
    border: 2px solid #ffc107;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(255, 193, 7, 0.2);
}

.active-filters-header {
    background: linear-gradient(135deg, #8b5a00 0%, #b8860b 100%);
    padding: 1rem 1.5rem;
    border-bottom: 2px solid rgba(255, 193, 7, 0.3);
}

.active-filters-header span {
    font-size: 1.1rem;
    font-weight: 600;
}

.active-filters-body {
    padding: 1.5rem;
    background: linear-gradient(135deg, #212529 0%, #1a1d20 100%);
}

.filter-badge {
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.filter-badge-search {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    box-shadow: 0 2px 8px rgba(13, 202, 240, 0.3);
}

.filter-badge-search:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(13, 202, 240, 0.5);
}

.filter-badge-genre {
    background: linear-gradient(135deg, #8b5a00 0%, #b8860b 100%);
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3);
}

.filter-badge-genre:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.5);
}

.filter-badge-platform {
    background: linear-gradient(135deg, #0a6e7a 0%, #17a2b8 100%);
    box-shadow: 0 2px 8px rgba(13, 202, 240, 0.3);
}

.filter-badge-platform:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(13, 202, 240, 0.5);
}

.filter-badge-developer {
    background: linear-gradient(135deg, #721c24 0%, #a71e2a 100%);
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
}

.filter-badge-developer:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.5);
}

.filter-badge-publisher {
    background: linear-gradient(135deg, #155724 0%, #1e7e34 100%);
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

.filter-badge-publisher:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.5);
}

.filter-badge-year {
    background: linear-gradient(135deg, #155724 0%, #1e7e34 100%);
    box-shadow: 0 2px 8px rgba(25, 135, 84, 0.3);
}

.filter-badge-year:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(25, 135, 84, 0.5);
}

.filter-badge .btn-close {
    font-size: 0.7rem;
    opacity: 0.8;
    transition: opacity 0.3s ease;
    filter: brightness(0) invert(1);
}

.filter-badge .btn-close:hover {
    opacity: 1;
}

#clearAllFilters {
    transition: all 0.3s ease;
}

#clearAllFilters:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4);
}

/* Стили для модальных окон */
.modal-content .card-body {
    background: #ffffff !important;
    color: #000000 !important;
    border: none !important;
}

.modal-content .card-text {
    color: #000000 !important;
}

.modal-content .card-header h5 {
    color: #000000 !important;
}

.modal-content .card-header i {
    color: #000000 !important;
}

.modal-content .card {
    border: none !important;
}

/* Адаптивность */
@media (max-width: 991.98px) {
    .modern-table-header {
        padding: 1.5rem 1rem;
    }
    
    .modern-table-header h2 {
        font-size: 1.5rem;
    }
    
    .modern-table-header i {
        font-size: 1.75rem;
    }
    
    .modern-table-header .d-flex {
        flex-direction: column;
        align-items: center !important;
        gap: 1rem;
    }
}

@media (max-width: 767.98px) {
    .modern-table-header {
        padding: 1.5rem 1rem;
    }
    
    .modern-table-header h2 {
        font-size: 1.25rem;
    }
    
    .modern-table-content {
        padding: 1.5rem !important;
    }
    
    .game-card:hover {
        transform: translateY(-4px);
    }
    
    .search-field-header,
    .filter-field-header,
    .year-filter-header {
        padding: 1rem;
    }
    
    .search-field-body,
    .filter-field-body,
    .year-filter-body {
        padding: 1rem;
    }
    
    .search-input,
    .filter-select {
        font-size: 0.95rem;
        padding: 0.875rem 1rem;
    }
    
    .filter-select[size],
    .filter-select[multiple] {
        min-height: 120px !important;
        max-height: 120px !important;
    }
}

@media (max-width: 575.98px) {
    .modern-table-header {
        padding: 1rem;
    }
    
    .modern-table-header h2 {
        font-size: 1.1rem;
    }
    
    .modern-table-content {
        padding: 1rem !important;
    }
    
    .pagination .page-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }
    
    .search-field-header,
    .filter-field-header,
    .year-filter-header {
        padding: 0.875rem;
        font-size: 0.95rem;
    }
    
    .search-field-body,
    .filter-field-body,
    .year-filter-body {
        padding: 0.875rem;
    }
    
    .search-input,
    .filter-select {
        font-size: 0.9rem;
        padding: 0.75rem;
    }
    
    .year-badge {
        font-size: 0.85rem;
        padding: 0.375rem 0.625rem;
    }
    
    .year-range-display {
        font-size: 0.9rem;
        padding: 0.5rem 0.875rem;
    }
    
    .search-field-container:hover,
    .filter-field-container:hover,
    .year-filter-container:hover {
        transform: translateY(-2px);
    }
}
