#answers {
    text-align: center;
}

.answer_btn {
    transition: 0.20s ease-in-out;
    border: solid 2px #151922;
    cursor: pointer;
    color: white;
    background-color: #222831;
    text-align: center;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    hyphens: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
}

.answer_btn:hover {
    background-color: #36454F;
}

.refresh_before {
    width: 55vw;
    height: 1px;
    margin: 2.5vh;
    background-color: white;
    border: none;
}

.refresh_after {
    font-weight: 700;
    background-color: #222831;
    border: solid 2px #151922;
    color: white;
    border-radius: 20px;
}

.refresh_after:hover {
    background-color: #36454F;
    cursor: pointer;
}

#refresh {
    transition: all 0.25s ease-in-out;
}

#calc {
    position: absolute;
    text-align: center;
    font-weight: 700;
}

#correct { color: green; }
#incorrect { color: red; }
#percentage { color: blueviolet; }

#main_wrapper {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 88vh;
    height: 88dvh;
}

.side_panel {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background-color: #1a1a1a;
    transition: transform 0.3s ease;
    z-index: 10;
    display: flex;
    flex-direction: column;
}

.panel_toggle {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 11;
    background-color: #1a1a1a;
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 0 0 6px 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.panel_content {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 6px 5px;
    margin-top: 40px;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    flex: 1;
}

.panel_content::-webkit-scrollbar {
    display: none;
}

.panel_btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    background: #222831;
    border: 0.5px solid #393e46;
    border-radius: 10px;
    color: #eeeeee;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    box-sizing: border-box;
}

.panel_btn:hover {
    background: #2d333d;
    border-color: #555e6e;
}

.panel_btn:active {
    transform: scale(0.97);
}

#question_section {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 88vh;
    height: 88dvh;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    margin: 0 auto;
    justify-content: center;
}

#question_section::-webkit-scrollbar {
    display: none;
}

@media screen and (orientation: landscape) {
    .refresh_after {
        width: 15vw;
        height: 6vh;
        margin: 1vh;
        font-size: clamp(12px, 3vh, 28px);
    }

    #answers {
        display: flex;
        justify-content: center;
        width: 70vw;
    }

    #answers > section {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 10px;
        width: 100%;
    }

    .answer_btn {
        width: clamp(200px, 33vw, 35vw);
        min-height: 8vh;
        height: auto;
        margin: 0.5vw;
        padding: 1vh 1.5vw;
        font-size: clamp(18px, 2vh, 28px);
    }

    #question_section {
        width: 75vw;
        margin: 0 auto;
    }

    .question, .question_unit {
        font-size: clamp(20px, 4vh, 34px);
        height: auto;
        font-weight: 700;
        text-shadow: black 0px 5px 5px;
        text-align: center;
        padding: 2vh;
        z-index: 1;
    }

    .question_unit {
        padding: 0;
        color: #3577a6;
        font-size: clamp(11px, 2vh, 22px);
        font-weight: 1000;
    }

    img, video {
        margin-bottom: 1vh;
        max-height: min(13vw, 35vh);
        max-width: min(35vw, 90%);
        width: auto;
        height: auto;
        object-fit: contain;
    }

    #calc {
        left: 3vh;
        font-size: clamp(8px, 1.75vh, 18px);
    }

    .side_panel { width: 75px; }
    .side_panel.closed { transform: translateX(-100px); }
    .panel_toggle { width: 40px; height: 40px; font-size: 20px; }
    .panel_btn { padding: 8px 14px; font-size: 13px; }
}

@media screen and (orientation: portrait) {
    .refresh_after {
        width: 25vh;
        height: 8vw;
        font-size: clamp(12px, 2.5vw, 18px);
        margin: 2vw;
    }

    #answers {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        width: 100vw;
    }

    #answers > section {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 10px;
        width: 100%;
    }

    .answer_btn {
        width: clamp(200px, 80vw, 420px);
        min-height: 6vh;
        height: auto;
        margin: 0.5vh;
        padding: 1vh 2vw;
        font-size: clamp(12px, 3vw, 20px);
    }
    
    #left, #right {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

    #question_section {
        width: 100%;
    }

    .question, .question_unit {
        font-size: clamp(14px, 4vw, 28px);
        height: auto;
        font-weight: 700;
        text-shadow: black 0px 5px 5px;
        text-align: center;
        padding: 2vw;
        z-index: 1;
    }

    .question_unit {
        padding: 0;
        color: #3577a6;
        font-size: clamp(12px, 2vw, 20px);
        font-weight: 1000;
    }

    img, video {
        margin-bottom: 1vw;
        max-height: min(10vh, 20vw);
        max-width: min(50vw, 90%);
        width: auto;
        height: auto;
        object-fit: contain;
    }

    #calc {
        left: 3vw;
        font-size: clamp(10px, 1.75vw, 16px);
    }

    .side_panel { width: 75px; }
    .side_panel.closed { transform: translateX(-100px); }
    .panel_toggle { width: 34px; height: 34px; font-size: 16px; }
    .panel_btn { padding: 7px 12px; font-size: 12px; }
}