.ocean-page {
    padding: 24px 0 40px;
    color: #e8f1f8;
}

.ocean-page__title {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 20px;
    line-height: 1.2;
}

.ocean-page__content {
    font-size: 15px;
    line-height: 1.6;
}

.ocean-page__content h1,
.ocean-page__content h2,
.ocean-page__content h3 {
    margin: 1.2em 0 0.6em;
}

.ocean-page__content a {
    color: #fe7900;
}

.ocean-page__content img {
    max-width: 100%;
    height: auto;
}

.ocean-catalog__title {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 20px;
    color: #fff;
}

.ocean-compat {
    color: #e8f1f8;
}

.ocean-compat .section__main,
.ocean-compat main.section__main {
    padding: 0;
    margin: 0;
    background: transparent;
}

.ocean-compat .main_rules,
.ocean-compat .page_content {
    color: inherit;
}

.ocean-compat .button,
.ocean-compat .preview__button {
    cursor: pointer;
}

/* Game cards — sizes like ocean-slots.com reference */
.main-category .main-category__list {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 16px;
}

.main-category .main-category__list .game-element {
    width: 100%;
}

/* Catalog: flex + calc widths from style.css (main-games breakpoints) */
.games__list {
    display: flex !important;
    flex-wrap: wrap;
    gap: 16px;
}

.games__list .game-element {
    width: calc((100% / 8) - 14px) !important;
}

@media (max-width: 1500px) {
    .games__list .game-element {
        width: calc((100% / 7) - 14px) !important;
    }
}

@media (max-width: 1300px) {
    .games__list .game-element {
        width: calc((100% / 6) - 14px) !important;
    }
}

@media (max-width: 1150px) {
    .games__list .game-element {
        width: calc((100% / 5) - 13px) !important;
    }
}

@media (max-width: 740px) {
    .games__list .game-element {
        width: calc((100% / 4) - 12px) !important;
    }
}

@media (max-width: 576px) {
    .games__list .game-element {
        width: calc((100% / 3) - 11px) !important;
    }
}

@media (max-width: 400px) {
    .games__list .game-element {
        width: calc((100% / 2) - 8px) !important;
    }
}

/* Single-list homepage sections: keep grid visible on mobile like reference --mobile list */
@media (max-width: 992px) {
    .main-category .main-category__list {
        display: grid !important;
        grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)) !important;
        gap: 16px !important;
        align-items: start !important;
    }

    .main-category .main-category__list .game-element:nth-child(n + 10) {
        display: none;
    }
}

@media (max-width: 768px) {
    .main-category .main-category__list {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)) !important;
    }
}

/* Карточки игр: обложка ровно по размеру карточки (3:4) */
.game-element .game-element__wrapper {
    position: relative;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    border-radius: 12px;
}

.game-element .game-element__bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding-top: 0 !important;
    margin: 0;
    border-radius: inherit;
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
}

/* Плейсхолдер логотипа до загрузки обложки */
.game-element .game-element__wrapper:not(:has(.game-element__bg.lazyloaded)):not(:has(.game-element__bg.lazyerror)) {
    background-size: 90% auto !important;
    background-position: center center;
    background-repeat: no-repeat;
}

.game-element .game-element__wrapper:has(.game-element__bg.lazyloaded),
.game-element .game-element__wrapper:has(.game-element__bg.lazyerror) {
    background-image: none !important;
}

.game-element .game-element__bg.is-cover-fit,
.game-element .game-element__bg.lazyloaded,
.game-element .game-element__bg.lazyerror {
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    padding-top: 0 !important;
    transform: none !important;
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
}

@media (max-width: 500px) {
    .game-element .game-element__bg {
        padding-top: 0 !important;
    }
}

/* Mobile: compact homepage sections */
@media (max-width: 992px) {
    .content .container {
        padding-left: 12px;
        padding-right: 12px;
    }

    .main-actions {
        flex-direction: column !important;
        gap: 8px;
        margin-bottom: 14px;
    }

    .main-actions .main-actions__button {
        width: 100% !important;
        height: 38px;
        font-size: 13px;
    }

    .main-links {
        width: 100%;
    }

    .main-links .swiper-slide .base-button {
        height: 36px;
        font-size: 12px;
        padding: 0 10px;
    }

    .main-category {
        margin-bottom: 16px;
    }

    .main-category .main-category__header {
        margin-bottom: 8px;
    }

    .main-category .main-category__title {
        font-size: 16px;
        gap: 8px;
    }

    .main-category .main-category__link {
        height: 32px;
        min-height: 32px;
        padding: 0 10px;
        font-size: 12px;
        border-radius: 8px;
    }

    .main-games .games__title {
        font-size: 16px;
        margin-bottom: 10px;
    }

    .main-games .games__list {
        gap: 16px;
    }

    .main-combine {
        flex-direction: column !important;
        gap: 10px;
        margin-bottom: 16px;
    }

    .main-winners,
    .main-tournament {
        max-width: 100% !important;
        width: 100% !important;
        padding: 12px;
        border-radius: 14px;
    }

    .main-winners .winners__title {
        margin-bottom: 8px;
        min-height: 0;
        font-size: 14px;
        gap: 8px;
        margin-left: -12px;
    }

    .main-tournament .swiper-slide {
        min-height: 210px !important;
        padding: 12px;
    }

    .main-tournament .tournament__title {
        font-size: 16px;
    }

    .main-tournament .tournament__block {
        padding: 10px;
        gap: 10px;
    }

    .main-vip {
        margin-bottom: 16px;
    }

    .main-vip .main-vip__body,
    .main-vip .main-vip__item {
        padding: 12px;
    }

    .main-random {
        margin-bottom: 16px;
    }

    .main-random .random__title {
        font-size: 16px;
        margin-bottom: 2px;
    }

    .main-random .random__desc {
        margin-bottom: 10px;
        font-size: 13px;
    }

    .main-random .random__body {
        padding: 12px;
    }

    .main-random .random__slider {
        margin-bottom: 10px;
    }

    .main-jackpot {
        margin-bottom: 16px;
        padding: 0 8px 16px;
    }

    .main-jackpot .main-jackpot__title {
        font-size: 16px;
        padding: 0 12px 6px;
        margin-bottom: 8px;
    }

    .main-jackpot .main-jackpot__ranks {
        gap: 16px;
        margin-top: 10px;
    }

    .main-sliders {
        margin-bottom: 14px;
    }

    .main-sliders .main-sliders__header {
        margin-bottom: 8px;
    }

    .main-sliders .main-sliders__title {
        font-size: 16px;
    }

    .providers-item {
        min-height: 72px;
        padding: 6px;
        border-radius: 12px;
    }

    .providers-item__img {
        height: 40px;
    }
}

@media (max-width: 576px) {
    .main-tournament .swiper-slide {
        min-height: 185px !important;
    }
}

.ocean-game-page {
    min-height: 100vh;
    background: #0f1923;
    color: #e8f1f8;
    display: flex;
    flex-direction: column;
}

.ocean-game-page__header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #1a2b38;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.ocean-game-page__back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
    text-decoration: none;
}

.ocean-game-page__title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ocean-game-page__frame-wrap {
    flex: 1 1 auto;
    min-height: calc(100vh - 65px);
    padding: 0;
}

.ocean-game-page__frame {
    display: block;
    width: 100%;
    height: calc(100vh - 65px);
    min-height: 480px;
    border: 0;
    background: #000;
}

.main-preloader {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    width: 100%;
    height: 100%;
    background-color: #121e28;
}

.main-preloader img {
    max-width: 300px;
    max-height: 80px;
}

.main-preloader svg {
    max-width: 300px;
    max-height: 80px;
}

.preloader-circles {
    position: relative;
    height: 50px;
    margin: 20px auto 0;
    width: 300px;
}

.preloader-circles::before,
.preloader-circles::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    display: block;
    width: 50px;
    height: 50px;
    margin: auto;
    border: 2px solid #ff9f31;
    border-radius: 50%;
    opacity: 0;
    animation: loader-1 1.5s cubic-bezier(0.075, 0.82, 0.165, 1) infinite;
}

.preloader-circles::after {
    animation: loader-2 1.5s cubic-bezier(0.075, 0.82, 0.165, 1) 0.1s infinite;
}

@keyframes loader-1 {
    0% {
        transform: translate3d(0, 0, 0) scale(0);
        opacity: 1;
    }

    40% {
        opacity: 1;
    }

    100% {
        transform: translate3d(0, 0, 0) scale(1.5);
        opacity: 0;
    }
}

@keyframes loader-2 {
    0% {
        transform: translate3d(0, 0, 0) scale(0);
        opacity: 1;
    }

    40% {
        opacity: 1;
    }

    100% {
        transform: translate3d(0, 0, 0) scale(1);
        opacity: 0;
    }
}

.game-element .game-element__wrapper > .game-element__favorite {
    z-index: 5;
    opacity: 0;
    pointer-events: none;
    -webkit-transition: opacity 0.2s ease-in-out;
    transition: opacity 0.2s ease-in-out;
}

.game-element .game-element__wrapper:hover > .game-element__favorite {
    opacity: 1;
    pointer-events: auto;
}

.game-element .game-element__layout {
    pointer-events: none;
}

.game-element .game-element__wrapper:hover .game-element__layout {
    pointer-events: auto;
}

/* Mobile layout fixes */
@media (max-width: 992px) {
    :root {
        --sidebar-width: 0px;
    }

    .main-sidebar {
        width: min(320px, 88vw);
        min-width: 0;
    }

    .main-sidebar.open {
        opacity: 1;
        visibility: visible;
    }

    .main-sidebar .sidebar__toggle--mobile {
        display: flex !important;
    }

    .mobile-menu {
        padding-bottom: env(safe-area-inset-bottom, 0);
        width: 100%;
        left: 0;
        right: 0;
    }

    .mobile-menu .mobile-menu__item {
        flex: 1 1 0;
        min-width: 0;
        width: auto;
        max-width: none;
        font-size: 10px;
        padding: 0 2px;
        text-align: center;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mobile-menu .mobile-menu__item svg {
        flex-shrink: 0;
    }

    .mobile-menu .mobile-menu__item--deposit {
        flex: 0 0 auto;
        width: 52px;
        min-width: 52px;
        overflow: visible;
    }

    .profile .profile__tabs {
        gap: 12px;
        max-width: 100%;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .profile .profile__tabs::-webkit-scrollbar {
        display: none;
    }

    .profile .profile__tab {
        flex-shrink: 0;
        white-space: nowrap;
        font-size: 14px;
    }

    .profile .profile__info {
        flex-direction: column;
    }

    .profile .profile__info_separator {
        width: 100%;
        height: 2px;
        min-height: 2px;
    }

    .profile .profile__info_caption {
        flex-wrap: wrap;
        gap: 4px;
    }

    .profile .profile__info_caption span {
        word-break: break-word;
    }

    .tournament .tournament__wrapper {
        flex-direction: column;
    }

    .tournament .tournament__left,
    .tournament .tournament__right {
        width: 100%;
    }

    .bonuses .bonuses__list {
        grid-template-columns: 1fr;
    }

    .modal .modal__body {
        max-height: calc(100dvh - 120px);
        overflow-y: auto;
    }
}

@media (max-width: 576px) {
    .header .header__action--deposit .base-button span {
        display: none;
    }
}

.mobile-menu .mobile-menu__item--balance {
    flex-direction: column;
    gap: 2px;
    min-width: 72px;
    line-height: 1.1;
}

.mobile-menu .mobile-menu__balance-value {
    color: #fff;
    font-size: 13px;
    font-weight: 700;
}

.mobile-menu .mobile-menu__balance-currency {
    color: #7d9cb3;
    font-size: 11px;
}
