@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300..700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    font-family: "Space Grotesk", serif;
}

:root {
    --black: #000000;
    --dark-purple: #5C2DD5;
    --purple: #7945FF;
    --pink: #FD6687;
    --yellow: #FFCE67;
    --white: #FFFFFF;
}

html {
    overscroll-behavior: smooth;
    user-select: none;
}

.visibility {
    visibility: hidden !important;
}

.hidden {
    display: none !important;
}

h1 {
    margin: 0;
}

body {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
    min-height: 100vh;
    background-color: var(--dark-purple);
}

.home-page {
    width: 90%;
    max-width: 480px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 80px;
    padding: 70px 40px 60px 40px;
    background-color: var(--purple);
    border-radius: 40px;
    box-shadow: 0 10px 0 0 var(--black);
    border: 3px solid var(--black);
}

.home-page-btn-wrapper {
    list-style: none;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.play-vs-cpu {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--pink);
    color: var(--white);
    border: 3px solid var(--black);
    border-radius: 20px;
    box-shadow: 0 10px 0 0 var(--black);
    padding: 12px 18px 12px 20px;
    text-transform: uppercase;
    width: 100%;
    cursor: pointer;

    font-weight: 700;
    font-size: 24px;
    line-height: 30.62px;
    letter-spacing: 0px;
    transition: all 0.1s ease-in;

    &:hover {
        border-color: var(--dark-purple);
        box-shadow: 0 10px 0 0 var(--dark-purple);
    }
}

.play-vs-player {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--yellow);
    color: var(--black);
    border: 3px solid var(--black);
    border-radius: 20px;
    box-shadow: 0 10px 0 0 var(--black);
    padding: 12px 18px 12px 20px;
    text-transform: uppercase;
    width: 100%;
    cursor: pointer;

    font-weight: 700;
    font-size: 24px;
    line-height: 30.62px;
    letter-spacing: 0px;
    transition: all 0.1s ease-in;

    &:hover {
        border-color: var(--dark-purple);
        box-shadow: 0 10px 0 0 var(--dark-purple);
    }
}

.game-rules {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--white);
    color: var(--black);
    border: 3px solid var(--black);
    border-radius: 20px;
    box-shadow: 0 10px 0 0 var(--black);
    padding: 20px;
    text-transform: uppercase;
    width: 100%;
    cursor: pointer;

    font-weight: 700;
    font-size: 24px;
    line-height: 30.62px;
    letter-spacing: 0px;
    transition: all 0.1s ease-in;

    &:hover {
        border-color: var(--dark-purple);
        box-shadow: 0 10px 0 0 var(--dark-purple);
    }
}

.game-rules-page {
    position: relative;
    width: 90%;
    max-width: 480px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 30px;
    padding: 30px 34px 54px 34px;
    background-color: var(--white);
    border-radius: 40px;
    box-shadow: 0 10px 0 0 var(--black);
    border: 3px solid var(--black);
    margin: 0 auto;
}

.game-rules-objectives-wrapper {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.rules-wrapper {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.title-game-rules {
    font-weight: 700;
    font-size: 56px;
    line-height: 71.46px;
    letter-spacing: 0px;
    text-align: center;
}

.game-rules-title-categories {
    color: var(--purple);

    font-weight: 700;
    font-size: 20px;
    line-height: 25.52px;
    letter-spacing: 0px;
}

.text-objective {
    font-weight: 500;
    font-size: 16px;
    line-height: 20.42px;
    letter-spacing: 0px;
}

.list-rules {
    list-style: none;
    counter-reset: section;
    padding-left: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.list-rules-item {
    counter-increment: section;
    display: flex;

    font-weight: 500;
    font-size: 16px;
    line-height: 20.42px;
    letter-spacing: 0px;

    &::before {
        content: counter(section) " ";
        padding-right: 10px;

        font-weight: 700;
        font-size: 16px;
        line-height: 20.42px;
        letter-spacing: 0px;
    }
}

.icon-close-game-rules {
    position: absolute;
    bottom: -2.5em;
    cursor: pointer;

    &:hover #Oval-Copy-37,
    &:hover #Oval-Copy-38 {
        transition: all 0.1s ease-in;
        fill: var(--dark-purple);
    }
}

.game-screen {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.header-game-screen {
    list-style: none;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
    width: 100%;
    max-width: 632px;
    margin-top: 54px;
}

.logo {
    margin: 0 auto;
}

.btn-header-game {
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--white);
    background-color: var(--dark-purple);
    border-radius: 20px;
    text-transform: uppercase;
    padding: 10px 20px;
    cursor: pointer;
    transition: all 0.1s ease-in;

    font-weight: 700;
    font-size: 16px;
    line-height: 20.42px;
    letter-spacing: 0px;
    text-align: center;

    &:hover {
        background-color: var(--pink);
    }
}

.game-pause {
    position: absolute;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    margin: 0 auto;
    min-height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
}

.game-pause-container {
    width: 90%;
    max-width: 480px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 44px;
    padding: 50px 40px;
    background-color: var(--purple);
    border-radius: 40px;
    box-shadow: 0 10px 0 0 var(--black);
    border: 3px solid var(--black);
}

.game-pause-title {
    font-weight: 700;
    font-size: 56px;
    line-height: 71.46px;
    letter-spacing: 0px;
    color: var(--white);
}

.list-game-pause {
    list-style: none;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.btn-game-pause {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--white);
    color: var(--black);
    border: 3px solid var(--black);
    border-radius: 20px;
    box-shadow: 0 10px 0 0 var(--black);
    padding: 20px;
    text-transform: uppercase;
    width: 100%;
    cursor: pointer;

    font-weight: 700;
    font-size: 24px;
    line-height: 30.62px;
    letter-spacing: 0px;
    transition: all 0.1s ease-in;

    &:hover {
        border-color: var(--dark-purple);
        box-shadow: 0 10px 0 0 var(--dark-purple);
    }
}

.btn-quit-pause {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--pink);
    color: var(--white);
    border: 3px solid var(--black);
    border-radius: 20px;
    box-shadow: 0 10px 0 0 var(--black);
    padding: 20px;
    text-transform: uppercase;
    width: 100%;
    cursor: pointer;

    font-weight: 700;
    font-size: 24px;
    line-height: 30.62px;
    letter-spacing: 0px;
    transition: all 0.1s ease-in;

    &:hover {
        border-color: var(--dark-purple);
        box-shadow: 0 10px 0 0 var(--dark-purple);
    }
}

.cursor-container {
    position: relative;
    width: 38px;
    height: 36px;
    left: 2em;
    margin-bottom: 8px;
}

.icon-cursor-red,
.icon-cursor-yellow {
    position: absolute;
    top: 0;
    left: 0;
    transition: all 0.1s ease-in;
}

.mid-game-screen {
    display: flex;
    gap: 60px;
    align-items: center;
}

.player-one-score,
.player-two-score {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 14px;
    padding: 46px 28px 16px 28px;
    background-color: var(--white);
    border: 3px solid var(--black);
    border-radius: 20px;
    box-shadow: 0 10px 0 0 var(--black);
}

.player-one-score-icon,
.player-two-score-icon {
    position: absolute;
    top: -1.5em;
}

.text-player-one-score,
.text-player-two-score {
    text-align: center;
}

.player-one,
.player-two {
    font-weight: 700;
    font-size: 20px;
    line-height: 25.52px;
    letter-spacing: 0px;
    text-align: center;
}

.score-player-one,
.score-player-two {
    font-weight: 700;
    font-size: 56px;
    line-height: 71.46px;
    letter-spacing: 0px;
    text-align: center;
}

.grid-wrapper {
    position: relative;
}

.shadow-grid {
    position: absolute;
    top: 10px;
    left: 0;
    width: 100%;
    z-index: -1;
}

.game-cell-wrapper {
    display: flex;
    flex-direction: column;
    gap: 24px;
    position: absolute;
    top: 28.2em;
    left: 49.9%;
    transform: translate(-50%, -50%);
}

.game-cell {
    position: relative;
    width: 64px;
    height: 64px;
}

.win-check {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}


.ligne {
    display: flex;
    align-items: center;
    gap: 24px;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.footer-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 200px;
    border-radius: 60px 60px 0 0;
    z-index: -2;
    background-color: var(--dark-purple);
}

.turn-player {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    height: 165px;
    max-width: 197px;
}

.turn-player-1,
.turn-player-2 {
    position: relative;
    width: 100%;
    height: 100%;
}

.player1-turn-icon,
.player2-turn-icon {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.text-turn-player1 {
    position: absolute;
    top: 55%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    text-align: center;
    color: var(--white);
}

.text-turn-player2 {
    position: absolute;
    top: 55%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    text-align: center;
    color: var(--black);
}

.player1-turn-text,
.player2-turn-text {
    font-weight: 700;
    font-size: 16px;
    line-height: 20.42px;
    letter-spacing: 0px;
    text-align: center;
}

.time-turn-player1,
.time-turn-player2 {
    font-weight: 700;
    font-size: 56px;
    line-height: 71.46px;
    letter-spacing: 0px;
    text-align: center;
}

.game-end-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: transparent;
    display: flex;
    justify-content: center;
    align-items: end;
}

.game-end-winner-1,
.game-end-winner-2 {
    position: absolute;
    bottom: 70px;
    width: 90%;
    max-width: 285px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 16px;
    background-color: var(--white);
    border-radius: 20px;
    box-shadow: 0 10px 0 0 var(--black);
    border: 3px solid var(--black);
}

.player-winner {
    font-weight: 700;
    font-size: 16px;
    line-height: 20.42px;
    letter-spacing: 0px;
    text-align: center;
}

.gamer-end-wins {
    font-weight: 700;
    font-size: 56px;
    line-height: 71.46px;
    letter-spacing: 0px;
    text-align: center;
}

.gamer-end-play-again-winner1,
.gamer-end-play-again-winner2 {
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--white);
    background-color: var(--dark-purple);
    border: none;
    border-radius: 20px;
    text-transform: uppercase;
    padding: 10px 20px;
    cursor: pointer;
    transition: all 0.1s ease-in;

    font-weight: 700;
    font-size: 16px;
    line-height: 20.42px;
    letter-spacing: 0px;
    text-align: center;

    &:hover {
        background-color: var(--pink);
    }
}