:root {
    --bg: #0d1117;
    --bg-secondary: #161b22;
    --bg-tertiary: #1c2128;
    --border: rgba(139, 148, 158, 0.2);
    --border-hover: rgba(139, 148, 158, 0.35);
    --text: #e6edf3;
    --text-muted: #8b949e;
    --text-secondary: #7d8590;
    --primary: #238636;
    --primary-hover: #2ea043;
    --accent: #58a6ff;
    --accent-hover: #79b8ff;
    --success: #238636;
    --warning: #d29922;
    --error: #f85149;
    --nav-active: #1f6feb;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    font-size: 14px;
    line-height: 1.5;
}

/* 布局 */
.app-shell {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* 侧边栏 */
.sidebar {
    width: 220px;
    height: 100vh;
    position: sticky;
    top: 0;
    flex-shrink: 0;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 20px 0;
    overflow-y: auto;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 16px 14px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 0;
}

.brand-icon {
    width: 44px;
    height: 44px;
    background: #fff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 44px;
}

.brand-icon svg,
.brand-icon img {
    width: 36px;
    height: 36px;
}

.brand-icon img {
    display: block;
    object-fit: contain;
}

.brand-text h1 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin: 0;
}

.brand-text p {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0;
}

/* 导航 */
.nav-list {
    flex: 0 0 auto;
    padding: 0 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 14px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

#rechargePointsNav[hidden] {
    display: none !important;
}

.nav-item:hover {
    background: var(--bg-tertiary);
    color: var(--text);
}

.nav-item.active {
    background: var(--success);
    color: white;
}

.nav-icon {
    font-size: 14px;
    width: 18px;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.nav-icon svg {
    width: 16px;
    height: 16px;
}

.nav-badge {
    margin-left: auto;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: var(--error);
    color: white;
    font-size: 11px;
    font-weight: 600;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.sidebar-balance {
    margin: 14px 12px 18px;
    padding: 12px 14px;
    border: 1px solid rgba(88, 166, 255, 0.26);
    border-radius: 14px;
    background:
        radial-gradient(circle at top right, rgba(99, 102, 241, 0.35), transparent 42%),
        linear-gradient(135deg, rgba(88, 166, 255, 0.12), rgba(35, 134, 54, 0.14));
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar-balance-main,
.sidebar-member-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.sidebar-balance-main {
    gap: 14px;
}

.sidebar-member-info {
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 6px 10px;
}

.sidebar-points-inline {
    min-width: 0;
    margin-left: auto;
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
}

.sidebar-balance-label {
    font-size: 13px;
    color: var(--text-muted);
}

.sidebar-balance-amount {
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    line-height: 1;
}

.sidebar-member-level {
    flex: 0 0 auto;
    padding: 3px 7px;
    border: 1px solid rgba(88, 166, 255, 0.28);
    border-radius: 999px;
    color: #fff;
    background: rgba(88, 166, 255, 0.16);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
}

.sidebar-member-quota {
    flex: 1 1 100%;
    min-width: 0;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.35;
    text-align: left;
}

.sidebar-quota-list {
    width: 100%;
    display: grid;
    gap: 6px;
    margin-top: 2px;
}

.sidebar-quota-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.sidebar-quota-name {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
}

.sidebar-quota-name svg {
    width: 14px;
    height: 14px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.sidebar-quota-row strong {
    flex: 0 0 auto;
    color: var(--text);
    font-size: 12px;
    font-weight: 700;
}

.sidebar-quota-row.success-time .sidebar-quota-name,
.sidebar-quota-row.success-time strong {
    color: #55d36f;
}

.sidebar-member-expire {
    flex: 0 0 100%;
    color: var(--text-secondary);
    font-size: 11px;
    line-height: 1.35;
}

.sidebar-member-expire:empty {
    display: none;
}

.sidebar-balance-desc {
    font-size: 11px;
    color: var(--text-secondary);
}

/* 侧边栏底部 */
.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border);
    margin-top: auto;
}

.close-btn {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-muted);
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    margin-bottom: 12px;
}

.close-btn:hover {
    border-color: var(--error);
    color: var(--error);
}

.status-text {
    font-size: 12px;
    color: var(--text-secondary);
    text-align: center;
}

/* 主面板 */
.main-panel {
    flex: 1;
    min-width: 0;
    height: 100vh;
    padding: 24px 32px;
    overflow-y: auto;
}

.page {
    display: none;
}

.page.active {
    display: block;
}

/* 页面头部 */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.page-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
}

.task-retention-reminder {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: -8px auto 18px;
    max-width: 560px;
    padding: 10px 14px;
    border: 1px solid rgba(245, 158, 11, 0.28);
    border-radius: 8px;
    background: rgba(245, 158, 11, 0.12);
    color: var(--text);
    font-size: 13px;
}

.task-retention-reminder[hidden] {
    display: none;
}

.task-retention-reminder-icon {
    flex-shrink: 0;
    font-size: 16px;
}

.task-retention-reminder-text {
    flex: 1;
}

.task-retention-reminder-dismiss {
    flex-shrink: 0;
    padding: 4px 9px;
    border: 1px solid var(--border);
    border-radius: 5px;
    background: var(--bg-secondary);
    color: var(--text-muted);
    cursor: pointer;
    font-size: 12px;
}

.task-retention-reminder-dismiss:hover {
    color: var(--text);
    border-color: var(--border-hover);
}

.page-subtitle {
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 13px;
}

.page-title-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    min-width: 0;
}

.reference-source-menu {
    position: fixed;
    z-index: 6000;
    width: 226px;
    padding: 10px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.18);
}

.reference-source-menu button {
    width: 100%;
    height: 46px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #111827;
    cursor: pointer;
    font-size: 16px;
    text-align: left;
    padding: 0 14px;
}

.reference-source-menu button:hover {
    background: #f3f6fb;
}

.image-library-modal[hidden] {
    display: none;
}

.image-library-modal {
    position: fixed;
    inset: 0;
    z-index: 5900;
}

.image-library-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.64);
}

.image-library-panel {
    position: relative;
    width: min(1040px, calc(100vw - 32px));
    max-height: calc(100vh - 48px);
    margin: 24px auto;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-secondary);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
    overflow: hidden;
}

.image-library-header,
.image-library-toolbar,
.image-library-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
}

.image-library-header strong {
    display: block;
    color: var(--text);
    font-size: 18px;
}

.image-library-header span {
    display: block;
    margin-top: 3px;
    color: var(--text-secondary);
    font-size: 13px;
}

.image-library-close {
    width: 34px;
    height: 34px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    font-size: 20px;
}

.image-library-toolbar {
    background: rgba(148, 163, 184, 0.06);
}

.image-library-search,
.image-library-date {
    flex: 1;
    min-width: 160px;
    height: 38px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg);
    color: var(--text);
    padding: 0 12px;
}

.image-library-date {
    flex: 0 0 150px;
    min-width: 140px;
}

.image-library-tool,
.image-library-secondary,
.image-library-primary {
    height: 38px;
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    padding: 0 14px;
}

.image-library-tool,
.image-library-secondary {
    background: transparent;
    color: var(--text);
}

.image-library-primary {
    border-color: var(--accent);
    background: var(--accent);
    color: #fff;
}

.image-library-primary:disabled,
.image-library-tool:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.image-library-grid {
    flex: 1;
    min-height: 180px;
    overflow: auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
    padding: 18px;
}

.image-library-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
    color: var(--text);
    cursor: pointer;
    padding: 7px;
    text-align: left;
}

.image-library-card.is-selected {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(88, 166, 255, 0.22);
}

.image-library-thumb {
    aspect-ratio: 1 / 1;
    border-radius: 6px;
    overflow: hidden;
    background: rgba(148, 163, 184, 0.12);
}

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

.image-library-name,
.image-library-meta {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.image-library-name {
    display: block;
    width: 100%;
    min-width: 0;
    font-size: 13px;
    font-weight: 600;
}

.image-library-meta {
    color: var(--text-secondary);
    font-size: 12px;
}

.image-library-check {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 22px;
    height: 22px;
    display: none;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    font-size: 13px;
}

.image-library-card.is-selected .image-library-check {
    display: flex;
}

.image-library-delete {
    position: absolute;
    top: 10px;
    right: 10px;
    display: none;
    border-radius: 5px;
    background: rgba(15, 23, 42, 0.76);
    color: #fff;
    font-size: 12px;
    padding: 4px 7px;
}

.image-library-card:hover .image-library-delete {
    display: block;
}

.image-library-empty {
    grid-column: 1 / -1;
    align-self: center;
    color: var(--text-secondary);
    text-align: center;
    padding: 48px 0;
}

.image-library-footer {
    border-top: 1px solid var(--border);
    border-bottom: 0;
}

.image-library-status {
    color: var(--text-secondary);
    font-size: 13px;
}

@media (max-width: 640px) {
    .image-library-panel {
        width: 100vw;
        max-height: 100vh;
        margin: 0;
        border-radius: 0;
    }

    .image-library-toolbar,
    .image-library-footer {
        flex-wrap: wrap;
    }

    .image-library-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        min-height: 280px;
        padding: 12px;
    }
}

.video-create-title-tabs {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

.video-subpage-tabs {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-secondary);
}

.video-subpage-tab,
.image-subpage-tab {
    min-width: 96px;
    height: 32px;
    padding: 0 16px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
}

.video-subpage-tab:hover,
.image-subpage-tab:hover {
    color: var(--text);
}

.video-subpage-tab.active,
.image-subpage-tab.active {
    background: rgba(35, 134, 54, 0.18);
    color: #7ee787;
    box-shadow: inset 0 -2px 0 var(--success);
}

.video-subpage {
    display: none;
}

.video-subpage.active {
    display: block;
}

.video-inspiration-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.video-inspiration-title {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
}

.video-inspiration-count {
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    font-size: 12px;
}

.video-inspiration-page-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.video-inspiration-category {
    height: 28px;
    padding: 0 10px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--bg);
    color: var(--text-muted);
    cursor: pointer;
    font-size: 12px;
}

.video-inspiration-category.active {
    border-color: var(--accent);
    color: var(--text);
}

.video-inspiration-grid {
    min-height: calc(100vh - 220px);
    column-count: 3;
    column-gap: 16px;
}

.video-inspiration-card {
    break-inside: avoid;
    margin-bottom: 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    background: var(--bg);
    cursor: pointer;
    transition: transform 0.2s, border-color 0.2s;
}

.video-inspiration-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
}

.video-inspiration-media {
    position: relative;
    aspect-ratio: 9 / 12;
    overflow: hidden;
    background: #0b0f14;
}

.video-inspiration-media-0 {
    aspect-ratio: 16 / 10;
}

.video-inspiration-media-1 {
    aspect-ratio: 4 / 5;
}

.video-inspiration-media-2 {
    aspect-ratio: 1 / 1;
}

.video-inspiration-media-3 {
    aspect-ratio: 9 / 13;
}

.video-inspiration-media-4 {
    aspect-ratio: 16 / 11;
}

.video-inspiration-cover,
.video-inspiration-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-inspiration-video {
    opacity: 0;
    transition: opacity 0.2s;
}

.video-inspiration-card:hover .video-inspiration-video {
    opacity: 1;
}

.video-inspiration-tag {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(18, 24, 31, 0.8);
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
    z-index: 2;
}

.video-inspiration-footer {
    padding: 10px 12px 12px;
    color: var(--text);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.35;
}

.video-inspiration-empty {
    padding: 18px 12px;
    color: var(--text-muted);
    font-size: 13px;
}

.video-inspiration-sentinel {
    break-inside: avoid;
    height: 1px;
}

@media (max-width: 1280px) {
    .video-inspiration-grid {
        column-count: 2;
    }
}

.gpt-model-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 28px;
    padding: 0 10px;
    border: 1px solid rgba(34, 197, 94, 0.42);
    border-radius: 999px;
    color: #d1fae5;
    background:
        linear-gradient(135deg, rgba(22, 163, 74, 0.28), rgba(20, 184, 166, 0.16)),
        rgba(15, 23, 42, 0.76);
    box-shadow: 0 10px 24px rgba(21, 128, 61, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.12);
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    backdrop-filter: blur(10px);
}

.gpt-model-badge svg {
    color: #86efac;
    flex: 0 0 auto;
}

.clear-btn,
.refresh-btn {
    padding: 6px 14px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-muted);
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.task-status-filter {
    height: 32px;
    padding: 0 10px;
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    color: var(--text-muted);
    border-radius: 6px;
    font-size: 13px;
    outline: none;
}

.task-status-filter:hover,
.task-status-filter:focus {
    border-color: var(--border-hover);
    color: var(--text);
}

.task-delete-dropdown {
    position: relative;
}

.task-delete-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 30;
    display: none;
    min-width: 180px;
    padding: 6px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.28);
}

.task-delete-dropdown.is-open .task-delete-menu {
    display: block;
}

.task-delete-menu button {
    width: 100%;
    padding: 9px 10px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--text-muted);
    text-align: left;
    cursor: pointer;
    font-size: 13px;
}

.task-delete-menu button:hover {
    background: rgba(239, 68, 68, 0.12);
    color: #fca5a5;
}

.clear-btn svg {
    width: 15px;
    height: 15px;
}

.clear-btn:hover,
.refresh-btn:hover {
    border-color: var(--border-hover);
    color: var(--text);
}

/* 卡片区域 */
.section-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.section-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
}

.batch-title-row {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.batch-template-link {
    color: var(--success);
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border: 1px solid rgba(35, 134, 54, 0.35);
    border-radius: 6px;
    background: rgba(35, 134, 54, 0.1);
    text-decoration: none;
}

.batch-template-link:hover {
    border-color: var(--success);
    background: rgba(35, 134, 54, 0.16);
}

.section-header-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.paste-image-btn {
    height: 30px;
    padding: 0 10px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text-secondary);
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.paste-image-btn svg {
    width: 14px;
    height: 14px;
}

.paste-image-btn:hover {
    border-color: var(--accent);
    color: var(--text);
    background: rgba(255, 140, 66, 0.08);
}

.paste-image-btn:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.prompt-template-dropdown {
    position: relative;
}

.prompt-template-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 40;
    width: 220px;
    max-height: 260px;
    overflow-y: auto;
    padding: 6px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
}

.prompt-template-dropdown.is-open .prompt-template-menu {
    display: grid;
    gap: 4px;
}

.prompt-template-item {
    width: 100%;
    padding: 8px 10px;
    border: 0;
    background: transparent;
    color: var(--text-secondary);
    border-radius: 6px;
    cursor: pointer;
    text-align: left;
    font-size: 13px;
}

.prompt-template-item:hover {
    background: rgba(255, 140, 66, 0.08);
    color: var(--text);
}

.material-count {
    font-size: 13px;
    color: var(--text-muted);
}

/* 素材网格 */
.material-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    border: 2px solid transparent;
    border-radius: 10px;
    transition: border-color 0.2s, background 0.2s;
}

.material-grid.drag-over {
    border-color: var(--accent);
    background: rgba(88, 166, 255, 0.06);
}

.upload-area {
    width: 100px;
    height: 100px;
    border: 2px dashed var(--border);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color 0.2s;
}

.upload-area:hover {
    border-color: var(--border-hover);
}

.upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.upload-placeholder svg {
    width: 32px;
    height: 32px;
    color: var(--text-muted);
}

.upload-hint {
    font-size: 10px;
    color: var(--text-secondary);
}

.material-item {
    width: 100px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border);
}

.material-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.material-item .remove-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    background: rgba(0,0,0,0.7);
    border: none;
    border-radius: 4px;
    color: white;
    cursor: pointer;
    font-size: 12px;
    display: none;
}

.material-item:hover .remove-btn {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 设置表单 */
.settings-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.form-label {
    font-size: 13px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.form-separator {
    flex: 0 0 8px;
}

.image-ratio-native-select {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.image-ratio-dropdown {
    flex: 0 0 260px;
    min-width: 240px;
    position: relative;
}

.image-ratio-toggle {
    width: 100%;
    min-height: 38px;
    padding: 7px 34px 7px 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
    transition: border-color 0.2s, background 0.2s;
}

.image-ratio-toggle:hover,
.image-ratio-dropdown.is-open .image-ratio-toggle {
    border-color: var(--border-hover);
}

.image-ratio-toggle:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.image-ratio-toggle-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.image-ratio-toggle-name {
    font-size: 13px;
    font-weight: 700;
    line-height: 16px;
}

.image-ratio-toggle-size {
    color: var(--text-muted);
    font-size: 12px;
    line-height: 14px;
}

.image-ratio-toggle-arrow {
    position: absolute;
    right: 12px;
    width: 7px;
    height: 7px;
    border-right: 1.5px solid var(--text-muted);
    border-bottom: 1.5px solid var(--text-muted);
    transform: rotate(45deg) translateY(-2px);
    transition: transform 0.2s;
}

.image-ratio-dropdown.is-open .image-ratio-toggle-arrow {
    transform: rotate(225deg) translate(-2px, -1px);
}

.image-ratio-field {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 30;
    width: 620px;
    max-width: calc(100vw - 320px);
    padding: 8px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.32);
    display: none;
    grid-template-columns: repeat(4, minmax(132px, 1fr));
    gap: 8px;
}

.image-ratio-dropdown.is-open .image-ratio-field {
    display: grid;
}

.image-ratio-card {
    min-height: 56px;
    padding: 8px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    grid-template-rows: auto auto;
    align-items: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, opacity 0.2s;
}

.image-ratio-card:hover {
    border-color: var(--border-hover);
}

.image-ratio-card.is-selected {
    border-color: rgba(0, 184, 148, 0.55);
    background: rgba(0, 184, 148, 0.08);
}

.image-ratio-card-prompt {
    min-height: 68px;
    grid-template-columns: 44px minmax(0, 1fr);
}

.image-ratio-card.is-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.image-ratio-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.image-ratio-glyph {
    grid-column: 1;
    grid-row: 1 / span 2;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-ratio-rect {
    display: block;
    border: 1px solid var(--text-muted);
    border-radius: 5px;
}

.image-ratio-card.is-selected .image-ratio-rect {
    border-color: #00b894;
}

.image-ratio-prompt-icon {
    width: 30px;
    height: 30px;
    fill: none;
    stroke: var(--text-muted);
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.image-ratio-card-prompt.is-selected .image-ratio-prompt-icon {
    stroke: #00b894;
}

.image-ratio-card-prompt .image-ratio-name {
    font-size: 13px;
    line-height: 15px;
}

.image-ratio-card-prompt .image-ratio-size {
    font-size: 12px;
    line-height: 15px;
}

.image-ratio-copy {
    min-width: 0;
    display: contents;
}

.image-ratio-name {
    grid-column: 2;
    grid-row: 1;
    color: var(--text);
    font-size: 15px;
    font-weight: 700;
    line-height: 18px;
}

.image-ratio-size {
    grid-column: 2;
    grid-row: 2;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
    line-height: 16px;
    white-space: nowrap;
}

.image-ratio-card.is-selected .image-ratio-name {
    color: #00b894;
}

.resolution-tier-field {
    flex: 1 1 460px;
    min-width: 320px;
    display: flex;
    align-items: center;
    gap: 18px;
}

.resolution-tier-heading {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 0 0 auto;
}

.resolution-tier-help {
    color: var(--text-muted);
    font-size: 12px;
    white-space: nowrap;
}

.resolution-tier-group {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(3, minmax(170px, 1fr));
    gap: 10px;
}

.resolution-tier-card {
    min-height: 64px;
    padding: 12px 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.resolution-tier-card:hover {
    border-color: var(--border-hover);
}

.resolution-tier-card.is-selected {
    border-color: #ff8c42;
    background: rgba(255, 140, 66, 0.08);
}

.resolution-tier-card.is-disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.resolution-tier-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.resolution-radio-visual {
    width: 16px;
    height: 16px;
    margin-top: 2px;
    border-radius: 50%;
    border: 2px solid var(--text-muted);
    flex: 0 0 16px;
    position: relative;
}

.resolution-tier-card.is-selected .resolution-radio-visual {
    border-color: #ff8c42;
}

.resolution-tier-card.is-selected .resolution-radio-visual::after {
    content: "";
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    background: #ff8c42;
}

.resolution-tier-copy {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}

.resolution-tier-name {
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.25;
}

.resolution-tier-size {
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.25;
}

.input-with-btn {
    flex: 1;
    display: flex;
    gap: 8px;
}

.form-input {
    flex: 1;
    padding: 8px 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-size: 13px;
}

.form-input::placeholder {
    color: var(--text-secondary);
}

.select-btn {
    padding: 8px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
}

.select-btn:hover {
    border-color: var(--border-hover);
}

/* 比例选择 */
.ratio-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.ratio-btn {
    padding: 6px 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text-muted);
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}

.ratio-btn:hover {
    border-color: var(--border-hover);
    color: var(--text);
}

.ratio-btn.active {
    background: #d4a574;
    border-color: #d4a574;
    color: var(--bg);
    font-weight: 500;
}

/* 时长选择 */
.form-select {
    padding: 8px 32px 8px 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-size: 13px;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238b949e' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}

.setting-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 13px;
    cursor: pointer;
}

.setting-checkbox:hover {
    color: var(--text);
}

/* 提示词输入 */
.prompt-textarea {
    width: 100%;
    min-height: 150px;
    max-height: 400px;
    overflow-y: auto;
    field-sizing: content;
    padding: 16px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 14px;
    line-height: 1.7;
    resize: vertical;
    font-family: inherit;
}

.prompt-textarea::placeholder {
    color: var(--text-secondary);
}

.prompt-textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.reference-mention-panel {
    position: fixed;
    z-index: 1200;
    display: grid;
    gap: 4px;
    max-height: 280px;
    overflow-y: auto;
    padding: 8px;
    border: 1px solid rgba(139, 148, 158, 0.22);
    border-radius: 10px;
    background: #11161d;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.38);
}

.reference-mention-panel[hidden] {
    display: none;
}

.reference-mention-item {
    width: 100%;
    min-width: 0;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 8px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    text-align: left;
}

.reference-mention-item:hover,
.reference-mention-item.is-active {
    background: rgba(88, 166, 255, 0.12);
}

.reference-mention-thumb {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-tertiary);
}

.reference-mention-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.reference-mention-body {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.reference-mention-tag {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}

.reference-mention-name {
    overflow: hidden;
    color: var(--text-muted);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.reference-mention-empty {
    padding: 12px;
    color: var(--text-muted);
    font-size: 13px;
}

/* 提交按钮 */
.submit-video-btn {
    width: 100%;
    margin-top: 16px;
    padding: 14px;
    background: linear-gradient(135deg, #ff8c42, #ff6b35);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: opacity 0.2s;
}

.submit-video-btn:hover {
    opacity: 0.9;
}

.submit-video-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.submit-video-btn svg {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
}

/* 批量生成 */
.batch-import-card {
    border-color: rgba(88, 166, 255, 0.24);
}

.full933-upload-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.full933-file-list {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.full933-file-item {
    flex: 1 1 260px;
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr) 64px;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
}

.full933-file-item.over-limit {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.08);
}

.full933-file-item strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.full933-file-item small {
    display: block;
    color: var(--text-muted);
    font-weight: 400;
}

.full933-file-item.over-limit small {
    color: #dc2626;
    font-weight: 600;
}

.full933-file-item button {
    height: 28px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
}

.full933-image-item {
    width: 108px;
    height: 108px;
}

.full933-image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.batch-header {
    align-items: flex-start;
    gap: 16px;
}

.batch-primary-btn {
    width: auto;
    min-width: 150px;
    margin-top: 0;
    padding: 10px 18px;
    flex: 0 0 auto;
}

.batch-import-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.batch-upload-panel {
    min-height: 132px;
    padding: 15px 18px;
    border: 1px dashed var(--border-hover);
    border-radius: 10px;
    background: var(--bg);
    cursor: pointer;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    grid-template-rows: auto auto auto auto;
    gap: 4px 12px;
    align-content: start;
    transition: border-color 0.2s, background 0.2s;
}

.batch-upload-panel:hover {
    border-color: var(--accent);
    background: rgba(88, 166, 255, 0.06);
}

.batch-upload-icon {
    grid-row: 1 / span 3;
    width: 42px;
    height: 42px;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--accent);
    display: grid;
    place-items: center;
}

.batch-upload-icon svg {
    width: 22px;
    height: 22px;
}

.batch-upload-title {
    grid-column: 2;
    grid-row: 1;
    color: var(--text-muted);
    font-size: 12px;
}

.batch-upload-panel strong {
    grid-column: 2;
    grid-row: 2;
    justify-self: start;
    min-width: 0;
    color: #e6edf3;
    font-size: 16px;
    line-height: 1.25;
    text-decoration: underline;
    text-underline-offset: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.batch-upload-panel strong.is-empty {
    color: var(--text);
    font-size: 15px;
    text-decoration: none;
    text-underline-offset: 0;
}

.batch-upload-hint {
    grid-column: 2;
    grid-row: 3;
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.7;
}

.batch-upload-progress {
    grid-column: 2;
    grid-row: 4;
    color: #7ee787;
    font-size: 12px;
    line-height: 1.6;
}

.batch-image-toggle {
    grid-column: 2;
    grid-row: 2;
    justify-self: start;
    margin-top: 1px;
    margin-left: 7.8em;
    padding: 0;
    border: none;
    background: transparent;
    color: #7ee787;
    font-size: 15px;
    line-height: 1.25;
    font-weight: 500;
    cursor: pointer;
    opacity: 0.92;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.batch-image-toggle:hover {
    text-decoration: underline;
}

.batch-image-toggle[hidden] {
    display: none;
}

.batch-image-preview {
    margin-top: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.batch-image-preview[hidden] {
    display: none;
}

.batch-image-chip {
    appearance: none;
    position: relative;
    width: 112px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
    overflow: hidden;
    padding: 0;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.batch-image-delete {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    background: rgba(0,0,0,0.7);
    border: none;
    border-radius: 4px;
    color: white;
    cursor: pointer;
    font-size: 12px;
    display: none;
}

.batch-image-chip:hover {
    border-color: var(--accent);
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}

.batch-image-chip:hover .batch-image-delete {
    display: flex;
    align-items: center;
    justify-content: center;
}

.batch-image-chip img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
}

.batch-image-chip span {
    display: block;
    padding: 6px 7px;
    color: var(--text-muted);
    font-size: 11px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.batch-image-more {
    width: 112px;
    min-height: 112px;
    border: 1px dashed var(--border-hover);
    border-radius: 8px;
    background: var(--bg);
    color: var(--accent);
    cursor: pointer;
}

.batch-image-modal[hidden] {
    display: none;
}

.batch-image-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.batch-image-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.86);
    backdrop-filter: blur(4px);
}

.batch-image-modal-content {
    position: relative;
    z-index: 1;
    width: min(960px, 92vw);
    max-height: 92vh;
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--bg-secondary);
    overflow: hidden;
    box-shadow: 0 24px 56px rgba(0, 0, 0, 0.45);
}

.batch-image-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 34px;
    height: 34px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(13, 17, 23, 0.72);
    color: var(--text);
    cursor: pointer;
    z-index: 2;
}

.batch-image-modal-body {
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.25);
}

.batch-image-modal-photo {
    max-width: 100%;
    max-height: calc(92vh - 110px);
    object-fit: contain;
    border-radius: 10px;
}

.batch-image-modal-footer {
    display: grid;
    gap: 6px;
    padding: 14px 18px 16px;
    border-top: 1px solid var(--border);
    background: var(--bg);
}

.batch-image-modal-name {
    font-size: 14px;
    color: var(--text);
    word-break: break-all;
}

.batch-image-modal-meta {
    font-size: 12px;
    color: var(--text-secondary);
}

.batch-stat-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.batch-stat-card {
    min-height: 84px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg-secondary);
    display: grid;
    gap: 8px;
}

.batch-stat-card span {
    color: var(--text-muted);
    font-size: 13px;
}

.batch-stat-card strong {
    color: var(--text);
    font-size: 26px;
    line-height: 1;
}

.batch-table-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

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

.batch-inline-filter,
.pagination-page-size {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 13px;
}

.batch-inline-filter {
    min-height: 38px;
    padding: 0 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg);
}

.batch-inline-select {
    min-width: 88px;
    height: 30px;
    padding: 0 28px 0 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg);
    color: var(--text);
    font-size: 13px;
}

.batch-table-scroll {
    overflow-x: auto;
}

.batch-task-table {
    min-width: 920px;
    table-layout: fixed;
}

.batch-task-table th,
.batch-task-table td {
    padding: 12px 12px;
}

.batch-task-table th:first-child,
.batch-task-table td:first-child {
    width: 34px;
    text-align: center;
}

.batch-task-table th:nth-child(2),
.batch-task-table td:nth-child(2) {
    width: 54px;
}

.batch-task-table th:nth-child(3),
.batch-task-table td:nth-child(3) {
    width: 78px;
}

.batch-task-table th:nth-child(4),
.batch-task-table td:nth-child(4) {
    width: 56px;
}

.batch-task-table th:nth-child(5),
.batch-task-table td:nth-child(5) {
    width: 118px;
}

.batch-task-table th:nth-child(6),
.batch-task-table td:nth-child(6) {
    width: 84px;
}

.batch-task-table th:nth-child(7),
.batch-task-table td:nth-child(7) {
    width: 360px;
}

.batch-task-table th:nth-child(8),
.batch-task-table td:nth-child(8) {
    width: 116px;
}

.batch-task-table th:nth-child(9),
.batch-task-table td:nth-child(9) {
    width: 86px;
}

.batch-task-table th:nth-child(10),
.batch-task-table td:nth-child(10) {
    width: 136px;
    position: sticky;
    right: 0;
    z-index: 2;
    background: var(--card-bg);
}

.batch-task-table td:nth-child(10) {
    white-space: normal;
}

.batch-task-table td:nth-child(10) .task-btn {
    min-height: 30px;
    padding: 6px 9px;
    margin: 2px 2px 2px 0;
    font-size: 12px;
}

.batch-task-table th:nth-child(-n+6),
.batch-task-table td:nth-child(-n+6) {
    padding-left: 8px;
    padding-right: 8px;
}

.batch-task-table tr.is-selected td {
    background: rgba(88, 166, 255, 0.05);
}

.batch-prompt-cell {
    max-width: 560px;
    white-space: nowrap;
}

.batch-prompt-view {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-width: 0;
}

.batch-prompt-text {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.batch-prompt-edit-btn {
    display: inline-grid;
    place-items: center;
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg-tertiary);
    color: var(--accent);
    cursor: pointer;
}

.batch-prompt-edit-btn svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.batch-prompt-edit-btn:hover {
    border-color: var(--accent);
    background: rgba(88, 166, 255, 0.12);
}

.batch-prompt-modal[hidden] {
    display: none;
}

.batch-prompt-modal {
    position: fixed;
    inset: 0;
    z-index: 2200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.batch-prompt-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.66);
}

.batch-prompt-modal-content {
    position: relative;
    width: min(760px, 100%);
    display: grid;
    gap: 16px;
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg-secondary);
    box-shadow: 0 18px 52px rgba(0, 0, 0, 0.42);
}

.batch-prompt-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.batch-prompt-modal-title {
    color: var(--text);
    font-size: 16px;
}

.batch-prompt-modal-close {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
}

.batch-prompt-modal-close svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
}

.batch-prompt-modal-field {
    display: grid;
    gap: 8px;
    color: var(--text-muted);
    font-size: 13px;
}

.batch-prompt-modal-textarea,
.batch-prompt-modal-duration {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
    color: var(--text);
    font: inherit;
}

.batch-prompt-modal-textarea {
    min-height: 220px;
    padding: 12px;
    resize: vertical;
    line-height: 1.6;
}

.batch-prompt-modal-duration {
    max-width: 180px;
    height: 38px;
    padding: 0 10px;
}

.batch-prompt-modal-error {
    min-height: 20px;
    color: var(--error);
    font-size: 13px;
}

.batch-prompt-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.full933-confirm-message {
    color: var(--text);
    font-size: 15px;
    line-height: 1.7;
}

.full933-points-emphasis {
    color: var(--error);
    font-size: 1.15em;
    font-weight: 700;
}

.batch-reference-trigger {
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--accent);
    font: inherit;
    text-decoration: underline;
    cursor: pointer;
}

.batch-reference-trigger:disabled {
    color: var(--text-muted);
    text-decoration: none;
    cursor: default;
}

.batch-reference-list {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.batch-reference-item {
    display: grid;
    gap: 4px;
    width: 220px;
    flex: 0 0 220px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg);
    text-align: left;
}

.batch-reference-item[disabled] {
    opacity: 0.72;
    cursor: default;
}

.batch-reference-item-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.batch-reference-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 10px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.04);
}

.batch-reference-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.batch-reference-empty {
    color: var(--text-muted);
    font-size: 13px;
}

.batch-reference-tag {
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
}

.batch-reference-state {
    color: var(--text-muted);
    font-size: 12px;
}

.batch-reference-name {
    color: var(--text);
    font-size: 14px;
    word-break: break-all;
}

.batch-reference-file {
    color: var(--text-secondary);
    font-size: 12px;
    word-break: break-all;
}

.batch-error {
    margin-top: 5px;
    color: var(--error);
    font-size: 11px;
    line-height: 1.35;
}

/* 批量生图 */
.batch-image-workbench {
    display: grid;
    gap: 16px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.batch-image-control-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: stretch;
    justify-content: space-between;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.batch-image-prompt-panel,
.batch-image-setting-panel {
    padding: 15px 18px;
    border: 1px solid var(--border-hover);
    border-radius: 10px;
    background: var(--bg);
}

.batch-image-prompt-panel {
    flex: 1 1 420px;
    min-width: 320px;
    max-width: none;
}

.batch-image-setting-panel {
    flex: 0 1 auto;
    width: auto;
    min-width: 300px;
    max-width: 100%;
}

.batch-image-control-grid > .batch-upload-panel {
    flex: 0 1 280px;
}

.batch-image-prompt-input {
    width: 100%;
    min-height: 88px;
    margin-top: 8px;
    resize: vertical;
}

.batch-image-setting-row {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 10px;
}

.batch-image-resolution-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.batch-image-resolution-btn {
    min-width: 72px;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-secondary);
    color: var(--text-muted);
    cursor: pointer;
}

.batch-image-resolution-btn.active {
    border-color: var(--accent);
    color: var(--text);
    background: rgba(88, 166, 255, 0.12);
}

.batch-image-task-table th:nth-child(5),
.batch-image-task-table td:nth-child(5) {
    min-width: 300px;
}

.batch-image-task-table th:nth-child(8),
.batch-image-task-table td:nth-child(8) {
    min-width: 90px;
}

#batchImageCreatePanel .batch-stat-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

#batchImageCreatePanel .section-card {
    max-width: 100%;
    min-width: 0;
}

#batchImageCreatePanel .batch-table-card {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

#batchImageCreatePanel .batch-table-toolbar {
    flex-wrap: wrap;
    align-items: flex-start;
}

#batchImageCreatePanel .batch-actions {
    max-width: 100%;
}

#batchImageCreatePanel .batch-task-table {
    min-width: 920px;
}

@media (max-width: 1180px) {
    .batch-image-prompt-panel,
    .batch-image-setting-panel {
        flex-basis: 100%;
    }
}

.version-tag {
    font-size: 11px;
    opacity: 0.8;
    background: rgba(255,255,255,0.15);
    padding: 2px 8px;
    border-radius: 4px;
}

/* Token 输入 */
.token-input {
    width: 100%;
    min-height: 100px;
    padding: 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-size: 13px;
    resize: vertical;
    font-family: monospace;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
    font-size: 14px;
}

/* 页头操作区 */
.page-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.view-mode-toggle {
    display: flex;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.view-mode-btn {
    padding: 6px 12px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 15px;
    line-height: 1;
    transition: all 0.15s;
}

.view-mode-btn:hover {
    color: var(--text);
}

.view-mode-btn.active {
    background: var(--accent);
    color: #fff;
}

/* 无图紧凑模式 */
.task-item.compact {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
}

.task-item.compact .task-prompt-compact {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    color: var(--text-muted);
}

.task-item.compact .task-id {
    flex-shrink: 0;
}

.task-item.compact .task-time {
    flex-shrink: 0;
}

.task-item.compact .task-btn {
    padding: 4px 10px;
    font-size: 12px;
    flex-shrink: 0;
}

/* 任务列表 */
.task-list-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.task-item {
    position: relative;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.task-item:hover {
    border-color: var(--border-hover);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.task-item.success {
    border-left: 3px solid var(--success);
}

.task-item.failed {
    border-left: 3px solid var(--error);
}

.task-item.processing {
    border-left: 3px solid var(--accent);
}

.task-item.cancelled {
    border-left: 3px solid var(--text-secondary);
    opacity: 0.7;
}

.task-main {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

/* 缩略图 */
.task-image-list {
    width: 176px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex-shrink: 0;
}

.task-image-list.single-image {
    display: block;
}

.task-thumb-wrapper {
    position: relative;
    width: 52px;
    height: 52px;
    border-radius: 8px;
    overflow: visible;
    flex-shrink: 0;
}

.task-thumb-wrapper.single-image {
    width: 176px;
    height: 128px;
    border-radius: 10px;
    overflow: visible;
}

.task-thumb-wrapper.single-image .task-thumb {
    border-radius: 10px;
}

.task-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.task-thumb-placeholder {
    width: 176px;
    height: 80px;
    border-radius: 8px;
    background: var(--bg);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.task-thumb-placeholder svg {
    width: 28px;
    height: 28px;
    color: var(--text-muted);
}

.task-thumb-index {
    position: absolute;
    right: 4px;
    bottom: 4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: rgba(0, 0, 0, 0.72);
    color: white;
    font-size: 11px;
    line-height: 18px;
    text-align: center;
    pointer-events: none;
}

.task-thumb-wrapper.single-image .task-thumb-index {
    right: 6px;
    bottom: 6px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.6);
    font-size: 10px;
    line-height: 16px;
}

/* 任务内容区 */
.task-content {
    flex: 0 0 70%;
    min-width: 0;
}

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.task-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.task-id {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.task-time {
    font-size: 12px;
    color: var(--text-secondary);
}

.task-time-extra {
    display: none;
    margin-left: 8px;
    color: var(--text-muted);
}

.task-item:hover .task-time-extra {
    display: inline;
}

.task-item.compact .task-time {
    flex-shrink: 1;
    min-width: 120px;
    white-space: normal;
}

.task-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.task-status.pending {
    background: rgba(217, 165, 71, 0.15);
    color: var(--warning);
}

.task-status.processing {
    background: rgba(88, 166, 255, 0.15);
    color: var(--accent);
}

.task-status.success {
    background: rgba(35, 134, 54, 0.15);
    color: var(--success);
}

.task-status.failed {
    background: rgba(248, 81, 73, 0.15);
    color: var(--error);
}

.task-status.cancelled {
    background: rgba(139, 148, 158, 0.15);
    color: var(--text-secondary);
}

.task-prompt-preview {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    box-orient: vertical;
    overflow: hidden;
    cursor: pointer;
}

.task-prompt-preview:hover {
    color: var(--text);
}

/* 任务操作按钮 */
.task-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.task-btn {
    padding: 6px 14px;
    border: 1px solid var(--border);
    background: var(--bg);
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.task-btn:hover {
    border-color: var(--border-hover);
    transform: translateY(-1px);
}

.copy-btn {
    color: var(--text);
    border-color: rgba(139, 148, 158, 0.35);
}

.copy-btn:hover {
    background: rgba(139, 148, 158, 0.12);
    border-color: var(--border-hover);
}

.preview-btn {
    color: var(--accent);
    border-color: rgba(88, 166, 255, 0.3);
}

.preview-btn:hover {
    background: rgba(88, 166, 255, 0.1);
    border-color: var(--accent);
}

.download-btn {
    color: var(--success);
    border-color: rgba(35, 134, 54, 0.3);
}

.download-btn:hover {
    background: rgba(35, 134, 54, 0.1);
    border-color: var(--success);
}

.download-btn:disabled {
    opacity: 0.65 !important;
    cursor: wait;
    transform: none;
}

.cancel-btn {
    color: var(--warning);
    border-color: rgba(217, 165, 71, 0.3);
}

.cancel-btn:hover {
    background: rgba(217, 165, 71, 0.1);
    border-color: var(--warning);
}

.retry-btn {
    color: var(--accent);
    border-color: rgba(88, 166, 255, 0.3);
}

.retry-btn:hover {
    background: rgba(88, 166, 255, 0.1);
    border-color: var(--accent);
}

.delete-btn {
    color: var(--error);
    border-color: rgba(248, 81, 73, 0.3);
}

.delete-btn:hover {
    background: rgba(248, 81, 73, 0.1);
    border-color: var(--error);
}

.task-error {
    font-size: 12px;
    color: var(--error);
    display: flex;
    align-items: center;
    gap: 4px;
}

.task-detail-hint {
    font-size: 12px;
    color: var(--text-secondary);
}

.task-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 14px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.pagination-info {
    font-size: 13px;
    color: var(--text-muted);
}

.pagination-actions {
    display: flex;
    gap: 8px;
}

.task-page-size-select {
    height: 32px;
    padding: 0 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
    color: var(--text);
    font-size: 13px;
}

.pagination-btn {
    padding: 7px 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    cursor: pointer;
    font-size: 13px;
}

.pagination-btn:hover:not(:disabled) {
    border-color: var(--accent);
    color: var(--accent);
}

.pagination-btn:disabled {
    cursor: not-allowed;
    color: var(--text-secondary);
    opacity: 0.55;
}

/* 任务详情弹窗 */
.task-detail-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 900;
    display: flex;
    align-items: center;
    justify-content: center;
}

.task-detail-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.76);
    backdrop-filter: blur(4px);
}

.task-detail-content {
    position: relative;
    z-index: 901;
    width: min(1080px, 92vw);
    max-height: 88vh;
    overflow-y: auto;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.42);
}

.task-detail-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--bg);
    color: var(--text-muted);
    cursor: pointer;
}

.task-detail-close:hover {
    color: var(--text);
    border-color: var(--border-hover);
}

.task-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
    padding-right: 44px;
}

.task-detail-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
}

.task-detail-time {
    margin-top: 4px;
    font-size: 13px;
    color: var(--text-secondary);
}

.task-detail-body {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.task-detail-section {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 18px;
}

.task-detail-section-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 14px;
}

.task-detail-image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 14px;
}

.task-detail-image-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-decoration: none;
    color: var(--text-muted);
}

.task-detail-image-card img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    transition: transform 0.2s, border-color 0.2s;
}

.task-detail-image-card:hover img {
    transform: translateY(-2px);
    border-color: var(--accent);
}

.task-detail-image-card span {
    font-size: 12px;
    text-align: center;
}

.task-detail-prompt {
    white-space: pre-wrap;
    word-break: break-word;
    color: var(--text);
    font-size: 14px;
    line-height: 1.8;
}

.task-detail-params {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

.task-detail-param {
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-secondary);
}

.task-detail-param span {
    display: block;
    margin-bottom: 4px;
    color: var(--text-muted);
    font-size: 12px;
}

.task-detail-param strong {
    color: var(--text);
    font-size: 14px;
    word-break: break-word;
}

.task-detail-error {
    color: var(--error);
    line-height: 1.7;
}

.task-detail-empty {
    color: var(--text-muted);
    font-size: 13px;
}

.task-detail-video-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.task-detail-video-player {
    width: 100%;
    max-height: 420px;
    background: #000;
    border: 1px solid var(--border);
    border-radius: 8px;
}

.task-detail-link {
    color: var(--accent);
    font-size: 12px;
    word-break: break-all;
}

/* 视频预览弹窗 */
.video-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
}

.video-modal-content {
    position: relative;
    width: 90%;
    max-width: 720px;
    max-height: 82vh;
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 16px;
    z-index: 1001;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.4);
}

.video-modal-content video {
    width: 100%;
    max-height: 78vh;
    object-fit: contain;
    background: #000;
    border-radius: 8px;
    display: block;
}

.video-modal-content video[hidden] {
    display: none;
}

.video-modal-loading {
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 14px;
}

.video-modal-loading[hidden] {
    display: none;
}

.video-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.video-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* 日志 */
.log-container {
    max-height: 500px;
    overflow-y: auto;
}

.log-item {
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
    font-family: monospace;
}

.log-time {
    color: var(--text-muted);
    margin-right: 12px;
}

/* ==================== 个人信息页面 ==================== */

/* 余额卡片 */
.balance-card {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.2), transparent 30%),
        linear-gradient(135deg, #4f46e5 0%, #7c3aed 52%, #a855f7 100%);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 16px;
    padding: 16px 20px;
    margin-bottom: 14px;
    color: white;
    box-shadow: 0 12px 28px rgba(79, 70, 229, 0.16);
}

.balance-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 14px;
}

.balance-label {
    margin-bottom: 4px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.76);
}

.balance-main {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.balance-amount {
    font-size: 36px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -1px;
}

.balance-unit {
    font-size: 13px;
    opacity: 0.86;
}

.balance-status {
    padding: 5px 10px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    font-size: 12px;
    color: rgba(255, 255, 255, 0.9);
}

.balance-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.stat-item {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.16);
}

.stat-value {
    font-size: 15px;
    font-weight: 700;
}

.stat-label {
    font-size: 12px;
    opacity: 0.76;
}

/* 信息网格 */
.profile-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.9fr);
    gap: 18px;
    margin-bottom: 20px;
}

.profile-card {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent),
        var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 18px;
}

.card-icon {
    width: 28px;
    height: 28px;
    border-radius: 9px;
    background: rgba(99, 102, 241, 0.14);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
}

.card-title {
    font-size: 15px;
    font-weight: 650;
    color: var(--text);
}

/* 账户信息列表 */
.info-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.info-item {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.info-label {
    font-size: 13px;
    color: var(--text-muted);
    min-width: 70px;
}

.info-value {
    font-size: 13px;
    color: var(--text);
}

.info-value.code {
    font-family: monospace;
    font-size: 11px;
    color: var(--accent);
    word-break: break-all;
}

.info-value.highlight {
    color: #a855f7;
    font-weight: 500;
}

.info-value.strong {
    font-weight: 600;
}

.info-extra {
    font-size: 12px;
    color: var(--text-muted);
}

.profile-level {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 16px;
    padding: 16px;
    border: 1px solid rgba(168, 85, 247, 0.22);
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(168, 85, 247, 0.08));
}

.profile-level-label {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    color: var(--text-muted);
}

.profile-level strong {
    font-size: 18px;
    color: var(--text);
}

.profile-level-badge {
    flex-shrink: 0;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(168, 85, 247, 0.14);
    color: #c084fc;
    font-size: 12px;
}

.profile-progress {
    padding: 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 14px;
}

.profile-progress-header {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.profile-progress-bar {
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 999px;
    overflow: hidden;
}

.profile-progress-bar span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #6366f1, #a855f7);
    border-radius: inherit;
}

.profile-metric-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.profile-metric {
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(13, 17, 23, 0.62);
}

.profile-metric span {
    display: block;
    margin-bottom: 8px;
    font-size: 12px;
    color: var(--text-muted);
}

.profile-metric strong {
    font-size: 14px;
    color: var(--text);
}

.profile-api-key {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 10px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(13, 17, 23, 0.62);
}

.profile-api-key-content {
    min-width: 0;
}

.profile-api-key-label {
    display: block;
    margin-bottom: 8px;
    font-size: 12px;
    color: var(--text-muted);
}

.profile-api-key code {
    display: block;
    color: var(--accent);
    font-size: 12px;
    line-height: 1.5;
    word-break: break-all;
}

.profile-api-key-actions {
    display: flex;
    flex-shrink: 0;
    gap: 8px;
}

.profile-api-key-btn {
    padding: 7px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-tertiary);
    color: var(--text);
    cursor: pointer;
    font-size: 12px;
}

.profile-api-key-btn:hover:not(:disabled) {
    border-color: var(--accent);
    color: var(--accent);
}

.profile-api-key-btn:disabled {
    cursor: wait;
    opacity: 0.65;
}

.profile-summary-card {
    background: linear-gradient(180deg, rgba(88, 166, 255, 0.08), var(--bg-secondary));
}

.profile-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.summary-item {
    padding: 16px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.summary-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
}

.summary-label {
    font-size: 12px;
    color: var(--text-muted);
}

/* 充值区域 */
.recharge-section {
    margin-bottom: 20px;
}

.recharge-tip {
    margin-bottom: 16px;
    padding: 16px;
    border: 1px solid rgba(88, 166, 255, 0.2);
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(88, 166, 255, 0.12), rgba(34, 197, 94, 0.06));
}

.recharge-tip strong {
    display: block;
    margin-bottom: 6px;
    color: var(--text);
    font-size: 15px;
}

.recharge-tip span {
    display: block;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.7;
}

.recharge-input-group {
    display: flex;
    gap: 8px;
}

.recharge-input {
    flex: 1;
    padding: 10px 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 13px;
}

.recharge-input::placeholder {
    color: var(--text-secondary);
}

.recharge-btn {
    padding: 10px 20px;
    background: #6366f1;
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 13px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.recharge-btn:hover {
    opacity: 0.9;
}

.buy-btn {
    padding: 10px 16px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: #22c55e;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
}

.buy-btn:hover {
    border-color: #22c55e;
}

.recharge-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--bg);
}

.recharge-summary span {
    font-size: 13px;
    color: var(--text-muted);
}

.recharge-summary strong {
    font-size: 24px;
    color: var(--text);
}

/* 会员区域 */
.member-section {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.member-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
}

.member-icon {
    font-size: 14px;
}

.member-title {
    font-size: 13px;
    color: var(--text-muted);
}

.member-level {
    font-size: 15px;
    font-weight: 500;
    color: #a855f7;
    margin-bottom: 8px;
}

.member-progress {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--text-muted);
}

.progress-text {
    color: var(--text-secondary);
}

/* 统计网格 */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.stats-box {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.stats-label {
    font-size: 12px;
    color: var(--text-muted);
}

.stats-value {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
}

/* 可用模型 */
.model-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.model-tag {
    padding: 6px 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 12px;
    color: var(--text-muted);
    cursor: default;
    transition: all 0.2s;
}

.model-tag:hover {
    border-color: var(--border-hover);
    color: var(--text);
}

/* 消费流水 */
.transaction-section {
    padding: 20px;
}

.section-title-with-icon {
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-icon {
    font-size: 16px;
}

.card-icon svg {
    width: 18px;
    height: 18px;
}

.filter-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.profile-record-tabs {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
}

.profile-record-tab {
    min-width: 96px;
    height: 32px;
    padding: 0 16px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
}

.profile-record-tab.active {
    background: var(--success);
    color: white;
}

.profile-record-panel {
    display: none;
}

.profile-record-panel.active {
    display: block;
}

.filter-btn {
    padding: 6px 16px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-muted);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-btn:hover {
    border-color: var(--border-hover);
    color: var(--text);
}

.filter-btn.active {
    background: #6366f1;
    border-color: #6366f1;
    color: white;
}

/* 交易表格 */
.transaction-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.transaction-table th,
.transaction-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.transaction-table th {
    color: var(--text-muted);
    font-weight: 500;
}

.transaction-table td {
    color: var(--text);
}

.transaction-table tbody tr:hover {
    background: var(--bg);
}

/* 图片工具 */
.image-tools-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 8px;
    margin-bottom: 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.image-tools-tab {
    min-height: 42px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.image-tools-tab svg {
    width: 16px;
    height: 16px;
}

.image-tools-tab:hover {
    background: rgba(88, 166, 255, 0.08);
    color: var(--text);
}

.image-tools-tab.active {
    background: rgba(35, 134, 54, 0.28);
    border-color: rgba(46, 160, 67, 0.55);
    color: #fff;
}

.image-tools-panel {
    display: grid;
    gap: 14px;
    padding: 16px;
}

.image-tools-upload {
    min-height: 128px;
    border: 1px dashed rgba(139, 148, 158, 0.45);
    border-radius: 10px;
    background: rgba(13, 17, 23, 0.35);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 18px;
    text-align: center;
    transition: border-color 0.2s, background 0.2s;
}

.image-tools-upload:hover,
.image-tools-upload.drag-over {
    border-color: var(--accent);
    background: rgba(88, 166, 255, 0.08);
}

.image-tools-upload-icon {
    width: 36px;
    height: 36px;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.image-tools-upload-icon svg {
    width: 36px;
    height: 36px;
}

.image-tools-upload-title {
    color: var(--text);
    font-size: 15px;
    font-weight: 600;
}

.image-tools-upload-hint {
    color: var(--text-muted);
    font-size: 13px;
}

.image-tools-preview {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(13, 17, 23, 0.45);
}

.image-tools-preview[hidden],
.image-tools-option-group[hidden] {
    display: none;
}

.image-tools-preview img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--border);
}

.image-tools-preview strong,
.image-tools-preview span {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.image-tools-preview span {
    margin-top: 5px;
    color: var(--text-muted);
    font-size: 12px;
}

.image-tools-divider {
    height: 1px;
    background: var(--border);
}

.image-tools-options {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(220px, 0.8fr);
    gap: 14px;
    align-items: end;
}

.image-tools-option-group {
    display: grid;
    gap: 10px;
}

.image-tools-label {
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
}

.image-tools-choice-group {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.image-tools-choice {
    min-height: 60px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(13, 17, 23, 0.3);
    color: var(--text);
    cursor: pointer;
    display: grid;
    place-items: center;
    gap: 2px;
    transition: border-color 0.2s, background 0.2s;
}

.image-tools-choice strong {
    font-size: 16px;
}

.image-tools-choice span {
    color: var(--text-muted);
    font-size: 13px;
}

.image-tools-choice:hover,
.image-tools-choice.active {
    border-color: var(--primary-hover);
    background: rgba(35, 134, 54, 0.14);
}

.image-tools-select {
    width: 100%;
    min-height: 40px;
}

.image-tools-submit {
    margin-top: 0;
}

.image-tools-table td:first-child {
    max-width: 260px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.image-tools-download {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

.image-tools-download:hover {
    color: var(--accent-hover);
}

.tag {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
}

.tag-deduction {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.amount-negative {
    color: #22c55e;
}

.task-id {
    color: var(--text-muted);
    font-size: 12px;
}

.task-type {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
}

.task-subtype-tag {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: 999px;
    border: 1px solid rgba(88, 166, 255, 0.16);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1;
    white-space: nowrap;
}

.task-subtype-resolution {
    border-color: rgba(88, 166, 255, 0.24);
    background: rgba(88, 166, 255, 0.1);
    color: #8dc2ff;
}

.task-type-image {
    background: rgba(168, 85, 247, 0.15);
    color: #a855f7;
}

.task-type-video {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

/* 响应式 - 平板 */
@media (max-width: 900px) {
    .main-panel {
        padding: 20px 16px;
    }

    .profile-grid {
        grid-template-columns: 1fr;
    }

    .contact-method-grid {
        grid-template-columns: 1fr;
    }

    .balance-stats {
        flex-wrap: wrap;
        gap: 16px 32px;
    }

    .recharge-input-group {
        flex-wrap: wrap;
    }

    .transaction-table {
        font-size: 12px;
    }

    .transaction-table th,
    .transaction-table td {
        padding: 8px 10px;
    }

    .invite-code-display,
    .invite-link-display {
        flex-direction: column;
    }
}

/* 响应式 - 手机 */
@media (max-width: 640px) {
    .app-shell {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        z-index: 100;
        padding: 0;
        border-right: none;
        border-top: 1px solid var(--border);
        background: var(--bg-secondary);
        overflow: visible;
    }

    .brand,
    .sidebar-balance,
    .sidebar-footer {
        display: none;
    }

    .nav-list {
        flex-direction: row;
        justify-content: flex-start;
        min-height: calc(62px + env(safe-area-inset-bottom));
        padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
        gap: 0;
        overflow-x: auto;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .nav-list::-webkit-scrollbar {
        display: none;
    }

    .nav-item {
        flex-direction: column;
        gap: 2px;
        padding: 6px 8px;
        font-size: 11px;
        flex: 0 0 62px;
        justify-content: center;
        border-radius: 8px;
        min-height: 50px;
    }

    .nav-icon {
        font-size: 18px;
        width: auto;
    }

    .nav-badge {
        position: absolute;
        top: 2px;
        right: calc(50% - 20px);
        margin-left: 0;
    }

    .nav-item {
        position: relative;
    }

    .main-panel {
        height: auto;
        padding: 16px 12px calc(84px + env(safe-area-inset-bottom));
        min-height: 100vh;
    }

    .page-header {
        margin-bottom: 16px;
    }

    .task-retention-reminder {
        align-items: flex-start;
        margin: -4px 0 14px;
    }

    .page-header h2 {
        font-size: 16px;
    }

    .profile-record-tabs {
        width: 100%;
        overflow-x: auto;
    }

    .profile-record-tab {
        flex: 1;
        min-width: 96px;
    }

    .video-create-title-tabs {
        width: 100%;
        gap: 10px;
    }

    .full933-upload-grid {
        grid-template-columns: 1fr;
    }

    .video-subpage-tabs {
        width: 100%;
    }

    .video-subpage-tab {
        flex: 1;
        min-width: 0;
        padding: 0 8px;
        font-size: 13px;
    }

    .page-title-row {
        gap: 8px;
    }

    .gpt-model-badge {
        height: 26px;
        padding: 0 9px;
        font-size: 11px;
    }

    .section-card {
        padding: 14px;
        margin-bottom: 14px;
        border-radius: 10px;
    }

    .material-grid {
        gap: 8px;
    }

    .upload-area,
    .material-item {
        width: 80px;
        height: 80px;
    }

    .form-row {
        gap: 8px;
    }

    .image-ratio-field {
        width: min(100%, 360px);
        max-width: calc(100vw - 48px);
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .image-ratio-dropdown {
        flex-basis: 100%;
        min-width: 0;
    }

    .image-ratio-card {
        grid-template-columns: 34px minmax(0, 1fr);
        min-height: 52px;
        padding: 7px;
    }

    .image-ratio-glyph {
        width: 34px;
        height: 34px;
    }

    .image-ratio-name {
        font-size: 14px;
    }

    .image-ratio-size {
        font-size: 12px;
    }

    .resolution-tier-field {
        flex-basis: 100%;
        min-width: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .resolution-tier-heading {
        justify-content: space-between;
    }

    .resolution-tier-group {
        grid-template-columns: 1fr;
    }

    .ratio-group {
        gap: 4px;
    }

    .ratio-btn {
        padding: 5px 10px;
        font-size: 12px;
    }

    .prompt-textarea {
        min-height: 60px;
        padding: 12px;
        font-size: 13px;
    }

    .reference-mention-panel {
        max-width: calc(100vw - 24px);
        max-height: 240px;
        padding: 6px;
    }

    .reference-mention-item {
        grid-template-columns: 38px minmax(0, 1fr);
        padding: 7px;
    }

    .reference-mention-thumb {
        width: 38px;
        height: 38px;
    }

    .submit-video-btn {
        padding: 12px;
        font-size: 14px;
    }

    .batch-header,
    .batch-table-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .batch-primary-btn,
    .batch-actions .task-btn,
    .batch-inline-filter {
        width: 100%;
        justify-content: center;
    }

    .batch-inline-select {
        width: 100%;
        min-width: 0;
    }

    .batch-import-grid,
    .batch-stat-grid {
        grid-template-columns: 1fr;
    }

    .batch-upload-panel {
        min-height: 118px;
        padding: 12px 14px;
    }

    .batch-image-chip {
        width: calc(50% - 5px);
    }

    .batch-image-modal {
        padding: 14px;
    }

    .batch-image-modal-content {
        width: 100%;
    }

    .batch-image-modal-body {
        padding: 14px;
    }

    .task-main {
        flex-direction: column;
        gap: 10px;
    }

    .task-image-list {
        width: 100%;
    }

    .task-content {
        width: 100%;
    }

    .task-actions {
        flex-wrap: wrap;
        gap: 6px;
    }

    .task-btn {
        font-size: 12px;
        padding: 5px 10px;
    }

    .task-item.compact {
        gap: 8px;
        flex-wrap: wrap;
    }

    .task-item.compact .task-prompt {
        min-width: 100%;
    }

    .pagination {
        gap: 4px;
    }

    .page-btn {
        padding: 6px 10px;
        font-size: 12px;
    }

    .log-container {
        max-height: 50vh;
    }

    .profile-grid {
        grid-template-columns: 1fr;
    }

    .balance-stats {
        flex-wrap: wrap;
        gap: 12px;
    }

    .transaction-table {
        font-size: 11px;
    }

    .transaction-table th,
    .transaction-table td {
        padding: 6px 8px;
    }
}

/* ==================== 任务结果图样式 ==================== */
.task-result-wrapper {
    position: absolute;
    right: 16px;
    top: 0;
    bottom: 0;
    width: auto;
    min-width: 60px;
    max-width: 140px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--border);
    z-index: 10;
}

.task-result-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
}

.task-result-hover {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.95);
    border-radius: 8px;
    padding: 12px;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.task-result-wrapper:hover .task-result-hover {
    display: flex;
}

.task-result-preview {
    max-width: 80vw;
    max-height: 80vh;
    object-fit: contain;
}

/* ==================== 图片预览弹窗 ==================== */
.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
}

.image-modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-modal-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
}

.image-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: none;
    background: var(--bg-tertiary);
    color: var(--text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: background 0.2s;
}

.image-modal-close:hover {
    background: var(--border-hover);
}

/* ==================== 图片重新编辑弹窗 ==================== */
.image-edit-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.image-edit-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.78);
    backdrop-filter: blur(4px);
}

.image-edit-content {
    position: relative;
    z-index: 1001;
    width: min(1120px, 100%);
    max-height: 90vh;
    overflow-y: auto;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 22px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.42);
}

.image-edit-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 32px;
    height: 32px;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--bg);
    color: var(--text-muted);
    cursor: pointer;
}

.image-edit-close:hover {
    color: var(--text);
    border-color: var(--border-hover);
}

.image-edit-header {
    padding-right: 44px;
    margin-bottom: 18px;
}

.image-edit-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
}

.image-edit-subtitle {
    margin-top: 4px;
    font-size: 13px;
    color: var(--text-secondary);
}

.image-edit-body {
    display: grid;
    grid-template-columns: 480px 1fr;
    gap: 18px;
    align-items: stretch;
}

.image-edit-preview {
    position: relative;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg);
    overflow: hidden;
    height: 480px;
    touch-action: none;
}

.image-edit-preview.is-selecting {
    cursor: crosshair;
}

.image-edit-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.image-edit-selection-layer {
    position: absolute;
    z-index: 2;
    cursor: crosshair;
}

.image-edit-selection-rect {
    position: absolute;
    display: none;
    border: 2px solid var(--accent);
    background: rgba(88, 166, 255, 0.2);
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.24);
    pointer-events: none;
}

.image-edit-selection-label {
    position: absolute;
    left: 0;
    bottom: calc(100% + 6px);
    min-width: max-content;
    max-width: 220px;
    padding: 4px 7px;
    border-radius: 6px;
    background: rgba(13, 17, 23, 0.92);
    color: var(--text);
    font-size: 12px;
    line-height: 1.4;
    white-space: nowrap;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.26);
}

.image-edit-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.image-edit-field span {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.image-edit-prompt-input {
    width: 100%;
    min-height: 180px;
    resize: vertical;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.7;
    outline: none;
}

.image-edit-prompt-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.12);
}

.image-edit-tools {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.image-edit-tools .task-btn {
    min-height: 34px;
    color: #fff;
}

.image-edit-select-area.is-active {
    border-color: var(--accent);
    color: #fff;
}

.image-edit-clear-area:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
}

.image-edit-selection-hint {
    flex: 1 1 180px;
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.5;
}

.image-edit-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 18px;
    flex-wrap: wrap;
}

.image-edit-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

@media (max-width: 640px) {
    .image-edit-modal {
        padding: 12px;
    }

    .image-edit-content {
        padding: 18px;
    }

    .image-edit-body {
        grid-template-columns: 1fr;
    }

    .image-edit-preview {
        height: 260px;
    }

    .image-edit-tools {
        align-items: stretch;
    }

    .image-edit-tools .task-btn {
        flex: 1 1 120px;
        justify-content: center;
    }

    .image-edit-actions {
        justify-content: stretch;
    }

    .image-edit-actions .task-btn {
        flex: 1 1 140px;
        justify-content: center;
    }
}

/* ==================== 详情页结果图样式 ==================== */
.task-detail-result-image {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.task-detail-result-image img {
    max-width: 100%;
    max-height: 400px;
    object-fit: contain;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.task-detail-result-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* ==================== Toast 提示条 ==================== */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    min-width: 280px;
    max-width: 420px;
    padding: 14px 16px;
    border-radius: 12px;
    backdrop-filter: blur(20px);
    background: rgba(22, 27, 34, 0.9);
    border: 1px solid var(--border);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translateX(120%);
    opacity: 0;
    animation: toast-in 0.35s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.toast.hide {
    animation: toast-out 0.3s ease forwards;
}

.toast-icon {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    flex-shrink: 0;
}

.toast.success .toast-icon {
    background: var(--success);
    box-shadow: 0 0 12px var(--success);
}

.toast.error .toast-icon {
    background: var(--error);
    box-shadow: 0 0 12px var(--error);
}

.toast.warning .toast-icon {
    background: var(--warning);
    box-shadow: 0 0 12px var(--warning);
}

.toast.info .toast-icon {
    background: var(--accent);
    box-shadow: 0 0 12px var(--accent);
}

.toast-content {
    flex: 1;
}

.toast-message {
    font-size: 13px;
    line-height: 1.5;
}

@keyframes toast-in {
    from {
        transform: translateX(120%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes toast-out {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(120%);
        opacity: 0;
    }
}

/* ==================== 签到弹窗 ==================== */
.signin-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 20px;
    animation: signin-fadein 0.25s ease;
}

.signin-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
}

.signin-card {
    position: relative;
    z-index: 1;
    box-sizing: border-box;
    width: min(860px, calc(100vw - 40px));
    max-height: calc(100vh - 24px);
    overflow: hidden;
    background: linear-gradient(160deg, #1e1640 0%, #150f35 50%, #0d0a22 100%);
    border-radius: 20px;
    padding: 10px 22px 14px;
    border: 1px solid rgba(139, 92, 246, 0.35);
    box-shadow: 0 0 80px rgba(139, 92, 246, 0.25), 0 20px 60px rgba(0, 0, 0, 0.5);
    text-align: center;
    animation: signin-slidein 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.signin-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #8b949e;
    transition: background 0.15s, color 0.15s;
}
.signin-close:hover { background: rgba(255,255,255,0.12); color: #e6edf3; }

.signin-icon-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 8px;
}

.signin-top-image {
    width: auto;
    max-width: 100%;
    max-height: min(72vh, 680px);
    object-fit: contain;
    border-radius: 14px;
}

.signin-title {
    font-size: 20px;
    font-weight: 700;
    color: #e2d9f8;
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}

.signin-subtitle {
    font-size: 13px;
    color: #7c6fa0;
    margin-bottom: 24px;
}

.signin-days {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 8px;
}

.signin-day {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 4px 7px;
    border-radius: 12px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.07);
    transition: all 0.2s;
}

.signin-day.today {
    background: linear-gradient(160deg, rgba(139,92,246,0.35) 0%, rgba(109,40,217,0.25) 100%);
    border-color: rgba(139,92,246,0.6);
    box-shadow: 0 0 16px rgba(139,92,246,0.3);
}

.signin-day.done {
    background: rgba(139,92,246,0.12);
    border-color: rgba(139,92,246,0.25);
    opacity: 0.7;
}

.signin-day-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.signin-day.today .signin-day-icon {
    background: linear-gradient(135deg, #a78bfa, #7c3aed);
    box-shadow: 0 0 12px rgba(167,139,250,0.5);
}

.signin-day-points {
    font-size: 11px;
    font-weight: 600;
    color: #a78bfa;
}

.signin-day.today .signin-day-points { color: #c4b5fd; }

.signin-day-label {
    font-size: 10px;
    color: #6b6080;
}

.signin-day.today .signin-day-label { color: #9d8cc4; }

.signin-submit-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 50%, #5b21b6 100%);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    letter-spacing: 1px;
    transition: opacity 0.2s, transform 0.15s;
    box-shadow: 0 4px 20px rgba(109,40,217,0.45);
}
.signin-submit-btn:hover:not(:disabled) { opacity: 0.9; transform: translateY(-1px); }
.signin-submit-btn:active:not(:disabled) { transform: translateY(0); }
.signin-submit-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.signin-footer-tip {
    font-size: 12px;
    color: #5a4e78;
}

@media (max-width: 640px) {
    .signin-card {
        width: calc(100vw - 24px);
        padding: 12px 12px 14px;
    }

    .signin-top-image {
        max-height: 64vh;
    }

    .signin-days {
        gap: 6px;
    }

    .signin-day {
        padding: 8px 2px 7px;
    }

    .signin-day-icon {
        width: 24px;
        height: 24px;
    }
}

@keyframes signin-fadein {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes signin-slidein {
    from { opacity: 0; transform: scale(0.88) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

/* 联系客服 */
.contact-header {
    align-items: flex-start;
}

.contact-panel {
    display: grid;
    gap: 26px;
}

.contact-service-card {
    display: grid;
    justify-items: center;
    gap: 12px;
    padding: 16px 0 8px;
    text-align: center;
}

.contact-service-icon {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(35, 134, 54, 0.22);
    color: #3fb950;
}

.contact-service-icon svg {
    width: 24px;
    height: 24px;
}

.contact-service-card h3 {
    font-size: 20px;
    color: var(--text);
}

.contact-service-card p,
.contact-scan-tip {
    color: var(--text-muted);
    font-size: 14px;
}

.contact-qrcode {
    width: min(360px, 100%);
    aspect-ratio: 1 / 1;
    object-fit: contain;
    border-radius: 10px;
    background: #fff;
    border: 8px solid #fff;
}

.contact-tips {
    padding: 16px 18px;
    border: 1px solid rgba(35, 134, 54, 0.25);
    border-radius: 8px;
    background: rgba(35, 134, 54, 0.1);
}

.contact-tips strong {
    display: block;
    margin-bottom: 10px;
    color: #3fb950;
}

.contact-tips p {
    margin: 6px 0;
    color: var(--text-muted);
}

.contact-method-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.contact-method-card {
    display: grid;
    gap: 6px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-tertiary);
}

.contact-method-card span {
    color: var(--text-muted);
    font-size: 13px;
}

/* 邀请中心样式 */
.invite-code-display,
.invite-link-display {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.invite-code-value,
.invite-link-value {
    flex: 1;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 13px;
    font-family: 'Courier New', monospace;
    word-break: break-all;
}

.copy-btn {
    padding: 0 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.copy-btn:hover {
    background: var(--border-hover);
    border-color: var(--accent);
}

.invite-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

.invite-stat-item {
    text-align: center;
    padding: 16px;
    background: var(--bg-tertiary);
    border-radius: 8px;
}

.invite-stat-label {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.invite-stat-value {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: var(--accent);
}

.invite-rules {
    padding: 16px;
    background: rgba(35, 134, 54, 0.1);
    border: 1px solid rgba(35, 134, 54, 0.2);
    border-radius: 8px;
    font-size: 13px;
}

.invite-rules strong {
    display: block;
    color: var(--success);
    margin-bottom: 8px;
}

.invite-rules p {
    color: var(--text-muted);
    margin: 4px 0;
}

/* ==================== 灵感广场 ==================== */

/* 灵感广场按钮 */
.inspiration-btn {
    height: 28px;
    padding: 0 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: var(--text);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.inspiration-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent);
}

/* 灵感广场模态层 */
.inspiration-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.inspiration-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
}

.inspiration-content {
    position: relative;
    z-index: 1001;
    width: 1100px;
    max-width: 95vw;
    height: 80vh;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.42);
}

.inspiration-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--bg);
    color: var(--text-muted);
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 10;
}

.inspiration-close:hover {
    color: var(--text);
    border-color: var(--border-hover);
}

.inspiration-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.inspiration-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    margin: 0;
}

/* 分类标签 */
.inspiration-categories {
    padding: 12px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    gap: 8px;
    flex-shrink: 0;
    align-items: center;
}

.inspiration-search {
    margin-left: auto;
    flex-shrink: 0;
}

.search-input {
    width: 200px;
    padding: 6px 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    color: var(--text);
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s;
}

.search-input:focus {
    border-color: var(--accent);
}

.search-input::placeholder {
    color: var(--text-muted);
}

.category-btn {
    padding: 6px 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    color: var(--text-muted);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.category-btn:hover {
    border-color: var(--border-hover);
    color: var(--text);
}

.category-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

/* 下拉菜单 */
.category-dropdown {
    position: relative;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 8px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px;
    min-width: 140px;
    max-height: 300px;
    overflow-y: auto;
    display: none;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.dropdown-menu.show {
    display: block;
}

.dropdown-menu .category-btn {
    display: block;
    width: 100%;
    text-align: left;
    margin-bottom: 4px;
}

.dropdown-menu .category-btn:last-child {
    margin-bottom: 0;
}

/* 主体内容区 */
.inspiration-body {
    flex: 1;
    display: flex;
    overflow: hidden;
    height: calc(80vh - 60px);
}

/* 左侧网格 - 瀑布流布局 */
.inspiration-grid {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    border-right: 1px solid var(--border);
    max-height: calc(80vh - 100px);
}

.inspiration-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s;
    width: calc(50% - 8px);
    flex-shrink: 0;
}

.inspiration-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.inspiration-card.selected {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(88, 166, 255, 0.3);
}

.inspiration-card-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background: var(--bg-tertiary);
}

.inspiration-card-info {
    padding: 10px 12px;
}

.inspiration-card-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.inspiration-card-category {
    font-size: 12px;
    color: var(--text-muted);
}

/* 右侧预览 */
.inspiration-preview {
    width: 35%;
    min-width: 320px;
    padding: 20px;
    overflow-y: auto;
    background: var(--bg);
}

.preview-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-muted);
    font-size: 14px;
}

.preview-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.preview-image {
    width: 100%;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.preview-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}

.preview-category {
    display: inline-block;
    padding: 4px 10px;
    background: rgba(88, 166, 255, 0.15);
    border-radius: 12px;
    color: var(--accent);
    font-size: 12px;
    margin-bottom: 12px;
}

.preview-prompt {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
    max-height: 300px;
    overflow-y: auto;
}

.preview-prompt-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.preview-prompt-text {
    font-size: 13px;
    color: var(--text);
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
}

.preview-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.preview-tag {
    padding: 4px 10px;
    background: var(--bg-tertiary);
    border-radius: 12px;
    color: var(--text-muted);
    font-size: 11px;
}

.use-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #ff8c42, #ff6b35);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s;
}

.use-btn:hover {
    opacity: 0.9;
}

.preview-hint {
    text-align: center;
    padding: 12px;
    background: rgba(88, 166, 255, 0.1);
    border: 1px dashed var(--accent);
    border-radius: 8px;
    color: var(--accent);
    font-size: 13px;
    margin-top: 8px;
}

/* 闪烁动画 */
@keyframes flash {
    0%, 100% {
        background: transparent;
    }
    50% {
        background: rgba(88, 166, 255, 0.2);
    }
}

/* 参考图大图预览 */
.material-preview-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    padding: 40px;
}

.material-preview-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

/* ==================== 视频去水印 ==================== */
.video-watermark-header {
    align-items: flex-start;
}

.video-watermark-panel {
    display: grid;
    gap: 16px;
}

.watermark-platform-tabs {
    display: grid;
    grid-template-columns: repeat(6, minmax(90px, 1fr));
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg);
}

.watermark-platform {
    min-height: 52px;
    padding: 0 12px;
    border-right: 1px solid var(--border);
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 600;
}

.watermark-platform:last-child {
    border-right: none;
}

.watermark-platform.active {
    color: var(--text);
    background: rgba(88, 166, 255, 0.08);
}

.watermark-platform img {
    width: 22px;
    height: 22px;
    object-fit: contain;
    border-radius: 5px;
}

.watermark-textarea {
    min-height: 210px;
}

.watermark-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.watermark-submit {
    width: auto;
    min-width: 180px;
    margin-top: 0;
    margin-left: auto;
    padding: 11px 20px;
}

.watermark-submit svg {
    width: 16px;
    height: 16px;
}

.watermark-record-actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.watermark-record-group {
    display: grid;
    gap: 10px;
}

.watermark-record-group + .watermark-record-group {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.watermark-record-title {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
}

.watermark-result-list,
.watermark-history-list {
    display: grid;
    gap: 12px;
}

.watermark-result-card {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 14px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg);
}

.watermark-result-card.success {
    border-color: rgba(34, 197, 94, 0.32);
}

.watermark-result-card.failed {
    border-color: rgba(248, 81, 73, 0.32);
}

.watermark-cover {
    width: 150px;
    aspect-ratio: 16 / 10;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-tertiary);
    overflow: hidden;
    display: grid;
    place-items: center;
    color: var(--text-muted);
    font-weight: 700;
}

.watermark-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.watermark-result-main {
    min-width: 0;
    display: grid;
    gap: 10px;
}

.watermark-result-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.watermark-result-head strong {
    min-width: 0;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.watermark-result-head span,
.watermark-source,
.watermark-status-text {
    color: var(--text-muted);
    font-size: 12px;
}

.watermark-source {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.watermark-video-box {
    display: grid;
    gap: 10px;
}

.watermark-video-box video {
    width: min(520px, 100%);
    max-height: 320px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: #000;
}

.watermark-image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
    gap: 10px;
}

.watermark-image-grid a,
.watermark-more {
    aspect-ratio: 1 / 1;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-tertiary);
}

.watermark-image-grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.watermark-more {
    color: var(--text-muted);
    display: grid;
    place-items: center;
    padding: 10px;
    text-align: center;
}

.watermark-link-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.watermark-history-item {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr) 60px;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
}

.watermark-history-item span,
.watermark-history-item a {
    color: var(--text-muted);
    font-size: 12px;
}

.watermark-history-item strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 760px) {
    .watermark-platform-tabs {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .watermark-result-card {
        grid-template-columns: 1fr;
    }

    .watermark-cover {
        width: 100%;
    }

    .watermark-submit {
        width: 100%;
        margin-left: 0;
    }

    .watermark-record-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .watermark-history-item {
        grid-template-columns: 1fr;
    }
}
