:root {
  --bg: #0b0d12;
  --surface: #131722;
  --surface-2: #1b2030;
  --border: #262d40;
  --border-strong: #364060;
  --text: #eef0f6;
  --text-dim: #8b93a8;
  --lime: #c8f04f;
  --lime-dim: rgba(200, 240, 79, .14);
  --cyan: #7dd3fc;
  --amber: #fbbf24;
  --red: #f87171;
  --green: #4ade80;
  --radius: 18px;
  --radius-sm: 12px;
  --font-head: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'IBM Plex Sans', system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
}

/* ---------- Hintergrund-Glow ---------- */
.bg-glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(600px 400px at 15% -5%, rgba(200, 240, 79, .07), transparent 60%),
    radial-gradient(700px 500px at 90% 10%, rgba(125, 211, 252, .06), transparent 60%),
    radial-gradient(800px 600px at 50% 110%, rgba(200, 240, 79, .04), transparent 60%);
}

/* ---------- Header ---------- */
header {
  max-width: 760px;
  margin: 0 auto;
  padding: 4.5rem 1.2rem 2.5rem;
  text-align: center;
}

.badge {
  display: inline-block;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--lime);
  background: var(--lime-dim);
  border: 1px solid rgba(200, 240, 79, .25);
  border-radius: 999px;
  padding: .35rem 1rem;
  margin-bottom: 1.4rem;
}

header h1 {
  font-family: var(--font-head);
  font-size: clamp(2rem, 5vw, 3.1rem);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 1rem;
  letter-spacing: -.02em;
}

header h1 em {
  font-style: normal;
  color: var(--lime);
}

.subtitle {
  color: var(--text-dim);
  font-size: 1.05rem;
  max-width: 580px;
  margin: 0 auto;
}

/* ---------- Layout ---------- */
main {
  max-width: 920px;
  margin: 0 auto;
  padding: 0 1.2rem 4rem;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.8rem;
  margin-bottom: 1.4rem;
}

.section-title {
  font-family: var(--font-head);
  font-size: 1.3rem;
  margin: 2.4rem 0 1rem;
  letter-spacing: -.01em;
}

.hidden { display: none !important; }

/* ---------- URL-Eingabe ---------- */
.url-bar {
  display: flex;
  align-items: center;
  gap: .6rem;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: .45rem .5rem .45rem 1.1rem;
  transition: border-color .2s, box-shadow .2s;
}

.url-bar:focus-within {
  border-color: var(--lime);
  box-shadow: 0 0 0 4px rgba(200, 240, 79, .12);
}

.url-icon { font-size: 1.1rem; opacity: .7; }

.url-bar input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 1.05rem;
  font-family: var(--font-body);
  min-width: 0;
}

.url-bar input::placeholder { color: var(--text-dim); }

#analyzeBtn {
  display: flex;
  align-items: center;
  gap: .5rem;
  background: var(--lime);
  color: #14180a;
  border: none;
  border-radius: 999px;
  padding: .7rem 1.5rem;
  font-family: var(--font-head);
  font-size: .98rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .15s, box-shadow .15s, opacity .15s;
}

#analyzeBtn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(200, 240, 79, .3);
}

#analyzeBtn:disabled { opacity: .45; cursor: wait; transform: none; box-shadow: none; }

.btn-arrow { transition: transform .15s; }
#analyzeBtn:hover .btn-arrow { transform: translateX(3px); }

/* ---------- Personas ---------- */
.persona-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 1.8rem 0 .9rem;
}

.persona-header h2 {
  font-family: var(--font-head);
  font-size: 1.1rem;
  margin: 0;
}

.link-btn {
  background: none;
  border: none;
  color: var(--cyan);
  font-size: .85rem;
  cursor: pointer;
  padding: 0;
  font-family: var(--font-body);
}

.link-btn:hover { text-decoration: underline; }
.dot-sep { color: var(--text-dim); margin: 0 .35rem; }

.persona-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: .7rem;
}

.persona-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .55rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .9rem 1rem;
  cursor: pointer;
  user-select: none;
  transition: border-color .15s, transform .15s, background .15s;
}

.persona-item:hover { border-color: var(--border-strong); transform: translateY(-2px); }

.persona-item.selected {
  border-color: rgba(200, 240, 79, .55);
  background: linear-gradient(160deg, rgba(200, 240, 79, .08), var(--surface-2) 55%);
}

.persona-item.selected::after {
  content: '✓';
  position: absolute;
  top: .6rem;
  right: .7rem;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  background: var(--lime);
  color: #14180a;
  font-size: .75rem;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.persona-item input { display: none; }

.persona-avatar {
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  font-size: 1.4rem;
}

.persona-name {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: .95rem;
}

.persona-desc {
  font-size: .8rem;
  color: var(--text-dim);
  line-height: 1.45;
}

/* ---------- Loading ---------- */
.loading-panel { text-align: center; padding: 2.5rem 1.8rem; }

.loading-personas {
  font-size: 2rem;
  display: flex;
  justify-content: center;
  gap: .4rem;
  margin-bottom: 1.6rem;
}

.loading-personas span {
  animation: bounce 1.4s ease-in-out infinite;
  display: inline-block;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); opacity: .45; }
  50% { transform: translateY(-9px); opacity: 1; }
}

.loading-steps {
  display: inline-flex;
  flex-direction: column;
  gap: .55rem;
  text-align: left;
  margin: 0 auto;
}

.step {
  display: flex;
  align-items: center;
  gap: .7rem;
  color: var(--text-dim);
  transition: color .3s;
}

.step-dot {
  width: .65rem;
  height: .65rem;
  border-radius: 50%;
  background: var(--border-strong);
  flex-shrink: 0;
  transition: background .3s, box-shadow .3s;
}

.step.active { color: var(--text); }
.step.active .step-dot {
  background: var(--lime);
  box-shadow: 0 0 10px rgba(200, 240, 79, .6);
  animation: pulse 1.2s ease-in-out infinite;
}

.step.done { color: var(--text-dim); }
.step.done .step-dot { background: var(--green); }

@keyframes pulse {
  50% { box-shadow: 0 0 16px rgba(200, 240, 79, .9); }
}

.loading-hint { color: var(--text-dim); font-size: .85rem; margin-top: 1.4rem; }

/* ---------- Fehler ---------- */
.error-panel {
  border-color: rgba(248, 113, 113, .4);
  color: var(--red);
  background: rgba(248, 113, 113, .06);
}

/* ---------- Ergebnis-Leiste ---------- */
.results-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: .8rem;
  margin: .4rem 0 1.2rem;
}

.score-pill {
  display: flex;
  align-items: center;
  gap: .8rem;
  font-family: var(--font-head);
}

.score-num {
  font-size: 2.1rem;
  font-weight: 700;
  color: var(--lime);
  line-height: 1;
}

.score-label {
  font-size: .8rem;
  color: var(--text-dim);
  line-height: 1.35;
}

.ghost-btn {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text);
  border-radius: 999px;
  padding: .5rem 1.1rem;
  font-size: .85rem;
  font-family: var(--font-body);
  cursor: pointer;
  margin-left: .4rem;
  transition: border-color .15s, background .15s;
}

.ghost-btn:hover { border-color: var(--lime); background: var(--lime-dim); }

/* ---------- Zusammenfassung ---------- */
.summary-panel h2 {
  font-family: var(--font-head);
  margin: 0 0 .8rem;
  font-size: 1.35rem;
}

.summary-panel .lead { font-size: 1.02rem; }

.summary-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
  margin: 1.4rem 0;
}

@media (max-width: 640px) { .summary-cols { grid-template-columns: 1fr; } }

.summary-col {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem 1.2rem;
}

.summary-col h3 {
  font-family: var(--font-head);
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin: 0 0 .6rem;
}

.summary-col.pos h3 { color: var(--green); }
.summary-col.neg h3 { color: var(--red); }

.summary-col ul { margin: 0; padding-left: 1.1rem; }
.summary-col li { margin-bottom: .35rem; font-size: .92rem; }

.empf-title {
  font-family: var(--font-head);
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--cyan);
  margin: 0 0 .6rem;
}

.empf-row {
  display: flex;
  gap: .8rem;
  align-items: baseline;
  padding: .55rem 0;
  border-top: 1px solid var(--border);
}

.prio-tag {
  flex-shrink: 0;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  border-radius: 6px;
  padding: .18rem .55rem;
}

.prio-tag.hoch { background: rgba(248, 113, 113, .15); color: var(--red); }
.prio-tag.mittel { background: rgba(251, 191, 36, .14); color: var(--amber); }
.prio-tag.niedrig { background: rgba(74, 222, 128, .13); color: var(--green); }

/* ---------- Persona-Berichte ---------- */
.report-list { display: flex; flex-direction: column; gap: .7rem; }

.report {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color .15s;
}

.report:hover { border-color: var(--border-strong); }
.report.open { border-color: rgba(200, 240, 79, .35); }

.report-head {
  display: flex;
  align-items: center;
  gap: .9rem;
  padding: .95rem 1.2rem;
  cursor: pointer;
  user-select: none;
}

.report-head .avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 11px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.report-head .name {
  font-family: var(--font-head);
  font-weight: 600;
  flex: 1;
}

.stars { color: var(--amber); letter-spacing: .12em; font-size: .95rem; }

.chevron {
  color: var(--text-dim);
  transition: transform .25s;
  font-size: .85rem;
}

.report.open .chevron { transform: rotate(90deg); }

.report-body {
  display: none;
  padding: .2rem 1.2rem 1.3rem;
  border-top: 1px solid var(--border);
}

.report.open .report-body { display: block; animation: fadeIn .25s ease; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}

.report-body h4 {
  font-family: var(--font-head);
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin: 1.1rem 0 .35rem;
}

.report-body h4.pos { color: var(--green); }
.report-body h4.neg { color: var(--red); }
.report-body ul { margin: 0; padding-left: 1.15rem; }
.report-body li { margin-bottom: .3rem; font-size: .93rem; }

.fazit {
  margin-top: 1rem;
  padding: .8rem 1rem;
  background: var(--surface-2);
  border-left: 3px solid var(--lime);
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: var(--text-dim);
  font-size: .93rem;
}

.report-error { color: var(--red); padding-top: .9rem; }

/* ---------- Screenshot im Browser-Rahmen ---------- */
.browser-frame {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}

.browser-chrome {
  display: flex;
  align-items: center;
  gap: .45rem;
  padding: .65rem 1rem;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}

.b-dot { width: .7rem; height: .7rem; border-radius: 50%; }
.b-dot.red { background: #ff5f57; }
.b-dot.yellow { background: #febc2e; }
.b-dot.green { background: #28c840; }

.browser-url {
  margin-left: .8rem;
  font-size: .8rem;
  color: var(--text-dim);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: .2rem .9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 70%;
}

.browser-frame img { width: 100%; display: block; }

/* ---------- Footer ---------- */
footer {
  text-align: center;
  color: var(--text-dim);
  font-size: .8rem;
  padding: 2rem 1rem 2.5rem;
}
