:root {
  --ink: #111827;
  --muted: #667085;
  --line: #e6e8ef;
  --paper: #ffffff;
  --soft: #f5f7fb;
  --cyan: #12b3d6;
  --blue: #3157ff;
  --lime: #b7e64b;
  --rose: #ff5578;
  --gold: #f4b740;
  --shadow: 0 24px 70px rgba(24, 31, 56, .12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  color: var(--ink);
  background: #f7f9fc;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; }

.container {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255,255,255,.86);
  border-bottom: 1px solid rgba(230,232,239,.9);
  backdrop-filter: blur(16px);
}
.nav {
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 28px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 170px;
}
.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  font-weight: 800;
  letter-spacing: 0;
  background: linear-gradient(135deg, var(--blue), var(--cyan) 56%, var(--lime));
  box-shadow: 0 10px 30px rgba(49,87,255,.24);
}
.brand strong { display: block; font-size: 18px; }
.brand em { display: block; margin-top: 2px; color: var(--muted); font-style: normal; font-size: 12px; }
.main-nav {
  display: flex;
  gap: 8px;
  margin-left: auto;
}
.main-nav a {
  padding: 10px 14px;
  border-radius: 8px;
  color: #384152;
}
.main-nav a:hover { background: #eef3ff; color: var(--blue); }
.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ghost-link, .primary-link {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 16px;
  border-radius: 8px;
  font-weight: 700;
}
.ghost-link { color: #384152; border: 1px solid var(--line); }
.primary-link { color: #fff; background: var(--ink); }
.menu-btn { display: none; border: 0; background: transparent; padding: 8px; }
.menu-btn span { display: block; width: 22px; height: 2px; margin: 5px 0; background: var(--ink); }

.hero {
  min-height: 720px;
  display: flex;
  align-items: center;
  background:
    radial-gradient(circle at 8% 18%, rgba(18,179,214,.18), transparent 28%),
    radial-gradient(circle at 92% 10%, rgba(244,183,64,.18), transparent 24%),
    linear-gradient(180deg, #fff 0%, #f7f9fc 100%);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 520px;
  align-items: center;
  gap: 58px;
  padding: 76px 0 86px;
}
.eyebrow {
  display: inline-flex;
  margin-bottom: 16px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}
.hero h1 {
  margin: 0;
  max-width: 680px;
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1.04;
  letter-spacing: 0;
}
.hero-copy p, .section-copy p {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.9;
}
.hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 32px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 800;
}
.btn-primary { color: #fff; background: var(--blue); box-shadow: 0 16px 34px rgba(49,87,255,.24); }
.btn-secondary { color: var(--ink); background: #fff; border-color: var(--line); }
.btn-wide { width: 100%; }
.metric-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 42px;
}
.metric-strip div {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.76);
}
.metric-strip strong { display: block; font-size: 25px; }
.metric-strip span { display: block; margin-top: 6px; color: var(--muted); }

.hero-preview {
  padding: 16px;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 22px;
  background: rgba(17,24,39,.9);
  box-shadow: var(--shadow);
}
.preview-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 4px 14px;
  color: #aeb7c8;
}
.preview-toolbar span { width: 10px; height: 10px; border-radius: 50%; background: var(--rose); }
.preview-toolbar span:nth-child(2) { background: var(--gold); }
.preview-toolbar span:nth-child(3) { background: var(--lime); }
.preview-toolbar em { margin-left: auto; font-style: normal; font-size: 12px; }
.prompt-card {
  padding: 18px;
  border-radius: 14px;
  background: #fff;
}
.prompt-card label, .field label {
  display: block;
  margin-bottom: 10px;
  color: #384152;
  font-weight: 800;
}
textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  outline: none;
}
textarea {
  min-height: 112px;
  padding: 14px;
  resize: vertical;
  line-height: 1.7;
}
select { height: 46px; padding: 0 12px; }
.prompt-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.prompt-options button {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 12px;
  background: #fff;
  cursor: pointer;
}
.prompt-options button.active { color: #fff; background: var(--ink); border-color: var(--ink); }
.generated-frame {
  position: relative;
  margin-top: 14px;
  overflow: hidden;
  border-radius: 16px;
  aspect-ratio: 4 / 3;
}
.generated-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.05);
}
.generation-status {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  display: flex;
  justify-content: space-between;
  padding: 12px 14px;
  border-radius: 8px;
  color: #fff;
  background: rgba(17,24,39,.76);
}

.studio-section, .gallery-section, .features-section, .pricing-section { padding: 88px 0; }
.studio-section { background: #fff; }
.studio-grid {
  display: grid;
  grid-template-columns: .85fr 1.05fr .9fr;
  gap: 26px;
  align-items: stretch;
}
.section-copy h2, .section-head h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.18;
  letter-spacing: 0;
}
.generator-panel, .result-panel, .price-card, .feature-grid article {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  box-shadow: 0 12px 36px rgba(24,31,56,.06);
}
.generator-panel { padding: 22px; }
.field { margin-bottom: 16px; }
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.quality-control {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  margin: 6px 0 22px;
}
.quality-control input { width: 100%; accent-color: var(--blue); }
.result-panel { overflow: hidden; }
.result-image { aspect-ratio: 1 / 1; background: var(--soft); }
.result-image img { width: 100%; height: 100%; object-fit: cover; transition: opacity .24s ease; }
.result-meta { padding: 18px; }
.result-meta strong { display: block; font-size: 18px; }
.result-meta span { display: block; margin-top: 8px; color: var(--muted); line-height: 1.6; }

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
}
.section-head a, .billing-note { color: var(--blue); font-weight: 800; }
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 220px;
  gap: 16px;
}
.work-card {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  background: #ddd;
}
.work-card.tall { grid-row: span 2; }
.work-card.wide { grid-column: span 2; }
.work-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.work-card:hover img { transform: scale(1.05); }
.work-card div {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  padding: 12px;
  border-radius: 8px;
  color: #fff;
  background: rgba(17,24,39,.76);
}
.work-card strong, .work-card span { display: block; }
.work-card span { margin-top: 4px; color: #d7dce6; }

.features-section { background: #101722; color: #fff; }
.centered { text-align: center; max-width: 720px; margin: 0 auto 34px; }
.features-section .section-copy p { color: #b7c0d2; }
.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.feature-grid article {
  padding: 24px;
  color: #101722;
}
.feature-grid span { color: var(--blue); font-weight: 900; }
.feature-grid h3 { margin: 18px 0 10px; font-size: 22px; }
.feature-grid p { margin: 0; color: var(--muted); line-height: 1.75; }

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.price-card { padding: 28px; }
.price-card.featured {
  border-color: rgba(49,87,255,.35);
  transform: translateY(-10px);
  box-shadow: 0 26px 70px rgba(49,87,255,.16);
}
.price-card h3 { margin: 0; font-size: 24px; }
.price-card p { color: var(--muted); line-height: 1.7; }
.price-card strong {
  display: block;
  margin: 24px 0;
  font-size: 40px;
}
.price-card em { color: var(--muted); font-size: 15px; font-style: normal; }
.price-card ul { margin: 0 0 26px; padding: 0; list-style: none; }
.price-card li { padding: 9px 0; color: #384152; border-bottom: 1px solid var(--line); }

.site-footer {
  padding: 52px 0;
  color: #c7cfdd;
  background: #0b1018;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr .7fr .7fr 1fr;
  gap: 28px;
}
.footer-brand { color: #fff; }
.site-footer p { line-height: 1.8; color: #98a2b3; }
.site-footer h4 { margin: 0 0 14px; color: #fff; }
.site-footer a:not(.brand) { display: block; margin: 10px 0; color: #c7cfdd; }

@media (max-width: 980px) {
  .main-nav, .nav-actions { display: none; }
  .menu-btn { display: block; margin-left: auto; }
  .site-header.menu-open .main-nav {
    position: absolute;
    left: 20px;
    right: 20px;
    top: 76px;
    display: grid;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    box-shadow: var(--shadow);
  }
  .hero-grid, .studio-grid, .pricing-grid, .footer-grid { grid-template-columns: 1fr; }
  .hero { min-height: auto; }
  .hero-grid { padding-top: 48px; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .price-card.featured { transform: none; }
}

@media (max-width: 640px) {
  .container { width: min(100% - 24px, 1180px); }
  .nav { min-height: 68px; }
  .brand { min-width: auto; }
  .brand em { display: none; }
  .hero h1 { font-size: 38px; }
  .hero-actions, .metric-strip, .form-row, .section-head { grid-template-columns: 1fr; display: grid; }
  .gallery-grid { grid-template-columns: 1fr; grid-auto-rows: 240px; }
  .work-card.tall, .work-card.wide { grid-row: auto; grid-column: auto; }
  .feature-grid { grid-template-columns: 1fr; }
  .studio-section, .gallery-section, .features-section, .pricing-section { padding: 60px 0; }
}
