:root {
  color-scheme: dark;
  --bg: #0c0b0e;
  --panel: #151419;
  --panel-2: #1b191f;
  --line: #302d36;
  --muted: #96919e;
  --text: #f4f1f7;
  --accent: #a86eff;
  --accent-2: #7f4dcc;
  --gold: #e8bf73;
  --danger: #ff8e9b;
  --success: #99e4af;
  --focus-ring: rgba(168, 110, 255, .2);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif; }
button, input, textarea, select { font: inherit; }
button, select { cursor: pointer; }

.app-shell { min-height: 100vh; background: radial-gradient(circle at 75% 5%, rgba(118, 70, 187, .13), transparent 28rem), var(--bg); }
.topbar { height: 66px; border-bottom: 1px solid #26232b; display: flex; align-items: center; gap: 22px; padding: 0 28px; background: rgba(10, 9, 12, .84); backdrop-filter: blur(18px); position: sticky; top: 0; z-index: 10; }.brand-lockup { display: flex; align-items: center; gap: 12px; }.brand-mark { font-size: 22px; font-weight: 800; letter-spacing: .02em; white-space: nowrap; }.brand-accent { color: var(--accent); }.brand-divider { width: 1px; height: 20px; background: #3a3540; }.brand-context { color: #a39ba9; font-size: 12px; }
.promo { margin: 0 auto; display: flex; gap: 14px; align-items: center; border: 1px solid #41354f; background: #17131d; padding: 8px 16px; border-radius: 7px; font-size: 12px; color: #c8c1ce; }.promo strong { color: var(--gold); }.promo span { color: #a9a1af; }
.top-actions { display: flex; align-items: center; gap: 9px; }.top-actions a, .ghost-button { color: #ddd5e6; text-decoration: none; border: 1px solid #42374d; background: transparent; padding: 8px 12px; border-radius: 6px; font-size: 12px; }.top-actions a:hover, .ghost-button:hover { border-color: var(--accent); color: #fff; }
.workspace { width: min(1480px, calc(100% - 48px)); margin: 32px auto 46px; display: grid; grid-template-columns: minmax(400px, 540px) minmax(0, 1fr); gap: 28px; align-items: start; }
.control-panel, .preview-panel { background: rgba(19, 18, 23, .92); border: 1px solid #2a2730; border-radius: 12px; box-shadow: 0 24px 80px rgba(0,0,0,.24); }.control-panel { padding: 26px; }.preview-panel { padding: 18px; min-width: 0; position: sticky; top: 88px; }
.panel-intro { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 20px; }.panel-intro h1 { margin: 4px 0 0; font-size: 23px; line-height: 1.2; letter-spacing: -.01em; }.eyebrow { color: var(--accent); font-size: 10px; font-weight: 800; letter-spacing: .14em; }.connection-dot { width: 9px; height: 9px; border-radius: 50%; background: #625b68; box-shadow: 0 0 0 5px rgba(98, 91, 104, .1); margin-top: 6px; }.connection-dot.online { background: var(--success); box-shadow: 0 0 0 5px rgba(153, 228, 175, .1); }
.mode-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 24px; }.mode-tab { height: 40px; border: 1px solid #393540; border-radius: 7px; background: #111015; color: #98919f; }.mode-tab span { color: #877e8e; margin-right: 6px; }.mode-tab.active { background: #4a464f; color: #fff; border-color: #605a66; box-shadow: inset 0 1px 0 rgba(255,255,255,.08); }.mode-tab.active span { color: #d7b8ff; }
.field-group { margin-bottom: 20px; }.field-group label, .field-title { display: block; color: #dcd7e0; font-size: 13px; font-weight: 600; margin-bottom: 9px; }.field-label-row { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; margin-bottom: 9px; }.field-label-row label { margin: 0; }.field-hint, .char-count, .cost-note, .model-status { color: var(--muted); font-size: 11px; }.inline-action { border: 0; background: transparent; color: var(--accent); font-size: 11px; padding: 0; }.inline-action:hover { color: #ceb1ff; }.field-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 7px; color: var(--muted); font-size: 11px; }.field-foot #keyStatus.ok { color: var(--success); }.section-heading { display: flex; gap: 11px; align-items: flex-start; margin: 26px 0 15px; padding-top: 20px; border-top: 1px solid #29262f; }.section-index { color: #827889; font-size: 10px; font-weight: 800; letter-spacing: .1em; padding-top: 3px; }.section-heading h2 { font-size: 14px; margin: 0 0 4px; }.section-heading p { color: var(--muted); font-size: 11px; margin: 0; }
input[type="text"], input[type="password"], input[type="url"], textarea, select { width: 100%; color: var(--text); background: #100f14; border: 1px solid #35313b; border-radius: 7px; outline: none; transition: .18s ease; }.key-input-wrap { position: relative; }.key-input-wrap input { padding-right: 42px; }.icon-button { position: absolute; top: 0; right: 0; width: 40px; height: 100%; background: none; border: 0; color: var(--muted); }.icon-button:hover { color: #fff; } input, select { height: 40px; padding: 0 12px; } textarea { min-height: 144px; padding: 13px; resize: vertical; line-height: 1.55; } input:focus, textarea:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--focus-ring); }
.model-status { margin-top: 7px; }.model-status.ok { color: #a9e3b6; }.model-status.error, .notice.error { color: var(--danger); }
.upload-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }.upload-card { height: 132px; border: 1px dashed #4a4451; border-radius: 8px; background: #111015; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; position: relative; overflow: hidden; cursor: pointer; transition: border-color .18s, background .18s; }.upload-card:hover { border-color: var(--accent); background: #17131c; }.upload-card input { display: none; }.upload-icon { font-size: 22px; color: #a199aa; line-height: 1; }.upload-card strong { font-size: 13px; }.upload-card small { color: var(--muted); font-size: 10px; }.upload-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .62; display: none; }.upload-card.has-image img { display: block; }.upload-card.has-image > *:not(img):not(input):not(.file-name) { position: relative; z-index: 1; text-shadow: 0 1px 4px #000; }.file-name { position: absolute; left: 8px; right: 8px; bottom: 7px; z-index: 2; color: #f0eaf5; font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center; text-shadow: 0 1px 4px #000; }.url-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }.url-row input { height: 34px; font-size: 11px; }
.setting-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }.setting-grid .field-group { margin-bottom: 16px; }.setting-span { grid-column: span 1; }.ratio-setting, .count-setting, .image-field-setting { grid-column: 1 / -1; }.setting-label { display: flex; justify-content: space-between; align-items: center; color: #dcd7e0; font-size: 13px; font-weight: 600; margin-bottom: 9px; }.setting-value { color: var(--accent); font-size: 11px; font-weight: 500; }.segmented { display: flex; gap: 2px; padding: 3px; min-height: 40px; border: 1px solid #35313b; border-radius: 8px; background: #111015; }.segment { flex: 1; min-width: 0; border: 0; border-radius: 6px; background: transparent; color: #8f8797; font-size: 11px; white-space: nowrap; }.segment:hover { color: #e6d9f1; background: #211c27; }.segment.active { color: #fff; background: linear-gradient(135deg, #7340a8, #9d60df); box-shadow: inset 0 1px 0 rgba(255,255,255,.16); }.ratio-segment { gap: 0; }.ratio-segment .segment { font-size: 10px; }.count-segment .segment { font-size: 12px; font-weight: 650; }.setting-grid input[type="range"] { width: 100%; height: 40px; accent-color: var(--accent); padding: 0; }.range-scale { display: flex; justify-content: space-between; color: #7e7786; font-size: 10px; margin-top: -1px; }.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
.submit-row { display: flex; align-items: center; gap: 12px; margin-top: 6px; }.create-button { flex: 1; height: 44px; border: 0; border-radius: 7px; color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-2)); font-weight: 700; box-shadow: 0 8px 24px rgba(127, 77, 204, .28); }.create-button:hover { filter: brightness(1.1); }.create-button:disabled { opacity: .55; cursor: wait; }.create-button span { margin-right: 7px; }.notice { min-height: 20px; font-size: 12px; color: #b4aeb9; margin-top: 12px; white-space: pre-wrap; }
.preview-frame { min-height: 0; aspect-ratio: 16 / 9; background: #0b0a0d; border: 1px solid #332f39; border-radius: 9px; display: grid; place-items: center; position: relative; overflow: hidden; }.preview-frame::after { content: ""; position: absolute; inset: 0; pointer-events: none; border: 1px solid rgba(255,255,255,.035); border-radius: inherit; }.preview-frame video { width: 100%; height: 100%; object-fit: contain; background: #050506; }.preview-placeholder { text-align: center; color: #a39ba8; display: grid; gap: 9px; }.preview-placeholder strong { color: #ded8e2; font-size: 14px; }.preview-placeholder small { font-size: 11px; }.placeholder-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; border: 1px solid #5c5266; color: var(--accent); margin: 0 auto; background: rgba(168,110,255,.05); }.progress-overlay { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 10px; background: rgba(6, 5, 8, .78); z-index: 2; }.progress-overlay[hidden], .result-actions[hidden] { display: none; }.progress-overlay span { font-size: 12px; color: #bcb5c3; }.spinner { width: 28px; height: 28px; border: 2px solid #403648; border-top-color: var(--accent); border-radius: 50%; animation: spin 1s linear infinite; } @keyframes spin { to { transform: rotate(360deg); } }
.preview-meta { display: flex; align-items: center; gap: 10px; padding: 12px 2px 26px; color: #a49da9; font-size: 11px; }.quality-tag { color: #1a111f; background: #eee9f3; padding: 4px 7px; border-radius: 4px; font-weight: 800; }.preview-meta #taskTag { margin-left: auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 38%; }.result-actions { display: flex; gap: 8px; align-items: center; }.result-actions a, .result-actions button { color: #d9c5f2; background: transparent; border: 1px solid #483a54; border-radius: 5px; padding: 5px 8px; font-size: 10px; text-decoration: none; }.result-actions a:hover, .result-actions button:hover { border-color: var(--accent); color: #fff; }
.history-header { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid #29262e; padding-top: 18px; }.history-header h2 { font-size: 15px; margin: 0 0 4px; }.history-header span { color: var(--muted); font-size: 11px; }.history-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 14px; }.history-card { border: 1px solid #35303a; border-radius: 7px; overflow: hidden; background: #111015; cursor: pointer; transition: transform .18s, border-color .18s; }.history-card:hover { transform: translateY(-2px); border-color: #705395; }.history-card video { width: 100%; aspect-ratio: 1.2; object-fit: cover; display: block; background: #0a090c; }.history-card p { margin: 7px 8px 9px; font-size: 10px; color: #bcb4c2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }.empty-history { color: var(--muted); font-size: 12px; padding: 24px 0; grid-column: 1 / -1; text-align: center; border: 1px dashed #302c36; border-radius: 7px; }
@media (max-width: 1000px) { .workspace { grid-template-columns: 1fr; width: min(760px, calc(100% - 28px)); margin-top: 22px; }.preview-panel { position: static; }.preview-frame { min-height: 420px; }.promo { display: none; } }
@media (max-width: 560px) { .topbar { padding: 0 14px; }.brand-divider, .brand-context { display: none; }.top-actions a { display: none; }.workspace { width: calc(100% - 18px); }.control-panel { padding: 18px; }.url-row, .setting-grid { grid-template-columns: 1fr; }.history-list { grid-template-columns: repeat(2, 1fr); }.preview-frame { min-height: 300px; }.submit-row { align-items: stretch; flex-direction: column; }.cost-note { text-align: center; }.panel-intro h1 { font-size: 21px; } }
