@import url('https://fonts.googleapis.com/css2?family=Righteous&display=swap');

:root {
    --purple: #830051;
    --gold: #F0AB00;
    --card-background: radial-gradient(circle, rgba(139,3,79,1) 0%, rgba(100,11,56,1) 100%);
}


body, html {
    margin: 0;
    padding: 0;
    overflow: hidden;
}

body {
    width: 1920px;
    height: 1080px;
}

main {
    width: 1920px;
    aspect-ratio: 16/9;
    position: relative;
}

.az-logo {
    position: absolute;
    top: 30px;
    right: 100px;
    width: 250px;
}

.btn {
    background-color: var(--gold);
    font-size: 65px;
    width: 650px;
    height: 100px;
    color: white;
    box-shadow: 15px 15px 10px #0004;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

.btn.disabled {
    pointer-events: none;
    opacity: .5;
}

.home-bg {
    width: 100%;
    height: 100%;
    background-image: url('../images/home-background.png');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
}

.game-bg {
    width: 100%;
    height: 100%;
    background-image: url('../images/game-background.png');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
}

.home-bg div {
    width: 100%;
    height: calc(100% - 525px);
    display: flex;
    align-items: center;
    flex-direction: column;
    gap: 3em;
}

.home, .insert-name {
    padding-top: 525px;
}

.memory-logo {
    position: absolute;
    top: 225px;
    left: 50%;
    transform: translateX(-50%);
    width: 1160px;
}

.home .instructions {
    font-size: 65px;
    font-weight: bold;
    color: white;
    text-align: center;
    margin: 0;
}

.insert-name .instructions {
    font-size: 65px;
    font-weight: bold;
    color: var(--gold);
    text-align: center;
    margin: 0;
}

.insert-name .nickname {
    width: 1150px;
    height: 100px;
    outline: none;
    border: 1px solid var(--gold);
    border-radius: 8px;
    box-shadow: 15px 15px 10px #0004;
    text-align: center;
    color: var(--gold);
    font-size: 65px;
    text-transform: uppercase;
    background-color: transparent;
    background-image: url(../images/name-input-background.png);
    background-size: 80% auto;
    background-position: center;
    background-repeat: no-repeat;
}

.insert-name .nickname.duplicate {
    animation: shake-input .3s ease-out forwards;
}

.insert-name .error-msg {
    color: var(--gold);
    font-style: italic;
    font-size: 30px;
    opacity: 0;
    margin: 0;
}

.leaderboard {
    padding-top: 225px;
    gap: .5em !important;
}

.leaderboard .memory-logo-mini {
    position: absolute;
    top: 30px;
    left: 50px;
    width: 420px;
}

.leaderboard .top-five-logo {
    width: 1068px;
    margin-left: 300px;
}

.leaderboard .results {
    list-style: none;
    padding: 0;
    margin: 0;
    width: 1230px;
}

.leaderboard .results .player-result {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #0004;
    color: white;
    font-size: 55px;
    padding: 5px 0;
    margin: 10px 0;
    line-height: 1em;
}

.player-result .result-side {
    display: flex;
    align-items: center;
    gap: 1em;
    flex-direction: row;
}

.result-side.left {
    justify-content: start;
    margin-left: 1em;
}

.result-side.right {
    justify-content: end;
    margin-right: 1em;
}

.player-result .position {
    font-family: 'Arya Triple';
}

.player-result .timer {
    width: 60px;
}

.game .timer {
    position: absolute;
    top: 20px;
    left: 160px;
    color: white;
    font-size: 30px;
    display: flex;
    align-items: center;
    gap: 1em;
}

.timer .timer-img {
    width: 130px;
}

.timer .game-time {
    margin: 0;
    margin-top: 1em;
}

.game .memory-logo-mini {
    position: absolute;
    bottom: 50px;
    right: 100px;
    width: 300px;
}

.game {
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.game .check-message {
    font-size: 60px;
    color: white;
    position: relative;
    height: 100px;
    width: 100%;
}

.game .check-message p {
    margin: 0;
    position: absolute;
    width: 100%;
    text-align: center;
    display: none;
}

.game .cards {
    display: grid;
    grid-template-columns: auto auto auto auto;
}

.game .card {
    height: 265px;
    width: 265px;
    transition: opacity .3s;
    transition-delay: 1.8s;
}

.game .card.found {
    opacity: 0;
}

.game .card.not-clickable {
    pointer-events: none;
}

.game .card .card-content {
    position: relative;
    height: 100%;
    width: 100%;
    transition: transform .15s;
    transform-style: preserve-3d;
}

.game .card .card-content.flip-card {
    transform: rotateY(180deg);
}

.game .card .side {
    height: 100%;
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    backface-visibility: hidden;
}

.game .card .side.back {
    background-color: var(--gold);
    border: 1px solid var(--purple);
}

.game .card .side.front {
    background: var(--card-background);
    border: 1px solid var(--gold);
    transform: rotateY(180deg);
    display: flex;
    justify-content: center;
    align-items: center;
}

.game .card .side.front .card-image {
    width: 100%;
    height: 100%;
}

.game .card .side.front .check-result {
    width: 60px;
    position: absolute;
    opacity: 0;
    top: 1em;
    right: 1em;
}

.game .card .side.front .check-result.correct.show {
    animation: show-correct .4s ease-in forwards;
    animation-delay: .1s;
}

.game .card .side.front .check-result.incorrect.show {
    animation: show-incorrect .3s ease-out forwards;
    animation-delay: .1s;
}

.game .start-countdown {
    background-color: var(--purple);
    border: 70px solid var(--gold);
    border-radius: 50%;
    width: 570px;
    aspect-ratio: 1;
    color: white;
    font-size: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    margin-top: 50px;
}

.game .start-countdown span {
    font-family: 'Arya Triple';
}

.game .found-counter {
    position: absolute;
    top: 30px;
    right: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: .5em;
}

.game .found-counter .found-icon {
    height: 70px;
}

.game .found-counter .score {
    font-size: 95px;
    color: var(--gold);
}

.game .covered-logo {
    position: absolute;
    margin-top: 100px;
    width: 1060px;
    height: 795px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-image: url(../images/covered-logo-test.png);
    background-size: auto 100%;
    background-repeat: no-repeat;
    transition: opacity .7s;
}

.game .covered-logo.hide-logo {
    opacity: 0;
}


.game .result-view {
    margin-top: 10em;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.game .result-view .game-complete{
    color: white;
    font-size: 60px;
    text-align: center;
    margin: 0;
}

.game .result-view .final-score {
    background-color: var(--gold);
    color: white;
    font-size: 60px;
    text-align: center;
    margin-top: 1em;
    width: 650px;
    padding: .3em;
    color: white;
    box-shadow: 15px 15px 10px #0004;
    border: none;
    border-radius: 8px;
    margin: 0;
    margin-top: 2em;
}


@keyframes shake-input {
    0% {
        transform: translateX(0);
    }
    20% {
        transform: translateX(10px);
    }
    40% {
        transform: translateX(-10px);
    }
    60% {
        transform: translateX(10px);
    }
    80% {
        transform: translateX(-10px);
    }
    100% {
        transform: translateX(0);
    }
}

@keyframes countdown-out {
    0% {
        opacity: 1;
        transform: translateX(0);
    }

    100% {
        opacity: 0;
        transform: translate(300px);
    }
}

@keyframes countdown-in {
    0% {
        opacity: 0;
        transform: translateX(-300px);
    }

    100% {
        opacity: 1;
        transform: translate(0px);
    }
}

@keyframes show-correct {
    0% {
        opacity: 0;
        transform: scale(.3);
    }
    60% {
        opacity: 1;
        transform: scale(1.1);
    }
    80% {
        opacity: 1;
        transform: scale(.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes show-incorrect {
    0% {
        opacity: 0;
    }
    39% {
        opacity: 1;
    }
    40% {
        opacity: 1;
        transform: translateX(-10px);
    }
    60% {
        opacity: 1;
        transform: translateX(10px);

    }
    80% {
        opacity: 1;
        transform: translateX(-5px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}
