.result-text {
            line-height: 1.8;
            color: var(--ink);
        }

        /* 标题样式 */
        .result-text h1,
        .result-text h2,
        .result-text h3,
        .result-text h4,
        .result-text h5,
        .result-text h6 {
            margin: 1.5em 0 0.8em;
            font-weight: 700;
            line-height: 1.4;
            color: var(--ink);
        }

        .result-text h1 {
            font-size: 1.8em;
            border-bottom: 2px solid var(--line);
            padding-bottom: 0.3em;
        }

        .result-text h2 {
            font-size: 1.5em;
            border-bottom: 1px solid var(--line-2);
            padding-bottom: 0.3em;
        }

        .result-text h3 {
            font-size: 1.3em;
        }

        .result-text h4 {
            font-size: 1.1em;
        }

        .result-text h5 {
            font-size: 1em;
        }

        .result-text h6 {
            font-size: 0.9em;
            color: #555;
        }

        /* 段落间距 */
        .result-text p {
            margin: 0.8em 0;
        }

        /* 粗体和斜体 */
        .result-text strong {
            font-weight: 700;
            color: var(--ink);
        }

        .result-text em {
            font-style: italic;
            color: var(--ink-2);
        }

        /* 列表样式 */
        .result-text ul,
        .result-text ol {
            margin: 1em 0;
            padding-left: 2em;
        }

        .result-text li {
            margin: 0.5em 0;
            line-height: 1.6;
        }

        .result-text ul {
            list-style-type: disc;
        }

        .result-text ol {
            list-style-type: decimal;
        }

        /* 嵌套列表 */
        .result-text ul ul,
        .result-text ol ul {
            list-style-type: circle;
        }

        .result-text ul ul ul,
        .result-text ol ul ul {
            list-style-type: square;
        }

        /* 引用块 */
        .result-text blockquote {
            margin: 1em 0;
            padding: 0.8em 1.2em;
            border-left: 4px solid var(--brand);
            background: rgba(82, 110, 204, .05);
            border-radius: 0 8px 8px 0;
            color: var(--ink-2);
        }

        .result-text blockquote p {
            margin: 0.5em 0;
        }

        /* 分隔线 */
        .result-text hr {
            margin: 2em 0;
            border: none;
            border-top: 2px solid var(--line);
        }

        /* 链接样式 */
        .result-text a {
            color: var(--brand);
            text-decoration: none;
            border-bottom: 1px solid transparent;
            transition: .15s ease;
        }

        .result-text a:hover {
            border-bottom-color: var(--brand);
        }

        /* 行内代码 */
        .result-text code {
            padding: 2px 6px;
            margin: 0 2px;
            background: rgba(82, 110, 204, .08);
            border: 1px solid rgba(82, 110, 204, .15);
            border-radius: 4px;
            font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
            font-size: 0.9em;
            color: #c7254e;
        }

        /* 代码块容器 */
        .result-text pre {
            position: relative;
            margin: 1.2em 0;
            padding: 0;
            background: #282c34;
            border-radius: 8px;
            overflow: hidden;
            box-shadow: 0 4px 12px rgba(0, 0, 0, .1);
        }

        .result-text pre code {
            display: block;
            padding: 1.2em;
            margin: 0;
            background: transparent;
            border: none;
            border-radius: 0;
            color: #abb2bf;
            font-size: 0.9em;
            line-height: 1.6;
            overflow-x: auto;
        }

        /* 代码块顶部工具栏 */
        .code-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 8px 12px;
            background: #21252b;
            border-bottom: 1px solid rgba(255, 255, 255, .1);
        }

        .code-language {
            font-size: 11px;
            color: #abb2bf;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .code-copy-btn {
            padding: 4px 10px;
            background: rgba(255, 255, 255, .1);
            border: 1px solid rgba(255, 255, 255, .2);
            border-radius: 4px;
            color: #abb2bf;
            font-size: 11px;
            cursor: pointer;
            transition: .15s ease;
        }

        .code-copy-btn:hover {
            background: rgba(255, 255, 255, .15);
            border-color: rgba(255, 255, 255, .3);
        }

        .code-copy-btn.copied {
            background: rgba(22, 163, 74, .2);
            border-color: rgba(22, 163, 74, .4);
            color: #4ade80;
        }

        /* 表格样式 */
        .result-text table {
            width: 100%;
            margin: 1.5em 0;
            border-collapse: collapse;
            border-radius: 8px;
            overflow: hidden;
            box-shadow: 0 2px 8px rgba(0, 0, 0, .05);
        }

        .result-text thead {
            background: linear-gradient(135deg, rgba(82, 110, 204, .12), rgba(124, 58, 237, .08));
        }

        .result-text th {
            padding: 12px 16px;
            text-align: left;
            font-weight: 700;
            color: var(--ink);
            border-bottom: 2px solid var(--line);
        }

        .result-text td {
            padding: 10px 16px;
            border-bottom: 1px solid var(--line-2);
            color: var(--ink-2);
        }

        .result-text tbody tr:hover {
            background: rgba(82, 110, 204, .03);
        }

        .result-text tbody tr:last-child td {
            border-bottom: none;
        }

        /* 图片样式 */
        .result-text img {
            max-width: 100%;
            height: auto;
            margin: 1em 0;
            border-radius: 8px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, .1);
        }

        /* 任务列表 */
        .result-text input[type="checkbox"] {
            margin-right: 0.5em;
            cursor: pointer;
        }

        /* 响应式 */
        @media (max-width: 768px) {
            .result-text {
                font-size: 14px;
            }

            .result-text pre code {
                font-size: 12px;
                padding: 1em;
            }

            .result-text table {
                font-size: 12px;
            }

            .result-text th,
            .result-text td {
                padding: 8px 10px;
            }
        }


        :root {
            --bg: #F6F8FC;
            --panel: rgba(255, 255, 255, .86);
            --panel-strong: rgba(255, 255, 255, .96);
            --ink: #0F172A;
            --ink-2: rgba(15, 23, 42, .72);
            --muted: rgba(15, 23, 42, .55);
            --line: rgba(15, 23, 42, .10);
            --line-2: rgba(15, 23, 42, .08);

            --brand: #526ECC;
            --brand-2: #7C3AED;
            --brand-soft: rgba(82, 110, 204, .12);
            --brand-soft-2: rgba(124, 58, 237, .10);

            --success: #16A34A;
            --warning: #F59E0B;

            --radius-card: 14px;
            --radius-pill: 999px;

            --shadow: 0 18px 60px rgba(2, 6, 23, .08);
            --shadow2: 0 10px 26px rgba(2, 6, 23, .08);

            --sidebar-w: 320px;
            --gap: 14px;
            --topbar-h: 56px;
        }

        * {
            box-sizing: border-box
        }

        html,
        body {
            height: 100%
        }

        body {
            margin: 0;
            background: var(--bg);
            color: var(--ink);
            font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
            overflow: hidden;
        }

        .bg {
            position: fixed;
            inset: 0;
            pointer-events: none;
            background:
                radial-gradient(900px 380px at 14% 8%, rgba(82, 110, 204, .20), transparent 58%),
                radial-gradient(820px 380px at 88% 14%, rgba(124, 58, 237, .14), transparent 58%),
                radial-gradient(900px 480px at 60% 84%, rgba(82, 110, 204, .12), transparent 60%),
                linear-gradient(180deg, rgba(255, 255, 255, .0), rgba(255, 255, 255, .45));
            opacity: 1;
        }

        .topbar {
            display: none;
            position: sticky;
            top: 0;
            z-index: 50;
            height: var(--topbar-h);
            padding: 10px 12px;
            background: var(--panel);
            backdrop-filter: blur(14px);
            border-bottom: 1px solid var(--line-2);
            align-items: center;
            justify-content: space-between;
            gap: 10px;
        }

        .topbar .left {
            display: flex;
            align-items: center;
            gap: 10px;
            min-width: 0
        }

        .hamburger {
            width: 42px;
            height: 42px;
            border-radius: 14px;
            border: 1px solid var(--line);
            background: rgba(255, 255, 255, .92);
            color: var(--ink);
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            box-shadow: 0 10px 24px rgba(2, 6, 23, .06);
        }

        .hamburger:hover {
            filter: brightness(.98)
        }

       /* 关键 CSS */
.top-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-left: 10px; /* 与汉堡按钮的间距 */
}

        .top-title b {
            font-size: 13px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis
        }

        .top-title span {
            font-size: 11px;
            color: #555;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis
        }

        .topbar .right {
            display: flex;
            align-items: center;
            gap: 10px
        }

        .mini-pill {
            height: 36px;
            padding: 0 12px;
            border-radius: 999px;
            border: 1px solid rgba(82, 110, 204, .22);
            background: linear-gradient(135deg, rgba(82, 110, 204, .12), rgba(124, 58, 237, .08));
            color: var(--ink);
            display: flex;
            align-items: center;
            gap: 8px;
            white-space: nowrap;
            cursor: pointer;
            user-select: none;
            font-size: 13px;
        }

        .home-container {
            height: 100%;
            display: grid;
            grid-template-columns: var(--sidebar-w) 1fr;
            position: relative;
        }

        .sidebar {
            height: 100%;
            background: var(--panel);
            backdrop-filter: blur(14px);
            border-right: 1px solid var(--line-2);
            padding: 14px;
            display: flex;
            flex-direction: column;
            gap: 14px;
            overflow: hidden;
        }

        .sidebar-logo {
            position: relative;
            border-radius: 16px;
            padding: 12px;
            background: rgba(255, 255, 255, .92);
            border: 1px solid var(--line);
            box-shadow: var(--shadow2);
            overflow: hidden;
        }

        .logo-shine {
            position: absolute;
            inset: -30%;
            background: linear-gradient(90deg, transparent, rgba(82, 110, 204, .10), transparent);
            transform: translateX(-60%);
            animation: shine 3.2s ease-in-out infinite;
            opacity: .9;
        }

        @keyframes shine {
            0% {
                transform: translateX(-60%) rotate(8deg)
            }

            50% {
                transform: translateX(60%) rotate(8deg)
            }

            100% {
                transform: translateX(60%) rotate(8deg)
            }
        }

        .logo-content {
            position: relative;
            display: flex;
            align-items: center;
            gap: 12px
        }

        .logo-img {
            width: 44px;
            height: 44px;
            border-radius: 14px;
            border: 1px solid rgba(15, 23, 42, .10);
            box-shadow: 0 14px 34px rgba(82, 110, 204, .18);
            object-fit: cover;
            background: rgba(255, 255, 255, .95);
        }

        .logo-text {
            font-size: 16px;
            font-weight: 900;
            letter-spacing: .2px
        }

        .logo-subtitle {
            display: block;
            margin-top: 2px;
            font-size: 13px;
            color: #555
        }

        .selector-container {
            border-radius: 16px;
            padding: 10px;
            background: rgba(255, 255, 255, .92);
            border: 1px solid var(--line);
            box-shadow: 0 10px 24px rgba(2, 6, 23, .06);
        }

        .primary-selector {
            display: flex;
            gap: 8px
        }

        .primary-item {
            flex: 1;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            height: 42px;
            border-radius: 14px;
            border: 1px solid var(--line);
            background: rgba(255, 255, 255, .95);
            color: var(--ink-2);
            cursor: pointer;
            transition: .15s ease;
        }

        .primary-item:hover {
            filter: brightness(.98)
        }

        .primary-item-active {
            border-color: rgba(82, 110, 204, .35);
            background: linear-gradient(135deg, rgba(82, 110, 204, .18), rgba(124, 58, 237, .10));
            color: var(--ink);
            box-shadow: 0 14px 30px rgba(82, 110, 204, .12);
        }

        .primary-label {
            font-size: 13px;
            font-weight: 800
        }

        .secondary-selector {
            margin-top: 10px
        }

        .secondary-track {
            position: relative;
            display: flex;
            gap: 6px;
            padding: 6px;
            border-radius: 14px;
            border: 1px solid var(--line);
            background: rgba(2, 6, 23, .03);
            overflow: hidden;
        }

        .secondary-slider {
            position: absolute;
            top: 6px;
            bottom: 6px;
            left: 6px;
            width: calc(25% - 0.09375rem);
            border-radius: 12px;
            background: linear-gradient(135deg, rgba(82, 110, 204, .18), rgba(124, 58, 237, .12));
            border: 1px solid rgba(82, 110, 204, .22);
            transition: .18s ease;
            pointer-events: none;
        }

        .secondary-item {
            position: relative;
            flex: 1;
            height: 32px;
            border: 0;
            background: transparent;
            color: #555;
            border-radius: 12px;
            cursor: pointer;
            font-size: 13px;
            user-select: none;
        }

        .secondary-item-active {
            color: var(--ink);
            font-weight: 900
        }

        .model-list {
            flex: 1;
            overflow: auto;
            padding-right: 6px;
        }

        .model-list::-webkit-scrollbar {
            width: 8px
        }

        .model-list::-webkit-scrollbar-thumb {
            background: rgba(2, 6, 23, .10);
            border-radius: 999px;
        }

        .model-item {
            display: flex;
            gap: 12px;
            padding: 12px;
            border-radius: 16px;
            border: 1px solid var(--line);
            background: rgba(255, 255, 255, .92);
            margin-bottom: 10px;
            cursor: pointer;
            transition: .15s ease;
            position: relative;
            box-shadow: 0 10px 24px rgba(2, 6, 23, .05);
        }

        .model-item:hover {
            filter: brightness(.99)
        }

        .model-item-active {
            border-color: rgba(30, 110, 204, .35);
            background: linear-gradient(135deg, rgba(30, 110, 255, .14), rgba(124, 58, 237, 0.5));
            box-shadow: 0 16px 40px rgba(30, 110, 255, .10);
        }

        .model-indicator {
            position: absolute;
            left: 10px;
            top: 10px;
            width: 8px;
            height: 8px;
            border-radius: 999px;
            background: var(--brand);
            box-shadow: 0 0 0 6px rgba(82, 110, 204, .12);
            display: none;
        }

        .model-item-active .model-indicator {
            display: block
        }

        .model-icon {
            width: 34px;
            height: 34px;
            border-radius: 12px;
            border: 1px solid var(--line);
            background: rgba(2, 6, 23, .03);
            object-fit: contain;
            padding: 6px;
        }

        .model-name-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px
        }

        .model-name {
            font-size: 13px;
            font-weight: 950
        }

        .model-tags {
            display: flex;
            gap: 6px;
            flex-wrap: wrap
        }

        .model-tag {
            font-size: 11px;
            padding: 4px 8px;
            border-radius: var(--radius-pill);
            border: 1px solid var(--line);
            color: rgba(15, 23, 42, .78);
            background: rgba(255, 255, 255, .92);
            white-space: nowrap;
        }

        .model-tag-video {
            background-color: rgba(34, 211, 238, .26);
            color: #000;
        }

        .model-tag-image {
            background-color: rgba(245, 158, 11, .28);
            color: #000;
        }

        .model-tag-chat {
            background-color: rgba(82, 110, 204, .28);
            color: #000;
        }

        .model-tag-agent {
            background-color: rgba(34, 197, 94, .24);
            color: #000;
        }

        .model-tag-idea {
            background-color: rgba(236, 72, 153, .22);
            color: #000;
        }

        .model-description {
            margin-top: 6px;
            color: #555;
            font-size: 13px;
            line-height: 1.5;
        }

        .user-section {
            border-radius: 16px;
            padding: 10px;
            background: rgba(255, 255, 255, .92);
            border: 1px solid var(--line);
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            box-shadow: 0 10px 24px rgba(2, 6, 23, .05);
        }

        .user-profile-button {
            flex: 1;
            display: flex;
            gap: 10px;
            align-items: center;
            border: 0;
            background: transparent;
            color: inherit;
            cursor: pointer;
            padding: 8px;
            border-radius: 14px;
        }

        .user-profile-button:hover {
            background: rgba(2, 6, 23, .03)
        }

        .user-avatar {
            width: 34px;
            height: 34px;
            border-radius: 14px;
            border: 1px solid var(--line);
            background: rgba(2, 6, 23, .03);
        }

        .user-display-name {
            font-size: 13px;
            font-weight: 950
        }

        .user-status-wrapper {
            display: flex;
            gap: 6px;
            align-items: center;
            margin-top: 2px
        }

        .user-status-dot {
            width: 8px;
            height: 8px;
            border-radius: 999px;
            background: var(--success);
            box-shadow: 0 0 0 6px rgba(22, 163, 74, .12);
        }

        .user-status-text {
            font-size: 13px;
            color: #555
        }

         .recharge-button {
            border: 1px solid rgba(245, 158, 11, .28);
            background: rgba(245, 158, 11, .10);
            color: var(--ink);
            border-radius: 14px;
            padding: 3px 4px;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 4px;
            box-shadow: 0 12px 30px rgba(245, 158, 11, .10);
            white-space: nowrap;
        }

        .recharge-button:hover {
            filter: brightness(.98)
        }

        .recharge-activity-tag {
            font-size: 11px;
            padding: 3px 8px;
            border-radius: var(--radius-pill);
            border: 1px solid rgba(245, 158, 11, .32);
            background: rgba(245, 158, 11, .10);
            color: rgba(146, 64, 14, .95);
        }

        .main-content {
            height: 100%;
            position: relative;
            padding: 14px;
            overflow: hidden;
            z-index: 1 !important;
            /* 设置一个较低的值 */
        }

        /* ✅ 确保弹窗在最高层级 */
        .layui-layer {
            z-index: 99999 !important;
        }

        .layui-layer-shade {
            z-index: 99998 !important;
        }

        .sora2-container {
            height: 100%;
            border-radius: 18px;
            border: 1px solid var(--line);
            background: var(--panel);
            backdrop-filter: blur(14px);
            box-shadow: var(--shadow);
            position: relative;
            overflow: hidden;
        }

        .edit-image-btn-absolute {
            position: absolute;
            left: 22px;
            top: 22px;
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 10px 12px;
            border-radius: 14px;
            border: 1px solid var(--line);
            background: rgba(255, 255, 255, .95);
            cursor: pointer;
            z-index: 5;
            user-select: none;
            box-shadow: 0 10px 24px rgba(2, 6, 23, .06);
        }

        .edit-image-btn-absolute:hover {
            filter: brightness(.98)
        }

        .edit-btn-text {
            font-size: 13px;
            color: var(--ink-2)
        }

        .sora2-main-content {
            height: 100%;
            display: flex;
            flex-direction: column;
            padding: 18px;
            gap: 14px;
        }

        .top-model-info {
            display: flex;
            gap: 16px;
            align-items: center;
            padding: 18px;
            border-radius: 18px;
            border: 1px solid var(--line);
            background:
                radial-gradient(640px 220px at 30% 0%, rgba(82, 110, 204, .14), transparent 60%),
                radial-gradient(640px 220px at 90% 0%, rgba(124, 58, 237, .10), transparent 60%),
                rgba(255, 255, 255, .95);
            box-shadow: 0 12px 30px rgba(2, 6, 23, .05);
            height: 80px;
        }

        .icon-wrapper {
            width: 60px;
            height: 60px;
            border-radius: 22px;
            border: 1px solid var(--line);
            background: rgba(2, 6, 23, .03);
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 12px 30px rgba(82, 110, 204, .10);
            overflow: hidden;
            flex: 0 0 auto;

        }

        .icon-img {
            width: 50px;
            height: 50px;
            object-fit: contain
        }

        .detail-text {
            font-size: 13px;
            color: var(--ink-2);
            line-height: 1.65;
            max-width: 76ch;
        }

        .scroll-container {
            flex: 1;
            border-radius: 18px;
            border: 1px solid var(--line);
            background: rgba(255, 255, 255, .92);
            overflow: auto;
            padding: 14px;
            box-shadow: 0 12px 30px rgba(2, 6, 23, .05);
        }

        .scroll-container::-webkit-scrollbar {
            width: 10px
        }

        .scroll-container::-webkit-scrollbar-thumb {
            background: rgba(2, 6, 23, .12);
            border-radius: 999px;
        }

        .scroll-content {
            width: min(1120px, 100%);
            margin: 0 auto;
            display: grid;
            gap: 12px;
        }

        .result-card {
            border-radius: 16px;
            border: 1px solid var(--line);
            background: rgba(255, 255, 255, .96);
            padding: 14px;
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 12px;
            box-shadow: 0 10px 24px rgba(2, 6, 23, .05);

        }

        .result-meta {
            display: flex;
            gap: 10px;
            align-items: center;
            color: var(--ink-2);
            font-size: 13px;
            flex-wrap: wrap;
        }

        .badge {
            font-size: 11px;
            padding: 4px 8px;
            border-radius: 999px;
            border: 1px solid rgba(82, 110, 204, .22);
            background: rgba(82, 110, 204, .10);
            color: var(--ink);
        }

        .result-text {
            margin-top: 8px;
            color: #555;
            font-size: 13px;
            line-height: 1.6;
            word-break: break-word;
            white-space: pre-wrap;
        }

        .result-actions {
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
            justify-content: flex-end;
        }

        .mini-btn {
            height: 34px;
            padding: 0 10px;
            border-radius: 12px;
            border: 1px solid var(--line);
            background: rgba(255, 255, 255, .96);
            color: var(--ink-2);
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .mini-btn:hover {
            background: rgba(2, 6, 23, .03)
        }

        .result-media {
            margin-top: 10px;
            display: flex;
            gap: 10px;
            flex-wrap: wrap;
        }

        .result-media img {
            width: 220px;
            max-width: 100%;
            border-radius: 14px;
            border: 1px solid var(--line);
            box-shadow: 0 10px 24px rgba(2, 6, 23, .06);
            background: #fff;
        }

        .bottom-input-wrapper {
            border-radius: 18px;
            border: 1px solid #aaa;
            background: rgba(255, 255, 255, .92);
            padding: 0px;
            box-shadow: 0 12px 30px rgba(2, 6, 23, .05);
        }

        .ai-zhushou-group {
            display: flex;
            gap: 10px;
            margin-bottom: 10px;
            flex-wrap: wrap
        }

        .ai-zhushou-btn {
            width: 44px;
            height: 44px;
            border-radius: 16px;
            border: 1px solid var(--line);
            background: rgba(255, 255, 255, .95);
            cursor: pointer;
            overflow: hidden;
            padding: 0;
            box-shadow: 0 10px 24px rgba(2, 6, 23, .05);
        }

        .ai-zhushou-btn img {
            width: 100%;
            height: 100%;
            object-fit: cover
        }

        .ai-zhushou-btn:hover {
            filter: brightness(.98)
        }

        .bottom-container {
            border-radius: 18px;
            border: 1px solid var(--line);
            background: rgba(2, 6, 23, .02);
            padding: 12px;
            position: relative;
        }

        .price-tag {

            padding: 6px 10px;
            border-radius: 999px;
            border: 1px solid var(--line);
            background: rgba(255, 255, 255, .95);
            display: flex;
            gap: 8px;
            align-items: center;
            font-size: 13px;
            color: var(--ink-2);
            box-shadow: 0 10px 24px rgba(2, 6, 23, .05);
        }

        .price-type {
            color: #555
        }

        .price-value {
            font-weight: 950
        }

        .top-section {
            display: grid;
            grid-template-columns: 220px 1fr;
            gap: 12px;
            margin-top: 5px;
        }

        /* ✅ 参考图容器（改为弹性布局） */
        /* ✅ 参考图容器 */
        .cankaotu {
            display: flex;
            flex-wrap: wrap;
            align-items: flex-start;
            gap: 12px;
            padding: 12px;
            border: 2px dashed var(--line);
            border-radius: 16px;
            background: rgba(255, 255, 255, .92);
            cursor: pointer;
            transition: all 0.3s ease;
            min-height: 120px;
            width: 100%;
        }

        .cankaotu:hover {
            border-color: rgba(82, 110, 204, .35);
            background: rgba(82, 110, 204, .05);
        }

        /* ✅ 上传按钮区域 */
        .upload-trigger {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            width: 100px;
            height: 100px;
            border-radius: 12px;
            background: rgba(255, 255, 255, .96);
            border: 2px dashed var(--line);
            transition: all 0.3s ease;
            flex-shrink: 0;
        }

        .cankaotu:hover .upload-trigger {
            border-color: rgba(82, 110, 204, .35);
            background: rgba(82, 110, 204, .08);
        }

        .plus-icon {
            font-size: 32px;
            color: var(--ink);
            font-weight: 300;
            line-height: 1;
            margin-bottom: 8px;
        }

        .frame-label {
            font-size: 13px;
            color: #555;
            font-weight: 500;
        }

        /* ✅ 参考图预览容器 */
        .ref-image-preview {
            display: flex;
            flex-wrap: wrap;
            gap: 12px;
            flex: 1;
            min-width: 0;
        }

        /* 单个预览项 */
        .ref-preview-item {
            position: relative;
            width: 100px;
            height: 100px;
            border-radius: 12px;
            overflow: visible;
            background: rgba(255, 255, 255, .96);
            border: 2px solid var(--line);
            transition: all 0.3s ease;
            cursor: pointer;
            flex-shrink: 0;
        }

        .ref-preview-item:hover {
            border-color: rgba(82, 110, 204, .35);
            transform: translateY(-2px);
            box-shadow: 0 8px 16px rgba(2, 6, 23, .15);
            z-index: 10;
        }

        /* ✅ 图片容器 */
        .ref-preview-item .img-wrapper {
            width: 100%;
            height: 100%;
            border-radius: 10px;
            overflow: hidden;
            position: relative;
        }

        /* 预览图片 */
        .ref-preview-item img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            pointer-events: none;
            display: block;
        }

        /* ✅ 操作按钮容器（始终显示） */
        .ref-preview-actions {
            position: absolute;
            top: -8px;
            right: -8px;
            display: flex;
            gap: 4px;
            z-index: 20;
            opacity: 1;
            /* ✅ 始终显示 */
        }

        /* ✅ 操作按钮 */
        .ref-action-btn {
            width: 28px;
            height: 28px;
            border-radius: 50%;
            border: 2px solid #fff;
            background: rgba(255, 255, 255, .95);
            color: #333;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 12px;
            transition: all 0.2s ease;
            box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
        }

        .ref-action-btn:hover {
            transform: scale(1.15);
            box-shadow: 0 4px 12px rgba(0, 0, 0, .25);
        }

        .ref-action-btn.delete-btn {
            color: #ef4444;
            background: rgba(254, 242, 242, .95);
            border-color: #fecaca;
        }

        .ref-action-btn.delete-btn:hover {
            background: #ef4444;
            color: #fff;
            border-color: #ef4444;
        }

        .ref-action-btn.edit-btn {
            color: #3b82f6;
            background: rgba(239, 246, 255, .95);
            border-color: #bfdbfe;
        }

        .ref-action-btn.edit-btn:hover {
            background: #3b82f6;
            color: #fff;
            border-color: #3b82f6;
        }

        /* ✅ 响应式 */
        @media (max-width: 768px) {
            .cankaotu {
                flex-direction: column;
            }

            .upload-trigger {
                width: 100%;
            }

            .ref-image-preview {
                width: 100%;
            }
        }

        .plus-icon {
            width: 28px;
            height: 28px;
            border-radius: 10px;
            border: 1px solid var(--line);
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--ink);
            font-weight: 900;
            background: rgba(2, 6, 23, .02);
        }

        .frame-label {
            color: var(--ink-2);
            font-size: 12px
        }

        .rich-input {
            min-height: 92px;
            border-radius: 16px;
            border: 1px solid var(--line);
            background: rgba(255, 255, 255, .96);
            padding: 12px 12px;
            color: var(--ink);
            outline: none;
            font-size: 13px;
            line-height: 1.6;
            box-shadow: 0 10px 24px rgba(2, 6, 23, .05);
        }

        .rich-input:empty:before {
            content: attr(data-placeholder);
            color: rgba(15, 23, 42, .40);
        }

        .bottom-section {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            margin-top: 12px;
        }

        .selectors-scroll {
            flex: 1;
            display: flex;
            gap: 10px;
            overflow: auto;
            padding-bottom: 2px;
            cursor: grab;
        }

        .selectors-scroll::-webkit-scrollbar {
            height: 8px
        }

        .selectors-scroll::-webkit-scrollbar-thumb {
            background: rgba(2, 6, 23, .12);
            border-radius: 999px;
        }

        .selector-btn {
            flex: 0 0 auto;
            height: 40px;
            border-radius: 14px;
            border: 1px solid var(--line);
            background: rgba(255, 255, 255, .96);
            color: var(--ink-2);
            padding: 0 12px;
            display: flex;
            align-items: center;
            gap: 10px;
            cursor: pointer;
            white-space: nowrap;
            user-select: none;
            box-shadow: 0 10px 24px rgba(2, 6, 23, .05);
            position: relative;
        }

        .selector-btn:hover {
            background: rgba(2, 6, 23, .03)
        }

        /* 下拉 */
        .selector-btn .dropdown {
            position: fixed;
            min-width: 160px;
            border-radius: 14px;
            border: 1px solid var(--line);
            background: rgba(255, 255, 255, .98);
            box-shadow: var(--shadow2);
            display: none;
            z-index: 999;
        }


        .selector-btn .dropdown .item {
            padding: 10px 12px;
            font-size: 12px;
            color: var(--ink-2);
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            cursor: pointer;
        }

        .selector-btn .dropdown .item:hover {
            background: rgba(2, 6, 23, .04)
        }

        .selector-btn .dropdown .item.active {
            background: linear-gradient(135deg, rgba(82, 110, 204, .14), rgba(124, 58, 237, .08));
            color: var(--ink);
            font-weight: 900;
        }

        .send-button {
                    width: 80px;
            height: 46px;
            border-radius: 16px;
            border: 1px solid rgba(82, 110, 204, .35);
            background: linear-gradient(135deg, rgba(82, 110, 204, .75), rgba(124, 58, 237, .45));
            cursor: pointer;
            box-shadow: 0 16px 34px rgba(82, 110, 204, .18);
            display: flex;
            align-items: center;
            justify-content: center;
            flex: 0 0 auto;
            color:#fff;
        }

        .send-button:hover {
            filter: brightness(1.02)
        }

        .drawer-mask {
            display: none;
            position: fixed;
            inset: 0;
            z-index: 80;
            background: rgba(2, 6, 23, .38);
        }

        .drawer {
            display: none;
            position: fixed;
            inset: 0;
            z-index: 999;
            pointer-events: none;
        }

        .drawer .panel {
            pointer-events: auto;
            position: absolute;
            left: 10px;
            top: calc(env(safe-area-inset-top, 0px) + 10px);
            bottom: calc(env(safe-area-inset-bottom, 0px) + 10px);
            width: min(360px, calc(100vw - 20px));
            border-radius: 18px;
            border: 1px solid var(--line);
            background: rgba(255, 255, 255, .96);
            backdrop-filter: blur(16px);
            box-shadow: var(--shadow);
            overflow: hidden;
            display: flex;
            flex-direction: column;
        }

        .drawer.on,
        .drawer-mask.on {
            display: block
        }

        @media (max-width: 980px) {
            .topbar {
                display: flex
            }

            .home-container {
                grid-template-columns: 1fr
            }

            .sidebar {
                display: none
            }

            .main-content {
                padding: 10px;
                height: calc(100vh - var(--topbar-h));
            }

            .sora2-container {
                border-radius: 16px
            }

            .sora2-main-content {
                padding: 12px
            }

            .edit-image-btn-absolute {
                left: 12px;
                top: 12px
            }

            .top-section {
                grid-template-columns: 1fr
            }

            .cankaotu {
                height: 66px
            }

            .rich-input {
                min-height: 84px
            }

            .scroll-container {
                margin-bottom: 10px;
            }
        }

        @media (max-width: 420px) {
            .price-tag {
                position: static;
                margin-bottom: 10px;
                justify-content: flex-start
            }

            .top-section {
                margin-top: 10px;
            }

            .send-button {
                width: 44px;
                height: 44px
            }
        }



        /*模态框*/
        /* ========== 弹窗样式 ========== */
        .modal-overlay {
            display: none;
            position: fixed;
            inset: 0;
            z-index: 10000;
            background: rgba(2, 6, 23, 0.5);
            backdrop-filter: blur(8px);
            animation: fadeIn 0.2s ease;
        }

        .modal-overlay.show {
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 20px;
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
            }

            to {
                opacity: 1;
            }
        }

        .modal-container {
            width: min(480px, 100%);
            max-height: 90vh;
            border-radius: 18px;
            border: 1px solid var(--line);
            background: var(--panel-strong);
            backdrop-filter: blur(14px);
            box-shadow: var(--shadow);
            overflow: hidden;
            animation: slideUp 0.3s ease;
        }

        @keyframes slideUp {
            from {
                opacity: 0;
                transform: translateY(20px) scale(0.95);
            }

            to {
                opacity: 1;
                transform: translateY(0) scale(1);
            }
        }

        .modal-header {
            padding: 18px 20px;
            border-bottom: 1px solid var(--line);
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            background: linear-gradient(135deg, rgba(82, 110, 204, .08), rgba(124, 58, 237, .05));
        }

        .modal-title {
            font-size: 16px;
            font-weight: 900;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .modal-close {
            width: 32px;
            height: 32px;
            border-radius: 10px;
            border: 1px solid var(--line);
            background: rgba(255, 255, 255, .95);
            color: var(--ink-2);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: .15s ease;
        }

        .modal-close:hover {
            background: rgba(2, 6, 23, .05);
        }

        .modal-body {
            padding: 20px;
            max-height: calc(90vh - 140px);
            overflow: auto;
        }

        .modal-body::-webkit-scrollbar {
            width: 8px;
        }

        .modal-body::-webkit-scrollbar-thumb {
            background: rgba(2, 6, 23, .12);
            border-radius: 999px;
        }

        .modal-input-group {
            margin-bottom: 16px;
        }

        .modal-label {
            display: block;
            font-size: 13px;
            font-weight: 800;
            color: var(--ink);
            margin-bottom: 8px;
        }

        .modal-input {
            width: 100%;
            padding: 12px 14px;
            border: 1px solid var(--line);
            border-radius: 14px;
            background: rgba(255, 255, 255, .96);
            color: var(--ink);
            font-size: 14px;
            outline: none;
            transition: .15s ease;
        }

        .modal-input:focus {
            border-color: rgba(82, 110, 204, .35);
            box-shadow: 0 0 0 4px rgba(82, 110, 204, .10);
        }

        .modal-input::placeholder {
            color: rgba(15, 23, 42, .40);
        }

        .modal-hint {
            margin-top: 6px;
            font-size: 12px;
            color: #555;
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .modal-actions {
            display: grid;
            gap: 10px;
            margin-top: 20px;
        }

        .modal-btn {
            width: 100%;
            height: 46px;
            border-radius: 14px;
            border: 1px solid var(--line);
            background: rgba(255, 255, 255, .96);
            color: var(--ink);
            font-size: 14px;
            font-weight: 800;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            transition: .15s ease;
            box-shadow: 0 10px 24px rgba(2, 6, 23, .05);
        }

        .modal-btn:hover {
            filter: brightness(.98);
        }

        .modal-btn:disabled {
            opacity: 0.6;
            cursor: not-allowed;
        }

        .modal-btn-primary {
            border-color: rgba(82, 110, 204, .35);
            background: linear-gradient(135deg, rgba(82, 110, 204, .75), rgba(124, 58, 237, .45));
            color: #fff;
            box-shadow: 0 16px 34px rgba(82, 110, 204, .18);
        }

        .modal-btn-warning {
            border-color: rgba(245, 158, 11, .28);
            background: linear-gradient(135deg, rgba(245, 158, 11, .85), rgba(217, 119, 6, .65));
            color: #fff;
            box-shadow: 0 16px 34px rgba(245, 158, 11, .18);
        }

        .modal-result {
            margin-top: 16px;
            padding: 14px;
            border-radius: 14px;
            border: 1px solid var(--line);
            background: rgba(255, 255, 255, .96);
            display: none;
        }

        .modal-result.show {
            display: block;
        }

        .modal-result-title {
            font-size: 13px;
            font-weight: 800;
            margin-bottom: 8px;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .modal-result-content {
            font-size: 12px;
            color: #555;
            line-height: 1.6;
            white-space: pre-wrap;
        }

        .modal-result-success {
            border-color: rgba(22, 163, 74, .28);
            background: rgba(22, 163, 74, .08);
        }

        .modal-result-success .modal-result-title {
            color: var(--success);
        }

        .modal-result-error {
            border-color: rgba(239, 68, 68, .28);
            background: rgba(254, 226, 226, .5);
        }

        .modal-result-error .modal-result-title {
            color: #991b1c;
        }

        .modal-result-error .modal-result-content {
            color: #991b1c;
        }

        @media (max-width: 520px) {
            .modal-container {
                border-radius: 16px;
            }

            .modal-header {
                padding: 14px 16px;
            }

            .modal-body {
                padding: 16px;
            }
        }



        /*========================视频和图片列表======================
/* ========== 图片/视频网格布局 ========== */
        /* 修改这个 CSS 规则（原来是 240px，改为 200px） */
        .media-grid-container {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
            /* ✅ 从 240px 改为 200px */
            gap: 16px;
            padding: 20px;
        }

        .media-card {
            border-radius: 16px;
            border: 1px solid var(--line);
            background: rgba(255, 255, 255, .96);
            overflow: hidden;
            box-shadow: 0 10px 24px rgba(2, 6, 23, .05);
            transition: .15s ease;
            position: relative;
            cursor: pointer;
        }

        .media-card:hover {
            transform: translateY(-2px);
            box-shadow: 0 16px 34px rgba(2, 6, 23, .08);
        }

        /* 图片卡片 */
        .media-card-image {
            aspect-ratio: 1;
            position: relative;
            overflow: hidden;
        }

        .media-card-image img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
        }

        /* 视频卡片 */
        .media-card-video {
            aspect-ratio: 16/9;
            position: relative;
            overflow: hidden;
            background: #c6e7ff;
            border: 2px solid #c6e7ff;
        }

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

        .media-card-video .play-overlay {
            position: absolute;
            inset: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            background: rgba(0, 0, 0, .3);
            opacity: 1;
            transition: .2s ease;
        }

        .media-card-video:hover .play-overlay {
            opacity: 1;
        }

        .play-icon {
            width: 64px;
            height: 64px;
            border-radius: 50%;
            background: rgba(255, 255, 255, .95);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 24px;
            color: var(--brand);
            box-shadow: 0 8px 24px rgba(0, 0, 0, .2);
        }

        /* 加载中占位 */
        .media-placeholder {
            width: 100%;
            height: 100%;
            background: linear-gradient(135deg, rgba(82, 110, 204, .08), rgba(124, 58, 237, .05));
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 12px;
            position: relative;
            overflow: hidden;
        }

        .media-placeholder::before {
            content: '';
            position: absolute;
            inset: -50%;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .3), transparent);
            animation: shimmer 2s infinite;
        }

        @keyframes shimmer {
            0% {
                transform: translateX(-100%) rotate(45deg);
            }

            100% {
                transform: translateX(100%) rotate(45deg);
            }
        }

        .media-placeholder-icon {
            width: 64px;
            height: 64px;
            border-radius: 16px;
            background: rgba(255, 255, 255, .9);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 28px;
            color: var(--brand);
            position: relative;
            z-index: 1;
        }

        .media-placeholder-text {
            font-size: 13px;
            color: var(--ink-2);
            font-weight: 600;
            position: relative;
            z-index: 1;
            color: #f00;
        }

        .media-placeholder-spinner {
            animation: spin 1s linear infinite;
        }

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

        /* 媒体信息栏 */
        .media-info {
            padding: 12px;
            background: rgba(255, 255, 255, .98);
        }

        .media-time {
            font-size: 11px;
            color: #555;
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .media-actions {
            margin-top: 8px;
            display: flex;
            gap: 8px;
        }

        .media-btn {
            flex: 1;
            height: 32px;
            border-radius: 10px;
            border: 1px solid var(--line);
            background: rgba(255, 255, 255, .96);
            color: var(--ink-2);
            font-size: 12px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            transition: .15s ease;
        }

        .media-btn:hover {
            background: rgba(2, 6, 23, .03);
        }

        /* 响应式 */
        @media (max-width: 768px) {
            .media-grid-container {
                grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
                gap: 12px;
                padding: 12px;
            }
        }

        /* ✅ 下载提示动画 */
        @keyframes slideIn {
            from {
                transform: translateX(400px);
                opacity: 0;
            }

            to {
                transform: translateX(0);
                opacity: 1;
            }
        }

        @keyframes slideOut {
            from {
                transform: translateX(0);
                opacity: 1;
            }

            to {
                transform: translateX(400px);
                opacity: 0;
            }
        }

        /* ✅ 媒体提示文字（用于显示 prompt） */
        .media-prompt {
            font-size: 11px;
            color: #555;
            margin-top: 4px;
            line-height: 1.4;
            overflow: hidden;
            text-overflow: ellipsis;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            word-break: break-word;
        }




        /* ✅ 视频预览样式 */
        .ref-preview-item video {
            width: 100%;
            height: 100%;
            object-fit: cover;
            pointer-events: none;
            display: block;
        }

        /* ✅ 视频播放按钮覆盖层 */
        .ref-video-overlay {
            position: absolute;
            inset: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            background: rgba(0, 0, 0, .3);
            opacity: 0;
            transition: opacity 0.2s ease;
            pointer-events: none;
        }

        .ref-preview-item:hover .ref-video-overlay {
            opacity: 1;
        }

        .ref-video-play-icon {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            background: rgba(255, 255, 255, .95);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 14px;
            color: var(--brand);
            box-shadow: 0 4px 12px rgba(0, 0, 0, .2);
        }

        /* ✅ 文件类型标签 */
        .ref-file-type {
            position: absolute;
            bottom: 4px;
            left: 4px;
            padding: 2px 6px;
            border-radius: 4px;
            background: rgba(0, 0, 0, .7);
            color: #fff;
            font-size: 10px;
            font-weight: 600;
            z-index: 10;
        }
        
          /* 打开模态框按钮 */
        #openModalBtn {
            margin: 40px;
            padding: 8px 16px;
            border: none;
            border-radius: 4px;
            background: #409eff;
            color: #fff;
            cursor: pointer;
        }



        .character-modal-mask {
            position: fixed;
            top: 0;
            right: 0;
            bottom: 0;
            left: 0;

            /* 或者你想更绝对一点 */
            /* width: 100vw; */
            /* height: 100vh; */

            background: rgba(0, 0, 0, 0.4);
            display: none;
            /* 初始隐藏 */
            /* display: flex; /* 打开时记得是 flex */
            align-items: center;
            justify-content: center;
            z-index: 999;
        }

        /* 模态框本体 */
        .character-modal {
            background: #fff;
            border-radius: 6px;
            width: 800px;
            height: 500px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }

        .character-modal-header {
            padding: 10px 16px;
            border-bottom: 1px solid #e5e5e5;
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-size: 14px;
        }

        .character-modal-close {
            cursor: pointer;
            border: none;
            background: transparent;
            font-size: 18px;
            line-height: 1;
        }

        .character-modal-body {
            flex: 1;
            display: flex;
            min-height: 0;
            /* 让内部 flex 子元素正确滚动 */
        }

        /* 左侧区域 */
        .character-modal-left {
            width: 50%;
            border-right: 1px solid #e5e5e5;
            display: flex;
            flex-direction: column;
            background: #fff;
        }

        .character-left-header {
            padding: 10px 12px;
            border-bottom: 1px solid #f2f2f2;
            flex-shrink: 0;
        }

        .character-btn {
            padding: 4px 10px;
            font-size: 13px;
            border-radius: 4px;
            border: 1px solid #409eff;
            background: #409eff;
            color: #fff;
            cursor: pointer;
        }

        .character-btn.btn-ghost {
            background: #fff;
            color: #409eff;
        }

        .character-role-list {
            flex: 1;
            overflow-y: auto;
            list-style: none;
            margin: 0;
            padding: 0;
        }

        .character-role-list li {
            padding: 6px 6px;
            border-bottom: 1px solid #f5f5f5;
            cursor: pointer;
            font-size: 14px;
            color: #333;
            transition: background 0.2s ease;
        }

        .character-role-list li:hover {
            background: #f9f9f9;
        }

        .character-role-list li.active {
            background: #eef3ff;
            font-weight: 600;
        }

        /* 右侧区域 */
        .character-modal-right {
            flex: 1;
            padding: 16px;
            background: #fafafa;
            display: flex;
            justify-content: center;
            align-items: center;
        }

        .character-right-inner {
            width: 100%;
            max-width: 360px;
        }

        .character-right-tip {
            font-size: 13px;
            color: #666;
            margin-bottom: 8px;
        }

        .character-right-image {
            max-width: 100%;
            max-height: 360px;
            object-fit: contain;
            border-radius: 4px;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
        }

        /* 添加角色表单 */
        .character-form-item {
            margin-bottom: 16px;
            font-size: 14px;
        }

        .character-form-item label {
            display: block;
            margin-bottom: 6px;
            color: #333;
        }

        .character-form-item input[type="text"] {
            width: 100%;
            padding: 6px 8px;
            border-radius: 4px;
            border: 1px solid #dcdfe6;
            box-sizing: border-box;
            outline: none;
            font-size: 14px;
        }

        .character-form-item input[type="text"]:focus {
            border-color: #409eff;
        }

        .character-form-actions {
            text-align: right;
        }



        /* 底部按钮栏 */
        .character-modal-footer {
            padding: 12px 16px;
            border-top: 1px solid #e5e5e5;
            background: #fff;
            text-align: right;
            flex-shrink: 0;
        }

        .character-modal-footer .character-btn {
            margin-left: 10px;
        }


        .layui-btn .layui-btn-sm {
            padding: 0px;
            margin: 0px;
        }


        .input-footer {
            display: flex;
            align-items: center;
            justify-content: flex-end;
            /* ✅ 关键：右对齐 */
            gap: 8px;
            /* 两个元素之间的间距 */
            margin-top: 8px;
        }

        .price-tag {
            display: flex;
            align-items: center;
            gap: 4px;
            padding: 6px 12px;
            background: linear-gradient(135deg, #ddd 0%, #eee 100%);
            border-radius: 20px;
            font-size: 13px;
            color: #fff;
            white-space: nowrap;
            color:#000;
        }

        .price-type {
            opacity: 0.9;
        }

        .price-value {
            font-weight: 600;
        }

        .send-button {
            width: 80px;
            height: 46px;
            border-radius: 16px;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            border: none;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.3s ease;
            flex-shrink: 0;
            color:#fff;
        }

        .send-button:hover {
            transform: scale(1.1);
            box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
        }

        .send-button:disabled {
            opacity: 0.6;
            cursor: not-allowed;
            transform: none;
        }

        /* 表单容器 */
        .modern-form {
            padding: 24px;
            background: #fff;
        }

        /* 表单组 */
        .form-group {
            margin-bottom: 20px;
        }

        /* 表单标签 */
        .form-label {
            display: flex;
            align-items: center;
            gap: 6px;
            font-size: 14px;
            font-weight: 600;
            color: #374151;
            margin-bottom: 8px;
        }

        .form-label i {
            color: #667eea;
            font-size: 16px;
        }

        /* 表单输入框 */
        .form-input {
            width: 100%;
            height: 42px;
            padding: 0 16px;
            font-size: 14px;
            color: #1f2937;
            background: #f9fafb;
            border: 1px solid #e5e7eb;
            border-radius: 8px;
            outline: none;
            transition: all 0.3s ease;
            box-sizing: border-box;
        }

        .form-input:focus {
            background: #fff;
            border-color: #667eea;
            box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
        }

        .form-input::placeholder {
            color: #9ca3af;
        }

        /* 密码输入框容器 */
        .password-wrapper {
            position: relative;
            display: flex;
            align-items: center;
        }

        .password-wrapper .form-input {
            padding-right: 45px;
        }

        /* 密码显示切换按钮 */
        .login-toggle-password {
            position: absolute;
            right: 12px;
            top: 50%;
            transform: translateY(-50%);
            width: 32px;
            height: 32px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            color: #9ca3af;
            transition: all 0.3s ease;
            border-radius: 6px;
        }

        .login-toggle-password:hover {
            background: rgba(102, 126, 234, 0.1);
            color: #667eea;
        }

        .login-toggle-password.active {
            color: #667eea;
        }

        .login-toggle-password.active i::before {
            content: "\f070";
            /* fa-eye-slash */
        }

        /* 验证码容器 */
        .captcha-wrapper {
            display: flex;
            gap: 12px;
            align-items: center;
        }




        /* ✅ 验证码图片样式 */
        .captcha-image {
            width: 120px !important;
            /* 固定宽度 */
            height: 40px !important;
            /* 固定高度 */
            border-radius: 4px;
            cursor: pointer;
            border: 1px solid #e5e7eb;
            object-fit: contain;
            /* 保持图片比例 */
            display: block;
            /* 块级元素 */
            background: #f9fafb;
            /* 背景色 */
        }

        /* ✅ 验证码输入框 */
        .captcha-input {
            flex: 1;
            min-width: 0;
        }

        .captcha-image:hover {
            border-color: #667eea;
            box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
        }

        /* 提交按钮 */
        .submit-button {
            width: 100%;
            height: 46px;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            border: none;
            border-radius: 8px;
            color: #fff;
            font-size: 15px;
            font-weight: 600;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            transition: all 0.3s ease;
            margin-top: 24px;
        }

        .submit-button:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 16px rgba(102, 126, 234, 0.3);
        }

        .submit-button:active {
            transform: translateY(0);
        }

        /* 表单底部 */
        .form-footer {
            margin-top: 16px;
            text-align: center;
        }

        .link-text {
            color: #667eea;
            font-size: 13px;
            text-decoration: none;
            transition: all 0.3s ease;
        }

        .link-text:hover {
            color: #764ba2;
            text-decoration: underline;
        }

        /* Layer 弹窗样式覆盖 */
        .layui-layer-title {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: #fff;
            font-weight: 600;
            border-radius: 8px 8px 0 0;
        }

        .layui-layer-content {
            border-radius: 0 0 8px 8px;
        }
        .result-media{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:10px;
}

.media-image img{
  width:120px;
  height:90px;
  object-fit:cover;
  border-radius:10px;
  border:1px solid rgba(0,0,0,.08);
  display:block;
}

.media-video{
  width:120px;
  height:90px;
  border-radius:10px;
  border:1px solid rgba(0,0,0,.08);
  background:#f6f7f9;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-decoration:none;
  color:#333;
}

.media-video-icon{
  width:36px;
  height:36px;
  border-radius:50%;
  background:#352ddf;
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:14px;
}

.media-video-text{
  margin-top:6px;
  font-size:12px;
  opacity:.8;
}



/* ========== 医疗风格主题色 ========== */
:root {
    --bg: #F0F8FF;  /* 浅蓝医疗背景 */
    --panel: rgba(255, 255, 255, .95);
    --panel-strong: rgba(255, 255, 255, .98);
    --ink: #1E3A5F;  /* 深蓝文字 */
    --ink-2: rgba(30, 58, 95, .75);
    --muted: rgba(30, 58, 95, .60);
    --line: rgba(30, 100, 180, .12);
    --line-2: rgba(30, 100, 180, .08);

    --brand: #2E7BC4;  /* 医疗蓝 */
    --brand-2: #1E5A8E;  /* 深医疗蓝 */
    --brand-soft: rgba(46, 123, 196, .12);
    --brand-soft-2: rgba(30, 90, 142, .10);

    --success: #28A745;  /* 健康绿 */
    --warning: #FFC107;  /* 警告黄 */
    --danger: #DC3545;   /* 危险红 */

    --medical-green: #4CAF50;  /* 医疗绿 */
    --medical-red: #E74C3C;    /* 医疗红 */
    
    --radius-card: 12px;
    --radius-pill: 999px;
    --shadow: 0 8px 24px rgba(30, 100, 180, .10);
    --shadow2: 0 4px 12px rgba(30, 100, 180, .08);
}

/* ========== 医疗风格背景 ========== */
body {
    font-family: 'Segoe UI', 'Microsoft YaHei', 'PingFang SC', sans-serif;
    background: 
        linear-gradient(135deg, #E3F2FD 0%, #BBDEFB 50%, #E1F5FE 100%),
        url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><defs><pattern id="cross" x="0" y="0" width="20" height="20" patternUnits="userSpaceOnUse"><path d="M10 0v20M0 10h20" stroke="%232196F3" stroke-width="0.5" opacity="0.1"/></pattern></defs><rect fill="url(%23cross)" width="100" height="100"/></svg>');
    background-attachment: fixed;
    color: #1E3A5F;
    min-height: 100vh;
}

.bg {
    background:
        radial-gradient(circle at 20% 20%, rgba(33, 150, 243, .15), transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(46, 125, 196, .12), transparent 50%),
        linear-gradient(180deg, rgba(255, 255, 255, .0), rgba(255, 255, 255, .3));
}

/* ========== Logo区域医疗风格 ========== */
.sidebar-logo {
    background: linear-gradient(135deg, #ffffff 0%, #E3F2FD 100%);
    border: 2px solid rgba(33, 150, 243, .2);
    box-shadow: 0 4px 12px rgba(33, 150, 243, .15);
}

.logo-shine {
    background: linear-gradient(90deg, transparent, rgba(33, 150, 243, .15), transparent);
}

.logo-img {
    border: 2px solid rgba(33, 150, 243, .3);
    box-shadow: 0 4px 12px rgba(33, 150, 243, .2);
}

/* ========== 主按钮医疗风格 ========== */
.primary-item-active {
    border-color: rgba(33, 150, 243, .4);
    background: linear-gradient(135deg, rgba(33, 150, 243, .18), rgba(25, 118, 210, .12));
    color: #1565C0;
    box-shadow: 0 4px 12px rgba(33, 150, 243, .2);
}

.secondary-slider {
    background: linear-gradient(135deg, rgba(33, 150, 243, .20), rgba(25, 118, 210, .15));
    border: 1px solid rgba(33, 150, 243, .3);
}

/* ========== 模型卡片医疗风格 ========== */
.model-item-active {
    border-color: rgba(33, 150, 243, .4);
    background: linear-gradient(135deg, rgba(227, 242, 253, .95), rgba(187, 222, 251, .85));
    box-shadow: 0 6px 16px rgba(33, 150, 243, .15);
}

.model-indicator {
    background: linear-gradient(135deg, #2196F3, #1976D2);
    box-shadow: 0 0 0 4px rgba(33, 150, 243, .15);
}

/* ========== 标签医疗风格 ========== */
.model-tag-video {
    background: linear-gradient(135deg, #E3F2FD, #BBDEFB);
    color: #1565C0;
    border-color: rgba(33, 150, 243, .3);
}

.model-tag-image {
    background: linear-gradient(135deg, #E8F5E9, #C8E6C9);
    color: #2E7D32;
    border-color: rgba(76, 175, 80, .3);
}

.model-tag-chat {
    background: linear-gradient(135deg, #FFF3E0, #FFE0B2);
    color: #E65100;
    border-color: rgba(255, 152, 0, .3);
}

/* ========== 顶部信息栏医疗风格 ========== */
.top-model-info {
    background:
        radial-gradient(circle at 30% 20%, rgba(33, 150, 243, .12), transparent 60%),
        radial-gradient(circle at 90% 30%, rgba(25, 118, 210, .08), transparent 60%),
        linear-gradient(135deg, #ffffff 0%, #E3F2FD 100%);
    border: 2px solid rgba(33, 150, 243, .15);
    box-shadow: 0 4px 12px rgba(33, 150, 243, .10);
}

.icon-wrapper {
    background: linear-gradient(135deg, #E3F2FD, #BBDEFB);
    border: 2px solid rgba(33, 150, 243, .2);
    box-shadow: 0 4px 12px rgba(33, 150, 243, .15);
}

/* ========== 发送按钮医疗风格 ========== */
.send-button {
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    border: 2px solid rgba(25, 118, 210, .3);
    box-shadow: 
        0 4px 12px rgba(33, 150, 243, .25),
        inset 0 1px 0 rgba(255, 255, 255, .3);
}

.send-button:hover {
    background: linear-gradient(135deg, #1E88E5 0%, #1565C0 100%);
    box-shadow: 
        0 6px 16px rgba(33, 150, 243, .35),
        inset 0 1px 0 rgba(255, 255, 255, .3);
    transform: translateY(-1px);
}

/* ========== 充值按钮医疗风格 ========== */
.recharge-button {
    background: linear-gradient(135deg, #4CAF50 0%, #388E3C 100%);
    border: 2px solid rgba(76, 175, 80, .3);
    box-shadow: 0 4px 12px rgba(76, 175, 80, .20);
}

.recharge-button:hover {
    background: linear-gradient(135deg, #43A047 0%, #2E7D32 100%);
}

/* ========== 小按钮医疗风格 ========== */
.mini-pill {
    background: linear-gradient(135deg, rgba(33, 150, 243, .12), rgba(25, 118, 210, .08));
    border-color: rgba(33, 150, 243, .25);
    color: #1565C0;
}

/* ========== 输入框医疗风格 ========== */
.rich-input {
    border: 2px solid rgba(33, 150, 243, .2);
    background: rgba(255, 255, 255, .98);
}

.rich-input:focus {
    border-color: rgba(33, 150, 243, .4);
    box-shadow: 0 0 0 3px rgba(33, 150, 243, .1);
}

/* ========== 参考图区域医疗风格 ========== */
.cankaotu {
    border: 2px dashed rgba(33, 150, 243, .3);
    background: linear-gradient(135deg, #ffffff 0%, #E3F2FD 50%, #ffffff 100%);
}

.cankaotu:hover {
    border-color: rgba(33, 150, 243, .5);
    background: linear-gradient(135deg, #E3F2FD 0%, #BBDEFB 50%, #E3F2FD 100%);
}

.upload-trigger {
    background: linear-gradient(135deg, #ffffff, #E3F2FD);
    border: 2px dashed rgba(33, 150, 243, .3);
}

/* ========== 结果卡片医疗风格 ========== */
.result-card {
    background: linear-gradient(135deg, #ffffff 0%, #F5F5F5 100%);
    border: 1px solid rgba(33, 150, 243, .12);
    box-shadow: 0 2px 8px rgba(33, 150, 243, .08);
}

.badge {
    background: linear-gradient(135deg, rgba(33, 150, 243, .15), rgba(25, 118, 210, .10));
    border-color: rgba(33, 150, 243, .25);
    color: #1565C0;
    font-weight: 600;
}

/* ========== 进度条医疗风格 ========== */
.progress-fill {
    background: linear-gradient(90deg, #2196F3, #1976D2, #0D47A1);
}

/* ========== 表单医疗风格 ========== */
.form-input:focus {
    border-color: #2196F3;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, .1);
}

.submit-button {
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    box-shadow: 0 4px 12px rgba(33, 150, 243, .3);
}

.submit-button:hover {
    background: linear-gradient(135deg, #1E88E5 0%, #1565C0 100%);
    box-shadow: 0 6px 16px rgba(33, 150, 243, .4);
}

/* ========== 链接医疗风格 ========== */
.link-text {
    color: #2196F3;
}

.link-text:hover {
    color: #1976D2;
}

/* ========== 模态框医疗风格 ========== */
.modal-btn-primary {
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    border-color: rgba(33, 150, 243, .4);
    box-shadow: 0 4px 12px rgba(33, 150, 243, .25);
}

/* ========== 媒体卡片医疗风格 ========== */
.media-card {
    background: #ffffff;
    border: 1px solid rgba(33, 150, 243, .15);
    box-shadow: 0 2px 8px rgba(33, 150, 243, .10);
}

.media-card:hover {
    border-color: rgba(33, 150, 243, .3);
    box-shadow: 0 4px 16px rgba(33, 150, 243, .15);
}

/* ========== 添加医疗十字标识 ========== */
.logo-text::before {
    content: '⚕️';
    margin-right: 8px;
    font-size: 18px;
}

/* ========== 用户状态点医疗风格 ========== */
.user-status-dot {
    background: linear-gradient(135deg, #4CAF50, #388E3C);
    box-shadow: 0 0 0 4px rgba(76, 175, 80, .15);
}

/* ========== 顶部栏医疗风格 ========== */
.topbar {
    background: linear-gradient(135deg, rgba(255, 255, 255, .95), rgba(227, 242, 253, .90));
    border-bottom: 2px solid rgba(33, 150, 243, .15);
}

/* ========== 侧边栏医疗风格 ========== */
.sidebar {
    background: linear-gradient(180deg, rgba(255, 255, 255, .95) 0%, rgba(227, 242, 253, .90) 100%);
    border-right: 2px solid rgba(33, 150, 243, .15);
}

/* ========== 选择器容器医疗风格 ========== */
.selector-container {
    background: linear-gradient(135deg, #ffffff 0%, #E3F2FD 100%);
    border: 1px solid rgba(33, 150, 243, .2);
}

/* ========== 医疗图标添加 ========== */
.medical-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    background: linear-gradient(135deg, #2196F3, #1976D2);
    -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 2L4 5v6.09c0 5.05 3.41 9.76 8 10.91 4.59-1.15 8-5.86 8-10.91V5l-8-3zm-1 14h2v2h-2v-2zm0-8h2v6h-2V8z"/></svg>') center/contain;
    mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 2L4 5v6.09c0 5.05 3.41 9.76 8 10.91 4.59-1.15 8-5.86 8-10.91V5l-8-3zm-1 14h2v2h-2v-2zm0-8h2v6h-2V8z"/></svg>') center/contain;
}

.all-history-button {
            border: 1px solid rgba(245, 158, 11, .28);
            background: rgba(245, 158, 11, .10);
            color: var(--ink);
            border-radius: 14px;
            padding: 3px 4px;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 4px;
            box-shadow: 0 12px 30px rgba(245, 158, 11, .10);
            white-space: nowrap;
        }

        .all-history-button:hover {
            filter: brightness(.98)
        }