@font-face {
    font-family: helvetica;
    src: url("fonts/helvetica.ttf");
}

@font-face {
    font-family: helvetica-bold;
    src: url("fonts/helvetica-bold.ttf");
}

html {
    font-size: 1vw;
}

body {
    background-color: #fffcfa;
    position: absolute;
    margin: 0;
    padding: 0;
    width: 100vw;
    height: 100vh;
    font-family: helvetica;
    font-size: 2rem;
    color: #5d5d5d;
    transition: background-color 30s ease;
}


H3 {
    font-size: 1.25rem;
}

.button {
    background-color: #FFE66D;
    border: 2px solid #5d5d5d;
    display: inline-block;
    padding: 10px;
    text-align: center;
    text-decoration: none;
    font-size: 24px;
    font-weight: bolder;
    color: #5d5d5d;
    height: 80%;
    cursor: pointer;
    transition: background-color 0.3s ease;
    border-radius: 10%;
}

.button:hover {
    background-color: #83763a;
}

#splashContainer,
#gameOverContainer {
    /* background: url('../img/bg_splash.png'); */
    background-color: #fffcfa;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    height: 96vh;
    width: 96vw;
    display: block;
    box-sizing: border-box;
    border: 10px solid #5d5d5d;
    z-index: 20;
    display: block;
}

#splashText {
    background-color: #fffcfa;
    position: relative;
    top: 3rem;
    width: auto;
    margin: 10%;
    text-align: center;
    padding: 1rem;
}

#gameContainer {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 96vw;
    height: 96vh;
    display: none;
}


#modeSelect {
    height: 30%;
    width: 50%;
    margin: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}


#menu,
#legendOfMarbles {
    background-color: #6CA6C1;
    position: absolute;
    bottom: 0%;
    left: 50%;
    transform: translate(-50%, 5%);
    height: 90%;
    width: 80%;
    display: none;
    z-index: 100;
}


#window-dropInterval,
#button_openLegend,
#button_closeLegend,
#button_start,
#button_continue,
#button_mute,
#button_quit {
    position: absolute;
    left: 50%;
    transform: translate(-50%, -50%);
    height: 10%;
    width: 80%;
    box-sizing: border-box;
    margin: auto;
}

#window-dropInterval {
    top: 10%;
    font-size: 1.75rem;
    cursor: default;
}

#input-dropInterval {
    position: absolute;
    bottom: 0%;
    left: 50%;
    transform: translate(-50%, 0%);
    font-size: 1.5rem;
    background: #EDAE01;
}

#button_openLegend {
    top: 30%;
}

#button_start {
    top: 45%;
}

#button_continue {
    top: 60%;
}


#button_mute {
    top: 75%;
}

#button_quit,
#button_closeLegend {
    top: 90%;
}




/** HEADER **/

#header {
    background-color: #fffcfa;
    position: absolute;
    width: 100%;
    height: 5rem;
    z-index: 50;
    box-sizing: border-box;
    border: 2px solid #5d5d5d
}

#window_pause {
    background-color: #fffcfa;
    position: absolute;
    top: 2px;
    left: 2px;
    height: 46px;
    width: 46px;
    z-index: 5;
}

#button_pause {
    position: absolute;
    top: 0%;
    left: 0%;
    height: 46px;
    width: 46px;
    display: block;
}

#button_play {
    position: absolute;
    top: 4px;
    left: 4px;
    height: 38px;
    width: 38px;
    display: none;
}

#window_lifetimeScore {
    background-color: #fffcfa;
    position: absolute;
    top: 0px;
    left: 0px;
    height: 50%;
    width: 100%;
    /* border: 2px solid magenta; */
}

#label_lifetimeScore {
    background-color: #fffcfa;
    position: absolute;
    top: 0px;
    left: 70px;
    font-size: 1.5rem;
}

#value_lifetimeScore {
    position: absolute;
    bottom: 0px;
    left: 50%;
    font-family: helvetica-bold;
    font-size: 1.5rem;
}

#window_currentScore {
    background-color: #fffcfa;
    position: absolute;
    bottom: 0px;
    left: 0px;
    height: 50%;
    width: 100%;
    /* border: 2px solid red; */
}

#label_currentScore {
    background-color: #fffcfa;
    position: absolute;
    top: 0px;
    left: 70px;
    font-size: 1.5rem;
}

#value_currentScore {
    position: absolute;
    bottom: 0px;
    left: 50%;
    font-family: helvetica-bold;
    font-size: 1.5rem;
}

#window_menu {
    background-color: #fffcfa;
    position: absolute;
    top: 2px;
    right: 2px;
    height: 46px;
    width: 46px;
}

#button_openMenu {
    position: absolute;
    top: 2px;
    right: 2px;
    height: 42px;
    width: 42px;
}


/** MAIN **/

#canvas_div {
    position: absolute;
    top: 5rem;
    width: 100%;
    height: 100%;
    z-index: 1;
    box-sizing: border-box;
    /* border: 2px solid magenta; */
}

#canvas {
    position: absolute;
    right: 50%;
    top: 50%;
    transform: translate(50%, -50%);
    height: 100%;
    width: 100%;
    box-sizing: border-box;
    border: 2px solid #5d5d5d;
}



/** GAME OVER **/
#gameOverContainer {
    display: none;
}

#gameOverButtons {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 30vh;
}

#rateGame,
#tipDevs,
#startGame {
    height: 15%;
    width: 20%;
    margin: 8px;
}

#gameOverWinText,
#gameOverLoseText,
#legendOfMarbles {
    display: none;
    text-align: center;
    margin-top: 25%;
}
/* 
#gameOverWinText,
#gameOverLoseText {

display: flex; 
justify-content: center;
align-items: center;
height: 100%;
} */

.legend {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    max-width: 300px;
    margin: 20px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.legend-item img {
    max-width: 50px;
    max-height: 50px;
    margin-right: 20px;
}

.legend-item:last-child {
    margin-bottom: 0;
}


/** Responsive Text **/


/* FLUID TEXT SIZES BASED ON SCREEN WIDTH */


/* https://blog.hubspot.com/website/responsive-text */

@media (min-width: 0px) {
    p {
        font-size: 1rem;
    }
}

@media (min-width: 400px) {
    p {
        font-size: calc(1rem + 1vw);
    }
}

@media (min-width: 1001px) {
    p {
        font-size: 1.75rem;
    }
}


/* https://css-tricks.com/simplified-fluid-typography/ */


/* html {
    font-size: 16px;
  }
  @media screen and (min-width: 320px) {
    html {
      font-size: calc(16px + 6 * ((100vw - 320px) / 680));
    }
  }
  @media screen and (min-width: 1000px) {
    html {
      font-size: 22px;
    }
  }  */