:root {
  --ink: #101c46;
  --muted: #60708f;
  --line: rgba(80, 103, 146, 0.18);
  --line-strong: rgba(100, 93, 221, 0.34);
  --panel: rgba(255, 255, 255, 0.72);
  --panel-solid: rgba(255, 255, 255, 0.84);
  --panel-soft: rgba(244, 248, 255, 0.68);
  --primary: #5e6fe8;
  --primary-dark: #4f60d7;
  --accent: #28a8e3;
  --shadow: 0 18px 52px rgba(70, 94, 143, 0.16);
  --shadow-soft: 0 14px 34px rgba(48, 69, 115, 0.12);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  letter-spacing: 0;
  background:
    linear-gradient(115deg, rgba(244, 248, 255, 0.96), rgba(232, 246, 250, 0.9) 48%, rgba(248, 245, 255, 0.92)),
    url("Page%201.jpg") center / cover no-repeat fixed;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background: rgba(248, 251, 255, 0.7);
  backdrop-filter: blur(18px) saturate(0.9);
}

body::after {
  content: "";
  position: fixed;
  left: -8vw;
  right: -8vw;
  bottom: -18vh;
  z-index: -1;
  height: 38vh;
  background:
    radial-gradient(65% 110% at 65% 18%, rgba(135, 119, 232, 0.28), transparent 52%),
    linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.9));
  border-radius: 50% 50% 0 0;
  filter: blur(2px);
}

button,
input,
textarea {
  font: inherit;
}

.app-shell {
  min-height: 100vh;
  padding: 52px 24px 64px;
}

.workspace {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.topbar,
.result-header,
.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.topbar {
  margin-bottom: 26px;
}

.eyebrow {
  margin: 0 0 8px;
  color: #51627f;
  font-size: 13px;
  font-weight: 800;
}

h1,
h2 {
  margin: 0;
  line-height: 1.18;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(34px, 4vw, 52px);
  font-weight: 800;
}

h1 span {
  color: #6b55dc;
}

h2 {
  color: var(--ink);
  font-size: 22px;
}

.topbar-copy {
  max-width: 620px;
  margin: 14px 0 0;
  color: #263764;
  font-size: 16px;
  line-height: 1.7;
  font-weight: 700;
}

.input-panel,
.result-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

.input-panel {
  display: grid;
  gap: 18px;
  padding: 20px;
}

.result-panel {
  min-height: 360px;
  margin-top: 22px;
  padding: 20px;
}

.field-stack {
  display: grid;
  gap: 16px;
}

.field-card {
  display: grid;
  gap: 12px;
}

.field-title {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 800;
}

.field-title strong {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, #28a8e3, #75cee4);
  font-size: 14px;
}

.field-hint {
  margin: 0;
  padding: 16px;
  border: 1px solid rgba(80, 103, 146, 0.16);
  border-radius: var(--radius);
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

textarea {
  width: 100%;
  min-height: 120px;
  resize: vertical;
  padding: 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  outline: none;
  background: rgba(255, 255, 255, 0.58);
  color: var(--ink);
  font-weight: 600;
  line-height: 1.65;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.52);
  transition:
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

textarea:focus {
  border-color: rgba(94, 111, 232, 0.74);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 0 0 4px rgba(94, 111, 232, 0.13);
}

textarea::placeholder {
  color: #96a3bb;
}

input[type="text"] {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  outline: none;
  background: rgba(255, 255, 255, 0.58);
  color: var(--ink);
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.52);
  transition:
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

input[type="text"]:focus {
  border-color: rgba(94, 111, 232, 0.74);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 0 0 4px rgba(94, 111, 232, 0.13);
}

input::placeholder {
  color: #96a3bb;
}

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

.primary-button,
.ghost-button,
.copy-inline {
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 800;
  transition:
    background 160ms ease,
    color 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}

.primary-button {
  min-height: 52px;
  color: #ffffff;
  background: var(--primary);
  box-shadow: 0 10px 22px rgba(77, 96, 216, 0.26);
}

.primary-button.secondary {
  background: linear-gradient(135deg, #28a8e3, #75cee4);
  box-shadow: 0 10px 22px rgba(40, 168, 227, 0.22);
}

.primary-button:hover,
.ghost-button:hover,
.copy-inline:hover {
  color: #ffffff;
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(77, 96, 216, 0.32);
}

.ghost-button,
.copy-inline {
  min-height: 40px;
  padding: 0 14px;
  color: #263764;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(80, 103, 146, 0.18);
  box-shadow: var(--shadow-soft);
}

.result-content {
  margin-top: 18px;
}

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

.result-report {
  display: grid;
  gap: 18px;
}

.result-card,
.empty-state {
  border: 1px solid rgba(80, 103, 146, 0.16);
  border-radius: var(--radius);
  background: var(--panel-solid);
  box-shadow: 0 12px 28px rgba(70, 94, 143, 0.09);
}

.result-card {
  padding: 16px;
}

.result-card.full {
  grid-column: 1 / -1;
}

.result-card h3 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 17px;
}

.result-card p,
.result-card li {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.result-card p {
  margin: 0;
}

.result-card ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
}

.result-blocks {
  display: grid;
  gap: 14px;
}

.result-subblock {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(245, 249, 255, 0.72);
  border: 1px solid rgba(80, 103, 146, 0.12);
}

.result-subblock h4 {
  margin: 0;
  color: #51627f;
  font-size: 14px;
}

.result-subblock p {
  margin: 0;
}

.loading-card {
  overflow: hidden;
}

.loading-visual {
  position: relative;
  display: grid;
  gap: 7px;
  min-height: 76px;
  overflow: hidden;
  padding: 10px 12px;
  border: 1px solid rgba(40, 168, 227, 0.18);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(235, 248, 255, 0.7)),
    repeating-linear-gradient(0deg, rgba(40, 168, 227, 0.07) 0 1px, transparent 1px 10px);
}

.loading-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(94, 111, 232, 0.18), transparent);
  transform: translateX(-100%);
  animation: loadingSweep 1.7s ease-in-out infinite;
}

.data-row {
  position: relative;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(80, 103, 146, 0.1);
}

.data-row::before {
  content: "010011 101100 011010 110101 001101 101011 010110 110010";
  position: absolute;
  top: 50%;
  left: 0;
  min-width: 200%;
  color: rgba(40, 168, 227, 0.82);
  font: 900 10px/1 "Consolas", "Microsoft YaHei", monospace;
  letter-spacing: 1px;
  white-space: nowrap;
  transform: translateY(-50%);
  animation: dataStream 2.4s linear infinite;
}

.row-b::before,
.row-d::before {
  animation-duration: 3s;
  animation-direction: reverse;
  color: rgba(94, 111, 232, 0.72);
}

.row-a {
  width: 92%;
}

.row-b {
  width: 76%;
}

.row-c {
  width: 100%;
}

.row-d {
  width: 84%;
}

.row-e {
  width: 66%;
}

@keyframes dataStream {
  from {
    transform: translate(-48%, -50%);
  }

  to {
    transform: translate(0, -50%);
  }
}

@keyframes loadingSweep {
  0% {
    transform: translateX(-100%);
  }

  55%,
  100% {
    transform: translateX(100%);
  }
}

.empty-state {
  display: grid;
  gap: 8px;
  min-height: 220px;
  align-content: center;
  justify-items: center;
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

.empty-state strong {
  color: var(--ink);
  font-size: 18px;
}

.empty-state span {
  max-width: 520px;
  line-height: 1.6;
}

[hidden] {
  display: none !important;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(16, 28, 70, 0.28);
  backdrop-filter: blur(14px);
}

.persona-modal {
  position: relative;
  width: min(456px, 100%);
  display: grid;
  gap: 18px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 28px 70px rgba(48, 69, 115, 0.22);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: var(--radius);
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 28px;
  line-height: 1;
}

.modal-close:hover {
  color: var(--ink);
  background: rgba(94, 111, 232, 0.1);
}

.modal-header h2 {
  margin: 0;
  padding-right: 36px;
  font-size: 22px;
}

.modal-header p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.modal-field,
.saved-persona-block {
  display: grid;
  gap: 10px;
}

.modal-field span,
.saved-persona-block > span {
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
}

.saved-persona-list {
  display: grid;
  gap: 8px;
}

.saved-persona-item {
  min-height: 40px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  border: 1px solid rgba(80, 103, 146, 0.14);
  border-radius: var(--radius);
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.modal-error {
  margin: -4px 0 0;
  color: #d14d4d;
  font-size: 13px;
  font-weight: 800;
}

.modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (max-width: 760px) {
  .app-shell {
    padding: 36px 16px 48px;
  }

  .topbar,
  .result-header,
  .panel-header {
    flex-direction: column;
  }

  h1 {
    font-size: 30px;
  }

  h2 {
    font-size: 19px;
  }

  .topbar-copy {
    font-size: 14px;
  }

  .button-row,
  .result-grid {
    grid-template-columns: 1fr;
  }
}
