:root {
  color-scheme: light;
  --bg: #06101f;
  --surface: rgba(8, 19, 41, 0.78);
  --surface-strong: rgba(10, 24, 50, 0.94);
  --border: rgba(148, 163, 184, 0.18);
  --text: #edf4ff;
  --muted: #9eb2d4;
  --accent: #7dd3fc;
  --accent-strong: #3b82f6;
  --accent-soft: rgba(59, 130, 246, 0.14);
  --shadow: 0 24px 64px rgba(2, 6, 23, 0.42);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.24), transparent 30%),
    radial-gradient(circle at 80% 12%, rgba(125, 211, 252, 0.15), transparent 22%),
    linear-gradient(180deg, #05101f 0%, #071428 48%, #08111d 100%);
}

.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0 56px;
}

.panel,
.profile-card {
  border: 1px solid var(--border);
  background: var(--surface);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.page-header {
  margin-bottom: 24px;
}

.page-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: #c6e7ff;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.page-header h1 {
  margin: 14px 0 10px;
  font-size: clamp(42px, 7vw, 74px);
  line-height: 1.02;
  letter-spacing: -0.03em;
}

.page-header p {
  margin: 0;
  max-width: 760px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.75;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(320px, 380px) minmax(0, 1fr);
  gap: 18px;
}

.panel {
  padding: 24px;
  border-radius: var(--radius);
}

.panel-head h2 {
  display: block;
  margin-bottom: 6px;
  font-size: 22px;
}

.panel-head h2 {
  margin-top: 0;
  margin-bottom: 8px;
}

.generator-form,
.grid,
.result-cards {
  display: grid;
}

.generator-form {
  gap: 14px;
}

.grid.two-up {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

label {
  display: grid;
  gap: 8px;
}

label span {
  color: #dbeafe;
  font-weight: 600;
}

input,
select,
button {
  font: inherit;
}

input,
select {
  min-height: 48px;
  padding: 0 15px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(7, 16, 34, 0.92);
  color: var(--text);
}

input:focus,
select:focus {
  outline: 2px solid rgba(96, 165, 250, 0.35);
  border-color: rgba(96, 165, 250, 0.48);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}

.btn {
  min-height: 48px;
  padding: 0 18px;
  border-radius: 14px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, opacity 0.18s ease, border-color 0.18s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, #38bdf8 0%, #2563eb 92%);
}

.btn-secondary {
  color: var(--text);
  background: rgba(9, 20, 42, 0.92);
  border-color: rgba(148, 163, 184, 0.16);
}

.results-panel {
  background:
    linear-gradient(180deg, rgba(8, 19, 41, 0.92) 0%, rgba(8, 17, 35, 0.88) 100%);
}

.result-stage {
  min-height: 420px;
}

.empty-state {
  min-height: 420px;
  display: grid;
  place-content: center;
  gap: 14px;
  text-align: center;
  border-radius: 24px;
  border: 1px dashed rgba(148, 163, 184, 0.24);
  background: rgba(15, 23, 42, 0.35);
  color: var(--muted);
}

.empty-icon {
  font-size: 38px;
  color: #bfdbfe;
}

.result-cards {
  gap: 14px;
}

.result-cards[hidden],
.result-json[hidden],
.empty-state[hidden] {
  display: none !important;
}

.profile-card {
  padding: 20px;
  border-radius: 20px;
  background: var(--surface-strong);
}

.profile-card h3 {
  margin: 0 0 12px;
  font-size: 18px;
}

.profile-line {
  margin: 0 0 8px;
  white-space: pre-wrap;
}

.profile-line strong {
  color: #dbeafe;
}

.result-json {
  margin: 0;
  padding: 18px;
  border-radius: 20px;
  overflow: auto;
  background: rgba(9, 20, 42, 0.88);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

@media (max-width: 920px) {
  .workspace {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 20px, 1240px);
    padding-top: 20px;
  }

  .page-header h1 {
    font-size: clamp(34px, 12vw, 52px);
  }

  .panel {
    padding: 18px;
  }

  .grid.two-up {
    grid-template-columns: 1fr;
  }

  .actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }
}