/* —— basic reset —— */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* —— body + fonts —— */
body {
  font-family: "Helvetica Neue", Arial, sans-serif;
  color: #ffffff;
  background-color: #000000;
  display: flex;
  justify-content: center;
}

.page-wrapper {
  width: 90%;
  max-width: 900px;
}

/* header */
.site-header {
  text-align: center;
  padding-top: 50px;
  border-bottom: 2px solid #e3a535;
  padding-bottom: 20px;
  margin-bottom: 30px;
  background-color: #ffffff;
  color: #000000;
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  position: relative;
}

.site-logo {
  max-height: 60px;
  margin-bottom: 15px;
}

.site-title {
  font-size: 22px;
  font-weight: 500;
  color: #000000;
  margin-bottom: 10px;
}

/* chat window */
.chatbox {
  margin: 40px 0;
}

/* Current question display */
.current-question {
  background: #333333;
  border: 1px solid #e3a535;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 15px;
  color: #ffffff;
}

.question-label {
  font-size: 14px;
  color: #e3a535;
  font-weight: 500;
  margin-bottom: 8px;
}

.question-text {
  font-size: 16px;
  color: #ffffff;
  font-weight: 400;
}

.chat-window {
  height: 360px;
  border: 1px solid #e3a535;
  padding: 20px;
  font-size: 16px;
  line-height: 1.5;
  overflow-y: auto;
  background: #000000;
  white-space: pre-wrap;
  color: #ffffff;
  display: flex;
  flex-direction: column;
}

/* messages */
.msg {
  margin-bottom: 20px;
  display: flex;
  align-items: flex-start;
}

.msg.user {
  justify-content: flex-end;
}

.msg.ai {
  justify-content: flex-start;
}

.msg-bubble {
  max-width: 80%;
  padding: 12px 16px;
  border-radius: 18px;
  line-height: 1.4;
  word-wrap: break-word;
  position: relative;
}

.msg.user .msg-bubble {
  background-color: #ff003b;
  color: #ffffff;
  border-bottom-right-radius: 4px;
  margin-left: 20%;
}

.msg.ai .msg-bubble {
  background-color: #333333;
  color: #ffffff;
  border-bottom-left-radius: 4px;
  margin-right: 20%;
}

/* Add message bubble tails */
.msg.user .msg-bubble::after {
  content: "";
  position: absolute;
  bottom: 0;
  right: -8px;
  width: 0;
  height: 0;
  border-left: 8px solid #ff003b;
  border-bottom: 8px solid transparent;
}

.msg.ai .msg-bubble::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: -8px;
  width: 0;
  height: 0;
  border-right: 8px solid #333333;
  border-bottom: 8px solid transparent;
}

/* input row */
.chat-form {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.chat-form input {
  flex: 1;
  padding: 12px;
  border: 1px solid #e3a535;
  font-size: 18px;
  background: #000000;
  color: #ffffff;
}

.chat-form input:focus {
  outline: 2px solid #ff003b;
  outline-offset: 2px;
  border-color: #ff003b;
}

.chat-form button {
  font-size: 18px;
  background: #ff003b;
  color: #ffffff;
  border: none;
  padding: 12px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.3s;
}

.chat-form button .material-icons {
  font-size: 24px;
}

.chat-form button:hover {
  background: #000000;
}

.chat-form button:focus {
  outline: 2px solid #e3a535;
  outline-offset: 2px;
}

/* visually hidden */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* footer */
.site-footer {
  margin: 60px 0 40px;
  text-align: center;
  font-size: 14px;
  color: #ffffff;
  border-top: 1px solid #e3a535;
  padding-top: 20px;
}

.site-footer nav {
  margin-top: 12px;
}

.site-footer a {
  margin: 0 8px;
  color: #ff003b;
  text-decoration: none;
  transition: color 0.3s;
}

.site-footer a:hover {
  color: #ffffff;
}
