:root {
    --primary-color: #0d3b66; /* Deep Blue */
    --secondary-color: #faf0ca; /* Creamy Yellow */
    --accent-color: #f95738;  /* Burnt Orange */
    --background-color: #f4f7f9; /* Light Gray */
    --surface-color: #ffffff;   /* White */
    --text-color: #333333;
    --border-color: #dee2e6; /* Lighter border */
    --shadow-color: rgba(0, 0, 0, 0.08); /* Softer shadow */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    /* Subtle gradient background for depth */
    background: linear-gradient(180deg, #eaf2f8 0%, #f4f7f9 20%);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
    width: 100%;
}

/* --- Header --- */
header {
    background-color: transparent; /* Make header transparent */
    color: var(--primary-color);   /* Adjust text color to be visible on light background */
    padding: 20px 0;
    box-shadow: none; /* Remove shadow for a flatter look */
    position: static; /* Let it scroll with the page */
}

header .container {
    display: flex;
    align-items: center;
    gap: 20px;
}

#logo-wrapper {
    height: 90px;
    width: 90px;
    background-color: var(--surface-color);
    border-radius: 18px; /* Smoothly rounded rectangle */
    padding: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0; /* Prevents the logo from shrinking */
    transition: transform 0.3s ease;
}

#logo-wrapper:hover {
    transform: scale(1.05); /* Slight zoom effect on hover */
}

#logo-wrapper img {
    max-width: 100%;
    height: auto;
    display: block;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
}

/* --- Main Content --- */
main {
    padding-top: 40px;
    padding-bottom: 40px;
}

h2 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 10px;
    text-align: center;
}

#query-section p {
    margin-bottom: 20px;
    max-width: 80ch;
}

#query-section {
    background-color: var(--surface-color);
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.07);
    margin-bottom: 40px;
}

textarea {
    width: 100%;
    min-height: 150px;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    font-family: inherit;
    font-size: 1rem;
    background-color: var(--surface-color);
    resize: vertical;
    margin-bottom: 20px;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.06);
}

textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(249, 87, 56, 0.2);
}

button {
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    display: block;
    width: 100%;
    max-width: 300px; /* Slightly wider button */
    margin: 0; /* Align to the left */
}

button:hover {
    background-color: #e04a2d;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(249, 87, 56, 0.3); /* Add shadow on hover */
}

/* --- Results --- */
#results-section {
    margin-top: 40px;
}

.hidden {
    display: none !important;
}

#loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 40px;
    text-align: center;
}

.spinner {
    border: 6px solid var(--border-color);
    border-top: 6px solid var(--accent-color);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

#loader p {
    font-size: 1.1rem;
    color: var(--primary-color);
    font-weight: 500;
}

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

#results-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.syndrome-card {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 12px var(--shadow-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.syndrome-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.syndrome-card h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 20px; /* More space below title */
}

.syndrome-card p {
    margin-bottom: 12px; /* Adjusted spacing */
    font-size: 1.05rem; /* Slightly larger text */
}

.syndrome-card strong {
    font-weight: 700; /* Bolder */
    color: var(--primary-color); /* Use primary color for labels */
}

.syndrome-card img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin-top: 10px;
}

/* Estilo para destacar o card de síndrome hemorrágica */
.hemorrhagic-card {
    border-left: 5px solid #E57373; /* Uma borda vermelha mais forte à esquerda */
    background-color: #FFEBEE; /* Um fundo vermelho bem claro */
}

.hemorrhagic-card:hover {
    border-left-color: #D32F2F; /* Darken border on hover */
    box-shadow: 0 8px 24px rgba(229, 115, 115, 0.2);
}

/* --- Footer --- */
footer {
    background-color: transparent; /* Match the body background */
    text-align: center;
    padding: 40px 20px;
    margin-top: 50px;
    font-size: 0.9rem;
    color: #6c757d;
}

/* --- Abas --- */
.tabs {
    display: flex;
    border-bottom: 2px solid #ddd;
    margin-bottom: 1rem;
}

/* Tab text switching for mobile */
.tab-button .tab-short {
    display: none !important;
}

.tab-button .tab-full {
    display: inline;
}

@media (max-width: 600px) {
    .tab-button .tab-full {
        display: none !important;
    }
    .tab-button .tab-short {
        display: inline !important;
    }
}

.tab-button {
    background: none;
    border: none;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    cursor: pointer;
    color: #555;
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
}

.tab-button.active {
    color: #007BFF;
    border-bottom: 2px solid #007BFF;
}

.tab-button:hover {
    background-color: #f7f7f7;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.5s;
}

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

/* --- Container de Consentimento --- */
.consent-container {
    margin-top: 1rem;
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    color: #666;
}

#consent-checkbox {
    margin-right: 0.5rem;
    cursor: pointer;
}

/* --- Lista de Casos de Validação --- */
.validation-case-list {
    max-height: 60vh;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 0.5rem;
}

.validation-case-item {
    background-color: #f9f9f9;
    padding: 1rem;
    margin-bottom: 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    border-left: 4px solid #007BFF;
}

.validation-case-item:hover {
    background-color: #e9ecef;
}

.validation-case-item h3 {
    margin-top: 0;
    color: #333;
}

.validation-case-item p {
    font-size: 0.95rem;
    color: #555;
    white-space: pre-wrap; /* Mantém a formatação do texto */
}

/* --- Estilos para Múltipla Escolha --- */
.syndrome-options-container {
    display: flex;
    flex-direction: column;
    margin-top: 10px;
    padding: 0;
}

.syndrome-option-btn {
    transition: all 0.2s ease !important;
    box-sizing: border-box;
}

.syndrome-option-btn:not(:disabled):hover {
    background: #667eea !important;
    color: white !important;
    border-color: #667eea !important;
}

/* --- Estilos para o Modal de Consentimento --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: #fff;
    padding: 2rem;
    border-radius: 8px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.consent-text-box {
    border: 1px solid #ccc;
    padding: 1rem;
    margin: 1rem 0;
    max-height: 40vh;
    overflow-y: scroll;
    background-color: #f9f9f9;
    font-size: 0.9rem;
    line-height: 1.6;
}

.consent-action {
    text-align: center;
    margin-top: 1.5rem;
}

.consent-action label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

#cpf-input {
    padding: 0.5rem;
    font-size: 1.2rem;
    text-align: center;
    letter-spacing: 0.5em;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 150px;
    margin-bottom: 1rem;
}

.button-primary {
    background-color: #007BFF;
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.button-primary:hover {
    background-color: #0056b3;
}

/* --- Estilos para a área de resposta da validação --- */
.validation-answer-area {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
}

.validation-answer-area textarea {
    width: 100%;
    min-height: 120px;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.5;
    resize: vertical;
    transition: border-color 0.3s ease;
}

.validation-answer-area textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(13, 59, 102, 0.1);
}

.validation-answer-area textarea::placeholder {
    color: #666;
    font-style: italic;
    line-height: 1.4;
}

.validation-answer-area button {
    align-self: flex-end;
    background-color: #28a745;
}

.validation-answer-area button:hover {
    background-color: #218838;
}

.validation-answer-area button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* --- Estilos para os Cards de Resultado --- */
#results-container {
    margin-top: 2rem;
}

.result-card {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.result-card h4 {
    margin-top: 0;
    color: #0056b3;
}

.card-content {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: flex-start;
}

.card-image {
    flex: 1 1 250px; /* Flex-grow, flex-shrink, base size */
    min-width: 200px;
}

.card-image img {
    width: 100%;
    max-width: 300px; /* Define um tamanho máximo para a imagem */
    height: auto;
    border-radius: 6px;
    border: 1px solid #eee;
}

.card-details {
    flex: 2 1 300px; /* Ocupa mais espaço que a imagem */
}

.card-details p {
    margin: 0.5rem 0;
    line-height: 1.6;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-top: 1.5rem;
}

.syndrome-section {
    /* As propriedades flex não são mais necessárias aqui com o grid */
    min-width: initial;
}

.hemorrhagic-section .result-card {
    border-left: 5px solid #dc3545; /* Vermelho para indicar perigo/hemorragia */
}

.submission-feedback {
    margin-top: 0.5rem;
    padding: 0.8rem;
    background-color: #eaf3ff;
    color: #0056b3;
    border-radius: 4px;
    font-size: 0.9rem;
    text-align: center;
    border-left: 4px solid #007BFF;
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
    /* Container */
    .container {
        padding: 0 1rem;
        margin: 1rem auto;
    }

    /* Header compacto */
    header {
        padding: 10px 0;
    }

    header .container {
        gap: 12px;
    }

    header h1 {
        font-size: 1.5rem;
    }

    #logo-wrapper {
        height: 50px;
        width: 50px;
        border-radius: 10px;
        padding: 6px;
    }

    /* Tabs em scroll horizontal */
    .tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 0;
        padding-bottom: 8px;
        margin-bottom: 1rem;
    }

    .tab-button {
        padding: 0.6rem 0.8rem;
        font-size: 0.85rem;
        white-space: nowrap;
        flex-shrink: 0;
    }

    /* Botoes full-width */
    button {
        max-width: 100%;
    }

    /* Query section */
    #query-section {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }

    textarea {
        min-height: 120px;
        font-size: 0.95rem;
    }

    /* Cards em coluna unica */
    #results-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .syndrome-card {
        padding: 1rem;
    }

    .syndrome-card h3 {
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }

    .syndrome-card p {
        font-size: 0.95rem;
    }

    /* Footer compacto */
    footer {
        padding: 1.5rem 1rem;
        font-size: 0.75rem;
    }
}

/* Mobile pequeno (< 480px) */
@media (max-width: 480px) {
    header h1 {
        font-size: 1.3rem;
    }

    #logo-wrapper {
        height: 45px;
        width: 45px;
    }

    .tab-button {
        padding: 0.5rem 0.6rem;
        font-size: 0.8rem;
    }

    h2 {
        font-size: 1.4rem;
    }
} 

/* --- Admin --- */
.admin-access-container {
    margin: 1rem 0;
    text-align: center;
}

#admin-access-btn {
    background: none;
    border: 1px solid #6c757d;
    color: #6c757d;
    padding: 0.3rem 0.8rem;
    font-size: 0.8rem;
    border-radius: 20px;
    cursor: pointer;
}

.admin-panel {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.admin-panel button {
    margin-right: 1rem;
}

.danger-btn {
    background-color: #dc3545;
    color: white;
}
.danger-btn:hover {
    background-color: #c82333;
}

#view-answers-modal .modal-content {
    max-width: 90vw;
}

.user-answers h4 {
    border-bottom: 2px solid #007BFF;
    padding-bottom: 0.5rem;
    margin-top: 1.5rem;
}

.answer-item {
    background-color: #f9f9f9;
    padding: 0.8rem;
    border-radius: 4px;
    margin-bottom: 0.5rem;
    border-left: 3px solid #6c757d;
} 

/* User Type Selection */
#user-type-selection {
    background: var(--surface-color);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 12px var(--shadow-color);
    border: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

#user-type-selection h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.5rem;
    font-weight: 500;
}

#user-type-selection p {
    color: var(--text-color);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

#user-type-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    background: var(--surface-color);
    color: var(--text-color);
    margin-bottom: 1.5rem;
    transition: border-color 0.3s ease;
}

#user-type-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(13, 59, 102, 0.1);
}

#submit-user-type-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

#submit-user-type-btn:hover {
    background: #0a2d4d;
    transform: translateY(-1px);
}

/* SUS Questionnaire */
#sus-questionnaire {
    background: var(--surface-color);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 12px var(--shadow-color);
    border: 1px solid var(--border-color);
    margin-top: 2rem;
}

#sus-questionnaire h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.5rem;
    font-weight: 500;
}

#sus-questionnaire > p {
    color: var(--text-color);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.sus-item {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.sus-item p {
    font-weight: 500;
    margin-bottom: 0.75rem;
    color: var(--text-color);
}

.radio-group {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.radio-group label:hover {
    background-color: rgba(13, 59, 102, 0.05);
}

.radio-group input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
}

#submit-sus-btn {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

#submit-sus-btn:hover {
    background: #e04a2f;
    transform: translateY(-1px);
}

#submit-sus-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.error-message {
    color: #dc3545;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    display: none;
}

#sus-success {
    color: #28a745;
    font-weight: 500;
    margin-top: 1rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .radio-group {
        flex-wrap: wrap;
        gap: 0.3rem;
    }

    .radio-group label {
        padding: 0.4rem;
        font-size: 0.9rem;
    }

    .radio-group input[type="radio"] {
        width: 16px;
        height: 16px;
    }

    #user-type-selection,
    #sus-questionnaire {
        padding: 1rem;
        border-radius: 8px;
    }

    #sus-questionnaire h2 {
        font-size: 1.3rem;
    }

    .sus-item {
        padding: 0.75rem;
        margin-bottom: 1rem;
    }

    .sus-item p {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }

    /* Modal responsivo */
    .modal-content {
        width: 95%;
        padding: 1rem;
        max-height: 95vh;
    }

    .modal-content h2 {
        font-size: 1.2rem;
        margin-bottom: 0.75rem;
    }

    .consent-text-box {
        max-height: 35vh;
        padding: 0.75rem;
        font-size: 0.8rem;
    }

    .consent-action {
        margin-top: 1rem;
    }

    .consent-action label {
        font-size: 0.9rem;
    }

    #cpf-input {
        width: 130px;
        font-size: 1rem;
        padding: 0.4rem;
    }

    #consent-agree-btn {
        font-size: 1rem !important;
        padding: 12px 24px !important;
    }

    /* Validation instructions */
    .validation-cases-instructions {
        padding: 1rem;
    }

    .validation-cases-instructions ul {
        padding-left: 1.2rem;
    }

    .validation-cases-instructions li {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .radio-group {
        gap: 0.2rem;
    }

    .radio-group label {
        padding: 0.3rem 0.4rem;
        font-size: 0.85rem;
    }

    .modal-content {
        padding: 0.75rem;
    }

    .consent-text-box {
        max-height: 30vh;
        font-size: 0.75rem;
    }
} 

/* Validation Cases Instructions */
.validation-cases-instructions {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-left: 4px solid var(--primary-color);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.validation-cases-instructions ul {
    margin: 0;
    padding-left: 1.5rem;
}

.validation-cases-instructions li {
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.validation-cases-instructions strong {
    color: var(--primary-color);
}

.validation-cases-instructions em {
    color: #6c757d;
    font-size: 0.9rem;
}

/* Validation Cases */ 
/* =================================================================
   NOVAS SEÇÕES - Interface Moderna e Responsiva
   ================================================================= */

/* --- Seção Sobre o Projeto --- */
.about-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 3rem 2rem;
    border-radius: 16px;
    margin-bottom: 3rem;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.about-section h2 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.about-description {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.about-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.about-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 1.5rem;
    transition: transform 0.3s ease, background 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.about-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.25);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.about-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
    font-weight: 600;
}

.about-card p {
    font-size: 0.95rem;
    line-height: 1.6;
    opacity: 0.9;
}

/* --- Seção de Inferência --- */
.inference-section {
    background: white;
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.inference-section h1 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-weight: 600;
}

/* --- Exemplos de Casos --- */
.examples-section {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border-left: 4px solid #667eea;
}

.examples-label {
    font-size: 1rem;
    color: var(--text-color);
    margin-bottom: 1rem;
}

.examples-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.example-btn {
    background: white;
    border: 2px solid #667eea;
    color: #667eea;
    padding: 0.7rem 1.2rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.example-btn:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* --- Container de Input --- */
.input-container {
    margin-bottom: 1.5rem;
}

.input-container label {
    display: block;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 0.8rem;
}

#clinical-case {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 1rem;
    font-family: 'Roboto', sans-serif;
    resize: vertical;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#clinical-case:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.char-counter {
    text-align: right;
    font-size: 0.85rem;
    color: #666;
    margin-top: 0.5rem;
}

/* --- Botão Submit Melhorado --- */
.submit-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 1rem 2.5rem;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin: 0 auto;
}

.submit-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.submit-button:active {
    transform: translateY(0);
}

.submit-button:disabled {
    background: #ccc;
    cursor: not-allowed;
    box-shadow: none;
}

.button-icon {
    font-size: 1.3rem;
}

/* --- Loader Melhorado --- */
.loader {
    text-align: center;
    padding: 2rem;
    margin: 2rem 0;
}

.loader-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

.loader p {
    color: var(--text-color);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.loader-detail {
    font-size: 0.9rem !important;
    color: #666 !important;
}

/* --- Responsividade --- */
@media (max-width: 768px) {
    .about-section {
        padding: 1.5rem 1rem;
        border-radius: 12px;
        margin-bottom: 1.5rem;
    }

    .about-section h2 {
        font-size: 1.5rem;
        text-align: center;
    }

    .about-description {
        font-size: 0.95rem;
        text-align: center;
    }

    .about-cards {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .about-card {
        padding: 1rem;
    }

    .card-icon {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }

    .about-card h3 {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }

    .about-card p {
        font-size: 0.85rem;
    }

    .about-card a {
        font-size: 0.85rem;
    }

    .inference-section {
        padding: 1.25rem;
        border-radius: 12px;
    }

    .inference-section h1 {
        font-size: 1.4rem;
        margin-bottom: 1rem;
    }

    .examples-section {
        padding: 1rem;
        margin-bottom: 1rem;
    }

    .examples-label {
        font-size: 0.9rem;
    }

    .examples-buttons {
        flex-direction: column;
        gap: 0.5rem;
    }

    .example-btn {
        width: 100%;
        text-align: center;
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }

    .input-container label {
        font-size: 0.9rem;
    }

    .submit-button {
        width: 100%;
        justify-content: center;
        padding: 0.9rem 1.5rem;
        font-size: 1rem;
    }

    #clinical-case {
        font-size: 0.9rem;
        padding: 0.75rem;
    }

    .char-counter {
        font-size: 0.75rem;
    }

    /* Validation banner mobile */
    .validation-banner {
        padding: 1.25rem !important;
        border-radius: 10px !important;
        margin-bottom: 1.5rem !important;
    }

    .validation-banner h2 {
        font-size: 1.2rem !important;
    }

    .validation-banner p {
        font-size: 0.9rem !important;
    }

    .validation-banner button {
        padding: 0.6rem 1.5rem !important;
        font-size: 0.9rem !important;
    }

    /* Tecnologia info box */
    .about-section > div:last-child {
        padding: 1rem !important;
    }

    .about-section > div:last-child p {
        font-size: 0.8rem !important;
        line-height: 1.5 !important;
    }
}

@media (max-width: 480px) {
    .about-section {
        padding: 1rem 0.75rem;
    }

    .about-section h2 {
        font-size: 1.3rem;
    }

    .about-description {
        font-size: 0.9rem;
    }

    .card-icon {
        font-size: 1.8rem;
    }

    .about-card h3 {
        font-size: 1rem;
    }

    .about-card p {
        font-size: 0.8rem;
    }

    .inference-section {
        padding: 1rem;
    }

    .inference-section h1 {
        font-size: 1.25rem;
    }

    .validation-banner h2 {
        font-size: 1.1rem !important;
    }

    .validation-banner p {
        font-size: 0.85rem !important;
    }
}

/* --- Banner de Validação --- */
.validation-banner button:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.about-card a {
    display: inline-block;
    margin-top: 0.5rem;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.about-card a:hover {
    transform: translateX(5px);
    opacity: 0.8;
}

/* Animação pulse para loading */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Estilo para botão de consultar Louis */
.consult-louis-btn {
    transition: all 0.3s ease;
}

.consult-louis-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.consult-louis-btn:disabled {
    opacity: 0.8;
}

/* --- Mobile: Symptom Search & Syndrome Lookup --- */
@media (max-width: 768px) {
    .symptom-search-section,
    .syndrome-lookup-section {
        padding: 1.25rem;
    }

    .symptom-search-section h1,
    .syndrome-lookup-section h1 {
        font-size: 1.4rem;
        margin-bottom: 1rem;
    }

    #syndrome-search-input {
        font-size: 0.9rem !important;
        padding: 0.6rem !important;
    }

    .add-symptom-btn {
        font-size: 0.9rem;
        padding: 0.6rem 1rem;
    }

    /* Validation case list mobile */
    .validation-case-list {
        max-height: 50vh;
        padding: 0.25rem;
    }

    .validation-case-item {
        padding: 0.75rem;
        margin-bottom: 0.4rem;
    }

    .validation-case-item h3 {
        font-size: 1rem;
        margin-bottom: 0.3rem;
    }

    .validation-case-item p {
        font-size: 0.85rem;
        line-height: 1.4;
    }

    /* Validation answer area */
    .validation-answer-area textarea {
        min-height: 100px;
        font-size: 0.9rem;
        padding: 0.75rem;
    }

    .validation-answer-area button {
        font-size: 0.9rem;
        padding: 0.6rem 1.2rem;
    }

    /* Results grid mobile */
    .results-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .result-card {
        padding: 1rem;
    }

    .result-card h4 {
        font-size: 1.1rem;
    }

    .card-content {
        flex-direction: column;
        gap: 1rem;
    }

    .card-image {
        flex: none;
        width: 100%;
    }

    .card-image img {
        max-width: 100%;
    }

    .card-details p {
        font-size: 0.9rem;
    }

    /* Admin panel mobile */
    .admin-panel {
        padding: 0.75rem;
    }

    .admin-panel button {
        font-size: 0.8rem;
        padding: 0.5rem 0.8rem;
        margin-right: 0.5rem;
        margin-bottom: 0.5rem;
    }

    #admin-access-btn {
        font-size: 0.75rem;
        padding: 0.25rem 0.6rem;
    }
}

@media (max-width: 480px) {
    .validation-case-item h3 {
        font-size: 0.95rem;
    }

    .validation-case-item p {
        font-size: 0.8rem;
    }

    .validation-answer-area textarea {
        min-height: 80px;
        font-size: 0.85rem;
    }

    .admin-panel button {
        width: 100%;
        margin-right: 0;
    }
}


/* --- Microphone Recording Styles --- */
.textarea-with-mic {
    position: relative;
    display: flex;
    gap: 0.5rem;
}

.textarea-with-mic textarea {
    flex: 1;
    padding-right: 1rem;
}

.mic-button {
    position: absolute;
    right: 10px;
    top: 10px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid #667eea;
    background: white;
    color: #667eea;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.mic-button:hover {
    background: #667eea;
    color: white;
    transform: scale(1.05);
}

.mic-button.recording {
    background: #dc3545;
    border-color: #dc3545;
    color: white;
    animation: pulse-recording 1.5s infinite;
}

@keyframes pulse-recording {
    0% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(220, 53, 69, 0); }
    100% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0); }
}

.input-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
}

.recording-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #dc3545;
    font-weight: 500;
    font-size: 0.9rem;
}

.recording-dot {
    width: 10px;
    height: 10px;
    background: #dc3545;
    border-radius: 50%;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.3; }
}

.transcription-loader {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: #f0f4ff;
    border-radius: 8px;
    margin-top: 0.5rem;
    color: #667eea;
    font-size: 0.9rem;
}

.loader-spinner-small {
    width: 20px;
    height: 20px;
    border: 3px solid #e0e0e0;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Mobile adjustments for mic button */
@media (max-width: 768px) {
    .mic-button {
        width: 40px;
        height: 40px;
        right: 8px;
        top: 8px;
    }
    
    .mic-button svg {
        width: 20px;
        height: 20px;
    }
}

/* Mic icon text (emoji) */
.mic-icon-text {
    font-size: 20px;
    line-height: 1;
}
