:root {
  --ink: #171923;
  --muted: #626d7f;
  --paper: #ffffff;
  --line: #e3e7ef;
  --wash: #f7f8fc;
  --pink: #ff4f87;
  --violet: #7157ff;
  --cyan: #33d5d0;
  --orange: #ff8b3d;
  --green: #14a66d;
  --shadow: 0 18px 50px rgba(31, 35, 48, .12);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 12%, rgba(255, 79, 135, .18), transparent 28%),
    radial-gradient(circle at 82% 16%, rgba(51, 213, 208, .16), transparent 30%),
    var(--wash);
}

button,
input,
select {
  font: inherit;
}

.app-shell {
  width: min(1480px, 100%);
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(360px, 500px) minmax(0, 1fr);
  gap: 22px;
  margin: 0 auto;
  padding: clamp(16px, 3vw, 34px);
}

.tool-panel,
.output-card {
  border: 1px solid rgba(227, 231, 239, .92);
  border-radius: 8px;
  background: rgba(255, 255, 255, .92);
  box-shadow: var(--shadow);
}

.tool-panel {
  padding: clamp(22px, 4vw, 34px);
  align-self: start;
  position: sticky;
  top: 24px;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 34px;
}

.logo {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: var(--ink);
  font-weight: 900;
}

.brand-row strong,
.brand-row small {
  display: block;
}

.brand-row small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--pink);
  font-size: 13px;
  font-weight: 900;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 14px;
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.05;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(24px, 3vw, 34px);
}

.tool-heading p:not(.eyebrow),
.monetize-box p {
  color: var(--muted);
  line-height: 1.7;
}

.generator-form {
  display: grid;
  gap: 16px;
  margin-top: 28px;
}

label {
  display: grid;
  gap: 8px;
}

label span {
  color: #343b48;
  font-weight: 800;
}

input,
select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 14px;
  color: var(--ink);
  background: #fff;
  outline: none;
}

input:focus,
select:focus {
  border-color: var(--pink);
  box-shadow: 0 0 0 4px rgba(255, 79, 135, .12);
}

.form-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-top: 6px;
}

.primary,
.secondary,
.copy-all,
.monetize-box button {
  min-height: 48px;
  border: 0;
  border-radius: 7px;
  padding: 0 16px;
  cursor: pointer;
  font-weight: 900;
}

.primary {
  color: #fff;
  background: var(--pink);
  box-shadow: 0 12px 26px rgba(255, 79, 135, .24);
}

.secondary,
.copy-all {
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
}

.result-panel {
  display: grid;
  gap: 18px;
}

.visual-card {
  min-height: 280px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #fff;
}

.visual-card img {
  width: 100%;
  height: 100%;
  max-height: 380px;
  display: block;
  object-fit: cover;
}

.output-card {
  padding: clamp(20px, 4vw, 30px);
}

.output-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.results-grid {
  display: grid;
  grid-template-columns: minmax(280px, 1.2fr) minmax(230px, .9fr);
  gap: 16px;
}

.results-grid section {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: #fff;
}

.results-grid section:first-child {
  grid-row: span 2;
}

ol,
ul {
  margin: 0;
  padding-left: 22px;
}

li {
  margin: 0 0 11px;
  line-height: 1.55;
}

.palette-list {
  display: grid;
  gap: 12px;
}

.palette {
  display: grid;
  gap: 8px;
}

.swatches {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: 34px;
  overflow: hidden;
  border-radius: 6px;
  border: 1px solid var(--line);
}

.swatches span {
  display: block;
}

.palette strong {
  font-size: 14px;
}

.monetize-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
  padding: 18px;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, var(--ink), var(--violet) 55%, var(--pink));
}

.monetize-box p {
  margin-bottom: 0;
  color: rgba(255, 255, 255, .78);
}

.monetize-box button {
  color: var(--ink);
  background: #fff;
  white-space: nowrap;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 20;
  transform: translateX(-50%) translateY(14px);
  padding: 10px 14px;
  border-radius: 7px;
  color: #fff;
  background: rgba(23, 25, 35, .94);
  opacity: 0;
  pointer-events: none;
  transition: .2s ease;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 1060px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .tool-panel {
    position: static;
  }
}

@media (max-width: 720px) {
  .app-shell {
    padding: 12px;
  }

  .form-actions,
  .results-grid,
  .monetize-box {
    grid-template-columns: 1fr;
  }

  .output-head {
    align-items: stretch;
    flex-direction: column;
  }

  .copy-all {
    width: 100%;
  }

  .monetize-box {
    display: grid;
  }
}
