:root {
  color-scheme: dark;
  --line: rgba(122, 191, 255, 0.22);
  --muted: #aeb9d6;
  --panel: rgba(11, 20, 54, 0.88);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  color: #fff;
  font-family: Inter, system-ui, sans-serif;
  background:
    radial-gradient(circle at 10% 0%, rgba(0, 210, 255, 0.2), transparent 34rem),
    radial-gradient(circle at 88% 10%, rgba(239, 55, 219, 0.22), transparent 34rem),
    #030816;
}
button, input, select, textarea { font: inherit; }
.generator-header {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 18px clamp(18px, 4vw, 54px); border-bottom: 1px solid var(--line);
  background: rgba(3, 8, 22, 0.78); backdrop-filter: blur(18px);
}
.generator-brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; font-weight: 900; }
.generator-brand span { width: 30px; height: 30px; border-radius: 9px; transform: rotate(45deg); background: linear-gradient(135deg, #2be4ff, #8757ff, #f642d7); }
.generator-header nav { display: flex; gap: 10px; flex-wrap: wrap; }
.generator-header nav a { color: #dce5ff; text-decoration: none; padding: 10px 14px; border-radius: 999px; }
.generator-shell { width: min(1280px, calc(100% - 32px)); margin: 0 auto; padding: 52px 0 80px; }
.generator-hero { display: flex; justify-content: space-between; align-items: end; gap: 28px; margin-bottom: 28px; }
.eyebrow, .step-label { margin: 0 0 8px; color: #60eaff; text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 900; }
h1, h2 { font-family: "Baloo 2", Inter, sans-serif; margin: 0; line-height: 1; }
h1 { max-width: 800px; font-size: clamp(2.6rem, 6vw, 5.6rem); }
.generator-hero p:not(.eyebrow) { max-width: 760px; color: var(--muted); font-size: 1.1rem; line-height: 1.6; }
.credit-badge { min-width: 150px; padding: 18px; text-align: center; border: 1px solid var(--line); border-radius: 22px; background: var(--panel); }
.credit-badge strong { display: block; font-size: 2.4rem; }
.credit-badge span { color: var(--muted); }
.generator-grid { display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); gap: 24px; align-items: start; }
.generator-panel { padding: clamp(22px, 3vw, 34px); border: 1px solid var(--line); border-radius: 28px; background: linear-gradient(145deg, rgba(17, 32, 82, .92), var(--panel)); box-shadow: 0 30px 80px rgba(0,0,0,.3); }
.generator-form { display: grid; gap: 22px; }
.generator-form label { display: grid; gap: 9px; font-weight: 800; }
textarea, select { width: 100%; border: 1px solid rgba(159,216,255,.24); border-radius: 16px; background: rgba(2,7,25,.68); color: #fff; padding: 15px; outline: none; }
textarea:focus, select:focus { border-color: #43dfff; box-shadow: 0 0 0 3px rgba(67,223,255,.12); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.primary-button { min-height: 58px; border: 0; border-radius: 16px; color: #fff; font-weight: 900; cursor: pointer; background: linear-gradient(135deg, #467bff, #8a4dff 52%, #ed40d7); box-shadow: 0 16px 42px rgba(107,76,255,.3); }
.primary-button:disabled { opacity: .6; cursor: wait; }
.generator-status { min-height: 22px; margin: 0; color: #8ff3ff; }
.generator-status.is-error { color: #ff9bb8; }
.result-panel { min-height: 620px; }
.empty-result { min-height: 540px; display: grid; place-items: center; align-content: center; text-align: center; color: var(--muted); }
.empty-result h2 { color: #fff; font-size: 2rem; margin-top: 22px; }
.empty-result p { max-width: 470px; line-height: 1.6; }
.spark-orb { width: 130px; height: 130px; border-radius: 50%; background: radial-gradient(circle, #fff 0 4%, #41dfff 8%, #8051ff 42%, transparent 68%); box-shadow: 0 0 80px #7c4fff; }
.generated-result { display: grid; gap: 20px; }
.generated-result > h2 { font-size: clamp(2rem, 4vw, 3.4rem); }
.generated-result > p { color: var(--muted); line-height: 1.6; }
.result-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.result-cards article { padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.05); }
.result-cards span { color: #64eaff; font-size: .75rem; text-transform: uppercase; font-weight: 900; }
.result-cards strong { display: block; margin: 7px 0; font-size: 1.15rem; }
.result-cards p { margin: 0; color: var(--muted); line-height: 1.45; }
.scene-preview { display: grid; gap: 10px; max-height: 430px; overflow: auto; padding-right: 5px; }
.scene-preview article { display: grid; grid-template-columns: 38px 1fr; gap: 12px; padding: 14px; border-radius: 16px; background: rgba(3,9,30,.62); }
.scene-preview article > span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: linear-gradient(135deg, #39dfff, #8b52ff); font-weight: 900; }
.scene-preview strong { display: block; margin-bottom: 5px; }
.scene-preview p { margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.45; }
@media (max-width: 820px) {
  .generator-header { align-items: flex-start; }
  .generator-header nav { display: none; }
  .generator-hero { align-items: flex-start; flex-direction: column; }
  .generator-grid { grid-template-columns: 1fr; }
  .form-grid, .result-cards { grid-template-columns: 1fr; }
  .generator-shell { width: min(100% - 20px, 1280px); padding-top: 30px; }
}
