:root {
    /* Theme Colors */
    --body-background: #202124;
    --text-color: white;

    /* Game Colors */
    --target-color: orange;
    --color1: red;
    --color2: green;
    --color3: blue;
    --color4: yellow;

    /* Color Cube Sizes */
    --cube-width: 150px;
    --cube-width-mobile: 100px;
    --cube-height: 150px;
    --cube-height-mobile: 100px;
    --cube-width-hover: calc(var(--cube-width) + 5px);
    --cube-height-hover: calc(var(--cube-height) + 5px);
    --cube-border-radius: 20px;

    /* Selected Color Sizes */
    --selected-color-width: 35px;
    --selected-color-width-mobile: 25px;
    --selected-color-height: 35px;
    --selected-color-height-mobile: 25px;
    --selected-color-border-radius: 10px;

    --transition-time: 0.5s;
}

body {
    font-family: 'Courier New', monospace;
    background-color: var(--body-background);
}

/* Target the favicon SVG using its selector */
#favicon-svg {
    fill: red;
}


.game-title {
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    font-size: 45px;
    color: var(--text-color);
    fill: var(--text-color);
    padding: 20px;
    padding-bottom: 60px;
}
.game-title div {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.game-title svg {
    padding: 20px;
}
.game-title svg:hover {
    cursor: pointer;
}
.game-title > h1 {
    margin: 10px;
}


.game-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    justify-content: center;
    align-items: center;
    max-width: 750px;
    margin-left: auto;
    margin-right: auto;
}

#target-and-mixed-colors {
    display: flex;
    align-items: row;
    gap: 2rem;
}
.target-and-mixed-color {
    width: var(--cube-width);
    height: var(--cube-height);
    border-radius: var(--cube-border-radius);
    background-color: var(--target-color);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.middle-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    width: 600px;
    height: 80px;
    transition: height 3s;
    /* transition: all 3s; */
}

.correct-answer-text {
    color: var(--text-color);
    font-size: 25px;
}

#selected-colors {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 400px;
    flex-direction: row;
    gap: 2rem;
    /* transition: all 5s; */
}

.selected-color {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--selected-color-width);
    height: var(--selected-color-height);
    border-radius: var(--selected-color-border-radius);
    transition: background-color var(--transition-time);
    transition: padding var(--transition-time);

}

#remove-color {
    opacity: 0;
    transition: opacity var(--transition-time);
    height: 5em;
    width: 80px;
    fill: var(--text-color);
}
#remove-color:hover {
    cursor: pointer;
}

#mix-selected-colors {
    display: flex;
    flex-direction: row;
    gap: 1em;
    align-items: center;
    height: 5em;
    width: 80px;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-time);
    fill: var(--text-color);
}
#mix-selected-colors:hover {
    cursor: pointer;
}

#given-colors {
    display: flex;
    flex-direction: row;
    gap: 2rem;
}

.given-color {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: rgba(0, 0, 0, 0.4) 0px 2px 4px, rgba(0, 0, 0, 0.3) 0px 7px 13px -3px, rgba(0, 0, 0, 0.2) 0px -3px 0px inset;
    text-align: center;
    width: var(--cube-width);
    height: var(--cube-height);
    border-radius: var(--cube-border-radius);
    transition: box-shadow var(--transition-time);
}
.given-color:hover {
    cursor: pointer;
    /* width: var(--cube-width-hover);
    height: var(--cube-height-hover); */
}
.given-color:active {
    box-shadow: none;
}
.too-many {
    padding: 5px;
    background-color: var(--body-background);
    opacity: 0;
}

#given-color1 {
    background-color: var(--color1);
}
#given-color2 {
    background-color: var(--color2);
}
#given-color3 {
    background-color: var(--color3);
}
#given-color4 {
    background-color: var(--color4);
}

.too-many {
    color: var(--text-color);
}

#history-container {
}

.history-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    height: 70px;
    opacity: 0; 

}

.result-arrow {
    display: flex;
    align-items: center;
    justify-content: center;

}
.result-arrow svg {
    height: 50px;
    fill: var(--text-color);
}

.continue-btn {
    height: var(--cube-height);
    width: calc(var(--cube-width) + 20px);
    font-size: 25px;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    border-radius: 15px;
    background-color: var(--target-color);
    border: none;
}
.continue-btn:hover {
    cursor: pointer;
}
.continue-btn span {
    padding: 10px;
    border-radius: 15px;
    background-color: var(--body-background);
    color: var(--text-color);
}

.next-color-timer {
    background-color: var(--body-background);
    height: 35px;
    color: var(--text-color);
    padding: 10px;
    text-align: center;
    border-radius: 10px;
    opacity: 0;
}

/* The Modal (background) */
.modal {
    display: none;
    /* Hidden by default */
    position: fixed;
    /* Stay in place */
    z-index: 1;
    /* Sit on top */
    padding-top: 100px;
    /* Location of the box */
    left: 0;
    top: 0;
    width: 100%;
    /* Full width */
    height: 100%;
    /* Full height */
    overflow: auto;
    /* Enable scroll if needed */
    background-color: rgb(0, 0, 0);
    /* Fallback color */
    background-color: rgba(0, 0, 0, 0.4);
    /* Black w/ opacity */
}

/* Modal Content */
.modal-content {
    background-color: var(--body-background);
    color: var(--text-color);
    margin: auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    font-size: 25px;
    overflow: auto;
    max-height: 80vh;
}

.modal-close-container {
    text-align: right;
}

.modal-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* The Close Button */
.close {
    color: #aaaaaa;
    margin-left: auto;
    font-size: 28px;
    font-weight: bold;
}

.close:hover,
.close:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}

/* Toggle Switch Styles */
.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    -webkit-transition: .4s;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    -webkit-transition: .4s;
    transition: .4s;
}

input:checked+.slider {
    background-color: #2196F3;
}

input:focus+.slider {
    box-shadow: 0 0 1px #2196F3;
}

input:checked+.slider:before {
    -webkit-transform: translateX(26px);
    -ms-transform: translateX(26px);
    transform: translateX(26px);
}

/* Rounded sliders */
.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}


.game-over {
    width: 100%;
    text-align: center;
    color: var(--text-color);
    font-size: 50px;
}

.you-win {
    width: 100%;
    text-align: center;
    color: var(--text-color);
    font-size: 50px;
    opacity: 0;

}

.percent-span {
    background-color: var(--body-background);
    color: var(--text-color);
    padding: 3px;
    border-radius: 5px;
    opacity: 0;
}

#share-button {
    background-color: var(--body-background);
    color: var(--text-color);
    fill: var(--text-color);
    width: 50%;
    height: 50%;
    border-radius: var(--selected-color-border-radius);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    padding: 10px;
}
#share-button .share-text {
    font-weight: bold;
}
#share-button svg {
    height: 30px;
}
#share-button .copied-to-clipboard {
    font-size: 14px;
}

@media screen and (max-width: 870px) {
    .game-title h1 {
        width: min-content;
    }
    .game-title div {
        flex-direction: column;
        padding: 0px;
    }
}
@media screen and (max-width: 412px) {
    .game-title {
        font-size: 25px;
    }
    .game-title div {
        flex-direction: column;
        padding: 0px;
    }
    .game-container {
        width: 90%;
    }

    .target-and-mixed-color {
        width: var(--cube-width-mobile);
        height: var(--cube-height-mobile);
    }

    .given-color {
        width: var(--cube-width-mobile);
        height: var(--cube-height-mobile);
    }

    .middle-container {
        gap: 10px;
        width: 100%;
        height: 80px;
    }

    #selected-colors {
        gap: 10px;
        flex: 6;
    }

    .selected-color {
        width: var(--selected-color-width-mobile);
        height: var(--selected-color-height-mobile);
    }

    #mix-selected-colors {
        flex: 2;
        width: 100%;
    }

    #remove-color {
        height: 100%;
        flex: 2;
    }

    .game-over {
        font-size: 40px;
    }

    .result-arrow svg {
        height: 30px;
    }
    .history-item {
        gap: 10px;
    }
    #given-colors {
        gap: 10px;
    }

    .modal-content {
        font-size: 20px;
    }

    .continue-btn {
        height: var(--cube-height-mobile);
        width: calc(var(--cube-width-mobile) + 20px);
    }
    .continue-btn span {
        font-size: 20px;
        padding: 5px;
    }
    .correct-answer-text {
        color: var(--text-color);
        font-size: 20px;
    }
    .next-color-timer {
        padding: 2px;
        font-size: 14px;
    }

  }

  @media screen and (max-height: 1200px) and (min-width: 412px) {
    .game-title {
        font-size: 30px;
    }
    .game-container {
        width: 400px;
    }

    .target-and-mixed-color {
        width: var(--cube-width-mobile);
        height: var(--cube-height-mobile);
    }

    .given-color {
        width: var(--cube-width-mobile);
        height: var(--cube-height-mobile);
    }

    .middle-container {
        gap: 10px;
        width: 90%;
        height: 80px;
    }

    #selected-colors {
        gap: 10px;
    }

    .selected-color {
        width: var(--selected-color-width-mobile);
        height: var(--selected-color-height-mobile);
    }

    #mix-selected-colors {
        height: 50px;
    }

    #remove-color {
        height: 50px;
    }
    .result-arrow svg {
        height: 30px;
    }

    .continue-btn {
        height: var(--cube-height-mobile);
        width: calc(var(--cube-width-mobile) + 20px);
    }
    .continue-btn span {
        font-size: 20px;
        padding: 5px;
    }
    .next-color-timer {
        padding: 2px;
        font-size: 14px;
    }
  }
  
  

  
