/* SEARCH */
.search-fixed__input,
.search {
    border-radius: 100px;
    height: 56px;
}

.search {
    background-color: var(--gray);
    width: 380px;
}

.search-fixed {
    display: none;
    flex-direction: column;
    gap: 4px;
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1300;
    width: 688px;
    max-width: calc(100% - 30px);
}

.search-fixed__input {
    background-color: var(--black);
    position: relative;
}

.close-search-fixed {
    right: 24px;
    top: 24px;
}

.search__options {
    max-height: 250px;
    overflow-y: auto;
}

.search-btn {
    content: url(../assets/icons/search.svg);
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    background-color: transparent;
    cursor: pointer;
}

.filter-btn svg path {
    transition: fill var(--transition);
}

.filter-btn span {
    transition: color var(--transition);
}

.filter-btn.active svg path,
.filter-btn:hover svg path {
    fill: white;
}

.filter-btn.active span,
.filter-btn:hover span {
    color: white;
}

.search-fixed-input,
.search-input {
    position: relative;
    border-radius: 16px;
    height: 100%;
    left: 50px;
    background-color: transparent;
    color: white;
}

.search-input {
    width: calc(100% - 170px);
}

.search-fixed-input {
    width: 100%;
}

.filter-btn {
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    background-color: transparent;
}

.filter-btn span {
    color: #5C5C5C;
}

.search-content {
    background-color: var(--black);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    top: calc(100% + 4px);
    left: 0;
    width: 100%;
    border-radius: 16px;
    padding: 24px;
}

.search-block>span {
    font-size: 12px;
    color: #5C5C5C;
}

.search-games__list.more {
    display: none;
}

.search-games__list.more.active {
    display: flex;
}

.search-fixed.active {
    display: flex;
}

.search-fixed.active .search-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.search-fixed.active .search-content button:last-of-type {
    background-color: #1B1B1B;
}

.search-games__item {
    padding: 10px 16px;
    border-radius: 8px;
    background-color: #1B1B1B;
    font-size: 14px;
    cursor: pointer;
    transition: color var(--transition);
    color: #AAB2BD;
}

.search-games__item.active {
    color: white;
    background-color: #373636;
}

.search-games__item:hover {
    color: white;
}

.more-btn {
    position: absolute;
    bottom: 0;
    right: 0;
    font-size: 14px;
    width: 140px;
    height: 48px;
    color: #5C5C5C;
    background: linear-gradient(90deg, rgba(33, 32, 32, 0) 0%, #161616 79.1%);
    text-align: end;
    display: flex;
    align-items: center;
    justify-content: end;
    cursor: pointer;
    padding: 13px;
}

.search-gamepad-block,
.search-localization-input {
    height: 52px;
    background-color: #1B1B1B;
    border-radius: 12px;
    position: relative;
    padding: 16px;
    width: 100%;
    display: flex;
    align-items: center;
}

.search-gamepad-block input,
.search-localization-input input {
    color: white;
    width: 100%;
    font-size: 14px;
    background-color: transparent;
    cursor: pointer;
}

.search-gamepad-block::after,
.search-localization-input::after {
    content: url(../assets/icons/dropdown-arrow.svg);
    position: absolute;
    right: 16px;
    top: calc(50% + 2px);
    transform: translateY(-50%);
    cursor: pointer;
}

.search-gamepad-dropdown,
.search-dropdown {
    position: absolute;
    top: calc(100% + 2px);
    width: 100%;
    transition: transform var(--transition);
    transform: translateY(-10px);
    opacity: 0;
    visibility: hidden;
    border-radius: 12px;
    padding: 0 16px 24px 16px;
    background-color: #1B1B1B;
    z-index: 10;
}

.search-gamepad-dropdown.active,
.search-dropdown.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.search-gamepad-dropdown__item,
.search-dropdown__item {
    padding: 20px 0;
    border-bottom: 1px solid #3E3E3E;
    font-size: 14px;
    color: white;
    transition: color var(--transition);
    cursor: pointer;
}

.search-gamepad-dropdown__item:hover,
.search-dropdown__item:hover {
    color: #5C5C5CCF;
}

/* SEARCH */

/* modal */
.modal-content {
    border-radius: 24px;
    background-color: #212020E0;
    box-shadow: 0px 32px 56px 0px rgba(22, 22, 22, 0.56);
    backdrop-filter: blur(32px);
    padding: 32px 48px;
    position: relative;
}

.close-modal {
    position: absolute;
    top: 24px;
    right: 24px;
    z-index: 2;
}

.auth-info {
    color: #5C5C5C;
}

.auth-info a {
    color: #CCD1D9;
}

.form-input {
    position: relative;
}

.form-input label {
    position: absolute;
    top: calc(50% - 4px);
    left: 16px;
    transform: translateY(-50%);
    color: #5C5C5C;
    transition: 0.2s ease all;
    pointer-events: none;
    font-size: 16px;
}

.form-input input:focus+label,
.form-input input:not(:placeholder-shown)+label {
    top: 12px;
    font-size: 12px;
}

.form-input input {
    width: 100%;
    height: 56px;
    border-radius: 12px;
    transition: 0.2s ease all;
    background-color: #161616;
    padding: 20px 16px 13px 16px;
    color: white;
    border: 1.6px solid #161616;
}

.form-input input:focus {
    border: 1.6px solid #28C3F4;
}

.eye {
    position: absolute;
    content: url(../assets/icons/eye.svg);
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    cursor: pointer;
}

.eye.active {
    content: url(../assets/icons/eye-close.svg);
}

/* modal */

/* custom-tooltip */
.custom-tooltip__text {
    min-width: 310px;
    border-radius: 12px;
    padding: 13px 20px;
    background-color: #1B1B1B;
    color: #F5F7FA;
    font-size: 14px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    transition: transform var(--transition), opacity var(--transition);
    opacity: 0;
    visibility: hidden;
}

.custom-tooltip.bottom .custom-tooltip__text {
    top: calc(100% + 10px);
}

.custom-tooltip.top .custom-tooltip__text {
    bottom: calc(100% + 10px);
}

.custom-tooltip__text::after {
    content: '';
    width: 10px;
    height: 10px;
    position: absolute;
    background-color: #1B1B1B;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
}

.custom-tooltip.bottom .custom-tooltip__text::after {
    top: -5px;
}

.custom-tooltip.top .custom-tooltip__text::after {
    bottom: -5px;
}

.custom-tooltip__icon {
    cursor: pointer;
    height: fit-content;
    width: fit-content;
}

.custom-tooltip__icon:hover~.custom-tooltip__text {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) translateX(-50%);
}

/* custom-tooltip */

/* custom-checkbox */
.custom-checkbox {
    min-width: 29px;
    min-height: 29px;
    max-width: 29px;
    max-height: 29px;
}

.custom-checkbox label {
    background-color: #161616;
    border-radius: 50%;
    cursor: pointer;
    height: 29px;
    width: 29px;
    left: 0;
    position: absolute;
    top: 0;
}

.custom-checkbox label:after {
    content: '';
    position: absolute;
    top: 0;
    left: 5px;
}

.custom-checkbox input[type="checkbox"] {
    visibility: hidden;
}

.custom-checkbox input[type="checkbox"]:checked+label {
    background-color: #395BE9;
}

.custom-checkbox input[type="checkbox"]:checked+label:after {
    content: url(../assets/icons/Check.svg);
}

/* custom-checkbox */

/* catalog-item */
.catalog-item {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.catalog-item__img {
    height: 256px;
    border-radius: 12px;
    width: 100%;
    overflow: hidden;
}

.catalog-item__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.catalog-item p {
    color: #5C5C5C;
    text-decoration: underline;
}

/* catalog-item */


@media (max-width: 1200px) {
    .search-fixed {
        background-color: #212020E0;
        border-radius: 24px;
        box-shadow: 0px 32px 56px 0px #1616168F;
        backdrop-filter: blur(32px);
        padding: 32px 12px;
    }
    
    .search-content {
        background-color: transparent;
        padding: 0;
    }
    
    .more-btn {
        background: transparent;
    }
}

@media (max-width: 579px) {
    .container {
        overflow-x: hidden;
    }
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10000;
    width: 100%;
    max-width: 100%;
    background-color: #212020E0;
    backdrop-filter: blur(32px);
    box-shadow: 0px -4px 24px 0px rgba(22, 22, 22, 0.56);
    padding: clamp(12px, 2vw, 24px) clamp(16px, 3vw, 32px);
    display: none;
    align-items: center;
    justify-content: flex-start;
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: fit-content;
    overflow-y: visible;
    overflow-x: visible;
    box-sizing: border-box;
    margin: 0;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideUpCentered {
    from {
        transform: translateX(-50%) translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

.cookie-banner__content {
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: clamp(12px, 2vw, 24px);
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    overflow: visible;
    word-wrap: break-word;
    overflow-wrap: break-word;
    flex-wrap: wrap;
    justify-content: space-between;
}

.cookie-banner__text {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
    overflow: visible;
}

.cookie-banner__title {
    font-size: clamp(14px, 1.5vw, 17px);
    font-weight: 600;
    color: white;
    margin: 0 0 clamp(4px, 0.5vw, 6px) 0;
    line-height: 1.3;
    overflow: visible;
}

.cookie-banner__description {
    font-size: clamp(11px, 1.2vw, 13px);
    color: #AAB2BD;
    margin: 0;
    line-height: 1.4;
    display: block;
    overflow: visible;
    word-break: break-word;
}

.cookie-banner__description--technical {
    font-size: clamp(10px, 1vw, 12px);
    color: #5C5C5C;
    margin-top: clamp(4px, 0.5vw, 6px);
    margin-bottom: clamp(4px, 0.5vw, 6px);
    margin-left: 0;
    line-height: 1.3;
    overflow: visible;
    word-break: break-word;
    width: 100%;
}

.cookie-banner__options {
    display: flex;
    flex-direction: column;
    gap: clamp(10px, 1.5vw, 14px);
    flex: 0 1 auto;
    align-items: flex-start;
    flex-wrap: nowrap;
    overflow: visible;
    min-width: 0;
    width: 100%;
}

.cookie-option {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    gap: 4px;
}

.cookie-checkbox {
    display: flex;
    align-items: flex-start;
    gap: clamp(8px, 1vw, 12px);
    cursor: pointer;
    flex: 0 1 auto;
    min-width: 0;
    overflow: visible;
}

.cookie-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    min-width: 20px;
    min-height: 20px;
    cursor: pointer;
    accent-color: #431BE3;
    flex-shrink: 0;
    margin-top: 2px;
}

.cookie-checkbox input[type="checkbox"]:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.cookie-label-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.cookie-label-title {
    font-size: clamp(11px, 1.2vw, 13px);
    color: white;
    font-weight: 500;
    line-height: 1.3;
    overflow: visible;
    word-break: break-word;
}

.cookie-label-desc {
    font-size: clamp(9px, 1vw, 11px);
    color: #5C5C5C;
    line-height: 1.2;
    overflow: visible;
    word-break: break-word;
}

.cookie-banner__actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(6px, 1vw, 8px);
    margin-top: 0;
    flex: 0 1 auto;
    min-width: fit-content;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    overflow: visible;
    flex-shrink: 1;
}

.cookie-btn {
    padding: clamp(8px, 1.2vw, 12px) clamp(16px, 2vw, 24px);
    border-radius: 10px;
    border: none;
    font-size: clamp(12px, 1.3vw, 14px);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    font-family: inherit;
    flex-shrink: 0;
    min-width: fit-content;
    box-sizing: border-box;
    overflow: visible;
    align-self: center;
}

.cookie-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.cookie-btn:active {
    transform: translateY(0);
}

.cookie-btn--accept {
    background: linear-gradient(90deg, #431BE3 0%, #26CBF5 100%);
    color: white;
}

.cookie-link {
    font-size: clamp(9px, 1vw, 11px);
    color: #AAB2BD;
    text-decoration: underline;
    transition: color 0.2s ease;
    white-space: normal;
    line-height: 1.2;
    overflow: visible;
    word-break: break-word;
    text-align: center;
    align-self: center;
}

.cookie-link:hover {
    color: white;
}

.cookie-links {
    display: flex;
    flex-direction: column;
    gap: clamp(4px, 0.5vw, 6px);
    align-items: center;
    width: 100%;
}

/* Большие экраны (Desktop, 1400px+) */
@media (min-width: 1400px) {
    .cookie-banner {
        padding: clamp(12px, 1.5vw, 16px) 0 !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        border-radius: 0 !important;
        box-shadow: 0px -4px 24px 0px rgba(22, 22, 22, 0.56);
        transform: none !important;
        animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        justify-content: flex-start !important;
        margin: 0 !important;
    }
    
    .cookie-banner__content {
        max-width: 100% !important;
        width: 100% !important;
        padding: 0 clamp(24px, 3vw, 48px) !important;
        flex-direction: row;
        align-items: center;
        gap: clamp(16px, 2vw, 24px);
        flex-wrap: nowrap;
        justify-content: space-between;
        box-sizing: border-box;
        margin: 0 !important;
    }

    .cookie-banner__text {
        flex: 1 1 auto;
        min-width: 0;
        max-width: none;
        width: auto;
    }

    .cookie-banner__options {
        flex-direction: row;
        flex: 0 1 auto;
        min-width: 0;
        width: auto;
        align-items: center;
    }

    .cookie-banner__actions {
        flex-direction: column;
        align-items: center;
        flex: 0 0 auto;
        min-width: fit-content;
        width: auto;
        gap: clamp(6px, 1vw, 8px);
        margin-left: clamp(16px, 2vw, 24px);
    }
}

/* Средние десктопы (1200px - 1399px) */
@media (min-width: 1200px) and (max-width: 1399px) {
    .cookie-banner {
        padding: clamp(12px, 1.5vw, 16px) 0 !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        border-radius: 0 !important;
        box-shadow: 0px -4px 24px 0px rgba(22, 22, 22, 0.56);
        transform: none !important;
        animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        justify-content: flex-start !important;
        margin: 0 !important;
    }
    
    .cookie-banner__content {
        max-width: 100% !important;
        width: 100% !important;
        padding: 0 clamp(20px, 2.5vw, 40px) !important;
        flex-direction: row;
        align-items: center;
        gap: clamp(14px, 1.8vw, 20px);
        flex-wrap: nowrap;
        justify-content: space-between;
        box-sizing: border-box;
        margin: 0 !important;
    }
    
    .cookie-banner__text {
        flex: 1 1 auto;
        min-width: 0;
        width: auto;
    }
    
    .cookie-banner__options {
        width: auto;
        flex-direction: row;
        align-items: center;
    }
    
    .cookie-banner__actions {
        flex: 0 0 auto;
        min-width: fit-content;
        width: auto;
        align-items: center;
        gap: clamp(6px, 1vw, 8px);
        margin-left: clamp(14px, 1.8vw, 20px);
    }
}

/* Планшеты в альбомной ориентации (992px - 1199px) */
@media (min-width: 992px) and (max-width: 1199px) {
    .cookie-banner {
        padding: clamp(16px, 2vw, 20px) clamp(18px, 2.5vw, 24px);
        bottom: clamp(12px, 1.5vw, 16px);
        left: 50%;
        right: auto;
        width: min(98%, 1000px);
        border-radius: 20px;
        box-shadow: 0px 24px 40px 0px rgba(22, 22, 22, 0.56);
        transform: translateX(-50%);
        animation: slideUpCentered 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .cookie-banner__content {
        max-width: 100%;
        flex-direction: column;
        gap: clamp(12px, 1.8vw, 18px);
        flex-wrap: nowrap;
    }
    
    .cookie-banner__text {
        flex: 0 1 auto;
        min-width: 0;
        width: 100%;
    }
    
    .cookie-banner__options {
        width: 100%;
        flex-direction: column;
    }
    
    .cookie-banner__actions {
        flex: 0 1 auto;
        min-width: fit-content;
        width: 100%;
        align-items: center;
    }
}

/* Планшеты в портретной ориентации (768px - 991px) */
@media (min-width: 768px) and (max-width: 991px) {
    .cookie-banner {
        padding: clamp(14px, 2vw, 18px) clamp(16px, 2.5vw, 22px);
        bottom: clamp(10px, 1.5vw, 12px);
        left: 50%;
        right: auto;
        width: min(98%, 800px);
        border-radius: 18px;
        box-shadow: 0px 20px 36px 0px rgba(22, 22, 22, 0.56);
        transform: translateX(-50%);
        animation: slideUpCentered 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .cookie-banner__content {
        max-width: 100%;
        flex-direction: column;
        gap: clamp(12px, 1.8vw, 16px);
        flex-wrap: nowrap;
    }
    
    .cookie-banner__text {
        flex: 0 1 auto;
        min-width: 0;
        width: 100%;
    }
    
    .cookie-banner__options {
        flex: 0 1 auto;
        min-width: 0;
        width: 100%;
        flex-direction: column;
    }

    .cookie-banner__actions {
        flex: 0 1 auto;
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

    .cookie-btn {
        width: auto;
        min-width: fit-content;
    }
}

/* Большие мобильные (576px - 767px) */
@media (min-width: 576px) and (max-width: 767px) {
    .cookie-banner {
        padding: clamp(14px, 2.5vw, 18px) clamp(16px, 3vw, 20px);
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        border-radius: 20px 20px 0 0;
        box-shadow: 0px -8px 24px 0px rgba(22, 22, 22, 0.56);
    }

    .cookie-banner__content {
        gap: clamp(12px, 2vw, 16px);
        flex-direction: column;
        flex-wrap: nowrap;
    }

    .cookie-banner__text {
        flex: 0 1 auto;
        width: 100%;
    }

    .cookie-banner__options {
        flex: 0 1 auto;
        width: 100%;
        flex-direction: column;
    }

    .cookie-banner__actions {
        flex: 0 1 auto;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: clamp(16px, 4vw, 24px);
    }

    .cookie-btn {
        width: 100%;
    }
}

/* Малые мобильные (до 575px) */
@media (max-width: 575px) {
    .cookie-banner {
        padding: clamp(12px, 3vw, 16px) clamp(14px, 3.5vw, 18px);
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        border-radius: 16px 16px 0 0;
        box-shadow: 0px -4px 16px 0px rgba(22, 22, 22, 0.56);
    }

    .cookie-banner__content {
        gap: clamp(10px, 2vw, 14px);
        flex-direction: column;
        flex-wrap: nowrap;
    }

    .cookie-banner__text {
        flex: 0 1 auto;
        width: 100%;
    }

    .cookie-banner__options {
        flex: 0 1 auto;
        width: 100%;
        flex-direction: column;
    }

    .cookie-banner__actions {
        flex: 0 1 auto;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: clamp(24px, 6vw, 40px);
    }

    .cookie-btn {
        width: 100%;
    }
}

/* Очень маленькие экраны (до 360px) */
@media (max-width: 360px) {
    .cookie-banner {
        padding: clamp(10px, 3vw, 14px) clamp(12px, 3.5vw, 16px);
    }

    .cookie-banner__content {
        gap: clamp(8px, 2vw, 12px);
    }
}

/* Ландшафтная ориентация на мобильных */
@media (max-height: 500px) and (orientation: landscape) {
    .cookie-banner {
        padding: clamp(10px, 2vw, 14px) clamp(12px, 2.5vw, 18px);
    }

    .cookie-banner__content {
        gap: clamp(8px, 1.5vw, 12px);
        flex-direction: row;
        flex-wrap: wrap;
    }

    .cookie-banner__text {
        flex: 1 1 auto;
        min-width: 0;
    }

    .cookie-banner__options {
        flex-direction: row;
        flex: 0 1 auto;
        min-width: 0;
    }

    .cookie-banner__actions {
        flex-direction: row;
        justify-content: flex-end;
        flex: 0 1 auto;
        min-width: fit-content;
    }

    .cookie-btn {
        flex: 0 1 auto;
        min-width: fit-content;
    }
}

/* Высокие экраны (более 1920px) */
@media (min-width: 1920px) {
    .cookie-banner {
        width: 100%;
        max-width: 100%;
        padding: clamp(12px, 1.5vw, 16px) 0;
    }
    
    .cookie-banner__content {
        padding: 0 clamp(28px, 3vw, 48px);
    }
}