body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    color: #353248;
    box-sizing: border-box;
}

#page-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: var(--vh);
}

header {
    display: flex;
    justify-content: center;
    background-color: #dcdcdc;
    padding: 1.25rem;
}

h1 {
    text-align: center;
    font-size: 2.75rem;
    margin: 0.5em 0;
}

h1 span {
    font-size: 3.1rem;
    color: #ff8c00;
}

#message span {
    color: #ff8c00;
    font-size: 2.3rem;
}

header img {
    align-self: center;
}

#super-container {
    display: flex;
    flex: 1;
    justify-content: space-evenly;
    border-top: 3px solid #808080;
    border-bottom: 3px solid #808080;
}

#displayQuestion {
    display: flex;
    width: 30%;
    min-width: 315px;
    justify-content: center;
    align-self: center;
    font-size: 2rem;
    letter-spacing: 2px;
    text-align: center;
}

#form {
    display: inline-block;
    margin: 15px 1em;
}

#displayAlert {
    width: 30%;
    min-width: 315px;
    align-self: center;
    font-size: 2rem;
    text-align: center;
    letter-spacing: 2px;
}

#displayAlert p {
    margin-left: 10px;
    margin-right: 10px;
}

#svg-icons {
    display: flex;
    justify-content: center;
    align-items: center;
}

#container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    width: 30%;
    min-width: max(30vw, 450px);
}

#progress-container {
    display: flex;
    margin-bottom: 2.5rem;
    width: 360px;
    height: 30px;
    background-color: #dcdcdc;
}

#progress-bar {
    width: 0;
    height: 30px;
    background-color: #ff8c00;
}

#num-pad {
    width: max(25vw, 450px);
    height: max(25vw, 450px);
    display: grid;
    grid-template-columns: calc(25% - 3px) calc(25% - 3px) calc(25% - 3px) calc(25% - 3px);
    grid-template-rows: calc(25% - 3px) calc(25% - 3px) calc(25% - 3px) calc(25% - 3px);
    gap: 4px;
    margin-top: 20px;
    box-sizing: border-box;
}

.box {
    display: flex;
    background-color: #dcdcdc;
    font-size: 2.25rem;
    justify-content: center;
    align-items: center;
    user-select: none;
}

.box:not(.empty) {
    cursor: pointer;
}

.bi {
    width: 28px;
}

.btn {
    background: #750EBE;
    color: white;
    margin: 15px;
    padding: 10px 15px;
    width: 150px;
    border: none;
    -webkit-appearance: none;
}

.btn:hover,
.modal-btn:hover {
    background-color: #ff8c00;
    color: #000000;
    cursor: pointer;
}

#inputResult {
    padding-top: 5px;
    padding-bottom: 5px;
    border-style: none;
    outline: none;
    background: #f4f4f4;
    font-size: 2rem;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #353248;
    width: 70px;
}

.orange {
    background-color: #F58700;
    background-color: #ff8c00;
}

.darkgrey {
    background-color: #A3A3A3;
}

.new-bt-entry {
    border: 2.5px solid #ff8c00;
}

.check {
    color: #ff8c00;
    width: 100px;
    height: 100px;
}

.cross {
    color: #750EBE;
    width: 100px;
    height: 100px;
}

footer {
    display: flex;
}

#pseudo-element {
    flex: 1;
}

#stopwatch {
    text-align: center;
    padding: 8px;
    font-size: 1.3rem;
}

#controls2 {
    display: flex;
    flex: 1;
}

#open-ranking {
    cursor: pointer;
    width: 35px;
    padding: 5px;
    margin-left: auto;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
    position: relative;
    background-color: #fefefe;
    width: 60%;
    margin: 5% auto;
    padding: 0;
    border: 1px solid #750EBE;
    box-shadow: 3px 5px 8px 0 rgba(0, 0, 0, 0.2);
    animation-name: animatetop;
    animation-duration: 0.3s;
}

.alert-modal-content {
    margin-top: 20%;
    width: 30%;
}

@keyframes animatetop {
    from {
        top: -300px;
        opacity: 0;
    }

    to {
        top: 0;
        opacity: 1;
    }
}

.close-modal {
    color: #fefefe;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close-modal:hover {
    color: #353248;
    cursor: pointer;
}

.modal-header,
.modal-footer {
    padding: 10px 15px;
    background-color: #750EBE;
    color: #fefefe;
    box-sizing: border-box;
}

.modal-body {
    padding: 5px 15px;
}

#best-times li {
    padding: 5px;
}

#best-times li:nth-child(even) {
    background-color: #f4f4f4;
}

.modal-btn {
    background-color: #353248;
    color: #fefefe;
    padding: 10px;
    border: none;
}

.align-middle {
    vertical-align: middle;
}

@media screen and (max-width: 1200px) {
    header {
        align-items: center;
        padding: .25rem;
    }

    header img {
        width: 55px;
    }

    header h1 {
        font-size: 2.25rem;
    }

    h1 span {
        font-size: 2.5rem;
    }

    #displayQuestion {
        min-width: 0;
        font-size: 1.6rem;
    }

    #inputResult {
        font-size: 1.6rem;
        width: 55px;
    }

    #displayAlert {
        min-width: 0;
        font-size: 1.5rem;
    }

    #message span {
        font-size: 1.6rem;
    }

    #container {
        min-width: max(30vw, 385px);
    }

    #num-pad {
        width: max(20vw, 325px);
        height: max(20vw, 325px);
        margin-top: 10px;
    }

    .box {
        font-size: 2rem;
    }

    .bi {
        width: 23px;
    }

    #controls {
        white-space: nowrap;
    }

    .btn {
        margin: 10px 10px 0;
    }

    .check, .cross {
        width: 65px;
        height: 65px;
    }

    #progress-container {
        margin-bottom: 1.5rem;
        width: 270px;
        height: 25px;
    }

    #progress-bar {
        height: 25px;
    }

    .alert-modal-content {
        width: 50%;
    }
}


@media screen and (max-width: 1080px) and (orientation: portrait) {
    #super-container {
        flex-direction: column;
    }

    #displayQuestion {
        width: 95%;
        margin: auto;
        min-height: 100px;
        align-items: center;
    }

    #displayAlert {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 95%;
        margin: auto;
        min-height: 103px;
    }

    #displayAlert p {
        margin-left: 0px;
        margin-right: 0px;
        line-height: 1.1;
    }

    .congrats-medium {
        width: 33%;
        flex-shrink: 0;
    }

    #message {
        width: 33%;
        flex-shrink: 0;
    }

    #svg-icons {
        width: 33%;
    }

    #container {
        width: 100%;
        min-width: 0;
    }

    /* #num-pad {
        width: 40vh;
        min-width: 365px;
        height: 40vh;
        min-height: 365px;
        margin-top: 0;
    } */

    .modal-content, .alert-modal-content {
        min-width: 80%;
    }
}


@media screen and (max-width: 600px) {
    header {
        padding: 0;
    }

    header img {
        display: none;
    }

    header h1 {
        margin: .2em .4em;
        font-size: 2rem;
    }

    header h1 span {
        font-size: 2.3rem;
    }

    #inputResult {
        width: 62px;
    }

    #form {
        margin: 10px 0;
    }

    #displayQuestion {
        min-height: 62px;
    }

    #displayAlert {
        min-height: 62px;
        justify-content: space-evenly;
    }

    #displayAlert p {
        display: none;
    }

    #num-pad {
        width: 30vh;
        min-width: 265px;
        height: 30vh;
        min-height: 235px;
    }

    .box {
        font-size: 2rem;
    }

    .bi {
        width: 20px;
    }

    .btn {
        width: 115px;
        padding: 9px 10px;
    }

    .check, .cross {
        width: 55px;
        height: 55px;
    }

    #progress-container {
        margin-bottom: .5rem;
        width: 225px;
        height: 20px;
    }

    #progress-bar {
        height: 20px;
    }
}