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

body {
    background-color: #ffffff;
    margin: 0;
    font-family: "Roboto Mono", monospace;
    width: 100%;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: #000;
    cursor: pointer;
}

.page-header {
    display: flex;
    align-items: center;
    padding: 20px 40px;
    gap: 25px;
    border-bottom: 2px solid #f0f0f0;
}

#logo_inicial img {
    max-height: 100px;
    width: auto;
}

.page-title h2 {
    font-family: 'Quicksand', sans-serif;
    font-size: 2.8em;
    font-weight: bold;
    color: #3a5ba6;
    margin: 0;
    line-height: 1.1;
}

.page-title p {
    font-family: 'Quicksand', sans-serif;
    font-size: 1.1em;
    color: #333;
    margin: 0;
}

.container {
    display: flex;
    flex-direction: column;
    max-width: 1400px;
    margin: 0 auto; 
    padding: 20px 40px; 
}

.domains {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.domains p {
    font-family: "Quicksand", sans-serif;
    font-size: 1.2em;
    font-weight: bold;
    margin-right: 10px;
}

.domains a {
    padding: 8px 15px;
    border: 2px solid #3a5ba6;
    border-radius: 10px;
    background-color: #ffffff; 
    color: #3a5ba6; 
    font-family: "Roboto Mono", monospace;
    font-weight: bold;
    transition: all 0.2s ease-in-out;
}

.domains a#sand {
    background-color: #fff38aff;
    border-color: #fff155ff;     
    color: #333;                
}

.domains a:not(#sand):hover {
    background-color: #f0f5ff;
    color: #3a5ba6;
}


.viewer-wrapper {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    width: 100%;
    gap: 20px;
    margin-top: 10px;
}

.mutations {
    flex-shrink: 0; /* Impede a tabela de encolher */
}

table {
    border-collapse: collapse;
    text-align: left;
}

th, td {
    border: 1px solid #b5b5b5;
    padding: 8px 12px;
    margin: 0;
}

th {
    background-color: #f7f7f7;
}

.AF-075398, .view, .link {
    color: #6b9fff;
    font-weight: bold;
}

.welcome-section {
    width: 100%;
}

.viewer-area {
    flex: 1 1 600px;
    position: relative;
    min-height: 500px;
    display: none;
    padding-top: 40px;
}

.comparison-container {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    width: 100%;
}

.viewer-box {
    flex: 1 1 45%;
    min-width: 250px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.mol-viewer {
    width: 100%;
    height: 400px;
    background-color: white;
    position: relative;
}

.viewer-box h3 {
    font-family: "Quicksand", monospace;
    font-size: 1em;
    margin-top: 10px;
}

.toggle-container {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: "Quicksand", monospace;
    font-size: 16px;
    font-weight: bold;
    position: absolute;
    top: 0;
    right: 10px;
}

.toggle {
    position: relative;
    width: 50px;
    height: 25px;
    background-color: grey;
    border-radius: 15px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.toggle::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: white;
    border-radius: 50%;
    top: 2.5px;
    left: 2.5px;
    transition: left 0.3s;
}

input[type="checkbox"] {
    display: none;
}

input[type="checkbox"]:checked+.toggle {
    background-color: green;
}

input[type="checkbox"]:checked+.toggle::after {
    left: 27.5px;
}

.faixa {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    background-color: #3a5ba6;
    padding: 10px;
    width: 100%;
    color: white;
    flex-wrap: wrap;
    box-sizing: border-box;
}

.button {
    background-color: #3a5ba6;
    color: white;
    font-size: 1em;
    text-decoration: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    border: none;
}

.button img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    display: block;
}

.logos {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-color: #f0fbff;
    padding: 15px 10px;
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
}

.logos p {
    font-family: "Quicksand", sans-serif;
    font-weight: bold;
    font-size: 1.2em;
    color: #333;
    margin: 0 10px;
}

.logos img {
    max-width: 180px;
    height: auto;
    object-fit: contain;
    display: block;
    margin: 10px;
}

@media (max-width: 768px) {

    /* Cabeçalho: Empilha o logo e o título */
    .page-header {
        flex-direction: column; /* Empilha os itens */
        gap: 15px;
        padding: 15px;
    }

    .page-title h2 {
        font-size: 2em; /* Título menor para caber */
    }

    /* Container: Reduz o padding lateral */
    .container {
        padding: 10px;
    }

    /* Domínios: Permite que os botões quebrem a linha */
    .domains {
        flex-wrap: wrap;
        justify-content: center;
    }

    /* Layout Principal: Empilha a tabela e a área do visualizador */
    .viewer-wrapper {
        flex-direction: column; 
        align-items: center;
    }

    .mutations {
        width: 100%; 
        overflow-x: auto; /* Adiciona scroll horizontal à tabela se ela for muito larga */
    }
    
    .viewer-area {
        width: 100%; 
        min-width: 100%; /* Garante que ocupe a largura total, sobrescrevendo o 'min-width: 600px' */
    }

    /* Visualizadores 3D: Empilha o Nativo e o Mutado */
    .comparison-container {
        flex-direction: column; 
        gap: 25px; /* Adiciona um espaço entre os dois visualizadores */
    }
    
    .viewer-box {
        min-width: 100%; /* Garante que cada visualizador ocupe a largura total */
    }
    
    /* Posição dos botões de toggle: Centraliza no topo */
    .toggle-container {
        position: relative; /* Remove o 'absolute' */
        top: auto;
        right: auto;
        justify-content: center;
        margin-top: 20px;
        margin-bottom: 10px;
    }
}