html {
    font-size: 14px;
    position: relative;
    min-height: 100%;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

body {
    margin-bottom: 60px;
    background-color: var(--bs-body-bg);
}

/* Estilo para campos menores */
.small-input {
    max-width: 150px; /* Ajuste o valor conforme necessário */
}

/* Estilo para campos maiores */
.large-input {
    width: 100%; /* Ocupa toda a largura disponível */
}

.table {
    margin-top: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}

.btn-info {
    background-color: #17a2b8;
    border-color: #17a2b8;
}

    .btn-info:hover {
        background-color: #138496;
        border-color: #117a8b;
    }

/* Efeito de iluminação nas linhas da tabela */
.table tbody tr:hover {
    background-color: #f5f5f5; /* Cor de fundo mais clara quando o mouse passar sobre a linha */
}

/* Efeito nas células para destaque ao passar o mouse */
.table td:hover {
    background-color: #e9ecef; /* Cor de fundo mais clara nas células */
}

/* Efeito nas colunas de botões */
.table .btn:hover {
    opacity: 0.8; /* Deixa os botões mais transparentes ao passar o mouse */
}

.resizable-container {
    resize: both;
    overflow: auto;
    display: inline-block;
    width: 100%;
}

.tooltip-inner {
    background-color: #333;
    color: white;
    border-radius: 4px;
    padding: 8px;
}

/* Estilos para hover em tabelas no tema claro */
.table tbody tr:hover {
    background-color: #f5f5f5; /* Cor original para tema claro */
}

.table td:hover {
    background-color: #e9ecef;
}

/* Estilos para hover em tabelas no tema dark */
html[data-bs-theme="dark"] .table tbody tr:hover {
    background-color: #2a2a2a; /* Tom escuro, mas com destaque */
}

html[data-bs-theme="dark"] .table td:hover {
    background-color: #323232;
}

/* Sobrescrevendo estilos da navbar no tema dark */
html[data-bs-theme="dark"] .navbar {
    background-color: #343a40 !important; /* Cor de fundo escura */
}

    html[data-bs-theme="dark"] .navbar .navbar-brand,
    html[data-bs-theme="dark"] .navbar .nav-link {
        color: #ffffff !important; /* Textos em branco */
    }

@keyframes blink {
    0%, 100% {
        color: #ffc107; /* Amarelado */
    }

    50% {
        color: inherit; /* Cor original */
    }
}

.blink-animation {
    animation: blink 1s linear infinite;
}

/* Estilos para o banner */
.hero {
    position: relative;
   // background: url('/images/BannerFundo.png') no-repeat center center;
    background-size: cover;
    height: 400px;
}

@media (max-width: 767px) {
    .hero {
        height: 132px; /* Ajuste esse valor conforme necessário */
        width: 100%;
    }
}

/* Imagens da pessoa centralizadas e menores */
.hero-person {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 100%;
    height: auto;
    opacity: 0;
    animation: fadeIn 4s ease-in-out 1s forwards; /* Começa 1 segundo depois */
}

/* Animação para o banner central */
.hero-person-1 {
    animation-delay: 3s; /* Começa imediatamente */
    left: 50%;
}

/* Animações para as imagens adicionais */
.hero-person-2 {
    opacity: 0;
    animation: fadeIn 4s ease-in-out 1s forwards; /* Começa 1 segundo depois */
}

.hero-person-3 {
    opacity: 0;
    animation: fadeIn 4s ease-in-out 2s forwards; /* Começa 2 segundos depois */
}

/* Animação de fade-in para as imagens adicionais */
@keyframes fadeIn {
    0% {
        opacity: 0;
    }

    50% {
        opacity: 0.8;
    }

    100% {
        opacity: 1;
    }
}

/* Títulos brancos no modo escuro */
h3 {
    color: white;
}

/* Títulos pretos no modo claro */
[data-bs-theme="light"] h3 {
    color: black;
}

/* Novas animações */
@keyframes titleEntry {
    0% {
        opacity: 0;
        filter: brightness(0.5);
    }

    100% {
        opacity: 1;
        filter: brightness(1);
    }
}

@keyframes pulseGlow {
    0% {
        text-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
    }

    50% {
        text-shadow: 0 0 20px rgba(255, 255, 255, 0.8), 0 0 30px rgba(255, 255, 255, 0.6);
    }

    100% {
        text-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
    }
}

/* Versão para tema escuro */
@keyframes pulseGlowDark {
    0% {
        text-shadow: 0 0 10px rgba(255, 223, 0, 0.1);
    }

    50% {
        text-shadow: 0 0 20px rgba(255, 223, 0, 0.6), 0 0 30px rgba(255, 223, 0, 0.4);
    }

    100% {
        text-shadow: 0 0 10px rgba(255, 223, 0, 0.1);
    }
}

.page-title {
    opacity: 0;
    animation: titleEntry 2s ease-out forwards;
    position: relative;
    background-color: transparent !important;
    border-bottom: none !important;
    color: var(--bs-body-color, #333);
    padding: 30px 20px;
    text-align: center;
    font-size: 2.5rem;
    font-weight: bold;
}

html[data-bs-theme="dark"] .page-title {
    animation: titleEntry 2s ease-out forwards;
    color: white;
}

html[data-bs-theme="light"] .page-title {
    animation: titleEntry 2s ease-out forwards;
}

@media (max-width: 767px) {
    .page-title {
        height: 60px;
        font-size: 1.5rem;
    }
}

.card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

    .card:hover {
        transform: translateY(-10px);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    }

/* Ajuste para os títulos das tabelas no modo escuro */
body.dark-mode .table thead th,
body.bg-dark .table thead th {
    background-color: #343a40 !important; /* Cor escura para o fundo */
    color: #ffffff !important; /* Texto branco */
}

:root {
    --table-header-bg-light: #f8f9fa;
    --table-header-bg-dark: #343a40;
    --table-header-text-light: #212529;
    --table-header-text-dark: #ffffff;
}

[data-bs-theme="light"] .table th {
    background-color: var(--table-header-bg-light) !important;
    color: var(--table-header-text-light) !important;
}

[data-bs-theme="dark"] .table th {
    background-color: var(--table-header-bg-dark) !important;
    color: var(--table-header-text-dark) !important;
}

html[data-bs-theme="dark"] .table,
html[data-bs-theme="dark"] table {
    background-color: #2a2a2a !important;
    color: #ffffff !important;
    border-color: #444444 !important;
}

    html[data-bs-theme="dark"] .table th,
    html[data-bs-theme="dark"] .table td {
        background-color: #2a2a2a !important;
        color: #ffffff !important;
    }

    html[data-bs-theme="dark"] .table tbody tr:hover {
        background-color: #3a3a3a !important;
    }

.alimentos-selecionados {
    min-height: 40px;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.btn-remove-alimento {
    color: white !important;
    padding: 0 3px;
}

    .btn-remove-alimento:hover {
        color: #ffcccc !important;
    }

.ui-autocomplete {
    max-height: 200px;
    overflow-y: auto;
    overflow-x: hidden;
}

.select-group {
    display: flex;
    gap: 5px;
    align-items: center;
}

    .select-group select {
        flex: 1;
    }

.btn-remove {
    padding: 0 8px;
    line-height: 1.5;
}

.small-chart {
    width: 350px !important;
    height: 350px !important;
}

.chart-container {
    display: flex;
    justify-content: center; /* Centraliza horizontalmente */
    align-items: center; /* Centraliza verticalmente */
    height: 100%; /* Ajuste conforme necessário */
}

@media (max-width: 768px) {
    .hero-section1 {
        background-size: contain !important;
        background-position: center top !important;
        background-attachment: scroll !important;
        min-height: 300px;
    }
}

/* Permite seleção de texto no Select2 */
.select2-container--default .select2-selection--single {
    user-select: text !important;
    -webkit-user-select: text !important;
}

/* Melhora a visualização do texto selecionado */
.select2-selection__rendered {
    cursor: text !important;
}

.nav-link.active {
    font-weight: bold;
    color: #007bff !important; /* Cor azul Bootstrap */
}

/* Estilo para linhas com inputs focados */
.table-bordered tbody tr {
    position: relative;
    transition: all 0.3s ease;
}

    .table-bordered tbody tr:focus-within {
        background-color: #e3f2fd !important;
        outline: 2px solid #2196F3 !important;
        outline-offset: -2px;
    }

/* Estilo adicional para inputs */
.table-bordered tbody input:focus {
    z-index: 1; /* Garante que o input fique acima da outline da linha */
    position: relative;
}

/* Estilo de fallback */
.linha-focada {
    background-color: #e3f2fd !important;
    box-shadow: 0 0 0 2px #2196F3 inset;
}

/* Prioridade máxima para os estilos de destaque */
.table-bordered tbody tr:focus-within {
    background-color: #e3f2fd !important;
    outline: 2px solid #2196F3 !important;
    outline-offset: -2px;
}

.table-bordered td:focus-within {
    background-color: #fff3e0 !important;
    box-shadow: 0 0 0 2px #ff9800 inset !important;
    position: relative;
    z-index: 2;
}

.table-bordered input:focus {
    border-color: #ff9800 !important;
    box-shadow: 0 0 0 0.2rem rgba(255,152,0,.25) !important;
}

.label-destaque {
    background-color: rgba(227, 242, 253, 0.3); /* 30% opaco */
    color: #2196F3;
    font-weight: bold;
    padding: 0.2em;
    border-radius: 4px;
    transition: background-color 3.5s;
}

    .label-destaque:focus-within,
    .label-destaque.filled {
        background-color: rgba(4, 110, 46, 0.2); /* Verde com 20% de opacidade */
        border-color: rgba(4, 110, 46, 0.5); /* Borda em verde com 50% de opacidade */
    }

    .label-destaque.not-filled {
        border: 1px solid rgba(255, 0, 0, 0.5); /* Borda vermelha translúcida */
        background-color: rgba(255, 0, 0, 0.1); /* Fundo levemente avermelhado */
    }

/* Ajustes para o tema light */
[data-bs-theme="light"] .badge-success {
    background-color: #d4edda !important;
    color: #155724 !important;
    border: 1px solid #15572433;
}

[data-bs-theme="light"] .badge-danger {
    background-color: #f8d7da !important;
    color: #721c24 !important;
    border: 1px solid #721c2433;
}

[data-bs-theme="light"] .badge-secondary {
    background-color: #e2e3e5 !important;
    color: #383d41 !important;
    border: 1px solid #383d4133;
}

[data-bs-theme="light"] .table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(248, 249, 250, 0.9) !important;
}

[data-bs-theme="light"] .table-striped tbody tr:nth-of-type(even) {
    background-color: rgba(255, 255, 255, 0.9) !important;
}

[data-bs-theme="light"] .table th {
    background-color: #f8f9fa !important;
    color: #212529 !important;
}

[data-bs-theme="light"] .table-bordered,
[data-bs-theme="light"] .table-bordered td,
[data-bs-theme="light"] .table-bordered th {
    border-color: #dee2e6 !important;
}

.badge {
    font-weight: 600 !important;
    min-width: 80px;
    border-radius: 20px;
    padding: 0.5em 1em;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

/* Estilos para os badges de comparação */
[data-bs-theme="light"] .bg-positive {
    background-color: #d4edda !important;
    color: #155724 !important;
    border: 1px solid #15572433;
}

[data-bs-theme="light"] .bg-negative {
    background-color: #f8d7da !important;
    color: #721c24 !important;
    border: 1px solid #721c2433;
}

[data-bs-theme="light"] .bg-neutral {
    background-color: #e2e3e5 !important;
    color: #383d41 !important;
    border: 1px solid #383d4133;
}

[data-bs-theme="dark"] .bg-positive {
    background-color: rgba(40, 167, 69, 0.2) !important;
    color: #28a745 !important;
    border: 1px solid #28a745;
}

[data-bs-theme="dark"] .bg-negative {
    background-color: rgba(220, 53, 69, 0.2) !important;
    color: #dc3545 !important;
    border: 1px solid #dc3545;
}

[data-bs-theme="dark"] .bg-neutral {
    background-color: rgba(108, 117, 125, 0.2) !important;
    color: #6c757d !important;
    border: 1px solid #6c757d;
}

/* Ajuste para tabelas no tema escuro */
html[data-bs-theme="dark"] .table-info {
    background-color: #04364d !important;
    color: #ffffff !important;
}

html[data-bs-theme="dark"] .table-hover tbody tr:hover {
    background-color: #3a3a3a !important;
}




.alimento-card {
    position: relative;
    cursor: pointer;
    transition: all 0.3s;
    height: 200px;
    background-color: rgba(255, 255, 255, 0.1); /* Ajuste a transparência (0.8 é 80% de opacidade) */
    transition: background-color 0.3s ease;
}

    .alimento-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 20px rgba(0,0,0,0.1) !important;
         background-color: rgba(255, 255, 255, 0.1); /* Um pouco menos transparente ao passar o mouse */
    }

@media (max-width: 768px) {
    .alimento-card {
        height: 150px;
        margin-bottom: 15px;

    }



    /* Estilos base e responsivos */
    body {
        background: var(--bs-body-bg);
        font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    }

    .container {
        max-width: 960px;
        margin: auto;
    }

    /* Cabeçalho do jogo */
    .jogo-header {
        background: #343a40;
        color: #fff;
        padding: 20px;
        border-radius: 8px;
        box-shadow: 0 8px 16px rgba(0,0,0,0.2);
        margin-bottom: 30px;
    }

    html[data-bs-theme="light"] .jogo-header {
        background: #007bff;
    }

    .jogo-header h1 {
        font-size: 2.5rem;
    }

    .jogo-header p {
        font-size: 1.2rem;
    }

    /* Cards dos alimentos */
    .alimento-card {
        cursor: pointer;
        transition: transform 0.3s, box-shadow 0.3s;
        border: none;
        border-radius: 12px;
        background: var(--bs-body-bg);
        padding: 20px;
        position: relative;
        height: 200px;
    }

    @media (max-width: 768px) {
        .alimento-card {
            height: 150px;
            margin-bottom: 15px;
        }
    }

    .alimento-card:hover {
        transform: scale(1.03);
        box-shadow: 0 12px 24px rgba(0,0,0,0.2);
    }

    .alimento-card h2 {
        font-weight: 700;
        margin-bottom: 10px;
    }

    .valor-nutriente h4 {
        font-size: 1.4rem;
        margin-bottom: 0;
    }

    .valor-nutriente p {
        font-size: 0.9rem;
    }

    /* Definição global para a badge "100g" */
    .badge-info {
        position: absolute;
        top: 10%; /* 10% a partir do topo do card */
        right: 10%; /* 10% a partir da direita do card */
        width: 2.5rem;
        height: 2.5rem;
        line-height: 2.5rem;
        border-radius: 50%;
        background: #ffc107;
        color: #212529;
        font-weight: bold;
        font-size: 0.9rem;
        text-align: center;
        z-index: 10;
    }



    .btn-group .btn {
        min-width: 120px;
    }
    /* Indicador de seleção, com ajuste para dark */
    .selected-indicator {
        position: absolute;
        bottom: -15px;
        left: 50%;
        transform: translateX(-50%);
        background: #17a2b8;
        color: #fff;
        padding: 3px 8px;
        border-radius: 12px;
        font-size: 0.8rem;
        font-weight: bold;
        box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    }

    html[data-bs-theme="dark"] .selected-indicator {
        background: #28a745;
    }

    /* Animação para chamar atenção ao texto "MENOS" */
    @keyframes blink {
        0%, 100% {
            color: #ffc107;
        }

        50% {
            color: inherit;
        }
    }

    .blink-animation {
        animation: blink 1s linear infinite;
    }
}




/* Definição global para a badge "100g" */
.badge-info {
    position: absolute;
    top: 10%; /* 10% a partir do topo do card */
    right: 10%; /* 10% a partir da direita do card */
    width: 2.5rem;
    height: 2.5rem;
    line-height: 2.5rem;
    border-radius: 50%;
    background: #ffc107;
    color: #212529;
    font-weight: bold;
    font-size: 0.9rem;
    text-align: center;
    z-index: 10;
}



.btn-group .btn {
    min-width: 120px;
}
/* Indicador de seleção, com ajuste para dark */
.selected-indicator {
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: #17a2b8;
    color: #fff;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: bold;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

html[data-bs-theme="dark"] .selected-indicator {
    background: #28a745;
}

/* Animação para chamar atenção ao texto "MENOS" */
@keyframes blink {
    0%, 100% {
        color: #ffc107;
    }

    50% {
        color: inherit;
    }
}

.blink-animation {
    animation: blink 1s linear infinite;
}


.versus-badge {
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

@media (min-width: 992px) {
    .versus-badge {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        background-color: rgba(255,255,255,0.8);
        border-radius: 50%;
        width: 80px;
        height: 80px;
        box-shadow: 0 0 15px rgba(0,0,0,0.2);
    }
}

/* No arquivo site.css */
.row.g-0.mb-4 {
    position: relative; /* Permite posicionamento absoluto relativo a este container */
    min-height: 300px; /* Garante espaço para o VS */
}


/* Estado inicial: invisível */
.fade {
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

    /* Estado ativo: visível */
    .fade.show {
        opacity: 1;
    }


