/* fonts */
@font-face {
    font-family: "Montserrat-ExtraBold";
    font-style: normal;
    font-weight: 800;
    src: url("./fonts/Montserrat-ExtraBold.woff2") format("woff2");
}

@font-face {
    font-family: "Montserrat-Medium";
    font-style: normal;
    font-weight: 500;
    src: url("./fonts/Montserrat-Medium.woff2") format("woff2");
}

@font-face {
    font-family: "Montserrat-Regular";
    font-style: normal;
    font-weight: 500;
    src: url("./fonts/Montserrat-Regular.woff2") format("woff2");
}

@font-face {
    font-family: "Montserrat-SemiBold";
    font-style: normal;
    font-weight: 600;
    src: url("./fonts/Montserrat-SemiBold.ttf") format("truetype");
}

@font-face {
    font-family: "Montserrat-Bold";
    font-style: normal;
    font-weight: 700;
    src: url("./fonts/Montserrat-Bold.woff2") format("woff2");
}

/* base */

:root {
    --header-height: 70px;
    --footer-height: auto;
    --color-primary: #4CC7D6;
    --color-secondary: #02B0C4;
    --color-bg: #F0FDFF;
    --block-container-gutter: 16px;
    --block-container-width: 620px;
    --border-radius: 15px;
    --block-height: 540px;
}

*, :after, :before {
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
}

html {
    height: 100%;
    margin: 0;
}

body {
    height: 100%;
    margin: 0;
    padding-top: calc(var(--header-height) - var(--border-radius));
    display: flex;
    flex-direction: column;
    font-family: 'Montserrat', sans-serif;
    line-height: 1.2em;
    background-color: var(--color-bg);
}

button {
    font-family: inherit;
}
button:hover {
    cursor: pointer;
}

.main-content {
    flex: 1 0 auto;
    padding: calc(10px + var(--border-radius)) 0 calc(40px + var(--border-radius));
}

.z-btn {
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 15px;
    font-size: 18px;
    font-weight: 700;
    border-radius: 10px;
    border: 3px solid transparent;
    transition: all .3s ease;
    text-decoration: none;
}
.z-btn--blue,
.z-btn--outlined:hover  {
    color: #fff;
    background-color: var(--color-primary);
    -webkit-box-shadow: 0 0 10px rgba(13, 119, 135, .1);
    box-shadow: 0 0 10px rgba(13, 119, 135, .1);
}
.z-btn--blue:hover,
.z-btn--outlined {
    color: var(--color-primary);
    border-color: var(--color-primary);
    background-color: #fff;
}

/* header */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10%;
    border-bottom-left-radius: var(--border-radius);
    border-bottom-right-radius: var(--border-radius);
    z-index: 15;
    background: var(--color-primary);
}

.header-right_mobile {
    display: none;
}

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

.header-right {
    display: flex;
    align-items: center;
    gap: 1vh;
}

.burger-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
}

.header-search, .live-broadcast, .account {
    background: #70d2de;
    border: none;
    font-family: Montserrat-Regular, sans-serif;
    font-size: 1.5vh;
    display: flex;
    align-items: center;
    gap: 1vh;
    color: #ffffff;
    padding: 1vh 1.5vh;
    border-radius: 1000px;
}

.live-broadcast {
    font-family: Montserrat-Bold, sans-serif;
    font-size: 1.5vh;
    white-space: nowrap;
}

.account {
    padding: 1vh;
    border-radius: 100px;
}

.header-menu {
    background: none;
    border: none;
    text-decoration: none;
    font-size: 18px;
    cursor: pointer;
    color: #ffffff;
    white-space: nowrap;
}

.menu-btn {
    background: none;
    border: none;
    font-family: Montserrat-Bold;
    font-size: 1.8vh;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.menu-btn:hover {
    transform: scale(1.05);
}

.menu, .block {
    max-width: 620px;
    margin: 0 auto;
}

.menu, .info-block {
    box-shadow: 0px 0px 20px 0px #0D778733;
}

.menu, .info-block, .rating-block {
    margin-inline: max(var(--block-container-gutter), (100% - var(--block-container-width)) / 2);
}

.menu {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    height: 60px;
    border-radius: var(--border-radius);
    background: #fff;
}
.menu__item {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--color-secondary);
    font-size: 16px;
    font-weight: 400;
    background: none;
    border: none;
    transition: all .3s ease;
}
.menu__item.active {
    font-weight: 700;
} 
.menu__item:hover {
    opacity: 0.85;;
}

.block-wrap {
    min-height: var(--block-height);
}

.block {
    display: none;
    border-radius: var(--border-radius);
}
.block.active {
    display: block;
}
.block:not(.game-block) {
    overflow: hidden;
}

.enter-block {
    position: relative;
    flex-direction: column;
    justify-content: flex-end;
    padding-bottom: 56px;
    min-height: var(--block-height);
    align-items: center;
    border: 2px solid var(--color-primary);
}
.enter-block.active {
    display: flex;
}

.enter-block__mobile {
    display: none;
}

.enter-block__button {
    width: 282px;
    margin-top: 10px;
    background: #FF00C6;
    color: #fff;
    z-index: 1;
}
.enter-block__button:hover {
    color: #FF00C6;
    border-color: #FF00C6;
    background-color: #fff;
}

.tso-game-frame {
    background: #FFF url(./images/enter-bg-mobile.png) 50% 50% no-repeat;
    background-image: image-set(
        url('./images/enter-bg-mobile.png') 1x,
        url('./images/enter-bg-mobile@2x.png') 2x
    );
    height: var(--block-height);
    border-radius: var(--border-radius);
    border: 2px solid var(--color-primary);
}

.tso-game-popup {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    height: 100%;
}

.game-quiz__title {
    line-height: 1.2em;
}

.info-block {
    padding: 25px;
    color: #444444;
    background: #FFF;
}

.info-block__img {
    overflow: hidden;
    height: 260px;
    border-radius: 10px;
}
.info-block__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.info-block__title {
    font-size: 28px;
    margin: 20px 0 15px;
    text-transform: uppercase;
}

.info-block__text {
    margin: 0;
    font-size: 18px;
    line-height: 1.4em;
}
.info-block ul {
    list-style-type: none;
    padding: 0;
}
.info-block__btn {
    margin-top: 1em;
    width: 100%;
}

.rating-block {
    max-width: 736px;
    border: none;
}


/* footer */

.site-footer {
    margin-top: calc(var(--border-radius) * -1);
    height: var(--footer-height);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 14vh;
    z-index: 15;
    background: var(--color-primary);
    border-top-left-radius: var(--border-radius);
    border-top-right-radius: var(--border-radius);
}

.footer-inner {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4vh;
    width: 100%;
    color: #ffffff;
    margin-top: var(--border-radius);
    margin-bottom: var(--border-radius);
}

.brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.brand img {
    width: 100%;
    height: auto;
}

.brand p {
    font-family: Montserrat-Regular, "sans-serif";
    font-size: 1.8vh;
    line-height: 1.5;
    margin-top: 0;
}

.copyright {
    font-family: Montserrat-Regular, "sans-serif";
    font-size: 1.8vh;
}

.col {
    color: #ffffff;
    margin-top: 0.7vh;
}

.col h4 {
    font-family: Montserrat-Bold, "sans-serif";
    font-size: 1.8vh;
    margin: 0;
}

.col ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    font-family: Montserrat-Regular, "sans-serif";
    font-size: 1.8vh;
    gap: 1.1vh;
}

.col a {
    color: #ffffff;
    text-decoration: none;
}

.col a:hover {
    text-decoration: underline;
}

.social {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

hr {
    width: 100%;
    border: #ffffff solid 0.1px;
}

.icons {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    font-family: Montserrat-Regular, "sans-serif";
    font-size: 1.8vh;
    gap: 1.1vh;
}

.icon-btn {
    display: flex;
    text-decoration: none;
    gap: 1vh;
}
.icon-btn img {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
}

.socials-mobile {
    display: none;
}

/* rating block */

.your-result {
    background: var(--color-secondary);
    border-radius: var(--border-radius);
    padding: 18px 20px;
    margin-bottom: 1vw;
}

.your-result > h3 {
    font-family: Montserrat-Bold, "sans-serif";
    margin: 4px 0 20px;
    font-size: 30px;
    text-align: center;
    color: #ffffff;
}

.your-result hr {
    margin: 0;
}

.rating-list {
    background: #fff;
    border-radius: var(--border-radius);
    padding: 20px 12px;
    box-shadow: 1.99px 1.99px 2.16px 0px #00000033;
}

.rating-row, .your-rating-row {
    display: grid;
    grid-template-columns: 2fr 7fr 2fr;
    align-items: center;
    gap: 8px;
    padding: 20px;
    font-family: Montserrat-Regular, sans-serif;
    font-size: 1.8vh;
    background: #E6FEFF;
    border-radius: var(--border-radius);
}

.your-rating-row {
    background: none;
    font-family: Montserrat-SemiBold, sans-serif;
    color: #ffffff;
    font-size: 1.15vw;
}

.rating-row {
    margin-bottom: 1vh;
    font-family: Montserrat-SemiBold, sans-serif;
    font-size: 1.13vw;
}

.rating-row > .place > div {
    color: var(--color-secondary);
}

.rating-row:nth-child(-n+5) > .place > div {
    color: #ffffff;
    background: var(--color-secondary);
    width: 60%;
    border-radius: 20px;
    padding: 2px 10px;
}

.your-rating-head, .rating-head {
    font-family: Montserrat-Regular, sans-serif;
    font-size: 16px;
    line-height: 1;
}

.place, .name, .points {
    font-size: 20px;
}

.place {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.rating-head, .your-rating-head {
    margin: 0 0 0.5vw;
}

.rating-list > h3 {
    font-family: Montserrat-Bold, "sans-serif";
    font-size: 30px;
    margin: 0 0 20px 0;
    line-height: 1;
    text-align: center;
    color: var(--color-secondary);
}

#rating-rows {
    max-height: min(50vh, 660px);
    overflow-y: auto;
    scrollbar-color: var(--color-secondary) #E9E9E9;
}

#rating-rows::-webkit-scrollbar {
    width: 6px;
}

#rating-rows::-webkit-scrollbar-thumb {
    background: #bbb;
    border-radius: 3px;
}

@media (min-width: 640px) {
    .main-content {
        background: var(--color-bg) url(./images/main-bg.webp) no-repeat;
        background-size: cover;
        background-position: center top;
        background-image: image-set(
            url('./images/main-bg.webp') 1x,
            url('./images/main-bg@2x.webp') 2x
        );
    }
}
@media (min-width: 769px) {
    .enter-block {
        background-image: url('./images/enter-bg.png'); 
        background-image: image-set(
            url('./images/enter-bg.png') 1x,
            url('./images/enter-bg@2x.png') 2x
        );
    }
}

@media (min-width: 769px) and (max-width: 1200px) {
    body {
        background-size: 120% auto;
    }
}

@media (max-width: 1230px) {
    .header-nav {
        display: none;
    }

    .header-right {
        display: none;
    }

    .burger-btn {
        display: block;
    }

    .header-right_mobile {
        display: flex;
        gap: 8px;
    }

    .account-btn {
        border: none;
        background: transparent;
    }

    .site-footer {
        padding: 0 2vh;
    }

    .site-header {
        padding: 0 2vh;
    }

    .footer-inner {
        grid-template-columns: 1fr 1fr;
        grid-template-areas:
            "brand social"
            "razdely info";
    }

    .brand {
        grid-area: brand;
    }

    .col:nth-of-type(1) {
        grid-area: razdely;
    }

    .social {
        grid-area: social;
    }

    .col:nth-of-type(2) {
        grid-area: info;
    }

}

@media (max-width: 768px) {
    .enter-block {
        padding-bottom: 36px;
        background-image: url('./images/enter-bg-mobile.png'); 
        background-image: image-set(
            url('./images/enter-bg-mobile.png') 1x,
            url('./images/enter-bg-mobile@2x.png') 2x
        );
    }

    .enter-block__mobile {
        display: block;
    }

    .enter-block__mobile-content {
        position: absolute;
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        z-index: 1;
    }

    .enter-block__play {
        text-align: right;
        font-size: 16px;
    }

    .enter-block__corner {
        position: absolute;
    }
    .enter-block__corner_tr {
        right: 9px;
        top: 17px;
    }
    .enter-block__corner_br {
        right: 17px;
        bottom: 175px;
    }
    .enter-block__corner_bl {
        left: 0;
        bottom: 165px;
    }
    .enter-block__corner_tl {
        top: 13px;
        left: 19px;
    }

    .tso-game-popup {
        padding: 15px;
    }

    .quizResult {
        margin: 0 15px;
    }

    .info-block {
        padding: 10px;
    }
    .info-block__img {
        max-height: 148px;
    }
    .info-block__title {
        margin-top: 15px;
        font-size: 18px;
    }
    .info-block__text {
        font-size: 16px;
    }

    .your-rating-row, .rating-row {
        padding: 10px 14px;
        font-size: 2.5vw;
    }

    .rating-row > .place > div {
        color: var(--color-secondary);
    }

    .your-rating-head, .rating-head {
        font-size: 2vw;
    }

    .rating-head, .your-rating-head {
        margin: 0 0 0.5vw;
    }

    .place, .name, .points {
        font-size: 16px;
    }

    .your-result {
        margin-bottom: 20px;
        box-shadow: 1.99px 1.99px 2.16px 0px #00000033;
    }
}

@media (max-width: 730px) {

}

@media (max-width: 500px) {
    .menu {
        gap: 40px;
    }
    .menu__item-text {
        display: none;
    }

    .rating-description {
        width: 100%;
        align-items: center;
        margin-top: 50vw;
        text-align: center;
    }

    .rating-description .title {
        font-size: 6vw;
    }

    .rating-description .description {
        font-size: 4.2vw;
    }

    .rating-button {
        width: 95%;
        font-size: 5vw;
        padding: 3vw;
    }
}

@media (max-width: 375px) {
    .footer-inner {
        grid-template-columns: 1fr;
        grid-template-areas:
            "brand"
            "razdely"
            "info";
        gap: 3vh;
    }

    .socials-mobile {
        display: flex;
        align-items: center;
        justify-content: space-between;
        font-size: 1.8vh;
        gap: 1vh;
    }

    .socials-mobile img {
        height: 2.5vh;
    }

    .logo {
        display: flex;
        width: 100%;
        justify-content: space-between;
    }

    .brand {
        grid-area: brand;
        text-align: center;
        align-items: flex-start;
    }

    .social {
        display: none;
    }

    .col h4 {
        font-size: 2vh;
    }

    .col ul {
        gap: 1.5vh;
    }

    .brand {
        text-align: start;
    }

    .brand p {
        font-size: 1.6vh;
    }

    .copyright {
        font-size: 1.6vh;
    }

    hr {
        margin: 1vh 0;
    }

    .menu {
        gap: 30px;
    }

    .enter-block__button {
        bottom: 36px;
    }
}