﻿:root {
    --bg-primary: #000000;
    --bg-secondary: #09090b;
    --bg-sidebar: #09090b;
    --bg-input: #121214;
    --bg-hover: #18181b;
    --bg-active: #27272a;
    --border-color: rgba(255, 255, 255, 0.1);
    --border-light: rgba(255, 255, 255, 0.05);
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    --accent: #00D8FF;
    --accent-hover: #33E1FF;
    --accent-light: rgba(0, 216, 255, 0.15);
    --danger: #ef4444;
    --success: #10b981;
    --thinking-color: #fbbf24;
    --search-color: #34d399;
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.8);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --transition: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

body.chat-shell {
    background: #000;
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
}

.app-container {
    display: flex;
    height: 100vh;
    position: relative;
    overflow: hidden;
    background: #000000;
    color: var(--text-primary);
}

.app-container::before {
    display: none;
}

.sidebar {
    width: 300px;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    transition: transform 0.3s ease;
    z-index: 100;
    box-shadow: 20px 0 60px rgba(0, 0, 0, 0.28);
}

.sidebar-header {
    padding: 18px 20px 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: transparent;
}

.nav-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    text-decoration: none;
    flex: 1;
}

.logo-img {
    height: 44px;
    width: auto;
    position: relative;
    z-index: 2;
    mix-blend-mode: screen;
}

.logo-text {
    color: #fff;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 1px;
    position: relative;
    z-index: 1;
    margin-left: -8px;
    transform: skewX(-12deg);
}

.toggle-sidebar {
    font-size: 20px;
    color: var(--text-secondary);
    display: none;
    width: 40px;
    height: 40px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
}

.apikey-section {
    padding: 12px 16px 14px;
    border-bottom: 1px solid var(--border-color);
}

.key-config-card {
    padding: 10px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: #09090b;
}

.apikey-section.platform-mode .key-config-card {
    border-color: rgba(255, 255, 255, 0.09);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.apikey-section.byok-mode .key-config-card {
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.key-config-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 38px 12px 14px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 14px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    min-width: 0;
}

.key-config-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.02) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.key-config-btn:hover {
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(255,255,255,0.02);
    transform: translateY(-1px);
}

.key-config-btn:hover::before {
    opacity: 1;
}

.key-config-btn:active {
    transform: translateY(0);
}

.key-config-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0.06) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.key-config-btn:hover .key-config-icon {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.24) 0%, rgba(255, 255, 255, 0.14) 100%);
    color: #ffffff;
    box-shadow: 0 8px 24px rgba(255, 255, 255, 0.16);
}

.key-config-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.key-config-title-row {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    min-width: 0;
    flex-wrap: nowrap;
}

.key-config-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    transition: color 0.3s ease;
    flex: 0 0 auto;
    white-space: nowrap;
    line-height: 1.2;
}

.key-config-btn:hover .key-config-title {
    color: var(--accent);
}

.key-config-status {
    font-size: 11px;
    color: var(--text-secondary);
    transition: color 0.3s ease;
    line-height: 1.4;
    display: block;
    text-align: left;
    word-break: break-word;
}

.key-config-btn:hover .key-config-status {
    color: var(--text-secondary);
}

.key-config-arrow {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    flex: 0 0 20px;
    transition: all 0.3s ease;
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
    margin-left: 0;
}

.key-config-btn:hover .key-config-arrow {
    color: var(--accent);
    transform: translateY(-50%) translateX(1px);
}

.tool-btn.asset-selector-trigger {
    gap: 8px;
    padding: 0 14px;
    width: auto;
    min-width: 78px;
}

.tool-btn.asset-selector-trigger span {
    font-size: 13px;
    line-height: 1;
}

body.asset-selector-open {
    overflow: hidden;
}

.asset-selector-modal {
    position: fixed;
    inset: 0;
    z-index: 1400;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    transition: opacity 0.26s ease;
}

.role-manager-modal {
    position: fixed;
    inset: 0;
    z-index: 1410;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    transition: opacity 0.26s ease;
}

.asset-selector-modal.is-visible,
.role-manager-modal.is-visible {
    opacity: 1;
}

.asset-selector-backdrop,
.role-manager-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(14px);
    opacity: 0;
    transition: opacity 0.28s ease;
}

.asset-selector-modal.is-visible .asset-selector-backdrop,
.role-manager-modal.is-visible .role-manager-backdrop {
    opacity: 1;
}

.asset-selector-panel,
.role-manager-panel {
    position: relative;
    width: min(980px, calc(100vw - 32px));
    max-height: min(86vh, 900px);
    display: flex;
    flex-direction: column;
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02)),
        rgba(9, 9, 11, 0.97);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.48);
    overflow: hidden;
    opacity: 0;
    transform: translateY(18px) scale(0.975);
    transform-origin: center bottom;
    transition: opacity 0.32s cubic-bezier(0.16, 1, 0.3, 1), transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform, opacity;
}

.role-manager-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    padding: 28px 28px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.role-manager-heading h3 {
    margin: 4px 0 8px;
    font-size: 28px;
    line-height: 1.1;
    color: #fff;
}

.role-manager-heading p {
    margin: 0;
    color: rgba(255, 255, 255, 0.62);
    font-size: 14px;
}

.role-manager-kicker {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(120, 119, 255, 0.12);
    color: #c7c8ff;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.role-manager-close {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    color: rgba(255, 255, 255, 0.78);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition);
}

.role-manager-close:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.06);
}

.role-manager-tabs {
    display: flex;
    gap: 10px;
    padding: 18px 28px 12px;
}

.role-manager-tab {
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    color: rgba(255, 255, 255, 0.7);
    border-radius: 999px;
    padding: 9px 16px;
    font-size: 13px;
    cursor: pointer;
    transition: all var(--transition);
}

.role-manager-tab.active,
.role-manager-tab:hover {
    color: #fff;
    border-color: rgba(120, 119, 255, 0.25);
    background: rgba(120, 119, 255, 0.12);
}

.role-manager-pane {
    display: none;
    padding: 0 28px 28px;
    overflow: auto;
}

.role-manager-pane.is-active {
    display: block;
}

.role-manager-current {
    margin-bottom: 18px;
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.role-manager-current-text {
    color: rgba(255, 255, 255, 0.82);
    font-size: 14px;
}

.role-manager-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.role-card {
    padding: 18px;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    transition: transform var(--transition), border-color var(--transition), background var(--transition);
}

.role-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.045);
}

.role-card.is-active {
    border-color: rgba(120, 119, 255, 0.28);
    box-shadow: 0 0 0 1px rgba(120, 119, 255, 0.08);
}

.role-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.role-card-title-wrap {
    min-width: 0;
}

.role-card-title {
    margin: 0;
    color: #fff;
    font-size: 16px;
    line-height: 1.4;
}

.role-card-desc {
    margin: 8px 0 0;
    color: rgba(255, 255, 255, 0.54);
    font-size: 13px;
    line-height: 1.6;
}

.role-card-prompt {
    margin: 14px 0 0;
    padding: 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.72);
    font-size: 13px;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.role-card-actions {
    margin-top: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.role-primary-btn,
.role-secondary-btn,
.role-ghost-btn {
    appearance: none;
    border-radius: 14px;
    font-size: 13px;
    cursor: pointer;
    transition: all var(--transition);
}

.role-primary-btn {
    border: 1px solid rgba(120, 119, 255, 0.3);
    background: rgba(120, 119, 255, 0.16);
    color: #e2e2ff;
    padding: 10px 16px;
}

.role-primary-btn:hover {
    background: rgba(120, 119, 255, 0.24);
    border-color: rgba(120, 119, 255, 0.42);
    color: #fff;
}

.role-secondary-btn,
.role-ghost-btn {
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    color: rgba(255, 255, 255, 0.82);
    padding: 10px 16px;
}

.role-secondary-btn:hover,
.role-ghost-btn:hover {
    border-color: rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.role-danger-btn {
    border: 1px solid rgba(255, 107, 129, 0.18);
    background: rgba(255, 107, 129, 0.05);
    color: rgba(255, 170, 176, 0.94);
}

.role-danger-btn:hover {
    color: #fff1f3;
    border-color: rgba(255, 107, 129, 0.34);
    background: rgba(255, 107, 129, 0.14);
}

.role-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.role-form-field {
    display: flex;
    flex-direction: column;
    gap: 10px;
    color: rgba(255, 255, 255, 0.84);
    font-size: 13px;
}

.role-form-field-full {
    margin-top: 16px;
}

.role-form-field input,
.role-form-field textarea {
    width: 100%;
    box-sizing: border-box;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    color: #fff;
    padding: 14px 16px;
    font-size: 14px;
    outline: none;
    transition: border-color var(--transition), background var(--transition);
}

.role-form-field input:focus,
.role-form-field textarea:focus {
    border-color: rgba(120, 119, 255, 0.34);
    background: rgba(255, 255, 255, 0.05);
}

.role-form-field textarea {
    min-height: 220px;
    resize: vertical;
    line-height: 1.7;
}

.role-form-actions {
    margin-top: 18px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.asset-selector-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.68);
    backdrop-filter: blur(14px);
}

.asset-selector-panel {
    position: relative;
    width: min(1120px, calc(100vw - 32px));
    max-height: min(86vh, 900px);
    display: flex;
    flex-direction: column;
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02)),
        rgba(9, 9, 11, 0.96);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.48);
    overflow: hidden;
    opacity: 0;
    transform: translateY(18px) scale(0.975);
    transform-origin: center bottom;
    transition: opacity 0.32s cubic-bezier(0.16, 1, 0.3, 1), transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform, opacity;
}

.asset-selector-modal.is-visible .asset-selector-panel,
.role-manager-modal.is-visible .role-manager-panel {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.asset-selector-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    padding: 28px 28px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.asset-selector-heading h3 {
    margin: 4px 0 8px;
    font-size: 28px;
    line-height: 1.1;
    color: #fff;
}

.asset-selector-heading p {
    margin: 0;
    color: rgba(255, 255, 255, 0.62);
    font-size: 14px;
}

.asset-selector-kicker {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(0, 216, 255, 0.1);
    color: #85ebff;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.asset-selector-close {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    color: rgba(255, 255, 255, 0.78);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition);
}

.asset-selector-close:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.06);
}

.asset-selector-head-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.asset-head-btn {
    height: 42px;
    padding: 0 16px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
    color: rgba(255, 255, 255, 0.84);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
}

.asset-head-btn:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.06);
}

.asset-head-btn.primary {
    color: #07131a;
    background: linear-gradient(135deg, #c6f4ff 0%, #72e9ff 100%);
    border-color: rgba(114, 233, 255, 0.45);
}

.asset-selector-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 28px 12px;
}

.asset-selector-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.asset-selector-tab {
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    color: rgba(255, 255, 255, 0.7);
    border-radius: 999px;
    padding: 9px 16px;
    font-size: 13px;
    cursor: pointer;
    transition: all var(--transition);
}

.asset-selector-tab.active,
.asset-selector-tab:hover {
    color: #fff;
    border-color: rgba(0, 216, 255, 0.25);
    background: rgba(0, 216, 255, 0.12);
}

.asset-selector-search {
    min-width: 280px;
    max-width: 380px;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    height: 46px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    color: rgba(255, 255, 255, 0.7);
}

.asset-selector-search input {
    flex: 1;
    background: transparent;
    border: 0;
    outline: 0;
    color: #fff;
    font-size: 14px;
}

.asset-selector-search input::placeholder {
    color: rgba(255, 255, 255, 0.32);
}

.asset-selector-summary {
    padding: 0 28px 18px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
}

.asset-selector-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 0 28px 16px;
}

.asset-selector-tab.is-category {
    padding: 8px 14px;
    font-size: 12px;
}

.asset-selector-body {
    padding: 0 28px 28px;
    overflow: auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.asset-card {
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    overflow: hidden;
    transition: transform var(--transition), border-color var(--transition), background var(--transition);
}

.asset-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.045);
}

.asset-card-media {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    min-height: 180px;
}

.asset-card-thumb-wrap {
    position: relative;
    background: rgba(255, 255, 255, 0.03);
}

.asset-card-thumb,
.asset-card-thumb-empty {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.asset-card-thumb-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.35);
    font-size: 13px;
}

.asset-kind-chip {
    position: absolute;
    top: 14px;
    left: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 11px;
    color: #fff;
    background: rgba(0, 0, 0, 0.42);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
}

.asset-card-content,
.asset-card-chat {
    padding: 18px;
}

.asset-card-chat .asset-kind-chip {
    position: static;
}

.asset-kind-chip.is-inline {
    position: static;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.88);
    border-color: rgba(255, 255, 255, 0.08);
    backdrop-filter: none;
}

.asset-card-prompt {
    padding: 18px;
    min-height: 220px;
    display: flex;
    flex-direction: column;
}

.asset-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.asset-card-model,
.asset-time,
.asset-card-meta {
    color: rgba(255, 255, 255, 0.48);
    font-size: 12px;
}

.asset-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
}

.asset-card-title {
    margin: 0;
    color: #fff;
    font-size: 15px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.asset-card-desc {
    margin: 12px 0 0;
    color: rgba(255, 255, 255, 0.62);
    font-size: 13px;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.asset-card-meta {
    margin-top: 12px;
}

.asset-expiry-text {
    color: #fcd34d;
    font-weight: 600;
}

.asset-card-actions {
    margin-top: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.asset-action-btn {
    appearance: none;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    color: rgba(255, 255, 255, 0.82);
    border-radius: 14px;
    padding: 10px 14px;
    font-size: 13px;
    cursor: pointer;
    transition: all var(--transition);
}

.asset-action-btn:hover {
    border-color: rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.asset-action-btn.primary {
    background: rgba(0, 216, 255, 0.12);
    border-color: rgba(0, 216, 255, 0.2);
    color: #9defff;
}

.asset-action-btn.primary:hover {
    background: rgba(0, 216, 255, 0.18);
    border-color: rgba(0, 216, 255, 0.32);
    color: #fff;
}

.asset-action-btn.is-disabled,
.asset-action-btn.is-disabled:hover {
    color: rgba(255, 255, 255, 0.38);
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    cursor: not-allowed;
}

.asset-action-btn.asset-action-danger {
    color: rgba(255, 170, 176, 0.94);
    border-color: rgba(255, 107, 129, 0.18);
    background: rgba(255, 107, 129, 0.05);
}

.asset-action-btn.asset-action-danger:hover {
    color: #fff1f3;
    border-color: rgba(255, 107, 129, 0.34);
    background: rgba(255, 107, 129, 0.14);
}

.asset-card-upload .asset-card-thumb-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 35%, rgba(0, 0, 0, 0.2) 100%);
    pointer-events: none;
}

.asset-selector-empty {
    min-height: 280px;
    border-radius: 22px;
    border: 1px dashed rgba(255, 255, 255, 0.12);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    color: rgba(255, 255, 255, 0.54);
    background: rgba(255, 255, 255, 0.02);
    grid-column: 1 / -1;
}

.asset-selector-empty p {
    margin: 0;
    font-size: 14px;
}

.asset-selector-empty-icon {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.asset-editor-modal {
    position: fixed;
    inset: 0;
    z-index: 1450;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    transition: opacity 0.24s ease;
}

.asset-editor-modal.is-visible {
    opacity: 1;
}

.asset-editor-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(3, 5, 10, 0.74);
    backdrop-filter: blur(18px);
    opacity: 0;
    transition: opacity 0.24s ease;
}

.asset-editor-modal.is-visible .asset-editor-backdrop {
    opacity: 1;
}

.asset-editor-panel {
    position: relative;
    width: min(920px, 100%);
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(180deg, rgba(19, 22, 31, 0.98), rgba(10, 12, 18, 0.96));
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.45);
    transform: translateY(16px) scale(0.98);
    opacity: 0;
    transition: transform 0.24s ease, opacity 0.24s ease;
    overflow: hidden;
}

.asset-editor-modal.is-visible .asset-editor-panel {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.asset-editor-header,
.asset-editor-actions {
    padding: 24px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.asset-editor-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.asset-editor-kicker {
    display: inline-block;
    margin-bottom: 8px;
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #818cf8;
}

.asset-editor-header h3 {
    margin: 0;
    font-size: 24px;
    color: #fff;
}

.asset-editor-subtitle {
    margin: 8px 0 0;
    color: rgba(255, 255, 255, 0.56);
    font-size: 14px;
}

.asset-editor-body {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 24px;
    padding: 28px;
}

.asset-editor-preview {
    min-height: 360px;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.03);
    position: relative;
}

.asset-editor-preview.is-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.asset-editor-preview-media {
    width: 100%;
    height: 100%;
    min-height: 360px;
    object-fit: cover;
    display: block;
}

.asset-editor-preview-meta {
    position: absolute;
    left: 14px;
    bottom: 14px;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(12, 14, 20, 0.76);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 12px;
}

.asset-editor-picker {
    width: 100%;
    min-height: 312px;
    border-radius: 18px;
    border: 1px dashed rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.02);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
    padding: 18px;
}

.asset-editor-picker p {
    margin: 0;
    font-size: 14px;
    line-height: 1.7;
}

.asset-editor-picker-btn {
    height: 40px;
    padding: 0 18px;
    border-radius: 999px;
    border: 1px solid rgba(129, 140, 248, 0.32);
    background: rgba(99, 102, 241, 0.14);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
}

.asset-editor-picker-btn:hover {
    background: rgba(99, 102, 241, 0.22);
    border-color: rgba(129, 140, 248, 0.48);
}

.asset-editor-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.asset-editor-field {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.asset-editor-field > span {
    color: rgba(255, 255, 255, 0.84);
    font-size: 14px;
    font-weight: 600;
}

.asset-editor-field input,
.asset-editor-field textarea {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
    padding: 14px 16px;
    font-size: 14px;
    outline: none;
    resize: vertical;
}

.asset-editor-field input:focus,
.asset-editor-field textarea:focus {
    border-color: rgba(129, 140, 248, 0.35);
}

.asset-editor-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.asset-editor-category-chip {
    height: 38px;
    padding: 0 16px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    color: rgba(255, 255, 255, 0.68);
    font-size: 13px;
    cursor: pointer;
    transition: all var(--transition);
}

.asset-editor-category-chip.active,
.asset-editor-category-chip:hover {
    color: #fff;
    border-color: rgba(129, 140, 248, 0.3);
    background: rgba(99, 102, 241, 0.14);
}

.asset-editor-actions {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    justify-content: flex-end;
}

@media (max-width: 960px) {
    .role-manager-panel {
        width: calc(100vw - 20px);
        max-height: 90vh;
        border-radius: 22px;
    }

    .role-manager-list,
    .role-form-grid {
        grid-template-columns: 1fr;
    }

    .asset-selector-panel {
        width: calc(100vw - 20px);
        max-height: 90vh;
        border-radius: 22px;
    }

    .asset-selector-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .asset-selector-header {
        flex-wrap: wrap;
    }

    .asset-selector-head-actions {
        order: 3;
        width: 100%;
        margin-left: 0;
    }

    .asset-selector-search {
        max-width: none;
        min-width: 0;
    }

    .asset-selector-body {
        grid-template-columns: 1fr;
    }

    .asset-card-media {
        grid-template-columns: 1fr;
    }

    .asset-card-thumb-wrap {
        min-height: 220px;
    }
    .asset-editor-panel {
        width: calc(100vw - 20px);
        max-height: 90vh;
        border-radius: 22px;
    }
    .asset-editor-body {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .role-manager-modal {
        padding: 10px;
    }

    .role-manager-header,
    .role-manager-tabs,
    .role-manager-pane {
        padding-left: 16px;
        padding-right: 16px;
    }

    .role-manager-header {
        padding-top: 18px;
    }

    .role-manager-current,
    .role-form-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .asset-selector-modal {
        padding: 10px;
    }

    .asset-selector-header,
    .asset-selector-toolbar,
    .asset-selector-categories,
    .asset-selector-summary,
    .asset-selector-body {
        padding-left: 16px;
        padding-right: 16px;
    }

    .asset-selector-header {
        padding-top: 18px;
    }

    .asset-selector-body {
        padding-bottom: 16px;
    }

    .asset-selector-heading h3 {
        font-size: 24px;
    }

    .asset-selector-head-actions {
        flex-direction: column;
    }

    .asset-head-btn {
        width: 100%;
    }
    .asset-editor-modal {
        padding: 10px;
    }
    .asset-editor-header,
    .asset-editor-body,
    .asset-editor-actions {
        padding-left: 16px;
        padding-right: 16px;
    }
    .asset-editor-body {
        padding-top: 18px;
        padding-bottom: 18px;
    }
    .asset-editor-preview,
    .asset-editor-preview-media {
        min-height: 220px;
    }
}

.key-config-btn.has-key {
    border-color: rgba(16, 185, 129, 0.3);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.03) 0%, var(--bg-secondary) 100%);
}

.key-config-btn.has-key .key-config-icon {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(16, 185, 129, 0.05) 100%);
    color: var(--success);
}

.key-config-btn.has-key:hover .key-config-icon {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    color: var(--text-primary);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
}

.key-config-btn.has-key:hover {
    border-color: var(--success);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.1), 0 0 0 3px rgba(16, 185, 129, 0.06);
}

.usage-mode-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 0 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    color: var(--accent);
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.14);
    white-space: nowrap;
    flex: 0 0 auto;
    margin-left: auto;
    max-width: 88px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.apikey-section.byok-mode .usage-mode-chip {
    color: #b45309;
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.18);
}

.mode-switch-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    margin-top: 6px;
    background: rgba(255, 255, 255, 0.03);
    padding: 4px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.mode-switch-btn {
    min-height: 32px;
    padding: 0 10px;
    border-radius: 6px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s ease;
    cursor: pointer;
}

.mode-switch-btn:hover {
    border-color: rgba(255, 255, 255, 0.16);
    color: var(--text-primary);
    background: rgba(255,255,255,0.06);
}

.mode-switch-btn.active {
    color: #f8fdff;
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.12);
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

.apikey-section.byok-mode .mode-switch-btn.active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.18);
}

.usage-mode-desc {
    margin-top: 10px;
    font-size: 12px;
    line-height: 1.5;
    color: var(--text-secondary);
    padding: 0 2px;
}

.route-section {
    display: none !important;
}

.route-card {
    padding: 12px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: #09090b;
}

.route-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.route-card-title-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex-wrap: wrap;
}

.route-card-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.route-mode-chip,
.route-card-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 0 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.route-trigger-btn {
    gap: 6px;
    height: 34px;
    padding: 0 12px 0 9px;
    min-width: 0;
    border-radius: 0;
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
}

.route-trigger-btn:hover {
    border-color: rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.08);
}

.route-trigger-btn.active {
    background: rgba(0, 216, 255, 0.08);
    border-color: rgba(0, 216, 255, 0.25);
    color: var(--accent);
}

.route-trigger-icon {
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: rgba(255, 255, 255, 0.78);
}

.route-trigger-icon.icon-purple { color: #d946ef; }
.route-trigger-icon.icon-yellow { color: #eab308; }
.route-trigger-icon.icon-blue { color: #3b82f6; }
.route-trigger-icon.icon-green { color: #22c55e; }
.route-trigger-icon.is-channel { color: rgba(255, 255, 255, 0.78); }

.route-trigger-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
    line-height: 1.2;
}

.route-trigger-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
}

.route-trigger-price {
    font-size: 10px;
    color: var(--text-secondary);
}

.route-mode-chip {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.route-card-badge {
    color: var(--success);
    background: rgba(52, 211, 153, 0.1);
    border: 1px solid rgba(52, 211, 153, 0.16);
}

.route-card-status {
    margin-top: 10px;
    font-size: 12px;
    line-height: 1.5;
    color: var(--text-primary);
}

.route-switch-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 10px;
}

.route-switch-btn {
    min-height: 38px;
    padding: 0 10px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255,255,255,0.04);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    transition: all 0.22s ease;
    cursor: pointer;
}

.route-switch-btn:hover {
    border-color: rgba(255, 255, 255, 0.16);
    color: var(--text-primary);
    background: rgba(255,255,255,0.08);
}

.route-switch-btn.active {
    color: #000000;
    border-color: transparent;
    background: var(--accent);
    box-shadow: 0 4px 16px rgba(0, 216, 255, 0.3);
}

.route-switch-btn:disabled {
    cursor: not-allowed;
    opacity: 0.55;
    box-shadow: none;
}

.route-strategy-desc {
    margin-top: 10px;
    font-size: 12px;
    line-height: 1.5;
    color: var(--text-secondary);
    padding: 0 2px;
}

.model-tabs {
    display: flex;
    gap: 0;
    padding: 6px;
    margin: 12px 14px 8px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.tab-item {
    flex: 1;
    text-align: center;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    background-color: transparent;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
    border: none;
}

.tab-item:hover {
    background-color: transparent;
    color: rgba(255, 255, 255, 0.85);
}

.tab-item.active {
    background: #fff;
    color: #000;
    border: none;
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.15);
}

.model-search-wrap {
    margin: 0 14px 8px;
    position: relative;
}

.model-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.4);
    pointer-events: none;
}

.model-search-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 8px 12px 8px 34px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 12px;
    transition: all 0.3s ease;
    outline: none;
    box-sizing: border-box;
}

.model-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px 12px;
    min-height: 280px;
}

.model-list::-webkit-scrollbar {
    width: 4px;
}

.model-list::-webkit-scrollbar-track {
    background: transparent;
}

.model-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.14);
    border-radius: 4px;
}

.model-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.22);
}

.model-list {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.14) transparent;
}

.model-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    background: transparent;
    position: relative;
    overflow: hidden;
    margin-bottom: 4px;
}

.model-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%) scaleY(0);
    width: 3px;
    height: 60%;
    border-radius: 0 3px 3px 0;
    background: #ffffff;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.model-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.model-item:hover::before {
    transform: translateY(-50%) scaleY(1);
}

.model-item.active {
    background: rgba(0, 216, 255, 0.05);
    border-color: rgba(0, 216, 255, 0.2);
}

.model-item.active::before {
    transform: translateY(-50%) scaleY(1);
    background: var(--accent);
}

.model-icon-small {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
    overflow: hidden;
    border: none;
}

.model-item:hover .model-icon-small {
    transform: scale(1.05);
    box-shadow: none;
}

.model-item.active .model-icon-small {
    border: none;
    box-shadow: none;
}

.model-icon-img {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.model-icon-img.is-openai-white,
.model-selector-icon.is-openai-white,
.model-info-icon.is-openai-white {
    filter: brightness(0) invert(1);
}

.model-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.model-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.model-desc {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.model-badge {
    font-size: 9px;
    padding: 2px 7px;
    border-radius: 6px;
    flex-shrink: 0;
    font-weight: 800;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    line-height: 1.2;
    white-space: nowrap;
    text-transform: uppercase;
}

.badge-icon {
    flex-shrink: 0;
}

.badge-fire {
    animation: fireFlicker 0.8s ease-in-out infinite alternate;
    filter: drop-shadow(0 0 4px rgba(255, 100, 0, 0.8)) brightness(1.2);
}

/* HOT - 珊瑚橙红 */
.badge-hot {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(220, 38, 38, 0.05) 100%);
    color: #ff5a5f;
    border: 1px solid rgba(239, 68, 68, 0.25);
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.1);
}

/* NEW - 极光紫电光蓝 */
.badge-new {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.15) 0%, rgba(139, 92, 246, 0.05) 100%);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.25);
    box-shadow: 0 0 8px rgba(168, 85, 247, 0.1);
}

/* PICK - 迈巴赫香槟金 */
.badge-pick {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(217, 119, 6, 0.05) 100%);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.25);
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.1);
}

@keyframes fireFlicker {
    0% {
        transform: scale(1) rotate(0deg);
        filter: drop-shadow(0 0 4px rgba(255, 100, 0, 0.8)) brightness(1.2);
    }

    25% {
        transform: scale(1.1) rotate(-3deg);
        filter: drop-shadow(0 0 6px rgba(255, 80, 0, 0.9)) brightness(1.3);
    }

    50% {
        transform: scale(0.95) rotate(2deg);
        filter: drop-shadow(0 0 5px rgba(255, 120, 0, 0.8)) brightness(1.1);
    }

    75% {
        transform: scale(1.05) rotate(-1deg);
        filter: drop-shadow(0 0 7px rgba(255, 60, 0, 1)) brightness(1.4);
    }

    100% {
        transform: scale(1.1) rotate(3deg);
        filter: drop-shadow(0 0 6px rgba(255, 90, 0, 0.9)) brightness(1.3);
    }

}

@keyframes hotPulse {
    0%, 100% {
        box-shadow: 0 0 6px rgba(255, 77, 79, 0.4);
    }

    50% {
        box-shadow: 0 0 12px rgba(255, 77, 79, 0.6);
    }

}

.model-caps {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 6px;
}

.cap-tag {
    font-size: 9px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
    white-space: nowrap;
    line-height: 1.2;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
}

.model-item:hover .cap-tag {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.8);
    border-color: rgba(255, 255, 255, 0.15);
}

.sidebar-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--border-color);
    text-align: center;
    font-size: 11px;
    color: var(--text-muted);
    background: linear-gradient(180deg, transparent 0%, rgba(255, 255, 255, 0.04) 100%);
}

/* 钱包余额显示（侧边栏底部，仅平台计费模式） */
/* === 侧边栏底部钱包卡片 === */
.wallet-user-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: linear-gradient(135deg, rgba(0, 216, 255, 0.08) 0%, rgba(102, 126, 234, 0.08) 100%);
    border-radius: 12px;
    border: 1px solid rgba(0, 216, 255, 0.2);
    margin-bottom: 4px;
    transition: all 0.3s ease;
}
.wallet-user-card:hover {
    border-color: rgba(0, 216, 255, 0.45);
    background: linear-gradient(135deg, rgba(0, 216, 255, 0.14) 0%, rgba(102, 126, 234, 0.14) 100%);
    box-shadow: 0 4px 18px rgba(0, 216, 255, 0.12);
}
/* 头像容器：始终可见的青紫渐变背景，避免无图时出现空白 */
.wallet-avatar-wrap {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(135deg, #00D8FF 0%, #667eea 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 2px rgba(0, 216, 255, 0.25), 0 2px 8px rgba(0, 216, 255, 0.2);
}
.wallet-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.wallet-avatar-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.5px;
}
/* 信息区域：名称 + 余额，紧贴头像右侧 */
.wallet-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 2px;
    flex: 1;
    min-width: 0;
    text-align: left;
    line-height: 1.2;
}
.wallet-name {
    font-size: 13px;
    color: #fff;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
    max-width: 100%;
}
.wallet-amount-wrap {
    display: flex;
    align-items: baseline;
    gap: 2px;
    font-size: 12px;
    color: var(--accent);
    line-height: 1.2;
}
.wallet-icon {
    font-size: 11px;
    font-weight: 600;
    color: #FFD66E;
    opacity: 0.95;
    text-shadow: 0 0 6px rgba(255, 214, 110, 0.4);
}
.wallet-amount {
    font-size: 14px;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 0.3px;
}
.wallet-recharge-btn {
    position: relative;
    background: linear-gradient(135deg, #00D8FF 0%, #33E1FF 100%);
    border: none;
    color: #001018;
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 216, 255, 0.3);
    letter-spacing: 0.5px;
}
.wallet-recharge-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0, 216, 255, 0.5);
    background: linear-gradient(135deg, #33E1FF 0%, #66E9FF 100%);
}
.wallet-recharge-btn:active {
    transform: translateY(0);
}
.wallet-recharge-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ff4d4f;
    color: #fff;
    font-size: 10px;
    padding: 2px 5px;
    border-radius: 8px;
    white-space: nowrap;
    transform: scale(0.9);
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(255, 77, 79, 0.4);
}

/* ===== Sidebar Conversation List ===== */
.conv-section {
    border-top: 1px solid var(--border-color);
    max-height: 22vh;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0%, transparent 100%);
}

.conv-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px 6px;
}

.conv-section-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.conv-new-btn {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    cursor: pointer;
    padding: 3px 6px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}

.conv-new-btn:hover {
    background: rgba(0, 216, 255, 0.1);
    border-color: rgba(0, 216, 255, 0.3);
    color: var(--accent);
}

.conv-list {
    overflow-y: auto;
    padding: 4px 8px 8px;
    flex: 1;
}

.conv-list::-webkit-scrollbar {
    width: 3px;
}

.conv-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.14);
    border-radius: 3px;
}

.conv-list {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.14) transparent;
}

.conv-item {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
    gap: 8px;
    position: relative;
}

.conv-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.conv-item.active {
    background: rgba(0, 216, 255, 0.1);
    border-left: 2px solid var(--accent);
}

.conv-item-icon {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    color: var(--text-muted);
}

.conv-item.active .conv-item-icon {
    color: var(--accent);
}

.conv-item-info {
    flex: 1;
    min-width: 0;
}

.conv-item-title {
    font-size: 13px;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
}

.conv-item.active .conv-item-title {
    color: var(--accent);
    font-weight: 500;
}

.conv-item-time {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 1px;
}

.conv-item-delete {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 3px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all var(--transition);
    flex-shrink: 0;
}

.conv-item:hover .conv-item-delete {
    opacity: 1;
}

.conv-item-delete:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.12);
}

.conv-empty {
    padding: 16px;
    text-align: center;
    color: var(--text-muted);
    font-size: 12px;
}

/* ===== Toast Notifications ===== */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: #1e293b;
    color: #f1f5f9;
    border-radius: var(--radius-sm);
    font-size: 14px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    pointer-events: auto;
    animation: toastIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    max-width: 360px;
}

.toast.toast-out {
    animation: toastOut 0.25s ease forwards;
}

.toast-icon {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
}

.toast.success .toast-icon { color: #10b981; }
.toast.error .toast-icon { color: #ef4444; }
.toast.warning .toast-icon { color: #f59e0b; }
.toast.info .toast-icon { color: #ffffff; }

@keyframes toastIn {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes toastOut {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(40px); }
}

/* ===== Confirm Modal ===== */
.confirm-modal {
    z-index: 2000 !important;
}

.confirm-modal-content {
    max-width: 420px;
    width: 90%;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15), 0 8px 24px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    z-index: 2001;
    animation: confirmModalIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes confirmModalIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.confirm-header {
    padding: 32px 32px 0;
    text-align: center;
}

.confirm-icon {
    margin: 0 auto 20px;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f59e0b;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.2);
    animation: confirmIconIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}

.confirm-modal.danger .confirm-icon {
    color: #ef4444;
    background: linear-gradient(135deg, #fef2f2 0%, #fecaca 100%);
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.2);
}

@keyframes confirmIconIn {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.confirm-header h3 {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    animation: confirmFadeIn 0.3s ease 0.15s both;
}

.confirm-body {
    padding: 0 32px 24px;
    text-align: center;
    animation: confirmFadeIn 0.3s ease 0.2s both;
}

.confirm-body p {
    margin: 0;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.confirm-footer {
    display: flex;
    gap: 12px;
    padding: 0 32px 32px;
    animation: confirmFadeIn 0.3s ease 0.25s both;
}

@keyframes confirmFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.confirm-btn-cancel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 20px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.confirm-btn-cancel:hover {
    background: var(--bg-hover);
    border-color: var(--text-muted);
    transform: translateY(-1px);
}

.confirm-btn-ok {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 20px;
    border-radius: var(--radius-md);
    border: none;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

.confirm-btn-ok:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.35);
}

.confirm-modal.danger .confirm-btn-ok {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.25);
}

.confirm-modal.danger .confirm-btn-ok:hover {
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.35);
}

/* ===== Model Switch Transition ===== */
.content-area.fade-out {
    opacity: 0;
    transition: opacity 0.12s ease;
}

.content-area.fade-in {
    opacity: 1;
    transition: opacity 0.2s ease;
}

/* ===== Code Block Collapse ===== */
.code-block.collapsed pre {
    max-height: 300px;
    overflow: hidden;
    position: relative;
}

.code-block.collapsed pre::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(transparent, #1e293b);
    pointer-events: none;
}

.code-expand-btn {
    width: 100%;
    padding: 8px;
    background: #334155;
    color: #94a3b8;
    border: none;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    display: none;
}

.code-block.collapsed .code-expand-btn,
.code-block.expanded .code-expand-btn {
    display: block;
}

.code-expand-btn:hover {
    background: #475569;
    color: #f1f5f9;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #000000;
    overflow: hidden;
    min-width: 0;
    position: relative;
}

.main-content::before {
    display: none;
}

.toolbar {
    padding: 18px 28px 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    background: #000000;
    position: relative;
}

.toolbar::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    opacity: 0.65;
}

.toolbar-left {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.toolbar-home-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
    text-decoration: none;
    flex-shrink: 0;
}

.toolbar-home-mark {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.toolbar-home-text {
    font-size: 12px;
    color: var(--text-secondary);
}

.toolbar-model-wrap {
    min-width: 0;
}

.toolbar-kicker {
    display: inline-block;
    margin-bottom: 4px;
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.model-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.model-selector-icon {
    width: 22px;
    height: 22px;
    object-fit: contain;
    border-radius: 4px;
    flex-shrink: 0;
}

.current-model-name {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: -0.5px;
}

.current-model-type {
    font-size: 11px;
    padding: 6px 10px;
    border-radius: 999px;
    background-color: rgba(255, 255, 255, 0.05);
    color: #d5deeb;
    flex-shrink: 0;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.toolbar-right {
    display: flex;
    gap: 8px;
    align-items: center;
}

.toolbar-btn {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
}

.toolbar-btn:hover {
    background-color: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.16);
}

.toolbar-btn:active {
    transform: scale(0.96);
}

.mobile-menu-btn {
    display: none;
}

.content-area {
    flex: 1;
    overflow-y: auto;
    position: relative;
    scroll-behavior: smooth;
    padding: 0 24px;
    scrollbar-width: none;
}

.content-area::-webkit-scrollbar {
    width: 0;
    display: none;
}

.welcome-screen {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    padding: 36px 0 0;
}

.welcome-content {
    text-align: center;
    max-width: 880px;
    width: min(100%, 880px);
    padding: 48px;
    border-radius: 34px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background:
        radial-gradient(circle at top, rgba(255, 255, 255, 0.05), transparent 28%),
        linear-gradient(180deg, rgba(20, 20, 24, 0.4) 0%, rgba(10, 10, 12, 0.6) 100%);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(26px);
    -webkit-backdrop-filter: blur(26px);
    animation: welcomeFadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes welcomeFadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.welcome-eyebrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    margin-bottom: 18px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: #ffffff;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.welcome-logo-img {
    width: 168px;
    height: auto;
    margin-bottom: 18px;
    filter: none;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.welcome-desc {
    max-width: 640px;
    margin: 0 auto 28px !important;
    font-size: 15px !important;
    color: var(--text-secondary) !important;
    line-height: 1.8;
}

.welcome-prompt-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}

.welcome-prompt-card {
    padding: 18px 18px 16px;
    text-align: left;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
    appearance: none;
    width: 100%;
    color: inherit;
    font: inherit;
    cursor: pointer;
}

.welcome-prompt-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.06);
}

.welcome-prompt-card:focus-visible {
    outline: none;
    border-color: rgba(255, 255, 255, 0.28);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.12);
}

.welcome-prompt-label {
    display: inline-block;
    margin-bottom: 10px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.welcome-prompt-card strong {
    display: block;
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.6;
    font-weight: 600;
}

.welcome-meta {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}

.welcome-meta-chip {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    color: #ffffff;
    font-size: 12px;
}

.welcome-features {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.welcome-feature-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    text-align: left;
    padding: 18px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}



.feature-icon {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.1em;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.06));
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: #dff7ff;
    flex-shrink: 0;
}

.welcome-feature-item h4 {
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.welcome-feature-item p {
    font-size: 12px;
    color: var(--text-secondary);
}

.welcome-icon {
    font-size: 56px;
    margin-bottom: 20px;
}

.welcome-content h2 {
    font-size: clamp(32px, 4vw, 52px);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 14px;
    line-height: 1.1;
}

.quick-tips {
    display: grid;
    gap: 10px;
    text-align: left;
}

.tip {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.tip-icon {
    font-size: 18px;
}

.tip span:last-child {
    color: var(--text-primary);
    font-size: 14px;
}

.messages-container {
    padding: 24px 0 56px;
    display: flex;
    flex-direction: column;
    max-width: 920px;
    margin: 0 auto;
    width: 100%;
}

.scroll-bottom-btn {
    position: fixed;
    right: 28px;
    bottom: 220px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(7, 12, 24, 0.82);
    color: #eef4ff;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease;
    z-index: 80;
}

.scroll-bottom-btn.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.scroll-bottom-btn:hover {
    background: rgba(255, 255, 255, 0.14);
}

.scroll-bottom-btn span {
    font-size: 12px;
    font-weight: 600;
}

.model-info-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-height: 60vh;
    padding: 0;
    padding-bottom: 10vh;
    animation: msgFadeIn 0.3s ease;
}

.model-info-content {
    text-align: center;
    max-width: 480px;
    padding: 0;
    border-radius: 28px;
    border: none;
    background: transparent;
}

.model-info-icon {
    width: 56px;
    height: 56px;
    object-fit: contain;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    border: none;
    background: transparent;
    padding: 0;
    filter: drop-shadow(0 4px 16px rgba(255, 255, 255, 0.15));
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.model-info-content:hover .model-info-icon {
    transform: scale(1.05) translateY(-2px);
}

.model-info-name {
    font-size: 24px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.model-info-desc {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.6;
    margin-bottom: 24px;
}

.model-info-caps {
    display: flex;
    gap: 6px;
    justify-content: center;
    flex-wrap: wrap;
}

.model-info-cap {
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 999px;
    font-weight: 500;
    white-space: nowrap;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: rgba(255, 255, 255, 0.8) !important;
}

.message {
    display: flex;
    gap: 12px;
    padding: 16px 24px;
    transition: background-color 0.15s;
    animation: msgFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes msgFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.message.user {
    flex-direction: row-reverse;
}

.message.user .message-body {
    align-items: flex-end;
}

.message.editing .message-body {
    opacity: 0.5;
}

.message.editing .message-content {
    text-decoration: line-through;
    text-decoration-color: rgba(0,0,0,0.2);
}

.message-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
    margin-top: 2px;
}

.user-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.88) 0%, rgba(200, 200, 200, 0.88) 100%);
    color: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
    margin-top: 2px;
    box-shadow: 0 12px 28px rgba(255, 255, 255, 0.22);
}

.message.user .message-avatar {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.88) 0%, rgba(200, 200, 200, 0.88) 100%);
    color: #000000;
    font-size: 13px;
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.15);
}

.message.assistant .message-avatar {
    background-color: var(--text-primary);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.msg-avatar-img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

/* 根据特定模型判断是否需要反色为白色 */
.msg-avatar-img.is-openai-white {
    filter: brightness(0) invert(1);
}

.message-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    max-width: 85%;
}

.message-images {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.message-img {
    max-width: 200px;
    max-height: 200px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    border: 1px solid var(--border-color);
}

.message-img:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-md);
}

.message-files {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.message-file {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--bg-hover);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.message-file-icon {
    width: 32px;
    height: 32px;
    background: var(--accent-light);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
}

.message-file-name {
    font-size: 13px;
    color: var(--text-primary);
    font-weight: 500;
}

.message-content {
    padding: 4px 0;
    line-height: 1.7;
    font-size: 14px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    color: var(--text-primary);
}

.message.user .message-content {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.03) 100%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: #ffffff;
    padding: 10px 16px;
    border-radius: 18px 18px 4px 18px;
    display: inline-block;
    text-align: left;
    max-width: 100%;
}

.message-time {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
    opacity: 0;
    transition: opacity 0.15s;
}
.message:hover .message-time {
    opacity: 1;
}
.message.user .message-time {
    text-align: right;
}
/* When time is inside .message-footer, footer controls opacity */
.message-footer .message-time {
    opacity: 1;
}
@media (hover: none) {
    .message-footer { opacity: 0.85; }
    .message-time { opacity: 0.7; }
    .message-actions { opacity: 1; }
    .message-billing { opacity: 0.85; }
    .conv-item-delete { opacity: 0.6; }
    .history-item-delete { opacity: 0.6; }
}

/* 计费信息条（输入/输出 tokens + 消耗金额） */
.message-billing {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.35);
    line-height: 1;
    font-variant-numeric: tabular-nums;
    opacity: 0;
    transition: opacity 0.15s;
    white-space: nowrap;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    letter-spacing: 0.3px;
}
.message-billing svg {
    display: none;
}
.message-billing .billing-label {
    color: rgba(255, 255, 255, 0.35);
    font-size: 11px;
}
.message-billing .billing-value {
    color: rgba(255, 255, 255, 0.45);
    font-weight: 500;
    font-size: 11px;
}
.message-billing .billing-cost {
    color: rgba(255, 255, 255, 0.45);
    font-weight: 500;
    font-size: 11px;
}
.message-billing .billing-currency {
    color: #fbbf24;
    font-weight: 600;
    margin-right: 2px;
}
.message-billing .billing-dot {
    color: rgba(255, 255, 255, 0.2);
}
.message:hover .message-billing {
    opacity: 1;
}
/* When billing is inside .message-footer, footer controls opacity */
.message-footer .message-billing {
    opacity: 1;
}

/* === User Message Bubble === */
.message.user .message-body {
    align-items: flex-end;
}
.message.user .message-content {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.03) 100%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: #ffffff;
    padding: 10px 16px;
    border-radius: 18px 18px 4px 18px;
    display: inline-block;
    text-align: left;
    max-width: 100%;
}
.message.user .message-images + .message-content,
.message.user .message-files + .message-content {
    margin-top: 6px;
}

/* === Thinking Dots Animation === */
.thinking-dots {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 4px;
}
.thinking-dots span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--text-muted);
    animation: thinkingBounce 1.4s ease-in-out infinite;
}
.thinking-dots span:nth-child(2) { animation-delay: 0.16s; }
.thinking-dots span:nth-child(3) { animation-delay: 0.32s; }
@keyframes thinkingBounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; }
}

.message-content h2 { font-size: 18px; font-weight: 700; margin: 12px 0 6px; }

.message-content h3 { font-size: 16px; font-weight: 700; margin: 10px 0 5px; }

.message-content h4 { font-size: 15px; font-weight: 600; margin: 8px 0 4px; }

.message-content strong { font-weight: 700; }

.message-content em { font-style: italic; }

.message-content a { color: var(--accent); text-decoration: underline; }

.message-content ul { padding-left: 20px; margin: 4px 0; }

.message-content li { margin: 2px 0; }

.message-content .inline-code {
    background: #f1f5f9;
    padding: 1px 5px;
    border-radius: 4px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 13px;
    color: #e11d48;
}


.search-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    margin-bottom: 8px;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: var(--radius-sm);
    font-size: 12px;
    color: var(--search-color);
    font-weight: 500;
}

.search-indicator svg {
    flex-shrink: 0;
}

.message-actions {
    display: flex;
    gap: 2px;
    margin-top: 0;
    opacity: 0;
    transition: opacity 0.15s;
}

.message:hover .message-actions {
    opacity: 1;
}

.message-actions.user-actions {
    justify-content: flex-end;
}

/* When actions are inside .message-footer, footer controls opacity */
.message-footer .message-actions {
    opacity: 1;
}

/* 视频生成进度条 - 现代浅色设计 */
.video-progress {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    font-size: 14px;
    color: #475569;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04), 0 0 0 1px rgba(255, 255, 255, 0.8) inset;
    animation: progressPulse 2s ease-in-out infinite;
}

@keyframes progressPulse {
    0%, 100% {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04), 0 0 0 1px rgba(255, 255, 255, 0.8) inset;
        transform: scale(1);
    }
    50% {
        box-shadow: 0 4px 16px rgba(255, 255, 255, 0.12), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
        transform: scale(1.01);
    }
}

.video-result {
    padding: 8px 0;
}

.video-result video {
    width: 100%;
    max-width: 640px;
    border-radius: var(--radius-md);
    background: #f8fafc;
}

.download-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: var(--accent);
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: background 0.2s;
}

.download-link:hover {
    background: var(--accent-hover);
}

.error-message {
    padding: 12px 16px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: var(--radius-sm);
    color: #dc2626;
    font-size: 14px;
}

.msg-action-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.msg-action-btn:hover {
    color: #00D8FF;
    background: rgba(0, 216, 255, 0.08);
}

.msg-action-btn svg {
    width: 14px;
    height: 14px;
    opacity: 0.7;
}

.msg-action-btn:hover svg {
    opacity: 1;
}

.img-edit-btn {
    color: #ffffff !important;
}

.img-edit-btn:hover {
    color: #7c3aed !important;
    background: #f3f0ff !important;
}

.img-asset-btn {
    color: rgba(196, 181, 253, 0.96) !important;
}

.img-asset-btn:hover {
    color: #8b5cf6 !important;
    background: rgba(139, 92, 246, 0.12) !important;
}

.img-asset-btn.is-loading {
    opacity: 0.72;
    pointer-events: none;
}

.img-asset-btn.is-loading svg {
    animation: imageAssetBtnSpin 0.72s linear infinite;
}

.img-asset-btn.is-added {
    color: #8b5cf6 !important;
    background: rgba(139, 92, 246, 0.12) !important;
}

@keyframes imageAssetBtnSpin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* ===== Stage 2 Message Polish ===== */
.messages-container > .message + .message {
    margin-top: 4px;
}

.message {
    gap: 16px;
    padding: 10px 8px;
    background: transparent;
}

.message-avatar,
.user-avatar {
    width: 38px;
    height: 38px;
    margin-top: 6px;
}

.user-avatar,
.message.user .message-avatar {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.88) 0%, rgba(200, 200, 200, 0.88) 100%);
    color: #000000;
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.15);
}

.message.assistant .message-avatar {
    background: linear-gradient(180deg, rgba(20, 20, 24, 0.94) 0%, rgba(10, 10, 12, 0.88) 100%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.msg-avatar-img {
    width: 22px;
    height: 22px;
}

/* 根据特定模型判断是否需要反色为白色 */
.msg-avatar-img.is-openai-white {
    filter: brightness(0) invert(1);
}

.message-body {
    max-width: min(100%, 780px);
    gap: 10px;
}

.message.assistant .message-body {
    padding: 18px 20px 14px;
    border-radius: 26px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background:
        linear-gradient(180deg, rgba(20, 20, 24, 0.9) 0%, rgba(10, 10, 12, 0.86) 100%);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
}

/* When message-bubble exists, body loses its own padding/border/bg (bubble takes over) */
.message.assistant .message-body:has(.message-bubble) {
    padding: 0;
    border: none;
    background: none;
    box-shadow: none;
    border-radius: 0;
    gap: 0;
}

.message.user .message-body {
    max-width: min(100%, 640px);
}

.message.user .message-body:has(.message-bubble) {
    gap: 0;
}

/* === Message Bubble (content only) === */
.message-bubble {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.message.assistant .message-bubble {
    padding: 18px 20px 14px;
    border-radius: 26px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background:
        linear-gradient(180deg, rgba(20, 20, 24, 0.9) 0%, rgba(10, 10, 12, 0.86) 100%);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
}

.message.user .message-bubble {
    /* User bubble content wrapper - no extra styling needed,
       .message-content already has bubble appearance */
}

/* === Message Footer (actions + billing + time, outside bubble) === */
.message-footer {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
    padding: 8px 4px 0;
    opacity: 0;
    transition: opacity 0.18s ease;
}

.message:hover .message-footer {
    opacity: 1;
}

@media (hover: none) {
    .message-footer { opacity: 0.85; }
}

/* Footer 左侧：操作按钮 */
.message-footer .message-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    opacity: 1;
}

/* Footer 右侧：计费信息 */
.message-footer .message-billing {
    opacity: 1;
    padding-top: 4px;
    margin-left: auto;
    margin-right: 12px;
}

.message-content {
    padding: 0;
    line-height: 1.82;
    font-size: 15px;
    color: #ffffff;
}

.message.assistant .message-content {
    color: #ffffff;
    background: transparent;
}

.message.user .message-content,
.message.user .message-images + .message-content,
.message.user .message-files + .message-content {
    background: #18181b;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    padding: 14px 18px;
    border-radius: 24px 24px 8px 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.message-time {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 0;
    margin-left: auto;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.15s;
}

.message:hover .message-time {
    opacity: 1;
}

.message-footer .message-time {
    opacity: 1;
    margin-left: auto;
}

.message-images,
.message-files {
    gap: 10px;
    margin-bottom: 0;
}

.message-img {
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.24);
}

.message-file {
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.message-file-icon {
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
}

.message-file-name {
    color: #eef4ff;
}

.message-content h2,
.message-content h3,
.message-content h4 {
    color: #f8fbff;
    line-height: 1.3;
}

.message-content h2 {
    font-size: 22px;
    margin: 18px 0 10px;
}

.message-content h3 {
    font-size: 18px;
    margin: 16px 0 8px;
}

.message-content h4 {
    font-size: 15px;
    margin: 12px 0 6px;
}

.message-content p {
    margin: 0 0 12px;
}

.message-content p:last-child {
    margin-bottom: 0;
}

.message-content > *:first-child {
    margin-top: 0;
}

.message-content > *:last-child {
    margin-bottom: 0;
}

.message-content ul,
.message-content ol {
    margin: 8px 0 12px;
    padding-left: 22px;
}

.message-content li {
    margin: 6px 0;
    color: inherit;
}

.message-content blockquote {
    margin: 12px 0;
    padding: 12px 16px;
    border-left: 2px solid rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.04);
    border-radius: 0 14px 14px 0;
    color: #e4e4e7;
}

.message-content blockquote p {
    margin: 0;
}

.message-content hr {
    margin: 18px 0;
    border: none;
    height: 1px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.32) 20%, rgba(255, 255, 255, 0.18) 50%, rgba(255, 255, 255, 0.32) 80%, rgba(255, 255, 255, 0) 100%);
}

.table-wrap {
    margin: 14px 0;
    overflow-x: auto;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.table-wrap table {
    width: 100%;
    min-width: 520px;
    border-collapse: collapse;
}

.table-wrap th,
.table-wrap td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.table-wrap th {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
    text-transform: uppercase;
}

.table-wrap td {
    color: #e4e4e7;
    font-size: 14px;
}

.table-wrap tbody tr:last-child td {
    border-bottom: none;
}

.message-content .inline-code {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.16);
    padding: 2px 7px;
    border-radius: 8px;
    color: #ffffff;
}

.code-block {
    margin: 14px 0;
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(10, 10, 12, 0.4) 0%, rgba(0, 0, 0, 0.6) 100%);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.24);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
}

.code-header {
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.code-lang {
    color: #a1a1aa;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.code-copy-btn,
.code-expand-btn {
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: #e4e4e7;
    border-radius: 10px;
}

.code-copy-btn:hover,
.code-expand-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.18);
}

.code-block pre {
    padding: 16px 18px 18px;
}

.code-block code {
    color: #e4e4e7;
    font-size: 13px;
    line-height: 1.65;
}

/* === 深度思考 - 极简线条风 === */
.thinking-section {
    margin: 8px 0 16px;
    border-left: 2px solid rgba(0, 216, 255, 0.3);
    background: transparent;
    overflow: hidden;
}

.thinking-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0 10px 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.thinking-header:hover {
    background: rgba(0, 216, 255, 0.03);
}

.thinking-header-main {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.thinking-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    background: transparent;
    color: #00D8FF;
    font-size: 12px;
    font-weight: 500;
    flex-shrink: 0;
}

.thinking-label {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.thinking-status {
    min-width: 0;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.thinking-toggle {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: transparent;
    color: rgba(255, 255, 255, 0.3);
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.thinking-toggle:hover {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.5);
}

.thinking-toggle svg {
    transition: transform 0.3s ease;
}

.thinking-section.expanded .thinking-toggle svg {
    transform: rotate(180deg);
}

.thinking-content {
    display: none;
    padding: 0 0 12px 14px;
}

.thinking-section.expanded .thinking-content {
    display: block;
}

.thinking-content-inner {
    padding: 12px 14px;
    border-radius: 0 8px 8px 0;
    background: rgba(255, 255, 255, 0.02);
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    line-height: 1.75;
    border-left: 1px solid rgba(0, 216, 255, 0.1);
}

.thinking-content-inner p {
    margin: 0 0 10px;
}

.thinking-content-inner p:last-child {
    margin-bottom: 0;
}

/* 思考中状态 */
.thinking-section.is-streaming .thinking-chip svg {
    animation: thinking-pulse 1.5s ease-in-out infinite;
}

@keyframes thinking-pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.thinking-section.is-streaming .thinking-status::before {
    content: '';
    display: inline-block;
    width: 5px;
    height: 5px;
    margin-right: 6px;
    border-radius: 50%;
    background: #00D8FF;
    vertical-align: middle;
    animation: thinking-dot 1.4s ease-in-out infinite;
}

@keyframes thinking-dot {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; }
}

.thinking-section.is-complete .thinking-status::before {
    content: '';
    display: inline-block;
    width: 5px;
    height: 5px;
    margin-right: 6px;
    border-radius: 50%;
    background: rgba(0, 216, 255, 0.6);
    vertical-align: middle;
}

.search-indicator {
    padding: 8px 12px;
    margin-bottom: 2px;
    background: rgba(52, 211, 153, 0.1);
    border: 1px solid rgba(52, 211, 153, 0.18);
    border-radius: 16px;
    color: #bbf7d0;
}

.message-actions {
    gap: 6px;
    margin-top: 0;
    flex-wrap: wrap;
    display: flex;
    align-items: center;
    opacity: 0;
    transition: opacity 0.15s;
}

.message:hover .message-actions {
    opacity: 1;
}

.message-footer .message-actions {
    opacity: 1;
}

.message-actions.user-actions {
    justify-content: flex-end;
}

.msg-action-btn {
    padding: 8px 10px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(255, 255, 255, 0.04);
    color: #e4e4e7;
}

.msg-action-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-1px);
}

.msg-action-btn.is-success,
.code-copy-btn.is-success {
    color: #eafff5;
    background: rgba(16, 185, 129, 0.16);
    border-color: rgba(16, 185, 129, 0.24);
}

.message-actions.user-actions .msg-action-btn {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.14);
}

.video-progress {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    color: #ffffff;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.16);
}

.video-result video {
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.2);
}

.download-link {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.88) 0%, rgba(200, 200, 200, 0.88) 100%);
    color: #000000;
    border-radius: 12px;
}

.error-message {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 16px;
    color: #fda4af;
}

.images-container {
    padding: 18px 0 56px;
    max-width: 1040px;
}

.image-card {
    background: linear-gradient(180deg, rgba(20, 20, 24, 0.9) 0%, rgba(10, 10, 12, 0.94) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
}

.image-card img {
    height: 320px;
}

.image-card-info {
    padding: 16px 18px 18px;
}

.image-prompt {
    color: #ffffff;
    line-height: 1.7;
}

.image-action-btn {
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.image-action-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.16);
}

.code-block {
    margin: 8px 0;
    border-radius: 20px;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(10, 10, 12, 0.4) 0%, rgba(0, 0, 0, 0.6) 100%);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.24);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.code-lang {
    color: #a1a1aa;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.code-copy-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #e4e4e7;
    padding: 6px 12px;
    border-radius: 10px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.code-copy-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.18);
}

.code-block pre {
    margin: 0;
    padding: 16px 18px 18px;
    overflow-x: auto;
}

.code-block code {
    color: #e4e4e7;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 13px;
    line-height: 1.65;
}

.images-container {
    padding: 24px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.image-card {
    background: linear-gradient(180deg, rgba(20, 20, 24, 0.9) 0%, rgba(10, 10, 12, 0.94) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    overflow: hidden;
    animation: msgFadeIn 0.3s ease;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
}

.image-card img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
}

.image-card-info {
    padding: 12px 16px;
}

.image-prompt {
    font-size: 13px;
    color: #ffffff;
    margin-bottom: 8px;
    line-height: 1.7;
}

.image-actions {
    display: flex;
    gap: 8px;
}

.image-action-btn {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #ffffff;
    transition: all var(--transition);
}

.image-action-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.16);
}

.input-area {
padding: 0 24px 28px;
background: #0a0a0a;
position: relative;
    z-index: 10;
    transition: padding 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.input-container {
    max-width: 1100px;
    margin: 0 auto;
    position: relative; /* 为绝对定位的预览区提供参考 */
    padding-left: 0;
    box-sizing: border-box;
}

.asset-entry-rail {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    margin-right: 2px;
}

.asset-entry-btn {
    width: 34px;
    height: 34px;
    min-height: 34px;
    padding: 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    border-radius: 5px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.asset-entry-btn svg {
    transition: transform 0.2s ease;
}

.asset-entry-btn:hover {
    background-color: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.14);
    color: var(--text-primary);
}

.asset-entry-btn.is-active {
    background-color: rgba(148, 132, 255, 0.12);
    border-color: rgba(148, 132, 255, 0.25);
    color: #d4c4ff;
}

.asset-entry-btn.is-pressing {
    transform: scale(0.95);
}

.asset-entry-btn.is-pressing svg {
    transform: scale(0.92);
}

.asset-entry-btn.is-loading::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    border: 1px solid transparent;
    border-top-color: rgba(148, 132, 255, 0.9);
    border-right-color: rgba(148, 132, 255, 0.3);
    animation: assetEntrySpin 0.72s linear infinite;
}

.asset-entry-icon {
    width: 100%;
    height: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: inherit;
    color: inherit;
    background: transparent;
    box-shadow: none;
}

.asset-entry-icon svg {
    width: 17px;
    height: 17px;
}

.role-entry-btn .asset-entry-icon {
    color: rgba(232, 228, 255, 0.92);
}

.role-entry-btn .asset-entry-icon svg {
    width: 17px;
    height: 17px;
}

.role-entry-btn.is-active::before {
    content: '';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #9c8cff;
    box-shadow: 0 0 10px rgba(156, 140, 255, 0.55);
    z-index: 2;
}

@keyframes assetEntrySpin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.chat-input-box.has-role-status.composer-collapsed textarea {
    padding-top: 34px;
}

.asset-entry-text {
    display: none;
}

.asset-entry-text strong {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
}

.asset-entry-text small {
    display: block;
    font-size: 11px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.48);
}

.input-area.composer-collapsed {
    padding-bottom: 16px;
}

/* 输入框内参考图区 */
.reference-stage {
    position: absolute;
    top: 18px;
    left: 22px;
    width: 190px;
    height: 118px;
    z-index: 6;
    display: none;
    pointer-events: none;
    overflow: visible;
    contain: layout;
    backface-visibility: hidden;
    will-change: transform, opacity;
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
}

.reference-stage > * {
    pointer-events: auto;
}

.chat-input-box.has-reference-stage textarea {
    padding-left: 146px;
    min-height: 112px;
    transition: height 0.36s cubic-bezier(0.16, 1, 0.3, 1), min-height 0.36s cubic-bezier(0.16, 1, 0.3, 1), max-height 0.36s cubic-bezier(0.16, 1, 0.3, 1), padding 0.36s cubic-bezier(0.16, 1, 0.3, 1), font-size 0.3s ease, line-height 0.3s ease;
}

.chat-input-box.has-reference-stage .input-hint {
    padding-left: 146px;
}

.empty-reference-trigger {
    position: absolute;
    top: 14px;
    left: 44px;
    width: 68px;
    height: 88px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)),
        rgba(255, 255, 255, 0.02);
    border: 1px dashed rgba(255, 255, 255, 0.18);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), top 0.35s cubic-bezier(0.16, 1, 0.3, 1), left 0.35s cubic-bezier(0.16, 1, 0.3, 1), width 0.35s cubic-bezier(0.16, 1, 0.3, 1), height 0.35s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease, opacity 0.25s ease;
    z-index: 1;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
}

.reference-stage.has-images .empty-reference-trigger {
    width: 24px;
    height: 24px;
    left: 92px;
    top: 96px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(30, 33, 40, 0.95);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
    transform: none;
    opacity: 1;
    z-index: 40;
    transition: all 0.25s ease;
}

/* 当鼠标 hover 到图片区域展开时，隐藏独立的小加号 */
.reference-stage.is-expanded .empty-reference-trigger {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.5);
}

.empty-reference-trigger:hover {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.04)),
        rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.34);
    transform: translate(20px, -4px) rotate(-5deg) scale(1.02);
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.28);
}

.reference-stage.has-images .empty-reference-trigger:hover {
    transform: scale(1.1);
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(58, 63, 74, 0.98);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.4);
}

/* --- 新增：专门用于展开时的追加占位卡片 --- */
.preview-area .preview-item-add {
    opacity: 0;
    pointer-events: none;
    width: 68px;
    height: 88px;
    border-radius: 10px;
    border: 1px dashed rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.04);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s ease;
    --card-x: 0px;
    --card-y: 10px;
    --card-rotate: 0deg;
}

.reference-stage.is-expanded .preview-item-add {
    opacity: 1;
    pointer-events: auto;
    --card-x: calc(var(--real-index) * 64px + 14px);
    --card-y: 8px;
}

.preview-area .preview-item-add:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translate(var(--card-x), calc(var(--card-y) - 2px)) scale(1.02) !important;
}

.preview-item-add .empty-reference-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    color: rgba(255, 255, 255, 0.42);
}

.preview-item-add .empty-reference-content span {
    font-size: 12px;
}

.preview-item-add .empty-reference-icon {
    width: 14px;
    height: 14px;
}

.preview-item-add .empty-reference-icon svg {
    width: 100%;
    height: 100%;
}

.reference-stage:not(.has-images) .empty-reference-trigger {
    left: 20px;
    transform: translate(0, 0) rotate(-6deg);
    opacity: 1;
}

.reference-stage:not(.has-images) .empty-reference-trigger:hover {
    transform: translate(0, -6px) rotate(-3deg) scale(1.03);
}

/* 音频预览卡片（数字人模型）— 作为 .preview-item 的修饰类，只覆盖视觉 */
.preview-item-audio {
    background: rgba(20, 184, 166, 0.12);
    border: 1px solid rgba(20, 184, 166, 0.3);
    flex-direction: column;
    gap: 6px;
}

.preview-item-audio .audio-icon {
    color: rgba(20, 184, 166, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-item-audio .audio-name {
    font-size: 9px;
    color: rgba(255, 255, 255, 0.7);
    max-width: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
}

.reference-stage.has-images .empty-reference-trigger .empty-reference-content {
    gap: 0;
}

.reference-stage.has-images .empty-reference-trigger .empty-reference-content span {
    display: none;
}

.reference-stage.has-images .empty-reference-icon {
    width: 14px;
    height: 14px;
}

.reference-stage.has-images .empty-reference-icon svg {
    width: 14px;
    height: 14px;
    stroke-width: 2;
}

.reference-stage.has-images .empty-reference-badge {
    display: none;
}

.empty-reference-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    color: rgba(255, 255, 255, 0.42);
    transition: color 0.25s ease;
}

.empty-reference-trigger:hover .empty-reference-content {
    color: rgba(255, 255, 255, 0.82);
}

.empty-reference-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-reference-content span {
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.empty-reference-badge {
    position: absolute;
    bottom: 8px;
    left: -10px;
    width: 24px;
    height: 24px;
    background: rgba(20, 184, 166, 0.16);
    border: 1px solid rgba(20, 184, 166, 0.46);
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #18d0c0;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: transform 0.28s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.28s ease, background 0.28s ease;
    box-shadow: 0 10px 16px rgba(3, 10, 18, 0.28);
}

.empty-reference-trigger:hover .empty-reference-badge {
    transform: scale(1.08) translateY(-1px);
    background: rgba(20, 184, 166, 0.24);
    box-shadow: 0 0 16px rgba(20, 184, 166, 0.18);
}

.preview-area {
    position: absolute;
    inset: 0;
    display: none;
    transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
    overflow: visible;
    pointer-events: none;
}

.reference-stage.is-expanded .preview-area {
    width: calc(var(--total-imgs) * 64px + 180px);
    padding-right: 92px;
}

.preview-area:empty {
    display: none;
}

.preview-item {
    --card-x: 0px;
    --card-y: 0px;
    --card-rotate: -8deg;
    --card-hover-rotate: 0deg;
    position: absolute;
    top: 10px;
    left: 12px;
    width: 70px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
        rgba(14, 16, 22, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 10px;
    color: var(--text-primary);
    cursor: pointer;
    
    transform: translate(var(--card-x), var(--card-y)) rotate(var(--card-rotate));
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, border-color 0.25s ease, filter 0.25s ease, opacity 0.35s ease;
    box-shadow: 0 14px 24px rgba(0, 0, 0, 0.22);
    overflow: visible;
    pointer-events: auto;
}

.preview-item.is-stack-hidden {
    opacity: 0;
    pointer-events: none;
}

/* 堆叠状态坐标 (stack-index: 0=倒数第三张, 1=倒数第二张, 2=最新一张) */
.preview-item[style*="--stack-index: 0"] {
    --card-x: 4px;
    --card-y: 14px;
    --card-rotate: -12deg;
}

.preview-item[style*="--stack-index: 1"] {
    --card-x: 36px;
    --card-y: 4px;
    --card-rotate: 8deg;
}

.preview-item[style*="--stack-index: 2"] {
    --card-x: 68px;
    --card-y: 12px;
    --card-rotate: -6deg;
}

/* 隐藏堆叠下的更早图片 */
.preview-item[style*="--stack-index: -"] {
    --card-x: 0px;
    --card-y: 10px;
    --card-rotate: 0deg;
}

/* 展开状态：更松的扇形展开 */
.reference-stage.is-expanded .preview-item {
    opacity: 1;
    pointer-events: auto;
    --card-x: calc(var(--real-index) * 64px);
    --card-y: calc(8px - min(var(--real-index), 6) * 2px);
    --card-rotate: calc(-12deg + min(var(--real-index), 6) * 4deg);
}

.reference-stage.is-expanded .more-imgs-overlay {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.preview-item:hover {
    border-color: rgba(255, 255, 255, 0.44);
    transform: translate(var(--card-x), calc(var(--card-y) - 14px)) scale(1.04) !important;
    box-shadow: 0 24px 34px rgba(0, 0, 0, 0.34), 0 0 0 1px rgba(255, 255, 255, 0.08);
    filter: saturate(1.05);
    z-index: 100 !important;
}

.preview-item img {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    object-fit: cover;
    display: block;
}

.more-imgs-overlay {
    position: absolute;
    inset: 4px;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 18px;
    font-weight: 600;
    border-radius: 8px;
    z-index: 10;
    text-shadow: 0 2px 10px rgba(255, 255, 255, 0.5);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15);
}

.preview-item .preview-name {
    display: none;
}

.preview-floating-name {
    position: absolute;
    top: -34px;
    left: -52px;
    max-width: 180px;
    padding: 7px 14px;
    border-radius: 12px;
    background: rgba(80, 88, 102, 0.42);
    color: rgba(235, 238, 244, 0.82);
    font-size: 12px;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    opacity: 0;
    transform: translateY(10px) rotate(4deg);
    pointer-events: none;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
    transition: opacity 0.25s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.preview-item:hover .preview-floating-name {
    opacity: 1;
    transform: translateY(0) rotate(4deg);
}

/* 视频文件预览 */
.preview-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}
.preview-item .video-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    background: rgba(99, 102, 241, 0.85);
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    z-index: 2;
}

.preview-item .img-ref {
    position: absolute;
    left: -10px;
    bottom: 8px;
    background: rgba(20, 184, 166, 0.15);
    border: 1px solid rgba(20, 184, 166, 0.42);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #19d3c2;
    padding: 4px 7px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
    white-space: nowrap;
    box-shadow: 0 8px 16px rgba(3, 10, 18, 0.28);
}

.preview-item .img-ref:hover {
    background: rgba(20, 184, 166, 0.24);
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 0 14px rgba(20, 184, 166, 0.16);
}

.preview-item-file {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03)),
        rgba(22, 24, 30, 0.92);
}

.preview-item .file-icon {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
    color: #f4e8c4;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.preview-remove {
    position: absolute;
    top: -10px;
    right: -8px;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    background: rgba(37, 40, 48, 0.94);
    color: #f6f7fb;
    border: 1px solid rgba(255, 255, 255, 0.16);
    font-size: 14px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.22s ease, transform 0.22s ease, background 0.22s ease, border-color 0.22s ease;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.34);
}

.preview-item:hover .preview-remove {
    opacity: 1;
    transform: scale(1);
}

.preview-remove:hover {
    background: rgba(239, 68, 68, 0.9);
    border-color: rgba(255, 255, 255, 0.3);
}

.chat-input-box {
    background: #121214;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 28px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    overflow: visible; /* 改为 visible 允许价格标签浮出 */
    transition: all 0.2s ease;
    position: relative;
    max-width: 920px;
    margin: 0 auto;
    z-index: 20; /* 确保输入框层级高于预览图 */
}

.role-status-chip {
    position: absolute;
    top: 14px;
    left: 18px;
    max-width: calc(100% - 154px);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    padding: 0 10px 0 12px;
    border-radius: 999px;
    border: 1px solid rgba(146, 132, 255, 0.22);
    background: linear-gradient(135deg, rgba(39, 33, 67, 0.9), rgba(18, 25, 40, 0.84));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.04),
        0 10px 26px rgba(8, 10, 18, 0.24);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 12;
}

.role-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #9c8cff;
    box-shadow: 0 0 10px rgba(156, 140, 255, 0.48);
    flex-shrink: 0;
}

.role-status-label {
    font-size: 11px;
    color: rgba(211, 205, 255, 0.72);
    white-space: nowrap;
}

.role-status-name {
    min-width: 0;
    font-size: 12px;
    color: #f3efff;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.role-status-close {
    width: 22px;
    height: 22px;
    margin-left: 2px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(255, 255, 255, 0.035);
    color: rgba(240, 234, 255, 0.72);
    cursor: pointer;
    transition: all var(--transition);
    flex-shrink: 0;
}

.role-status-close:hover {
    color: #ffffff;
    border-color: rgba(170, 158, 255, 0.24);
    background: rgba(150, 138, 255, 0.1);
}

.chat-input-box.composer-collapsed {
    max-width: 760px;
    min-height: 74px;
    border-radius: 30px;
    background: #141418;
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow:
        0 18px 34px rgba(0, 0, 0, 0.26),
        0 0 0 1px rgba(255, 255, 255, 0.025);
    transform: translateY(-8px);
    will-change: transform, border-radius, box-shadow;
}

.chat-price-badge {
    position: absolute;
    top: 14px;
    right: 18px;
    background: rgba(251, 191, 36, 0.08); /* 极淡的琥珀金底色 */
    border: 1px solid rgba(251, 191, 36, 0.25);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #fef08a; /* 香槟金文字 */
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 11px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-weight: 500;
    pointer-events: none;
    z-index: 10;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    gap: 4px;
    animation: fadeIn 0.3s ease-out;
    letter-spacing: 0.2px;
}

.chat-price-badge.hidden {
    display: none !important;
}

.img-ref-autocomplete {
    position: fixed;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    max-height: 200px;
    overflow-y: auto;
    z-index: 10000;
}

.img-ref-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    cursor: pointer;
    transition: background var(--transition);
}

.img-ref-item:hover {
    background: var(--bg-hover);
}

.img-ref-item img {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    object-fit: cover;
}

.img-ref-item .img-ref-name {
    flex: 1;
    font-size: 13px;
    color: var(--text-primary);
}

.img-ref-item .img-ref-tag {
    background: var(--accent);
    color: #000000;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.drag-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.08);
    border: 2px dashed rgba(255, 255, 255, 0.7);
    border-radius: 28px;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.drag-overlay.active {
    display: flex;
}

.drag-overlay-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--accent);
    font-size: 14px;
    font-weight: 500;
}

.chat-input-box.dragging {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.12), 0 30px 80px rgba(0, 0, 0, 0.34);
}

.chat-input-box.is-generating {
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 28px 80px rgba(0, 0, 0, 0.34);
}


.chat-input-box:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 32px 90px rgba(0, 0, 0, 0.42);
}

.chat-input-box textarea {
    width: 100%;
    border: none;
    background: transparent;
    resize: none;
    padding: 22px 24px 0;
    font-size: 16px;
    color: var(--text-primary);
    line-height: 1.6;
    max-height: 200px;
    outline: none;
    backface-visibility: hidden;
    will-change: padding, font-size, height, min-height;
    transition: height 0.36s cubic-bezier(0.16, 1, 0.3, 1), min-height 0.36s cubic-bezier(0.16, 1, 0.3, 1), max-height 0.36s cubic-bezier(0.16, 1, 0.3, 1), padding 0.36s cubic-bezier(0.16, 1, 0.3, 1), font-size 0.3s ease, line-height 0.3s ease;
}

.chat-input-box.has-role-status textarea {
    padding-top: 58px;
}
.chat-input-box.has-role-status .rich-input {
    padding-top: 58px;
}

.chat-input-box.composer-collapsed textarea {
    min-height: 0;
    height: 74px !important;
    max-height: 74px;
    padding: 25px 88px 20px 28px;
    font-size: 14px;
    line-height: 1.35;
}

.chat-input-box textarea:focus {
    outline: none;
}

.chat-input-box textarea::placeholder {
    color: var(--text-muted);
}

.input-hint {
    font-size: 11px;
    color: var(--text-muted);
    padding: 2px 24px 8px;
    opacity: 0.72;
    transition: opacity 0.22s ease, padding 0.32s cubic-bezier(0.16, 1, 0.3, 1), max-height 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.chat-input-box.composer-collapsed .input-hint {
    opacity: 0;
    max-height: 0;
    padding: 0 24px;
    overflow: hidden;
}

.chat-input-box:focus-within .input-hint {
    opacity: 1;
}

.input-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 18px 18px 18px;
    gap: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    will-change: transform, opacity;
    transition: margin-top 0.36s cubic-bezier(0.16, 1, 0.3, 1), height 0.36s cubic-bezier(0.16, 1, 0.3, 1), padding 0.36s cubic-bezier(0.16, 1, 0.3, 1), gap 0.36s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.24s ease, border-color 0.36s ease;
}

.chat-input-box.composer-collapsed .input-toolbar {
    margin-top: -74px;
    height: 74px;
    padding: 0 12px 0 0;
    justify-content: flex-end;
    border-top-color: transparent;
    pointer-events: none;
    gap: 0;
}

.chat-input-box.composer-collapsed .input-toolbar-left {
    opacity: 0;
    width: 0;
    min-width: 0;
    max-width: 0;
    overflow: hidden;
    pointer-events: none;
    gap: 0;
    transform: translateX(-8px);
}

.chat-input-box.composer-collapsed .input-toolbar-right {
    gap: 0;
    transform: scale(0.96);
    pointer-events: auto;
}

.chat-input-box.composer-collapsed .send-btn,
.chat-input-box.composer-collapsed .stop-btn {
    width: 46px;
    height: 46px;
    border-radius: 16px;
}

.chat-input-box.composer-collapsed.has-reference-stage textarea {
    padding-left: 100px;
    min-height: 0;
}

.chat-input-box.composer-collapsed.has-reference-stage .reference-stage {
    top: 50%;
    left: 16px;
    width: 64px;
    height: 64px;
    opacity: 0.96;
    transform: translateY(-50%) scale(0.92);
}

.chat-input-box.composer-collapsed .reference-stage:not(.has-images) .empty-reference-trigger {
    top: 10px;
    left: 8px;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    transform: rotate(-7deg);
    box-shadow: 0 10px 18px rgba(0, 0, 0, 0.18);
}

.chat-input-box.composer-collapsed .reference-stage:not(.has-images) .empty-reference-content {
    gap: 0;
}

.chat-input-box.composer-collapsed .reference-stage:not(.has-images) .empty-reference-content span,
.chat-input-box.composer-collapsed .reference-stage:not(.has-images) .empty-reference-badge {
    display: none;
}

.chat-input-box.composer-collapsed .reference-stage:not(.has-images) .empty-reference-icon {
    width: 16px;
    height: 16px;
}

.chat-input-box.composer-collapsed .reference-stage.has-images {
    top: 50%;
    left: 12px;
    width: 76px;
    height: 52px;
    opacity: 0.96;
    transform: translateY(-50%) scale(0.94);
}

.chat-input-box.composer-collapsed .reference-stage.has-images .preview-area {
    transform: scale(0.72);
    transform-origin: left center;
}

.chat-input-box.composer-collapsed .reference-stage.has-images .empty-reference-trigger {
    left: 54px;
    top: 30px;
    width: 20px;
    height: 20px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.chat-input-box.composer-collapsed .chat-price-badge {
    opacity: 0;
    pointer-events: none;
}


.input-toolbar-left {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    max-width: 1000px;
    transition: opacity 0.22s ease, max-width 0.32s cubic-bezier(0.16, 1, 0.3, 1), transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), gap 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

.input-toolbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
    transition: gap 0.32s cubic-bezier(0.16, 1, 0.3, 1), transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

.tool-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    height: 34px;
    padding: 0 11px;
    border-radius: 0;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
    transition: all var(--transition);
    white-space: nowrap;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    cursor: pointer;
}

.tool-btn:hover {
    background-color: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.14);
    color: var(--text-primary);
}

.toggle-tool {
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    cursor: pointer;
}

.toggle-tool:hover {
    background-color: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.14);
}

.toggle-tool.active {
    background-color: rgba(0, 216, 255, 0.1);
    color: var(--accent);
    border-color: rgba(0, 216, 255, 0.3);
}

.toggle-tool.active.web-search {
    background-color: rgba(52, 211, 153, 0.12);
    color: #bbf7d0;
    border-color: rgba(52, 211, 153, 0.22);
}

.toggle-tool.active.thinking-mode {
    background: linear-gradient(180deg, rgba(212, 178, 106, 0.12), rgba(212, 178, 106, 0.05));
    color: #f4dfb7;
    border-color: rgba(212, 178, 106, 0.22);
}

.send-btn {
    width: 36px;
    height: 34px;
    border-radius: 0;
    background: var(--accent);
    color: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 4px 16px rgba(0, 216, 255, 0.3);
}

.send-btn:hover:not(:disabled) {
    background-color: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(0, 216, 255, 0.5);
}

.send-btn:active:not(:disabled) {
    transform: scale(0.95);
}

.send-btn:disabled {
    background-color: rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.stop-btn {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background-color: var(--danger);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}

.stop-btn:hover {
    background-color: #b91c1c;
}

.image-options-popup {
    position: fixed;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    z-index: 100;
    min-width: 140px;
    max-height: 280px;
    overflow-y: auto;
    animation: popupFadeIn 0.15s ease;
}

.route-strategy-popup {
    position: fixed;
    width: 320px;
    max-width: calc(100vw - 24px);
    background: rgba(18, 18, 20, 0.85);
    backdrop-filter: blur(32px);
    -webkit-backdrop-filter: blur(32px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    z-index: 110;
    overflow: hidden;
    animation: popupFadeUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-origin: bottom center;
}

/* 顶部背景渐变光效 */
.route-strategy-popup::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 140px;
    background: radial-gradient(circle at center top, rgba(102, 126, 234, 0.15) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

@keyframes popupFadeUp {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.route-popup-card {
    padding: 16px;
    position: relative;
    z-index: 1;
}

.route-popup-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.route-popup-title-main {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
}

.route-popup-help-link {
    font-size: 12px;
    color: #14b8a6;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    transition: opacity 0.2s;
}

.route-popup-help-link:hover {
    opacity: 0.8;
}

.route-popup-section {
    margin-top: 16px;
}

.route-popup-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.route-popup-section-title {
    font-size: 13px;
    font-weight: 600;
    color: #14b8a6;
    display: inline-flex;
    align-items: center;
}

.route-popup-badge-teal {
    font-size: 10px;
    color: #14b8a6;
    border: 1px solid rgba(20, 184, 166, 0.3);
    background: rgba(20, 184, 166, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
}

.route-popup-options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.route-popup-option {
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    padding: 10px 12px;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.route-popup-option:hover {
    border-color: rgba(20, 184, 166, 0.3);
    background: rgba(20, 184, 166, 0.05);
}

.route-popup-option.active {
    border-color: rgba(20, 184, 166, 0.5);
    background: rgba(20, 184, 166, 0.1);
}

.route-popup-option-content {
    display: flex;
    align-items: center;
    gap: 6px;
}

.route-popup-option-icon {
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.route-popup-option-icon.icon-purple { color: #d946ef; }
.route-popup-option-icon.icon-yellow { color: #eab308; }
.route-popup-option-icon.icon-blue { color: #3b82f6; }
.route-popup-option-icon.icon-green { color: #22c55e; }

.route-popup-option-title {
    font-size: 12px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
}

.route-popup-option-check {
    color: #14b8a6;
}

.route-popup-section-hint {
    margin-top: 10px;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.4);
    line-height: 1.4;
}

.route-popup-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 20px 0 12px;
}

.route-popup-divider::before,
.route-popup-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.route-popup-divider span {
    padding: 0 10px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 11px;
}

.route-popup-channel-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 240px;
    overflow-y: auto;
    padding-right: 4px;
}

.route-popup-channel-list::-webkit-scrollbar {
    width: 4px;
}
.route-popup-channel-list::-webkit-scrollbar-track {
    background: transparent;
}
.route-popup-channel-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}
.route-popup-channel-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

.route-popup-channel {
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 12px 14px;
    text-align: left;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: all 0.2s;
}

.route-popup-channel:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(20, 184, 166, 0.3);
}

.route-popup-channel.active {
    background: rgba(20, 184, 166, 0.1);
    border-color: rgba(20, 184, 166, 0.4);
}

.route-popup-channel-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.route-popup-channel-title {
    font-size: 13px;
    font-weight: 600;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.route-popup-channel-stats {
    display: flex;
    align-items: center;
    gap: 8px;
}

.route-popup-channel-stat {
    font-size: 11px;
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.route-popup-channel-stat.stat-success {
    color: #22c55e;
}

.route-popup-channel-stat.stat-speed {
    color: #60a5fa;
}

.route-popup-channel-bottom {
    display: flex;
    justify-content: flex-start;
    width: 100%;
}

.route-popup-channel-price {
    font-size: 11px;
    color: #eab308;
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

@keyframes popupFadeIn {
    from { opacity: 0; transform: translateY(4px); }

    to { opacity: 1; transform: translateY(0); }

}

.image-option-item {
    padding: 8px 14px;
    font-size: 13px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}

.image-option-item:hover {
    background-color: var(--bg-hover);
}

.image-option-item.active {
    color: var(--accent);
    background-color: var(--accent-light);
    font-weight: 500;
}

.image-result-card {
    border-radius: var(--radius-md);
    overflow: hidden;
    display: inline-block;
    max-width: 768px;
}

/* ===== 视频结果 - 无框设计（与图片风格一致）===== */

/* 视频组容器（与 image-result-group-card 一致） */
.video-result-group-card {
    background: transparent;
    border: none;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    margin: 0;
}

/* 单视频容器 */
.video-result-stage {
    width: 100%;
}
.video-result-stage .video-grid-item {
    max-width: 50%;
    margin: 0;
}
@media (max-width: 768px) {
    .video-result-stage .video-grid-item {
        max-width: 100%;
    }
}

/* 网格布局（与 image-result-grid 一致） */
.video-result-grid {
    display: grid;
    gap: 4px;
    width: 100%;
}
.video-result-grid.video-grid-2 { grid-template-columns: repeat(2, 1fr); }
.video-result-grid.video-grid-3 { grid-template-columns: repeat(3, 1fr); }
.video-result-grid.video-grid-4 { grid-template-columns: repeat(4, 1fr); }

/* 单个视频项（与 image-grid-item 一致：无框） */
.video-grid-item {
    border-radius: 0;
    overflow: hidden;
    position: relative;
    border: none;
    background: #0d0d0f;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* 视频包装器 */
.video-wrapper {
    position: relative;
    overflow: hidden;
    background: #0d0d0f;
    aspect-ratio: 3/2;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* 网格中的视频包装器：撑满网格行高，避免黑边 */
.video-result-grid .video-grid-item .video-wrapper {
    aspect-ratio: auto;
    height: 100%;
}

.video-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    background: #0d0d0f;
}

/* 播放按钮覆盖层 */
.video-play-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(2px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
}
.video-wrapper:hover .video-play-overlay {
    background: rgba(0, 0, 0, 0.15);
}
.video-play-overlay.is-playing {
    opacity: 0;
    pointer-events: none;
}
.video-play-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255,255,255,0.15);
}
.video-wrapper:hover .video-play-btn {
    transform: scale(1.1);
    background: rgba(0, 0, 0, 0.7);
}
.video-play-btn svg {
    margin-left: 3px;
    color: #ffffff;
}

/* 加载遮罩 */
.video-loading-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(13, 13, 15, 0.8);
    backdrop-filter: blur(4px);
    z-index: 3;
}
.video-loading-overlay .video-loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255,255,255,0.1);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* 视频悬浮操作按钮（与 image-item-actions 一致） */
.video-item-actions {
    position: absolute;
    top: 8px;
    right: 8px;
    opacity: 0;
    transition: opacity 0.2s ease;
    display: flex;
    gap: 6px;
    z-index: 10;
}
.video-grid-item:hover .video-item-actions {
    opacity: 1;
}
.video-item-actions .msg-action-btn {
    background: rgba(0, 0, 0, 0.6) !important;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.1) !important;
    color: #fff !important;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
    transition: all 0.2s ease;
}
.video-item-actions .msg-action-btn:hover {
    background: rgba(0, 0, 0, 0.8) !important;
    border-color: rgba(255,255,255,0.2) !important;
}

/* 视频加载占位符（与图片加载占位符一致） */
.video-grid-item.video-loading-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    background: #0d0d0f;
    position: relative;
    overflow: hidden;
}

/* 视频错误占位符 */
.video-error-item {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    background: #0d0d0f;
    color: rgba(255,255,255,0.3);
    font-size: 24px;
}
.video-error-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 视频缩略图（向后兼容） */
.video-thumbnail {
    max-width: 100%;
    display: block;
    object-fit: cover;
    transition: opacity 0.2s;
}

.video-wrapper:hover .video-thumbnail {
    opacity: 0.85;
}

.video-placeholder {
    width: 100%;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: rgba(255, 255, 255, 0.3);
}

.video-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-lightbox .lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
}

.video-lightbox .lightbox-content {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-lightbox .lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background 0.2s;
}

.video-lightbox .lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.video-lightbox .lightbox-download {
    position: absolute;
    top: -40px;
    right: 50px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background 0.2s;
}

.video-lightbox .lightbox-download:hover {
    background: rgba(255, 255, 255, 0.2);
}

.video-progress {
    padding: 16px 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    color: #475569;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(255, 255, 255, 0.9) inset;
    max-width: 480px;
}
.video-progress-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.video-progress-icon svg {
    color: #7c3aed;
}
.video-progress-body {
    flex: 1;
    min-width: 0;
}
.video-progress-text {
    font-weight: 500;
    font-size: 13px;
    color: #334155;
}
.video-progress-bar-track {
    height: 4px;
    border-radius: 2px;
    background: #e2e8f0;
    margin-top: 8px;
    overflow: hidden;
}
.video-progress-bar-fill {
    height: 100%;
    border-radius: 2px;
    background: linear-gradient(90deg, #ffffff 0%, #dddddd 50%, #aaaaaa 100%);
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}

.extend-video-modal .modal-content {
    max-width: 480px;
    padding: 24px;
}

.extend-video-modal h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
    color: var(--text-primary);
}

.extend-video-tip {
    margin: 0 0 16px 0;
    font-size: 13px;
    color: var(--text-secondary);
    background: var(--bg-hover);
    padding: 10px 12px;
    border-radius: var(--radius-sm);
}

.extend-video-form .form-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
    display: block;
}

.extend-video-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.extend-video-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.extend-video-form label {
    font-size: 14px;
    color: var(--text-secondary);
}

.extend-video-form textarea,
.extend-video-form input {
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
    resize: none;
    transition: border-color 0.2s;
}

.extend-video-form textarea:focus,
.extend-video-form input:focus {
    outline: none;
    border-color: var(--accent);
}

.extend-video-form input[type="number"] {
    width: 120px;
}

.extend-video-modal .modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
}

.btn-secondary {
    padding: 10px 20px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: var(--bg-hover);
}

.image-result-img {
    max-width: 100%;
    max-height: 768px;
    border-radius: 0;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.4s ease;
    display: block;
    opacity: 0;
}

.image-result-img.loaded {
    opacity: 1;
}

/* ===== 极简波纹加载动画 ===== */

/* ===== 风格A：极简磨砂加载器 ===== */
.minimal-loader {
    position: relative;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
}

/* 渐变描边环 */
.minimal-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid transparent;
    background: conic-gradient(
        from 0deg,
        transparent 0%,
        rgba(99, 102, 241, 0.8) 25%,
        rgba(168, 85, 247, 0.6) 50%,
        transparent 75%,
        transparent 100%
    );
    -webkit-mask: radial-gradient(circle, transparent calc(50% - 2px), black calc(50% - 1px));
    mask: radial-gradient(circle, transparent calc(50% - 2px), black calc(50% - 1px));
    animation: minimal-spin 1.2s linear infinite;
}

/* 中心呼吸光点 */
.minimal-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    margin: -4px 0 0 -4px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.8);
    animation: minimal-pulse 1.5s ease-in-out infinite;
}

@keyframes minimal-spin {
    to { transform: rotate(360deg); }
}

@keyframes minimal-pulse {
    0%, 100% { opacity: 0.3; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1.2); }
}

/* 兼容旧类名 */
.ripple-loader { display: none; }
.ripple-ring, .ripple-core { display: none; }

/* ===== 生图加载动画（风格A：极简磨砂）===== */

.image-loading-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    background: linear-gradient(135deg, #18181b 0%, #0f0f12 100%);
    border-radius: 0;
    position: relative;
    overflow: hidden;
    transition: background 0.4s ease, min-height 0.4s ease;
}

/* 极简径向光晕 */
.image-loading-placeholder::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 50%, rgba(99, 102, 241, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

/* 禁用旧扫光效果 */
.image-loading-placeholder::after {
    display: none;
}

.image-loading-placeholder.image-loaded,
.image-loading-placeholder.image-revealing {
    background: transparent !important;
    min-height: 0 !important;
}

.image-loading-placeholder.image-loaded::before,
.image-loading-placeholder.image-revealing::before,
.image-loading-placeholder.image-loaded::after,
.image-loading-placeholder.image-revealing::after {
    display: none;
}

/* 加载器容器 - 炫酷动画核心 */
.img-loader-core {
    position: relative;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
}

/* 外层旋转环 - 2.5s正向旋转，紫色渐变，缺口设计 */
.img-loader-ring-outer {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: conic-gradient(
        from 0deg,
        transparent 0deg,
        rgba(168, 85, 247, 0.9) 30deg,
        rgba(99, 102, 241, 0.8) 90deg,
        rgba(0, 216, 255, 0.6) 150deg,
        transparent 180deg,
        transparent 360deg
    );
    animation: img-loader-ring-spin 2.5s linear infinite;
    -webkit-mask: radial-gradient(circle, transparent 58%, black 60%);
    mask: radial-gradient(circle, transparent 58%, black 60%);
}

/* 中层旋转环 - 1.8s反向旋转，双向旋转形成视觉差 */
.img-loader-ring-mid {
    position: absolute;
    width: 72%;
    height: 72%;
    border-radius: 50%;
    background: conic-gradient(
        from 90deg,
        rgba(0, 216, 255, 0.7) 0deg,
        rgba(99, 102, 241, 0.9) 120deg,
        rgba(168, 85, 247, 0.7) 240deg,
        rgba(0, 216, 255, 0.7) 360deg
    );
    animation: img-loader-ring-spin 1.8s linear infinite reverse;
    -webkit-mask: radial-gradient(circle, transparent 54%, black 56%);
    mask: radial-gradient(circle, transparent 54%, black 56%);
}

/* 内层旋转环 - 1s快速旋转，制造速度层次感 */
.img-loader-ring-inner {
    position: absolute;
    width: 48%;
    height: 48%;
    border-radius: 50%;
    background: conic-gradient(
        from 270deg,
        transparent 0deg,
        rgba(0, 216, 255, 1) 100deg,
        rgba(255, 255, 255, 0.8) 200deg,
        transparent 360deg
    );
    animation: img-loader-ring-spin 1s linear infinite;
    -webkit-mask: radial-gradient(circle, transparent 48%, black 50%);
    mask: radial-gradient(circle, transparent 48%, black 50%);
}

/* 四叶草加载动画 */
.clover-loader {
    position: relative;
    width: 60px;
    height: 60px;
    animation: clover-bounce 1.2s ease-in-out infinite;
    z-index: 3;
}

/* 四叶草叶子 */
.clover-leaf {
    position: absolute;
    width: 24px;
    height: 24px;
    border-radius: 50% 50% 50% 0;
    background: linear-gradient(135deg, #00d8ff 0%, #e0f7ff 50%, #00d8ff 100%);
    box-shadow: 
        0 0 10px rgba(0, 216, 255, 0.6),
        0 0 20px rgba(0, 216, 255, 0.3),
        inset 0 0 6px rgba(255, 255, 255, 0.4);
    transform-origin: center;
}

/* 四片叶子位置 */
.leaf-1 {
    top: 0;
    left: 50%;
    transform: translateX(-50%) rotate(-45deg);
    animation: leaf-pulse 1.2s ease-in-out infinite;
}

.leaf-2 {
    top: 50%;
    right: 0;
    transform: translateY(-50%) rotate(45deg);
    animation: leaf-pulse 1.2s ease-in-out infinite 0.15s;
}

.leaf-3 {
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) rotate(135deg);
    animation: leaf-pulse 1.2s ease-in-out infinite 0.3s;
}

.leaf-4 {
    top: 50%;
    left: 0;
    transform: translateY(-50%) rotate(-135deg);
    animation: leaf-pulse 1.2s ease-in-out infinite 0.45s;
}

/* 四叶草中心 */
.clover-center {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 14px;
    height: 14px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #ffffff, #e0f7ff, #00d8ff);
    box-shadow: 
        0 0 15px rgba(255, 255, 255, 0.8),
        0 0 30px rgba(0, 216, 255, 0.6),
        inset 0 0 8px rgba(255, 255, 255, 0.5);
    animation: center-glow 1.2s ease-in-out infinite;
    z-index: 4;
}

/* 环绕粒子 */
.orbit-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 0 8px #00d8ff, 0 0 16px rgba(0, 216, 255, 0.6);
    animation: orbit-float 3s ease-in-out infinite;
    z-index: 2;
}

/* 8个粒子位置 */
.orbit-particle.p1 { top: 5%; left: 50%; animation-delay: 0s; }
.orbit-particle.p2 { top: 20%; right: 10%; animation-delay: -0.375s; }
.orbit-particle.p3 { top: 50%; right: 5%; animation-delay: -0.75s; }
.orbit-particle.p4 { bottom: 20%; right: 10%; animation-delay: -1.125s; }
.orbit-particle.p5 { bottom: 5%; left: 50%; animation-delay: -1.5s; }
.orbit-particle.p6 { bottom: 20%; left: 10%; animation-delay: -1.875s; }
.orbit-particle.p7 { top: 50%; left: 5%; animation-delay: -2.25s; }
.orbit-particle.p8 { top: 20%; left: 10%; animation-delay: -2.625s; }

/* 中心核心球 - 冰霜蓝白 */
.img-loader-core-orb {
    position: absolute;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #ffffff, #e0f7ff, #00d8ff);
    box-shadow: 
        0 0 15px rgba(255, 255, 255, 0.8),
        0 0 30px rgba(224, 247, 255, 0.6),
        0 0 50px rgba(0, 216, 255, 0.4),
        inset 0 0 12px rgba(255, 255, 255, 0.5);
    animation: img-loader-core-pulse 1.5s ease-in-out infinite;
    z-index: 2;
}

/* 进度环 */
.img-loader-progress-ring {
    position: absolute;
    width: 90%;
    height: 90%;
    transform: rotate(-90deg);
    z-index: 1;
}

.img-loader-progress-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.1);
    stroke-width: 3;
}

.img-loader-progress-bar {
    fill: none;
    stroke: url(#img-progress-gradient);
    stroke-width: 3;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.3s ease;
}

/* 计数器 */
.img-loader-counter {
    position: absolute;
    bottom: -28px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 1px;
}

/* 四叶草呼吸光晕 - 与跳动节奏同步 */
.img-loader-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.img-loader-particles::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 80px;
    height: 80px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: radial-gradient(circle, 
        rgba(0, 216, 255, 0.15) 0%, 
        rgba(0, 216, 255, 0.05) 40%, 
        transparent 70%
    );
    animation: clover-glow-breathe 1.2s ease-in-out infinite;
}

/* 第二层光晕 - 更大更淡 */
.img-loader-particles::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 120px;
    height: 120px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: radial-gradient(circle, 
        rgba(0, 216, 255, 0.08) 0%, 
        transparent 60%
    );
    animation: clover-glow-breathe 1.2s ease-in-out infinite 0.2s;
}

/* 旋转光晕 - 禁用 */
.img-loader-glow {
    display: none;
}

/* 图片揭示阶段 - 扫描线效果 */
.image-reveal-scanline {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(0, 216, 255, 0.8), transparent);
    box-shadow: 0 0 10px rgba(0, 216, 255, 0.5), 0 0 20px rgba(0, 216, 255, 0.3);
    animation: img-reveal-scan 1.2s ease-in-out;
    pointer-events: none;
    z-index: 10;
}

/* 图片模糊到清晰的揭示效果 */
.image-result-img.revealing {
    filter: blur(20px);
    opacity: 0;
    transform: scale(1.05);
    animation: img-reveal-blur 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* 加载器容器 - 旧版兼容 */
.img-loader-orb-wrap {
    position: relative;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
}

/* 旋转渐变环 - 旧版兼容 */
.img-loader-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: conic-gradient(
        from 0deg,
        transparent 0deg,
        rgba(99, 102, 241, 0.8) 90deg,
        rgba(168, 85, 247, 0.6) 180deg,
        rgba(59, 130, 246, 0.3) 270deg,
        transparent 360deg
    );
    animation: img-loader-ring-spin 1.2s linear infinite;
    -webkit-mask: radial-gradient(circle, transparent 58%, black 60%);
    mask: radial-gradient(circle, transparent 58%, black 60%);
}

/* 中心脉冲球 */
.img-loader-orb {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    animation: img-loader-orb-pulse 1.6s ease-in-out infinite;
    box-shadow: 0 0 24px rgba(99, 102, 241, 0.5), 0 0 8px rgba(168, 85, 247, 0.4);
    z-index: 1;
}

/* 状态文案 */
.img-loader-status {
    margin-top: 18px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 0.5px;
    z-index: 3;
    position: relative;
}

.img-status-fade {
    animation: img-status-fade-in 0.5s ease forwards;
}

/* ===== Keyframes ===== */

@keyframes img-loader-ring-spin {
    to { transform: rotate(360deg); }
}

@keyframes img-loader-orbit {
    0% {
        transform: rotate(0deg) translateX(36px) rotate(0deg);
    }
    100% {
        transform: rotate(360deg) translateX(36px) rotate(-360deg);
    }
}

@keyframes img-loader-core-pulse {
    0%, 100% {
        transform: scale(0.9);
        box-shadow: 
            0 0 15px rgba(0, 216, 255, 0.5),
            0 0 30px rgba(99, 102, 241, 0.3),
            inset 0 0 8px rgba(255, 255, 255, 0.2);
    }
    50% {
        transform: scale(1.15);
        box-shadow: 
            0 0 30px rgba(0, 216, 255, 0.8),
            0 0 60px rgba(99, 102, 241, 0.5),
            inset 0 0 15px rgba(255, 255, 255, 0.4);
    }
}

@keyframes img-loader-orb-pulse {
    0%, 100% {
        transform: scale(0.85);
        box-shadow: 0 0 16px rgba(99, 102, 241, 0.4), 0 0 6px rgba(168, 85, 247, 0.3);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 0 32px rgba(99, 102, 241, 0.6), 0 0 12px rgba(168, 85, 247, 0.5);
    }
}

@keyframes img-loader-bg-drift {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(3%, -2%) rotate(2deg); }
    66% { transform: translate(-2%, 3%) rotate(-2deg); }
}

@keyframes img-loader-shimmer {
    100% { left: 160%; }
}

@keyframes img-status-fade-in {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 粒子上升动画 */
@keyframes img-loader-particles-rise {
    0% {
        transform: translateY(100%);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100%);
        opacity: 0;
    }
}

/* 三角能量阵旋转 */
@keyframes img-triangle-rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 三角能量阵脉冲 */
@keyframes img-triangle-pulse {
    0%, 100% { 
        stroke-opacity: 0.4;
        filter: drop-shadow(0 0 2px rgba(0, 216, 255, 0.4));
    }
    50% { 
        stroke-opacity: 1;
        filter: drop-shadow(0 0 8px rgba(0, 216, 255, 0.8));
    }
}

/* 顶点粒子脉冲 */
@keyframes img-vertex-pulse {
    0%, 100% { 
        transform: translate(-50%, -50%) scale(0.9);
        opacity: 0.8;
    }
    50% { 
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 1;
    }
}

/* 四叶草跳动 */
@keyframes clover-bounce {
    0%, 100% { 
        transform: scale(0.9) rotate(0deg);
    }
    25% { 
        transform: scale(1.05) rotate(5deg);
    }
    50% { 
        transform: scale(1) rotate(0deg);
    }
    75% { 
        transform: scale(1.05) rotate(-5deg);
    }
}

/* 叶子脉冲 */
@keyframes leaf-pulse {
    0%, 100% { 
        opacity: 0.7;
        transform: scale(0.95);
        filter: brightness(0.9);
    }
    50% { 
        opacity: 1;
        transform: scale(1.05);
        filter: brightness(1.2);
    }
}

/* 中心发光 */
@keyframes center-glow {
    0%, 100% { 
        box-shadow: 
            0 0 10px rgba(255, 255, 255, 0.6),
            0 0 20px rgba(0, 216, 255, 0.4);
    }
    50% { 
        box-shadow: 
            0 0 20px rgba(255, 255, 255, 1),
            0 0 40px rgba(0, 216, 255, 0.8),
            0 0 60px rgba(0, 216, 255, 0.4);
    }
}

/* 环绕粒子浮动 */
@keyframes orbit-float {
    0%, 100% { 
        transform: translate(0, 0) scale(1);
        opacity: 0.6;
    }
    25% { 
        transform: translate(5px, -5px) scale(1.2);
        opacity: 1;
    }
    50% { 
        transform: translate(0, -10px) scale(1);
        opacity: 0.8;
    }
    75% { 
        transform: translate(-5px, -5px) scale(1.1);
        opacity: 1;
    }
}

/* 光晕旋转动画 */
@keyframes img-loader-glow-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 扫描线动画 */
@keyframes img-reveal-scan {
    0% {
        top: 0;
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        top: 100%;
        opacity: 0;
    }
}

/* 图片模糊揭示动画 */
@keyframes img-reveal-blur {
    0% {
        filter: blur(20px);
        opacity: 0;
        transform: scale(1.05);
    }
    100% {
        filter: blur(0);
        opacity: 1;
        transform: scale(1);
    }
}

.image-result-img:hover {
    transform: scale(1.02);
}

.image-result-grid {
    display: grid;
    gap: 8px;
    max-width: 100%;
}

.image-result-grid.image-grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.image-result-grid.image-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.image-result-grid.image-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.image-grid-item {
    border-radius: 0;
    overflow: hidden;
    position: relative;
}

.image-grid-item .image-result-img {
    width: 100%;
    height: 100%;
    max-height: 400px;
    object-fit: cover;
    display: block;
}

.image-grid-item:hover .image-result-img {
    transform: scale(1.03);
}

.image-loading {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    color: var(--text-secondary);
    font-size: 14px;
}

.image-loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.bg-generating {
    display: inline-flex;
    align-items: center;
    margin-left: 6px;
}

.gen-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #10b981;
    animation: genPulse 1.2s ease-in-out infinite;
}

@keyframes genPulse {
    0%, 100% { opacity: 0.4; transform: scale(0.8); }

    50% { opacity: 1; transform: scale(1.2); }

}

.revised-prompt {
    margin-top: 8px;
    padding: 8px 12px;
    background: var(--bg-hover);
    border-radius: 6px;
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.image-option-btn.active {
    color: var(--accent);
    background-color: var(--accent-light);
    border-color: var(--accent);
}

.history-panel {
    position: absolute;
    top: 100%;
    right: 0;
    width: 280px;
    max-height: 420px;
    background: rgba(8, 13, 25, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    z-index: 50;
    display: flex;
    flex-direction: column;
    animation: popupFadeIn 0.15s ease;
}

.history-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.history-panel-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 2px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}

.history-panel-close:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.08);
}

.history-panel-list {
    overflow-y: auto;
    flex: 1;
    padding: 6px;
}

.history-empty {
    padding: 24px;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
}

.history-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
    gap: 8px;
}

.history-item:hover {
    background: rgba(255, 255, 255, 0.06);
}

.history-item.active {
    background: rgba(255, 255, 255, 0.12);
}

.history-item-info {
    flex: 1;
    min-width: 0;
}

.history-item-title {
    font-size: 13px;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
}

.history-item.active .history-item-title {
    color: var(--accent);
    font-weight: 500;
}

.history-item-time {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

.history-item-delete {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all var(--transition);
    flex-shrink: 0;
}

.history-item:hover .history-item-delete {
    opacity: 1;
}

.history-item-delete:hover {
    color: #ef4444;
    background: #fef2f2;
}

/* ★ 修复：抽屉中长标题导致删除按钮被挤出屏幕 */
.history-item-content {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.history-item-content .history-item-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-item-actions {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* 全部删除按钮样式 */
.history-delete-all-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.history-delete-all-btn:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.image-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: lightboxFadeIn 0.2s ease;
}

@keyframes lightboxFadeIn {
    from { opacity: 0; }

    to { opacity: 1; }

}

.lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
}

.lightbox-content {
    position: relative;
    z-index: 1;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.lightbox-close {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    backdrop-filter: blur(4px);
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.lightbox-download {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 2;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    backdrop-filter: blur(4px);
}

.lightbox-download:hover {
    background: rgba(255, 255, 255, 0.3);
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0,0,0,0.4);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: white;
    border-radius: var(--radius-md);
    width: 90%;
    max-width: 500px;
    box-shadow: var(--shadow-lg);
}

.settings-modal-content {
    max-width: 620px;
    border-radius: 24px;
}

.modal-header {
    padding: 18px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 17px;
    font-weight: 600;
}

.settings-header-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.settings-header-text h3 {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.15;
}

.settings-header-text p {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.close-modal {
    font-size: 24px;
    color: var(--text-secondary);
    line-height: 1;
}

.close-modal:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.settings-modal-body {
    gap: 16px;
}

.settings-group {
    padding: 18px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.015));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.settings-group + .settings-group {
    margin-top: 2px;
}

.settings-group-head {
    margin-bottom: 14px;
}

.settings-group-kicker {
    display: inline-block;
    margin-bottom: 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.settings-group-head h4 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.settings-group-head p {
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.5;
    color: var(--text-secondary);
}

.setting-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.settings-group .setting-item:first-of-type {
    padding-top: 0;
    border-top: none;
}

.setting-item label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
}

.setting-hint {
    font-size: 11px;
    font-weight: 400;
    color: var(--text-muted);
    margin-left: 4px;
}

.setting-input {
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    transition: border-color var(--transition);
    background: #fff;
    color: var(--text-primary);
}

.setting-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    resize: vertical;
    font-family: inherit;
    transition: border-color var(--transition);
}

.setting-textarea:focus,
.setting-input:focus {
    outline: none;
    border-color: var(--accent);
}

.setting-range {
    width: 100%;
}

.usage-mode-setting-hint {
    margin-top: 8px;
    display: block;
    line-height: 1.5;
}

.usage-mode-manage-btn {
    margin-top: 10px;
    align-self: flex-start;
    border-radius: 10px;
}

.modal-footer {
    padding: 14px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
}

.settings-footnote {
    font-size: 12px;
    line-height: 1.6;
    color: var(--text-muted);
    padding: 2px 2px 0;
}

.btn-block {
    width: 100%;
    text-align: center;
}

.modal-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 8px;
    transition: border-color var(--transition);
}

.modal-input:focus {
    outline: none;
    border-color: var(--accent);
}

.modal-input-label {
    margin-bottom: 0;
}

.welcome-modal-content {
    text-align: center;
    padding-top: 28px;
}

.welcome-modal-icon {
    font-size: 44px;
    margin-bottom: 10px;
}

.welcome-modal-logo {
    width: 180px;
    height: auto;
    margin-bottom: 16px;
}

.welcome-modal-content h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.welcome-steps {
    text-align: left;
    padding: 0 24px;
}

.welcome-step {
    display: flex;
    gap: 14px;
    margin-bottom: 18px;
    align-items: flex-start;
}

.step-num {
    width: 26px;
    height: 26px;
    background-color: var(--accent);
    color: var(--text-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    flex-shrink: 0;
}

.step-body {
    flex: 1;
}

.step-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.step-btn {
    font-size: 13px;
    padding: 8px 16px;
}

.welcome-skip {
    display: block;
    margin: 10px auto 18px;
    color: var(--text-muted);
    font-size: 13px;
    transition: color var(--transition);
}

.welcome-skip:hover {
    color: var(--text-secondary);
}

.key-manager-modal {
    max-width: 480px;
}

.key-add-modal {
    max-width: 440px;
}

.key-manager-modal .modal-header,
.key-add-modal .modal-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--border-light);
}

.modal-header-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--accent-light) 0%, rgba(37, 99, 235, 0.08) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    flex-shrink: 0;
}

.modal-header-text {
    flex: 1;
    min-width: 0;
}

.modal-header-text h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 4px;
}

.modal-header-text p {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0;
}

.key-status-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.06) 0%, rgba(16, 185, 129, 0.02) 100%);
    border: 1px solid rgba(16, 185, 129, 0.15);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
}

.key-status-bar.no-key {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.06) 0%, rgba(245, 158, 11, 0.02) 100%);
    border-color: rgba(245, 158, 11, 0.15);
}

.key-status-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--success);
    flex-shrink: 0;
}

.key-status-bar.no-key .key-status-icon {
    background: rgba(245, 158, 11, 0.1);
    color: var(--thinking-color);
}

.key-status-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.key-status-label {
    font-size: 12px;
    color: var(--text-muted);
}

.key-status-value {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.key-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
    max-height: 280px;
    overflow-y: auto;
    padding-right: 4px;
}

.key-list-empty {
    text-align: center;
    color: var(--text-muted);
    padding: 40px 24px;
    font-size: 14px;
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    border: 1px dashed var(--border-color);
}

.key-list-empty::before {
    content: '🔑';
    display: block;
    font-size: 32px;
    margin-bottom: 8px;
}

.key-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
}

.key-list-item:hover {
    border-color: var(--accent);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.08);
    transform: translateY(-1px);
}

.key-list-item.active {
    border-color: var(--accent);
    background: linear-gradient(135deg, var(--accent-light) 0%, rgba(37, 99, 235, 0.04) 100%);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}

.key-list-item.active .key-list-label::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background: var(--success);
    border-radius: 50%;
    margin-right: 8px;
    vertical-align: middle;
}

.key-list-info {
    flex: 1;
    min-width: 0;
}

.key-list-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.key-list-key {
    font-size: 12px;
    color: var(--text-muted);
    font-family: 'Consolas', 'Monaco', monospace;
    letter-spacing: 0.5px;
}

.key-list-actions {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-shrink: 0;
    margin-left: 12px;
}

.key-active-tag {
    font-size: 11px;
    padding: 4px 10px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
    color: var(--text-primary);
    border-radius: 20px;
    font-weight: 500;
}

.key-switch-btn {
    padding: 6px 14px;
    font-size: 12px;
    border-radius: var(--radius-sm);
    background: var(--bg-hover);
    color: var(--text-primary);
    transition: all var(--transition);
    border: none;
    cursor: pointer;
    font-weight: 500;
}

.key-switch-btn:hover {
    background: var(--accent);
    color: var(--text-primary);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

.key-delete-btn {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: var(--text-muted);
    transition: all var(--transition);
    border: none;
    background: transparent;
    cursor: pointer;
}

.key-delete-btn:hover {
    background-color: #fef2f2;
    color: var(--danger);
}

.key-list-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid var(--border-light);
}

.key-help-link {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-muted);
    text-decoration: none;
    transition: all var(--transition);
}

.key-help-link:hover {
    color: var(--accent);
}

.key-help-link svg {
    flex-shrink: 0;
}

.btn-add-key {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
    color: var(--text-primary);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
}

.btn-add-key:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-add-key svg {
    flex-shrink: 0;
}

.key-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
}

.form-label svg {
    color: var(--text-muted);
    flex-shrink: 0;
}

.form-input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 14px;
    transition: all var(--transition);
    outline: none;
}

.form-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}

.form-input::placeholder {
    color: var(--text-muted);
    font-size: 13px;
}

.form-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.key-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.key-input-wrapper .form-input {
    padding-right: 44px;
}

.key-toggle-visible {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition);
}

.key-toggle-visible:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.key-add-modal .modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 24px 20px;
    border-top: 1px solid var(--border-light);
}

.key-add-modal .modal-footer .btn-secondary {
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
}

.key-add-modal .modal-footer .btn-secondary:hover {
    background: var(--bg-hover);
    border-color: var(--text-muted);
}

.key-add-modal .modal-footer .btn-primary {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    border: none;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
}

.key-add-modal .modal-footer .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.loading-indicator {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid var(--border-color);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.stream-cursor {
    animation: blink 0.8s ease-in-out infinite;
    color: var(--text-secondary);
    font-weight: 400;
}

@keyframes blink {
    0%, 100% { opacity: 1; }

    50% { opacity: 0; }

}

@keyframes spin {
    to { transform: rotate(360deg); }

}

.prompt-presets {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

.prompt-preset {
    padding: 10px 8px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    text-align: center;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition);
    position: relative;
}

.prompt-preset:hover {
    border-color: var(--accent);
    color: var(--accent);
    background-color: var(--accent-light);
}

.prompt-preset.active {
    border-color: var(--accent);
    color: var(--accent);
    background-color: var(--accent-light);
}

.prompt-preset-delete {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--danger);
    color: var(--text-primary);
    font-size: 10px;
    display: none;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    line-height: 1;
}

.prompt-preset.custom:hover .prompt-preset-delete {
    display: flex;
}

.prompt-section-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.prompt-section-hint {
    font-size: 11px;
    font-weight: 400;
    color: var(--text-muted);
}

.prompt-custom-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    justify-content: flex-end;
}

.prompt-btn-active {
    color: var(--accent) !important;
}

.tts-player {
    position: fixed;
    bottom: 100px;
    right: 24px;
    z-index: 500;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
    animation: msgFadeIn 0.3s ease;
}

.tts-player-inner {
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 260px;
}

.tts-close {
    position: absolute;
    top: 6px;
    right: 8px;
    font-size: 14px;
    color: var(--text-muted);
}

.tts-close:hover {
    color: var(--text-primary);
}

.tts-info {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

.tts-player audio {
    width: 100%;
    height: 36px;
}

@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        bottom: 0;
        z-index: 200;
        transition: left 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .sidebar.open {
        left: 0;
    }

    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.58);
        z-index: 199;
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
    }

    .sidebar-overlay.active {
        display: block;
    }

    .toggle-sidebar {
        display: block;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .message-content {
        max-width: 90%;
    }

    .message-body {
        max-width: 90%;
    }

    .input-area {
        padding: 0 12px 12px;
        padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    }

    .input-container {
        max-width: none;
        padding-left: 0;
    }

    .asset-entry-rail {
        margin-right: 0;
    }

    .asset-entry-btn {
        width: 34px;
        height: 34px;
        min-height: 34px;
        padding: 0;
        border-radius: 5px;
    }

    .asset-entry-icon {
        border-radius: 5px;
    }

    .messages-container {
        padding: 16px 0 44px;
    }

    .message {
        padding: 10px 12px;
    }

    .message-actions {
        opacity: 1;
    }

    .input-toolbar {
        flex-wrap: wrap;
        padding: 12px 14px 14px;
    }

    .role-status-chip {
        left: 14px;
        top: 12px;
        max-width: calc(100% - 120px);
    }

    .reference-stage {
        top: 14px;
        left: 16px;
        width: 144px;
        height: 98px;
    }

    .empty-reference-trigger {
        width: 58px;
        height: 78px;
        left: 34px;
    }

    .chat-input-box.has-reference-stage textarea {
        padding-left: 168px;
        min-height: 98px;
    }

    .reference-stage.has-images .empty-reference-trigger {
        top: 64px;
        left: 108px;
        width: 30px;
        height: 30px;
    }

    .input-toolbar-left {
        flex-wrap: wrap;
        gap: 6px;
    }

    .route-strategy-popup {
        width: min(320px, calc(100vw - 24px));
    }

    .input-toolbar-right {
        margin-left: auto;
    }

    .tool-btn {
        padding: 6px 10px;
        font-size: 11px;
    }

    .toolbar {
        padding: 12px 14px;
    }

    .welcome-logo-img {
        width: 124px;
    }

    .welcome-content {
        padding: 28px 18px;
        border-radius: 26px;
    }

    .welcome-prompt-grid,
    .welcome-features {
        grid-template-columns: 1fr;
    }

    .toolbar-home-text,
    .toolbar-kicker {
        display: none;
    }

    .toolbar-home-link {
        padding: 8px 10px;
    }

    .current-model-name {
        font-size: 18px;
    }

    .content-area {
        padding: 0 12px;
    }

    .scroll-bottom-btn {
        right: 16px;
        bottom: 172px;
        padding: 10px 12px;
    }

    .scroll-bottom-btn span {
        display: none;
    }

    .chat-input-box textarea {
        font-size: 16px;
    }

    .chat-input-box.has-reference-stage .input-hint {
        padding-left: 168px;
    }

    .input-hint {
        display: none;
    }

    .toast-container {
        top: auto;
        bottom: 80px;
        right: 12px;
        left: 12px;
    }

    .toast {
        max-width: 100%;
        font-size: 13px;
        padding: 10px 16px;
    }
}

@media (max-width: 480px) {
    .message {
        padding: 8px 8px;
        gap: 8px;
    }

    .message-body {
        max-width: 92%;
    }

    .message.user .message-content {
        padding: 8px 12px;
        font-size: 13px;
    }

    .welcome-logo-img {
        width: 80px;
    }

    .welcome-desc {
        font-size: 13px;
    }

    .welcome-feature-item h4 {
        font-size: 13px;
    }

    .welcome-feature-item p {
        font-size: 11px;
    }

    .model-selector h2 {
        font-size: 14px;
    }

    .welcome-prompt-card {
        padding: 16px 14px;
    }

    .scroll-bottom-btn {
        right: 12px;
        bottom: 156px;
    }

    .msg-action-btn {
        padding: 3px 6px;
        font-size: 10px;
    }

    .msg-action-btn svg {
        width: 12px;
        height: 12px;
    }
}

@media (hover: none) {
    .message-footer {
        opacity: 0.85;
    }
}


/* Frame Upload Panel (首尾�? */
.frame-upload-panel {
    display: none;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    border: 1px solid var(--border-color);
    border-bottom: none;
    margin-bottom: -1px;
}

.frame-upload-panel.visible {
    display: flex;
}

.frame-slot {
    position: relative;
    width: 80px;
    height: 80px;
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    overflow: hidden;
    background: var(--bg-primary);
}

.frame-slot:hover {
    border-color: var(--accent);
    background: var(--bg-hover);
}

.frame-slot.has-image {
    border-style: solid;
    border-color: var(--accent);
}

.frame-slot-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--text-tertiary);
    pointer-events: none;
}

.frame-slot-placeholder svg {
    opacity: 0.5;
}

.frame-slot-placeholder span {
    font-size: 11px;
    font-weight: 500;
}

.frame-slot-preview {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
}

.frame-slot-remove {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(0,0,0,0.6);
    color: var(--text-primary);
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
    z-index: 2;
    transition: background 0.2s;
}

.frame-slot-remove:hover {
    background: var(--danger);
}

.frame-slot-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 10px;
    font-weight: 500;
    color: var(--text-primary);
    background: linear-gradient(transparent, rgba(0,0,0,0.6));
    padding: 2px 0;
    border-radius: 0 0 6px 6px;
    pointer-events: none;
}

.frame-slot.has-image .frame-slot-label {
    display: block;
}

.frame-slot:not(.has-image) .frame-slot-label {
    display: none;
}

.frame-slot-arrow {
    color: var(--text-tertiary);
    display: flex;
    align-items: center;
    opacity: 0.4;
}

/* === Badge + wrapper (GitHub style) === */
.badge-wrap {
    position: relative;
    display: inline-flex;
}
.badge-count {
    position: absolute;
    top: -2px;
    right: -2px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 2px solid rgba(4, 8, 20, 0.96);
    box-sizing: border-box;
    box-shadow: 0 0 0 1px rgba(239,68,68,0.2);
    pointer-events: none;
    user-select: none;
}

/* === Notice panel (ChatGPT/GitHub dropdown style) === */
.notice-panel {
    position: fixed;
    top: 52px;
    right: 12px;
    width: 400px;
    max-height: 75vh;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.2), 0 0 0 1px rgba(255,255,255,0.05) inset;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: notice-panel-in 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes notice-panel-in {
    from { opacity: 0; transform: translateY(-8px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.notice-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px 12px;
}
.notice-panel-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}
.notice-panel-close {
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    transition: all 0.15s;
}
.notice-panel-close:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}
.notice-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 0 0 8px;
}
.notice-panel-loading,
.notice-panel-empty {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-tertiary);
    font-size: 13px;
}

/* Notice item in panel */
.notice-panel-item {
    padding: 12px 20px;
    cursor: pointer;
    transition: background 0.15s;
    position: relative;
}
.notice-panel-item:not(:last-child)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20px;
    right: 20px;
    height: 1px;
    background: var(--border-color);
}
.notice-panel-item:hover {
    background: var(--bg-hover);
}
.notice-panel-item.unread {
    background: rgba(255,255,255,0.03);
}
.notice-panel-item.unread:hover {
    background: rgba(255,255,255,0.06);
}
.notice-panel-item-top {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}
.notice-panel-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: 0.02em;
}
.notice-panel-badge.new {
    background: rgba(255,255,255,0.1);
    color: #ffffff;
}
.notice-panel-badge.update {
    background: rgba(16,185,129,0.1);
    color: #34d399;
}
.notice-panel-badge.notice {
    background: rgba(245,158,11,0.1);
    color: #fbbf24;
}
.notice-panel-badge.urgent {
    background: rgba(239,68,68,0.1);
    color: #f87171;
}
.notice-panel-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.notice-panel-unread-dot {
    width: 7px;
    height: 7px;
    background: #ffffff;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 0 2px rgba(255,255,255,0.2);
}
.notice-panel-content {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notice-panel-content img {
    display: none !important;
}
.notice-panel-date {
    font-size: 11px;
    color: var(--text-tertiary);
    margin-top: 6px;
}

/* Expanded notice detail */
.notice-panel-detail {
    padding: 20px;
    animation: notice-detail-in 0.2s ease;
}
@keyframes notice-detail-in {
    from { opacity: 0; transform: translateX(8px); }
    to { opacity: 1; transform: translateX(0); }
}
.notice-panel-detail-back {
    background: none;
    border: none;
    color: var(--accent);
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    padding: 4px 0;
    margin-bottom: 16px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: gap 0.15s;
}
.notice-panel-detail-back:hover {
    gap: 6px;
}
.notice-panel-detail h4 {
    margin: 0 0 12px;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}
.notice-panel-detail p {
    margin: 0;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.8;
    white-space: pre-wrap;
}

.notice-panel-detail-content {
    display: grid;
    gap: 12px;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.8;
}

.notice-panel-detail-content img {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
}

.notice-panel-detail-content a {
    color: var(--accent);
    word-break: break-all;
}

.notice-image-error {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 140px;
    border-radius: 16px;
    border: 1px dashed rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
    font-size: 13px;
}
.notice-panel-detail .notice-panel-date {
    margin-top: 16px;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .notice-panel {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        max-height: 100vh;
        border-radius: 0;
        animation: none;
    }
    .video-play-btn {
        width: 52px;
        height: 52px;
    }
    .video-play-btn svg {
        width: 20px;
        height: 20px;
    }
    .video-item-actions .msg-action-btn {
        width: 28px;
        height: 28px;
    }
    .video-result-grid.video-grid-3,
    .video-result-grid.video-grid-4 {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    .video-progress {
        padding: 12px 14px;
    }
}

.welcome-feature-item:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
    transform: translateY(-2px);
}
/* ==========================================================================
   背景层：宇宙舞台 (Blue/Purple original)
   ========================================================================== */
.chat-page-shell {
    position: relative;
    min-height: 100vh;
    isolation: isolate;
}

.chat-space-bg {
    display: none !important;
}

.chat-space-base,
.chat-space-nebula,
.chat-space-stars,
.chat-space-mask {
    position: absolute;
    inset: 0;
}

.chat-space-base {
    background:
        radial-gradient(circle at 50% -10%, rgba(255, 255, 255, 0.02), transparent 30%),
        radial-gradient(circle at 88% 12%, rgba(255, 255, 255, 0.01), transparent 22%),
        radial-gradient(circle at 12% 20%, rgba(255, 255, 255, 0.015), transparent 24%),
        linear-gradient(180deg, #0a0a0c 0%, #060608 38%, #000000 100%);
}

.chat-space-nebula {
    filter: blur(18px);
    opacity: 0.9;
}

.chat-space-nebula::before,
.chat-space-nebula::after {
    content: '';
    position: absolute;
    border-radius: 999px;
    filter: blur(24px);
}

.chat-space-nebula::before {
    top: -8%;
    left: -4%;
    width: 36vw;
    height: 36vw;
    min-width: 320px;
    min-height: 320px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.015) 26%, rgba(255, 255, 255, 0) 68%);
}

.chat-space-nebula::after {
    top: -10%;
    right: -10%;
    width: 42vw;
    height: 42vw;
    min-width: 340px;
    min-height: 340px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 30%, rgba(255, 255, 255, 0) 72%);
}

.chat-space-stars {
    width: 100%;
    height: 100%;
    opacity: 0.6;
}

.chat-space-mask {
    background:
        radial-gradient(circle at 50% 18%, rgba(10, 10, 12, 0) 0%, rgba(10, 10, 12, 0.18) 38%, rgba(10, 10, 12, 0.52) 68%, rgba(0, 0, 0, 0.88) 100%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.06) 0%, rgba(10, 10, 12, 0.28) 22%, rgba(10, 10, 12, 0.56) 58%, rgba(0, 0, 0, 0.84) 100%);
}

.code-block pre {
    overflow-x: auto !important;
}

/* ===== 现代视频生成加载动画 ===== */

/* ===== 视频生成加载动画（风格A：极简磨砂）===== */

.video-loading-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    aspect-ratio: auto;
    background: linear-gradient(135deg, #18181b 0%, #0f0f12 100%);
    border: none;
    border-radius: 0;
    position: relative;
    overflow: hidden;
    transition: background 0.4s ease;
}

/* 极简径向光晕 */
.video-loading-placeholder::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 50%, rgba(99, 102, 241, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

/* 禁用旧扫光效果 */
.video-loading-placeholder::after {
    display: none;
}

/* 隐藏旧的视频加载器元素 */
.vid-loader-core,
.vid-loader-ring-outer,
.vid-loader-ring-mid,
.vid-loader-ring-inner,
.vid-loader-orbit-particle {
    display: none !important;
}

/* 外层旋转环 */
.vid-loader-ring-outer {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: conic-gradient(
        from 0deg,
        transparent 0deg,
        rgba(0, 216, 255, 0.8) 60deg,
        rgba(99, 102, 241, 0.6) 120deg,
        rgba(168, 85, 247, 0.4) 180deg,
        transparent 360deg
    );
    animation: img-loader-ring-spin 2s linear infinite;
    -webkit-mask: radial-gradient(circle, transparent 62%, black 64%);
    mask: radial-gradient(circle, transparent 62%, black 64%);
}

/* 中层旋转环 */
.vid-loader-ring-mid {
    position: absolute;
    width: 76%;
    height: 76%;
    border-radius: 50%;
    background: conic-gradient(
        from 180deg,
        transparent 0deg,
        rgba(0, 216, 255, 0.6) 90deg,
        rgba(99, 102, 241, 0.8) 180deg,
        transparent 360deg
    );
    animation: img-loader-ring-spin 1.5s linear infinite reverse;
    -webkit-mask: radial-gradient(circle, transparent 58%, black 60%);
    mask: radial-gradient(circle, transparent 58%, black 60%);
}

/* 内层旋转环 */
.vid-loader-ring-inner {
    position: absolute;
    width: 52%;
    height: 52%;
    border-radius: 50%;
    background: conic-gradient(
        from 90deg,
        transparent 0deg,
        rgba(0, 216, 255, 0.9) 120deg,
        rgba(168, 85, 247, 0.7) 240deg,
        transparent 360deg
    );
    animation: img-loader-ring-spin 1s linear infinite;
    -webkit-mask: radial-gradient(circle, transparent 52%, black 54%);
    mask: radial-gradient(circle, transparent 52%, black 54%);
}

/* 轨道粒子 - 流星拖尾效果 */
.vid-loader-orbit-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 
        0 0 6px #ffffff,
        0 0 12px rgba(224, 247, 255, 0.8),
        0 0 20px rgba(0, 216, 255, 0.4);
    animation: img-loader-orbit 3s ease-in-out infinite;
}

/* 流星拖尾 */
.vid-loader-orbit-particle::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 2px;
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0.9) 0%,
        rgba(224, 247, 255, 0.6) 40%,
        rgba(0, 216, 255, 0.2) 70%,
        transparent 100%
    );
    transform: translate(-50%, -50%) rotate(180deg);
    border-radius: 1px;
    pointer-events: none;
}

.vid-loader-orbit-particle:nth-child(4) {
    animation-delay: 0s;
    animation-duration: 3s;
}

.vid-loader-orbit-particle:nth-child(4)::after {
    width: 20px;
    opacity: 0.9;
}

.vid-loader-orbit-particle:nth-child(5) {
    animation-delay: -1s;
    animation-duration: 2.5s;
    background: #e0f7ff;
    box-shadow: 
        0 0 8px #e0f7ff,
        0 0 16px rgba(0, 216, 255, 0.7),
        0 0 28px rgba(0, 153, 204, 0.3);
}

.vid-loader-orbit-particle:nth-child(5)::after {
    width: 32px;
    height: 3px;
    background: linear-gradient(90deg, 
        rgba(224, 247, 255, 0.95) 0%,
        rgba(0, 216, 255, 0.5) 50%,
        transparent 100%
    );
    opacity: 0.85;
}

.vid-loader-orbit-particle:nth-child(6) {
    animation-delay: -2s;
    animation-duration: 3.5s;
    background: #ffffff;
    box-shadow: 
        0 0 10px #ffffff,
        0 0 20px rgba(0, 216, 255, 0.6),
        0 0 35px rgba(0, 153, 204, 0.4);
}

.vid-loader-orbit-particle:nth-child(6)::after {
    width: 40px;
    height: 4px;
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 1) 0%,
        rgba(224, 247, 255, 0.7) 30%,
        rgba(0, 216, 255, 0.3) 60%,
        transparent 100%
    );
    opacity: 0.75;
}

/* 中心核心球 */
.vid-loader-core-orb {
    position: absolute;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #00d8ff, #6366f1);
    box-shadow: 
        0 0 20px rgba(0, 216, 255, 0.6),
        0 0 40px rgba(99, 102, 241, 0.4),
        inset 0 0 10px rgba(255, 255, 255, 0.3);
    animation: img-loader-core-pulse 1.5s ease-in-out infinite;
    z-index: 2;
}

/* 进度环 */
.vid-loader-progress-ring {
    position: absolute;
    width: 90%;
    height: 90%;
    transform: rotate(-90deg);
    z-index: 1;
}

.vid-loader-progress-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.1);
    stroke-width: 3;
}

.vid-loader-progress-bar {
    fill: none;
    stroke: url(#vid-progress-gradient);
    stroke-width: 3;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.3s ease;
}

/* 视频加载 - 粒子上升背景 */
.vid-loader-particles {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.vid-loader-particles::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 100%, rgba(0, 216, 255, 0.3) 0%, transparent 2px),
        radial-gradient(circle at 40% 100%, rgba(168, 85, 247, 0.3) 0%, transparent 1.5px),
        radial-gradient(circle at 60% 100%, rgba(99, 102, 241, 0.3) 0%, transparent 2px),
        radial-gradient(circle at 80% 100%, rgba(0, 216, 255, 0.3) 0%, transparent 1.5px);
    background-size: 100% 100%;
    animation: img-loader-particles-rise 3s ease-out infinite;
}

/* 视频加载 - 旋转光晕 */
.vid-loader-glow {
    position: absolute;
    width: 200%;
    height: 200%;
    background: conic-gradient(
        from 0deg,
        transparent 0deg,
        rgba(0, 216, 255, 0.03) 60deg,
        rgba(168, 85, 247, 0.05) 120deg,
        rgba(99, 102, 241, 0.03) 180deg,
        transparent 240deg,
        transparent 360deg
    );
    animation: img-loader-glow-spin 8s linear infinite;
    pointer-events: none;
    z-index: 0;
}

/* 加载器容器 - 旧版兼容 */
.vid-loader-orb-wrap {
    position: relative;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
}

/* 旋转渐变环 - 旧版兼容 */
.vid-loader-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: conic-gradient(
        from 0deg,
        transparent 0deg,
        rgba(99, 102, 241, 0.8) 90deg,
        rgba(168, 85, 247, 0.6) 180deg,
        rgba(59, 130, 246, 0.3) 270deg,
        transparent 360deg
    );
    animation: img-loader-ring-spin 1.2s linear infinite;
    -webkit-mask: radial-gradient(circle, transparent 58%, black 60%);
    mask: radial-gradient(circle, transparent 58%, black 60%);
}

/* 中心脉冲球 */
.vid-loader-orb {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    animation: img-loader-orb-pulse 1.6s ease-in-out infinite;
    box-shadow: 0 0 24px rgba(99, 102, 241, 0.5), 0 0 8px rgba(168, 85, 247, 0.4);
    z-index: 1;
}

/* 状态文案 */
.vid-loader-status {
    margin-top: 18px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 0.5px;
    z-index: 3;
    position: relative;
}

.vid-status-fade {
    animation: img-status-fade-in 0.5s ease forwards;
}

/* 底部进度条 */
.vid-loader-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    z-index: 3;
}

.vid-loader-bar-track {
    height: 100%;
    background: rgba(255, 255, 255, 0.06);
    overflow: hidden;
}

.vid-loader-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #6366f1 0%, #a855f7 50%, #3b82f6 100%);
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 8px rgba(99, 102, 241, 0.5);
}

/* ==================== AI 工坊 ==================== */

/* ---- 工坊 Tab ---- */
.tab-item.tab-item-workshop {
    position: relative;
}
.tab-item.tab-item-workshop.active {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    box-shadow: 0 2px 12px rgba(99, 102, 241, 0.35);
}

/* ---- 侧边栏工具卡片 ---- */
.workshop-tool-card {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 11px 12px;
    margin-bottom: 6px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}
.workshop-tool-card::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: var(--ws-grad, linear-gradient(180deg, #6366f1, #a855f7));
    border-radius: 0 3px 3px 0;
    opacity: 0;
    transition: opacity 0.25s;
}
.workshop-tool-card:hover {
    background: rgba(255, 255, 255, 0.055);
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateX(2px);
}
.workshop-tool-card:hover::before {
    opacity: 0.6;
}
.workshop-tool-card.active {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.25);
}
.workshop-tool-card.active::before {
    opacity: 1;
}
.workshop-tool-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 18px;
    background: var(--ws-icon-bg, rgba(99, 102, 241, 0.1));
    border: 1px solid var(--ws-icon-border, rgba(99, 102, 241, 0.15));
}
.workshop-tool-info {
    flex: 1;
    min-width: 0;
}
.workshop-tool-name {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.88);
    margin-bottom: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.workshop-tool-desc {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.35);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.workshop-tool-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    font-size: 8px;
    padding: 2px 6px;
    border-radius: 999px;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    color: #fff;
    font-weight: 700;
    letter-spacing: 0.5px;
    line-height: 1;
}

/* ---- 主容器 ---- */
.workshop-container {
    width: 100%;
    padding-bottom: 40px;
    animation: wsFadeIn 0.4s ease;
}
@keyframes wsFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---- 通用页面 ---- */
.workshop-page {
    max-width: 860px;
    margin: 0 auto;
    padding: 28px 24px 48px;
}
.workshop-page-header {
    margin-bottom: 24px;
}
.workshop-page-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.45);
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 8px;
    transition: all 0.2s;
    margin-bottom: 12px;
}
.workshop-page-back:hover {
    color: rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.05);
}
.workshop-page-title {
    font-size: 24px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 6px;
    letter-spacing: -0.02em;
}
.workshop-page-subtitle {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.45);
    line-height: 1.6;
}

/* ---- 模型选择器 ---- */
.ws-model-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
    margin-bottom: 20px;
}
.ws-model-bar-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 500;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
}
.ws-model-bar-label svg {
    opacity: 0.5;
}
.ws-model-select {
    flex: 1;
    padding: 7px 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.85);
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 30px;
}
.ws-model-select:hover {
    border-color: rgba(99, 102, 241, 0.3);
    background-color: rgba(255, 255, 255, 0.07);
}
.ws-model-select:focus {
    outline: none;
    border-color: rgba(99, 102, 241, 0.5);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}
.ws-model-select option {
    background: #1a1a2e;
    color: #fff;
    padding: 8px;
}

/* ---- 表单 ---- */
.workshop-form {
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
}
.workshop-form-group {
    margin-bottom: 18px;
}
.workshop-form-group:last-child {
    margin-bottom: 0;
}
.workshop-form-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 7px;
    letter-spacing: 0.01em;
}
.workshop-form-label .ws-required {
    color: #ef4444;
    margin-left: 2px;
}
.workshop-form-input,
.workshop-form-textarea,
.workshop-form-select {
    width: 100%;
    padding: 11px 14px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s;
    box-sizing: border-box;
}
.workshop-form-input:focus,
.workshop-form-textarea:focus,
.workshop-form-select:focus {
    outline: none;
    border-color: rgba(99, 102, 241, 0.45);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.08);
}
.workshop-form-textarea {
    min-height: 90px;
    resize: vertical;
    line-height: 1.6;
}
.workshop-form-input::placeholder,
.workshop-form-textarea::placeholder {
    color: rgba(255, 255, 255, 0.25);
}
.workshop-form-row {
    display: flex;
    gap: 14px;
}
.workshop-form-row > .workshop-form-group {
    flex: 1;
}
.workshop-form-select {
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
    cursor: pointer;
}
.workshop-form-select option {
    background: #1a1a2e;
    color: #fff;
}

/* ---- 按钮 ---- */
.workshop-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 24px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: inherit;
    white-space: nowrap;
}
.workshop-btn-primary {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    box-shadow: 0 2px 12px rgba(99, 102, 241, 0.25);
}
.workshop-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.35);
}
.workshop-btn-primary:active {
    transform: translateY(0);
}
.workshop-btn-primary:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}
.workshop-btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.workshop-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.15);
}

/* ---- 加载动画 ---- */
.workshop-generating {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 50px 20px;
    text-align: center;
}
.ws-loading-orb {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, transparent, #6366f1, #a855f7, transparent);
    animation: wsOrbSpin 1.2s linear infinite;
    position: relative;
    margin-bottom: 20px;
}
.ws-loading-orb::after {
    content: '';
    position: absolute;
    inset: 4px;
    border-radius: 50%;
    background: #0f0f11;
}
@keyframes wsOrbSpin {
    to { transform: rotate(360deg); }
}
.workshop-generating-text {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.6;
    margin-bottom: 4px;
}
.workshop-generating-steps {
    margin-top: 14px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.3);
    text-align: left;
}
.workshop-generating-step {
    padding: 3px 0;
    opacity: 0;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}
.workshop-generating-step::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    flex-shrink: 0;
    transition: all 0.3s;
}
.workshop-generating-step.active {
    opacity: 1;
    color: rgba(129, 140, 248, 0.9);
}
.workshop-generating-step.active::before {
    background: #818cf8;
    box-shadow: 0 0 8px rgba(129, 140, 248, 0.5);
}
.workshop-generating-step.done {
    opacity: 0.4;
    color: rgba(74, 222, 128, 0.5);
}
.workshop-generating-step.done::before {
    background: rgba(74, 222, 128, 0.5);
}

/* ---- PPT 幻灯片 ---- */
.ppt-toolbar {
    display: flex;
    gap: 10px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}
.ppt-slides-preview {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.ppt-slide-card {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.25);
    transition: transform 0.2s, box-shadow 0.2s;
}
.ppt-slide-card:hover {
    transform: scale(1.008);
    box-shadow: 0 4px 28px rgba(0, 0, 0, 0.35);
}
.ppt-slide-content {
    padding: 36px 32px;
    min-height: 260px;
    position: relative;
}
.ppt-slide-bg-dark .ppt-slide-content {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    color: #fff;
}
.ppt-slide-bg-light .ppt-slide-content {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    color: #1a1a2e;
}
.ppt-slide-bg-gradient .ppt-slide-content {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
}
.ppt-slide-number {
    position: absolute;
    top: 14px;
    right: 18px;
    font-size: 11px;
    opacity: 0.35;
    font-weight: 600;
}
.ppt-slide-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 14px;
    line-height: 1.3;
}
.ppt-slide-body {
    font-size: 14px;
    line-height: 1.8;
    white-space: pre-wrap;
}
.ppt-slide-footer {
    padding: 7px 16px;
    background: rgba(0, 0, 0, 0.025);
    font-size: 10px;
    color: rgba(0, 0, 0, 0.25);
    display: flex;
    justify-content: space-between;
}
.ppt-slide-bg-dark .ppt-slide-footer,
.ppt-slide-bg-gradient .ppt-slide-footer {
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.25);
}

/* ---- 网页预览 ---- */
.ws-preview-frame {
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
}
.ws-preview-bar {
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.04);
    display: flex;
    align-items: center;
    gap: 7px;
}
.ws-preview-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    display: inline-block;
}
.ws-preview-dot.red { background: #ff5f57; }
.ws-preview-dot.yellow { background: #febc2e; }
.ws-preview-dot.green { background: #28c840; }
.ws-preview-label {
    flex: 1;
    text-align: center;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.25);
}

/* ---- Agent 对话 ---- */
.ws-agent-chat-box {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 20px;
    min-height: 300px;
    max-height: 480px;
    overflow-y: auto;
    margin-bottom: 14px;
    scroll-behavior: smooth;
}
.ws-agent-chat-box::-webkit-scrollbar {
    width: 5px;
}
.ws-agent-chat-box::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 999px;
}
.ws-msg {
    display: flex;
    margin-bottom: 14px;
    animation: wsMsgIn 0.3s ease;
}
@keyframes wsMsgIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}
.ws-msg.user {
    justify-content: flex-end;
}
.ws-msg-avatar {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
    background: linear-gradient(135deg, #6366f1, #a855f7);
}
.ws-msg.ai .ws-msg-avatar {
    margin-right: 10px;
}
.ws-msg-bubble {
    max-width: 75%;
    padding: 10px 15px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.65;
    word-break: break-word;
}
.ws-msg.user .ws-msg-bubble {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    border-radius: 14px 14px 4px 14px;
}
.ws-msg.ai .ws-msg-bubble {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px 14px 14px 4px;
}
.ws-agent-input-row {
    display: flex;
    gap: 10px;
}
.ws-agent-input-row .workshop-form-input {
    flex: 1;
}

/* ---- 欢迎页 ---- */
.workshop-welcome {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 55vh;
    text-align: center;
    padding: 30px 20px;
}
.workshop-welcome-icon {
    width: 72px;
    height: 72px;
    margin-bottom: 20px;
    border-radius: 20px;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 28px rgba(99, 102, 241, 0.25);
}
.workshop-welcome-title {
    font-size: 26px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 6px;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #818cf8, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.workshop-welcome-desc {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.45);
    line-height: 1.6;
    max-width: 460px;
    margin-bottom: 4px;
}
.ws-welcome-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 14px;
    max-width: 760px;
    width: 100%;
    margin-top: 32px;
}
.ws-welcome-card {
    display: flex;
    flex-direction: column;
    padding: 20px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.06);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    text-align: left;
    position: relative;
    overflow: hidden;
}
.ws-welcome-card::after {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 80px;
    height: 80px;
    background: var(--ws-card-glow, radial-gradient(circle, rgba(99, 102, 241, 0.08), transparent 70%));
    border-radius: 50%;
    transform: translate(30%, -30%);
    transition: transform 0.4s;
}
.ws-welcome-card:hover {
    background: rgba(255, 255, 255, 0.045);
    border-color: rgba(255, 255, 255, 0.12);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}
.ws-welcome-card:hover::after {
    transform: translate(20%, -20%) scale(1.5);
}
.ws-welcome-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 12px;
    background: var(--ws-icon-bg, rgba(99, 102, 241, 0.1));
    border: 1px solid var(--ws-icon-border, rgba(99, 102, 241, 0.15));
}
.ws-welcome-card-name {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 4px;
}
.ws-welcome-card-desc {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
    line-height: 1.5;
}
.ws-welcome-card-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 8px;
    padding: 2px 7px;
    border-radius: 999px;
    font-weight: 700;
    letter-spacing: 0.5px;
    line-height: 1.4;
}
.ws-welcome-card-badge.hot {
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    color: #fff;
}
.ws-welcome-card-badge.new {
    background: linear-gradient(135deg, #3b82f6, #06b6d4);
    color: #fff;
}
.ws-welcome-card-badge.soon {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.06);
}
.ws-welcome-stats {
    margin-top: 24px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.3);
    display: flex;
    gap: 16px;
}
.ws-welcome-stats span {
    display: flex;
    align-items: center;
    gap: 5px;
}
.ws-welcome-stats strong {
    color: rgba(255, 255, 255, 0.6);
    font-weight: 600;
}

/* ---- 即将上线 / 错误页 ---- */
.workshop-coming-soon {
    text-align: center;
    padding: 50px 20px;
}
.workshop-coming-soon-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 18px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(168, 85, 247, 0.12));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    border: 1px solid rgba(99, 102, 241, 0.1);
}
.workshop-coming-soon-title {
    font-size: 18px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 6px;
}
.workshop-coming-soon-desc {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.4);
    line-height: 1.6;
    max-width: 380px;
    margin: 0 auto;
}
.workshop-coming-soon-badge {
    display: inline-block;
    margin-top: 16px;
    padding: 5px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* ---- 空状态 ---- */
.workshop-empty {
    text-align: center;
    padding: 60px 20px;
    color: rgba(255, 255, 255, 0.3);
}
.workshop-empty-icon {
    font-size: 42px;
    margin-bottom: 14px;
    opacity: 0.4;
}
.workshop-empty-text {
    font-size: 14px;
}

/* ---- 响应式 ---- */
@media (max-width: 640px) {
    .workshop-page {
        padding: 20px 16px 40px;
    }
    .workshop-form {
        padding: 18px;
        border-radius: 14px;
    }
    .workshop-form-row {
        flex-direction: column;
        gap: 0;
    }
    .ws-welcome-grid {
        grid-template-columns: 1fr;
    }
    .ws-model-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    .ws-model-bar-label {
        font-size: 11px;
    }
    .ppt-slide-content {
        padding: 24px 20px;
        min-height: 200px;
    }
    .ppt-slide-title {
        font-size: 18px;
    }
    .ppt-slide-body {
        font-size: 13px;
    }
    .workshop-welcome-title {
        font-size: 22px;
    }
}
