:root {
    /* COLORS */
    --header: linear-gradient(90deg, #FFF 46.73%, #EEE2C4 93.46%);
    --header-text-1: #000;
    --header-text-2: #000;
    --site-background: linear-gradient(172deg, #FFF -15.94%, #FFF 15.12%, #F5E4A8 86.09%);
    --main-title: #000;
    --main-under-title: #000;
    --main-line-text: #FBF6D7;
    --comment-title: #000;
    --comment-name: #243F70;
    --comment-shadow: 0px 4px 6.1px 0px #E9D538;
    --welcome-popup: #DA291C;
    --welcome-popup-title: #fff;
    --welcome-popup-message: #fff;
    --welcome-popup-button: #FFC72C;
    --welcome-popup-button-text: #000;
    --welcome-popup-button-shadow: 0px 4px 0px 0px #C79A1E;
    --popup-line-text: #fff;
    --first-popup: #DA291C;
    --first-popup-title: #fff;
    --first-popup-message: #fff;
    --second-popup: #DA291C;
    --second-popup-title: #fff;
    --second-popup-message: #fff;
    --second-popup-list: #ffffff;
    --second-button: #FFC72C;
    /* SRC */
    --close: url(./image/close.svg);
    --back: url(./image/back.svg);
    --logo: url(./image/logo.png);
    --main-image: url(./image/main_Image.png);
    --card: url(./image/card.png);
    --card-up: url(./image/card_up.png);
    --vector: url(./image/vector.svg);
    --main-line: url(./image/main_line.svg);
    --popup-line: url(./image/popup_line.svg);
}

* {
    font-family: sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.wrapper {
    max-width: 430px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
}

.b_color {
    color: var(--b-color);
}

.header {
    height: 54px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 11px 0 5px;
    background: var(--header);
}

.close_icon {
    background-image: var(--close);
    width: 30px;
    height: 30px;
    background-size: contain;
    background-repeat: no-repeat;
    cursor: pointer;
}

.back_icon {
    background-image: var(--back);
    width: 30px;
    height: 30px;
    background-size: contain;
    background-repeat: no-repeat;
    cursor: pointer;
}

.header_block {
    width: 100%;
    display: flex;
    align-items: center;
    padding: 0 5px;
}

.logo {
    background-image: var(--logo);
    width: 72px;
    height: 44px;
    margin-right: 5px;
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
}

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

.header_double_text {
    display: flex;
    flex-direction: column;
    border-radius: 20px;
    padding: 3px 15px 3px 6px;
}

.header_double_text_item1 {
    color: var(--header-text-1);
    font-size: 14px;
}

.header_double_text_item2 {
    color: var(--header-text-2);
    font-size: 13px;
}

.main {
    width: 100%;
    height: 100%;
    background: var(--site-background);
    padding: 0;
}

.main_image {
    width: 100%;
    height: 189px;
    background-image: var(--main-image);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
}

.welcome_text {
    font-size: 30px;
    font-weight: 700;
    text-align: center;
    margin-top: 15px;
    color: var(--main-title);
}

.welcome_small_text {
    width: 100%;
    padding: 0 23px;
    font-size: 16px;
    font-weight: 500;
    line-height: 17px;
    margin-top: 6px;
    color: var(--main-under-title);
    text-align: center;
}

.cards_container {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    row-gap: 17px;
    column-gap: 11px;
    justify-content: center;
    margin-top: 13px;
    perspective: 1000px;
}

.card {
    width: 156px;
    height: 95px;
    cursor: pointer;
    transition: transform 0.8s;
    transform-style: preserve-3d;
    position: relative;
    border-radius: 12px;
    box-shadow: 0px 2px 5px 2px #00000038;
}

.card_front,
.card_back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 8px;
}

.card_front {
    background-image: var(--card);
    background-size: cover;
    background-position: center;
}

.card_back {
    transform: rotateY(180deg);
    background-image: var(--card-up);
    background-size: cover;
    background-position: center;
}

.flipped {
    transform: rotateY(180deg);
}

.popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.popup-content {
    border-radius: 26px;
    text-align: center;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 0 20px 0;
    width: 100%;
    max-width: 330px;
    width: 100%;
}

.popup-button {
    width: 216px;
    height: 51px;
    background: var(--welcome-popup-button);
    border-radius: 25.5px;
    border: none;
    color: var(--welcome-popup-button-text);
    box-shadow: var(--welcome-popup-button-shadow);
    text-align: center;
    font-size: 24px;
    font-style: normal;
    font-weight: 800;
    line-height: 21px;
    margin-top: 9px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    cursor: pointer;
}

.main_line {
    width: 100%;
    height: 59px;
    background-image: var(--main-line);
    margin-top: 25px;
    margin-bottom: -6px;
    position: relative;
    padding-top: 18px;
}

.main_line_vector {
    background-image: var(--vector);
    width: 41px;
    height: 41px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: -20px;
}

.main_line_text {
    color: var(--main-line-text);
    text-align: center;
    font-size: 16px;
    font-style: normal;
    font-weight: 800;
    line-height: 21px;
}

.comment_title {
    text-align: center;
    font-size: 24px;
    font-style: normal;
    font-weight: 800;
    line-height: normal;
    color: var(--comment-title);
    margin-top: 19px;
}

.welcome-popup .popup-content {
    padding: 21px 0px 7px 0px;
    max-width: 320px;
    background: var(--welcome-popup);
    display: flex;
    flex-direction: column;
    align-items: center;
    border-radius: 26px;
}

.popup-title {
    margin-top: 17px;
    color: var(--welcome-popup-title);
    text-align: center;
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 22px;
    max-width: 288px;
}

.welcome-popup-title {
    margin-top: 16px;
    font-size: 20px;
    font-weight: 800;
    line-height: 24px;
    letter-spacing: 0.2px;
}

.welcome-popup-paragraph {
    color: var(--welcome-popup-message);
    text-align: center;
    font-size: 15px;
    font-style: normal;
    font-weight: 500;
    line-height: 20px;
    margin-top: 10px;
    max-width: 288px;
    padding: 0 16px;
}

.welcome-popup-list {
    width: 100%;
    max-width: 288px;
    margin-top: 12px;
    padding: 10px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.10);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.welcome-popup-list-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    color: var(--welcome-popup-message);
    text-align: left;
    font-size: 14px;
    font-style: normal;
    font-weight: 600;
    line-height: 18px;
}

.welcome-popup-emoji {
    width: 18px;
    line-height: 18px;
    flex: 0 0 18px;
}

.welcome-popup-tip {
    margin-top: 12px;
    font-weight: 700;
}

.welcome-popup-attempts {
    margin-top: 6px;
    font-weight: 800;
}

.popup-message {
    color: var(--welcome-popup-message);
    text-align: center;
    font-size: 16px;
    font-style: normal;
    font-weight: 900;
    line-height: 22px;
    margin-top: 11px;
    max-width: 317px;
}

.popup_line {
    background-image: var(--popup-line);
    width: 100%;
    height: 59px;
    color: var(--popup-line-text);
    text-align: center;
    font-size: 16px;
    font-style: normal;
    font-weight: 800;
    line-height: 21px;
    padding: 14px 0px 0 0px;
    text-align: center;
    background-repeat: no-repeat;
    background-size: cover;
    margin-top: 11px;
}

.popup {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.popup[style*="flex"] {
    opacity: 1;
}

.welcome-popup-image {
    width: 156px;
    height: 94px;
    border-radius: 12px;
    background-image: var(--card-up);
    background-repeat: no-repeat;
    background-size: cover;
    border: 2px solid white;
    filter: drop-shadow(0px 4px 13.6px rgba(0, 0, 0, 0.48));
}

.welcome-popup-button {
    width: 216px;
    height: 51px;
    background: var(--welcome-popup-button);
    border-radius: 25.5px;
    border: none;
    color: var(--welcome-popup-button-text);
    box-shadow: var(--welcome-popup-button-shadow);
    text-align: center;
    font-size: 24px;
    font-style: normal;
    font-weight: 800;
    line-height: 21px;
    margin-top: 9px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    cursor: pointer;
}

.first-prize-content {
    background: var(--first-popup);
    position: relative;
}

.popup-smile {
    background-image: url(./image/smile.png);
    width: 96px;
    height: 96px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: -35px;
}

.first-prize-title {
    margin-top: 79px;
    text-align: center;
    color: var(--first-popup-title);
    text-align: center;
    font-size: 20px;
    font-style: normal;
    font-weight: 800;
    line-height: 22px;
}

.first-prize-message {
    color: var(--first-popup-message);
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 22px;
    text-align: center;
}

.first-prize-button {
    margin-top: 14px;
}

.second-prize-content {
    background: var(--second-popup);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.second-prize-title {
    color: var(--second-popup-title);
    text-align: center;
    font-size: 20px;
    font-style: normal;
    font-weight: 800;
    line-height: 22px;
    margin-top: 19px;
    white-space: nowrap;
}

.second-prize-image {
    background-image: var(--card-up);
    width: 154px;
    height: 96px;
    background-repeat: no-repeat;
    background-size: cover;
    border-radius: 12px;
    margin-top: 11px;
    border: 2px solid white;
    filter: drop-shadow(0px 4px 13.6px rgba(0, 0, 0, 0.48));
}

.second-prize-message {
    text-align: center;
    color: var(--second-popup-message);
    font-size: 16px;
    font-style: normal;
    font-weight: 600;
    line-height: 22px;
}

.second-prize-list {
    display: flex;
    padding-left: 41px;
    padding-right: 15px;
    flex-direction: column;
    align-items: start;
    margin-top: 8px;
    gap: 6px;
}

.second-prize-list li {
    color: var(--second-popup-list);
    text-align: start;
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: 18px;
}

.second-prize-button {
    width: 216px;
    height: 51px;
    color: #000000;
    text-align: center;
    font-size: 24px;
    font-style: normal;
    font-weight: 800;
    line-height: 21px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease;
    animation: winButtonYellow 1.5s infinite;
    box-shadow: 0 4px 0px #C79A1E;
    background-color: #FFC72C;
    border-radius: 25.5px;
    cursor: pointer;
}

@keyframes winButtonYellow {
    0% {
        transform: scale(1);
        box-shadow: 0 4px 0px #C79A1E;
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 6px 10px rgba(0,0,0,0.2);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 4px 0px #C79A1E;
    }
}

.second-prize-button::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    z-index: -1;
    background: linear-gradient(45deg, #FFC72C, #FFEA75, #FFC72C, #FFEA75);
    background-size: 400% 400%;
    animation: glowBorderYellow 3s ease infinite;
    border-radius: inherit;
}

@keyframes glowBorderYellow {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.second-prize-email-input {
    width: 85%;
    padding: 14px 16px;
    margin-top: 10px;
    margin-bottom: 20px;
    box-sizing: border-box;
    border-radius: 12px;
    border: 2px solid #FFC72C;
    font-size: 16px;
    font-weight: 500;
    color: #000;
    outline: none;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: border-color 0.3s, box-shadow 0.3s;
}

.second-prize-email-input:focus {
    border-color: #000;
    box-shadow: 0 0 0 3px rgba(255, 199, 44, 0.5);
}

.second-prize-email-input::placeholder {
    color: #666;
}

/* Ефект блиску при наведенні */

.second-prize-button::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    transform: skewX(-25deg);
}

.second-prize-button:hover::after {
    animation: shineYellow 1s;
}

@keyframes shineYellow {
    100% {
        left: 200%;
    }
}


/* Ефект натискання */

.second-prize-button:active {
    transform: scale(0.95);
    background-color: #3AAE64;
    /* Дещо темніший зелений при натисканні */
}

@media screen and (max-width: 425px) {
    .header_double_text_item1 {
        font-size: 12px;
    }
    .header_double_text_item2 {
        font-size: 11px;
    }
    .header_double_text {
        padding: 3px 8px 3px 6px;
    }
}

@media screen and (max-width: 379px) {
    .phone {
        display: none;
    }
}

@media screen and (max-width: 365px) {
    .welcome_text {
        margin-top: 0px;
    }
    .header_double_text_item1 {
        font-size: 12px;
    }
    .header_double_text_item2 {
        font-size: 11px;
    }
}

.comment_container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: linear-gradient(314deg, #FFF 5.61%, #94D8CC 74.67%);
    padding-bottom: 20px;
}

.comment_head {
    display: flex;
    gap: 7px;
}

.comment_head__content {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.comment {
    display: flex;
    flex-direction: column;
    width: 80%;
    margin: 0 auto;
    margin-top: 21px;
}

.userName {
    color: #474552;
    font-size: 16px;
    font-style: normal;
    font-weight: 500;
    line-height: 85.6%;
    margin-top: 7px;
}

.date {
    color: #7F7E92;
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: 85.6%;
    margin-top: 6px;
}

.comment_hr {
    width: 100%;
    height: 1px;
    background-color: #EEEEEE;
    margin: 0 auto;
    margin-top: 11px;
}

.user_message {
    color: #000;
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
    margin-top: 13px;
}