* {
    box-sizing: border-box;
    font-family: "Oxygen", sans-serif;
    margin: 0;
    padding: 0;
}

:root {
    --color-background: #030207; 
    --color-white: #ffffff;      
    --color-blue: #052d6d;      
    --color-light-blue: #168BF2;
    --color-yellow: #fac34f;    
}

body {
    background-color: var(--color-background);
    color: var(--color-white);
    /*transition: background-color 0.5s ease, color 0.3s ease;*/
}

/* ==========================================
   2. DEFINIÇÃO DO MODO CLARO
   ========================================== */
body.modo-claro {
    --color-background: #f4f4f9;
    --color-white: #333333;     
    --color-blue: #ffffff;      
    --color-light-blue: #0d6efd; 
}

/* Ajustes visuais específicos para o Modo Claro */
body.modo-claro .topbar {
    background-color: #ffffff;
    color: #333333;
    border-bottom: 1px solid #ddd;
}

body.modo-claro .card-acessibilidade {
    background-color: #ffffff;
    color: #333333;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

body.modo-claro .logo, 
body.modo-claro .hamburger, 
body.modo-claro .theme-toggle {
    color: var(--color-light-blue); /* Muda ícones e logo para azul no modo claro */
}

/* ESTILO DO BOTÃO DE TEMA (SOL/LUA)*/
.theme-toggle {
    margin-left: auto;
    margin-right: 20px;
    cursor: pointer;
    font-size: 1.4rem;
    color: var(--color-yellow);
    transition: transform 0.3s ease, color 0.3s ease;
    display: flex;
    align-items: center;
    z-index: 4000;
}

.theme-toggle:hover {
    transform: scale(1.2); 
}

/*4. MODO ALTO CONTRASTE */
body.alto-contraste {
    --color-background: #000000;
    --color-white: #ffffff;
    --color-blue: #000000;
    --color-light-blue: #ffff00;
    --color-yellow: #ffff00;
}

body.alto-contraste .topbar {
    background-color: #000000;
    border-bottom: 3px solid #ffff00;
}

body.alto-contraste .theme-toggle {
    color: #ffff00;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--color-blue);
    color: white;
    padding: 15px 20px;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 3000;
}

/* Esconde o seletor de tema antigo na tela de configurações */
.config-page .config-item:has(#check-tema) {
    display: none;
}


body.alto-contraste {
    --color-background: #000000;
    --color-white: #ffffff;
    --color-blue: #000000;
    --color-light-blue: #ffff00;
    --color-yellow: #ffff00;
}

body.alto-contraste .menu {
    background-color: #000000;
}

body.alto-contraste .menu a {
    color: #ffff00;
}

body.alto-contraste .menu a:hover {
    background-color: #ffff00;
    color: #000000;
}

body.alto-contraste .nav_links a {
    background-color: #000000;
    color: #ffff00;
    border: 2px solid #ffff00;
}
.saudacao {
    color: var(--color-highlight);
    margin-top: 20px;
    line-height: 1.2;
}

.vinculo-badge {
    display: inline-block;
    background-color: rgba(22, 139, 242, 0.1);
    color: var(--color-light-blue);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: normal;
    margin-top: 8px;
    border: 1px solid rgba(22, 139, 242, 0.3);
}

body.modo-claro .vinculo-badge {
    background-color: rgba(13, 110, 253, 0.05);
    color: #0d6efd;
    border-color: rgba(13, 110, 253, 0.2);
}

body.alto-contraste .vinculo-badge {
    background-color: #000;
    color: #ffff00;
    border: 2px solid #ffff00;
}

body.alto-contraste .saudacao {
    color: #ffff00;
}

.container-central{
    display:flex;
    justify-content:center;
    align-items:center;
    min-height:100vh;
    padding:100px 20px 40px;
}

.card-acessibilidade{
    background-color:var(--color-blue);
    border:2px solid var(--color-light-blue);
    border-radius:15px;
    padding:2.5rem;
    width:100%;
    max-width:500px;
    text-align:center;
}

.divider {
    border: 0;
    height: 1px;
    background: var(--color-light-blue);
    margin: 1.5rem 0;
}

.config-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.control {
    display: flex;
    align-items: center;
    gap: 10px;
}

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: var(--color-light-blue);
}

input:checked+.slider:before {
    transform: translateX(26px);
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--color-blue);
    color: white;
    padding: 15px 20px;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 3000;
}

body.alto-contraste .topbar {
    background-color: #000000;
    border-bottom: 3px solid #ffff00;
}

.nav_links {
    display: flex;
    justify-content: center;
    list-style: none;
    margin: 0;
}

.nav_links a {
    padding: 0.5rem 1rem;
    margin-right: 30px;
    color: var(--color-white);
    text-decoration: none;
    background-color: var(--color-light-blue);
    border-radius: 10px;
    display: inline-block;
    position: relative;
    z-index: 1;
    transition: 0.3s;
}

body.alto-contraste .nav_links a {
    background-color: #000000;
    color: #ffff00;
    border: 2px solid #ffff00;
}

.nav_links a::after {
    content: "";
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 80%;
    height: 2px;
    background: var(--color-white);
    transition: transform 0.3 ease;
    transform-origin: center;
    z-index: 1;
}

.nav_links a:hover::after {
    transform: translateX(-50%) scaleX(1);
}

.logo {
    font-weight: bold;
    color: var(--color-yellow);
    text-decoration: none;
}

.logo_img {
    transition: 0.3s ease-in-out;
}

.logo_img:hover {
    transform: scale(1.1);
}

.hamburger {
    cursor: pointer;
    position: relative;
    z-index: 5000;
    padding: 10px;
    color: var(--color-yellow);
    font-weight: bolder;
}


body.alto-contraste .hamburger {
    color: #ffff00;
}

.accessibility-tools {
    margin-left: auto;
    margin-right: 20px;
    display: flex;
    gap: 10px;
}
.accessibility-tools button {
  padding: 5px 10px;
  cursor: pointer;
  font-weight: bold;
}

/* Menu lateral */
.menu {
    position: fixed;
    top: 0;
    right: -260px;
    /* Escondido */
    width: 250px;
    height: 100vh;
    background-color: var(--color-light-blue);
    display: flex;
    flex-direction: column;
    transition: right 0.3s ease-in-out;
    z-index: 6000
}

.menu.active {
    right: 0
}

.menu a {
    color: white;
    text-decoration: none;
    padding: 15px 20px;
    transition: 0.3s ease-in-out;
}

.menu a:hover {
    background-color: var(--color-blue);
    color: var(--color-yellow);
    transform: scale(1.2);
}

.logout {
    margin-top: auto;
    background-color: #c0392b;
}

/* Estilos para a Foto de Perfil no Menu Lateral */

.profile-container {
    border-radius: 20px;
    padding: 40px;
    max-width: 400px;
    width: 100%;
    text-align: center;
}
.profile-pic-wrapper {
    position: relative;
    display: inline-block;
    margin-bottom: 20px;
}

.profile-pic {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #667eea;
    display: block;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #f5f5f5;
}

.profile-pic:hover {
    border-color: #764ba2;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    transform: scale(1.08);
}

.profile-pic:active {
    transform: scale(0.95);
}

/* Dica de clique */
.click-hint {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background-color: #667eea;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    opacity: 0;
    animation: fadeInOut 3s ease-in-out infinite;
    pointer-events: none;
}


.profile-pic-wrapper:hover .click-hint {
    animation: none;
    opacity: 1;
}

/* Feedback messages */
.feedback {
    display: none;
    margin-top: 20px;
    padding: 14px 20px;
    border-radius: 10px;
    font-weight: 500;
    animation: slideIn 0.3s ease;
}

.feedback.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.feedback.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.feedback.loading {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.profile-pic-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.profile-pic {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease-in-out, filter 0.3s ease-in-out;
    cursor: pointer;
    background-color: #168BF2; /* Cor de fundo caso a imagem falhe */
}

.profile-pic:hover {
    transform: scale(1.1);
    filter: brightness(0.8);
}

.profile-pic-label {
    position: absolute;
    bottom: 15px;
    right: 75px; /* Ajustado para centralizar melhor com a foto de 80px */
    width: 30px;
    height: 30px;
    background-color: var(--color-yellow);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 16px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease-in-out, background-color 0.2s ease-in-out;
    border: 2px solid white;
}

.profile-pic-label:hover {
    transform: scale(1.15);
    background-color: #f0b83f;
}

.upload-icon {
    display: flex;
    justify-content: center;
    align-items: center;
}

.closebtn {
    position: relative;
    top: 10px;
    right: 0;
    font-size: 36px;
    line-height: 1;
    padding: 0;
    background: transparent;
    color: white;
    cursor: pointer;
    z-index: 4001;
}

a {
    color: var(--color-blue);
}

.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.1), var(--color-background));
    /*o "a" do rgba é de ALFA, a tranparência de um objeto*/
    position: relative;
    min-height: 100vh;
}

.hero__background {
    object-fit: contain; /*Usar cover para não esticar a imagem */
    position: absolute;
    object-position: center;
    top: 0;
    /*Garantir que vai estar no topo*/
    height: 100vh;
    width: 100%;
    inset: 0;
    /*Profundidade*/
    z-index: -10;
    opacity: 0.3;
}

.hero__foreground,
.hero__foreground_monitor,
.hero__foreground_campo {
    color: var(--color-white);
    text-align: center;
    padding-top: 35vh;
}

.hero__foreground_monitor {
    padding-top: 10vh;
}

.hero__foreground_campo{
    padding-top: 20vh;
}

.hero__title {
    font-size: 5rem;
    font-weight: 300;
}

.hero__text {
    margin-top: 3rem;
    letter-spacing: 0.5rem;
    text-transform: uppercase;
    font-weight: bold;
    font-size: x-large;
    color: var(--color-yellow);
}

body.modo-claro .hero__text {
    color: var(--color-light-blue);
}

.section {
    /* controlar o transbordamento, quando os elementos filhos são maiores que o pai, Agora para calcular o tamanho da seção, considera-se até mesmo a imagem que e maior do que a própria seção */
    overflow: hidden;
    /*O hidden esconde/oculta a barra de rolagem*/
    padding: 0 8rem;
    /*vertical 0 horizontal 8rem*/
    text-align: center;
}

.section__title {
    font-size: 3rem;
    font-weight: 300;
    margin: 4rem auto;
}

.section_title_usuario {
    background-color: rgb(105, 105, 105);
    border-radius: 5px;
}

.section__img,
.section__img-inline {
    border-radius: .75rem;
    /* eixo x, eixo y, blur(embaçado, borrado), -expansão +recuo da sombra cor */
    box-shadow: 0 1rem 2rem -0.5 rgba(20, 116, 180, 0.25);
    object-fit: cover;
    object-position: top;
    position: relative;
    max-height: 30rem;
    width: 100%;
    /*100% da largura da section*/
}

.section__text,
.section__text-inline {
    font-size: 1.25rem;
    line-height: 1.75;
    margin: 4rem auto;
    text-align: justify;
}

.section__img-inline {
    border-top-left-radius: 4rem;
    border-bottom-right-radius: 4rem;
    float: left;
    /*Flutuar a esquerda*/
    margin-right: 4rem;
    margin-bottom: 2rem;
    height: 25rem;
    width: 20rem;
}

.section__text-inline {
    margin-top: 6rem;
    text-align: left;
}

.section__text-inline>p {
    margin-top: 1.5rem;
}

/* CARD DA HOME.PHP */
/* Estrutura do Card */
.trigger-tracker {
    margin: 0 auto;
    background: var(--color-blue);
    border: 2px solid var(--color-light-blue);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin-bottom: 5rem;
    
    /* Estado Inicial: Quadrado */
    width: 150px;
    height: 150px;
}

/* Estado Expandido: Retângulo Horizontal */
.trigger-tracker.expanded {
    width: 320px;
    height: auto;
    min-height: 200px;
    cursor: default;
}

.title {
    font-weight: bold;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 15px;
}

/* Conteúdo que aparece ao expandir */
.content {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    width: 100%;
    text-align: center;
}

.expanded .content {
    display: block;
    opacity: 1;
}

/* Ícones */
.icons-row {
    display: flex;
    justify-content: space-around;
    margin: 20px 0;
}

.icon-btn {
    font-size: 30px;
    background: none;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 10px;
    cursor: pointer;
    transition: transform 0.2s/*, background 0.2s*/;
}

.icon-btn:hover {
    transform: scale(1.1);
    background: #f0f0ff;
}

/* Área de Resultado */
#advice-area {
    margin-top: 15px;
    padding: 10px;
    font-size: 0.9rem;
    color: var(--color-white);
    border-top: 1px dashed var(--color-light-blue);
}

body.modo-claro #advice-area {
    color: #333;
}

.text-muted {
    color: #bbb !important;
}

body.modo-claro .text-muted {
    color: #555 !important;
}

#hangouts img {
    object-position: center;
}

.gallery__img {
    border-radius: .75rem;
    height: 16rem;
    width: 16rem;
    object-fit: cover;
    transform: rotate(-2deg);
    /* deg = degress */
}

.gallery__img-wrapper {
    position: relative;
    display: inline-block;
}

.gallery__img-wrapper+.gallery__img-wrapper {
    margin-left: 3rem;
    margin-top: 3rem;
}

.gallery__img-wrapper:nth-child(even)>.gallery__img {
    top: 1rem;
    transform: rotate(2deg);
}

.gallery__img-wrapper::after {
    content: "";
    height: 1.25rem;
    width: 1.25rem;
    background-color: rgb(228, 26, 26);
    border-radius: 999px;
    display: block;
    position: absolute;
    top: 0.25rem;
    right: 1rem;
}

.gallery__img-wrapper:nth-child(even)::after {
    left: 1rem;
}

.erro{
    background:#ffe5e5;
    color:#a10000;
    border:1px solid #ffb3b3;
    padding:10px;
    border-radius:6px;
    margin-bottom:15px;
    font-size:14px;
    text-align:center;
    width: 500px;
    left: 33rem;
    position: relative;
    transition: opacity 0.5s;
}

.campo{
    position: relative;
    width: 300px;
    margin: 15px auto; /* centraliza horizontalmente */
    top: 70px;
}

.campo_botao:hover{
    background-color: var(--color-yellow);
}

.campo input{
    width: 100%;
    padding: 10px;
    padding-right: 40px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 14px;
}

.campo input:focus,
.campo input:hover
{
    outline: none;
    border-color: #8B0000;
    box-shadow: 0 0 5px rgba(139,0,0,0.3);
}

.icone{
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #777;
    cursor: pointer;
    transition: 0.3s;
}

.icone:hover{
    color: #000;
}

.footer {
    margin-top: 4rem;
    padding: 2rem;
    text-align: center;
}

/* ===== RESPONSIVIDADE GLOBAL ===== */

img{
    max-width:100%;
    height:auto;
}

input, select, textarea{
    width:100%;
    padding:10px;
    border-radius:8px;
    border:none;
}

button{
    padding:10px 18px;
    border-radius:8px;
    border:none;
    cursor:pointer;
}

h1,h2,h3{
    line-height:1.2;
}

p{
    line-height:1.5;
}

/* ============================= */
/*           TABLETS             */
/* ============================= */

@media (max-width:1024px){
    
    .container-central{
        padding-top:120px;
    }

    .nav_links{
        gap:10px;
    }

    .campo{
        width:80%;
    }

    .botao{
        width:80%;
    }

    .card-acessibilidade{
        max-width:450px;
        padding:2rem;
    }

    .section {
        padding: 0 2rem;
    }

}


/* ============================= */
/*           CELULARES           */
/* ============================= */

@media (max-width: 768px) {
    .topbar {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between; 
        align-items: center;
        padding: 10px 20px;
        height: auto;
        min-height: 70px; 
        position: fixed;
        top: 0;
        width: 100%;
        z-index: 3000;
    }

    .logo {
        flex: 0 0 auto;
        text-align: left;
        font-size: 1.2rem;
    }

    .accessibility-tools {
        margin-left: 0;
        display: flex;
        gap: 5px;
    }
    
    .accessibility-tools button {
        padding: 5px 8px;
        font-size: 0.8rem;
    }

    .theme-toggle, 
    .hamburger {
        flex: 0 0 auto;
        margin: 0 5px;
    }

    .hero__foreground,
    .hero__foreground_monitor,
    .hero__foreground_campo {
        padding-top: 20vh;
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .hero__title {
        font-size: 2.5rem; /* Diminui o título no mobile para não quebrar */
    }

    .hero__text {
        font-size: 1.2rem;
        letter-spacing: 0.2rem;
    }

    .section {
        padding: 0 1.5rem;
    }

    .section__title {
        font-size: 2rem;
        margin: 2rem auto;
    }

    .section__img-inline {
        float: none;
        margin-right: 0;
        width: 100%;
        height: auto;
        margin-bottom: 1.5rem;
    }

    .section__text,
    .section__text-inline {
        font-size: 1.1rem;
        margin: 2rem auto;
        text-align: justify;
    }

    .gallery__img-wrapper {
        display: block;
        margin: 1rem auto;
    }

    .gallery__img-wrapper+.gallery__img-wrapper {
        margin-left: 0;
        margin-top: 1rem;
    }

    .gallery__img {
        width: 100%;
        height: auto;
    }

    .erro {
        width: 90%;
        left: 0;
        margin: 0 auto 15px;
    }

    .campo {
        width: 90%;
        top: 40px;
    }

    .hero__foreground_monitor, 
    .container-central,
    main { 
        padding-top: 80px;
    }

    .saudacao {
        display: block;
        margin-top: 20px;
        font-size: 1.2rem;
        text-align: center;
        width: 100%;
    }
}

.grafico-container {
    position: relative;
    margin: auto;
    height: 50vh;
    width: 90vw;  
    max-width: 1000px; 
}

@media (max-width: 600px) {
    .grafico-container {
        height: 40vh;
        width: 95vw;
    }
}

/* Ajuste extra para telas muito pequenas*/
@media (max-width: 400px) {
    .hero__title {
        font-size: 2rem;
    }
    .logo {
        font-size: 1rem;
    }
}

@keyframes fadeInOut {
    0%, 100% {
        opacity: 0;
        transform: translateY(5px);
    }
    50% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsivo Perfil */
@media (max-width: 600px) {
    .profile-container {
        padding: 20px 10px;
    }

    .profile-pic {
        width: 120px;
        height: 120px;
    }
}