:root {
  --bg: #0F1117;
  --card: #161922;
  --card-hover: #1B1E28;
  --text: #E4E6EC;
  --muted: #8B8FA3;
  --border: #252A36;
  --accent: #B25744;
  --accent-soft: rgba(178, 87, 68, .15);
  --radius: 14px;
  --radius-sm: 10px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ===== Hero Header (Logo + Title) ===== */
.hero {
  text-align: center;
  padding: 44px 24px 36px;
  background: linear-gradient(180deg, rgba(255,255,255,0.03) 0%, transparent 100%);
}
.hero-inner {
  max-width: 600px;
  margin: 0 auto;
}
.hero-logo {
  width: 260px;
  height: auto;
  margin: 0 auto 18px;
  display: block;
  filter: drop-shadow(0 4px 24px rgba(178,87,68,0.18));
  transition: transform .3s ease;
}
.hero-logo:hover { transform: scale(1.04); }
.hero h1 {
  margin: 0;
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
  font-size: 44px;
  font-weight: 700;
  letter-spacing: .3px;
  background: linear-gradient(135deg, #ECEDEF 0%, #b8bcc6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub {
  margin: 14px 0 0;
  font-size: 14.5px;
  color: var(--muted);
  line-height: 1.65;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 640px) {
  .hero { padding: 32px 20px 28px; }
  .hero-logo { width: 200px; margin-bottom: 14px; }
  .hero h1 { font-size: 32px; }
  .hero-sub { font-size: 13.5px; }
}

.container { max-width: 1080px; margin: 0 auto; padding: 20px 24px 64px; }

/* 两栏网格：左=上传+预览，右=色板 */
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
@media (max-width: 800px) { .grid { grid-template-columns: 1fr; } }

.col-left { display: flex; flex-direction: column; gap: 20px; }

.col-right { display: flex; flex-direction: column; gap: 20px; align-items: stretch; }

/* 卡片 */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.card-palette { display: flex; flex-direction: column; }

.card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--border);
}
.card-icon { font-size: 15px; }
.badge {
  font-size: 11px;
  font-weight: 500;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: auto;
}

/* 上传区 */
.card-upload-body {
  padding: 12px 18px 18px;
}
.dropzone {
  width: 100%;
  min-height: 120px;
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  outline: none !important;
  box-shadow: none !important;
  -webkit-tap-highlight-color: transparent;
}
.dropzone:hover { border-color: var(--accent); background: var(--accent-soft); }
.dropzone:focus-visible {
  border-color: var(--accent) !important;
  background: var(--accent-soft) !important;
  outline: none !important;
  box-shadow: none !important;
}
.dropzone:focus { outline: none !important; box-shadow: none !important; }
.dropzone.dragover { border-color: var(--accent); background: var(--accent-soft); }
.dz-inner { display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--muted); text-align: center; }
.dz-icon { font-size: 28px; line-height: 1; color: var(--accent); font-weight: 700; }
.dz-text { font-size: 13px; color: var(--accent); font-weight: 700; }
.dz-hint { font-size: 11px; }

/* 预览卡片内边距 */
.card-preview-body { padding: 12px 18px 18px; }

.stage {
  position: relative;
  width: 100%;
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  border-radius: var(--radius-sm);
  background: #11141C;
  border: 1px solid var(--border);
  padding: 6px;
}
.preview-img { display: block; max-width: 100%; max-height: 360px; border-radius: 6px; }

.empty-hint {
  font-size: 13px;
  color: var(--muted);
  user-select: none;
}

.stage-hint-text {
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
  margin-left: auto;
}
.stage-hint-text[hidden] { display: none; }

.lens {
  position: absolute;
  width: 120px; height: 120px;
  border-radius: 50%;
  border: 2.5px solid rgba(255,255,255,.85);
  box-shadow: 0 3px 14px rgba(0,0,0,.5);
  background-repeat: no-repeat;
  pointer-events: none;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
  z-index: 3;
}
.lens[hidden] { display: none; }
.lens-hex {
  font-size: 11px;
  font-family: "SF Mono", Menlo, Consolas, monospace;
  background: rgba(0,0,0,.65);
  color: #fff;
  padding: 2px 7px;
  border-radius: 4px;
  margin-bottom: 8px;
}

/* 卡片标题栏右侧操作（清空按钮） */
.head-clear {
  margin-left: auto;
  border: none;
  background: none;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 6px;
}
.head-clear:hover { color: var(--accent); }

/* 右列色板列表 */
.palette-list {
  flex: 1;
  padding: 8px 18px 18px;
}
.palette-empty {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  padding: 60px 0;
}

/* 每行颜色：色块 | hex | 占比 | 占比条 */
.color-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255,255,255,.04);
  cursor: pointer;
  transition: background .1s;
  border-radius: 6px;
  margin: 0 -4px;
  padding-left: 4px;
  padding-right: 4px;
}
.color-row:hover { background: rgba(255,255,255,.03); }
.color-row:last-child { border-bottom: none; }

.cr-chip {
  width: 34px; height: 34px;
  border-radius: 8px;
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,.08);
}
.cr-info { flex: 1; min-width: 0; }
.cr-line {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.cr-hex {
  font-family: "SF Mono", Menlo, Consolas, monospace;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
}
.cr-hex:hover { color: var(--accent); }
.cr-pct {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}
.cr-sub {
  margin-top: 3px;
  font-family: "SF Mono", Menlo, Consolas, monospace;
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}
.cr-chan { cursor: pointer; transition: color .1s; }
.cr-chan:hover { color: var(--text); text-decoration: underline; }
.cr-sep { opacity: .5; }
.cr-bar {
  flex: 0 0 auto;
  width: 90px;
  height: 5px;
  border-radius: 3px;
  background: var(--border);
  overflow: hidden;
}
.cr-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width .3s ease;
}

/* 主色行标记（仅靠色块面积区分，不加背景色） */
.color-row.is-main {
  padding-top: 16px;
  padding-bottom: 16px;
}
.color-row.is-main .cr-chip { width: 56px; height: 56px; }
.color-row.is-main .cr-hex { font-size: 16px; font-weight: 600; }
.cr-tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: #fff;
  background: var(--accent);
  padding: 3px 9px;
  border-radius: 8px;
  margin-left: -4px;
}

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%) translateY(10px);
  background: #ECEDEF;
  color: #15171C;
  font-size: 13px;
  font-family: "SF Mono", Menlo, Consolas, monospace;
  font-weight: 500;
  padding: 11px 18px;
  border-radius: 10px;
  box-shadow: 0 8px 28px rgba(0,0,0,.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s, transform .18s;
  z-index: 50;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 800px) {
  .col-right { order: -1; }
  .card-palette { min-height: auto; }
}

/* ============ SEO content sections ============ */
.seo {
  max-width: 1080px;
  margin: 0 auto;
  padding: 8px 24px 48px;
}
.seo-wrap { display: flex; flex-direction: column; gap: 40px; }

.seo-block h2 {
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: .2px;
  margin: 0 0 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.seo-block p {
  margin: 0;
  font-size: 15px;
  line-height: 1.75;
  color: var(--text);
}

/* How it works steps */
.steps {
  margin: 0;
  padding-left: 22px;
  font-size: 15px;
  line-height: 1.9;
  color: var(--text);
}
.steps li { margin-bottom: 8px; }
.steps strong { color: #fff; font-weight: 600; }

/* Feature grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.feature {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
}
.feature h3 { margin: 0 0 6px; font-size: 15px; font-weight: 600; color: var(--accent); }
.feature p { font-size: 14px; line-height: 1.6; color: var(--muted); }

/* Use case grid */
.usecase-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.usecase {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
}
.usecase h3 { margin: 0 0 6px; font-size: 15px; font-weight: 600; color: var(--text); }
.usecase p { font-size: 14px; line-height: 1.6; color: var(--muted); }

/* FAQ */
.faq { display: flex; flex-direction: column; gap: 10px; }
.faq-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 18px;
}
.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 15px 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  position: relative;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 2px;
  top: 14px;
  font-size: 18px;
  color: var(--muted);
}
.faq-item[open] summary::after { content: "\2212"; }
.faq-item p {
  margin: 0;
  padding: 0 0 15px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--muted);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--card);
}
.footer-wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 22px 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 18px;
}
.footer-brand { font-size: 14px; font-weight: 700; color: var(--text); }
.footer-note { font-size: 13px; color: var(--muted); }

@media (max-width: 640px) {
  .feature-grid, .usecase-grid { grid-template-columns: 1fr; }
}
