body {
    background-image: url("./assets/fundo.png");
    color: white;
    overflow-x: hidden;
}

body *, :root {
    font-family: "Inter";
    line-height: 160%;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

header {
    padding-top: 32px;
    text-align: center;
    height: 250px;
    justify-content: center;
    animation-name: appear;
    animation-duration: 1s;
    animation-fill-mode: forwards;
    align-items: center;
}

header img {
    width: 15rem;
}

main {
    max-width: 36rem;
    width: 90%;
    margin: 0.8rem auto;
}

section {
    padding-top: 10px;
    border-radius: 0.625rem;
    background-image: linear-gradient(90deg, red 0%, blue 50%, green 100%);
    margin-top: 17rem;
}

section > div {
    padding: 2rem;
    padding-top: 1.5rem;
    border-radius: 0.5rem;
    background-color: #2A2634;

}

section h2 {
    letter-spacing: -0.47px;
}

section p {
    letter-spacing: -0.18px;
    color: #A1A1AA;
}

/*Animações*/
main section {
    opacity: 0;
    transform: translateY(2rem);

    animation-name: appear;
    animation-duration: 1s;
    animation-fill-mode: forwards;
}

@keyframes appear {
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

form {
    display: flex;
    gap: 0.85rem;
    flex-wrap: wrap;
    margin: 1.25rem 0;
}

#questionInput {
    all: unset;
    border: 2px solid #9147FF;
    border-radius: 0.5rem;
    padding: 0.675rem;
    font-size: 0.875rem;
    background-color: #00000066;
    width: 100%;
}

#apiKey {
    flex: 1;
    all: unset;
    border: 2px solid #9147FF;
    border-radius: 0.5rem;
    padding: 0.675rem;
    font-size: 0.875rem;
    background-color: #00000066;
    width: 100%;
}

#askButton {
    width: 100%;
    border: 0;
    padding: 0.675rem;
    border-radius: 0.5rem;
    font-weight: bold;
    color: white;
    letter-spacing: 0.12px;
    text-transform: uppercase;
    transition: all 0.3s;
    background-image: linear-gradient(90deg, red 0%, blue 50%, green 100%);
    margin-top: 1rem;
}

button:hover {
    cursor: pointer;
    transform: translateY(-2px);
    box-shadow: 0 5px 1rem rgba(255, 248, 107, 0.2);
}

button:disabled {
    transition: none;
    transform: translate(0);
    box-shadow: initial;
    cursor: not-allowed;
    background-image: linear-gradient(90deg, gray 0%, rgb(80, 80, 80) 50%, rgb(148, 148, 148) 100%);
}

.loading {
    background-image: linear-gradient(90deg, gray 0%, rgb(80, 80, 80) 50%, rgb(148, 148, 148) 100%);
    animation: pulse 1s infinite;
}

@keyframes pulse {
    50% {
        opacity: 0.5;
    }
}

#aiResponse {
    background: rgba( 0, 0, 0, 0.4);
    border-radius: 0.5rem;
    padding: 1.25rem;
    border-left: 4px solid #43E7AD;
}

#aiResponse ul {
    padding-left: 1.25rem;
    opacity: 0.8;
}

#aiResponse p {
    color: white;
}

.hidden {
    display: none;
}

.response-content {
  max-width: 100%;
  overflow-wrap: break-word;
  word-break: break-word;
  overflow-x: auto;
}

.response-content::-webkit-scrollbar {
  height: 8px; /* altura do scroll horizontal */
  width: 8px;  /* largura do scroll vertical (se tiver) */
}

.response-content::-webkit-scrollbar-track {
  background: transparent;
}

.response-content::-webkit-scrollbar-thumb {
  background-color: #555;    /* a cor da barrinha */
  border-radius: 4px;
}

.response-content::-webkit-scrollbar-thumb:hover {
  background-color: #888;
}

.info {
    background-color: #2A2634;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-top: 0;
    margin-left: 1.3rem;
}

.info-detail {
    background-image: linear-gradient(90deg, rgb(0, 0, 0) 0%, blue 50%, green 100%);
    height: 0.5rem; /* 🔥 só uma faixinha fina */
    width: 100%;
    border-radius: 0.5rem 0.5rem 0 0;
    position: relative;
    top: 0;
    margin-top: 1rem;
    
    transform: translateY(2rem);
    animation: appear 1s forwards;
    position: relative;
}

/* Responsivo para telas menores */
@media (max-width: 768px) {
  .info {
    max-width: 95%;
    margin-bottom: 3.5rem; /* dá mais espaço antes do bloco abaixo */
  }

  .info-detail {
    width: 95%;
    margin-top: -0.5rem; /* ajusta a posição da faixa */
  }
}

.logo {
    font-family: monospace;
    font-size: 2.2rem;
    color: rgb(255, 115, 0);
    background-color: #2A2634;
    border-radius: 0 0 0.5rem 0.5rem; /* arredonda embaixo */
    padding: 0.4rem 1rem;
    position: relative;
    top: -0.4rem; /* 🔥 encosta o texto na barrinha */
    text-align: center;
    max-width: 15rem;
    margin: 0 auto 1rem auto;
    animation: appear 1s forwards;
}

.logo-part {
    color: #4a47ff;
}

.logo-detail {
    background-image: linear-gradient(90deg, red 0%, blue 50%, green 100%);
    height: 0.8rem; /* 🔥 diminui a faixa colorida */
    width: 100%;
    border-radius: 0.5rem 0.5rem 0 0; /* só arredonda em cima */
    margin: 0 auto 5px auto;
    opacity: 0;
    transform: translateY(2rem);
    animation: appear 1s forwards;
    position: relative;
}

/* --- Responsividade --- */
@media (max-width: 768px) {
    .logo {
        font-size: 2rem;
        margin-top: 1rem;
    }

    .logo-detail {
        max-width: 80%;
        margin-left: auto;
        margin-right: auto;
        padding-top: 0.4rem;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 1.7rem;
    }

    .logo-detail {
        max-width: 90%;
        padding-top: 0.3rem;
    }
}


.logo-img {
    transform: translateY(2rem);

    animation-name: appear;
    animation-duration: 1s;
    animation-fill-mode: forwards;
}

.sobre-container {
  margin-top: 20px;
  text-align: center;
  color: white;
}

.toggle-btn {
  background-color: transparent;
  border: none;
  color: white;
  font-size: 1.2em;
  cursor: pointer;
  transition: transform 0.3s ease;
}

#conteudo-sobre {
  margin-top: 10px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease;
  opacity: 0;
}

#conteudo-sobre.ativo {
  max-height: 200px; /* Ajuste conforme o conteúdo */
  opacity: 1;
}

#seta {
  display: inline-block;
  transition: transform 0.3s ease;
}

.rotacionado {
  transform: rotate(180deg);
}

#sobre {
    width: 100%;
    border: 0;
    padding: 0.675rem;
    border-radius: 0.5rem;
    font-weight: bold;
    color: white;
    letter-spacing: 0.12px;
    text-transform: uppercase;
    transition: all 0.3s;
    background-color: limegreen;
}

/* Para navegadores baseados em WebKit (Chrome, Edge, Opera) */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #1a1a1a; /* cor do fundo da barra */
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, #ff0044, #5500ff); /* o "botão" da barra */
  border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(to bottom, #ff4488, #7755ff);
}

.container {
  max-width: 100%;
  width: 100%;
  margin: 0 auto;
  text-align: center;
}