/*------------------------------------ SPECIAL FONT ------------------------------------*/

@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');


/*---------------------------------- GENERAL COLOR STYLE ----------------------------------*/

/*------------- COULEURS PAR DEFAUT -------------*/

:root {
    --border: #000000;
    --grid-line: rgba(0, 0, 0, 0.1);

    --bg-color: #ffffff;

    --text-color: #000000;
    --text-border-color: #f1e9e9;

    --button-bg: #000000;
    --button-text: #f1e9e9;
    --button-border: #f1e9e9;

    --button-hover-bg: #f1e9e9;
    --button-hover-text: #000000;
    --button-hover-border: #000000;
}

/*------------- COULEURS DARK MODE -------------*/

.dark-mode {
    --border: #f1e9e9;
    --grid-line: rgba(255, 255, 255, 0.1);

    --bg-color: #000000;

    --text-color: #f1e9e9;
    --text-border-color: #000000;

    --button-bg: #000000;
    --button-text: #f1e9e9;
    --button-border: #f1e9e9;

    --button-hover-bg: #f1e9e9;
    --button-hover-text: #000000;
    --button-hover-border: #000000;
}


/*---------------------------------- GENERAL STRUCTURE STYLE ----------------------------------*/

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}


.page-container {
    display: grid;
    grid-template-areas:
    "header header"
    "game ranking"
    "footer footer";
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto auto;

    font-family: "Press Start 2P";
    background-color: var(--bg-color);
    color: var(--text-color);
    height: 100vh;
    place-items: center;
    justify-content: center;
    align-items: center;
    cursor: url("../img/cursor-pixel-normal.cur"), auto;
}

a:hover,
button:hover,
.btn:hover,
.btn-cat:hover {
    cursor: url("../img/cursor-pixel-pointer.cur"), pointer;
}


.background-grid {
    background-color: var(--bg-color);
    background-image:
      linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
      linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
    background-size: 40px 40px;
}


/*---------------------------------- BUTTON ----------------------------------*/

.button-theme {
    padding: 15px;;
    border-radius: 50%;
    background-color: var(--button-bg);
    color: var(--button-text);
    border: 1px dashed var(--button-border);
    font-weight: bold;
    transform: scale(1.05);
}

.button-theme:hover {
    background-color: var(--button-hover-bg);
    color: var(--button-hover-text);
    border: 1px dashed var(--button-hover-border);
}

.btn {
    background-color: var(--button-bg);
    color: var(--button-text);        
    border: 2px solid var(--button-border);
    font-family: 'Press Start 2P', monospace; 
    padding: 10px 20px;
}

.btn:hover {
    background-color: var(--button-hover-bg);
    border: 2px solid var(--button-hover-border);
    color: var(--button-hover-text);
    transform: scale(1.05);
}

/*---------------------------------- PAGE CONTAINER ----------------------------------*/

/*---------------------- HEADER ----------------------*/

header {
    grid-area: header;
    text-align: center;
    font-size: 20px;
    display: flex;
    flex-direction: column;   
    align-items: center;    
    gap: 30px; 
    padding-top: 30px;    
}

header p {
    color: #000000;
}

/*---------------------- GAME CONTAINER ----------------------*/

.game-container {
    grid-area: game;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.game-container img {
    width: 300px;
    height: auto;
}

.game-container .btn-cat {
    background: transparent;
    border: transparent;
}

/*---------------------- RANKING CONTAINER ----------------------*/

.ranking-container {
    grid-area: ranking;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 25px  50px;
    outline: 5px dashed var(--border);
    background-color: #f1e9e9;
    color: #000000;
}



.ranking-container UL {
    line-height: 30px;
}


/*---------------------- FOOTER ----------------------*/

footer {
    grid-area: footer;
    text-align: center;
    font-size: 14px;
    position: fixed;
    bottom: 0;
    padding: 10px 0;
}


/*---------------------------------- MEDIA QUERIES ----------------------------------*/

@media (max-width: 768px) {
    .page-container {
        grid-template-areas:
        "header"
        "game"
        "ranking"
        "footer";
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto auto;
    }

    header {
        padding-top: 0px;
    }

    header h1 {
        font-size: 20px;
    }

    header p,
    .game-container p,
    .ranking-container ul,
    .btn {
        font-size: 12px;
    }

    .ranking-container h2 {
        font-size: 16px;
    }

    .game-container img {
        width: 250px;
    }

    .ranking-container {
        padding: 20px;
    }

    footer p {
        position: relative;
        font-size: 8px;
    }   
}