:root {
    --title-font: "EB Garamond", serif;
    --bg-color: #1c1c22;
}
*, *::before, *::after {
    box-sizing: border-box;
    padding: 0;
    margin: 0;
}
html {
    scroll-behavior: smooth;
}
@media (prefers-reduced-motion: no-preference) {
    html {
        interpolate-size: allow-keywords;
    }
}
body {
    background-color: var(--bg-color);
    color: #FAFAFA;
    font-family: "Gothic A1", sans-serif;
    font-weight: 400;
    font-style: normal;
}
img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
}
button {
    color: inherit;
    font: inherit;
    cursor: pointer;
}
a {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}
ul {
    list-style: none;
}
p {
    font-family: Gothic A1;
    font-size: 18px;
    line-height: 1.4;
}
@media screen and (max-width: 850px) {
    p {
        font-size: 14px;
    }
}

/* Components */
.play-button {
    width: 200px;
    height: 52px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-family: var(--title-font);
    font-size: 30px;
    line-height: 1;
    color: #3D475C;
    border: none;
    border-radius: 2px;
    background: url("/styles/chess-heroes/images/play-btn.webp") no-repeat center center / cover;
}
.page-section {
    max-width: 1284px;
    padding: 0 20px;
    margin: 0 auto;
}
.section-title {
    font-family: var(--title-font);
    font-size: 40px;
    line-height: 1;
    font-weight: 400;
}
.section-info {
    display: flex;
    flex-direction: column;
    gap: 40px;
}
.accordion-trigger {
    display: none; /* Showing only on mobile devices with flex value */
    width: 100%;
    justify-content: space-between;
    align-items: center;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}
.accordion-trigger .accordion-trigger__arrow {
    transform: rotate(180deg);
    transition: all 0.2s ease-in-out;
}
.accordion-trigger.closed .accordion-trigger__arrow {
    transform: rotate(0);
}
.accordion-content {
    height: auto;
    opacity: 1;
    transition: all .3s ease-in-out;
}
.accordion-content.closed {
    height: 0;
    opacity: 0;
    overflow: hidden;
}
.accordion-content.weapon__info {
    margin-top: 0;
}
.accordion-content.weapon__info.closed {
    margin-top: -40px;
}
@media screen and (max-width: 850px) {
    .section-title {
        font-size: 28px;
    }
    .play-button {
        margin: 0 auto;
    }
    .accordion-trigger {
        display: flex;
    }
}
@media screen and (max-width: 560px) {
    .play-button {
        width: 100%;
    }
}

/* Slider styles */
.slider-list {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}
.slider-list::-webkit-scrollbar {
    display: none;
}
.slider-list .slide-item {
    flex-shrink: 0;
    scroll-snap-align: start;
}
.slider-list--no-gap {
    gap: 0;
}
button.slider-arrow {
    flex-shrink: 0;
    width: 14px;
    height: 42px;
    border: none;
    background: url('/styles/chess-heroes/images/slider-arrow.svg');
    background-repeat: no-repeat;
    background-size: contain;
}
button.slider-arrow:disabled {
    cursor: default;
    opacity: 0.2;
}
.slider-arrow--left {
    transform: rotate(180deg);
}
.slider-controls {
    display: flex;
    justify-content: center;
    gap: 16px;
}
.slider-controls__bullets {
    display: flex;
    align-items: center;
    gap: 4px;
}
.cards-slider-section {
    padding-top: 31px;
    padding-bottom: 68px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    width: 100%;
}
@media screen and (max-width: 850px) {
    .cards-slider-section {
        padding-top: 20px;
        padding-bottom: 20px;
        padding-left: 0;
        padding-right: 0;
        gap: 0;
    }
    .cards-slider-section button.slider-arrow {
        display: none;
    }
    .cards-slider-section .slider-list {
        scroll-padding: 0 20px;
    }
    .cards-slider-section .slide-item:first-child {
        margin-left: 20px;
    }
    .cards-slider-section .slide-item:last-child {
        margin-right: 20px;
    }
}

/* Header */
.header {
    height: 66px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 5px;
    padding-bottom: 5px;
    font-family: var(--title-font);
    font-size: 16px;
    line-height: 1;
    font-weight: 500;
    color: #FAFAFA;
}
nav > ul {
    display: flex;
    align-items: center;
    gap: 20px;
}
.register-btn {
    width: 150px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    border: none;
    border-radius: 2px;
    background-color: #4C4A5B;
}
.burger-btn {
    display: none;
    position: relative;
    width: 26px;
    height: 26px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1000;
}
.burger-line {
    display: block;
    width: 100%;
    height: 4px;
    background: #FFFFFF;
    border-radius: 1px;
    position: absolute;
    left: 0;
    transition: all 0.3s ease-in-out;
}
.burger-line:nth-child(1) {
    top: 3px;
}
.burger-line:nth-child(2) {
    top: 11px;
}
.burger-line:nth-child(3) {
    top: 19px;
}
.burger-btn.active .burger-line:nth-child(1) {
    transform: rotate(-45deg);
    top: 12px;
}
.burger-btn.active .burger-line:nth-child(2) {
    transform: scale(0);
}
.burger-btn.active .burger-line:nth-child(3) {
    transform: rotate(45deg);
    top: 12px;
}
.mobile-menu {
    display: none;
    position: fixed;
    top: 66px;
    left: 0;
    height: 0;
    width: 100%;
    overflow: hidden;
    padding: 0 20px;
    font-family: var(--title-font);
    background-color: var(--bg-color);
    transform-origin: top center;
    transition: all 0.3s ease-in-out;
}
.mobile-menu.active {
    padding-top: 18px;
    padding-bottom: 50px;
    height: calc(100vh - 66px);
}
.mobile-menu .mobile-menu__links-list {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
}
.mobile-menu li {
    width: 100%;
}
.mobile-menu .mobile-menu__link {
    display: block;
    padding: 10px;
    border: 1px solid #4E5B75;
    border-radius: 2px;
}
.mobile-menu .play-button {
    margin: 0 auto;
}
/* Header Mobile */
@media screen and (max-width: 850px) {
    .register-btn {
        display: none;
    }
    .burger-btn {
        display: block;
    }
    .header nav, .header .register-button {
        display: none;
    }
    .mobile-menu {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }
}

/* Hero Section */
.hero-section {
    background-image: url("/styles/chess-heroes/images/hero-bg.webp");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: calc(100vh - 66px);
    display: flex;
    flex-direction: column;
    align-items: center;
}
.hero-section__logo {
    width: max(32%, 218px);
}
/* Hero-Mobile version */
@media screen and (max-width: 560px) {
    .hero-section {
        background-image: url('/styles/chess-heroes/images/hero-bg-mobile.webp');
        padding: 0 20px 53px;
        justify-content: space-between;
    }
    .hero-section .play-button {
        box-shadow: 0 0 8px 3px #CD970A;
        background: #1C1C22;
        color: #FAFAFA;
    }
}

/* About Section */
.about-section__background {
    position: relative;
    background-image: url('/styles/chess-heroes/images/about-bg.gif');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.about-section__background::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(5px);
  z-index: 1;
}
.about-section {
    position: relative;
    min-height: 600px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 40px;
    z-index: 2;
}
.about-section__description {
    max-width: 392px;
}
/* About Section Mobile */
@media screen and (max-width: 850px) {
    .about-section {
        padding-top: 80px;
        padding-bottom: 80px;
        min-height: unset;
        justify-content: flex-start;
        gap: 30px;
    }
}

/* Features Section */
.features-section {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding-top: 110px;
    padding-bottom: 54px;
    gap: 24px;
}
.feature-card {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.feature-card__image {
    flex-shrink: 0;
}
.feature-card__title {
    font-family: var(--title-font);
    font-size: 24px;
    font-weight: 500;
    line-height: 1;
}
/* Features Section Mobile */
@media screen and (max-width: 850px) {
    .features-section {
        display: flex;
        gap: 20px;
        overflow-x: auto;
        overflow-y: hidden;
        padding-top: 30px;
        padding-bottom: 30px;
        scrollbar-width: none;
    }
    .features-section::-webkit-scrollbar {
        display: none;
    }
    .feature-card {
        flex-shrink: 0;
        max-width: 184px;
        gap: 13px;
    }
    .feature-card__title {
        font-size: 14px;
    }
    .feature-card p {
        display: none;
    }
}

/* Character Section */
.character-details__background {
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}
.character-details {
    padding-top: 47px;
    padding-bottom: 29px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 80px;
}
.character-info__tags {
    display: flex;
    align-items: center;
    gap: 84px;
    text-transform: uppercase;
}
.character-tag {
    display: flex;
    align-items: center;
    gap: 35px;
    font-size: 24px;
    line-height: 1.4;
}
.character-description {
    max-width: 375px;
}
.character-card, .weapon-card {
    cursor: pointer;
}
.character-card img {
    margin-bottom: 8px;
}
.character-card span {
    text-transform: uppercase;
    font-size: 11px;
    line-height: 1.4;
    padding: 0 7px;
}
.character-card h5 {
    font-family: var(--title-font);
    font-size: 21px;
    font-weight: 400;
    line-height: 1;
    padding: 0 7px;
}
/* Character Section Mobile */
@media screen and (max-width: 850px) {
    .character-details {
        flex-direction: column;
        padding-top: 20px;
        padding-bottom: 20px;
        gap: 10px;
    }
    .character-details .character-image {
        height: 300px;
    }
    .character-details .section-info {
        gap: 10px;
    }
    .character-info__tags {
        gap: 20px;
    }
    .character-tag {
        font-size: 16px;
        gap: 10px;
    }
    .character-card, .weapon-card {
        max-width: 110px;
    }
    .character-card img {
        margin-bottom: 6px;
    }
    .character-card h5 {
        font-size: 14px;
    }
}

/* Sign Up Section */
.signup-section__background {
    background: url('/styles/chess-heroes/images/signup-bg.webp');
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}
.signup-section {
    padding-top: 100px;
    padding-bottom: 100px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}
.signup-section__image {
    width: 50%;
}
.signup-section__info {
    width: 50%;
}
.signup-section__info p {
    width: 66%;
}
/* Sign Up Section mobile */
@media screen and (max-width: 850px) {
    .signup-section {
        padding-top: 20px;
        padding-bottom: 27px;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        max-width: 480px;
    }
    .signup-section__image, .signup-section__info, .signup-section__info p {
        width: 100%;
    }
}

/* Weapon Section */
.weapon-section {
    padding-top: 82px;
    padding-bottom: 32px;
}
.weapon-section__title {
    text-align: center;
    margin-bottom: 58px;
}
.weapon-title {
    text-align: center;
    font-family: var(--title-font);
    font-size: 26px;
    font-weight: 400;
    line-height: 1;
    margin-bottom: 40px;
}
.weapon {
    display: flex;
    gap: 50px;
}
.weapon__image {
    flex-shrink: 0;
}
.weapon__info {
    display: flex;
    flex-direction: column;
    gap: 40px;
}
.weapon__stats {
    display: grid;
    gap: 18px;
}
.weapon-stat {
    display: flex;
    align-items: center;
    gap: 15px;
}
.weapon-stat--desktop {
    display: flex; /* Duplicate display property from .weapon-stat */
}
.weapon-stat--mobile {
    display: none;
}
.weapon-stat__value {
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
}
.weapon-stat__type {
    width: 75px;
    font-size: 14px;
    line-height: 1;
    text-transform: uppercase;
}
.weapon-stat__description {
    font-size: 16px;
    font-weight: 300;
    line-height: 1.1;
}
/* Weapons Section Mobile */
@media screen and (max-width: 850px) {
    .weapon-section {
        padding-top: 30px;
        padding-bottom: 30px;
    }
    .weapon-section__title {
        display: none;
    }
    .weapon {
        flex-direction: column;
        align-items: center;
        gap: 30px;
    }
    .weapon-title {
        margin-bottom: 24px;
    }
    .weapon__image {
        max-width: 280px;
    }
    .weapon__info {
        gap: 20px;
    }
    .weapon-stat--desktop {
        display: none;
    }
    .weapon-stat--mobile {
        display: flex;
    }
    .weapon-stat__description {
        font-size: 14px;
    }
    .weapon-stat__main {
        display: flex;
        align-items: center;
        gap: 4px;
        margin-bottom: 4px;
    }
    .weapon-stat__value {
        font-size: 14px;
    }
    .weapon-stat__type {
        font-size: 12px;
    }
}

/* Invite Section */
.invite-section__background {
    background-image: url('/styles/chess-heroes/images/invite-bg.webp');
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}
.invite-section {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 7%;
}
.invite-section img {
    width: 50%;
    max-width: 473px;
}
.invite-section .section-info {
    width: 40%;
    padding: 80px 0;
}
/* Invite Section Mobile */
@media screen and (max-width: 850px) {
    .invite-section {
        padding-top: 30px;
        align-items: center;
        flex-direction: column-reverse;
        gap: 10px;
    }
    .invite-section .section-info {
        width: auto;
        padding: 0;
    }
    .invite-section img {
        width: 68%;
    }
}

/* Top Player Section */
.top-players-section__background {
    background-image: url('/styles/chess-heroes/images/top-players-bg.webp');
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}
.top-players-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    padding-top: 98px;
    padding-bottom: 98px;
}
.top-player {
    display: grid;
    align-items: center;
    grid-template-columns: 24px 26px 202px auto;
    gap: 10px;
    font-size: 18px;
    line-height: 1.4;
}
.top-player:not(:last-child) {
    margin-bottom: 12px;
}
.top-player__rank {
    text-align: right;
}
.top-player__avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
}
.top-player__positions {
    font-weight: 700;
}
.top-player__positions--desktop {
    display: block;
}
.top-player__positions--mobile {
    display: none;
}
/* Top Player Section Mobile */
@media screen and (max-width: 850px) {
    .top-players-section__background {
        background-position-x: 85%;
    }
    .top-players-section {
        padding-top: 30px;
        padding-bottom: 51px;
    }
    .top-player__positions--desktop {
        display: none;
    }
    .top-player__positions--mobile {
        display: block;
    }
}

/* Fanart Section */
.fanart-section {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 63px 0 34px;
}
.fanart-section__title {
    text-align: center;
    margin-bottom: 18px;
}
.fanart-section__description {
    max-width: 810px;
    margin: 0 auto;
    line-height: 1.4;
    margin-bottom: 43px;
}
.fanart-section__slider .slider-list {
    height: 300px;
    margin-bottom: 54px;
}
/* Fan Art Section Mobile */ 
@media screen and (max-width: 850px) {
    .fanart-section {
        padding-top: 30px;
        padding-bottom: 48px;
    }
    .fanart-section__title {
        margin-bottom: 31px;
    }
    .fanart-section__description {
        display: none;
    }
    .fanart-section__slider .slider-list {
        margin-bottom: 0;
    }
    .fanart-section .slider-controls {
        display: none;
    }
}
