:root {
    --background-color: #ffffff;
    --text-color: #333;
    --light-grey: #f0f0f5;
    --dark-grey: #444;
    --blue: #007bff;
    --light-blue: #276c1c;
    --darker-blue: #2580e4;
    --red: #ff0000;
    --light-red: #ffcccc;
    --darker-red: #cd3b3b;
    --green: #20ae20;
    --darker-green: #18dc18;
    --grey-border: #ccc;
    --spinner-border: rgba(255, 255, 255, 0.3);
}

body {
    font-family: 'Roboto', sans-serif;
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    background-color: var(--light-grey);
    color: var(--text-color);
}

h1 {
    color: var(--dark-grey);
    text-align: center;
    font-size: 2em;
    margin-bottom: 20px;
}

.input-container, .subject-links, .chapter-links, .topic-links, .container {
    background-color: var(--background-color);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.input-container {
    display: flex;
    align-items: center;
}

.input-container input {
    flex: 1;
    padding: 10px;
    border: 1px solid var(--grey-border);
    border-radius: 5px;
    font-size: 16px;
    background-color: #f9f9f9;
    color: var(--text-color);
}

.button, .subject-links button, .chapter-links button, .question-link {
    background-color: #5f99da;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    padding: 10px 20px;
    font-size: 16px;
    margin-left: 10px;
    transition: background-color 0.3s;
}

.button:hover, .subject-links button:hover, .chapter-links button:hover, .question-link:hover {
    background-color: var(--darker-blue);
}

.clear-button {
    background-color: var(--light-red);
    color: var(--red);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    padding: 10px;
    font-size: 16px;
    margin-left: 10px;
    transition: background-color 0.3s;
}

.clear-button:hover {
    background-color: #ff9999;
}

.link-icon {
    width: 24px;
    height: 24px;
    vertical-align: middle;
    margin-right: 10px;
}

.subject-links strong, .chapter-links strong {
    display: block;
    margin-bottom: 10px;
    font-size: 18px;
    color: var(--text-color);
}

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

.modal-content {
    background-color: var(--background-color);
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

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

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.subject-links, .chapter-links, .topic-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-align: center;
}

.theory-container, .exercise-container, .list-exercise-container {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.link-button {
    margin: 5px 0;
}

.theory-container .link-button {
    background-color: #913333;
}

.theory-container .link-button:hover {
    background-color: var(--darker-red);
}

.exercise-container .link-button {
    background-color: var(--green);
}

.exercise-container .link-button:hover {
    background-color: var(--darker-green);
}

.list-exercise-container .link-button {
    background-color: #4d4dff;
}

.list-exercise-container .link-button:hover {
    background-color: #1a1aff;
}

.theory-container .link-button {
    width: 100%;
}

.exercise-container, .list-exercise-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
}

.block-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 15px;
    color: var(--blue);
}

.step-title {
    font-size: 18px;
    font-weight: bold;
    margin-top: 20px;
    margin-bottom: 10px;
    color: var(--text-color);
}

.container p {
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 10px;
}

.container iframe {
    width: 100%;
    height: 315px;
    border: none;
    border-radius: 5px;
    margin-top: 20px;
}

.spinner {
    border: 4px solid var(--spinner-border);
    border-top: 4px solid var(--blue);
    border-radius: 50%;
    width: 16px;
    height: 16px;
    animation: spin 1s linear infinite;
    display: inline-block;
    margin-left: 10px;
    vertical-align: middle;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.clicked-button {
    background-color: #cccccc !important;
    color: #666666 !important;
}

.question-container {
    border: 1px solid var(--grey-border);
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 5px;
    background-color: #f9f9f9;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
}

.question-container:hover {
    /*transform: scale(1.02);*/
}

.question-label {
    font-size: 1.2em;
    margin-bottom: 10px;
    color: var(--text-color);
}

.question-statement {
    font-size: 1em;
    margin-bottom: 10px;
    color: #555;
}

.question-link {
    background-color: #5f99da; /* Cor de fundo do botão "Obter Resposta" */
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    padding: 10px 20px;
    font-size: 16px;
    margin-left: 10px;
    transition: background-color 0.3s;
}

.question-link:hover {
    background-color: var(--darker-blue); /* Cor de fundo do botão "Obter Resposta" ao passar o mouse */
}
.button-obter-resposta {
    position: relative; /* Necessary for the spinner */
    width: 150px; /* Fixed width */
    height: 40px; /* Fixed height */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0; /* Remove padding to center text */
}

.button-obter-resposta .spinner {
    position: absolute; /* Position the spinner inside the button */
    top: 25%; /* Center vertically */
    left: 38%; /* Center horizontally */
    transform: translate(-50%, -50%); /* Center the spinner */
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #ffffff;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    animation: spin 1s linear infinite;
    display: none; /* Initially hidden */
}

.question-link {
    position: relative; /* Necessary for the spinner */
    /* Other existing styles */
}

/* Spinner for the solution buttons */
.question-link .spinner-solucao {
    position: absolute;
    top: 20%;
    left: 40%;
    transform: translate(-50%, -50%);
    border: 4px solid var(--spinner-border);
    border-top: 4px solid var(--blue);
    border-radius: 50%;
    width: 16px;
    height: 16px;
    animation: spin 1s linear infinite;
    display: none;
}

.no-scroll {
    overflow: hidden;
}

.modal-content {
    position: relative; /* Ensure the close button is positioned relative to this container */
    background-color: var(--background-color);
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.close {
    color: white;
    background-color: #970101;
    border-radius: 50%;
    position: absolute;
    top: 10px; /* Adjust as necessary */
    right: 10px; /* Adjust as necessary */
    font-size: 28px;
    font-weight: bold;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.close:hover,
.close:focus {
    background-color: #ca0505;
    color: white;
    text-decoration: none;
    cursor: pointer;
}

.text-with-image {
    display: flex;
    align-items: flex-start;
}

.text-with-image img {
    max-width: 150px; /* Ajuste o tamanho conforme necessário */
    margin-left: 20px;
}