/*------------------------------------ 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;

    --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;

    --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"
    "canvas"
    "info"
    "footer";
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto auto;

    font-family: "Press Start 2P";
    background-color: var(--bg-color);
    color: var(--text-color);
    height: 100vh;
    place-items: center;

}


.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;
}

.button-theme:hover {
    background-color: var(--button-hover-bg);
    color: var(--button-hover-text);
    border: 1px dashed var(--button-hover-border);
}





#startButton {
    position: absolute;
    bottom: 20px;          
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Press Start 2P', cursive;
    font-size: 15px;
    padding: 10px 20px;
    background: var(--button-bg);
    color: var(--button-text);
    border: 1px solid var(--button-border);
    cursor: pointer;
    z-index: 1; 
}

#startButton:hover {
    background: var(--button-hover-bg);
    color: var(--button-hover-text);
    border: 1px solid var(--button-hover-border);
}


/*---------------------------------- PAGE CONTAINER ----------------------------------*/


header {
    grid-area: header;
    text-align: center;
    font-size: 20px;
    display: flex;
    flex-direction: column;   
    align-items: center;    
    gap: 30px; 
    padding-top: 30px;    
}

  
canvas {
    grid-area: canvas;
    background: url('../img/canva-background.gif');
    background-size: cover;
    width: 800px;
    height: 500px;
    border: 2px solid var(--border);
}


section.canvas {
    position: relative;
}


  
.info {
    grid-area: info;
    text-align: center;
}


#timer, #score {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    border: 1px solid var(--border);
    background-color: var(--bg-color);
    width: 200px;
    height: 40px; 
}



footer {
    grid-area: footer;
    text-align: center;
    font-size: 10px;
}



/*---------------------------------- RESPONSIVE ----------------------------------*/

@media (max-width: 780px) {
    canvas {
        width: 100%;
        height: auto;
    }
}

