:root {
  --blue-950: #071527;
  --blue-900: #0a2342;
  --blue-800: #123a63;
  --blue-650: #1b5d8f;
  --blue-100: #eaf4ff;
  --blue-050: #f5f9fd;
  --line: #d7e4ef;
  --text: #142234;
  --muted: #66778b;
  --white: #ffffff;
  --shadow: 0 28px 80px rgba(7, 21, 39, 0.16);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Microsoft YaHei", sans-serif;
  background:
    linear-gradient(180deg, rgba(7, 21, 39, 0.96) 0 42%, transparent 42%),
    linear-gradient(135deg, #eef5fb 0%, #ffffff 55%, #eaf4ff 100%);
}

button,
input {
  font: inherit;
}

.page-shell {
  width: min(1320px, calc(100% - 28px));
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(500px, 560px);
  gap: 20px;
  align-items: center;
  padding: 32px 0;
}

.profile-panel,
.chat-panel {
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.profile-panel {
  min-height: 640px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 42px;
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.18);
  background:
    linear-gradient(150deg, rgba(7, 21, 39, 0.96), rgba(10, 35, 66, 0.92)),
    var(--blue-950);
}

.profile-header {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 28px;
  align-items: center;
}

.avatar-wrap {
  width: 172px;
  aspect-ratio: 1;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
}

.avatar {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: 6px;
}

.eyebrow {
  margin: 0 0 10px;
  color: #78bdf2;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 12px;
  color: var(--white);
  font-size: 3.8rem;
  line-height: 1;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  color: var(--blue-950);
  font-size: 1.55rem;
  line-height: 1.25;
  letter-spacing: 0;
}

.tagline {
  max-width: 420px;
  margin-bottom: 0;
  color: #d9ebfb;
  font-size: 1.18rem;
  font-weight: 650;
  line-height: 1.55;
}

.intro-block {
  max-width: 650px;
  margin: 34px 0 28px;
  padding: 20px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.intro-block p {
  margin-bottom: 0;
  color: #c8d9e8;
  font-size: 1rem;
  line-height: 1.85;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.info-card {
  min-height: 92px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
}

.info-card span {
  display: block;
  margin-bottom: 8px;
  color: #93adc5;
  font-size: 0.86rem;
}

.info-card strong {
  color: var(--white);
  font-size: 1rem;
  line-height: 1.45;
}

.interest-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 24px;
}

.interest-row span {
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: #e8f4ff;
  background: rgba(255, 255, 255, 0.09);
  font-size: 0.93rem;
  font-weight: 650;
}

.chat-panel {
  height: min(720px, calc(100vh - 80px));
  min-height: 620px;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  overflow: hidden;
  border: 2px solid rgba(27, 93, 143, 0.72);
  background: var(--white);
}

.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  padding: 30px 30px 24px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff, var(--blue-050));
}

.chat-header .eyebrow {
  color: var(--blue-650);
}

.status-dot {
  width: 12px;
  height: 12px;
  margin-top: 3px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #1fbf75;
  box-shadow: 0 0 0 6px rgba(31, 191, 117, 0.12);
}

.chat-status {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 126px;
  margin-top: 5px;
}

.status-text {
  max-width: 158px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
  text-align: right;
}

.status-text[data-state="ready"] {
  color: #13794f;
}

.status-text[data-state="missing"],
.status-text[data-state="offline"] {
  color: #9a5b12;
}

.quick-prompts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 18px 30px;
  border-bottom: 1px solid var(--line);
  background: var(--white);
}

.quick-prompts button {
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid rgba(27, 93, 143, 0.28);
  border-radius: 8px;
  color: var(--blue-800);
  background: var(--blue-100);
  font-weight: 700;
  cursor: pointer;
}

.quick-prompts button:hover {
  border-color: var(--blue-650);
  background: #d9edff;
}

.chat-messages {
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
  padding: 26px 30px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(245, 249, 253, 0.96)),
    #f8fbfe;
}

.message {
  max-width: 92%;
  padding: 14px 16px;
  border-radius: 8px;
  line-height: 1.68;
}

.message p {
  margin-bottom: 0;
}

.message.bot {
  align-self: flex-start;
  border: 1px solid var(--line);
  background: var(--white);
}

.message.user {
  align-self: flex-end;
  color: var(--white);
  background: var(--blue-800);
}

.chat-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 22px;
  border-top: 1px solid var(--line);
  background: var(--white);
}

.chat-form input {
  width: 100%;
  min-height: 50px;
  border: 1px solid #b9ccdc;
  border-radius: 8px;
  padding: 0 15px;
  color: var(--text);
  background: #fbfdff;
  outline: none;
}

.chat-form input:focus {
  border-color: var(--blue-650);
  box-shadow: 0 0 0 4px rgba(27, 93, 143, 0.13);
}

.chat-form button {
  min-width: 86px;
  min-height: 50px;
  border: 0;
  border-radius: 8px;
  color: var(--white);
  background: var(--blue-900);
  font-weight: 800;
  cursor: pointer;
}

.chat-form button:hover {
  background: var(--blue-800);
}

.chat-form button:disabled,
.quick-prompts button:disabled,
.chat-form input:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.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;
}

@media (max-width: 960px) {
  body {
    background:
      linear-gradient(180deg, rgba(7, 21, 39, 0.96) 0 34%, transparent 34%),
      linear-gradient(135deg, #eef5fb 0%, #ffffff 58%, #eaf4ff 100%);
  }

  .page-shell {
    grid-template-columns: 1fr;
    align-items: start;
    width: min(100% - 28px, 760px);
    padding: 24px 0;
  }

  .profile-panel {
    min-height: auto;
  }

  .chat-panel {
    height: 660px;
    min-height: 580px;
  }
}

@media (max-width: 620px) {
  .page-shell {
    width: min(100% - 24px, 480px);
    gap: 16px;
    padding: 14px 0 20px;
  }

  .profile-panel {
    padding: 24px;
  }

  .profile-header {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .avatar-wrap {
    width: 126px;
  }

  h1 {
    font-size: 2.65rem;
  }

  h2 {
    font-size: 1.32rem;
  }

  .tagline {
    font-size: 1.02rem;
  }

  .intro-block {
    margin: 24px 0 20px;
    padding-top: 18px;
  }

  .intro-block p {
    font-size: 0.96rem;
    line-height: 1.75;
  }

  .info-grid {
    grid-template-columns: 1fr;
  }

  .info-card {
    min-height: 76px;
  }

  .chat-panel {
    min-height: 620px;
  }

  .chat-header {
    padding: 22px 20px 18px;
  }

  .chat-status {
    min-width: 108px;
  }

  .status-text {
    max-width: 120px;
    font-size: 0.78rem;
  }

  .quick-prompts {
    grid-template-columns: 1fr;
    padding: 14px 20px;
  }

  .chat-messages {
    padding: 20px;
  }

  .message {
    max-width: 94%;
    font-size: 0.96rem;
  }

  .chat-form {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .chat-form button {
    width: 100%;
  }
}
