:root {
  --ink: #172033;
  --muted: #667085;
  --line: #e6eaf1;
  --soft: #f5f7fb;
  --blue: #1664ff;
  --blue-dark: #0d4fd7;
  --purple: #7456ff;
  --green: #00a870;
  --red: #d92d20;
  --shadow: 0 18px 54px rgba(30, 54, 96, .09);
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: #f8f9fc; font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; line-height: 1.6; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
.hidden { display: none !important; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-size: 17px; font-weight: 800; text-decoration: none; }
.brand-mark { display: grid; width: 36px; height: 36px; place-items: center; color: #fff; border-radius: 10px; background: linear-gradient(135deg, var(--blue), var(--purple)); font-size: 11px; }
.eyebrow { margin: 0 0 8px; color: var(--blue); font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 30px; background: radial-gradient(circle at 50% 0, #e9efff 0, #f8f9fc 45%); }
.login-card { width: min(460px, 100%); padding: 44px; border: 1px solid rgba(220, 226, 237, .9); border-radius: 24px; background: rgba(255,255,255,.95); box-shadow: var(--shadow); }
.login-card .brand { margin-bottom: 42px; }
.login-card h1 { margin: 0; font-size: 34px; letter-spacing: -.04em; }
.login-card .lead { margin: 12px 0 30px; color: var(--muted); }
label { display: grid; gap: 8px; color: #344054; font-size: 13px; font-weight: 700; }
input, textarea, select { width: 100%; border: 1px solid #dce2ec; border-radius: 11px; outline: 0; background: #fff; color: var(--ink); transition: .2s; }
input, select { height: 46px; padding: 0 13px; }
textarea { padding: 11px 13px; resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(22,100,255,.1); }
.fine-print { margin: 18px 0 0; color: #98a2b3; font-size: 12px; text-align: center; }
.form-error { min-height: 22px; margin: 5px 0; color: var(--red); font-size: 13px; }
.button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 0 19px; border: 1px solid transparent; border-radius: 10px; cursor: pointer; font-weight: 750; text-decoration: none; transition: .2s; }
.button:disabled { cursor: not-allowed; opacity: .55; }
.button.primary { color: #fff; background: var(--blue); box-shadow: 0 8px 20px rgba(22,100,255,.2); }
.button.primary:hover { background: var(--blue-dark); transform: translateY(-1px); }
.button.secondary { border-color: var(--line); color: #344054; background: #fff; }
.button.wide { width: 100%; }
.text-button { border: 0; padding: 5px; color: var(--muted); background: transparent; cursor: pointer; }
.topbar { height: 68px; display: flex; align-items: center; justify-content: space-between; padding: 0 max(24px, calc((100vw - 1240px)/2)); border-bottom: 1px solid var(--line); background: rgba(255,255,255,.94); backdrop-filter: blur(14px); position: sticky; top: 0; z-index: 20; }
.top-actions { display: flex; align-items: center; gap: 18px; color: var(--muted); font-size: 13px; }
.model-pill { display: inline-flex; align-items: center; gap: 7px; padding: 7px 11px; border: 1px solid #dfe8ff; border-radius: 99px; color: #31589e; background: #f2f6ff; font-weight: 700; }
.model-pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(0,168,112,.12); }
.workspace { width: min(1240px, calc(100% - 40px)); margin: 0 auto; padding: 48px 0 80px; }
.workspace-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 30px; }
.workspace-heading h1 { margin: 0; font-size: clamp(30px, 4vw, 46px); letter-spacing: -.045em; }
.workspace-heading p:last-child { margin: 8px 0 0; color: var(--muted); }
.editor-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; align-items: start; gap: 24px; }
.main-column { display: grid; gap: 20px; }
.panel, .guide-panel { border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: 0 8px 30px rgba(30,54,96,.04); }
.panel { padding: 28px; }
.panel-heading { display: flex; gap: 14px; margin-bottom: 22px; }
.panel-heading > span { flex: 0 0 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; color: #fff; background: var(--blue); font-size: 13px; font-weight: 800; }
.panel-heading h2, .history-heading h2 { margin: 0; font-size: 20px; }
.panel-heading p, .history-heading p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.dropzone { min-height: 170px; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 5px; border: 1.5px dashed #b9c6dc; border-radius: 14px; color: #475467; background: #fafbfe; cursor: pointer; transition: .2s; }
.dropzone:hover, .dropzone.dragging { border-color: var(--blue); background: #f5f8ff; }
.dropzone input { display: none; }
.upload-icon { width: 42px; height: 42px; display: grid; place-items: center; margin-bottom: 5px; border-radius: 12px; color: var(--blue); background: #eaf0ff; font-size: 25px; font-weight: 300; }
.dropzone small { color: #98a2b3; font-weight: 500; }
.image-preview { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-top: 14px; }
.preview-item { position: relative; aspect-ratio: 1; overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: var(--soft); }
.preview-item img { width: 100%; height: 100%; object-fit: cover; }
.preview-item button { position: absolute; top: 5px; right: 5px; width: 25px; height: 25px; border: 0; border-radius: 50%; color: #fff; background: rgba(0,0,0,.62); cursor: pointer; }
.platform-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 22px; }
.platform-switch label { display: block; cursor: pointer; }
.platform-switch input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.platform-switch span { min-height: 72px; display: flex; flex-direction: column; justify-content: center; padding: 12px 15px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.platform-switch small { margin-top: 2px; color: var(--muted); font-weight: 500; }
.platform-switch input:checked + span { border-color: var(--blue); background: #f4f7ff; box-shadow: inset 0 0 0 1px var(--blue); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 17px 14px; }
.form-grid .full { grid-column: 1 / -1; }
.b2b-fields { margin-top: 25px; padding-top: 22px; border-top: 1px solid var(--line); }
.b2b-fields h3 { margin: 0; }
.b2b-fields > p { margin: 4px 0 18px; color: var(--muted); font-size: 13px; }
.form-actions { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.form-actions p { margin: 0; color: var(--muted); font-size: 12px; }
.form-actions.right { justify-content: flex-end; }
.guide-panel { position: sticky; top: 92px; padding: 24px; }
.guide-panel h3 { margin: 0 0 15px; }
.guide-panel ol { margin: 0; padding-left: 22px; color: #475467; font-size: 13px; }
.guide-panel li { margin: 7px 0; }
.guide-note { display: grid; gap: 2px; margin-top: 22px; padding: 14px; border-radius: 11px; color: #31589e; background: #f1f5ff; }
.guide-note span { color: #667da6; font-size: 12px; }
.plan-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.plan-item { display: flex; gap: 11px; padding: 13px; border: 1px solid var(--line); border-radius: 11px; }
.plan-number { flex: 0 0 31px; height: 31px; display: grid; place-items: center; border-radius: 9px; color: var(--blue); background: #edf3ff; font-size: 12px; font-weight: 800; }
.plan-item b { display: block; font-size: 13px; }
.plan-item p { margin: 2px 0 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.paid-confirm { display: flex; grid-template-columns: auto 1fr; align-items: center; gap: 10px; margin-top: 22px; padding: 13px 15px; border-radius: 10px; background: #fff8eb; color: #8a5511; font-size: 13px; }
.paid-confirm input { width: 16px; height: 16px; }
.notice { margin-bottom: 20px; padding: 13px 16px; border-radius: 11px; font-size: 13px; }
.notice.warning { color: #8a5511; background: #fff4d9; }
.notice.error { color: #b42318; background: #ffebe9; }
.job-summary { display: flex; align-items: center; justify-content: space-between; }
.job-summary h2 { margin: 0; font-size: 28px; }
.job-summary p:last-child { margin: 6px 0 0; color: var(--muted); }
.progress-ring { width: 100px; height: 100px; display: grid; place-content: center; text-align: center; border: 8px solid #e9efff; border-top-color: var(--blue); border-radius: 50%; }
.progress-ring strong { font-size: 20px; }
.progress-ring span { color: var(--muted); font-size: 11px; }
.progress-bar { height: 7px; margin: 18px 0 24px; overflow: hidden; border-radius: 99px; background: #e8ecf3; }
.progress-bar i { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--blue), var(--purple)); transition: width .4s; }
.result-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 15px; }
.result-card { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: 0 8px 24px rgba(30,54,96,.05); }
.result-image { position: relative; aspect-ratio: 2 / 3; display: grid; place-items: center; background: linear-gradient(145deg, #eef2fa, #f9fafc); }
.result-image img { width: 100%; height: 100%; object-fit: cover; }
.result-image .state { padding: 12px; color: var(--muted); font-size: 12px; text-align: center; }
.result-image .spinner { width: 26px; height: 26px; margin: 0 auto 9px; border: 3px solid #dce4f4; border-top-color: var(--blue); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.result-body { padding: 12px; }
.result-body b { display: block; font-size: 12px; }
.result-body p { height: 32px; overflow: hidden; margin: 4px 0 10px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.result-body button { width: 100%; height: 32px; border: 1px solid var(--line); border-radius: 8px; color: #475467; background: #fff; cursor: pointer; font-size: 11px; }
.result-body button:disabled { opacity: .5; }
.job-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 26px; }
.history-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.history-list { display: grid; gap: 10px; }
.history-item { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 15px; border: 1px solid var(--line); border-radius: 11px; background: #fff; cursor: pointer; text-align: left; }
.history-item b { display: block; }
.history-item span, .history-item small { color: var(--muted); font-size: 12px; }
@media (max-width: 920px) { .editor-layout { grid-template-columns: 1fr; } .guide-panel { display: none; } .result-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .topbar { padding: 0 16px; } .top-actions { gap: 9px; } .model-pill, #user-label { display: none; } .workspace { width: min(100% - 24px, 1240px); padding-top: 28px; } .workspace-heading { align-items: start; } .workspace-heading h1 { font-size: 31px; } .panel { padding: 20px; } .platform-switch, .form-grid, .plan-grid { grid-template-columns: 1fr; } .form-grid .full { grid-column: auto; } .image-preview { grid-template-columns: repeat(3, 1fr); } .form-actions { align-items: stretch; flex-direction: column; } .form-actions .button { width: 100%; } .job-summary { align-items: flex-start; } .progress-ring { width: 78px; height: 78px; flex: 0 0 78px; } .result-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; } .login-card { padding: 30px 24px; } }
