*:where( :not(html,
        iframe,
        canvas,
        img,
        svg,
        video,
        audio,
        #theatrejs-studio-root):not(svg *, symbol *)) {
    all: unset;
    display: revert;
}

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

:root {
    font-family: sans-serif;
    --bg-dark: #070707;
    --bg-dark-secondary: #1b1b1b;
    --primary: #FFC600;
    --secondary: #9200FF;
    --secondary-dark: #4C0383;
    --secondary-hover: #9000ffa8;
    --text-primary: #FBFBFB;
    --text-primary-muted: #DBDBDB;
    --text-secondary: #070707;
    --less-dark: #616161;
    --divider: #9a9aa5;
    --card-bg: #e5e5ef;
    --bg-img: url("/img/iframe-bg.jpg");
    --shadow-light: #111e2d2d;
    --overlay: #000000b7;
}

body {
    color: var(--text-primary-muted);
    background-color: var(--bg-dark);
    line-height: 1.65rem;
}

main {
    overflow: hidden;
}

img {
    max-inline-size: 100%;
    max-block-size: 100%;
}

.block-center {
    display: block;
    margin-inline: auto;
    width: max-content;
    border-radius: 20px;
    overflow: hidden;
}

ul,
ol,
menu {
    list-style: none;
}

a {
    color: inherit;
    text-decoration: inherit;
}

table {
    border-collapse: collapse;
}

a,
button {
    cursor: revert;
}

h1 {
    font-weight: 700;
    font-size: clamp(2rem, 5vw, 3.5rem);
    text-wrap: balance;
    color: var(--text-primary);
    line-height: 1;

    .title-sub {
        font-weight: 400;
        color: var(--text-primary-muted);
        font-size: clamp(1.5rem, 3.5vw, 2rem);
    }

    .nowrap {
        text-wrap: nowrap;
    }
}

h2 {
    font-weight: 700;
    font-size: clamp(1.75rem, 5vw, 2.5rem);
    margin-bottom: 24px;
    line-height: 1;
    color: var(--text-primary);

    &.centered {
        text-align: center;
    }

    &.margin-small {
        margin-bottom: 8px;
    }

    @media (max-width: 650px) {
        margin-bottom: 16px;
    }
}

h3 {
    font-weight: 700;
    font-size: clamp(1.125rem, 5vw, 1.5rem);
    margin-bottom: 16px;
    line-height: 1;
    color: var(--text-primary);

    @media (max-width: 650px) {
        margin-bottom: 8px;
    }

    &.h3-regular {
        font-weight: 500;
    }
}

p {
    margin-bottom: 12px;

    &.centered {
        text-align: center;
    }
}

.p-anchor {
    color: var(--text-primary);
    font-weight: 700;
    transition: color 0.15s ease;
}

.p-anchor:hover {
    color: var(--secondary);
}

.p-fine {
    width: 100%;
    font-size: 12px;
    text-align: center;
    text-wrap: pretty;
    margin: 0;
    line-height: 1.5;
    opacity: .7;
}

strong {
    font-weight: 700;
}

blockquote {
    padding-inline-start: 24px;
    border-left: 2.5px var(--secondary) solid;
    border-radius: 4px;
    margin-bottom: 16px;
    font-style: italic;

    @media (max-width: 550px) {
        padding-inline-start: 16px;
    }
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 130px;
    height: 50px;
    padding: 12px 24px;
    font-weight: 700;
    text-wrap: nowrap;
    background-color: var(--primary);
    color: var(--text-secondary);
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.btn--nav {
    min-width: 100px;
    height: 42px;
    padding: 10px 16px;
    font-size: 14px;
}

.btn--secondary {
    color: var(--text-primary);
    background-color: transparent;
    border: 2.5px var(--primary) solid;
}

@media (min-width: 650px) {
    .btn:hover {
        transform: translateY(-2px);
        background-color: var(--secondary);
        color: var(--text-primary);
        box-shadow: 0px 2px 8px var(--secondary-hover), 0px 0px 16px var(--secondary-dark);
    }

    .btn--secondary:hover {
        background-color: var(--secondary-dark);
        border-color: var(--secondary);
    }
}

.section-break {
    height: 120px;
    width: 100%;

    @media (max-width: 650px) {
        height: 80px;
    }
}

.margin-block-large {
    height: 80px;
    width: 100%;

    @media (max-width: 650px) {
        height: 40px;
    }
}

.margin-block-small {
    height: 40px;
    width: 100%;

    @media (max-width: 650px) {
        height: 24px;
    }
}

.margin-block-article {
    height: 24px;
    width: 100%;

    @media (max-width: 650px) {
        height: 16px;
    }
}


.section {
    margin: auto;
    display: block;
    max-width: 1200px;
    padding-inline: clamp(8px, 4.5vw, 75px);
}

body.nav-open {
    overflow: hidden;
}

.header-layout {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100px;

    @media (max-width: 1000px) {
        height: 80px;
    }
}

.header-layout__logo {
    width: auto;
    height: 57px;

    @media (max-width: 1000px) {
        height: 50px;
    }
}

.header-layout__site-nav {
    display: flex;
    align-items: center;
    gap: 24px;

    @media (max-width: 1000px) {
        position: fixed;
        z-index: 100;
        top: 0;
        left: 0;
        right: 0;
        height: 100dvh;
        display: none;
        flex-direction: column;
        justify-content: center;
        gap: 16px;
        padding: 16px;
        background-color: var(--bg-dark);
        background-position: center;
        background-size: cover;

        ul {
            flex-direction: column;
            color: var(--text-primary);
            text-align: center;
        }

        &.is-open {
            display: flex;
        }

        img {
            border-radius: 8px;
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
    }
}

.site-nav__nav-list {
    display: flex;
    gap: 12px;
}

.burger {
    display: none;
    width: 46px;
    min-width: 0px;
    height: 46px;
    position: relative;
    z-index: 150;
    border: 0;
    cursor: pointer;
    border-radius: 7px;
    border: 2.5px var(--primary) solid;
    background-color: transparent;

    & span,
    &::before,
    &::after {
        content: "";
        position: absolute;
        left: 11px;
        right: 11px;
        height: 2px;
        border-radius: 2px;
        background: var(--text-primary);
        transition: transform 0.2s, top 0.2s, opacity 0.2s;
    }

    & span {
        top: 22px;
    }

    &::before {
        top: 13px;
    }

    &::after {
        top: 27px;
    }

    &.is-open {
        & span {
            opacity: 0;
        }

        &::before {
            top: 20px;
            transform: rotate(45deg);
        }

        &::after {
            top: 20px;
            transform: rotate(-45deg);
        }
    }
}

@media (max-width: 1000px) {
    .burger {
        display: inline-flex;
    }
}

.lang-switcher {
    display: inline-block;
    anchor-name: --lang-switcher;
}

.lang-switcher__btn {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 16px;
    background: transparent;
    border-radius: 8px;
    border: 2.5px var(--bg-dark-secondary) solid;
    font-size: 14px;
    font-weight: 500;
    color: inherit;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s;
}

.lang-switcher__btn:hover {
    background: var(--bg-dark-secondary);
}

.lang-switcher__caret {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
    opacity: 0.5;
    transition: transform 0.15s;
}

.lang-switcher:has(#lang-picker:popover-open) .lang-switcher__caret {
    transform: rotate(-135deg);
}

.lang-switcher__menu {
    position: absolute;
    inset: unset;
    margin: 0;
    padding: 6px;
    list-style: none;

    position-anchor: --lang-switcher;
    position-area: bottom span-left;
    position-try-fallbacks: flip-block, flip-inline;
    margin-top: 6px;

    min-width: 200px;
    background: var(--bg-dark);
    border: 2.5px var(--bg-dark-secondary) solid;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgb(0 0 0 / 10%), 0 2px 6px rgb(0 0 0 / 6%);
}

.lang-switcher__menu::backdrop {
    background: transparent;
}

.lang-switcher__menu li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.1s;
}

.lang-switcher__menu li a:hover {
    background: var(--bg-dark-secondary);
}

.lang-switcher__menu li a[aria-current="page"] {
    color: var(--primary);
    font-weight: 700;
    background: var(--bg-dark-secondary);
}

.lang-switcher__flag {
    font-size: 18px;
    line-height: 1;
    flex-shrink: 0;
}

.lang-switcher__name {
    flex: 1;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
        "header picture"
        "details details";
    align-items: center;
    gap: 24px;

    &.compact {
        grid-template-areas:
        "header picture";
    }

    .hero-header {
        grid-area: header;
    }

    .hero-game-details {
        grid-area: details;
    }

    .hero-figure {
        grid-area: picture;
    }

    >div {
        height: auto;
        flex-shrink: 1;
        align-content: center;
    }

    p {
        margin-block: clamp(24px, 3vw, 40px);
        text-wrap: pretty;
    }
}

.hero-game-details {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    height: min-content;
    padding: 16px;
    border-radius: 8px;
    border: 1px var(--bg-dark-secondary) solid;
    background-image: linear-gradient(to bottom, var(--bg-dark-secondary), var(--bg-dark));

    div {
        display: flex;
        flex-direction: column;
        gap: 4px;
        justify-content: center;
        align-items: center;
    }

    dd {
        color: var(--primary);
        font-weight: 700;
    }

    @media (max-width: 500px) {
        grid-template-columns: repeat(2, 1fr);
        row-gap: 16px;
    }
}

.hero-btn-wrap {
    display: flex;
    width: 100%;
    gap: 16px;
}

.hero-img {
    width: 100%;
    height: auto;
    border-radius: 22px;
    object-fit: cover;
}

@media (max-width: 750px) {
    .hero-grid {
        grid-template-columns: 1fr;
        grid-template-areas:
            "header"
            "details"
            "picture";
        gap: 40px;

        >div {
            width: auto;
        }

        p {
            margin-block: 24px;
        }

        &.compact {
            grid-template-areas:
            "header"
            "picture";

            gap: 0;
        }
    }
}

.hero-flex {

    h1 {
        margin-block-end: 12px;
    }

    .title-sub {
        font-weight: 400;
        color: var(--text-primary-muted);
        font-size: clamp(1.4rem, 4vw, 1.75rem);
    }

    p {
        margin-block: 24px;
    }

    & figure {
        width: 100%;
        height: auto;
        aspect-ratio: 3 / 2;
        border-radius: 20px;
        overflow: hidden;

        @media (max-width: 550px) {
            aspect-ratio: 2 / 3;
        }
    }

    & img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
}

.game-stage {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: var(--bg-dark-secondary);
    border-radius: 12px;
    overflow: hidden;
}

.game-stage iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.game-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: var(--bg-img);
    background-size: cover;
    background-position: center;
}

.game-overlay::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
}

.play-button {
    position: relative;
    z-index: 1;
}

.game-stage.is-playing .game-overlay {
    display: none;
}

@media (max-width: 600px) {
    .game-stage {
        aspect-ratio: 9 / 16;
        max-width: 100%;
    }
}

.ul-default {
    list-style-type: disc;
    list-style-position: inside;
    padding-left: 16px;
    margin-bottom: 12px;
}

.btn-break {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 80px;
    gap: 16px;
}


.details {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 48px;
    background: var(--text-primary);
    border-radius: 24px;
    color: var(--bg-dark);
    position: relative;

    .details-img {
        width: clamp(180px, 30vw, 250px);
        position: absolute;
        top: -60px;
        right: -40px;
        margin-left: auto;
        transition: transform 0.3s ease;

        &:hover {
            transform: rotate(-20deg);
        }
    }

    .details__title {
        margin: 0 0 28px;
        font-size: 1.9rem;
        font-weight: 800;
        letter-spacing: -0.02em;
        text-transform: uppercase;
        color: inherit;
    }

    .details__grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0 64px;
    }

    .details__list {
        margin: 0;
    }

    .details__row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        align-items: center;
        gap: 16px;
        padding: 16px 0;
        border-bottom: 1px solid var(--divider);

        dt {
            color: var(--bg-dark-secondary);
            font-size: 1rem;
        }

        dd {
            margin: 0;
            color: var(--bg-dark);
            font-weight: 700;
            font-size: 1rem;
        }
    }

    @media (max-width: 700px) {
        padding: 28px 22px;

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

.booster-list {
    display: flex;
    flex-direction: column;
    gap: 24px;

    >li {
        background: linear-gradient(to right, var(--bg-dark-secondary), transparent);
        border: 2px var(--bg-dark-secondary) solid;
        border-radius: 20px;
        padding: 24px;
        display: flex;
        align-items: center;
        gap: 24px;

        strong {
            color: var(--text-primary);
        }
    }

    >img {
        max-width: 150px;
        height: auto;
    }
}

@media (max-width: 500px) {
    .booster-list li {
        flex-direction: column;

        img {
            width: 120px;
            height: 120px;
        }
    }
}

.author-wrap {
    display: flex;
    gap: 40px;
    align-items: center;
    margin-bottom: 24px;

    & p {
        font-size: 12px;
        line-height: 1.5;
        opacity: .7;
    }

    @media (max-width: 550px) {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        margin-block: 16px;

        & p {
            margin: 0;
        }
    }
}

.author-profile {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 128px;
    height: 128px;
    border-radius: 100px;
    overflow: hidden;
    flex-shrink: 0;

    & img {
        width: 128px;
        height: 128px;
        aspect-ratio: 1;
        object-fit: cover;
    }
}

.award-banner-wrap {
    width: 100%;
    background-color: var(--primary);
}

.award-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    height: 200px;

    h3 {
        color: var(--text-secondary);
        font-size: 2rem;
        font-weight: 700;
        margin: 0;
    }

    p {
        color: var(--text-secondary);
        font-weight: 700;
        margin: 0;
    }

    img {
        position: absolute;
        bottom: -44px;
        left: 0;
        right: 0;
        margin-left: auto;
        margin-right: auto;
        z-index: 10;
        width: 300px;
        height: auto;
        max-height: none;

        @media (max-width: 750px) {
            display: none;
        }
    }

    @media (max-width: 700px) {
        flex-direction: column;
        align-items: flex-start;
        padding-block: 16px;
        height: 220px;
    }
}

.thumbnail-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

@media (max-width: 900px) {
    .thumbnail-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 650px) {
    .thumbnail-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.thumbnail-grid-item {
    position: relative;
    aspect-ratio: 1 / 1;
    width: 100%;
    height: auto;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    border: none;
    padding: 0;
}

.thumbnail-grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.2s ease;
}

.thumbnail-grid-item:hover img,
.thumbnail-grid-item:focus-visible img {
    transform: scale(1.05);
}

.thumbnail-grid-item:focus-visible {
    outline: 2px solid #1a1a1a;
    outline-offset: 3px;
}

.lightbox {
    position: fixed;
    inset: 0;
    background: var(--overlay);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.25s;
    z-index: 1000;
}

.lightbox.open {
    opacity: 1;
    visibility: visible;
}

.lightbox img {
    max-width: 90vw;
    max-height: 86vh;
    object-fit: contain;
    border-radius: 8px;
    user-select: none;
}

.lb-btn {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    min-width: 0;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: var(--bg-dark-secondary);
    color: var(--text-primary-muted);
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.lb-btn:hover {
    background: rgba(0, 0, 0, 0.6);
}

.lb-btn:active {
    transform: scale(0.92);
}

.lb-btn:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.lb-btn svg {
    width: 24px;
    height: 24px;
}

.lb-close {
    top: 20px;
    right: 20px;
}

.lb-prev {
    left: clamp(12px, 3vw, 32px);
    top: 50%;
    transform: translateY(-50%);
}

.lb-next {
    right: clamp(12px, 3vw, 32px);
    top: 50%;
    transform: translateY(-50%);
}

.lb-prev:active,
.lb-next:active {
    transform: translateY(-50%) scale(0.92);
}

details summary::-webkit-details-marker,
details summary::marker {
    display: none;
    content: "";
}

.faq-details {
    padding: 24px;
    margin-block-end: 24px;
    border-radius: 8px;
    border: 1px var(--bg-dark-secondary) solid;
    overflow: hidden;
    background-image: linear-gradient(to bottom, var(--bg-dark-secondary), var(--bg-dark));

    h3 {
        margin-bottom: 0px;
        user-select: none;
        cursor: pointer;
    }

    p {
        margin-top: 16px;
        margin-bottom: 0px;
    }

    @media (max-width: 450px) {
        padding: 16px;
        margin-block-end: 16px;
    }

}

.footer {
    display: flex;
    flex-direction: column;
    align-items: center;

    >img {
        margin-block-end: 16px;
    }
}

.footer__2column {
    width: 100%;
    display: flex;
    gap: 24px;

    >div {
        display: flex;
        flex-direction: column;
        width: 50%;
        align-items: center;
        justify-content: space-between;
    }

    div p {
        font-size: 12px;
        text-align: center;
        line-height: 1.5;
        opacity: .7;
    }

    @media (max-width: 700px) {
        flex-direction: column;

        >div {
            width: 100%;
        }
    }
}

.footer-span {
    font-size: 12px;
    text-align: center;
    line-height: 1.5;
    opacity: .7;
    margin-block-end: 16px;
}

.secure-gaming-badges {
    display: flex;
    gap: 24px;
}

.secure-gaming-badge {
    display: flex;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px var(--primary) solid;
    user-select: none;
    transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;

    &.link {
        cursor: pointer;
    }
}

@media (min-width: 650px) {
    .secure-gaming-badge.link:hover {
        transform: translateY(-2px);
        background-color: var(--secondary);
        color: var(--text-primary);
        border-color: var(--secondary);
        box-shadow: 0px 2px 8px var(--secondary-hover);
    }
}

.footer__grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
}