:root {
    --pink: #A4036F;
    --blue: #048BA8;
    --green: #16DB93;
    --yellow: #EFEA5A;
    --orange: #F29E4C;
    --grey: #000814;
    --white: #f6f7eb;
  }

body {
    background-color: var(--grey);
    font-family: Arial, Helvetica, sans-serif;
    font-weight: bolder;
    position: relative;
    margin: 0;
    box-sizing: border-box;
}

button {
    cursor: pointer;
}

.hide {
    display: none;
}

/******************************/
/* Header                     */
/******************************/
header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    color: var(--blue);
    max-width: 500px;
    margin: 0 auto;
    gap: 0 10px;
    border-bottom: 1px solid #fff;
    padding: 10px 0;
}

.howToPlay_icon {
    height: 32px;
    width: 50px;
    color: var(--white);
    margin: 0;
    font-size: 32px;
    text-align: center;
}

#navTitle {
    display: block;
    height: auto;
    max-width: 245px;
    min-width: 200px;
    width: 100%;
}

.header-logo {
    width: 100%;
    height: auto;
    display: block; /* removes bottom whitespace */
    max-height: 50px;
}

figure {
    margin: 0;
}

#stats {
    fill: var(--blue);
    height: 50px;
    width: 50px;
}

#stats path{
    fill: var(--blue);
}

/******************************/
/* Main page                  */
/******************************/
main {
    padding: 0 10px;
}

#mainMenu {
    margin: auto;
}

.menuContainer {
    display: flex;
    flex-direction: column;
    max-width: 600px;
    width: 90vw;
    height: 85vh;
    margin: auto;
    justify-content: center;
}

.menu_button {
    height: 50px;
    width: 100%;
    margin-bottom: 20px;
    font-weight: bolder;
    text-decoration: none;
}

#howToPlay:hover {
    background-color: var(--blue);
    color: var(--white);
}

.howToPlay_icon:hover,
#stats {
    cursor: pointer;
}

#newGame:hover {
    background-color: var(--green);
    color: var(--grey);
}

/****************************************/
/* How to play, stats and privacy modal */
/****************************************/
.howToPlay__modal,
.stats__modal,
.privacy__modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 900px;
    height: max-content;
    z-index: 10;
    max-width: 80vw;
    max-height: 80vh;
    background-color: var(--grey);
    border: 5px solid var(--white);
    border-radius: 5px;
    padding: 20px;
}

.howToPlay__close,
.stats__close,
.privacy__close {
    position: sticky;
    top: 0;
    left: 100%;
    margin: 0;
    font-size: 24px;
}

.howToPlay__title,
.stats__title,
.privacy__title {
    color: var(--white);
}

.howToPlay__subtitle,
.stats__subtitle,
.privacy__subtitle {
    color: var(--white);
    text-decoration: underline;
}

.howToPlay__copy,
.stats__copy,
.privacy__copy {
    color: var(--white);
    font-weight: 400;
    margin: 0;
}

.howToPlay__colours-list {
    padding: 0;
    list-style-type: none;
    color: var(--white);
}

.howToPlay__colours {
    display: flex;
    padding: 5px 0;
    gap: 10px;
}

.howToPlay__image-container,
.stats__image-container {
    padding: 10px;
    text-align: center;

}

.howToPlay__image,
.stats__image {
    width: 100%;
    height: 100%;
    max-width: 400px;
}

.image-letter {
    width: 80px;
    height: 80px;
}

.stats__score-container {
    display: flex;
    justify-content: space-between;
}

.stats_delete-container {
    margin: 50px 0 10px;
    width: 100%;
    display: flex;
    justify-content: space-between;
}

.stats_btn_close,
.stats_btn_delete {
    padding: 10px;
}

.button.stats_btn_delete {
    background-color: var(--pink);
}

/******************************/
/* Game board                 */
/******************************/
#letterSection { 
    margin: 20px 0 0;
    text-align: center;

    
    @media (min-width:600px) {
        margin: 50px 0 0;
    }
}

.letter_container {
    display: grid;
    grid-template-rows: repeat(5, calc((100% - 20px) / 5));
    grid-template-columns: 1fr;
    margin: auto;
    gap: 5px;
    height: clamp(300px,100%,500px);
    width: clamp(300px,100%,500px);
    aspect-ratio: 1/1
}

.rows {
    display: grid;
    grid-template-columns: repeat(5, calc((100% - 20px) / 5));
    gap: 5px;
}

.letter_box {
    border: 2px solid var(--white);
    color: var(--white);
    border-radius: 5px;
    cursor: pointer;
    font-size: 3em;
    display: flex;
    justify-content: center;
    align-items: center;
}

.correct {
    background-color: var(--green);
}

.correctBorder {
    border-color: var(--green);
}

.correctRow {
    background-color: var(--orange);
}

.correctRowBorder {
    border-color: var(--orange);
}

.correctCol {
    background-color: var(--pink);
}

.correctColBorder {
    border-color: var(--pink);
}

.selected {
    background-color: var(--blue);
    color: var(--white);
}

.button {
    border: 2px solid var(--white);
    border-radius: 5px;
    background-color: var(--grey);
    color: var(--white);
}

/******************************/
/* Score Area                 */
/******************************/
#scoreArea {
    margin: 10px 0 50px;
    padding: 0;
}

.check { 
    max-width: 196px;
    height: 70px;
    width: 100%;
    aspect-ratio: 2/1;
}

.check:hover {
    background-color: var(--blue);
    color: var(--white);
}

.counter_container {
    padding: 0 5px;
    display: flex;
    gap: 15px;
    
}

.counter__title,
.counter__count {
    color: var(--white);
}

#checkBox {
    display: flex;
    flex-direction: row;
    margin: 0 auto;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    max-width: 500px;
    min-width: 300px;
}

#checkImg { 
    height: 100px;
    width: 100px;
}

#infoArea {
    margin: 0 auto;
    max-width: 600px;
    width: 100%;
    color: var(--white);
}

.sub-section {
    
}

.sub-section__heading {
    font-size: 20px;
    text-decoration: underline;
}

.sub-section__copy {
    font-size: 16px;
    font-weight: 400;
}

.sub-section__list {

}

.sub-section__list-item {
    font-size: 16px;
    font-weight: 400;
}

/******************************/
/* Footer                     */
/******************************/
.footer__link-container {
    display: flex;
    justify-content: space-between;
    max-width: 500px;
    margin: 30px auto;
    padding: 0 10px;
}

.footer_link {
    cursor: pointer;
    color: var(--white);
    text-decoration: underline;
}

@media (orientation: landscape) and (max-width:1200px) {
    body {
        display: grid;
        grid-template-columns: auto 1fr;
        grid-template-rows: auto 1fr auto;
        height: 100%;
        max-width: 1000px;
        margin: 0 auto;
    }

    header {
        grid-area: 1 / 1 / 2 / 2;
        height: 60px;
    }  
     
    main {
        grid-area: 1 / 2 / 4 / 3;
        height: calc(100vh - 40px);
        max-height: 500px;
        aspect-ratio: 1 / 1;
        margin: 0 auto;
        padding: 20px;
    }
    .letter_container {
        height: unset;
        width: unset;
    }
    #letterSection { 
        margin: 0;
        text-align: center;
    }

    #scoreArea {
        grid-area: 2 / 1 / 3 / 2;
        margin: 10px 10px;
        align-self: center;
    }
    #checkBox {
        flex-direction: column;
    }
    footer {
        grid-area: 3 / 1 / 4 / 2;
        margin: 10px;
    }


}