﻿:root {
  --blue: #001c63;
  --blue-soft: #153d9e;
  --blue-deep: #00113a;
  --gold: #b8981d;
  --gold-soft: #dcc04e;
  --gold-deep: #8d720c;
  --text: #07286f;
  --text-strong: #03174a;
  --muted: #6175aa;
  --shadow: 0 24px 56px rgba(0, 17, 58, 0.22);
  --shadow-soft: 0 16px 30px rgba(0, 28, 99, 0.08);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; min-height: 100%; }
body {
  font-family: "Bahnschrift", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.08), transparent 22%),
    linear-gradient(180deg, #00174f 0%, #001338 100%);
}
.page { width: min(1180px, calc(100% - 24px)); margin: 16px auto 34px; }
.surface {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: linear-gradient(145deg, rgba(255, 249, 224, 0.98), rgba(229, 200, 86, 0.9));
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: var(--shadow);
}
.surface::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.1), transparent 24%, transparent 74%, rgba(0, 28, 99, 0.04));
}
.hero, .panel, .footer-card { padding: 18px; margin-bottom: 16px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, 1.18fr); gap: 14px; }
.brand-shell {
  position: relative;
  min-height: 248px;
  padding: 16px;
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(0, 17, 58, 0.98), rgba(21, 61, 158, 0.92));
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 34px rgba(0, 0, 0, 0.18);
  display: grid;
  grid-template-rows: auto 1fr auto;
}
.brand-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(130deg, rgba(255, 255, 255, 0.06), transparent 28%, transparent 72%, rgba(220, 192, 78, 0.08)),
    radial-gradient(circle at 85% 85%, rgba(220, 192, 78, 0.24), transparent 24%);
  pointer-events: none;
}
.brand-top, .brand-main, .brand-points { position: relative; z-index: 1; }
.brand-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.66);
}
.brand-top span:last-child { color: var(--gold-soft); }
.brand-main { display: flex; align-items: center; gap: 18px; }
.brand-mark {
  width: 88px;
  height: 88px;
  flex: 0 0 88px;
  border-radius: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 900;
  color: #fffef5;
  background: linear-gradient(142deg, var(--gold) 0%, var(--gold-soft) 36%, var(--blue-soft) 36%, var(--blue-deep) 100%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.22);
  position: relative;
}
.brand-mark::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.18);
}
.brand-copy h1 { margin: 0; color: #fffef6; font-size: clamp(34px, 4.9vw, 56px); line-height: 1.02; }
.brand-copy p { margin: 10px 0 0; max-width: 470px; color: rgba(255, 255, 255, 0.86); font-size: 13px; line-height: 1.7; }
.brand-points { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.brand-point { padding: 12px; border-radius: 16px; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.1); }
.brand-point strong { display: block; margin-bottom: 5px; color: var(--gold-soft); font-size: 12px; }
.brand-point span { display: block; color: rgba(255, 255, 255, 0.84); font-size: 12px; line-height: 1.5; }
.hero-side { display: grid; gap: 12px; }
.soft-panel, .card, .section-console {
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.52);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.38), rgba(255, 245, 196, 0.2));
  box-shadow: var(--shadow-soft);
}
.soft-panel { padding: 14px; }
.mini-head, .section-topline, .section-side, .flow-row, .result-head, .hero-row, .action-row { display: flex; align-items: center; }
.mini-head, .section-topline { justify-content: space-between; gap: 10px; }
.mini-head { margin-bottom: 12px; }
.mini-head strong { color: var(--text-strong); font-size: 16px; }
.mini-head span { color: rgba(3, 23, 74, 0.66); font-size: 12px; font-weight: 700; }
.controls-grid, .steps-grid, .auto-grid { display: grid; gap: 10px; }
.controls-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.steps-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.field-box, .step-card {
  padding: 12px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.54), rgba(255, 246, 210, 0.32));
  border: 1px solid rgba(255, 255, 255, 0.46);
}
.field-box label, .model-box label, .field label { display: block; margin-bottom: 8px; color: var(--text-strong); font-size: 13px; font-weight: 800; }
.field-box small, .help, .mini-note, .drop-hint { display: block; margin-top: 8px; color: rgba(3, 23, 74, 0.68); font-size: 12px; line-height: 1.5; }
.step-no, .section-badge, .hero-badge, .mode-icon, .result-icon, .empty-icon, .status-icon, .flow-chip b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--gold), var(--gold-soft));
  color: var(--blue);
}
.step-no { min-width: 30px; height: 30px; padding: 0 10px; font-size: 12px; margin-bottom: 8px; }
.step-card strong, .hero-row strong, .result-head strong, .mode-copy strong, .rail-head strong { display: block; color: var(--text-strong); font-size: 14px; margin-bottom: 4px; }
.step-card span, .hero-row small, .result-head small, .mode-copy small, .rail-head span { display: block; color: var(--muted); font-size: 12px; line-height: 1.5; }
.section-console { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; padding: 14px; margin-bottom: 14px; }
.section-label { display: inline-flex; align-items: center; padding: 6px 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.54); color: var(--text-strong); font-size: 11px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; }
.section-tag { display: inline-flex; align-items: center; gap: 8px; color: var(--blue); font-size: 11px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; }
.section-tag::before { content: ""; width: 22px; height: 1px; background: linear-gradient(90deg, transparent, var(--blue)); }
.section-title-row { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.section-badge { width: 38px; height: 38px; font-size: 13px; flex: 0 0 38px; }
.section-title-row h2 { margin: 0; color: var(--text-strong); font-size: clamp(24px, 3vw, 31px); }
.section-title-row p { margin: 4px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.flow-row { gap: 8px; flex-wrap: wrap; }
.slim-gap { margin-bottom: 12px; }
.flow-chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 11px; border-radius: 999px; background: rgba(255, 255, 255, 0.54); color: var(--text-strong); font-size: 12px; font-weight: 700; }
.flow-chip b { width: 20px; height: 20px; font-size: 11px; }
.section-side { gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.status-pill { display: inline-flex; align-items: center; gap: 9px; padding: 9px 13px; border-radius: 999px; background: rgba(255, 255, 255, 0.42); color: var(--text-strong); font-size: 12px; font-weight: 700; }
.status-pill::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: linear-gradient(135deg, var(--gold), var(--gold-soft)); box-shadow: 0 0 0 4px rgba(184, 152, 29, 0.12); }
.manual-grid { display: grid; grid-template-columns: 248px minmax(0, 1.06fr) minmax(350px, 0.94fr); gap: 14px; }
.auto-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pad-card { padding: 16px; }
.mode-list { display: grid; gap: 10px; }
.mode-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 14px;
  border-radius: 20px;
  cursor: pointer;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.5), rgba(255, 243, 185, 0.26));
  border: 1px solid rgba(255, 255, 255, 0.58);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  position: relative;
}
.mode-card::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 4px; border-radius: 999px; background: linear-gradient(180deg, var(--blue), var(--gold)); }
.mode-card:hover { transform: translateY(-2px); box-shadow: 0 20px 34px rgba(0, 28, 99, 0.1); }
.mode-card.active { background: linear-gradient(145deg, var(--blue-deep), var(--blue-soft)); border-color: rgba(184, 152, 29, 0.48); }
.mode-card.active::before { width: 6px; background: linear-gradient(180deg, var(--gold-soft), #fff2b8); }
.mode-card.active .mode-copy strong, .mode-card.active .mode-copy small { color: #fffef5; }
.mode-icon, .hero-badge, .result-icon, .empty-icon, .status-icon { width: 34px; height: 34px; font-size: 12px; flex: 0 0 34px; box-shadow: 0 10px 18px rgba(184, 152, 29, 0.18); }
.hero-row, .result-head { gap: 12px; }
.hero-row, .result-head-fixed { margin-bottom: 12px; }
.hero-row { padding: 14px; border-radius: 20px; background: linear-gradient(135deg, rgba(0, 28, 99, 0.11), rgba(184, 152, 29, 0.18)); border: 1px solid rgba(255, 255, 255, 0.52); }
.model-box { padding: 12px; margin-bottom: 12px; border-radius: 18px; background: linear-gradient(180deg, rgba(255, 255, 255, 0.24), rgba(255, 246, 209, 0.14)); border: 1px solid rgba(255, 255, 255, 0.44); }
.field { margin-bottom: 14px; }
select, textarea, button, input[type="text"] { width: 100%; border: none; outline: none; font-family: inherit; }
select {
  border-radius: 15px;
  padding: 13px 14px;
  font-size: 14px;
  font-weight: 800;
  appearance: none;
  background-repeat: no-repeat;
  background-position: 0 0, calc(100% - 22px) calc(50% - 3px), calc(100% - 16px) calc(50% - 3px);
  background-size: 100% 100%, 6px 6px, 6px 6px;
}
.field-box select {
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.76), rgba(255, 247, 215, 0.68)), linear-gradient(45deg, transparent 50%, var(--gold-deep) 50%), linear-gradient(135deg, var(--gold-deep) 50%, transparent 50%);
  border: 1px solid rgba(184, 152, 29, 0.24);
  color: var(--text-strong);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.model-box select {
  background-image: linear-gradient(180deg, rgba(0, 17, 58, 0.96), rgba(21, 61, 158, 0.92)), linear-gradient(45deg, transparent 50%, var(--gold) 50%), linear-gradient(135deg, var(--gold) 50%, transparent 50%);
  border: 1px solid rgba(184, 152, 29, 0.3);
  color: #fff8dc;
  box-shadow: 0 14px 22px rgba(0, 17, 58, 0.14);
}
select option { background: #fff8dc; color: #03174a; }
textarea, input[type="text"] {
  padding: 13px 14px;
  border-radius: 15px;
  border: 1px solid rgba(0, 28, 99, 0.12);
  background: rgba(255, 255, 255, 0.9);
  color: var(--text-strong);
  font-size: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
}
textarea { resize: vertical; min-height: 116px; }
textarea::placeholder, input::placeholder { color: #7488bc; }
.drop-zone { padding: 16px 14px; border-radius: 18px; border: 1px dashed rgba(0, 28, 99, 0.22); background: rgba(255, 255, 255, 0.32); text-align: center; cursor: pointer; transition: 0.18s ease; }
.drop-zone.dragover, .drop-zone:hover { border-color: rgba(0, 28, 99, 0.4); background: rgba(255, 249, 216, 0.9); box-shadow: 0 0 0 4px rgba(184, 152, 29, 0.08); }
.drop-zone input { display: none; }
.drop-title { color: var(--text-strong); font-size: 14px; font-weight: 800; margin-bottom: 5px; }
.drop-file { margin-top: 10px; color: var(--text); font-size: 12px; word-break: break-all; }
.upload-card { display: flex; align-items: center; gap: 12px; padding: 12px; margin-top: 12px; border-radius: 16px; background: rgba(255, 255, 255, 0.44); border: 1px solid rgba(255, 255, 255, 0.56); }
.upload-card img { width: 58px; height: 58px; object-fit: cover; border-radius: 12px; cursor: zoom-in; }
.upload-meta { flex: 1; min-width: 0; text-align: left; }
.upload-meta strong { display: block; color: var(--text-strong); font-size: 13px; margin-bottom: 4px; word-break: break-all; }
.upload-meta span { display: block; color: var(--muted); font-size: 12px; }
button, .action-link { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 13px 16px; border-radius: 15px; cursor: pointer; font-size: 14px; font-weight: 800; letter-spacing: 0.02em; text-decoration: none; transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease; }
button { background: linear-gradient(135deg, var(--gold), var(--gold-soft)); color: var(--blue); box-shadow: 0 16px 26px rgba(184, 152, 29, 0.22); }
button:hover, .action-link:hover { transform: translateY(-1px); }
button:disabled { opacity: 0.65; cursor: not-allowed; transform: none; box-shadow: none; }
.secondary-btn { background: linear-gradient(135deg, var(--blue-deep), var(--blue-soft)); color: #fffef5; box-shadow: 0 16px 26px rgba(0, 28, 99, 0.22); }
.delete-btn { width: auto; min-width: 118px; padding: 10px 13px; border-radius: 12px; background: linear-gradient(135deg, #062660, #1a47b4); color: #fffef5; box-shadow: none; flex: 0 0 auto; }
.btn-icon, .action-icon { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 999px; font-size: 11px; background: rgba(255, 255, 255, 0.34); border: 1px solid rgba(255, 255, 255, 0.28); color: currentColor; flex: 0 0 22px; }
.preview-wrap, .result-wrap { margin-top: 14px; min-height: 36px; text-align: center; }
.preview-img { max-width: 100%; max-height: 220px; border-radius: 16px; border: 1px solid rgba(255, 255, 255, 0.56); box-shadow: 0 10px 24px rgba(0, 28, 99, 0.14); cursor: zoom-in; }
.empty-state { padding: 24px 16px; border-radius: 22px; background: linear-gradient(180deg, rgba(255, 255, 255, 0.42), rgba(255, 242, 170, 0.18)); border: 1px dashed rgba(0, 28, 99, 0.18); }
.empty-state strong { display: block; margin: 0 0 6px; color: var(--text-strong); font-size: 15px; }
.empty-state p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.result-box { padding: 16px; border-radius: 24px; background: linear-gradient(180deg, rgba(255, 255, 255, 0.44), rgba(255, 239, 157, 0.2)); border: 1px solid rgba(255, 255, 255, 0.6); box-shadow: var(--shadow-soft); }
.meta-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.meta-chip { display: inline-flex; align-items: center; padding: 7px 11px; border-radius: 999px; background: rgba(255, 255, 255, 0.54); color: var(--text-strong); font-size: 12px; font-weight: 700; }
.art-stage { padding: 14px; border-radius: 22px; background: linear-gradient(180deg, rgba(0, 17, 58, 0.96), rgba(21, 61, 158, 0.9)); border: 1px solid rgba(255, 255, 255, 0.1); box-shadow: 0 16px 26px rgba(0, 17, 58, 0.18); }
.art-stage img { display: block; width: 100%; border-radius: 16px; box-shadow: 0 14px 28px rgba(0, 0, 0, 0.18); cursor: zoom-in; }
.action-row { gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 14px; }
.action-link { min-width: 142px; padding: 10px 14px; font-size: 13px; font-weight: 800; }
.preview-btn, .open-btn { background: linear-gradient(135deg, #052a73, #1d46b8); color: #fffef5; }
.copy-btn { background: linear-gradient(135deg, #fff0b0, #fff8d6); color: var(--text-strong); }
.download-btn { background: linear-gradient(135deg, var(--gold), var(--gold-soft)); color: var(--blue); }
.vectorize-btn { background: linear-gradient(135deg, #fff2b1, #fff8da); color: var(--blue); }
.result-meta { margin-top: 12px; color: var(--muted); font-size: 12px; line-height: 1.65; }
.status-box { padding: 16px; border-radius: 20px; text-align: left; font-size: 14px; line-height: 1.7; }
.status-box.loading { background: rgba(255, 248, 214, 0.92); border: 1px solid rgba(0, 28, 99, 0.1); }
.status-box.warning { background: rgba(255, 242, 194, 0.92); border: 1px solid rgba(184, 152, 29, 0.24); }
.status-box.error { background: rgba(255, 232, 229, 0.92); border: 1px solid rgba(172, 60, 60, 0.18); color: #892727; }
.status-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; color: var(--text-strong); font-weight: 800; }
.footer-card strong { display: block; color: var(--blue); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 8px; }
.footer-card p { margin: 0; color: var(--text-strong); font-size: 13px; line-height: 1.7; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); z-index: 10000; padding: 12px 18px; border-radius: 14px; background: rgba(255, 249, 220, 0.96); border: 1px solid rgba(255, 255, 255, 0.66); color: var(--text-strong); font-size: 13px; opacity: 0; pointer-events: none; transition: 0.22s ease; box-shadow: 0 18px 42px rgba(0, 17, 58, 0.2); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.modal { position: fixed; inset: 0; display: none; align-items: center; justify-content: center; padding: 24px; background: rgba(0, 17, 58, 0.5); backdrop-filter: blur(10px); z-index: 9999; }
.modal.open { display: flex; }
.modal-inner { position: relative; max-width: min(1200px, 92vw); max-height: 90vh; padding: 18px; border-radius: 24px; background: linear-gradient(180deg, rgba(255, 249, 220, 0.98), rgba(229, 200, 86, 0.94)); border: 1px solid rgba(255, 255, 255, 0.62); box-shadow: 0 28px 80px rgba(0, 17, 58, 0.28); }
.modal-close { position: absolute; top: 10px; right: 10px; width: 42px; height: 42px; border-radius: 12px; background: rgba(0, 28, 99, 0.92); color: #fff; font-size: 22px; border: none; cursor: pointer; box-shadow: none; }
.modal img { display: block; max-width: min(1120px, 88vw); max-height: 78vh; border-radius: 16px; margin-top: 20px; }
.modal-caption { margin-top: 12px; color: var(--text-strong); text-align: center; font-size: 13px; }
@media (max-width: 1080px) {
  .hero-grid, .manual-grid, .auto-grid { grid-template-columns: 1fr; }
  .controls-grid, .steps-grid, .brand-points { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 840px) {
  .page { width: min(100% - 16px, 100%); }
  .controls-grid, .steps-grid, .brand-points, .section-console, .auto-grid { grid-template-columns: 1fr; }
  .section-side { justify-content: flex-start; }
  .upload-card { flex-direction: column; align-items: flex-start; }
  .delete-btn { width: 100%; }
}
@media (max-width: 640px) {
  .surface { border-radius: 22px; }
  .brand-main { align-items: flex-start; }
  .brand-copy h1 { font-size: 31px; }
  .action-row { justify-content: stretch; }
  .action-link { width: 100%; }
}
