:root {
  color-scheme: light;
  --bg: #eef3ff;
  --bg-2: #f8fbff;
  --card: rgba(255, 255, 255, 0.82);
  --card-solid: #ffffff;
  --text: #101828;
  --muted: #667085;
  --muted-2: #98a2b3;
  --primary: #6259ff;
  --primary-2: #08a7ff;
  --dark: #111827;
  --border: rgba(148, 163, 184, 0.26);
  --ok: #079455;
  --warn: #dc6803;
  --danger: #d92d20;
  --shadow: 0 24px 80px rgba(30, 41, 59, 0.13);
  --radius: 28px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 8% 8%, rgba(98, 89, 255, 0.24), transparent 28%),
    radial-gradient(circle at 86% 4%, rgba(8, 167, 255, 0.22), transparent 28%),
    radial-gradient(circle at 72% 92%, rgba(0, 210, 140, 0.14), transparent 30%),
    linear-gradient(180deg, var(--bg), var(--bg-2));
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.24) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.24) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.55), transparent 70%);
}

button,
input,
textarea { font: inherit; }

button {
  border: 0;
  border-radius: 18px;
  padding: 15px 18px;
  color: #fff;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease;
}

button:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(98, 89, 255, 0.26);
}

button:disabled {
  opacity: .48;
  cursor: not-allowed;
}

.shell {
  position: relative;
  width: min(1220px, calc(100% - 36px));
  margin: 0 auto;
  padding: 38px 0 54px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
  align-items: stretch;
  margin-bottom: 24px;
}

.hero-copy,
.hero-card,
.panel {
  border: 1px solid rgba(255, 255, 255, 0.72);
  background: var(--card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.hero-copy {
  border-radius: 34px;
  padding: clamp(26px, 4vw, 46px);
}

.eyebrow,
.kicker {
  margin: 0 0 10px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p { margin-top: 0; }

h1 {
  max-width: 820px;
  margin-bottom: 16px;
  font-size: clamp(36px, 6vw, 72px);
  line-height: .98;
  letter-spacing: -0.055em;
}

h2 {
  margin-bottom: 0;
  font-size: 22px;
  letter-spacing: -0.03em;
}

.subtitle {
  max-width: 720px;
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-actions span,
.pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 8px 12px;
  border: 1px solid rgba(98, 89, 255, .14);
  border-radius: 999px;
  background: rgba(255,255,255,.7);
  color: #3b3fdd;
  font-size: 13px;
  font-weight: 800;
}

.hero-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 250px;
  border-radius: 34px;
  padding: 26px;
}

.hero-card::after {
  content: "AI";
  position: absolute;
  top: 18px;
  right: 24px;
  color: rgba(16, 24, 40, 0.05);
  font-size: 118px;
  font-weight: 1000;
  letter-spacing: -.08em;
}

.hero-card strong { font-size: 22px; }
.hero-card p { margin: 8px 0 0; color: var(--muted); line-height: 1.7; }

.orb {
  width: 92px;
  height: 92px;
  margin-bottom: 42px;
  border-radius: 30px;
  background:
    radial-gradient(circle at 30% 25%, #fff, transparent 24%),
    linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 24px 50px rgba(98, 89, 255, .32);
  transform: rotate(-10deg);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.48fr) minmax(310px, .72fr);
  gap: 22px;
  align-items: start;
}

.panel {
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 22px;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.panel-head.compact { margin-bottom: 16px; }

.creator-card {
  display: grid;
  gap: 17px;
}

label {
  display: grid;
  gap: 9px;
  color: #344054;
  font-weight: 800;
}

label span { font-size: 14px; }

input,
textarea {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.36);
  border-radius: 18px;
  padding: 15px 16px;
  color: var(--text);
  background: rgba(255,255,255,.9);
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

textarea { resize: vertical; line-height: 1.7; }

input:focus,
textarea:focus {
  border-color: rgba(98, 89, 255, 0.78);
  background: #fff;
  box-shadow: 0 0 0 5px rgba(98, 89, 255, 0.12);
}

.field-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 14px;
}

.upload {
  position: relative;
  min-height: 285px;
  place-items: center;
  overflow: hidden;
  border: 1.5px dashed rgba(98, 89, 255, .42);
  border-radius: 26px;
  background:
    linear-gradient(135deg, rgba(98, 89, 255, .08), rgba(8, 167, 255, .07)),
    rgba(255,255,255,.78);
  text-align: center;
  cursor: pointer;
}

.upload input { display: none; }
.upload strong { font-size: 20px; }
.upload small { max-width: 340px; color: var(--muted); font-weight: 500; line-height: 1.7; }

.upload-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 18px;
  color: #fff;
  font-size: 32px;
  font-weight: 300;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 18px 36px rgba(98, 89, 255, .24);
}

.upload img {
  position: absolute;
  inset: 14px;
  z-index: 2;
  width: calc(100% - 28px);
  height: calc(100% - 28px);
  object-fit: contain;
  border-radius: 20px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, .18);
}

.button-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

#generateBtn { background: linear-gradient(135deg, #111827, #475467); }

.side-stack {
  display: grid;
  gap: 0;
}

.status {
  position: relative;
  padding: 16px 16px 16px 46px;
  border-radius: 20px;
  background: #eef2ff;
  color: #4338ca;
  font-weight: 900;
  line-height: 1.55;
}

.status::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 22px;
  width: 12px;
  height: 12px;
  border-radius: 99px;
  background: currentColor;
  box-shadow: 0 0 0 6px rgba(98, 89, 255, 0.12);
}

.status.ok { background: #ecfdf3; color: var(--ok); }
.status.warn { background: #fff7ed; color: var(--warn); }
.status.err { background: #fef3f2; color: var(--danger); }

.meta {
  margin-top: 16px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(248, 250, 252, .8);
  color: var(--muted);
  line-height: 1.9;
  word-break: break-all;
}

.meta.empty { color: var(--muted-2); }

.strategy-card ul {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.strategy-card li {
  position: relative;
  padding-left: 24px;
  color: var(--muted);
  line-height: 1.6;
}

.strategy-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .65em;
  width: 9px;
  height: 9px;
  border-radius: 99px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
}

.ghost-btn {
  width: auto;
  padding: 10px 14px;
  border: 1px solid rgba(17, 24, 39, .08);
  color: var(--dark);
  background: rgba(255,255,255,.78);
}

pre {
  margin: 0;
  max-height: 520px;
  overflow: auto;
  padding: 18px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 22px;
  background: #0b1020;
  color: #d7e3ff;
  line-height: 1.65;
  white-space: pre-wrap;
}

.segments {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.segment {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: rgba(255,255,255,.9);
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.07);
}

.segment-media {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 280px;
  background:
    linear-gradient(135deg, rgba(17, 24, 39, .92), rgba(43, 49, 72, .94));
}

.segment-media video {
  display: block;
  width: 100%;
  aspect-ratio: 9 / 16;
  max-height: 560px;
  background: #050816;
  object-fit: contain;
}

.video-placeholder {
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 28px;
  color: rgba(255,255,255,.86);
  background: rgba(255,255,255,.08);
  font-size: 34px;
}

.segment-body {
  padding: 17px;
}

.segment-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.segment h3 {
  margin: 0;
  font-size: 18px;
}

.segment p {
  margin: 8px 0;
  color: var(--muted);
  line-height: 1.7;
}

.status-chip {
  flex: 0 0 auto;
  padding: 6px 9px;
  border-radius: 999px;
  background: #eef2ff;
  color: #4338ca;
  font-size: 12px;
  font-weight: 900;
}

.status-chip.succeeded,
.status-chip.success,
.status-chip.done,
.status-chip.finished { background: #ecfdf3; color: var(--ok); }
.status-chip.failed,
.status-chip.fail,
.status-chip.error { background: #fef3f2; color: var(--danger); }
.status-chip.processing,
.status-chip.submitted { background: #fff7ed; color: var(--warn); }

.segment-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.segment-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

.segment-actions a.secondary {
  color: var(--dark);
  background: #f2f4f7;
}

@media (max-width: 920px) {
  .hero,
  .workspace { grid-template-columns: 1fr; }
  .hero-card { min-height: 210px; }
}

@media (max-width: 640px) {
  .shell { width: min(100% - 24px, 1220px); padding-top: 20px; }
  .hero-copy,
  .hero-card,
  .panel { border-radius: 22px; padding: 18px; }
  .field-grid,
  .button-row { grid-template-columns: 1fr; }
  .upload { min-height: 230px; }
  .panel-head { flex-direction: column; }
  h1 { font-size: 38px; }
}
