:root {
  color-scheme: dark;
  font-family: "Segoe UI", system-ui, sans-serif;
  color: #f5f4f8;
  background: #101116;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --muted: #9695a2;
  --line: rgba(255, 255, 255, .09);
  --panel: #191a22;
  --accent: #b19aff;
}

* { box-sizing: border-box; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(ellipse at 50% 34%, rgba(132, 103, 226, .12), transparent 38rem),
    #101116;
}

button, textarea { font: inherit; }
button { color: inherit; }

.shell {
  display: flex;
  flex-direction: column;
  width: min(100%, 1050px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 0 32px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: #fff;
  font: 800 19px "Segoe UI", system-ui, sans-serif;
  letter-spacing: -.7px;
  text-decoration: none;
}

.brand-light { color: #bab7c7; font-weight: 500; }

.brand-mark, .welcome-mark {
  display: grid;
  place-items: center;
  border: 1px solid rgba(208, 192, 255, .36);
  background: linear-gradient(145deg, #a98dff, #6548c7 58%, #302254);
  box-shadow: 0 0 24px rgba(145, 113, 255, .3);
}

.brand-mark { width: 31px; height: 31px; border-radius: 11px; }
.brand-mark span, .welcome-mark span {
  width: 11px;
  height: 15px;
  border: 2px solid #fff;
  border-radius: 60% 40% 60% 40%;
  transform: rotate(35deg);
}

.connection {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #c9c7d2;
  font-size: 12px;
}

.connection-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #a58af8;
  box-shadow: 0 0 10px rgba(165, 138, 248, .7);
}

.conversation {
  display: flex;
  flex: 1;
  flex-direction: column;
  width: min(100%, 760px);
  margin: 0 auto;
}

.welcome {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 410px;
  padding: 52px 0 32px;
  text-align: center;
}

.welcome-mark { width: 54px; height: 54px; margin-bottom: 27px; border-radius: 19px; }
.welcome-mark span { width: 18px; height: 24px; border-width: 3px; }

.eyebrow {
  margin: 0 0 12px;
  color: #b5a2f5;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
}

h1 {
  margin: 0;
  font: 700 clamp(38px, 7vw, 56px)/1.08 "Segoe UI", system-ui, sans-serif;
  letter-spacing: -2.7px;
}

.welcome-copy { margin: 16px 0 24px; color: #a5a3b0; font-size: 14px; }

.suggestions { display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; }
.suggestion {
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .035);
  color: #d3d0dd;
  cursor: pointer;
  font-size: 12px;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}
.suggestion:hover { transform: translateY(-1px); border-color: rgba(177, 154, 255, .5); background: rgba(177, 154, 255, .1); }

.messages { display: flex; flex-direction: column; gap: 22px; padding: 26px 0; }
.message { display: flex; gap: 12px; align-items: flex-start; animation: appear .24s ease both; }
.message.user { justify-content: flex-end; }
.message-body {
  max-width: min(80%, 620px);
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  color: #eeedf3;
  font-size: 14px;
  line-height: 1.65;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.message.user .message-body {
  border-color: rgba(177, 154, 255, .2);
  border-bottom-right-radius: 5px;
  background: linear-gradient(135deg, rgba(125, 99, 202, .32), rgba(75, 63, 112, .35));
}
.message.assistant .message-body { border-bottom-left-radius: 5px; }
.assistant-avatar {
  display: grid;
  flex: 0 0 29px;
  place-items: center;
  width: 29px;
  height: 29px;
  border: 1px solid rgba(208, 192, 255, .3);
  border-radius: 10px;
  background: linear-gradient(145deg, #9a7ce8, #44316d);
  font-size: 14px;
}
.typing { color: #b7a4f3; }

.composer {
  width: min(100%, 760px);
  margin: 14px auto 0;
  padding: 13px 14px 10px 18px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 20px;
  background: rgba(27, 27, 36, .92);
  box-shadow: 0 16px 50px rgba(0, 0, 0, .22), 0 0 28px rgba(147, 119, 234, .06);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.composer:focus-within { border-color: rgba(177, 154, 255, .55); box-shadow: 0 16px 50px rgba(0, 0, 0, .22), 0 0 26px rgba(147, 119, 234, .14); }
.composer textarea {
  display: block;
  width: 100%;
  max-height: 190px;
  padding: 4px 0 10px;
  resize: none;
  border: 0;
  outline: 0;
  background: transparent;
  color: #f5f4f8;
  font-size: 14px;
  line-height: 1.55;
}
.composer textarea::placeholder { color: #8d8b99; }
.composer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.privacy-note { color: #858391; font-size: 10px; }
.send-button {
  display: grid;
  flex: 0 0 35px;
  place-items: center;
  width: 35px;
  height: 35px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(145deg, #b29bff, #8164df);
  color: #171320;
  cursor: pointer;
  transition: opacity .2s ease, transform .2s ease;
}
.send-button:hover { transform: translateY(-1px); }
.send-button:disabled { cursor: wait; opacity: .48; }
.send-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }

.status { min-height: 21px; margin: 9px auto 0; color: #e5a5a8; font-size: 12px; text-align: center; }
footer { padding: 0 0 18px; color: #777582; font-size: 10px; text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@keyframes appear { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 600px) {
  .shell { padding: 0 17px; }
  .topbar { height: 64px; }
  .welcome { min-height: 390px; padding-top: 40px; }
  h1 { letter-spacing: -1.8px; }
  .welcome-copy { max-width: 290px; line-height: 1.6; }
  .suggestions { max-width: 340px; }
  .suggestion { padding: 9px 11px; }
  .message-body { max-width: 88%; }
  .composer { border-radius: 17px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

[hidden] { display: none !important; }

.top-actions { display: flex; align-items: center; gap: 18px; }
.text-button, .nav-cta, .primary-button, .secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  transition: background .18s ease, border-color .18s ease, transform .18s ease, opacity .18s ease;
}
.text-button { padding: 9px 5px; background: transparent; color: #ceccd7; font-size: 13px; }
.text-button:hover { color: #fff; }
.nav-cta {
  padding: 10px 15px;
  border: 1px solid rgba(177, 154, 255, .33);
  border-radius: 12px;
  background: rgba(177, 154, 255, .1);
  color: #e8e1ff;
  font-size: 12px;
}
.nav-cta:hover, .secondary-button:hover { border-color: rgba(177, 154, 255, .7); background: rgba(177, 154, 255, .16); }
.account-email { max-width: 220px; overflow: hidden; color: #aaa8b5; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }

.home-screen {
  display: grid;
  flex: 1;
  grid-template-columns: minmax(0, 1fr) minmax(300px, .92fr);
  align-items: center;
  gap: 28px;
  width: min(100%, 930px);
  min-height: 600px;
  margin: 0 auto;
  padding: 54px 0 70px;
}
.hero-copy { position: relative; z-index: 1; }
.hero-copy .eyebrow, .chat-heading .eyebrow { display: flex; align-items: center; gap: 9px; }
.pulse-dot { width: 7px; height: 7px; border-radius: 50%; background: #ad95ff; box-shadow: 0 0 12px #9b7aff; }
.hero-copy h1 {
  margin: 21px 0 19px;
  font: 800 clamp(54px, 7vw, 78px)/.99 "Segoe UI", system-ui, sans-serif;
  letter-spacing: -5px;
}
.gradient-text {
  color: transparent;
  background: linear-gradient(100deg, #c0aaff 4%, #9a81f4 52%, #d0c0ff 100%);
  background-clip: text;
  -webkit-background-clip: text;
}
.hero-description { max-width: 430px; margin: 0; color: #a7a5b2; font-size: 15px; line-height: 1.8; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 28px; }
.primary-button {
  min-height: 46px;
  padding: 0 19px;
  border-radius: 13px;
  background: linear-gradient(135deg, #b6a0ff, #8b70e4);
  box-shadow: 0 8px 26px rgba(132, 103, 226, .22);
  color: #171320;
  font-size: 13px;
  font-weight: 700;
}
.primary-button:hover { transform: translateY(-1px); box-shadow: 0 10px 30px rgba(132, 103, 226, .35); }
.primary-button:disabled, .text-button:disabled { cursor: wait; opacity: .55; }
.secondary-button {
  min-height: 44px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, .025);
  color: #d3d0dd;
  font-size: 12px;
}
.feature-row { display: flex; flex-wrap: wrap; gap: 25px; margin-top: 45px; }
.feature { display: flex; align-items: center; gap: 10px; }
.feature-icon { display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid rgba(177, 154, 255, .2); border-radius: 11px; background: rgba(177, 154, 255, .07); color: #c1adff; font-size: 17px; }
.feature strong, .feature small, .mini-card b, .mini-card small { display: block; }
.feature strong { color: #dddbe5; font-size: 11px; font-weight: 600; }
.feature small { margin-top: 4px; color: #82808d; font-size: 10px; }

.hero-visual { position: relative; display: grid; min-height: 390px; place-items: center; }
.orbit { position: absolute; width: 315px; height: 315px; border: 1px solid rgba(184, 162, 255, .13); border-radius: 50%; }
.orbit-one { transform: scaleX(.71) rotate(34deg); }
.orbit-two { transform: scaleX(.71) rotate(-34deg); }
.ai-core { position: relative; display: grid; width: 154px; height: 154px; place-items: center; border: 1px solid rgba(216, 203, 255, .47); border-radius: 48px; background: radial-gradient(circle at 34% 26%, #baa5ff 0, #7559ca 42%, #30224c 100%); box-shadow: 0 0 90px rgba(146, 111, 240, .28), inset 0 0 35px rgba(255, 255, 255, .12); transform: rotate(-8deg); }
.core-glow { position: absolute; inset: 18px; border: 1px solid rgba(255, 255, 255, .26); border-radius: 38px; }
.core-mark { width: 33px; height: 46px; border: 5px solid white; border-radius: 65% 38% 63% 42%; filter: drop-shadow(0 0 11px rgba(255, 255, 255, .55)); transform: rotate(35deg); }
.orbit-label { position: absolute; display: flex; align-items: center; gap: 7px; padding: 8px 11px; border: 1px solid rgba(255, 255, 255, .1); border-radius: 999px; background: rgba(20, 19, 28, .82); color: #b6b2c2; font-size: 9px; letter-spacing: 1px; }
.orbit-label i { width: 6px; height: 6px; border-radius: 50%; background: #a58af8; box-shadow: 0 0 8px #a58af8; }
.label-top { top: 65px; right: 12px; }
.label-bottom { bottom: 60px; left: 1px; }
.mini-card { position: absolute; right: 0; bottom: 13px; display: flex; align-items: center; gap: 10px; padding: 12px 15px; border: 1px solid rgba(255, 255, 255, .11); border-radius: 14px; background: rgba(24, 23, 32, .94); box-shadow: 0 10px 32px rgba(0, 0, 0, .28); }
.mini-spark { color: #c3aeff; font-size: 18px; }
.mini-card b { color: #e5e2ed; font-size: 10px; font-weight: 600; }
.mini-card small { margin-top: 4px; color: #898694; font-size: 9px; }

.auth-screen { display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: center; width: 100%; padding: 36px 0 46px; }
.back-link { align-self: flex-start; margin: 0 0 18px max(0px, calc((100% - 430px) / 2)); padding: 8px 0; border: 0; background: transparent; color: #aaa7b5; cursor: pointer; font-size: 12px; }
.back-link:hover { color: #fff; }
.auth-card { width: min(100%, 430px); padding: 30px 34px 25px; border: 1px solid rgba(255, 255, 255, .1); border-radius: 23px; background: linear-gradient(155deg, rgba(30, 29, 39, .96), rgba(20, 20, 27, .96)); box-shadow: 0 24px 80px rgba(0, 0, 0, .25), 0 0 45px rgba(137, 108, 221, .07); }
.auth-brand { display: flex; justify-content: center; margin-bottom: 20px; }
.auth-brand .brand-mark { width: 44px; height: 44px; border-radius: 16px; }
.auth-brand .brand-mark span { width: 15px; height: 21px; border-width: 3px; }
.auth-card > .eyebrow { margin-bottom: 8px; text-align: center; }
.auth-card h2 { margin: 0; font: 700 28px/1.2 "Segoe UI", system-ui, sans-serif; letter-spacing: -1px; text-align: center; }
.auth-subtitle { margin: 9px 0 22px; color: #a19eac; font-size: 12px; text-align: center; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 0 0 21px; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: rgba(0, 0, 0, .14); }
.auth-tab { min-height: 34px; border: 0; border-radius: 9px; background: transparent; color: #9693a1; cursor: pointer; font-size: 11px; }
.auth-tab.active { background: rgba(177, 154, 255, .14); color: #e4dcff; }
.auth-form { display: flex; flex-direction: column; }
.auth-form label { margin: 13px 0 7px; color: #cfccd7; font-size: 11px; font-weight: 600; }
.auth-form input { width: 100%; min-height: 43px; padding: 0 12px; border: 1px solid rgba(255, 255, 255, .12); border-radius: 11px; outline: 0; background: rgba(7, 7, 11, .38); color: #f5f4f8; font-size: 13px; }
.auth-form input:focus { border-color: rgba(177, 154, 255, .68); box-shadow: 0 0 0 3px rgba(177, 154, 255, .1); }
.label-hint { float: right; color: #827f8d; font-size: 9px; font-weight: 400; }
.full-button { width: 100%; margin-top: 21px; }
.verify-copy { margin: 7px 0 8px; color: #a7a4b0; font-size: 12px; line-height: 1.65; text-align: center; overflow-wrap: anywhere; }
.verify-copy strong { color: #ece9f4; font-weight: 600; }
#verify-code { font-size: 20px; letter-spacing: 9px; text-align: center; }
.resend-button { align-self: center; margin-top: 12px; font-size: 11px; }
.auth-status { min-height: 18px; margin: 13px 0 0; color: #c4b0ff; font-size: 11px; line-height: 1.5; text-align: center; }
.auth-privacy { margin: 16px 0 0; color: #777582; font-size: 9px; line-height: 1.5; text-align: center; }

.chat-screen { display: flex; flex: 1; flex-direction: column; width: min(100%, 760px); margin: 0 auto; padding: 46px 0 8px; }
.chat-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }
.chat-heading h1 { font-size: clamp(36px, 5vw, 48px); letter-spacing: -2px; }
.chat-heading .connection { margin-top: 11px; white-space: nowrap; }
.chat-heading .welcome-copy { margin: 12px 0 0; font-size: 12px; }
.chat-screen .suggestions { justify-content: flex-start; margin-top: 20px; }
.chat-screen .messages { min-height: 90px; max-height: 46vh; overflow-y: auto; }
.chat-screen .composer { margin-top: auto; }
.site-footer { margin-top: 14px; }

@media (max-width: 700px) {
  .home-screen { grid-template-columns: 1fr; gap: 3px; min-height: auto; padding: 70px 0 42px; }
  .hero-copy h1 { font-size: clamp(54px, 15vw, 72px); letter-spacing: -4px; }
  .hero-visual { min-height: 300px; margin-top: 5px; }
  .orbit { width: 250px; height: 250px; }
  .ai-core { width: 126px; height: 126px; border-radius: 40px; }
  .core-glow { border-radius: 30px; }
  .label-top { top: 29px; right: 4%; }
  .label-bottom { bottom: 35px; left: 0; }
  .mini-card { right: 0; bottom: -3px; }
  .feature-row { gap: 16px; margin-top: 32px; }
  .auth-card { padding: 26px 22px 22px; }
  .chat-screen { padding-top: 30px; }
  .chat-heading { flex-direction: column; }
  .chat-heading .connection { margin: 0; }
}

@media (max-width: 420px) {
  .shell { padding: 0 15px; }
  .topbar { height: 66px; }
  .top-actions { gap: 9px; }
  .nav-cta { padding: 9px 10px; font-size: 10px; }
  .top-actions .text-button { font-size: 11px; }
  .feature-row { flex-direction: column; }
  .hero-visual { min-height: 275px; }
  .suggestions { gap: 7px; }
  .suggestion { padding: 9px 10px; font-size: 10px; }
}
