:root {
    --primary-color: #38761d;
    --secondary-color: #f6b26b;
    --background-color: #f7f7f7;
    --card-bg-color: #ffffff;
    --border-color: #cccccc;
    --success-color: #6aa84f;
    --error-color: #cc0000;
}

@font-face {
    font-family: 'Poppins Local';
    src: url('../fonts/Poppins-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: 'Poppins Local';
    src: url('../fonts/Poppins-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: 'Alpha';
    src: url('../fonts/Alphakind.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
}

body {
    font-family: 'Poppins Local';
    background-color: #fef6df;
    margin: 0;
    padding: 0;
    width: 100vw;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}
#quiz-app {
    width: 100%;
}

.main-row {
    width: 100%;
    display: flex;
    justify-content: center;
}

.main-row:nth-child(2) {
    padding: 20px 0;
}

#top {
    background-image: url(../images/top_desk.png);
    background-position: 100% 100%;
    background-size: cover;
    width: 100%;
    max-width: 1000px;
    padding: 20px 0;
    display: flex;
    justify-content: center;
    height: 12rem;
    z-index: 90;
    position: relative;
}

#btm {
    background-image: url(../images/btm_desk.png);
    background-position: 100% 100%;
    background-size: cover;
    width: 100%;
    max-width: 1000px;
    padding: 20px 0;
    display: flex;
    justify-content: center;
    height: 12rem;
    z-index: 70;
    position: relative;
    margin-top: 0;
}

#options-container {
    width: 100%;
}

#quiz-controls-container {
    display: flex;
    overflow: hidden;
    background-color: transparent;
    z-index: 70;
    position: relative;
}
#quiz-controls-container > .div1 {
    flex: 1.7;
    padding: 0px 30px 0px 60px;
    box-sizing: border-box;
    align-items: flex-start;
    justify-content: center;
    display: flex;
    flex-direction: column;
}
.quiz-controls {
    flex: 1.12;
    padding: 0px 30px 0px 60px;
    box-sizing: border-box;
    align-items: flex-start;
    justify-content: center;
    display: flex;
    flex-direction: row;
}
#quiz-controls-container > .div2 {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    background-color: #fef6df;
    color: #333;
    padding: 0 30px;
    box-sizing: border-box;
}

.central-content {
    width: 90%;
    max-width: 1000px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

#trophy {
    font-size: 2rem;
}
h3 {
    padding-top: 0;
    margin-top: 0;
}

.quiz-card-container {
    display: flex;
    overflow: hidden;
    background-color: transparent;
    /* min-height: 400px; */
    padding-top: 0rem;
    z-index: 80;
    position: relative;
}

.quiz-card-left {
    padding: 30px 30px 30px 60px;
    box-sizing: border-box;
    align-items: flex-start;
    justify-content: center;
    display: flex;
    flex-direction: column;
}
.quiz-card-right {
    padding: 30px;
    box-sizing: border-box;
    align-items: flex-start;
    justify-content: center;
    display: flex;
    flex-direction: column;
}

p {
    font-size: 1.2rem;
    color: #213816;
}

.quiz-card-left {
    flex: 1.7;
}

.quiz-card-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    background-color: #fef6df;
    color: #333;
}

.quiz-card-left {
    border-radius: 8px 0 0 8px;
}
.quiz-card-right {
    border-radius: 0 8px 8px 0;
}

h2 {
    color: #5bc1f1;
    font-family: 'Alpha';
}

.question-text {
    font-size: 1.2em;
    margin-bottom: 20px;
}

.option {
    background-color: #fcebb8;
    padding: 10px;
    margin-bottom: 8px;
    /* border: 1px solid var(--border-color); */
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
    font-size: 1em;
}

.option:hover {
    background-color: #fce59f;
}

.option.selected {
    background-color: var(--secondary-color);
    border-color: var(--primary-color);
}

.quiz-controls {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 20px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: opacity 0.2s;
    flex-grow: 1;
}

.btn-start,
.btn-next,
.btn-confirm {
    background-color: var(--primary-color);
    color: white;
}

.btn-prev {
    background-color: #6c757d;
    color: white;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.image-placeholder {
    width: 100%;
    height: 200px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    margin-top: 20px;
    font-style: italic;
}

.result-title {
    font-size: 1.8em;
    color: var(--primary-color);
}

.gabarito-item {
    padding: 8px 0;
    border-bottom: 1px dashed #eee;
}

.gabarito-item.correct {
    color: var(--success-color);
}
.gabarito-item.wrong {
    color: var(--error-color);
}
.gabarito-item:last-child {
    border-bottom: none;
}

.score-info h3 {
    margin-top: 0;
}
.score-info ul {
    list-style: none;
    padding-left: 0;
}
.score-info li {
    margin-bottom: 5px;
}

/* -- MODAL ----------------------------------------------------------------- */

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

.modal-content {
    background-color: var(--card-bg-color);
    margin: 15% auto;
    padding: 40px;
    border: 1px solid var(--border-color);
    width: 80%;
    max-width: 400px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.modal-content h3 {
    color: var(--primary-color);
    font-size: 1.5em;
}

.modal-btn-ok {
    background-color: var(--success-color);
    color: white;
    padding: 10px 30px;
    margin-top: 15px;
    border-radius: 5px;
    cursor: pointer;
    border: none;
}

/* -- MODAL ----------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */

@media (max-width: 1120px) {
    .central-content {
        width: 100%;
    }
}

@media (max-width: 1000px) {
    .central-content {
        border-radius: 0;
        box-shadow: none;
        border: none;
    }
}

@media (max-width: 940px) {
    #top {
        background-position: left top;
        background-size: 100%;
        background-repeat: no-repeat;
        height: 9rem;
    }
}

@media (max-width: 768px) {
    .quiz-card-left,
    .quiz-card-right {
        padding: 20px 15px;
    }

    .quiz-card-container {
        flex-direction: column;
    }

    .quiz-card-left,
    .quiz-card-right {
        flex: none;
        width: 100%;
        border-right: none;
    }

    .quiz-card-left {
        border-radius: 8px 8px 0 0;
    }
    .quiz-card-right {
        border-radius: 0 0 8px 8px;
    }
    .div2 {
        display: none;
    }
}

@media (max-width: 590px) {
    #top {
        background-image: url(../images/top_mobile.png);
        background-position: center bottom;
        background-size: 100%;
        background-repeat: no-repeat;
        height: 9rem;
    }
}

@media (max-width: 600px) {
    .quiz-controls {
        flex-direction: row;
    }
    #quiz-controls-container > .div2 {
        display: none;
    }
    .quiz-card-left:last-child {
        z-index: 1;
    }
}

@media (max-width: 490px) {
    .quiz-card-left,
    .quiz-card-right {
        padding: 20px 15px;
    }

    #quiz-controls-container > .div1 {
        padding: 0px 15px 0px 15px;
    }

    #quiz-controls-container > .div2 {
        padding: 0 15px;
    }

    p {
        font-size: 1.1rem;
    }
    .option {
        font-size: 0.9em;
    }

    #top,
    #btm {
        padding: 0;
    }

    #top,
    #btm {
        height: 9rem;
    }
}
