@font-face {
    font-family: 'PP Neue Corp';
    src: url('../fonts/PPNeueCorp-TightUltrabold.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'PP Neue Corp';
    src: url('../fonts/PPNeueCorp-ExtendedUltrabold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
}

.card-button {
    padding: 9px 22px;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 18px;
    font-size: 20px;
    font-weight: 900;
    line-height: 1.15;
    margin-top: 18px;
    border: none;
    height: 40px;
}

.card-button.big {
    height: 64px;
}

.card-button.green {
    background-color: #AFFF00;
    color: #6F00FF;
}

.card-button.pink {
    background-color: #F933F5;
    color: white;
}

.card-button:hover {
    text-decoration: none;
    opacity: 0.9;
}

body.page-template-tpl-card-game {
    margin: 0;
}

.card-game {
    overflow: hidden;
    position: relative;
    min-height: 100vh;
    background-image: url('../img/card-game/background.png');
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;

    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

body.admin-bar .card-game {
    min-height: calc( 100vh - 46px );
}

@media (min-width: 768px ) {
    body.admin-bar .card-game {
        min-height: calc( 100vh - 32px );
    }
}

.card-game::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    right: 0;

    background-image: url('../img/card-game/background-eyes.png');
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;

    animation: background-fade 500ms ease 7s 1 forwards;
}

.card-game::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: url('../img/card-game/logo-vigorsol-mobile.png') no-repeat center center;
    background-size: cover;

    animation: background-fade 500ms ease 7s 1 forwards;
}

@keyframes background-fade {
    from {}
    to { opacity: 0; visibility: hidden; }
}

.cards-showdown, .final-card {
    position: relative;
    width: 100%;
    height: 442px;
}

.cards-showdown .text {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    right: 0;
    opacity: 0;
    visibility: hidden;

    display: flex;
    justify-content: center;
    align-items: center;

    animation-name: show-text;
    animation-duration: 3s;
    animation-iteration-count: 1;
    animation-fill-mode: forwards;
    animation-timing-function: ease;
}

.cards-showdown .text img {
    width: calc( 100% - 80px );
    height: calc( 100% - 120px );
    object-fit: contain;
    max-width: 300px;
    max-height: 300px;
}

.cards-showdown .text-1 {
    animation-delay: 1s;
}

.cards-showdown .text-2 {
    animation-delay: 4s;
}

@keyframes show-text {
    0% { opacity: 0; visibility: hidden; }
    20% { opacity: 1; visibility: visible; }
    80% { opacity: 1; visibility: visible; }
    100% { opacity: 0; visibility: hidden; }
}

.cards-showdown .card, .final-card .card {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    right: 0;
    opacity: 0;
    visibility: hidden;
    background: transparent;
    border: none;

    display: flex;
    justify-content: center;
    align-items: center;

    animation-iteration-count: 1;
    animation-fill-mode: forwards;
    animation-duration: 2s;
    animation-timing-function: ease;
}

.cards-showdown .card img, .final-card .card img {
    width: 275px;
    height: 442px;
    object-fit: cover;
    box-shadow: 5px 4px 4px 0 rgba(0, 0, 0, 0.25);
    border-radius: 18px;
}

.cards-showdown .card-1 {
    animation-name: cards-showdown-1;
    animation-delay: 7s;
}

.cards-showdown .card-2 {
    animation-name: cards-showdown-2;
    animation-delay: 9s;
}

.cards-showdown .card-3 {
    animation-name: cards-showdown-3;
    animation-delay: 11s;
    top: -120px;
}


@keyframes cards-showdown-1 {
    0% { opacity: 0; visibility: hidden; transform: rotate3d(0,2,1,-90deg) }
    20% { opacity: 1; visibility: visible; transform: rotate3d(0,0,0,0deg) }
    80% { opacity: 1; visibility: visible; top: 0; }
    100% { opacity: 1; visibility: visible; top: 120px; }
}

@keyframes cards-showdown-2 {
    0% { opacity: 0; visibility: hidden; transform: rotate3d(0,2,1,-90deg) }
    20% { opacity: 1; visibility: visible; transform: rotate3d(0,0,0,0deg) }
    80% { opacity: 1; visibility: visible; }
    100% { opacity: 1; visibility: visible; }
}

@keyframes cards-showdown-3 {
    0% { opacity: 0; visibility: hidden; transform: rotate3d(0,2,1,-90deg) }
    20% { opacity: 1; visibility: visible; transform: rotate3d(0,0,0,0deg) }
    80% { opacity: 1; visibility: visible; }
    100% { opacity: 1; visibility: visible; }
}

.cards-response {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    right: 0;
    opacity: 0;
    visibility: hidden;
    background-color: rgba(0,0,0,0.58);

    display: flex;
    justify-content: center;
    align-items: center;

    animation: show-items 1s ease 13s 1 forwards;
}

@keyframes show-items {
    0% { opacity: 0; visibility: hidden; }
    100% { opacity: 1; visibility: visible; }
}

.cards-response .card {
    padding: 46px;
    width: 332px;
    height: 531px;
    background: url('../img/card-game/card-background-big.png') no-repeat center center;
    background-size: cover;
    border: none;
    text-align: center;
}

.cards-response .card::before {
    content: '';
    position: absolute;
    top: -149px;
    left: 16px;
    width: 300px;
    height: 150px;
    background: url('../img/card-game/yeti.png') no-repeat top center;
    background-size: cover;
}

.cards-response .card .title {
    font-family: "PP Neue Corp", sans-serif;
    color: white;
    font-size: 37px;
    line-height: 31px;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-decoration: underline #AFFF00;
    text-underline-offset: 14px;
    margin: 10px 0 24px;
}

.cards-response .card .response-text-wrapper {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.cards-response .card .response-text {
    color: white;
    font-size: 25px;
    line-height: 1.2;
    font-style: italic;
    margin-bottom: 0;
}

.register-form {
    position: absolute;
    width: 100%;
    max-width: 400px;
    height: 100%;
    top: 0;
    left: 50%;
    opacity: 0;
    transform: translateX(-50%);
    padding: 40vh 40px 40px;
    text-align: center;
    color: white;
    visibility: hidden;
}

.register-form .floating-card {
    background: url('../img/card-game/floating-card.png') no-repeat center center;
    width: 595px;
    height: 634px;
    position: absolute;
    bottom: 65vh;
    left: 50%;
    transform: translateX(calc(-50% + 30px));
}

.register-form .register-text {
    font-size: 21px;
    line-height: 1.19;
}

.register-form input[type="email"] {
    width: 100%;
    height: 54px;
    background-color: #79FFFF;
    text-align: center;
    font-size: 21px;
    color: #1922FF;
    border: none;
    border-radius: 84px;
    margin-top: 20px;
}

.register-form input[type="submit"] {
    display: inline-block;
    margin-top: 30px;
}

.register-form input[type="email"]::placeholder {
    color: #1922FF;
}

/* Registration animations */
.card-game.registration::before {
    display: none;
}

.card-game.registration .register-form {
    animation: show-items 1s ease 1s 1 forwards;
}

.card-game.registration .cards-response {
    animation: hide-items 1s ease 1 forwards;
}

.card-game.registration .cards-showdown .card {
    animation: hide-items 1s ease 1 forwards;
}

@keyframes hide-items {
    0% { opacity: 1; visibility: visible; }
    100% { opacity: 0; visibility: hidden; }
}

.card-game.registration::before {
    background-image: url('../img/card-game/background-eyes-bottom.png');
    opacity: 0;
    visibility: hidden;
    animation: show-items 1s ease 1s 1 forwards;
}

.card-game.verified::before {
    animation: none;
    opacity: 0;
    visibility: hidden;
}

.card-game.verified::after {
    display: none;
}

.final-card .card {
    opacity: 0;
    visibility: hidden;
    animation: show-items 1s ease 1s 1 forwards;
}

.final-card .card img {
    box-shadow: none;
    animation: show-card-shadow 1s ease 1s 1 forwards;
}

@keyframes show-card-shadow {
    from { box-shadow: none; }
    to { box-shadow: 5px 4px 4px 0 rgba(0, 0, 0, 0.25); }
}

.floating-text {
    font-family: 'PP Neue Corp', sans-serif;
    font-size: 22px;
    line-height: 32px;
    max-width: 400px;
    font-weight: 700;
    text-align: center;
    color: white;
    transform: rotate(-12.5deg);
    margin-bottom: 60px;
    opacity: 0;
    visibility: hidden;
    animation: show-items 1s ease 1s 1 forwards;
}

.final-response {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background-color: rgba(0,0,0,0.58);
    opacity: 0;
    visibility: hidden;
    animation: show-items 1s ease 4s 1 forwards;
}

.final-response .card {
    background: url('../img/card-game/card-background.png') no-repeat center center;
    height: 463px;
    padding: 34px 46px 46px;
}

@media (max-width: 360px) {
    .cards-response .card {
        width: 277px;
        height: 387px;
        background-size: contain;
    }

    .cards-response .card::before {
        left: -8px;
    }

    .cards-response .card .title {
        font-size: 30px;
        margin-top: 0;
    }

    .cards-response .card .response-text {
        font-size: 18px;
    }

    .cards-response .card .card-button {
        font-size: 16px;
        height: 52px;
    }
}

.cards-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
    overflow: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cards-popup-content {
    position: relative;
    background: darkblue;
    padding: 30px;
    border-radius: 10px;
    max-width: 90vw;
    max-height: 95vh;
    overflow-y: auto;
    text-align: center;
}

.cards-popup-title {
    font-family: 'PP Neue Corp', sans-serif;
    font-weight: 400;
    font-size: 28px;
    color: white;
    letter-spacing: 2px;
}

.cards-popup-wrapper {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
}

.cards-popup-wrapper a {
    display: flex;
    justify-content: center;
    margin: 10px;
}

.cards-popup-wrapper a:last-child:not(:nth-child(even)){
    grid-column: 1 / -1;
}

.cards-popup-wrapper img {
    width: 120px;
    height: auto;
}

.btn-close {
    position: absolute;
    top: 7px;
    right: 7px;
    background: transparent;
    border: none;
    color: white;
    font-size: 26px;
}

.skip-registration-form input {
    width: 100%;
}

@media (min-width: 600px) {
    .card-game {
        background-image: url('../img/card-game/background-desktop.jpg');
    }

    .card-game::before {
        background-image: url('../img/card-game/background-eyes-desktop.png');
    }

    .card-game::after {
        background-image: url("../img/card-game/logo-vigorsol-desktop.png");
    }

    .card-game.registration::before {
        background-image: url('../img/card-game/background-eyes-bottom-desktop.png');
    }
}

@media (min-width: 600px) and (max-height: 900px) {
    .cards-response:not(.final-response) .card {
        padding: 30px 40px 40px;
        width: 270px;
        height: 432px;
    }

    .cards-response:not(.final-response) .card::before {
        left: -12px;
    }

    .cards-response:not(.final-response) .card .response-text {
        font-size: 20px;
    }

    .cards-response:not(.final-response) .card-button.big {
        font-size: 18px;
        height: 56px;
    }

    .cards-showdown .text img {
        max-height: 230px;
    }
}