#advent {
    background: linear-gradient(180deg, #A51517 0%, #6A1314 100%);
    position: relative;
    overflow: hidden;
    margin-top: -1px;
}

#advent .white_space {
    height: 172px;
}

#advent::before {
    content: '';
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    background: url(../assets/icons.png) center / contain repeat;
    pointer-events: none;
    opacity: 0.1;
}

.advent_card {
    position: relative;
    width: 384px;
    height: 286px;
    cursor: pointer;
}

.advent {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(4, 1fr);
    gap: 16px;
    max-width: fit-content;
    margin: 0 auto;
    padding: 220px 0;
}

.advent_start {
    grid-area: 1 / 1 / 2 / 3;
    display: flex;
    height: 286px;
    padding: 30px 48px;
    flex-direction: column;
    align-items: flex-start;
    border-radius: 32px;
    border: 4px dashed #FFF;
    background: linear-gradient(180deg, #9F0003 0%, #7F0006 100%), linear-gradient(180deg, #9F002C 0%, #990005 100%);
    box-shadow: 0 0 14px 0 #731718;
    position: relative;
    gap: 16px;
}

.advent_card:nth-child(2) {
    grid-area: 1 / 3 / 2 / 4;
}

.advent_card:nth-child(3) {
    grid-area: 2 / 1 / 3 / 2;
}

.advent_card:nth-child(4) {
    grid-area: 2 / 2 / 3 / 3;
}

.advent_card:nth-child(5) {
    grid-area: 2 / 3 / 3 / 4;
}

.advent_card:nth-child(6) {
    grid-area: 3 / 1 / 4 / 2;
}

.advent_card:nth-child(7) {
    grid-area: 3 / 2 / 4 / 3;
}

.advent_card:nth-child(8) {
    grid-area: 3 / 3 / 4 / 4;
}

.advent_card:nth-child(9) {
    grid-area: 4 / 1 / 5 / 2;
}

.advent_card:nth-child(10) {
    grid-area: 4 / 2 / 5 / 3;
}

.advent_card:nth-child(11) {
    grid-area: 4 / 3 / 5 / 4;
}

.advent_card:nth-child(2) .close_card,
.advent_card:nth-child(7) .close_card {
    color: #139174;
    background: linear-gradient(180deg, #3CE99C 0%, #BAFFE1 100%), linear-gradient(180deg, #DDFFF0 0%, #BAFFE1 100%), linear-gradient(180deg, #ECFAFF 0%, #D0F3FF 100%);
}

.advent_card:nth-child(3) .close_card,
.advent_card:nth-child(8) .close_card {
    color: #4774B9;
    background: linear-gradient(180deg, #96E5FF 0%, #D0F3FF 100%);
}

.advent_card:nth-child(4) .close_card,
.advent_card:nth-child(9) .close_card {
    color: #BC8138;
    background: linear-gradient(180deg, #FFE786 0%, #FFF5CC 100%), linear-gradient(180deg, #FF98A8 0%, #FFDADF 100%), linear-gradient(180deg, #ECFAFF 0%, #D0F3FF 100%);
}

.advent_card:nth-child(5) .close_card,
.advent_card:nth-child(10) .close_card {
    color: #CE4346;
    background: linear-gradient(180deg, #FF98A8 0%, #FFDADF 100%), linear-gradient(180deg, #3CE99C 0%, #BAFFE1 100%), linear-gradient(180deg, #6FB 0%, #BAFFE1 100%), linear-gradient(180deg, #DDFFF0 0%, #BAFFE1 100%), linear-gradient(180deg, #ECFAFF 0%, #D0F3FF 100%);
}

.advent_card:nth-child(6) .close_card,
.advent_card:nth-child(11) .close_card {
    color: #83179D;
    background: linear-gradient(180deg, #C283F0 0%, #ECBAFF 100%), linear-gradient(180deg, #96E5FF 0%, #D0F3FF 100%);
}

.close_card,
.open_card {
    width: 100%;
    height: 100%;
    position: absolute;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    display: flex;
    border-radius: 32px;
    transition: all 0.3s ease;
}

.close_card:hover {
    transform: scale(1.02);

}

.close_card {
    gap: 10px;
    opacity: 1;
    padding: 32px 40px;
    border: 6px dashed #FFF;
    box-shadow: 0 0 14px 0 #4F0B0C, 0 0 44px 0 rgba(0, 0, 0, 0.25) inset;
}

.open_card {
    gap: 30px;
    opacity: 0;
    pointer-events: none;
    padding: 32px 29px;
    background: linear-gradient(180deg, #9F0003 0%, #7F0006 100%), linear-gradient(180deg, #FFE786 0%, #FFF5CC 100%), linear-gradient(180deg, #ECFAFF 0%, #D0F3FF 100%);
    box-shadow: -8px 8px 14px 0 rgba(126, 0, 2, 0.70) inset;
}

.advent_card.opened .close_card {
    opacity: 0;
    pointer-events: none;
}

.advent_card.opened .open_card {
    opacity: 1;
    pointer-events: all;
}

.advent_card.locked {
    cursor: not-allowed;
}

.advent_day {
    font-size: 24px;
    line-height: 110%;
    letter-spacing: -0.24px;
    text-transform: uppercase;
    text-align: center;
}

.advent_number {
    font-family: "Ramillas";
    font-size: 149.966px;
    line-height: 110%;
    letter-spacing: -1.5px;
    text-transform: uppercase;
    text-align: center;
}

.advent_snow {
    width: 100%;
    height: 19px;
    background: url(../assets/krai.png) center / cover repeat-x;
    position: absolute;
    z-index: 2;
}

.advent_snow.top {
    top: -1px;
    left: 0;
}

.advent_snow.bottom {
    bottom: 171px;
    left: 0;
    transform: rotate(180deg);
}

.advent_wrapper {
    position: relative;
    max-width: 1920px;
    width: 100%;
    margin: 0 auto;
}

.meshok {
    width: 435px;
    position: absolute;
    left: -50px;
    bottom: -110px;
    z-index: 5;
    transform: rotate(0deg) scaleX(-1);
    pointer-events: none;
}

.pingvin {
    width: 550px;
    position: absolute;
    right: -195px;
    bottom: -195px;
    z-index: 5;
    pointer-events: none;
}

.advent_start_title {
    color: #FFF;
    font-family: "Ramillas";
    font-size: 64px;
    line-height: 100%;
    letter-spacing: -0.64px;
}

.advent_start_text {
    color: #FFB6BD;
    font-size: 18px;
    line-height: 140%;
    max-width: 385px;
}

.advent_img {
    position: absolute;
    bottom: 0;
    right: 0;
}

.advent_link {
    display: flex;
    padding: 12px 0;
    justify-content: center;
    align-items: center;
    border-radius: 100px;
    border: 1.5px solid #ffffff1f;
    background: #ffffff0f;
    color: #FFF;
    font-family: 'Inter';
    font-size: 18px;
    line-height: 110%;
    letter-spacing: -0.18px;
    width: 100%;
    position: relative;
    cursor: pointer;
}

.advent_link img {
    position: absolute;
    right: 16px;
    top: 16px;
    filter: brightness(0) saturate(100%) invert(99%) sepia(1%) saturate(2275%) hue-rotate(147deg) brightness(120%) contrast(100%);
    opacity: 0.5;
}

.advent_code {
    color: #FFF;
    font-size: 18px;
    line-height: 110%;
    letter-spacing: -0.22px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.advent_popup {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #111111;
    background: linear-gradient(90deg, #11111100 0%, #11111180 30%, #11111180 70%, #11111100 100%);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: 1;
    opacity: 1;
    pointer-events: all;
    transition: all 1s ease;
}

.advent_popup_body {
    display: flex;
    width: 380px;
    padding: 20px 30px;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    border-radius: 40px;
    border: 12px solid #FFF;
    background: linear-gradient(180deg, #FFF1F3 0%, #FFDADF 100%), linear-gradient(180deg, #FFECF8 0%, #FFD0EA 100%);
}

.advent_discribe {
    padding-bottom: 12px;
}

.advent_title {
    font-family: 'Ramillas Bold';
    font-size: 32px;
    line-height: 110%;
    letter-spacing: -0.32px;
    text-transform: uppercase;
    display: flex;
    justify-content: space-between;
    width: 100%;
    align-items: center;
    color: #CD2E31;
}

.advent_link_pop {
    width: 100%;
    padding: 2px;
    border-radius: 100px;
    position: relative;
    margin-top: auto;
    background: linear-gradient(0deg, #FFBEBF 0%, #FFEFEF 100%);
    cursor: pointer;
}

.advent_in_link img {
    position: absolute;
    width: 14px;
    height: 14px;
    aspect-ratio: 1 / 1;
    right: 17px;
    top: 15px;
}

.advent_in_link {
    width: 100%;
    border-radius: 100px;
    padding: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    text-align: center;
    font-family: 'Inter';
    font-size: 16px;
    line-height: normal;
    letter-spacing: 0.48px;
    text-transform: uppercase;
    color: #DF4749;
    border-radius: 100px;
    background: linear-gradient(180deg, #FFBEBF 0%, #FFEFEF 100%);
}

@media (max-width: 1500px) {

    .meshok {
        width: 281px;
        left: -60px;
        bottom: -150px;
    }

    .pingvin {
        width: 316px;
        right: -105px;
        bottom: -175px;
    }
}

@media (max-width: 1250px) {

    .advent {
        padding: 169px 0 169px;
    }

    .advent_card {
        width: 290px;
        height: 216px;
    }

    .close_card,
    .open_card {
        border-radius: 24px;
        border: 4px dashed #FFF;
    }

    .advent_start {
        width: 593px;
        height: 216px;
        padding: 33px 39px;
        gap: 7px;
        border-radius: 24px;
        border: 3px dashed #FFF;
    }

    .advent_day {
        font-size: 16px;
        line-height: 110%;
        letter-spacing: -0.16px;
    }

    .advent_number {
        font-size: 112px;
        line-height: 110%;
        letter-spacing: -1.12px;
    }

    .advent_img {
        width: 235px;
    }

    .advent_start_title {
        font-size: 32px;
        line-height: 100%;
        letter-spacing: -0.28px;
    }
}

@media (max-width: 940px) {
    .advent_card {
        width: 167px;
        height: 167px;
    }

    .close_card,
    .open_card {
        border-radius: 12px;
        border: 2px dashed #FFF;
    }

    .advent_start {
        width: 343px;
        height: 167px;
        padding: 24px;
        border-radius: 12px;
        border: 2px dashed #FFF;
    }

    .advent_day {
        font-size: 14px;
        line-height: 110%;
        letter-spacing: -0.14px;
    }

    .advent_number {
        font-size: 62px;
        line-height: 110%;
        letter-spacing: -0.62px;
    }

    .advent_img {
        width: 150px;
    }

    .advent_start_title {
        font-size: 18px;
        line-height: 100%;
        letter-spacing: -0.28px;
    }

    .advent_start_text {
        font-size: 12px;
        line-height: 140%;
        max-width: 165px;
    }

    .advent_link {
        padding: 6px 0;
        font-size: 12px;
        line-height: 110%;
        letter-spacing: -0.12px;
    }

    .advent_link img {
        display: none;
    }

    .advent_code img {
        display: none;
    }

    .open_card {
        padding: 8px;
    }

    .advent_code {
        font-size: 12px;
    }

}

@media (max-width: 570px) {

    .pingvin {
        width: 272px;
        right: -71px;
        bottom: -133px;
    }

    .meshok {
        width: 222px;
        left: -37px;
        bottom: -127px;
    }

    .advent {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(6, 1fr);
        gap: 8px;
        padding: 70px 0 275px;
    }

    .advent_start {
        grid-area: 1 / 1 / 2 / 3;
    }

    .advent_card:nth-child(2) {
        grid-area: 2 / 1 / 3 / 2;
    }

    .advent_card:nth-child(3) {
        grid-area: 2 / 2 / 3 / 3;
    }

    .advent_card:nth-child(4) {
        grid-area: 3 / 1 / 4 / 2;
    }

    .advent_card:nth-child(5) {
        grid-area: 3 / 2 / 4 / 3;
    }

    .advent_card:nth-child(6) {
        grid-area: 4 / 1 / 5 / 2;
    }

    .advent_card:nth-child(7) {
        grid-area: 4 / 2 / 5 / 3;
    }

    .advent_card:nth-child(8) {
        grid-area: 5 / 1 / 6 / 2;
    }

    .advent_card:nth-child(9) {
        grid-area: 5 / 2 / 6 / 3;
    }

    .advent_card:nth-child(10) {
        grid-area: 6 / 1 / 7 / 2;
    }

    .advent_card:nth-child(11) {
        grid-area: 6 / 2 / 7 / 3;
    }

}