* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif; background: #07070f; color: #e8e8f0; min-height: 100vh; }
body::before { content: ""; position: fixed; top: -350px; left: 50%; transform: translateX(-50%); width: 1000px; height: 700px; background: radial-gradient(ellipse, rgba(99,102,241,0.07) 0%, transparent 65%); pointer-events: none; z-index: 0; }
.container { max-width: 880px; margin: 0 auto; padding: 52px 24px 80px; position: relative; z-index: 1; }
h1 { text-align: center; font-size: 40px; font-weight: 700; letter-spacing: -1px; margin-bottom: 12px; background: linear-gradient(135deg, #c4b5fd 0%, #818cf8 50%, #5eead4 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.subtitle { text-align: center; font-size: 15px; color: #7070a0; }
.header-badge { display: inline-flex; align-items: center; gap: 7px; background: rgba(139,92,246,0.1); border: 1px solid rgba(139,92,246,0.22); border-radius: 20px; padding: 5px 16px; font-size: 11px; color: #a78bfa; margin-bottom: 22px; letter-spacing: 0.8px; text-transform: uppercase; }
.header-badge-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #a78bfa; animation: pulse-dot 2s infinite; }
@keyframes pulse-dot { 0%,100%{opacity:1} 50%{opacity:0.2} }
.upload-zone { border: 1.5px dashed rgba(139,92,246,0.22); border-radius: 20px; padding: 72px 24px; text-align: center; cursor: pointer; transition: all 0.25s; background: linear-gradient(135deg, rgba(139,92,246,0.03), rgba(99,102,241,0.03)); position: relative; }
.upload-zone:hover, .upload-zone.dragover { border-color: rgba(139,92,246,0.55); background: rgba(139,92,246,0.06); box-shadow: 0 0 40px rgba(139,92,246,0.08); }
.upload-zone input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; z-index: 10; }
.upload-icon { font-size: 52px; margin-bottom: 18px; filter: drop-shadow(0 0 12px rgba(139,92,246,0.4)); }
.upload-text { font-size: 16px; font-weight: 500; color: #c0c0e0; margin-bottom: 6px; }
.upload-hint { font-size: 13px; color: #44445a; margin-top: 6px; }
.preview-section { display: none; margin-top: 24px; }
.preview-section.active { display: block; }
.preview-wrapper { display: flex; gap: 24px; align-items: flex-start; }
.preview-img-box { flex: 0 0 220px; border-radius: 14px; overflow: hidden; background: #0e0e1a; border: 1px solid rgba(255,255,255,0.07); box-shadow: 0 8px 32px rgba(0,0,0,0.4); }
.preview-img-box img { width: 100%; display: block; }
.preview-info { flex: 1; display: flex; flex-direction: column; gap: 14px; }
.file-name { color: #55556a; font-size: 12px; word-break: break-all; }
.char-hint-input { width: 100%; padding: 11px 14px; background: #0a0a14; border: 1px solid rgba(255,255,255,0.08); border-radius: 10px; color: #e8e8f0; font-size: 14px; outline: none; transition: border-color 0.2s, box-shadow 0.2s; }
.char-hint-input:focus { border-color: rgba(139,92,246,0.5); box-shadow: 0 0 0 3px rgba(139,92,246,0.08); }
.char-hint-input::placeholder { color: #44445a; }
.char-hint-label { font-size: 11px; font-weight: 600; color: #55556a; text-transform: uppercase; letter-spacing: 0.6px; margin-bottom: 6px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 26px; border: none; border-radius: 10px; font-size: 14px; font-family: inherit; cursor: pointer; transition: all 0.2s; font-weight: 500; }
.btn-primary { background: linear-gradient(135deg, #7c3aed, #4f46e5); color: white; box-shadow: 0 0 20px rgba(124,58,237,0.25); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 24px rgba(124,58,237,0.4); }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-secondary { background: rgba(255,255,255,0.05); color: #9090b0; border: 1px solid rgba(255,255,255,0.08); }
.btn-secondary:hover { border-color: rgba(139,92,246,0.35); color: #c0c0e0; background: rgba(139,92,246,0.06); }
.loading { display: none; text-align: center; padding: 48px; }
.loading.active { display: block; }
.spinner { width: 36px; height: 36px; border: 2px solid rgba(139,92,246,0.15); border-top-color: #8b5cf6; border-radius: 50%; animation: spin 0.7s linear infinite; margin: 0 auto 16px; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { color: #7070a0; font-size: 14px; }
.result-section { display: none; margin-top: 32px; }
.result-section.active { display: block; }
.result-card { background: #0e0e1c; border-radius: 16px; padding: 26px; margin-bottom: 12px; border: 1px solid rgba(255,255,255,0.06); transition: border-color 0.2s; }
.result-card:hover { border-color: rgba(255,255,255,0.11); }
.result-card h3 { font-size: 11px; font-weight: 600; color: #55556a; text-transform: uppercase; letter-spacing: 0.9px; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.result-card h3::before { content: ""; width: 3px; height: 14px; border-radius: 2px; background: linear-gradient(180deg, #8b5cf6, #6366f1); flex-shrink: 0; }
.tag { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.tag-high { background: rgba(16,185,129,0.1); color: #6ee7b7; border: 1px solid rgba(16,185,129,0.2); }
.tag-mid { background: rgba(245,158,11,0.1); color: #fcd34d; border: 1px solid rgba(245,158,11,0.2); }
.tag-low { background: rgba(239,68,68,0.1); color: #fca5a5; border: 1px solid rgba(239,68,68,0.2); }
.character-name { font-size: 26px; font-weight: 700; letter-spacing: -0.5px; color: #f0f0f8; margin-bottom: 4px; }
.source-name { font-size: 14px; color: #7070a0; margin-bottom: 12px; }
.alternatives { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.alt-tag { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); padding: 3px 10px; border-radius: 6px; font-size: 11px; color: #7070a0; }
.info-row { margin-bottom: 10px; line-height: 1.7; font-size: 14px; color: #b0b0c8; }
.info-label { color: #55556a; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.prompt-box { position: relative; }
.prompt-textarea { width: 100%; min-height: 130px; background: #080812; border: 1px solid rgba(255,255,255,0.07); border-radius: 10px; color: #d0d0e8; padding: 14px 80px 14px 14px; font-family: 'Cascadia Code', 'Fira Code', monospace; font-size: 12.5px; line-height: 1.7; resize: vertical; transition: border-color 0.2s, box-shadow 0.2s; }
.prompt-textarea:focus { outline: none; border-color: rgba(139,92,246,0.4); box-shadow: 0 0 0 3px rgba(139,92,246,0.07); }
.copy-btn { position: absolute; top: 10px; right: 10px; background: rgba(139,92,246,0.12); border: 1px solid rgba(139,92,246,0.22); color: #a78bfa; padding: 5px 14px; border-radius: 7px; font-size: 12px; font-family: inherit; cursor: pointer; transition: all 0.2s; }
.copy-btn:hover { background: rgba(139,92,246,0.22); color: #c4b5fd; }
.enhance-options { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.enhance-option { display: flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.07); border-radius: 10px; padding: 10px 16px; transition: all 0.2s; flex: 1; min-width: 160px; }
.enhance-option:hover { border-color: rgba(139,92,246,0.3); background: rgba(139,92,246,0.05); }
.enhance-option input[type="checkbox"] { display: none; }
.prompt-status { display: none; margin-bottom: 12px; padding: 10px 12px; border-radius: 10px; font-size: 12px; line-height: 1.6; }
.prompt-status.active { display: block; }
.prompt-status.info { background: rgba(99,102,241,0.08); border: 1px solid rgba(99,102,241,0.18); color: #c7d2fe; }
.prompt-status.success { background: rgba(16,185,129,0.08); border: 1px solid rgba(16,185,129,0.18); color: #a7f3d0; }
.prompt-status.warning { background: rgba(245,158,11,0.08); border: 1px solid rgba(245,158,11,0.18); color: #fde68a; }
.toggle-track { width: 38px; height: 21px; background: #1e1e30; border-radius: 11px; position: relative; transition: background 0.25s; flex-shrink: 0; border: 1px solid rgba(255,255,255,0.08); }
.toggle-track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 15px; height: 15px; background: #55556a; border-radius: 50%; transition: all 0.25s; }
.enhance-option input:checked + .toggle-track { background: #7c3aed; border-color: rgba(124,58,237,0.4); }
.enhance-option input:checked + .toggle-track::after { left: 19px; background: #fff; }
.toggle-label { font-size: 13px; font-weight: 500; color: #c0c0e0; }
.toggle-hint { font-size: 11px; color: #55556a; margin-top: 1px; }
.error-box { display: none; background: rgba(239,68,68,0.07); border: 1px solid rgba(239,68,68,0.18); border-radius: 12px; padding: 16px 20px; margin-top: 16px; color: #fca5a5; font-size: 14px; }
.error-box.active { display: block; }
.generate-section { display: none; margin-top: 16px; }
.generate-section.active { display: block; }
.btn-generate { background: linear-gradient(135deg, #0d9488, #0891b2); color: white; width: 100%; padding: 14px; font-size: 15px; border-radius: 12px; box-shadow: 0 0 20px rgba(13,148,136,0.2); border: none; font-family: inherit; font-weight: 500; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; transition: all 0.2s; }
.btn-generate:hover { transform: translateY(-1px); box-shadow: 0 4px 28px rgba(13,148,136,0.35); }
.btn-generate:disabled { opacity: 0.4; cursor: not-allowed; transform: none; box-shadow: none; }
.generated-img-box { margin-top: 16px; border-radius: 14px; overflow: hidden; background: #0e0e1a; position: relative; border: 1px solid rgba(255,255,255,0.07); box-shadow: 0 16px 48px rgba(0,0,0,0.5); }
.generated-img-box img { width: 100%; display: block; }
.img-actions { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.loading-generate { display: none; text-align: center; padding: 32px; }
.loading-generate.active { display: block; }
.resolution-badge { position: absolute; top: 12px; right: 12px; background: rgba(0,0,0,0.65); backdrop-filter: blur(8px); color: #5eead4; padding: 4px 12px; border-radius: 6px; font-size: 11px; font-weight: 700; letter-spacing: 0.5px; border: 1px solid rgba(94,234,212,0.2); }
@media (max-width:640px){.preview-wrapper{flex-direction:column}.preview-img-box{flex:none;width:100%}h1{font-size:28px}.enhance-option{min-width:100%}}
.settings-btn { position: fixed; top: 20px; right: 20px; width: 42px; height: 42px; border-radius: 50%; background: rgba(14,14,28,0.9); border: 1px solid rgba(255,255,255,0.1); color: #7070a0; font-size: 20px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s; z-index: 100; backdrop-filter: blur(12px); }
.settings-btn:hover { border-color: rgba(139,92,246,0.4); color: #a78bfa; box-shadow: 0 0 16px rgba(139,92,246,0.2); }
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.7); backdrop-filter: blur(8px); z-index: 200; align-items: center; justify-content: center; }
.modal-overlay.active { display: flex; }
.modal { background: #0e0e1c; border: 1px solid rgba(255,255,255,0.09); border-radius: 20px; padding: 28px; width: 90%; max-width: 520px; max-height: 85vh; overflow-y: auto; box-shadow: 0 24px 64px rgba(0,0,0,0.6); }
.modal h2 { font-size: 17px; color: #c4b5fd; margin-bottom: 22px; display: flex; align-items: center; justify-content: space-between; font-weight: 600; }
.modal-close { background: none; border: none; color: #55556a; font-size: 22px; cursor: pointer; }
.modal-close:hover { color: #e8e8f0; }
.setting-group { margin-bottom: 22px; }
.setting-group-title { font-size: 11px; color: #8b5cf6; margin-bottom: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; }
.setting-field { margin-bottom: 10px; }
.setting-label { font-size: 11px; color: #55556a; margin-bottom: 5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.setting-input { width: 100%; padding: 9px 12px; background: #080812; border: 1px solid rgba(255,255,255,0.08); border-radius: 8px; color: #e8e8f0; font-size: 13px; outline: none; font-family: inherit; transition: border-color 0.2s; }
.setting-input:focus { border-color: rgba(139,92,246,0.45); }
.setting-select { width: 100%; padding: 9px 12px; background: #080812; border: 1px solid rgba(255,255,255,0.08); border-radius: 8px; color: #e8e8f0; font-size: 13px; outline: none; appearance: auto; font-family: inherit; }
.setting-select:focus { border-color: rgba(139,92,246,0.45); }
.setting-saved { font-size: 11px; color: #5eead4; opacity: 0; transition: opacity 0.3s; margin-left: 8px; }
.setting-saved.show { opacity: 1; }

/* 通用工具类 */
.header-center { text-align: center; margin-bottom: 52px; }
.lighting-notes-label { margin-top: 12px; }
.action-row { display: flex; gap: 12px; margin-top: 16px; }
.result-card-mt { margin-top: 16px; }
.card-description { font-size: 13px; color: #888; margin-bottom: 14px; }

/* 提示词 Tab */
.prompt-tab-bar { display: flex; gap: 0; margin-bottom: 14px; border: 1px solid rgba(255,255,255,0.08); border-radius: 8px; overflow: hidden; width: fit-content; }
.prompt-tab { padding: 6px 18px; font-size: 13px; border: none; cursor: pointer; background: rgba(255,255,255,0.04); color: #7070a0; font-weight: normal; transition: all 0.2s; }
.prompt-tab.active { background: #6366f1; color: #fff; font-weight: 600; }

.result-meta { margin-top: 10px; font-size: 12px; color: #7e7ea0; line-height: 1.6; }
