#app *, #app *::before, #app *::after { box-sizing: border-box; margin: 0; padding: 0; }
#app {
  --bg: #fbfbfd;
  --surface: #ffffff;
  --surface2: #f5f6f8;
  --border: #e5e5e7;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --accent: #7c3aed;
  --text: #1d1d1f;
  --text-dim: #86868b;
  --danger: #ef4444;
  --success: #10b981;
  --radius: 12px;
}
#app {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            background: var(--bg);
            color: var(--text);
            min-height: 100vh;
            line-height: 1.6;
        }
#app .container {
            max-width: 960px;
            margin: 0 auto;
            padding: 40px 24px;
        }
#app header {
            text-align: center;
            margin-bottom: 40px;
        }
#app header h1 {
            font-size: 2rem;
            font-weight: 700;
            background: linear-gradient(135deg, var(--primary), var(--accent));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            margin-bottom: 8px;
        }
#app header p {
            color: var(--text-dim);
            font-size: 0.95rem;
        }
#app .card {
            background: var(--surface);
            border: 1px solid var(--border);
            border-radius: var(--radius);
            padding: 28px;
            margin-bottom: 24px;
        }
#app .card-title {
            font-size: 1.05rem;
            font-weight: 600;
            margin-bottom: 20px;
            display: flex;
            align-items: center;
            gap: 10px;
        }
#app .card-title .badge {
            background: var(--primary);
            color: #fff;
            font-size: 0.75rem;
            padding: 2px 10px;
            border-radius: 20px;
            font-weight: 500;
        }
#app .settings-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 16px;
        }
#app .settings-grid .full-width {
            grid-column: 1 / -1;
        }
@media (max-width: 600px) {
#app .settings-grid { grid-template-columns: 1fr; }
}
#app .field label {
            display: block;
            font-size: 0.85rem;
            color: var(--text-dim);
            margin-bottom: 6px;
            font-weight: 500;
        }
#app .field input[type="text"], #app .field input[type="number"] {
            width: 100%;
            padding: 10px 14px;
            background: var(--surface2);
            border: 1px solid var(--border);
            border-radius: 8px;
            color: var(--text);
            font-size: 0.95rem;
            outline: none;
            transition: border-color 0.2s;
        }
#app .field input:focus {
            border-color: var(--primary);
        }
#app .field .hint {
            font-size: 0.78rem;
            color: var(--text-dim);
            margin-top: 4px;
        }
#app .quality-row {
            display: flex;
            align-items: center;
            gap: 14px;
        }
#app .quality-row input[type="range"] {
            flex: 1;
            accent-color: var(--primary);
            height: 6px;
        }
#app .quality-row .quality-value {
            min-width: 42px;
            text-align: center;
            font-weight: 600;
            font-size: 0.95rem;
            color: var(--accent);
        }
#app .dropzone {
            border: 2px dashed var(--border);
            border-radius: var(--radius);
            padding: 48px 24px;
            text-align: center;
            cursor: pointer;
            transition: all 0.25s;
            position: relative;
        }
#app .dropzone:hover, #app .dropzone.dragover {
            border-color: var(--primary);
            background: rgba(37, 99, 235, 0.06);
        }
#app .dropzone-icon {
            font-size: 2.5rem;
            margin-bottom: 12px;
            opacity: 0.5;
        }
#app .dropzone-text {
            color: var(--text-dim);
            font-size: 0.95rem;
        }
#app .dropzone-text strong {
            color: var(--primary);
        }
#app .dropzone input[type="file"] {
            position: absolute;
            inset: 0;
            opacity: 0;
            cursor: pointer;
        }
#app .file-list-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 16px;
        }
#app .file-count {
            font-size: 0.85rem;
            color: var(--text-dim);
        }
#app .btn-clear {
            background: none;
            border: 1px solid var(--border);
            color: var(--danger);
            padding: 5px 14px;
            border-radius: 6px;
            font-size: 0.8rem;
            cursor: pointer;
            transition: all 0.2s;
        }
#app .btn-clear:hover {
            border-color: var(--danger);
            background: rgba(239, 68, 68, 0.08);
        }
#app .file-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
            gap: 12px;
            max-height: 480px;
            overflow-y: auto;
            padding-right: 4px;
        }
#app .file-grid::-webkit-scrollbar { width: 6px; }
#app .file-grid::-webkit-scrollbar-track { background: transparent; }
#app .file-grid::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
#app .file-item {
            background: var(--surface2);
            border: 1px solid var(--border);
            border-radius: 10px;
            overflow: hidden;
            transition: transform 0.2s;
        }
#app .file-item:hover {
            transform: translateY(-2px);
        }
#app .file-item .thumb {
            width: 100%;
            aspect-ratio: 1;
            object-fit: cover;
            display: block;
            background: #f0f0f2;
        }
#app .file-item .info {
            padding: 10px 12px;
        }
#app .file-item .new-name {
            font-size: 0.78rem;
            color: var(--accent);
            word-break: break-all;
            font-weight: 500;
        }
#app .file-item .old-name {
            font-size: 0.72rem;
            color: var(--text-dim);
            margin-top: 2px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
#app .file-item .remove-btn {
            display: block;
            width: 100%;
            background: none;
            border: none;
            border-top: 1px solid var(--border);
            color: var(--text-dim);
            font-size: 0.75rem;
            padding: 6px;
            cursor: pointer;
            transition: all 0.2s;
        }
#app .file-item .remove-btn:hover {
            color: var(--danger);
            background: rgba(239, 68, 68, 0.06);
        }
#app .name-preview {
            background: var(--surface2);
            border-radius: 8px;
            padding: 16px;
            margin-top: 16px;
        }
#app .name-preview-title {
            font-size: 0.8rem;
            color: var(--text-dim);
            margin-bottom: 8px;
            font-weight: 500;
        }
#app .name-preview code {
            display: block;
            font-family: 'Fira Code', 'Cascadia Code', monospace;
            font-size: 0.82rem;
            color: var(--accent);
            line-height: 1.8;
        }
#app .actions {
            display: flex;
            gap: 12px;
            flex-wrap: wrap;
        }
#app .btn {
            padding: 12px 28px;
            border: none;
            border-radius: 8px;
            font-size: 0.95rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.25s;
            display: inline-flex;
            align-items: center;
            gap: 8px;
        }
#app .btn-primary {
            background: linear-gradient(135deg, var(--primary), #7c3aed);
            color: #fff;
            flex: 1;
            justify-content: center;
        }
#app .btn-primary:hover:not(:disabled) {
            background: linear-gradient(135deg, var(--primary-hover), #2563eb);
            transform: translateY(-1px);
            box-shadow: 0 4px 20px rgba(37, 99, 235, 0.3);
        }
#app .btn-primary:disabled {
            opacity: 0.4;
            cursor: not-allowed;
        }
#app .progress-wrap {
            margin-top: 20px;
            display: none;
        }
#app .progress-wrap.active { display: block; }
#app .progress-bar-bg {
            width: 100%;
            height: 8px;
            background: var(--surface2);
            border-radius: 4px;
            overflow: hidden;
        }
#app .progress-bar {
            height: 100%;
            background: linear-gradient(90deg, var(--primary), var(--accent));
            border-radius: 4px;
            transition: width 0.3s;
            width: 0%;
        }
#app .progress-text {
            font-size: 0.82rem;
            color: var(--text-dim);
            margin-top: 8px;
            text-align: center;
        }
#app .toast {
            position: fixed;
            bottom: 32px;
            left: 50%;
            transform: translateX(-50%) translateY(100px);
            background: var(--success);
            color: #fff;
            padding: 12px 24px;
            border-radius: 8px;
            font-weight: 600;
            font-size: 0.9rem;
            opacity: 0;
            transition: all 0.4s;
            z-index: 999;
        }
#app .toast.show {
            transform: translateX(-50%) translateY(0);
            opacity: 1;
        }
#app .sort-hint {
            font-size: 0.78rem;
            color: var(--text-dim);
            margin-top: 8px;
            font-style: italic;
        }

/* ===== 与站点浅色风格对齐 ===== */
#app .container { padding: 8px 4px 0; }
#app svg { vertical-align: -0.15em; }
#app .card-title .card-ico { color: var(--primary); display: inline-flex; }
#app .dropzone-icon { color: var(--primary); line-height: 1; opacity: 1; }
#app .dropzone-icon svg { width: 52px; height: 52px; }
#app .btn-primary svg { margin-right: 2px; }
#app .btn-clear svg { margin-right: 3px; vertical-align: -2px; }
