:root {
  --bg-top: #ffe6b8;
  --bg-bottom: #e6f5f1;
  --surface: rgba(255, 252, 246, 0.9);
  --surface-strong: #fffefb;
  --line: rgba(23, 37, 84, 0.12);
  --ink: #10233e;
  --muted: #5d6b80;
  --accent: #0f766e;
  --accent-soft: rgba(15, 118, 110, 0.12);
  --warm: #c56d1c;
  --danger: #b42318;
  --danger-soft: rgba(180, 35, 24, 0.12);
  --shadow: 0 24px 70px rgba(16, 35, 62, 0.12);
  --radius-xl: 28px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --font-body: "Segoe UI Variable Text", "Trebuchet MS", "Segoe UI", sans-serif;
  --font-heading: "Segoe UI Variable Display", "Trebuchet MS", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  color: var(--ink);
  font-family: var(--font-body);
  background:
    radial-gradient(circle at top left, rgba(255, 214, 143, 0.92), transparent 34%),
    radial-gradient(circle at top right, rgba(119, 209, 190, 0.4), transparent 28%),
    linear-gradient(135deg, var(--bg-top) 0%, var(--bg-bottom) 100%);
}

button,
input,
textarea,
select {
  font: inherit;
}

.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0 64px;
}

.hero-card,
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.hero-card {
  padding: 34px;
  margin-bottom: 24px;
}

.eyebrow,
.panel-kicker {
  margin: 0 0 10px;
  color: var(--warm);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-heading);
}

h1 {
  max-width: 780px;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.05;
}

.hero-copy {
  max-width: 760px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.04rem;
  line-height: 1.7;
}

.panel {
  padding: 28px;
  margin-bottom: 24px;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.panel-head h2 {
  font-size: 1.7rem;
}

.config-summary,
.result-summary {
  max-width: 500px;
  margin: 4px 0 0;
  color: var(--muted);
  text-align: right;
  line-height: 1.5;
}

.form-grid {
  display: grid;
  gap: 18px;
}

.field {
  display: grid;
  gap: 10px;
}

.field span {
  font-weight: 700;
}

textarea,
input,
select {
  width: 100%;
  border: 1px solid rgba(16, 35, 62, 0.14);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.74);
  color: var(--ink);
  padding: 14px 16px;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

textarea {
  min-height: 220px;
  resize: vertical;
}

textarea:focus,
input:focus,
select:focus {
  outline: none;
  border-color: rgba(15, 118, 110, 0.7);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.12);
}

.actions,
.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
}

.primary-btn,
.ghost-btn,
.copy-btn {
  border: 0;
  cursor: pointer;
  transition: transform 180ms ease, opacity 180ms ease, box-shadow 180ms ease;
}

.primary-btn:hover,
.ghost-btn:hover,
.copy-btn:hover {
  transform: translateY(-1px);
}

.primary-btn:disabled {
  opacity: 0.65;
  cursor: wait;
}

.primary-btn {
  padding: 13px 20px;
  border-radius: 999px;
  background: linear-gradient(135deg, #0f766e 0%, #0a8f84 100%);
  color: white;
  box-shadow: 0 18px 34px rgba(15, 118, 110, 0.28);
}

.ghost-btn,
.copy-btn {
  padding: 11px 16px;
  border-radius: 999px;
  background: white;
  color: var(--ink);
  border: 1px solid var(--line);
}

.hidden {
  display: none;
}

.result-list {
  display: grid;
  gap: 16px;
}

.empty-state {
  min-height: 120px;
  place-items: center;
  display: grid;
  padding: 20px;
  text-align: center;
  color: var(--muted);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.55);
  border: 1px dashed rgba(16, 35, 62, 0.16);
}

.result-card {
  padding: 22px;
  border-radius: 24px;
  background: var(--surface-strong);
  border: 1px solid var(--line);
}

.result-card.is-success {
  box-shadow: inset 0 0 0 1px rgba(15, 118, 110, 0.08);
}

.result-card.is-error {
  box-shadow: inset 0 0 0 1px rgba(180, 35, 24, 0.08);
}

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.status-line {
  margin: 6px 0 0;
  color: var(--muted);
}

.status-badge {
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status-badge.ok {
  background: var(--accent-soft);
  color: var(--accent);
}

.status-badge.error {
  background: var(--danger-soft);
  color: var(--danger);
}

.error-message {
  margin: 0 0 16px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--danger-soft);
  color: var(--danger);
  line-height: 1.5;
}

.result-field + .result-field,
.notes-block {
  margin-top: 14px;
}

.preview-block {
  margin-bottom: 16px;
}

.preview-label {
  margin: 0 0 10px;
  font-weight: 700;
}

.preview-frame {
  overflow: hidden;
  border-radius: var(--radius-md);
  border: 1px solid rgba(16, 35, 62, 0.08);
  background: rgba(16, 35, 62, 0.04);
}

.preview-frame iframe,
.preview-frame video {
  display: block;
  width: 100%;
  min-height: 360px;
  border: 0;
  background: #000;
}

.field-headline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.field-label,
.notes-title {
  font-weight: 700;
}

.field-value,
.notes-text {
  margin: 0;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: rgba(16, 35, 62, 0.04);
  border: 1px solid rgba(16, 35, 62, 0.08);
  color: var(--ink);
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

@media (max-width: 880px) {
  .page-shell {
    width: min(100% - 20px, 100%);
    padding-top: 20px;
  }

  .hero-card,
  .panel {
    padding: 20px;
    border-radius: 22px;
  }

  .panel-head,
  .card-head,
  .result-actions {
    display: grid;
    gap: 12px;
  }

  .config-summary,
  .result-summary {
    max-width: none;
    text-align: left;
  }

  .actions,
  .result-actions {
    justify-content: flex-start;
  }
}
