article, aside, details, figcaption, figure, footer, header, hgroup, nav, section {
    display: block;
}

audio, canvas, video {
    display: inline-block;
}

audio:not([controls]) {
    display: none;
}

html {
    font-size: 100%;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

a:focus {
    outline: none;
}

a:hover,
a:active {
    outline: none;
}

sub, sup {
    position: relative;
    font-size: 75%;
    line-height: 0;
    vertical-align: baseline;
}

sup {
    top: -0.5em;
}

sub {
    bottom: -0.25em;
}

img {
    border: 0;
    -ms-interpolation-mode: bicubic;
}

form {
    margin: 0;
    padding: 0;
}

button, input, select, textarea {
    margin: 0;
    font-size: 100%;
    vertical-align: middle;
    -webkit-font-smoothing: antialiased;
}

button,
input {
    line-height: normal;
}

button,
html input[type=button],
input[type=reset],
input[type=submit] {
    -webkit-appearance: button;
    cursor: pointer;
}

label,
select,
button,
input[type=button],
input[type=reset],
input[type=submit],
input[type=radio],
input[type=checkbox] {
    cursor: pointer;
}

fieldset {
    padding: 0;
    margin: 0;
    border: 0;
}

textarea {
    overflow: auto;
    vertical-align: top;
}

input::-ms-clear {
    display: none;
}

@font-face {
    font-family: 'Montserrat';
    src: url('fonts/Montserrat-Regular.woff2') format('woff2'),
        url('fonts/Montserrat-Regular.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

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

@font-face {
    font-family: 'Montserrat';
    src: url('fonts/Montserrat-SemiBold.woff2') format('woff2'),
        url('fonts/Montserrat-SemiBold.woff') format('woff');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Montserrat';
    src: url('fonts/MontserratBold.woff2') format('woff2'),
        url('fonts/MontserratBold.woff') format('woff');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

body, html {
    height: 100%;
    min-height: 100%;
    min-width: 320px;
}

body {
    padding: 0;
    margin: 0;
    color: #000;
    font-family: 'Montserrat', Arial, Helvetica, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    font-weight: 500;
    background: #fff;
}

img {
    display: block;
    max-width: 100%;
    border-style: none;
}

*,
*:before,
*:after {
    box-sizing: border-box;
    touch-action: manipulation;
}

*:hover,
*:focus,
*:active {
    outline: none;
}

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

a:hover {
    text-decoration: none;
}

ul, ol {
    margin: 0;
    padding: 0;
    list-style: none outside;
}

b {
    font-weight: 700;
}

p {
    margin: 0 0 0.5em;
}

p:last-child {
    margin-bottom: 0;
}

.center {
    text-align: center;
}

.nowrap {
    white-space: nowrap;
}

.hidden {
    display: none !important;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    border: 0;
    clip: rect(0 0 0 0);
    overflow: hidden;
}

/* Preloader Overlay */
.circuit-preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #0b0f19;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  font-family: sans-serif;
  color: #FFCB05;
}

.circuit-container {
  text-align: center;
}

/* SVG Circuit Styling */
.wire {
  fill: none;
  stroke: #1a2333;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Electrical Current Effect */
.wire:nth-child(1), .wire:nth-child(2) {
  stroke: #FFCB05;
  stroke-dasharray: 30 150;
  stroke-dashoffset: 0;
  animation: pulse-electricity 1.5s linear infinite;
}

.node {
  fill: #FFCB05;
  box-shadow: 0 0 8px #FFCB05;
}

/* Animation Keyframes */
@keyframes pulse-electricity {
  0% {
    stroke-dashoffset: 180;
  }
  100% {
    stroke-dashoffset: 0;
  }
}

.wrapper {
    position: relative;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    min-width: 320px;
    max-width: 1920px;
    min-height: 100%;
}

.main {
    position: relative;
    width: 100%;
    margin: 0 auto auto;
    flex-grow: 1;
    overflow: hidden;
    position: relative;
}

.main::before {
    position: absolute;
    /* top: calc(39% + 18px); */
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    min-height: 100%;
    content: "";

    background-color: #25282F;
    background-image: -webkit-image-set(url("img/bg02@1x.webp") type("image/webp"));
    background-image: image-set(url("img/bg02@1x.webp") type("image/webp"));
    background-image: url("img/bg02@1x.png");
    background-repeat: repeat-y;
    background-position: top center;
    background-size: 100% auto;

    transition: top 0.2s linear;
}

@media (min-resolution: 2dppx) {
    .main::before {
      background-image: -webkit-image-set(url("img/bg02@2x.webp") type("image/webp"));
      background-image: image-set(url("img/bg02@2x.webp") type("image/webp"));
      background-image: url("img/bg02@2x.png");
    }
}

.room-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: auto;
    transition: opacity 0.2s linear, visibility 0.2s linear;
    transition-delay: 0.2s;
}

.room-bg--hidden {
    opacity: 0;
    visibility: hidden;
}

.room-bg img {
    width: 100%;
    object-fit: cover;
    object-position: center -402px;
    transition: object-position 0.2s linear;
}

.room-bg::after {
    position: absolute;
    top: 520px;
    left: 0;
    right: 0;
    width: 100%;
    height: 78px;
    content: "";

    background-image: -webkit-image-set(url("img/separator@1x.webp") type("image/webp"));
    background-image: image-set(url("img/separator@1x.webp") type("image/webp"));
    background-image: url("img/separator@1x.png");
    background-repeat: no-repeat;
    background-position: top center;
    background-size: cover; 
    transition: top 0.2s linear;
}

@media (min-resolution: 2dppx) {
    .room-bg::after {
      background-image: -webkit-image-set(url("img/separator@2x.webp") type("image/webp"));
      background-image: image-set(url("img/separator@2x.webp") type("image/webp"));
      background-image: url("img/separator@2x.png");
    }
}

.header {
    position: absolute;
    top: 40px;
    left: 0;
    right: 0;
    margin: 0 auto;
    text-align: center;
    z-index: 10;
}

.header .logo {
    margin: 0 auto;
    width: 134px;
    display: inline-block;
    vertical-align: top;
}

.game {
    position: relative;
    padding-top: 110px;
}

.game__container {
    margin: 0 auto;
    max-width: 720px;
}

.game__text-wrapper {
    margin: 0 0 0 auto;
    max-width: 354px;
}

.game__heading {
    margin: 0 0 12px;
}

.title {
    font-size: 32px;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -1px;
    color: #1A1B23;
}

.puzzle__wrapper {
    margin: 0 auto;
    padding: 134px 0 80px;
    width: 100%;
    max-width: 720px;
}

.puzzle__grid {
    position: relative;
}

.puzzle__board-wrapper {
    position: absolute;
    inset: 0;
}

.puzzle__board-wrapper img {
    width: 100%;
    height: auto;
}

.puzzle__list {
    margin: 0 auto;
    padding: 50px 0;
    width: 100%;
    max-width: 480px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
}

.puzzle__item {
    position: relative;
}

.puzzle__item {
    cursor: pointer;
}

.puzzle__item img {
    transform-origin: center center;
    transition: transform 0.2s linear;

    transform: rotate(0deg);
}

@keyframes flash {
    0% { opacity: 0; }
    50% { opacity: 1; }
    100% { opacity: 0; }
}

.puzzle__item img.copy-item {
    position: absolute;
    top: 0;
    left: 0;
}

@keyframes fadeIn {
    to {opacity: 1; }
    
}

.puzzle__item img.copy-item {
    opacity: 0;
}

.electricity-go .puzzle__item img.copy-item {
    animation-play-state: running !important;
}

.puzzle__tooltip {
    width: 352px;
    height: 150px;
    background: url(img/tooltip.svg) no-repeat 0 0 / contain transparent;
    position: absolute;
    top: 160px;
    left: calc(50% - 175px);
    padding: 36px;
    z-index: 10;

    color: #1A1B23;
    text-align: center;
    font-size: 24px;
    font-weight: 500;
    line-height: 1.25;
}

.puzzle__tooltip--fixed {
    position: fixed;
    bottom: -10px;
}

.start .puzzle__tooltip {
    display: none;
}

.footer {
    background: #FFCB05;
    color: #FFF;
    font-size: 12px;
    padding: 32px 10px;
    position: relative;
    z-index: 50;
}

.footer__container {
    margin: 0 auto;
    max-width: 1824px;
    display: grid;
    grid-template-columns: 180px 1fr 210px;
    grid-gap: 20px;
    grid-template-areas: 'logo .. shr';
}

.footer__logo {
    grid-area: logo;
}

.footer__logo .logo {
    display: block;
    width: 178px;
}

.footer__shr {
    grid-area: shr;
}

.shr {
    display: flex;
    flex-flow: row wrap;
    justify-content: flex-end;
    gap: 16px;
}

.shr__item {
    display: block;
    font-size: inherit;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #3A4250;
    position: relative;
    overflow: hidden;
    transition: background-color 0.3s ease;
}

.shr__item:hover,
.shr__item:focus {
    background-color: #2E3440;
}

.shr__item:active {
    background-color: #222730;
}

.shr__item::before {
    content: "";
    display: block;
    width: 100%;
    height: 100%;
    background: none no-repeat center center transparent;
}

.shr__item--vk::before { background-image: url(img/icon_vk.svg); }
.shr__item--yt::before { background-image: url(img/icon_yt.svg); }
.shr__item--rt::before { background-image: url(img/icon_rt.svg); }
.shr__item--max::before { background-image: url(img/icon_max.svg); }

.final {
    margin: 110px auto 20px;
    position: relative;
    z-index: 100;
    opacity: 0;

    transition: opacity 0.2s linear;
}

.final--hidden {
    position: fixed;
    top: 100%;
    left: 0;
    right: 0;
    z-index: -1;
}

.final__wrapper {
    position: relative;
    margin: 0 auto;
    padding: 284px 10px 20px;
    width: 100%;
    max-width: 740px;
}

.final__wrapper:before {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    margin: 0 auto;
    width: 320px;
    height: 320px;
    content: "";

    background-image: -webkit-image-set(url("img/img01_1@1x.webp") type("image/webp"));
    background-image: image-set(url("img/img01_1@1x.webp") type("image/webp"));
    background-image: url("img/img01_1@1x.png");
    background-repeat: no-repeat;
    background-position: top center;
    background-size: 100% auto; 
}

@media (min-resolution: 2dppx) {
    .final__wrapper:before {
      background-image: -webkit-image-set(url("img/img01_1@2x.webp") type("image/webp"));
      background-image: image-set(url("img/img01_1@2x.webp") type("image/webp"));
      background-image: url("img/img01_1@2x.png");
    }
}

.final__wrapper:after {
    position: absolute;
    /* bottom: calc(50% + 98px); */
    bottom: calc(50% + 104px);
    right: calc(50% - 162px);
    margin: 0 auto;
    width: 112px;
    height: 203px;
    content: "";

    background-image: -webkit-image-set(url("img/img01_2@1x.webp") type("image/webp"));
    background-image: image-set(url("img/img01_2@1x.webp") type("image/webp"));
    background-image: url("img/img01_2@1x.png");
    background-repeat: no-repeat;
    background-position: top center;
    background-size: 100% auto; 
}

@media (min-resolution: 2dppx) {
    .final__wrapper:after {
      background-image: -webkit-image-set(url("img/img01_2@2x.webp") type("image/webp"));
      background-image: image-set(url("img/img01_2@2x.webp") type("image/webp"));
      background-image: url("img/img01_2@2x.png");
    }
}

.promo {
    position: relative;
    padding: 44px;
    width: 100%;
    min-height: 512px;

    background-image: -webkit-image-set(url("img/popup_bg@1x.webp") type("image/webp"));
    background-image: image-set(url("img/popup_bg@1x.webp") type("image/webp"));
    background-image: url("img/popup_bg@1x.png");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 100% auto; 
}

@media (min-resolution: 2dppx) {
    .promo {
      background-image: -webkit-image-set(url("img/popup_bg@2x.webp") type("image/webp"));
      background-image: image-set(url("img/popup_bg@2x.webp") type("image/webp"));
      background-image: url("img/popup_bg@2x.png");
    }
}

.promo__wrapper {
    margin: 0 auto;
    padding: 48px 10px 64px;
    max-width: 572px;
}

.promo__text-wrapper {
    margin: 0 auto 40px;
    max-width: 360px;
    text-align: center;
}

.promo__heading-wrapper {
    margin: 0 0 16px;
}

.promo__heading {
    margin: 0;
}

.promo__text {
    font-size: 20px;
    line-height: 1.5;
}

.promo__prize {
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.promo__code {
    margin: 0;
    padding: 14px;
    width: 100%;
    max-width: 268px;
    font-size: 20px;
    line-height: 1.5;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 16%;
    text-align: center;
    color: #1A1B23;
    background-color: #FFFFFF;
    border: 1px dashed #000000;
    border-radius: 4px;
}

.promo__btn {
    padding: 14px;
    width: 100%;
    max-width: 268px;
    display: inline-block;
    font-size: 20px;
    line-height: 1.5;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2%;
    text-align: center;
    text-decoration: none;
    color: #1A1B23;
    background-color: #FFCB05;
    border: 1px solid transparent;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.promo__btn:hover,
.promo__btn:focus {
    background-color: #FFD123;
    outline: transparent;
}

.promo__btn:focus:not(:focus-visible) {
    background-color: #FFCB05;
    outline: transparent;
}

.promo__btn:focus-visible {
    background-color: #FFD123;
    outline: transparent;
}

.promo__btn:active {
    background-color: #FFE905;
    outline: transparent;
}

.promo__note-wrapper {
    margin: 20px auto 0;
}

.promo__note {
    margin: 0;
    text-align: center;
    font-size: 16px;
    line-height: 1.5;
    font-weight: 500;
    color: #767886;
}


@media (hover: hover) {

    .blue-button:hover {
        background-color: rgb(6, 54, 200);
    }
}

@media (max-width: 1919px) {
    body {
        zoom: 0.9;
    }
}

@media (max-width: 767px) {
    body {
        font-size: 14px;
        zoom: 1;
    }

    .header {
        top: 20px;
    }

    .header .logo {
        width: 112px;
    }

    .main--final-shown::before {
        background-image: -webkit-image-set(url("img/bg02_mobile@1x.webp") type("image/webp"));
        background-image: image-set(url("img/bg02_mobile@1x.webp") type("image/webp"));
        background-image: url("img/bg02_mobile@1x.png");
    }
    
    @media (min-resolution: 2dppx) {
        .main--final-shown::before {
          background-image: -webkit-image-set(url("img/bg02_mobile@2x.webp") type("image/webp"));
          background-image: image-set(url("img/bg02_mobile@2x.webp") type("image/webp"));
          background-image: url("img/bg02_mobile@2x.png");
        }
    }

    .room-bg img {
        object-position: center bottom;
    }

    .main--final-shown .room-bg img {
        object-position: center -178px;
    }

    .room-bg::after {
        top: 460px;
        height: 39px;
        background-image: url("img/separator_mobile@1x.png");
    }
    
    @media (min-resolution: 2dppx) {
        .room-bg::after {
          background-image: url("img/separator_mobile@2x.png");
        }
    }

    .main--final-shown .room-bg::after {
        top: 274px;
    }

    .game {
        padding-top: 70px;
    }

    .game__text-wrapper {
        margin: 0 auto;
        max-width: 350px;
        text-align: center;
    }

    .title {
        font-size: 26px;
        line-height: 1.1;
    }

    .game__text {
        margin: 0 auto 6px;
        line-height: 1.35;
    }

    .puzzle__wrapper {
        padding: 194px 0 80px;
        max-width: 580px;
    }

    .puzzle__list {
        padding: 40px 0;
        max-width: 390px;
    }

    .puzzle__item img {
        width: 100%;
        height: 100%;
    }

    .puzzle__tooltip {
        transform-origin: bottom center;
        transform: scale(0.8);
        bottom: 110px;
    }

    .puzzle__tooltip--fixed {
        bottom: -5px;
    }

    .footer {
        padding: 24px 20px;
    }

    .footer__container {
        grid-template-columns: 1fr;
        grid-template-areas: 'logo'
        'shr';
        grid-gap: 24px;
    }

    .footer__logo .logo {
        width: 112px;
    }

    .shr {
        justify-content: flex-start;
    }

    .final {
        padding-top: 66px;
        padding-bottom: 64px;
        margin-top: 0;
        margin-bottom: 0;
    }

    .final__wrapper {
        padding: 136px 10px 20px;
        max-width: 380px;
    }

    .final__wrapper::before {
        width: 160px;
        height: 160px;
    }

    .final__wrapper::after {
        bottom: calc(60% + 98px);
        right: calc(50% - 81px);
        width: 56px;
        height: 102px;
    }

    .promo {
        padding: 22px;
        width: 100%;
        min-height: 452px;
    
        background-image: -webkit-image-set(url("img/popup_bg_mobile@1x.webp") type("image/webp"));
        background-image: image-set(url("img/popup_bg_mobile@1x.webp") type("image/webp"));
        background-image: url("img/popup_bg_mobile@1x.png");
        background-repeat: no-repeat;
        background-position: center;
        background-size: 100% auto; 
    }
    
    @media (min-resolution: 2dppx) {
        .promo {
          background-image: -webkit-image-set(url("img/popup_bg_mobile@2x.webp") type("image/webp"));
          background-image: image-set(url("img/popup_bg_mobile@2x.webp") type("image/webp"));
          background-image: url("img/popup_bg_mobile@2x.png");
        }
    }

    .promo__wrapper {
        padding: 40px 10px 56px;
    }

    .promo__text-wrapper {
        margin: 0 auto 32px;
        max-width: 276px;
    }

    .promo__heading-wrapper {
        margin: 0 0 12px;
    }

    .promo__text {
        font-size: 14px;
    }

    .promo__prize {
        max-width: 276px;
        flex-direction: column;
    }

    .promo__code {
        max-width: 100%;
        font-size: 14px;
    }

    .promo__btn {
        max-width: 100%;
        font-size: 14px;
    }

    .promo__note {
        font-size: 12px;
    }
}

@media (max-width: 578px) {
    .main::before {
        background-size: 200% auto;
    }

    .puzzle__wrapper {
        max-width: 360px;
    }

    .puzzle__list {
        padding: 25px 0;
        max-width: 240px;
    }

    .puzzle__tooltip {
        top: auto;
        transform: scale(0.5);
    }
}

@media (max-width: 379px) {
    .puzzle__wrapper {
        padding: 194px 10px 60px;
        width: 320px;
        max-width: 100%;
    }

    .puzzle__list {
        padding: 22px 0;
        max-width: 200px;
    }

    .puzzle__tooltip {
        transform: scale(0.4);
    }
}

@media (max-width: 372px) {
    .game__text-wrapper {
        max-width: 320px;
    }

    .final__wrapper {
        padding: 132px 10px 20px;
        max-width: 300px;
    }

    .final__wrapper::before {
        width: 160px;
        height: 160px;
    }

    .final__wrapper::after {
        bottom: calc(54% + 92px);
        right: calc(50% - 81px);
        width: 56px;
        height: 102px;
    }

    .promo {
        padding: 16px;
        min-height: 384px;
    }

    .promo__wrapper {
        padding: 40px 10px;
    }

    .promo__text-wrapper {
        margin: 0 auto 14px;
        max-width: 260px;
    }

    .promo__heading-wrapper {
        margin: 0 0 10px;
    }

    .promo__text {
        font-size: 12px;
    }

    .promo__prize {
        max-width: 260px;
        gap: 12px;
    }

    .promo__note-wrapper {
        margin: 10px auto 0;
    }

    .promo__note {
        font-size: 10px;
    }

    .title {
        font-size: 20px;
    }
}
