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

/* —— brand colors and font —— */
:root {
  --loreal-black: #0a0a0a;
  --loreal-white: #ffffff;
  --loreal-red: #ff003b;
  --loreal-gold: #c5a26a;
  --loreal-gray: #666666;
  --surface: rgba(255, 255, 255, 0.92);
  --text-strong: #111111;
}

body {
  min-height: 100vh;
  font-family: Helvetica, Arial, sans-serif;
  color: var(--text-strong);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 32px;
  background: radial-gradient(
    circle at top,
    #fff8f2 0%,
    #f7f2ec 45%,
    #efe8df 100%
  );
}

.page-wrapper {
  width: min(98%, 920px);
  position: relative;
  background: var(--surface);
  border: 1px solid rgba(197, 162, 106, 0.25);
  border-radius: 28px;
  padding: 28px;
  box-shadow: 0 24px 50px rgba(10, 10, 10, 0.12);
}

/* header */
.site-header {
  text-align: center;
  padding-top: 24px;
  padding-bottom: 16px;
  position: relative;
  z-index: 1;
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: center;
}

.brand-logo {
  height: 52px;
  display: block;
}

.site-tagline {
  margin-top: 8px;
  color: var(--loreal-gray);
  font-size: 14px;
  max-width: 380px;
}

.site-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 0;
  color: var(--loreal-black);
  letter-spacing: 0.02em;
}

/* chat window */
.chatbox {
  margin: 36px 0;
  position: relative;
  z-index: 1;
}

.chat-window {
  min-height: 360px;
  border: 1px solid rgba(197, 162, 106, 0.35);
  padding: 24px;
  font-size: 18px;
  line-height: 1.7;
  overflow-y: auto;
  background: var(--loreal-white);
  border-radius: 20px;
  box-shadow: 0 18px 40px rgba(10, 10, 10, 0.08);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* messages */
.msg {
  max-width: min(82%, 540px);
  padding: 16px 18px;
  border-radius: 24px;
  line-height: 1.6;
  word-break: break-word;
  box-shadow: 0 10px 24px rgba(10, 10, 10, 0.05);
}

.msg.user {
  align-self: flex-end;
  background: var(--loreal-black);
  color: var(--loreal-white);
  text-align: right;
  border-bottom-right-radius: 6px;
  border-bottom-left-radius: 24px;
}

.msg.ai {
  align-self: flex-start;
  background: #f8f2ea;
  color: var(--loreal-black);
  border-bottom-left-radius: 6px;
  border-bottom-right-radius: 24px;
}

.msg.ai strong {
  color: var(--loreal-red);
}

/* input row */
.chat-form {
  display: flex;
  gap: 12px;
  margin-top: 22px;
  position: relative;
  z-index: 1;
}

.chat-form input {
  flex: 1;
  padding: 14px 16px;
  border: 1px solid rgba(197, 162, 106, 0.5);
  background: rgba(255, 255, 255, 0.95);
  font-size: 18px;
  border-radius: 999px;
  color: var(--loreal-black);
}

.chat-form input::placeholder {
  color: var(--loreal-gray);
}

.chat-form input:focus {
  outline: 2px solid var(--loreal-red);
  outline-offset: 2px;
}

.chat-form button {
  font-size: 18px;
  background: var(--loreal-red);
  color: var(--loreal-white);
  border: none;
  padding: 0;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
  box-shadow: 0 12px 24px rgba(255, 0, 59, 0.18);
}

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

.chat-form button:hover {
  transform: translateY(-1px);
  background: var(--loreal-gold);
  color: var(--loreal-black);
}

.chat-form button:focus {
  outline: 2px solid var(--loreal-black);
  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: 56px 0 28px;
  text-align: center;
  font-size: 14px;
  color: var(--loreal-black);
  position: relative;
  z-index: 1;
}

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

.site-footer a {
  margin: 0 8px;
  color: var(--loreal-red);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--loreal-black);
}
