        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
            min-height: 100vh;
            padding: 0;
            color: #e0e0e0;
            overflow-x: hidden;
        }

        body.app-authenticated {
            overflow: hidden;
        }

        .login-video-shell {
            position: fixed;
            inset: 0;
            z-index: 0;
            background:
                radial-gradient(circle at 20% 20%, rgba(74, 123, 255, 0.25), transparent 45%),
                radial-gradient(circle at 80% 85%, rgba(255, 92, 92, 0.2), transparent 50%),
                linear-gradient(125deg, #04050f 0%, #121b32 55%, #0d1020 100%);
            overflow: hidden;
        }

        .login-video-shell.is-ready .login-video {
            opacity: 1;
            transform: scale(1);
        }

        .login-video {
            position: absolute;
            inset: 0;
            width: 100%;
            height: 100%;
            object-fit: cover;
            opacity: 0;
            transform: scale(1.02);
            transition: opacity 0.45s ease, transform 0.6s ease;
        }

        .login-video-overlay {
            position: absolute;
            inset: 0;
            background: transparent;
            pointer-events: none;
        }

        .app-authenticated .login-video-shell {
            opacity: 0;
            visibility: hidden;
            transition: opacity 0.25s ease;
            pointer-events: none;
        }

        .app-authenticated .login-brand-wrap {
            display: none;
        }

        /* 粒子画布背景 */
        #particles-canvas {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: 1;
            pointer-events: none;
        }

        /* 确保所有内容在粒子上层 */
        .container, .modal {
            position: relative;
            z-index: 2;
        }

        .container {
            width: 100%;
            max-width: none;
            margin: 0;
            padding: 6px 12px 14px;
            min-height: 100vh;
            height: 100vh;
            overflow: hidden;
        }

        .header {
            color: white;
            margin-bottom: 10px;
        }

        .header-top {
            display: flex;
            align-items: center;
            justify-content: flex-start;
            gap: 8px;
            margin-bottom: 0;
        }

        .header-title {
            text-align: left;
            flex: 1;
            min-width: 0;
        }

        .header-brand {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            min-width: 0;
        }

        .header-brand-logo {
            width: 60px;
            height: 60px;
            object-fit: contain;
            background: transparent;
            flex: 0 0 auto;
        }

        .header-spacer {
            display: none;
            width: 0;
        }

        .header h1 {
            font-family: "Inter", "SF Pro Display", "Segoe UI", "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
            font-size: 1.6rem;
            margin-bottom: 0;
            white-space: nowrap;
            background: linear-gradient(135deg, #667eea, #764ba2);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }

        .header p {
            font-size: 0.95rem;
            opacity: 0.8;
        }

        .account-box {
            position: relative;
            display: flex;
            align-items: center;
            justify-content: flex-end;
            min-width: 220px;
            margin-left: auto;
        }

        .account-trigger {
            display: flex;
            align-items: center;
            gap: 8px;
            background: rgba(22, 33, 62, 0.95);
            border: 1px solid rgba(255,255,255,0.2);
            color: #e6e9ff;
            border-radius: 999px;
            padding: 6px 10px;
            cursor: pointer;
        }

        .account-avatar {
            width: 28px;
            height: 28px;
            border-radius: 50%;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-size: 14px;
            background: linear-gradient(135deg, #667eea, #764ba2);
            color: white;
        }

        .account-name {
            font-size: 13px;
            max-width: 116px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .account-menu {
            display: none;
            position: absolute;
            right: 0;
            top: 42px;
            min-width: 190px;
            background: rgba(12, 20, 38, 0.98);
            border: 1px solid rgba(255,255,255,0.2);
            border-radius: 10px;
            box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
            overflow: hidden;
            z-index: 20;
        }

        .account-menu.show {
            display: block;
        }

        .account-menu-item {
            width: 100%;
            border: none;
            background: transparent;
            color: #dbe2ff;
            text-align: left;
            padding: 10px 12px;
            font-size: 13px;
            cursor: pointer;
        }

        .account-menu-item:hover {
            background: rgba(102, 126, 234, 0.2);
        }

        .account-menu-item.disabled {
            color: #8f97b5;
            cursor: default;
        }

        .account-menu-item.disabled:hover {
            background: transparent;
        }

        /* 成本徽章 */
        .cost-badge {
            background: linear-gradient(135deg, #667eea, #764ba2);
            color: white;
            padding: 8px 20px;
            border-radius: 20px;
            display: inline-block;
            margin-bottom: 15px;
            font-weight: 600;
            font-size: 0.9rem;
        }

        .cost-badge-row {
            display: flex;
            justify-content: flex-end;
        }

        /* 标签页样式 */
        .tabs {
            display: flex;
            background: rgba(22, 33, 62, 0.95);
            border-radius: 12px;
            padding: 4px;
            margin-bottom: 0;
            flex-wrap: wrap;
            gap: 4px;
            border: 1px solid rgba(255,255,255,0.15);
            backdrop-filter: blur(10px);
            position: static;
            top: auto;
            z-index: auto;
        }

        .tab {
            flex: 1;
            min-width: 100px;
            padding: 10px 14px;
            text-align: center;
            color: rgba(255, 255, 255, 0.6);
            cursor: pointer;
            border-radius: 8px;
            transition: all 0.3s ease;
            font-weight: 500;
            border: none;
            background: transparent;
            font-size: 13px;
        }

        .tab.active {
            background: linear-gradient(135deg, #667eea, #764ba2);
            color: white;
            box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
        }

        .tab:hover:not(.active) {
            color: white;
            background: rgba(255, 255, 255, 0.1);
        }

        .tab-content {
            display: none;
        }

        .tab-content.active {
            display: block;
        }

        .card {
            background: rgba(22, 33, 62, 0.95);
            border-radius: 16px;
            padding: 24px;
            border: 1px solid rgba(255,255,255,0.15);
            margin-bottom: 20px;
            backdrop-filter: blur(10px);
        }

        .card h2 {
            color: #667eea;
            margin-bottom: 20px;
            font-size: 1.2rem;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .card h3 {
            color: #e0e0e0;
            margin-bottom: 15px;
            font-size: 1rem;
        }

        /* 两列布局 */
        .two-column {
            display: grid;
            grid-template-columns: 2fr 1fr;
            gap: 20px;
        }

        .single-column {
            display: block;
        }

        .app-shell {
            display: grid;
            grid-template-columns: 184px minmax(0, 1fr);
            gap: 12px;
            align-items: stretch;
            height: calc(100vh - 86px);
        }

        .module-sidebar {
            padding: 14px;
            position: static;
            display: flex;
            flex-direction: column;
            min-height: 0;
            align-items: flex-start;
        }

        .module-sidebar h3 {
            color: #aab8f0;
            font-size: 13px;
            margin-bottom: 10px;
            letter-spacing: 0.4px;
        }

        .module-tabs {
            display: flex;
            flex-direction: column;
            gap: 10px;
            flex: 0 0 auto;
            width: 100%;
            padding: 0;
            background: transparent;
            border: none;
            backdrop-filter: none;
            overflow: visible;
            min-height: auto;
        }

        .module-group {
            width: 100%;
            display: flex;
            flex-direction: column;
            gap: 8px;
            padding: 2px 0;
        }

        .module-group + .module-group {
            margin-top: 2px;
        }

        .module-group-toggle {
            width: 100%;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 8px;
            padding: 0 2px;
            border: none;
            background: transparent;
            color: #aab8f0;
            font-size: 13px;
            font-weight: 600;
            letter-spacing: 0.4px;
            text-align: left;
            cursor: pointer;
        }

        .module-group-toggle:hover {
            color: #c2cff7;
        }

        .module-group-chevron {
            display: inline-block;
            font-size: 14px;
            line-height: 1;
            color: #8ea2da;
            transition: transform 0.2s ease;
        }

        .module-group.is-open .module-group-chevron {
            transform: rotate(0deg);
        }

        .module-group:not(.is-open) .module-group-chevron {
            transform: rotate(-90deg);
        }

        .module-group-items {
            display: flex;
            flex-direction: column;
            gap: 8px;
            padding-left: 8px;
        }

        .module-group:not(.is-open) .module-group-items {
            display: none;
        }

        .module-tabs .tab {
            width: 100%;
            text-align: center;
            padding: 10px 12px;
            border: 1px solid rgba(255, 255, 255, 0.08);
            border-radius: 10px;
            background: rgba(10, 15, 30, 0.45);
            color: rgba(255, 255, 255, 0.76);
            font-size: 13px;
            line-height: 1.35;
        }

        .module-tabs .tab.active {
            border-color: rgba(102, 126, 234, 0.6);
            box-shadow: 0 0 0 1px rgba(102, 126, 234, 0.22);
        }

        .workspace-main {
            min-width: 0;
            min-height: 0;
            display: flex;
            flex-direction: column;
        }

        .workspace-topbar {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            gap: 12px;
            margin-bottom: 10px;
            padding: 12px 14px;
            border-radius: 12px;
            border: 1px solid rgba(255, 255, 255, 0.12);
            background: rgba(12, 18, 35, 0.8);
        }

        .workspace-topbar h3 {
            margin: 0 0 4px 0;
            color: #dbe4ff;
            font-size: 16px;
        }

        .workspace-topbar p {
            margin: 0;
            font-size: 12px;
            color: #8d98ba;
        }

        .workspace-content {
            display: grid;
            grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
            gap: 12px;
            align-items: stretch;
            min-height: 0;
            flex: 1;
        }

        .workspace-content.feed-hidden {
            grid-template-columns: minmax(0, 1fr);
        }

        .workspace-center {
            min-width: 0;
            min-height: 0;
            overflow: auto;
            padding-right: 2px;
            scrollbar-gutter: stable;
        }

        .workspace-content.feed-hidden .workspace-center {
            overflow: auto;
        }

        .workspace-feed {
            position: static;
            max-height: none;
            height: 100%;
            overflow: auto;
            scrollbar-gutter: stable;
        }

        .sidebar-footer {
            margin-top: auto;
            padding-top: 12px;
            border-top: 1px solid rgba(255,255,255,0.14);
            width: 100%;
        }

        .sidebar-footer .cost-summary-card {
            border: 1px solid rgba(255,255,255,0.16);
            border-radius: 10px;
            background: rgba(12, 20, 38, 0.95);
            padding: 8px 10px;
            margin-bottom: 10px;
            width: 100%;
        }

        .sidebar-footer .cost-summary-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 8px;
            min-height: 24px;
        }

        .sidebar-footer .cost-summary-row + .cost-summary-row {
            margin-top: 6px;
            padding-top: 6px;
            border-top: 1px dashed rgba(255,255,255,0.16);
        }

        .sidebar-footer .cost-summary-label {
            color: #a9b6df;
            font-size: 11px;
            line-height: 1.2;
        }

        .sidebar-footer .cost-summary-value {
            color: #ffffff;
            font-size: 12px;
            font-weight: 600;
            line-height: 1.2;
        }

        .sidebar-footer .account-box {
            margin-left: 0;
            justify-content: flex-start;
            min-width: 0;
            width: 100%;
        }

        .sidebar-footer .account-trigger {
            width: 100%;
            justify-content: flex-start;
            border-radius: 10px;
            padding: 7px 9px;
        }

        .sidebar-footer .account-name {
            max-width: none;
            flex: 1;
            font-size: 13px;
        }

        .sidebar-footer .account-menu {
            top: auto;
            bottom: 44px;
            left: 0;
            right: auto;
            min-width: 100%;
        }

        .feed-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 8px;
            margin-bottom: 10px;
        }

        .feed-header h3 {
            margin: 0;
        }

        .feed-subtitle {
            margin: 0 0 10px 0;
            color: #8d98ba;
            font-size: 12px;
        }

        .workspace-module-panel {
            display: none;
        }

        .workspace-module-panel.active {
            display: block;
        }

        /* 输入框 */
        .input-group {
            margin-bottom: 16px;
        }

        .input-group label {
            display: block;
            margin-bottom: 6px;
            color: #b0b0b0;
            font-weight: 500;
            font-size: 0.9rem;
        }

        .input-group input,
        .input-group select,
        .input-group textarea {
            width: 100%;
            padding: 10px 14px;
            border: 1px solid rgba(255,255,255,0.2);
            border-radius: 8px;
            font-size: 14px;
            transition: all 0.3s ease;
            background: rgba(10, 15, 30, 0.9);
            color: #e0e0e0;
        }

        .input-group input:focus,
        .input-group select:focus,
        .input-group textarea:focus {
            outline: none;
            border-color: #667eea;
            box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
        }

        .input-group textarea {
            min-height: 100px;
            resize: vertical;
        }

        /* 文件上传 */
        .upload-area {
            border: 2px dashed rgba(102, 126, 234, 0.6);
            border-radius: 12px;
            padding: 30px;
            text-align: center;
            background: rgba(102, 126, 234, 0.05);
            cursor: pointer;
            transition: all 0.3s ease;
            margin-bottom: 16px;
        }

        .upload-area:hover,
        .upload-area.dragover {
            border-color: #764ba2;
            background: rgba(102, 126, 234, 0.1);
        }

        .upload-icon {
            font-size: 40px;
            margin-bottom: 10px;
        }

        .file-input {
            display: none;
        }

        .file-list {
            margin-top: 12px;
        }

        #uploadFileList {
            max-height: min(34vh, 360px);
            overflow-y: auto;
            overflow-x: hidden;
            padding-right: 4px;
            scrollbar-gutter: stable;
        }

        #uploadFileList:not(:empty) {
            border: 1px solid rgba(255,255,255,0.14);
            border-radius: 8px;
            padding: 8px;
            background: rgba(8, 12, 24, 0.6);
        }

        /* 跨浏览器滚动条外观：避免部分浏览器出现亮白粗条 */
        .workspace-center,
        .workspace-feed,
        #uploadFileList,
        .upload-history-preview-thumbs {
            scrollbar-width: thin; /* Firefox */
            scrollbar-color: rgba(140, 162, 236, 0.45) rgba(10, 18, 36, 0.08);
        }

        .workspace-center::-webkit-scrollbar,
        .workspace-feed::-webkit-scrollbar,
        #uploadFileList::-webkit-scrollbar,
        .upload-history-preview-thumbs::-webkit-scrollbar {
            width: 6px;
            height: 6px;
        }

        .workspace-center::-webkit-scrollbar-track,
        .workspace-feed::-webkit-scrollbar-track,
        #uploadFileList::-webkit-scrollbar-track,
        .upload-history-preview-thumbs::-webkit-scrollbar-track {
            background: rgba(10, 18, 36, 0.08);
            border-radius: 999px;
        }

        .workspace-center::-webkit-scrollbar-thumb,
        .workspace-feed::-webkit-scrollbar-thumb,
        #uploadFileList::-webkit-scrollbar-thumb,
        .upload-history-preview-thumbs::-webkit-scrollbar-thumb {
            background: linear-gradient(180deg, rgba(132, 154, 232, 0.62), rgba(118, 96, 186, 0.64));
            border: 1px solid rgba(8, 14, 28, 0.45);
            border-radius: 999px;
        }

        .workspace-center::-webkit-scrollbar-thumb:hover,
        .workspace-feed::-webkit-scrollbar-thumb:hover,
        #uploadFileList::-webkit-scrollbar-thumb:hover,
        .upload-history-preview-thumbs::-webkit-scrollbar-thumb:hover {
            background: linear-gradient(180deg, rgba(150, 171, 246, 0.74), rgba(130, 105, 208, 0.76));
        }

        .file-item {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 8px 12px;
            background: rgba(10, 15, 30, 0.9);
            border-radius: 6px;
            margin-bottom: 6px;
            font-size: 13px;
        }

        .file-item.file-item-preview {
            justify-content: flex-start;
            gap: 10px;
            align-items: center;
        }

        .file-thumb {
            width: 52px;
            height: 52px;
            border-radius: 8px;
            object-fit: cover;
            border: 1px solid rgba(255,255,255,0.15);
            flex-shrink: 0;
        }

        .file-thumb.file-thumb-zip {
            display: flex;
            align-items: center;
            justify-content: center;
            background: rgba(102, 126, 234, 0.18);
            color: #9fb4ff;
            font-size: 11px;
            font-weight: 700;
            letter-spacing: 0.5px;
        }

        .file-meta {
            min-width: 0;
            flex: 1;
        }

        .file-name {
            color: #e0e0e0;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .file-size {
            color: #888;
            font-size: 12px;
            margin-top: 2px;
        }

        .file-item .remove-btn {
            background: none;
            border: none;
            color: #e74c3c;
            cursor: pointer;
            font-size: 16px;
        }

        /* 按钮 */
        .btn {
            padding: 10px 20px;
            border: none;
            border-radius: 8px;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
        }

        .btn-primary {
            background: linear-gradient(135deg, #667eea, #764ba2);
            color: white;
            box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
        }

        .btn-primary:hover:not(:disabled) {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
        }

        .btn-primary:disabled {
            opacity: 0.5;
            cursor: not-allowed;
            transform: none;
        }

        .btn.btn-loading::before {
            content: '';
            width: 13px;
            height: 13px;
            border: 2px solid rgba(255, 255, 255, 0.38);
            border-top-color: #ffffff;
            border-radius: 50%;
            animation: btn-spin 0.8s linear infinite;
        }

        @keyframes btn-spin {
            to {
                transform: rotate(360deg);
            }
        }

        .btn-secondary {
            background: rgba(255,255,255,0.1);
            color: #e0e0e0;
            border: 1px solid rgba(255,255,255,0.2);
        }

        .btn-secondary:hover {
            background: rgba(255,255,255,0.2);
        }

        .btn-full {
            width: 100%;
        }

        .btn-row {
            display: flex;
            gap: 10px;
            margin-bottom: 16px;
        }

        /* 提示区域 */
        .tips-section {
            background: rgba(52, 152, 219, 0.2);
            border-radius: 10px;
            padding: 16px;
            border-left: 3px solid #3498db;
            margin-bottom: 12px;
        }

        .tips-section h4 {
            color: #3498db;
            margin-bottom: 8px;
            font-size: 0.9rem;
        }

        .tips-section ul {
            margin: 0;
            padding-left: 18px;
            color: #b0b0b0;
            font-size: 0.85rem;
        }

        .tips-section li {
            margin: 4px 0;
        }

        .tips-collapse {
            margin-top: 14px;
            border: 1px solid rgba(255,255,255,0.15);
            border-radius: 10px;
            overflow: hidden;
            background: rgba(12, 18, 34, 0.9);
        }

        .tips-collapse summary {
            cursor: pointer;
            padding: 12px 14px;
            color: #9fb4ff;
            font-weight: 600;
            font-size: 0.9rem;
            list-style: none;
        }

        .tips-collapse summary::-webkit-details-marker {
            display: none;
        }

        .tips-collapse summary::after {
            content: '▾';
            float: right;
            color: #667eea;
            transition: transform 0.2s ease;
        }

        .tips-collapse[open] summary::after {
            transform: rotate(180deg);
        }

        .upload-side-task-meta {
            color: #b0b0b0;
            font-size: 0.84rem;
            line-height: 1.65;
        }

        .upload-side-task-meta p {
            margin: 5px 0;
            word-break: break-word;
        }

        .img-side-task-meta {
            color: #b0b0b0;
            font-size: 0.84rem;
            line-height: 1.65;
        }

        .img-side-task-meta p {
            margin: 5px 0;
            word-break: break-word;
        }

        .upload-side-preview-grid {
            margin-top: 12px;
            column-count: 1;
            column-gap: 0;
        }

        .img-side-preview-grid {
            margin-top: 12px;
            column-count: 1;
            column-gap: 0;
        }

        .upload-side-preview-item {
            display: inline-block;
            width: 100%;
            margin: 0 0 10px 0;
            border: 1px solid rgba(255,255,255,0.15);
            border-radius: 8px;
            overflow: hidden;
            background: rgba(7, 10, 20, 0.95);
            break-inside: avoid;
        }

        .upload-side-preview-item img {
            width: 100%;
            height: auto;
            object-fit: contain;
            display: block;
            cursor: zoom-in;
        }

        .upload-history-preview-shell {
            margin-top: 8px;
            padding: 10px;
            border: 1px solid rgba(255,255,255,0.12);
            border-radius: 10px;
            background: rgba(7, 10, 20, 0.95);
        }

        .upload-history-preview-shell.single-image {
            padding: 8px;
        }

        .upload-history-preview-shell.with-thumbs {
            display: grid;
            grid-template-columns: minmax(0, 1fr) 72px;
            gap: 10px;
            align-items: start;
        }

        .upload-history-preview-main {
            border-radius: 8px;
            overflow: hidden;
            border: 1px solid rgba(255,255,255,0.16);
            background: rgba(4, 8, 18, 0.95);
        }

        .upload-history-preview-main img {
            width: 100%;
            max-height: 460px;
            object-fit: contain;
            display: block;
            cursor: zoom-in;
        }

        .upload-history-preview-shell.single-image .upload-history-preview-main img {
            max-height: 560px;
        }

        .upload-history-preview-shell.with-thumbs .upload-history-preview-main img {
            height: 420px;
            max-height: none;
        }

        .upload-history-preview-thumbs {
            display: flex;
            flex-direction: column;
            gap: 8px;
            max-height: 420px;
            overflow-y: auto;
            overflow-x: hidden;
            padding-right: 2px;
        }

        .upload-history-preview-thumb {
            width: 60px;
            height: 60px;
            border: 1px solid rgba(255,255,255,0.2);
            border-radius: 8px;
            overflow: hidden;
            background: rgba(255,255,255,0.04);
            padding: 0;
            flex: 0 0 auto;
            cursor: pointer;
            appearance: none;
            -webkit-appearance: none;
            outline: none;
            font-size: 0;
            line-height: 0;
            color: transparent;
            transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
        }

        .upload-history-preview-thumb.is-pending {
            visibility: hidden;
            pointer-events: none;
        }

        .upload-history-preview-thumb img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
        }

        .upload-history-preview-thumb.is-active {
            border-color: #8fb0ff;
            box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.55), 0 0 0 4px rgba(102, 126, 234, 0.18);
            transform: translateY(-1px);
            background: rgba(102,126,234,0.16);
        }

        .back-to-top-btn {
            position: fixed;
            right: 20px;
            bottom: 24px;
            z-index: 30;
            border: 1px solid rgba(255,255,255,0.24);
            background: linear-gradient(135deg, rgba(102,126,234,0.95), rgba(118,75,162,0.95));
            color: #fff;
            border-radius: 999px;
            padding: 10px 14px;
            font-size: 13px;
            font-weight: 600;
            cursor: pointer;
            opacity: 0;
            transform: translateY(10px);
            pointer-events: none;
            transition: opacity 0.2s ease, transform 0.2s ease;
        }

        .back-to-top-btn.show {
            opacity: 1;
            transform: translateY(0);
            pointer-events: auto;
        }

        .back-to-top-btn:hover {
            filter: brightness(1.08);
        }

        /* 结果区域 */
        .result-box {
            background: rgba(10, 15, 30, 0.95);
            border-radius: 10px;
            padding: 16px;
            margin-top: 16px;
            border: 1px solid rgba(255,255,255,0.1);
        }

        .result-box h4 {
            color: #667eea;
            margin-bottom: 10px;
            font-size: 0.9rem;
        }

        .result-box textarea {
            width: 100%;
            min-height: 120px;
            border: 1px solid rgba(255,255,255,0.15);
            border-radius: 6px;
            padding: 10px;
            font-family: monospace;
            font-size: 12px;
            background: rgba(5, 10, 20, 0.95);
            color: #e0e0e0;
        }

        /* 统计卡片 */
        .stats-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 16px;
            margin-bottom: 20px;
        }

        .stats-card {
            background: rgba(22, 33, 62, 0.95);
            padding: 20px;
            border-radius: 12px;
            text-align: center;
            border: 1px solid rgba(255,255,255,0.15);
            backdrop-filter: blur(10px);
        }

        .stats-card.primary {
            background: linear-gradient(135deg, rgba(155, 89, 182, 0.5), rgba(142, 68, 173, 0.5));
            border-color: #9b59b6;
        }

        .stats-card.info {
            background: linear-gradient(135deg, rgba(52, 152, 219, 0.5), rgba(41, 128, 185, 0.5));
            border-color: #3498db;
        }

        .stats-card.success {
            background: linear-gradient(135deg, rgba(39, 174, 96, 0.5), rgba(46, 204, 113, 0.5));
            border-color: #27ae60;
        }

        .stats-card.warning {
            background: linear-gradient(135deg, rgba(241, 196, 15, 0.5), rgba(243, 156, 18, 0.5));
            border-color: #f1c40f;
        }

        .stats-value {
            font-size: 1.8rem;
            font-weight: 700;
            margin-bottom: 4px;
            color: white;
        }

        .stats-label {
            font-size: 0.8rem;
            color: #b0b0b0;
        }

        .stats-card-loading {
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            gap: 10px;
        }

        .stats-skeleton-line {
            display: block;
            border-radius: 8px;
            background: linear-gradient(90deg, rgba(255,255,255,0.08), rgba(255,255,255,0.2), rgba(255,255,255,0.08));
            background-size: 220% 100%;
            animation: stats-shimmer 1.2s linear infinite;
        }

        .stats-skeleton-line.lg {
            width: 72%;
            height: 24px;
        }

        .stats-skeleton-line.sm {
            width: 48%;
            height: 12px;
        }

        .stats-reveal {
            animation: stats-fade-up 0.5s ease both;
        }

        .stats-visual-shell {
            display: grid;
            grid-template-columns: 1.35fr 1fr;
            gap: 14px;
        }

        .stats-panel {
            padding: 14px;
            border: 1px solid rgba(255,255,255,0.12);
            border-radius: 12px;
            background: rgba(7, 12, 24, 0.58);
        }

        .stats-panel h4 {
            margin: 0 0 10px 0;
            color: #dbe6ff;
            font-size: 0.96rem;
            font-weight: 600;
        }

        .stats-panel-loading .stats-chart-skeleton,
        .stats-panel-loading .stats-pie-skeleton,
        .stats-panel-loading .stats-legend-skeleton span,
        .stats-panel-loading .stats-table-skeleton .row {
            background: linear-gradient(90deg, rgba(255,255,255,0.08), rgba(255,255,255,0.2), rgba(255,255,255,0.08));
            background-size: 220% 100%;
            animation: stats-shimmer 1.2s linear infinite;
        }

        .stats-chart-skeleton {
            width: 100%;
            height: 220px;
            border-radius: 10px;
        }

        .stats-pie-skeleton-wrap {
            display: flex;
            align-items: center;
            gap: 14px;
        }

        .stats-pie-skeleton {
            width: 160px;
            height: 160px;
            border-radius: 50%;
            flex-shrink: 0;
        }

        .stats-legend-skeleton {
            flex: 1;
            display: grid;
            gap: 8px;
        }

        .stats-legend-skeleton span {
            display: block;
            height: 12px;
            border-radius: 6px;
        }

        .stats-table-skeleton {
            display: grid;
            gap: 8px;
        }

        .stats-table-skeleton .row {
            height: 14px;
            border-radius: 6px;
        }

        .stats-trend-line {
            stroke-dasharray: 1600;
            stroke-dashoffset: 1600;
            animation: stats-line-draw 1s ease forwards;
        }

        .stats-trend-dot {
            opacity: 0;
            transform-origin: center;
            animation: stats-dot-in 0.35s ease forwards;
        }

        .stats-pie-layout {
            display: grid;
            grid-template-columns: 1fr;
            gap: 12px;
        }

        .stats-donut-wrap {
            position: relative;
            width: min(260px, 100%);
            margin: 2px auto 0;
        }

        .stats-donut-svg {
            width: 100%;
            height: auto;
            display: block;
        }

        .stats-donut-segment {
            opacity: 0;
            animation: stats-donut-in 0.35s ease forwards;
        }

        .stats-donut-center {
            position: absolute;
            inset: 0;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            pointer-events: none;
        }

        .stats-donut-center .label {
            color: #9fb2df;
            font-size: 12px;
            margin-bottom: 2px;
        }

        .stats-donut-center .value {
            color: #ffffff;
            font-size: 20px;
            font-weight: 700;
        }

        .stats-biz-table {
            font-size: 12px;
        }

        .stats-biz-table th,
        .stats-biz-table td {
            padding-top: 8px;
            padding-bottom: 8px;
        }

        @keyframes stats-shimmer {
            0% { background-position: 200% 0; }
            100% { background-position: -20% 0; }
        }

        @keyframes stats-fade-up {
            from { opacity: 0; transform: translateY(8px); }
            to { opacity: 1; transform: translateY(0); }
        }

        @keyframes stats-line-draw {
            to { stroke-dashoffset: 0; }
        }

        @keyframes stats-dot-in {
            to { opacity: 1; transform: scale(1); }
        }

        @keyframes stats-donut-in {
            to { opacity: 1; transform: scale(1); }
        }

        /* 表格 */
        .styled-table {
            width: 100%;
            border-collapse: collapse;
            border-radius: 10px;
            overflow: hidden;
            font-size: 13px;
        }

        .styled-table th {
            background: linear-gradient(135deg, #667eea, #764ba2);
            color: white;
            padding: 10px 12px;
            text-align: left;
        }

        .styled-table td {
            padding: 10px 12px;
            border-bottom: 1px solid rgba(255,255,255,0.1);
        }

        .styled-table tr:nth-child(even) {
            background-color: rgba(255,255,255,0.02);
        }

        .styled-table tr:hover {
            background-color: rgba(255,255,255,0.05);
        }

        /* 消息 */
        .message {
            padding: 10px 14px;
            border-radius: 8px;
            margin-bottom: 12px;
            display: none;
            font-size: 13px;
        }

        .message.show {
            display: block;
        }

        .message.success {
            background: rgba(39, 174, 96, 0.2);
            color: #2ecc71;
            border: 1px solid rgba(39, 174, 96, 0.3);
        }

        .message.error {
            background: rgba(231, 76, 60, 0.2);
            color: #e74c3c;
            border: 1px solid rgba(231, 76, 60, 0.3);
        }

        /* 加载 */
        .loading {
            display: none;
            text-align: center;
            padding: 30px;
        }

        .loading.show {
            display: block;
        }

        .spinner {
            width: 40px;
            height: 40px;
            border: 3px solid rgba(255,255,255,0.1);
            border-top-color: #667eea;
            border-radius: 50%;
            animation: spin 1s linear infinite;
            margin: 0 auto 12px;
        }

        @keyframes spin {
            to { transform: rotate(360deg); }
        }

        /* 徽章 */
        .badge {
            display: inline-block;
            padding: 3px 10px;
            border-radius: 12px;
            font-size: 0.75rem;
            font-weight: 600;
        }

        .badge-success { background: rgba(39, 174, 96, 0.3); color: #2ecc71; }
        .badge-warning { background: rgba(241, 196, 15, 0.3); color: #f1c40f; }
        .badge-danger { background: rgba(231, 76, 60, 0.3); color: #e74c3c; }
        .badge-info { background: rgba(52, 152, 219, 0.3); color: #3498db; }

        /* 参数行 */
        .param-row {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 12px;
        }

        .param-row-4 {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 12px;
        }

        /* 视频结果卡片 */
        .video-results {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
            gap: 16px;
            margin-top: 16px;
        }

        .video-results.video-results-single {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        .video-results.video-results-single .video-card {
            width: 100%;
        }

        .video-card {
            background: rgba(15, 20, 40, 0.95);
            border-radius: 10px;
            overflow: hidden;
            border: 1px solid rgba(255,255,255,0.15);
        }

        .video-card video {
            width: 100%;
            display: block;
        }

        .video-media-frame {
            width: 100%;
            aspect-ratio: 16 / 9;
            background: #060811;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .video-media-frame video,
        .video-media-frame img {
            width: 100%;
            height: 100%;
            object-fit: contain;
            display: block;
        }

        .video-media-frame .video-placeholder {
            color: #a7b2d8;
            font-size: 14px;
            text-align: center;
            padding: 12px;
        }

        .video-card .info {
            padding: 12px;
        }

        .video-card .info h4 {
            margin-bottom: 6px;
            color: #e0e0e0;
            font-size: 0.9rem;
        }

        .video-card .info p {
            color: #888;
            font-size: 12px;
        }

        /* 登录页 */
        .modal {
            display: none;
            position: fixed;
            z-index: 1000;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            background: rgba(5, 8, 20, 0.28);
            backdrop-filter: blur(8px);
        }

        .modal.show {
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .login-brand-wrap {
            position: fixed;
            left: 28px;
            top: 22px;
            display: flex;
            align-items: center;
            gap: 22px;
            z-index: 1001;
        }

        .login-brand-main {
            display: inline-flex;
            align-items: center;
            gap: 2px;
        }

        .login-brand-logo {
            width: 68px;
            height: 68px;
            object-fit: contain;
            background: transparent;
            flex: 0 0 auto;
        }

        .login-brand {
            color: rgba(220, 228, 255, 0.82);
            font-family: "Inter", "SF Pro Display", "Segoe UI", "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
            font-size: 1.6rem;
            line-height: 1.1;
            font-weight: 600;
            letter-spacing: 0.3px;
        }

        .login-about-link {
            color: rgba(220, 228, 255, 0.82);
            font-size: 0.82rem;
            font-weight: 600;
            letter-spacing: 0.2px;
            line-height: 1.1;
            text-decoration: none;
            transition: color 0.2s ease;
            position: relative;
            top: 2px;
        }

        .login-about-link:hover {
            color: rgba(220, 228, 255, 0.82);
            text-decoration: underline;
        }

        .modal-content {
            background: linear-gradient(145deg, rgba(12, 16, 34, 0.88), rgba(16, 25, 52, 0.82));
            padding: 36px 32px 30px;
            border-radius: 20px;
            width: 90%;
            max-width: 420px;
            box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
            border: 1px solid rgba(255,255,255,0.2);
            backdrop-filter: blur(16px);
        }

        .modal-header {
            text-align: center;
            margin-bottom: 25px;
        }

        .modal-header h2 {
            color: #ffffff;
            letter-spacing: 0.3px;
            margin-bottom: 10px;
            font-size: 2rem;
            line-height: 1.15;
        }

        .modal-header p {
            color: rgba(215, 222, 255, 0.8);
            font-size: 0.92rem;
            line-height: 1.5;
        }

        .auth-switch {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 8px;
            margin-bottom: 12px;
        }

        .auth-switch-btn {
            border: 1px solid rgba(255,255,255,0.18);
            border-radius: 10px;
            background: rgba(12, 20, 38, 0.7);
            color: rgba(228, 235, 255, 0.82);
            padding: 8px 10px;
            cursor: pointer;
            font-size: 13px;
            font-weight: 600;
            transition: all 0.2s ease;
        }

        .auth-switch-btn.active {
            background: linear-gradient(135deg, #667eea, #764ba2);
            color: #fff;
            border-color: rgba(255,255,255,0.28);
        }

        .auth-panel {
            display: none;
        }

        .auth-panel.active {
            display: block;
        }

        .auth-inline-row {
            display: grid;
            grid-template-columns: 1fr 128px;
            gap: 8px;
            align-items: center;
        }

        .auth-inline-row .btn {
            white-space: nowrap;
            padding-left: 10px;
            padding-right: 10px;
            font-size: 12px;
        }

        .auth-terms-check {
            display: flex;
            align-items: flex-start;
            gap: 8px;
            margin: 8px 0 6px;
            color: rgba(220, 228, 255, 0.85);
            font-size: 12px;
            line-height: 1.6;
            user-select: none;
        }

        .auth-terms-check input {
            margin-top: 3px;
            width: 14px;
            height: 14px;
            flex: 0 0 auto;
        }

        .auth-terms-check a {
            color: rgba(160, 188, 255, 0.95);
            text-decoration: none;
        }

        .auth-terms-check a:hover {
            text-decoration: underline;
        }

        .password-input-wrap {
            position: relative;
        }

        .password-input-wrap input {
            padding-right: 42px;
        }

        .password-toggle-btn {
            position: absolute;
            top: 50%;
            right: 8px;
            transform: translateY(-50%);
            width: 22px;
            height: 22px;
            border: none;
            border-radius: 0;
            background: transparent;
            color: rgba(206, 214, 238, 0.56);
            line-height: 1;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: 0;
        }

        .password-toggle-btn:hover {
            background: transparent;
            color: rgba(206, 214, 238, 0.72);
        }

        .password-toggle-btn svg {
            width: 16px;
            height: 16px;
        }

        .password-toggle-btn .password-icon-eye {
            fill: none;
            stroke: currentColor;
            stroke-width: 1.8;
            stroke-linecap: round;
            stroke-linejoin: round;
        }

        .password-toggle-btn .password-icon-pupil {
            fill: currentColor;
        }

        .password-toggle-btn .password-icon-slash {
            fill: none;
            stroke: currentColor;
            stroke-width: 1.8;
            stroke-linecap: round;
        }

        .password-toggle-btn.is-visible .password-icon-slash {
            display: none;
        }

        .login-error {
            background: rgba(231, 76, 60, 0.2);
            color: #e74c3c;
            padding: 10px 14px;
            border-radius: 8px;
            margin-bottom: 12px;
            display: none;
            font-size: 13px;
        }

        .login-error.show {
            display: block;
        }

        .login-error.success {
            background: rgba(22, 163, 74, 0.2);
            color: #4ade80;
        }

        .login-hint {
            text-align: center;
            font-size: 12px;
            color: rgba(220, 228, 255, 0.72);
            margin: 12px 0 4px;
            min-height: 16px;
            transition: opacity 0.3s ease;
        }

        .login-hint.hide {
            opacity: 0;
        }

        .login-footer {
            position: fixed;
            left: 50%;
            bottom: 22px;
            transform: translateX(-50%);
            text-align: center;
            font-size: 12px;
            color: rgba(220, 228, 255, 0.72);
            line-height: 1.8;
            z-index: 1001;
            width: min(92vw, 820px);
        }

        .login-footer-row {
            display: flex;
            justify-content: center;
            gap: 14px;
            flex-wrap: wrap;
        }

        .login-footer a {
            color: rgba(220, 228, 255, 0.82);
            text-decoration: none;
        }

        .login-footer a:hover {
            text-decoration: underline;
        }

        /* 响应式 */
        @media (max-width: 768px) {
            body.app-authenticated {
                overflow: auto;
            }
            .container {
                padding: 8px;
                height: auto;
                overflow: visible;
            }
            .header-top {
                flex-direction: column;
                align-items: stretch;
            }
            .header-title {
                text-align: left;
            }
            .header-spacer {
                display: none;
            }
            .account-box {
                min-width: 0;
                justify-content: center;
            }
            .two-column {
                grid-template-columns: 1fr;
            }
            .app-shell {
                grid-template-columns: 1fr;
                height: auto;
            }
            .module-sidebar {
                position: static;
                min-height: auto;
            }
            .module-tabs {
                display: flex;
                flex-direction: column;
                gap: 10px;
            }
            .workspace-content {
                grid-template-columns: 1fr;
                height: auto;
                flex: 0 0 auto;
            }
            .workspace-feed {
                position: static;
                max-height: none;
                height: auto;
            }
            .workspace-main,
            .workspace-center {
                min-height: auto;
                overflow: visible;
            }
            .stats-grid {
                grid-template-columns: repeat(2, 1fr);
            }
            .stats-visual-shell {
                grid-template-columns: 1fr;
            }
            .stats-pie-skeleton-wrap {
                flex-direction: column;
                align-items: flex-start;
            }
            .stats-donut-wrap {
                width: min(220px, 100%);
            }
            .param-row, .param-row-4 {
                grid-template-columns: 1fr;
            }

            .login-brand-wrap {
                left: 18px;
                top: 16px;
                gap: 14px;
            }
            .login-brand-logo {
                width: 54px;
                height: 54px;
            }
            .login-brand {
                font-size: 1.35rem;
            }
            .login-about-link {
                font-size: 0.76rem;
            }
            .modal-content {
                padding: 30px 24px 24px;
            }
            .modal-header h2 {
                font-size: 1.7rem;
            }
            .auth-inline-row {
                grid-template-columns: 1fr 116px;
            }
            .login-footer {
                bottom: 14px;
                line-height: 1.7;
            }
            .back-to-top-btn {
                right: 14px;
                bottom: 18px;
                padding: 9px 12px;
                font-size: 12px;
            }
            .upload-history-preview-shell.with-thumbs {
                grid-template-columns: 1fr;
            }
            .upload-history-preview-thumbs {
                flex-direction: row;
                max-height: none;
                overflow-x: auto;
                overflow-y: hidden;
                padding-right: 0;
                padding-bottom: 2px;
            }
            .upload-history-preview-shell.with-thumbs .upload-history-preview-main img {
                height: auto;
                max-height: 420px;
            }
        }

        @media (prefers-reduced-motion: reduce) {
            .login-video {
                display: none;
            }
        }

        /* 提示词输入区域 */
        .prompts-container {
            margin-top: 12px;
        }

        .prompt-item {
            display: flex;
            gap: 8px;
            margin-bottom: 8px;
            align-items: flex-start;
        }

        .prompt-item .prompt-index {
            background: #667eea;
            color: white;
            width: 26px;
            height: 26px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            margin-top: 6px;
            font-size: 12px;
        }

        .prompt-item textarea {
            flex: 1;
            min-height: 100px;
            padding: 10px 14px;
            border: 1px solid rgba(255,255,255,0.2);
            border-radius: 8px;
            resize: vertical;
            background: rgba(10, 15, 30, 0.9);
            color: #e0e0e0;
            font-size: 14px;
        }

        .prompt-item textarea:focus {
            border-color: #764ba2;
            outline: none;
        }

        /* 成本信息 */
        .cost-info {
            background: rgba(52, 152, 219, 0.2);
            padding: 12px;
            border-radius: 8px;
            margin-top: 12px;
            border: 1px solid rgba(52, 152, 219, 0.3);
        }

        .cost-info h4 {
            color: #3498db;
            margin-bottom: 8px;
            font-size: 0.85rem;
        }

        .cost-row {
            display: flex;
            justify-content: space-between;
            padding: 4px 0;
            border-bottom: 1px solid rgba(255,255,255,0.05);
            font-size: 0.85rem;
        }

        .cost-row:last-child {
            border-bottom: none;
            font-weight: bold;
        }

        /* 润色区域 */
        .polish-section {
            background: rgba(155, 89, 182, 0.2);
            border-radius: 10px;
            padding: 16px;
            margin-bottom: 16px;
            border: 1px solid rgba(155, 89, 182, 0.3);
        }

        .polish-section h4 {
            color: #9b59b6;
            margin-bottom: 12px;
            font-size: 0.9rem;
        }

        .polish-row {
            display: grid;
            grid-template-columns: 1fr 1fr auto;
            gap: 10px;
            align-items: end;
        }

        .polish-status {
            padding: 8px 12px;
            border-radius: 6px;
            font-size: 13px;
            color: #27ae60;
            background: rgba(39, 174, 96, 0.2);
        }

        /* 任务卡片 */
        .task-card {
            background: rgba(15, 20, 40, 0.95);
            border-radius: 10px;
            padding: 16px;
            margin-bottom: 12px;
            border: 1px solid rgba(255,255,255,0.15);
        }

        .task-card-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 10px;
        }

        .task-card-header h4 {
            color: #667eea;
            font-size: 0.95rem;
        }

        .task-card-body {
            color: #b0b0b0;
            font-size: 0.85rem;
        }

        .task-card-body p {
            margin: 4px 0;
        }

        .history-empty-state {
            margin: 6px 0;
            padding: 12px 6px 10px;
            border: none;
            border-radius: 0;
            background: transparent;
            text-align: center;
        }

        .history-empty-illustration {
            position: relative;
            width: 238px;
            max-width: 100%;
            height: 132px;
            margin: 0 auto 10px;
            background-image: url("/assets/images/history-empty-pets-lineart-extracted.png");
            background-repeat: no-repeat;
            background-position: center;
            background-size: contain;
        }

        .history-empty-illustration > * {
            display: none;
        }

        .history-empty-title {
            margin: 0;
            color: #9aa9d6;
            font-size: 12px;
            letter-spacing: 0.2px;
            font-weight: 500;
        }

        .history-empty-detail {
            margin: 6px 0 0;
            color: #8fa0cf;
            font-size: 12px;
            line-height: 1.5;
        }

        /* 历史记录标签 */
        .sub-tabs {
            display: flex;
            gap: 8px;
            margin-bottom: 16px;
        }

        .sub-tab {
            padding: 8px 16px;
            background: rgba(22, 33, 62, 0.9);
            border: 1px solid rgba(255,255,255,0.15);
            border-radius: 6px;
            color: #b0b0b0;
            cursor: pointer;
            font-size: 13px;
            transition: all 0.3s;
        }

        .sub-tab.active {
            background: rgba(102, 126, 234, 0.3);
            border-color: #667eea;
            color: #667eea;
        }

        .sub-tab:hover:not(.active) {
            background: rgba(255,255,255,0.1);
        }

        .upload-mode-tabs {
            display: flex;
            gap: 8px;
            margin-bottom: 14px;
            flex-wrap: wrap;
        }

        .upload-mode-tab {
            padding: 8px 12px;
            border: 1px solid rgba(255,255,255,0.15);
            border-radius: 8px;
            background: rgba(22, 33, 62, 0.88);
            color: #b0b0b0;
            cursor: pointer;
            font-size: 13px;
            transition: all 0.25s ease;
        }

        .upload-mode-tab.active {
            border-color: #667eea;
            color: #9fb4ff;
            background: rgba(102, 126, 234, 0.25);
        }

        .upload-mode-tab.disabled {
            opacity: 0.45;
            cursor: not-allowed;
            color: #888;
        }

        .upload-input-pane {
            display: none;
        }

        .upload-input-pane.active {
            display: block;
        }
