body {
    background-color: #004699;
    color: white;
    text-align: center;
}

#madame_luna {
    z-index: 1000;
    transform: translateY(-100%);
    transition: transform 2s;
}

#madame_luna_img {
    transition: height 1s, width 1s;
}

#madame_luna_title_container {
    position: relative;
    z-index: -1000;
}

#madame_luna_title {
    z-index: -1000;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: -105px;
    transition: height 1s, width 1s, top 1s;
}

#madame_luna_title_container h1 {
    opacity: 0;
}

#game_container {
    position: relative;
    margin-top: 110px;
    transition: margin-top 1s;
}

#luna_presentation {
    z-index: 10;
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    opacity: 1;
    transition: opacity 1s;
}

.luna_speak {
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
    background-color: #004699;
    z-index: 1000;
    font-family: Montserrat;
    font-style: normal;
    font-weight: 300;
    font-size: 14px;
    line-height: 18px;
    text-align: center;
    border-style: solid;
    border-width: 22px;
    border-image: url('img/lunaSpeakBorderImage.svg') 20 / 22px;
}

.luna_speak strong {
    font-weight: bold;
}

.luna_speak h3 {
    font-family: IM FELL English SC;
    font-style: normal;
    font-weight: normal;
    font-size: 36px;
    line-height: 20px;
    margin-bottom: 15px;
}

#launch_button {
    margin: auto;
    display: flex;
    align-items: center;
    column-gap: 10px;
}

#played {
    height: 195px;
    z-index: -1000;
    opacity: 0;
    transform: translateY(25%);
    transition: opacity 1.75s, transform 1.5s, height 1s;
}

#luna_explain {
    font-family: IM FELL English SC;
    font-style: normal;
    font-weight: normal;
    font-size: 25px;
    line-height: 27px;
}

#grid {
    display: none;
    position: relative;
    margin: 80px auto 0 auto;
    max-width: 770px;
    margin-left: auto;
    margin-right: auto;
    transition: height 1s;
}

.luna_card {
    width: 134px;
    height: 268px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 0;
    transition: left 2s, top 2s, transform 2s;
    cursor: pointer;
    perspective: 1000px;
    /* Remove this if you don't want the 3D effect */
}

.luna_card_inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}

.luna_card_front,
.luna_card_back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    /* Safari */
    backface-visibility: hidden;
}

.luna_card_front {
    background-image: url('img/CarteRectoLarge.png');
    background-size: 134px 268px;
    filter: drop-shadow(1.2px 1.2px 5.5px rgba(0, 0, 1, 0.25));
}

.luna_card_back {
    transform: rotateY(180deg);
    background-size: 134px 268px;
    filter: drop-shadow(1.2px 1.2px 5.5px rgba(0, 0, 1, 0.25));
}

.luna_card_back img {
    width: 75%;
    height: auto;
}

.luna_card_back h3 {
    text-transform: uppercase;
}

.logo {
    text-align: center;
    margin-bottom: 20px;
    margin-top: 65px;
}

@media screen and (max-width: 991px) {
    .luna_card {
        left: 0;
        transform: initial;
    }
}

@media screen and (max-width: 575px) {
    #played {
        height: 230px;
    }
    .luna_card {
        width: 104px;
        height: 207px;
    }
    .luna_card_front {
        background-size: 104px 207px;
    }
    .luna_card_back {
        background-size: 104px 207px;
    }
    .luna_speak {
        border-image: url('img/lunaSpeakBorderImage.svg') 30 / 22px;
    }
}


/* ---- Stars placement ---- */

.stars>* {
    position: fixed;
    z-index: -10;
}

#star_1 {
    left: 61vw;
    top: 26vh;
}

#star_2 {
    left: 34vw;
    top: 18vh;
}

#star_3 {
    left: 26vw;
    top: 54vh;
}

#star_4 {
    left: 68vw;
    top: 54vh;
}

#star_5 {
    left: 50vw;
    top: 90vh;
    transform: translateX(-50%);
}

@media (max-width: 1699px) {
    #star_1 {
        left: 64vw;
    }
    #star_2 {
        left: 32vw;
    }
    #star_3 {
        left: 22vw;
    }
    #star_4 {
        left: 72vw;
    }
}

@media (max-width: 1399px) {
    #star_1 {
        left: 66vw;
    }
    #star_2 {
        left: 28vw;
    }
    #star_3 {
        left: 16vw;
    }
    #star_4 {
        left: 76vw;
    }
}

@media (max-width: 1199px) {
    #star_1 {
        left: 70vw;
    }
    #star_2 {
        left: 24vw;
    }
    #star_3 {
        left: 9vw;
    }
    #star_4 {
        left: 82vw;
    }
}

@media (max-width: 991px) {
    #star_1 {
        left: 74vw;
    }
    #star_2 {
        left: 18vw;
    }
    #star_3 {
        left: 3vw;
    }
    #star_4 {
        left: 88vw;
    }
}

@media (max-width: 767px) {
    #star_1 {
        left: 80vw;
    }
    #star_2 {
        left: 10vw;
    }
    #star_3 {
        left: 0;
    }
    #star_4 {
        left: 88vw;
    }
}

@media (max-width: 575px) {
    #star_1 {
        left: 85vw;
    }
    #star_2 {
        left: 5vw;
    }
    #star_3 {
        left: 10vw;
        top: 59vh;
    }
    #star_4 {
        left: 75vw;
        top: 59vh;
    }
}


/* ---- When grid is ready --- */

@media screen and (min-width: 576px) {
    #grid.ready .luna_card:hover::before {
        content: '';
        transform: translateX(-50%) translateY(calc(-100% - 6px));
        color: white;
        position: absolute;
        left: 50%;
        background-image: url('img/animations/eye.svg');
        width: 30px;
        height: 63px;
    }
}

.luna_card.show .luna_card_inner {
    transform: rotateY(180deg);
}


/* ---- transition card ---- */

#transition_card {
    position: absolute;
    left: 0;
    top: 0;
    width: 134px;
    height: 268px;
    background-size: 134px 268px;
    filter: drop-shadow(1.2px 1.2px 5.5px rgba(0, 0, 1, 0.25));
    background-image: url('img/CarteRectoLarge.png');
    opacity: 0;
    z-index: -100000;
    display: none;
}

@media screen and (max-width: 575px) {
    #transition_card {
        width: 104px;
        height: 207px;
        background-size: 104px 207px;
    }
}


/* ---- When card is draw ---- */

#card_reveal {
    display: none;
    position: absolute;
    width: 800px;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 2s;
    z-index: -10000;
}

#card_reveal_image {
    filter: drop-shadow(1.2px 1.2px 5.5px rgba(0, 0, 1, 0.25));
}

.card_content {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    row-gap: 30px;
}

.card_content #card_reveal_title {
    font-family: IM FELL English SC;
    font-style: normal;
    font-weight: normal;
    font-size: 54.1848px;
    line-height: 57px;
    background-image: url('img/stars/stars_title.svg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 60%;
}

.card_content #card_reveal_speak {
    font-family: IM FELL English SC;
    font-style: normal;
    font-weight: normal;
    font-size: 19px;
    line-height: 21px;
    padding: 30px 10px;
    text-align: center;
    border-style: solid;
    border-width: 18px;
    border-image: url('img/cards/borders/world.svg') 20 / 18px;
}

.card_content .calls {
    display: flex;
    justify-content: space-around;
}

@media screen and (max-width: 991px) {
    #card_reveal {
        position: absolute;
        width: 100%;
        left: 0;
        transform: initial;
    }
    .card_content .calls {
        align-items: center;
        column-gap: 15px;
    }
    #card_reveal_image {
        margin-bottom: 30px;
        height: 300px;
        width: 150px;
    }
    .card_content #card_reveal_title {
        background-size: 35%;
    }
}

@media screen and (max-width: 575px) {
    #card_reveal {
        top: 10px;
    }
    .card_content #card_reveal_title {
        background-size: 75%;
    }
}


/* ---- Utils ---- */

.btn-armstrong,
.btn-armstrong:hover {
    font-family: Montserrat;
    font-style: normal;
    font-weight: 600;
    font-size: 12px;
    line-height: 16px;
    color: #FFFFFF;
    text-decoration: none;
    padding: 16px 18px;
    background: #073366;
    border-radius: 8px;
}

.btn-white-armstrong,
.btn-white-armstrong:hover {
    font-family: Montserrat;
    font-style: normal;
    font-weight: 600;
    font-size: 12px;
    line-height: 16px;
    color: #004699;
    text-decoration: none;
    padding: 16px 18px;
    background: #FFFFFF;
    border-radius: 8px;
}

.bold,
.bold:hover {
    font-weight: bold;
}