:root {
    --bg-color: #f4f4f4;
    --text-color: #333;
    --btn-color: #4CAF50;
    --btn-hover: #45a049;
    --error: #f44336;
    --success: #4CAF50;
    --modal-bg: rgba(0,0,0,0.5);
}

body.dark {
    --bg-color: #333;
    --text-color: #f4f4f4;
    --btn-color: #45a049;
    --btn-hover: #4CAF50;
}

body {
    font-family: Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 20px;
    font-size: 16px;
    transition: background-color 0.3s, color 0.3s;
}

.container {
    max-width: 800px;
    margin: auto;
    padding: 20px;
    border: 1px solid #ccc;
    border-radius: 8px;
}

h1, h2, h3 {
    text-align: center;
}

form {
    display: flex;
    flex-direction: column;
}

label {
    margin-top: 10px;
}

input, textarea, button {
    padding: 10px;
    margin-top: 5px;
    font-size: 16px;
}

button {
    background-color: var(--btn-color);
    color: white;
    border: none;
    cursor: pointer;
    margin-top: 10px;
    transition: background-color 0.3s;
}

button:hover {
    background-color: var(--btn-hover);
}

#options {
    display: flex;
    flex-direction: column;
}

.option-btn {
    background-color: #ddd;
    color: #333;
    padding: 15px;
    margin: 10px 0;
    border-radius: 5px;
    text-align: left;
    font-size: 18px;
    touch-action: manipulation; /* Para touch-friendly */
}

.option-btn.selected {
    background-color: #bbb;
}

.correct {
    background-color: var(--success) !important;
}

.incorrect {
    background-color: var(--error) !important;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--modal-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s;
}

.modal-content {
    background: var(--bg-color);
    padding: 20px;
    border-radius: 8px;
    max-width: 80%;
    text-align: center;
}

.close {
    float: right;
    cursor: pointer;
}

#progress-bar {
    height: 10px;
    background: #ddd;
    margin-bottom: 20px;
}

#timer {
    text-align: center;
    font-weight: bold;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    border: 1px solid #ccc;
    padding: 10px;
}

#dark-mode-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 10px;
    background: var(--btn-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
}

@keyframes fadeIn {
    from {opacity: 0;}
    to {opacity: 1;}
}

/* Responsividade */
@media (max-width: 600px) {
    .option-btn {
        width: 100%;
    }

    form {
        padding: 0;
    }

    .container {
        padding: 10px;
    }
}

@media (min-width: 601px) {
    #options {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
}