body {
  background: #070b12;
  font-family: Arial, sans-serif;
}

/* ===============================
   MOBILE FIRST — ESTRUTURA ORIGINAL
================================ */
#chat-container {
  width: 100%;
  height: 95svh;            /* viewport real mobile */
  aspect-ratio: 9 / 16;     /* FORÇA PORTRAIT */
  margin: 0;
  background: rgba(12, 16, 24, 0.92);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(0, 246, 255, 0.15);
}

/* Desktop correction — ORIGINAL */
@media (min-width: 600px) {
  #chat-container {
    max-width: 360px;
    aspect-ratio: 9 / 16;   /* mantém proporção */
    height: auto;
    margin: 30px auto;
    border-radius: 12px;
    box-shadow: 0 0 40px rgba(0,0,0,0.8);
  }
}

#input-area {
  margin-top: auto;
}

/* ===============================
   HEADER — HUD SKIN
================================ */
#chat-header {
  display: flex;
  align-items: center;
  padding: 6px 10px;   /* ↓ vertical menor */
  gap: 10px;

  background: linear-gradient(
    90deg,
    rgba(0, 246, 255, 0.25),
    rgba(255, 42, 138, 0.25)
  );
  color: #eaf6ff;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

#chat-header img {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.25);
}

#chat-header span {
  font-size: 16px;
  letter-spacing: 0.5px;
}

/* ===============================
   CHAT — ESTRUTURA ORIGINAL
================================ */
#chat {
  flex: 1 1 auto;      /* ocupa todo o espaço disponível */
  min-height: 0;       /* MUITO IMPORTANTE para o scroll */
  overflow-y: auto;
  padding: 0;

  background-image: url("media/fundo.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}


/* ===============================
   MESSAGE BUBBLES — MESMA LÓGICA
================================ */
.bubble {
  max-width: 75%;
  margin: 6px 0;
  padding: 10px;
  border-radius: 12px;
  font-size: 14px;

  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.bubble:first-child {
  margin-top: 0;   /* 🔥 remove o empurrão visual */
}


/* User */
.me {
  margin-left: auto;
  background: linear-gradient(
    135deg,
    rgba(255, 42, 138, 0.95),
    rgba(180, 0, 90, 0.95)
  );
  color: #fff;
  box-shadow: 0 0 14px rgba(255,42,138,0.35);
}

/* Other / AI */
.her {
  background: rgba(20, 26, 38, 0.85);
  color: #e0ecff;
  box-shadow: inset 0 0 0 1px rgba(0,246,255,0.12);
}

/* Images inside bubble — ORIGINAL */
.bubble img {
  width: 100%;
  border-radius: 10px;
  margin-top: 5px;
}

/* ===============================
   INPUT AREA — HUD SKIN
================================ */
#input-area {
  display: flex;
  background: rgba(15, 20, 30, 0.95);
  border-top: 1px solid rgba(0,246,255,0.25);
}

#input-area input {
  flex: 1;
  padding: 10px;
  background: transparent;
  border: none;
  outline: none;
  color: #eaf6ff;
}

#input-area button {
  width: 50px;
  background: transparent;
  border: none;
  border-left: 1px solid rgba(255,42,138,0.45);
  color: #ff2a8a;
  font-size: 18px;
  cursor: pointer;
}

/* ===============================
   TYPING INDICATOR — ORIGINAL
================================ */
.typing {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
}

.typing span {
  width: 6px;
  height: 6px;
  background: #8aa0b8;
  border-radius: 50%;
  margin: 0 2px;
  animation: blink 1.4s infinite both;
}

.typing span:nth-child(2) { animation-delay: .2s; }
.typing span:nth-child(3) { animation-delay: .4s; }

@keyframes blink {
  0% { opacity: .2; }
  20% { opacity: 1; }
  100% { opacity: .2; }
}

#chat-header span {
  flex: 1; /* nome ocupa o espaço central */
}

/* ===============================
   TIP BUTTON — HEADER
================================ */
#tip-button {
  background: rgba(255, 42, 138, 0.18);
  border: 1px solid rgba(255, 42, 138, 0.45);
  color: #ff2a8a;
  font-size: 16px;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;

  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);

  transition: all 0.2s ease;
}

#tip-button:hover {
  background: rgba(255, 42, 138, 0.35);
  box-shadow: 0 0 12px rgba(255,42,138,0.5);
  transform: scale(1.05);
}

#tip-button:active {
  transform: scale(0.95);
}

/* ===============================
   PREMIUM BUTTON — HEADER
================================ */

#premium-button,
#tip-button {
  background: rgba(255, 42, 138, 0.18);
  border: 1px solid rgba(255, 42, 138, 0.45);
  color: #ff2a8a;
  font-size: 16px;
  padding: 6px 10px;
  border-radius: 8px;
  text-decoration: none;
  cursor: pointer;
}

#premium-button:hover,
#tip-button:hover {
  background: rgba(255, 42, 138, 0.35);
}

