#enunciado {
    max-height: 40%;
    font-size: 22px;
    overflow-y: auto;
    padding: 50px 30px 30px 30px;
    line-height: 1.6;
    font-weight: 400;
    color: var(--neutral-900);
    margin-bottom: 20px;
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    text-align: justify;
    word-spacing: 0.1em;
    letter-spacing: 0.02em;
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

#enunciado p {
    font-size: inherit;
    margin: 0.5em 0;
    line-height: 1.5;
}

/* Estilos para formatação de texto no enunciado */
#enunciado strong, #enunciado b {
    font-weight: 700;
    color: var(--neutral-900);
}

#enunciado em, #enunciado i {
    font-style: italic;
    color: var(--neutral-800);
}

#enunciado u {
    text-decoration: underline;
    text-decoration-color: var(--primary);
    text-decoration-thickness: 2px;
}

#enunciado sub {
    font-size: 0.75em;
    vertical-align: sub;
    line-height: 0;
}

#enunciado sup {
    font-size: 0.75em;
    vertical-align: super;
    line-height: 0;
}

#enunciado del, #enunciado s {
    text-decoration: line-through;
    text-decoration-color: var(--feedback-negativo);
    text-decoration-thickness: 2px;
    opacity: 0.7;
}

#enunciado blockquote {
    border-left: 4px solid var(--primary);
    padding-left: 15px;
    margin: 15px 0;
    font-style: italic;
    background: rgba(43, 217, 226, 0.05);
    padding: 10px 15px;
    border-radius: 0 8px 8px 0;
}

#enunciado ul, #enunciado ol {
    margin: 10px 0;
    padding-left: 25px;
}

#enunciado li {
    margin: 5px 0;
    line-height: 1.5;
}

#enunciado ul li {
    list-style-type: disc;
}

#enunciado ol li {
    list-style-type: decimal;
}


#alternativas {
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 800px;
    margin: 0 auto 30px auto;
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.alter {
    margin: 0;
    display: flex;
    width: 100%;
    background: var(--neutral-200);
    cursor: pointer;
    border-radius: 12px;
    box-shadow: 0 4px 0 transparent;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
    border: 2px solid transparent;
    position: relative;
}

.alter:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 10px var(--neutral-400);
}

.alter:active {
    transform: translateY(2px);
    box-shadow: 0 2px 10px var(--neutral-400);
}

.letra {
    background: var(--neutral-200);
    color: var(--neutral-400);
    border-right: 1px solid var(--neutral-300);
    width: 50px;
    text-align: center;
    border-radius: 10px 0 0 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 18px;
    transition: all 0.3s ease;
    flex-shrink: 0;
    align-self: stretch;

    
}

.letra p {
    margin: 0;
}

.texto {
    margin: 0;
    width: calc(100% - 50px);
    overflow-y: auto;
    padding: 16px 20px;
    font-size: 20px;
    line-height: 1.4;
    transition: all 0.3s ease;
}

#controles {
    text-align: center;
    padding: 10px;
    margin-bottom: 50px;
    animation: fadeIn 0.6s ease-out 0.4s both;
}

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

.btn_confirmar {
    display: none;
    padding: 14px 30px;
    font-size: 18px;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    animation: pulseButton 2s infinite;
}

@keyframes pulseButton {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.btn_confirmar:hover {
    animation: none;
    transform: translateY(-4px) scale(1.05);
}

.selecionado {
    border: 2px solid var(--primary);
    background: rgba(43, 217, 226, 0.05);
    transform: translateY(-4px);
    box-shadow: 0 8px 10px #00f7ff47;
}

.selecionado:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        rgba(43, 217, 226, 0.1) 0%, 
        rgba(134, 249, 255, 0.1) 100%);
    pointer-events: none;
}

.letraSelecionada {
    background: var(--primary);
    color: var(--neutral-100);
    border-right: 1px solid var(--primary);
}

.alterrado {
    border: 2px solid var(--feedback-negativo);
    background: rgb(255, 216, 216);
    transform: translateY(0);
    box-shadow: none;
    animation: shake 0.5s;
}

@keyframes shake {
    0% { transform: translateX(0); }
    20% { transform: translateX(-10px); }
    40% { transform: translateX(10px); }
    60% { transform: translateX(-5px); }
    80% { transform: translateX(5px); }
    100% { transform: translateX(0); }
}

.letraErrada {
    background: var(--feedback-negativo);
    color: var(--neutral-100);
    border-right: 1px solid var(--feedback-negativo);
}

.altcerto {
    border: 2px solid var(--feedback-positivo);
    background: rgba(93, 213, 97, 0.05);
    transform: translateY(0);
    animation: success 0.5s;
    box-shadow: 0 8px 10px #00ff2247;
}

@keyframes success {
    0% { transform: scale(1); }
    50% { transform: scale(1.03); }
    100% { transform: scale(1); }
}

.letraCerta {
    background: var(--feedback-positivo);
}

#img_enunciado {
    width: 100%;
    text-align: center;
    line-height: 1em;
    margin-bottom: 20px;
    animation: fadeIn 0.6s ease-out 0.3s both;
}

#img_enunciado img {
    max-width: 90%;
    max-height: 50vh;
    border-radius: 12px;
    box-shadow: 0 10px 30px var(--neutral-400);
    transition: transform 0.3s ease;
    cursor: pointer;
}

#img_enunciado img:hover {
    transform: scale(1.02);
}

.img-legend {
    font-size: 14px;
    line-height: 1.4;
    margin-top: 10px;
    margin-bottom: 15px;
    color: var(--neutral-600);
    font-style: italic;
}

#zoomImg {
    color: white;
    background: var(--neutral-900);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    font-size: 16px;
    overflow: auto;
    text-align: center;
    cursor: pointer;
    animation: fadeIn 0.3s ease;
    backdrop-filter: blur(5px);
}

#zoomImg:after {
    content: '×';
    position: fixed;
    top: 20px;
    right: 30px;
    font-size: 48px;
    color: white;
    cursor: pointer;
    opacity: 0.8;
    transition: all 0.3s ease;
}

#zoomImg:hover:after {
    opacity: 1;
    transform: scale(1.1);
}

#zoomImg img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-height: 90vh;
    max-width: 90vw;
    border-radius: 12px;
    box-shadow: 0 20px 50px var(--neutral-700);
    animation: zoomIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes zoomIn {
    from { opacity: 0; transform: translate(-50%, -50%) scale(0.9); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* Feedback - usa sistema global padronizado */

/* Sistema de Zoom Aprimorado para Quiz */
.zoom-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--neutral-900);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.zoom-overlay.active {
    opacity: 1;
    visibility: visible;
}

.zoom-container {
    position: relative;
    width: 90%;
    height: 90%;
    max-width: 1200px;
    max-height: 800px;
    display: flex;
    flex-direction: column;
    background: var(--neutral-800);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px var(--neutral-800);

    button {
        box-shadow: none;
        padding: 0;
    }
}

.zoom-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 15px 20px;
    background: var(--neutral-700);
    border-bottom: 1px solid var(--neutral-600);
}

.zoom-btn {
    background: var(--neutral-600);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.zoom-btn:hover {
    background: var(--neutral-500);
    transform: scale(1.05);
}

.zoom-btn:active {
    transform: scale(0.95);
}

.zoom-close {
    background: var(--feedback-negativo-dark);
    margin-right: 10px;
}

.zoom-close:hover {
    background: var(--feedback-negativo-dark);
}

.zoom-level {
    color: white;
    font-weight: 600;
    font-size: 14px;
    min-width: 50px;
    text-align: center;
}

.zoom-navigation {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 10px 20px;
    background: var(--neutral-700);
    border-bottom: 1px solid var(--neutral-600);
}

.nav-btn {
    background: var(--neutral-600);
    color: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-btn:hover:not(:disabled) {
    background: var(--neutral-500);
    transform: scale(1.05);
}

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

.image-counter {
    color: white;
    font-weight: 500;
    font-size: 14px;
}

.zoom-image-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    background: var(--neutral-800);
}

.zoom-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    cursor: grab;
    transition: transform 0.1s ease-out;
    user-select: none;
}

.zoom-image:active {
    cursor: grabbing;
}

.zoom-instructions {
    padding: 10px 20px;
    background: var(--neutral-700);
    text-align: center;
}

.zoom-instructions p {
    color: var(--neutral-500);
    font-size: 12px;
    margin: 0;
    font-style: italic;
}

/* Prevenir scroll quando zoom está ativo */
body.zoom-active {
    overflow: hidden;
}

/* Melhorias para imagens do quiz */
#img_enunciado img {
    cursor: zoom-in;
    transition: all 0.3s ease;
}

#img_enunciado img:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 20px var(--neutral-600);
}

/* Responsividade para o zoom do quiz */
@media (max-width: 768px) {
    .zoom-container {
        width: 95%;
        height: 95%;
        border-radius: 8px;
    }
    
    .zoom-controls {
        padding: 10px 15px;
        gap: 10px;
    }
    
    .zoom-btn {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
    
    .zoom-navigation {
        padding: 8px 15px;
        gap: 15px;
    }
    
    .nav-btn {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }
    
    .zoom-instructions {
        padding: 8px 15px;
    }
    
    .zoom-instructions p {
        font-size: 11px;
    }
}

/*----------------------------------------------------------------------------*/

@media only screen and (max-width: 768px) {
    /* For mobile phones: */
    #enunciado {
        font-size: 20px !important;
        line-height: 1.6;
        padding: 20px 15px;
        max-height: initial;
        text-align: left;
        word-spacing: 0.05em;
        letter-spacing: 0.01em;
    }

    #enunciado p, #enunciado span {
        font-size: inherit !important;
        margin: 0.3em 0;
    }

    .texto {
        font-size: 16px;
        padding: 12px 15px;
    }

    .letra {
        width: 40px;
        font-size: 18px;
    }

    .texto p {
        font-size: inherit;
    }

    #alternativas {
        padding: 0 15px;
        gap: 10px;
    }

    #controles {
        font-size: 14px;
    }

    #miolo {
        height: initial !important;
    }
    
    .btn_confirmar {
        width: 100%;
        padding: 12px 20px;
    }
}






/* ===== FORMATAÇÃO DE TABELAS MODERNA ===== */
#enunciado table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--spacing-3) 0;
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    font-size: 14px;
    line-height: 1.5;
}

#enunciado thead {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
}

#enunciado thead th {
    padding: 16px 20px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.025em;
    text-transform: uppercase;
    border: none;
    position: relative;
    
}

#enunciado thead th:first-child {
    border-top-left-radius: var(--radius-lg);
}

#enunciado thead th:last-child {
    border-top-right-radius: var(--radius-lg);
}

#enunciado thead th::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: rgba(255, 255, 255, 0.2);
}

#enunciado tbody {
    background: white;
}

#enunciado tbody tr {
    transition: all 0.2s ease;
    border-bottom: 1px solid #f1f5f9;
}

#enunciado tbody tr:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), rgba(139, 92, 246, 0.05));
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.1);
}

#enunciado tbody tr:last-child {
    border-bottom: none;
}

#enunciado tbody tr:last-child td:first-child {
    border-bottom-left-radius: var(--radius-lg);
}

#enunciado tbody tr:last-child td:last-child {
    border-bottom-right-radius: var(--radius-lg);
}

#enunciado td {
    padding: 16px 20px;
    border: none;
    color: #374151;
    font-size: 14px;
    line-height: 1.6;
    vertical-align: top;
}

#enunciado th {
    padding: 16px 20px;
    border: none;
    font-weight: 600;
    font-size: 14px;
    text-align: left;
}

/* th dentro de thead - cabeçalho da tabela */
#enunciado thead th {
    color: white;
}

/* th dentro de tbody ou outras situações - células normais */
#enunciado tbody th,
#enunciado th:not(thead th) {
    color: #374151;
    background: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
    font-weight: 600;
}

/* Estilos para diferentes tipos de conteúdo nas células */
#enunciado td p {
    margin: 0 0 8px 0;
    line-height: 1.6;
}

#enunciado td p:last-child {
    margin-bottom: 0;
}

#enunciado td strong,
#enunciado td b {
    font-weight: 600;
    color: #1f2937;
}

#enunciado td em,
#enunciado td i {
    font-style: italic;
    color: #6b7280;
}

/* Estilos para números e dados */
#enunciado td[data-type="number"] {
    text-align: right;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    font-weight: 500;
    color: #059669;
}

#enunciado td[data-type="currency"] {
    text-align: right;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    font-weight: 600;
    color: #059669;
}

#enunciado td[data-type="percentage"] {
    text-align: right;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    font-weight: 500;
    color: #dc2626;
}

/* Estilos para células com status */
#enunciado td[data-status="success"] {
    background: rgba(34, 197, 94, 0.1);
    color: #059669;
    font-weight: 500;
}

#enunciado td[data-status="warning"] {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
    font-weight: 500;
}

#enunciado td[data-status="error"] {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    font-weight: 500;
}

#enunciado td[data-status="info"] {
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
    font-weight: 500;
}

/* Estilos para tabelas zebradas */
#enunciado table[data-style="zebra"] tbody tr:nth-child(even) {
    background: #f8fafc;
}

#enunciado table[data-style="zebra"] tbody tr:nth-child(even):hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(139, 92, 246, 0.08));
}

/* Estilos para tabelas compactas */
#enunciado table[data-size="compact"] th,
#enunciado table[data-size="compact"] td {
    padding: 8px 12px;
    font-size: 13px;
}

/* Estilos para tabelas grandes */
#enunciado table[data-size="large"] th,
#enunciado table[data-size="large"] td {
    padding: 20px 24px;
    font-size: 16px;
}

/* Bordas personalizadas para tabelas */
#enunciado table[data-border="all"] {
    border: 2px solid #e5e7eb;
}

#enunciado table[data-border="all"] th,
#enunciado table[data-border="all"] td {
    border: 1px solid #e5e7eb;
}

#enunciado table[data-border="vertical"] td {
    border-left: 1px solid #e5e7eb;
    border-right: 1px solid #e5e7eb;
}

#enunciado table[data-border="vertical"] td:first-child {
    border-left: none;
}

#enunciado table[data-border="vertical"] td:last-child {
    border-right: none;
}

/* ===== MODO DARK PARA TABELAS ===== */
[data-theme="dark"] #enunciado table {
    background: #1f2937;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] #enunciado thead {
    background: linear-gradient(135deg, #3b82f6, #6366f1);
}

[data-theme="dark"] #enunciado tbody {
    background: #1f2937;
}

[data-theme="dark"] #enunciado tbody tr {
    border-bottom-color: #374151;
}

[data-theme="dark"] #enunciado tbody tr:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(99, 102, 241, 0.1));
}

[data-theme="dark"] #enunciado td {
    color: #f3f4f6;
}

[data-theme="dark"] #enunciado tbody th,
[data-theme="dark"] #enunciado th:not(thead th) {
    color: #f3f4f6;
    background: #111827;
    border-bottom-color: #374151;
}

[data-theme="dark"] #enunciado td strong,
[data-theme="dark"] #enunciado td b {
    color: #f9fafb;
}

[data-theme="dark"] #enunciado td em,
[data-theme="dark"] #enunciado td i {
    color: #d1d5db;
}

[data-theme="dark"] #enunciado td[data-type="number"],
[data-theme="dark"] #enunciado td[data-type="currency"] {
    color: #10b981;
}

[data-theme="dark"] #enunciado td[data-type="percentage"] {
    color: #f87171;
}

[data-theme="dark"] #enunciado table[data-style="zebra"] tbody tr:nth-child(even) {
    background: #111827;
}

[data-theme="dark"] #enunciado table[data-border="all"] {
    border-color: #374151;
}

[data-theme="dark"] #enunciado table[data-border="all"] th,
[data-theme="dark"] #enunciado table[data-border="all"] td {
    border-color: #374151;
}

[data-theme="dark"] #enunciado table[data-border="vertical"] td {
    border-color: #374151;
}


.quiz-container{
    padding-bottom: 80px;
}