:root {
    --main-bg-color: rgb(16 16 16);
    --main-text-color: #F4EEE0;
    --main-button-color:#6ae8ff;
    --header-border:2px solid #2b2b2b;
    --answer-grid-color: #F4EEE0;
    --theme-url:url(../images/sun.svg);
    --rules-img-url:url('../images/question-mark.svg');
    --game-list-separator-color: #2b2b2b;
    --link-text-color:#00d8ff;
    --history-icon-url:url(../images/history_light.svg);
    --loading-url:url(../images/loading_light.svg);
}

[data-theme="light"] {
    --main-bg-color: #f9f9f9;
    --main-text-color: #252525;
    --main-button-color:#00d8ff;
    --header-border: 2px solid var(--main-text-color);
    --theme-url:url(../images/moon.svg);
    --rules-img-url:url('../images/question-mark_dark.svg');
    --game-list-separator-color: #c4c4c4;
    --link-text-color: #007dff;
    --history-icon-url:url(../images/history_dark.svg);
    --loading-url:url(../images/loading.svg);
}

* {
    margin: 0;
    box-sizing: border-box;
}

a {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color:var(--link-text-color);
}

/* Track */
::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 10px;
}

/* Handle */
::-webkit-scrollbar-thumb {
    background: #F4EEE0;
    border-radius: 10px;
}

/* Handle on hover */
::-webkit-scrollbar-thumb:hover {
    background: #F4EEE0;
}

/* width */
::-webkit-scrollbar {
    width: 0.2em;
    height: 0.4em;
}

#container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 45em;
    height: 100%;
}

body {
    height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--main-bg-color);
    font-size: 16px;
    color : var(--main-text-color);
    font-family: 'Prompt', sans-serif;
}

h1 {
    font-size: 1.75em;
    text-align: center;
    padding: 0.5em 1em 0.35em 1em;
}

header {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-evenly;
    width: 60%;
    border-bottom: var(--header-border);
}

main {
    display: flex;
    flex-direction: column;
    width: 95%;
}

p {
    margin: 0.7em 0 0.7em 0;
}

hr {
    border: none;
    height: 2px;
    background-color:var(--main-text-color);
}

li {
    padding: 0.5em 0 0.5em 0;
}

.bold {
    font-weight: bold;
}

.countryName {
    letter-spacing: 1px;
    text-transform: uppercase;
}

#backButtonContainer {
    margin-top: 1em;
    margin-bottom: 1em;
    display: flex;
    justify-content: center;
}

#backButton {
    border-radius: 0.5em;
    padding: 0.5em 1.5em 0.5em 1.5em;
    background-color: var(--main-button-color);
    color: #171313;
    cursor: pointer;
    transition: 0.2s;
    font-size: 1.1em;
}

#backButton:hover {
    scale: 1.1;
    cursor: pointer;
}

#playButtonContainer {
    margin-top: 1em;
    margin-bottom: 1em;
    display: flex;
    justify-content: center;
}

#playButton {
    border-radius: 0.5em;
    font-weight: bold;
    padding: 0.5em 1.5em 0.5em 1.5em;
    background-color: var(--main-button-color);
    color: #171313;
    cursor: pointer;
    transition: 0.2s;
    font-size: 1.5em;
}

#playButton:hover {
    scale: 1.1;
    cursor: pointer;
}

#toggleRules {
    cursor: pointer;
    color: var(--main-button-color);
}

#rulesContent {
    margin-top: 1em;
    display: none;
    flex-direction: column;
}

.smallContainer {
    margin-bottom: 0.5em;
}


.answerRow {
    color: var(--answer-grid-color);
    display: flex;
    justify-content: space-around;
}

.answerSquare {
    width: 11.5%;
    border-radius: 0.35em;
    z-index: 1;
    animation-fill-mode: forwards;
}

.answerContent::before {
    content:"";
    padding-top:95%;
}

.answerContent {
    position: relative;
    display:flex;
    height:100%;
    width:100%;
    justify-content:center;
    align-items:center;
    text-align: center;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 1);
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
}

.badAnswer {
    background-color: #d63f3f;
    border: 0.2em solid #ff0000;
}

.answerPercent25_50 {
    background-color: #e78312;
    border: 0.2em solid #ff6323;
}

.answerPercent50_75 {
    background-color: #f0d000;
    border: 0.2em solid #ffff00;
}

.goodAnswer {
    background-color: #3bc03b;
    border: 0.2em solid #00ff0f;
}

.backgroundFlag {
    position: absolute;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: brightness(52%);
    height: 100%;
    width: 100%;
    z-index: -1;
    border-radius: 0.2em;
    box-shadow: 0 10px 25px -7px #0000008c;
}

.answer0 {
    border: 0.2em solid #F4EEE0;
}

.backgroundArrow {
    position: absolute;
    background-size: 75%;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 35%;
    height: 100%;
    width: 100%;
    top: 0;
    left: 0;
    z-index: -1;
}

#themeButton {
    background-image: var(--theme-url);
    background-repeat: no-repeat;
    background-size: contain;
    width: 2em;
    aspect-ratio: 1;
}

#themeButton:hover {
    cursor: pointer;
}

#rulesButton {
    background-image: var(--rules-img-url);
    background-repeat: no-repeat;
    background-size: contain;
    width: 2em;
    aspect-ratio: 1;
}

#rulesButton:hover {
    cursor: pointer;
}

#historyButton {
    background-image: var(--history-icon-url);
    background-repeat: no-repeat;
    background-size: contain;
    width: 2em;
    aspect-ratio: 1;
}

#historyButton:hover {
    cursor: pointer;
}

.hidden {
    visibility: hidden;
}

.visible {
    visibility: visible;
}

#themeButton {
    background-image: var(--theme-url);
    background-repeat: no-repeat;
    background-size: contain;
    width: 2em;
    aspect-ratio: 1;
}

#themeButton:hover {
    cursor: pointer;
}


#gameListContainer {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.gameListElement {
    width: 100%;
    padding: 1em 0 1em 0;
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid var(--game-list-separator-color);
}

#gameListContainer > :last-child {
    border-bottom: none;
}

#loading {
    display: none;
    width: 3em;
    aspect-ratio: 1;
    background-image: var(--loading-url);
    background-position: center;
    background-size: cover;
}

.statusToDo {
    padding: 0.25em 0.5em 0.25em 0.5em;
    border-radius: 0.5em;
    background-color: #ff4040;
    color: black;
}

.statusWon {
    padding: 0.25em 0.5em 0.25em 0.5em;
    border-radius: 0.5em;
    background-color: #14ff78;
    color: black;
}

.statusWIP {
    padding: 0.25em 0.5em 0.25em 0.5em;
    border-radius: 0.5em;
    background-color: #ffff67;
    color: black;
}

@media screen and (min-width: 601px) and (max-width: 768px) {
    #container {
        width:95%;
    }
    header {
        font-size: 16px;
        width: 70%;
    }
    h1 {
        font-size: 1.6em;
        padding: 0.5em 0 0.35em 0;
    }
    .answerRow{
        font-size: 12px;
    }
}


@media screen and (min-width: 481px) and (max-width: 600px) {
    #container {
        width:95%;
    }
    header {
        font-size: 16px;
        width: 100%;
    }
    .answerRow{
        font-size: 10px;
    }
    h1 {
        font-size: 1.4em;
        padding: 0.5em 0 0.35em 0;
    }
}

@media screen and (min-width: 334px) and (max-width: 480px) {
    #container {
        width:95%;
    }
    header {
        font-size: 16px;
        width: 100%;
    }
    h1 {
        font-size: 1.35em;
        padding: 0.5em 0 0.35em 0;
    }
    .answerRow{
        font-size: 8px;
    }
}

@media screen and (max-width: 333px) {
    #container {
        width: 95%;
    }

    header {
        font-size: 16px;
        width: 100%;
    }

    h1 {
        font-size: 1.05em;
        padding: 0.5em 0 0.35em 0;
    }
    .answerRow{
        font-size: 8px;
    }
}
