/* ==== BASE ==== */
html, body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', sans-serif;
  background: url("images/lisbon-hillside-o_palsson-3624468931_872fccafc3_o-2.jpg") no-repeat center center fixed;
  background-size: cover;
  color: #1F2937;
}

/* body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.2);
  z-index: -1;
} */

/* ==== CONTAINER ==== */
#chat-container {
  width: 100%;
  max-width: 900px;
  height: 80vh;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(6px);
  border: 1px solid #E5E7EB;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.04);
  display: flex;
  flex-direction: column;
  margin: 40px auto;
  overflow: hidden;
  transition: box-shadow 0.2s ease;
}

#chat-container:hover {
  box-shadow: 0 8px 30px rgba(0,0,0,0.06);
}

/* ==== HEADER ==== */
#header {
  padding: 20px;
  border-bottom: 1px solid #E5E7EB;
}

#header h1 {
  margin: 0;
  font-size: 20px;
  color: #5B21B6;
  font-weight: 800;
}

#header p {
  margin: 5px 0 0;
  color: #6B7280;
  font-size: 14px;
}

/* ==== STARTER PROMPTS ==== */
#starter-prompts {
  padding: 10px 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.prompt-btn {
  background: #EDE9FE;
  color: #7C3AED;
  border: none;
  padding: 8px 14px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s ease;
}

.prompt-btn:hover {
  background: #DDD6FE;
  color: #EC4899;
}

/* ==== CHAT WINDOW ==== */
#chat-window {
  flex-grow: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  background: #FFFFFF;
  transition: opacity 0.2s ease;
}

/* ==== MESSAGES ==== */
.message {
  margin: 10px 0;
  padding: 12px 16px;
  border-radius: 14px;
  max-width: 70%;
  font-size: 15px;
  line-height: 1.5;
  white-space: pre-wrap;
}

/* USER */
.user {
  background: #DBEAFE;
  color: #2563EB;
  margin-left: auto;
  border-radius: 20px;
}

/* ASSISTANT */
.assistant {
  background: transparent;
  color: #1F2937;
  margin-right: auto;
}

/* LINKS */
.message.assistant a {
  color: #2563EB;
  text-decoration: none;
}

.message.assistant a:hover {
  text-decoration: underline;
}

/* === CURSOR === */
.cursor {
  display: inline-block;
  margin-left: 2px;
  animation: blink 1s infinite;
}

@keyframes blink {
  0%, 50%, 100% { opacity: 1; }
  25%, 75% { opacity: 0; }
}

/* ==== FORM ==== */
form {
  display: flex;
  gap: 10px;
  padding: 16px;
  border-top: 1px solid #E5E7EB;
  background: #FFFFFF;
}

#user-input {
  flex-grow: 1;
  padding: 14px;
  border-radius: 8px;
  border: 1px solid #D1D5DB;
  font-size: 14px;
  outline: none;
}

#user-input::placeholder {
  color: #9CA3AF;
}

/* BUTTON */
button {
  background: linear-gradient(135deg, #2563EB, #EC4899);
  color: white;
  border: none;
  padding: 14px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(236, 72, 153, 0.3);
}

/* ==== NEW CHAT CONTROL ==== */
#chat-container {
  position: relative;
}

#new-chat-btn {
  position: absolute;
  top: 16px;
  right: 20px; /* added breathing room from edge */

  font-size: 12px;
  color: #7C3AED; /* match prompt-btn color */
  background: none;
  border: none;
  padding: 4px 6px; /* subtle inner padding */

  cursor: pointer;
  opacity: 0.8;
  transition: all 0.2s ease;
}

#new-chat-btn:hover {
  background: #EDE9FE; /* match prompt-btn hover bg */
  color: #EC4899;       /* match prompt-btn hover text */
  border-radius: 6px;
}

/* ==== TYPING ==== */
.typing {
  font-style: italic;
  color: #6B7280;
  margin: 10px 0;
}

.typing .dot {
  animation: blink 1.2s infinite;
  margin-left: 2px;
}
.typing .dot:nth-child(2) { animation-delay: 0.2s; }
.typing .dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes blink {
  0%, 80%, 100% { opacity: 0; }
  40% { opacity: 1; }
}

/* ==== PHOTO CREDIT ==== */
#photo-credit {
  position: fixed;
  bottom: 10px;
  right: 14px;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.7);
  text-align: right;
  z-index: 10;
  pointer-events: none;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

/* ==== MOBILE ==== */
@media (max-width: 600px) {

  #chat-container {
    height: 90vh;
    margin: 10px;
    width: auto;
    max-width: none;
  }

  #starter-prompts {
    padding: 10px 16px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .prompt-btn {
    font-size: 12px;
    padding: 8px 10px;
    text-align: center;
  }

  form {
    flex-direction: column;
  }

  button {
    width: 100%;
  }

  .message {
    max-width: 90%;
  }
}