/* =======================
   BACKGROUND
======================= */

#bg {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: -2;
  pointer-events: none;
  border: none;
}


/* =======================
   GLOBAL
======================= */

* {
  margin: 0;
  padding: 0;
  font-family: 'px';
  font-weight: 300;
  box-sizing: border-box;
}

@font-face {
  font-family: 'px';
  font-weight: 300;
  src: url('./Px-Grotesk-Light.woff');
}

@font-face {
  font-family: 'px';
  font-weight: 400;
  src: url('./Px-Grotesk-Regular.woff');
}

body {
  --sea-blue: 190;
  --sea-green: 165;

  width: 100vw;
  height: 100vh;
  display: flex;
  justify-content: center;
  overflow: hidden;
  padding: 100px;
}


/* =======================
   NAV / TITLE
======================= */

nav {
  position: fixed;
  left: 30px;
  top: 30px;
  z-index: 10;
  display: flex;
  align-items: center;
}

h1 {
  height: 52px;
  padding: 0 26px;
  border-radius: 50px;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 20px;
  line-height: 1;
  color: white;
  user-select: none;

  background: linear-gradient(
    135deg,
    hsl(var(--sea-blue), 70%, 55%),
    hsl(var(--sea-green), 70%, 50%)
  );

  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.35);
  border: none;
}


/* =======================
   MODE SELECT
======================= */

#select {
  position: fixed;
  top: 40px;
  right: 60px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 20px;

  /* Mode text color */
  color: hsl(var(--sea-blue), 70%, 55%);
  font-weight: 400;
}

select {
  width: 165px;
  padding: 9px 26px 9px 18px;
  border-radius: 100px;
  font-size: 20px;

  background: linear-gradient(
    135deg,
    hsla(var(--sea-blue), 70%, 55%, 0.95),
    hsla(var(--sea-green), 70%, 50%, 0.95)
  );

  color: white;
  border: none;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.3);
  cursor: pointer;
}

select option {
  color: black;
}


/* =======================
   INPUT AREA
======================= */

#input-wrapper {
  position: fixed;
  bottom: 60px;
  width: 100%;
  display: flex;
  gap: 20px;
  align-items: center;
  padding: 0 100px;
}

input {
  padding: 12px 25px;
  border-radius: 100px;
  font-size: 20px;
  width: 100%;

  background: rgba(255, 255, 255, 0.18);
  color: #0a2a33;

  border: 1px solid rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(12px);
}

input::placeholder {
  color: rgba(10, 42, 51, 0.6);
}


/* =======================
   SEND BUTTON
======================= */

button#send {
  width: 150px;
  padding: 12px 20px;
  border-radius: 50px;
  font-size: 20px;
  cursor: pointer;

  background: linear-gradient(
    135deg,
    hsl(var(--sea-blue), 70%, 55%),
    hsl(var(--sea-green), 70%, 50%)
  );

  color: white;
  border: none;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

button#send:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}


/* =======================
   MESSAGES
======================= */

#messages {
  margin-top: 50px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 15px;
  overflow-y: scroll;
  padding-top: 150px;
  padding-bottom: 40px;
}

#messages::-webkit-scrollbar {
  display: none;
}

.message {
  padding: 12px 24px;
  border-radius: 40px;
  font-size: 24px;
  max-width: 75%;
  backdrop-filter: blur(10px);
}
.message img {
  max-width: 240px;
  border-radius: 16px;
}

/* USER MESSAGE */
.message.sent {
  align-self: flex-start;
  background: linear-gradient(
    135deg,
    hsla(var(--sea-blue), 70%, 50%, 0.9),
    hsla(var(--sea-green), 70%, 45%, 0.9)
  );
  color: white;
}

/* BOT MESSAGE */
.message.answer {
  align-self: flex-end;
  background: rgba(255, 255, 255, 0.65);
  color: #0a2a33;

  border: 1px solid rgba(255, 255, 255, 0.45);
}


/* =======================
   MOBILE
======================= */

@media all and (max-width: 800px) {
  nav {
    left: 0;
    top: 20px;
    padding: 0 20px;
    gap: 10px;
    flex-wrap: wrap;
  }

  #input-wrapper {
    padding: 0 20px;
  }
}

/* =======================
   FOOTER
======================= */

#chat-footer {
  position: fixed;
  bottom: 20px; /* below input area */
  width: 100%;
  text-align: center;

  font-size: 15px;
  letter-spacing: 0.12em;

  /* TRUE GOLD gradient */
  color: transparent;
  background: linear-gradient(
    135deg,
    #8f6b2d,
    #e6c27a,
    #b08d57
  );

  -webkit-background-clip: text;
  background-clip: text;

  opacity: 0.85;
  user-select: none;
  pointer-events: none;
}
