/* ==================== 运营助手页面样式 ==================== */
/* 复用基础变量和导航栏样式 */

:root {
    --color-primary: #10B981;
    --color-primary-hover: #059669;
    --color-success: #10B981;
    --color-warning: #F59E0B;
    --color-error: #EF4444;
    --color-text: #1F2937;
    --color-text-secondary: #6B7280;
    --color-border: #E5E7EB;
    --color-bg: #F9FAFB;
    --color-bg-secondary: #FFFFFF;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* ==================== 导航栏 ==================== */
.assistant-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--color-text);
    transition: opacity 0.2s;
}

.nav-logo:hover {
    opacity: 0.8;
}

.logo-icon {
    font-size: 1.5rem;
}

.brand-logo-mark.logo-icon {
    width: 34px;
    height: 34px;
    display: block;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}

.logo-text {
    font-size: 1.125rem;
    font-weight: 600;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.assistant-theme-toggle {
    position: relative;
    flex: 0 0 auto;
    width: 52px;
    height: 30px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, #4f9dff, #1765dc);
    box-shadow: 0 5px 16px rgba(23, 101, 220, 0.22), inset 0 1px 1px rgba(255, 255, 255, 0.36);
    cursor: pointer;
    transition: background 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.assistant-theme-toggle::before {
    position: absolute;
    inset: 2px;
    border-radius: inherit;
    background: rgba(255, 255, 255, 0.16);
    content: '';
}

.assistant-theme-toggle:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(23, 101, 220, 0.28), inset 0 1px 1px rgba(255, 255, 255, 0.36);
}

.assistant-theme-toggle:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.22);
    outline-offset: 3px;
}

.assistant-theme-toggle-dot {
    position: absolute;
    top: 3px;
    left: 3px;
    z-index: 1;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 5px rgba(15, 50, 110, 0.24), 0 1px 1px rgba(255, 255, 255, 0.76) inset;
    transition: transform 220ms cubic-bezier(.2, .85, .25, 1.15), box-shadow 180ms ease;
}

.assistant-theme-toggle-dot::after {
    display: block;
    width: 8px;
    height: 8px;
    margin: 8px;
    border-radius: 50%;
    background: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12);
    content: '';
}

.assistant-theme-toggle-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.nav-btn:hover {
    background: var(--color-bg-secondary);
    border-color: var(--color-text-secondary);
}

.plugin-download-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: linear-gradient(135deg, #FF2442, #FF5E62);
    border: none;
    border-radius: var(--radius-md);
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(255, 36, 66, 0.2);
}

.plugin-download-btn:hover {
    background: linear-gradient(135deg, #E61F3A, #F04852);
    box-shadow: 0 4px 12px rgba(255, 36, 66, 0.3);
    transform: translateY(-1px);
}

.plugin-download-btn svg {
    flex-shrink: 0;
}

/* ==================== 主内容区 ==================== */
.assistant-main {
    display: flex;
    gap: 1.5rem;
    max-width: 1600px;
    margin: 0 auto;
    padding: 1.5rem;
    min-height: calc(100vh - 70px);
    position: relative;
    z-index: 1;
}

/* ==================== 左侧工具栏 ==================== */
.toolbar-sidebar {
    width: 380px;
    flex-shrink: 0;
    position: sticky;
    top: 85px;
    height: fit-content;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    z-index: 10;
}

/* ==================== 右侧内容区 ==================== */
.content-area {
    flex: 1;
    min-width: 0;
    position: relative;
    z-index: 5;
}

.plugin-guide-card {
    margin-bottom: 1.25rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(255, 244, 246, 0.98));
    border: 1px solid rgba(255, 36, 66, 0.12);
    border-radius: 18px;
    box-shadow: 0 12px 28px rgba(255, 36, 66, 0.08);
}

.plugin-guide-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    margin-bottom: 0.875rem;
    background: rgba(255, 36, 66, 0.1);
    border-radius: 999px;
    color: #D91E45;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.plugin-guide-title {
    margin: 0 0 0.625rem;
    font-size: 1.5rem;
    line-height: 1.3;
    color: var(--color-text);
}

.plugin-guide-desc {
    margin: 0 0 1.25rem;
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--color-text-secondary);
}

.plugin-guide-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.875rem;
    margin-bottom: 1.25rem;
}

.plugin-guide-step {
    display: flex;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(31, 41, 55, 0.06);
    border-radius: 14px;
}

.step-number {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: linear-gradient(135deg, #FF2442, #FF5E62);
    color: white;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 700;
}

.step-content {
    min-width: 0;
}

.step-title {
    margin-bottom: 0.25rem;
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--color-text);
}

.step-text {
    font-size: 0.8125rem;
    line-height: 1.6;
    color: var(--color-text-secondary);
}

.plugin-guide-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.plugin-guide-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.25rem;
    border: 0;
    border-radius: 12px;
    font-size: 0.9375rem;
    font-weight: 700;
    font-family: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
}

.plugin-guide-btn.primary {
    background: linear-gradient(135deg, #FF2442, #FF5E62);
    color: white;
    box-shadow: 0 8px 20px rgba(255, 36, 66, 0.18);
}

.plugin-guide-btn.primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(255, 36, 66, 0.24);
}

.plugin-guide-btn.secondary {
    background: #ffffff;
    color: #D91E45;
    border: 1px solid rgba(255, 36, 66, 0.22);
    box-shadow: 0 8px 18px rgba(31, 41, 55, 0.06);
}

.plugin-guide-btn.secondary:hover {
    transform: translateY(-1px);
    border-color: rgba(255, 36, 66, 0.34);
    box-shadow: 0 12px 24px rgba(31, 41, 55, 0.09);
}

.plugin-guide-tip {
    font-size: 0.8125rem;
    color: var(--color-text-secondary);
}

.assistant-landing-page {
    background:
        radial-gradient(circle at 16% 10%, rgba(255, 36, 66, 0.08), transparent 28%),
        radial-gradient(circle at 82% 18%, rgba(16, 185, 129, 0.1), transparent 30%),
        linear-gradient(180deg, #fff7f9 0%, #f8fafc 46%, #ffffff 100%);
}

.assistant-landing-page .assistant-main {
    display: block;
    max-width: 1180px;
    padding: 2rem 1.5rem 4rem;
}

.assistant-landing-page .toolbar-sidebar {
    display: none;
}

.assistant-landing-page .content-area {
    width: 100%;
}

.assistant-page-hero,
.assistant-tool-section,
.assistant-install-steps,
.publisher-tool-section,
.feishu-workbench-section {
    margin-bottom: 1.25rem;
}

.assistant-page-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 2rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 22px;
    box-shadow: 0 18px 48px rgba(31, 41, 55, 0.08);
    backdrop-filter: blur(22px);
}

.assistant-hero-copy {
    max-width: 760px;
}

.assistant-page-title {
    margin: 0 0 0.75rem;
    font-size: clamp(2rem, 4vw, 3.4rem);
    line-height: 1.08;
    color: #111827;
    letter-spacing: 0;
    max-width: 720px;
}

.assistant-page-desc {
    margin: 0;
    color: var(--color-text-secondary);
    font-size: 1rem;
    line-height: 1.8;
}

.assistant-install-note {
    width: min(360px, 100%);
    padding: 1.25rem;
    border-radius: 16px;
    background: linear-gradient(135deg, #111827, #263244);
    color: #ffffff;
    box-shadow: 0 18px 36px rgba(17, 24, 39, 0.18);
}

.assistant-install-note span,
.assistant-install-note strong {
    display: block;
}

.assistant-install-note span {
    margin-bottom: 0.25rem;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.8125rem;
}

.assistant-install-note strong {
    margin-bottom: 0.875rem;
    font-size: 1.125rem;
}

.assistant-install-note ul {
    display: grid;
    gap: 0.625rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.assistant-install-note li {
    position: relative;
    padding-left: 1rem;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.8125rem;
    line-height: 1.55;
}

.assistant-install-note li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #FF2442;
}

.assistant-tool-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 390px;
    gap: 1.25rem;
    align-items: stretch;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(240, 253, 244, 0.9));
    border: 1px solid rgba(16, 185, 129, 0.14);
    border-radius: 22px;
    box-shadow: 0 14px 34px rgba(16, 185, 129, 0.07);
}

.assistant-tool-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.assistant-tool-eyebrow {
    display: inline-flex;
    align-items: center;
    margin-bottom: 0.875rem;
    padding: 0.375rem 0.75rem;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.1);
    color: #047857;
    font-size: 0.75rem;
    font-weight: 800;
}

.assistant-tool-eyebrow.publish {
    background: rgba(255, 36, 66, 0.1);
    color: #D91E45;
}

.assistant-tool-copy h2,
.publisher-panel h2 {
    margin: 0 0 0.75rem;
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    line-height: 1.15;
    color: #111827;
}

.assistant-tool-copy p,
.publisher-panel p {
    max-width: 700px;
    margin: 0 0 1.25rem;
    color: var(--color-text-secondary);
    line-height: 1.8;
}

.assistant-tool-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 1rem;
}

.assistant-tool-features span {
    padding: 0.34rem 0.58rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.52);
    border: 1px solid rgba(16, 185, 129, 0.12);
    color: #047857;
    font-size: 0.75rem;
    font-weight: 650;
    line-height: 1.2;
}

.assistant-tool-detail-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
    width: 100%;
    margin-bottom: 1.5rem;
}

.assistant-tool-detail-grid div {
    padding: 0.72rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(16, 185, 129, 0.12);
}

.assistant-tool-detail-grid strong,
.assistant-tool-detail-grid span {
    display: block;
}

.assistant-tool-detail-grid strong {
    margin-bottom: 0.28rem;
    color: #064e3b;
    font-size: 0.8125rem;
}

.assistant-tool-detail-grid span {
    color: var(--color-text-secondary);
    font-size: 0.75rem;
    line-height: 1.5;
}

.assistant-tool-actions {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    flex-wrap: wrap;
}

.assistant-tool-install-order {
    margin: 0.9rem 0 0;
    color: var(--color-text-secondary);
    font-size: 0.8125rem;
    line-height: 1.65;
}

.assistant-tool-preview {
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-window {
    width: 100%;
    padding: 1rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.84);
    border: 1px solid rgba(255, 255, 255, 0.95);
    box-shadow: 0 18px 44px rgba(31, 41, 55, 0.08);
}

.preview-window-bar {
    display: flex;
    gap: 0.375rem;
    margin-bottom: 1rem;
}

.preview-window-bar i {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #d1d5db;
}

.preview-window-bar i:first-child {
    background: #ff5f57;
}

.preview-window-bar i:nth-child(2) {
    background: #ffbd2e;
}

.preview-window-bar i:nth-child(3) {
    background: #28c840;
}

.preview-search-row {
    display: grid;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding: 1rem;
    border-radius: 14px;
    background: #f8fafc;
}

.preview-search-row span {
    color: var(--color-text-secondary);
    font-size: 0.8125rem;
}

.preview-search-row strong {
    color: #111827;
}

.preview-data-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.625rem;
}

.preview-data-grid div {
    padding: 0.875rem 0.5rem;
    border-radius: 12px;
    text-align: center;
    background: rgba(16, 185, 129, 0.08);
}

.preview-data-grid b,
.preview-data-grid span {
    display: block;
}

.preview-data-grid b {
    color: #047857;
    font-size: 1rem;
}

.preview-data-grid span {
    color: var(--color-text-secondary);
    font-size: 0.75rem;
}

.assistant-install-steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.875rem;
}

.publisher-tool-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 1.25rem;
    align-items: stretch;
}

.publisher-panel,
.publisher-checklist {
    padding: 1.5rem;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(255, 36, 66, 0.12);
    box-shadow: 0 14px 34px rgba(255, 36, 66, 0.07);
}

.publisher-panel {
    background:
        radial-gradient(circle at 86% 16%, rgba(255, 36, 66, 0.12), transparent 30%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(255, 244, 246, 0.92));
}

.publisher-flow {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
    margin: 1.25rem 0 1.5rem;
}

.publisher-flow div {
    padding: 1rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.74);
    border: 1px solid rgba(255, 36, 66, 0.1);
}

.publisher-flow strong,
.publisher-flow span {
    display: block;
}

.publisher-flow strong {
    margin-bottom: 0.5rem;
    color: #D91E45;
    font-size: 0.875rem;
}

.publisher-flow span {
    color: #374151;
    font-size: 0.875rem;
    font-weight: 700;
}

.publisher-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.plugin-guide-btn.primary.publish {
    background: linear-gradient(135deg, #FF2442, #FF5E62);
}

.publisher-checklist h3 {
    margin: 0 0 1rem;
    color: #111827;
    font-size: 1.125rem;
}

.publisher-checklist p {
    margin: 0 0 1rem;
    color: var(--color-text-secondary);
    line-height: 1.7;
}

.publisher-checklist .publisher-actions {
    margin-bottom: 1.125rem;
}

.publisher-checklist ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.875rem;
}

.publisher-checklist li {
    position: relative;
    padding-left: 1.5rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
}

.publisher-checklist li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.55rem;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #FF2442;
}

.feishu-workbench-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 430px;
    gap: 1.25rem;
    align-items: stretch;
    padding: 1.5rem;
    border-radius: 22px;
    background:
        radial-gradient(circle at 88% 18%, rgba(22, 131, 255, 0.14), transparent 30%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(239, 247, 255, 0.92));
    border: 1px solid rgba(22, 131, 255, 0.14);
    box-shadow: 0 14px 34px rgba(22, 131, 255, 0.07);
}

.feishu-workbench-copy {
    min-width: 0;
}

.feishu-workbench-copy h2 {
    margin: 0 0 0.75rem;
    color: #111827;
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    line-height: 1.15;
}

.feishu-workbench-copy p {
    max-width: 720px;
    margin: 0 0 1.25rem;
    color: var(--color-text-secondary);
    line-height: 1.8;
}

.feishu-workbench-flow {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.feishu-workbench-flow div {
    display: grid;
    align-content: center;
    min-height: 112px;
    padding: 1rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(22, 131, 255, 0.11);
}

.feishu-workbench-flow strong,
.feishu-workbench-flow span {
    display: block;
}

.feishu-workbench-flow strong {
    margin-bottom: 0.5rem;
    color: #1683ff;
    font-size: 0.875rem;
}

.feishu-workbench-flow span {
    color: #374151;
    font-size: 0.875rem;
    font-weight: 800;
}

.feishu-app-guide-section {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    pointer-events: auto;
}

.feishu-app-guide-section.is-open {
    display: flex;
}

body.modal-open {
    overflow: hidden;
}

.feishu-app-guide-backdrop {
    position: absolute;
    inset: 0;
    z-index: 1;
    padding: 0;
    border: 0;
    background: rgba(15, 23, 42, 0.48);
    backdrop-filter: blur(8px);
    cursor: pointer;
}

.feishu-app-guide-dialog {
    position: relative;
    z-index: 2;
    width: min(1080px, 92vw);
    max-height: 88vh;
    overflow: auto;
    padding: 1.5rem;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(22, 131, 255, 0.14);
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.24);
}

.feishu-app-guide-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.25rem;
    margin-bottom: 1.25rem;
}

.feishu-app-guide-head h2 {
    margin: 0 0 0.625rem;
    color: #111827;
    font-size: clamp(1.75rem, 3vw, 2.35rem);
    line-height: 1.15;
}

.feishu-app-guide-head p {
    margin: 0;
    color: var(--color-text-secondary);
    font-size: 0.9375rem;
    line-height: 1.75;
}

.feishu-app-guide-close {
    position: sticky;
    top: 0;
    z-index: 100000;
    width: 52px;
    height: 52px;
    padding: 0;
    border: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 999px;
    background: #f1f5f9;
    color: #64748b;
    text-decoration: none;
    font-size: 1.8rem;
    font-family: inherit;
    line-height: 1;
    cursor: pointer;
    pointer-events: auto;
    transition: all 0.2s;
}

.feishu-app-guide-close:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.feishu-app-guide-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.feishu-app-guide-card {
    min-width: 0;
    padding: 1rem;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(248, 251, 255, 0.96), rgba(255, 255, 255, 0.98));
    border: 1px solid rgba(22, 131, 255, 0.12);
}

.feishu-app-guide-card > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    margin-bottom: 0.75rem;
    border-radius: 10px;
    background: #1683ff;
    color: #fff;
    font-size: 0.875rem;
    font-weight: 800;
}

.feishu-app-guide-card h3 {
    margin: 0 0 0.35rem;
    color: #111827;
    font-size: 1rem;
    line-height: 1.35;
}

.feishu-app-guide-card p {
    min-height: 3.2em;
    margin: 0 0 0.875rem;
    color: var(--color-text-secondary);
    font-size: 0.8125rem;
    line-height: 1.6;
}

.feishu-app-guide-card img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: contain;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid rgba(31, 41, 55, 0.08);
}

@media (max-width: 900px) {
    .assistant-page-hero,
    .assistant-tool-section,
    .publisher-tool-section,
    .feishu-workbench-section {
        grid-template-columns: 1fr;
    }

    .assistant-page-hero {
        display: grid;
    }

    .assistant-install-note {
        width: 100%;
    }

    .assistant-tool-preview {
        justify-content: stretch;
    }

    .assistant-install-steps {
        grid-template-columns: 1fr 1fr;
    }

    .publisher-flow {
        grid-template-columns: 1fr 1fr;
    }

    .feishu-workbench-flow {
        grid-template-columns: 1fr 1fr;
    }

    .feishu-app-guide-grid {
        grid-template-columns: 1fr;
    }

    .assistant-tool-detail-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 640px) {
    .assistant-landing-page .assistant-main {
        padding: 1rem 0.875rem 2.5rem;
    }

    .assistant-page-hero,
    .assistant-tool-section,
    .publisher-panel,
    .publisher-checklist {
        padding: 1.125rem;
        border-radius: 18px;
    }

    .feishu-app-guide-section {
        padding: 0.875rem;
    }

    .feishu-app-guide-dialog {
        width: 100%;
        max-height: 88vh;
        padding: 1rem;
        border-radius: 20px;
    }

    .feishu-app-guide-head {
        gap: 0.75rem;
    }

    .feishu-app-guide-close {
        width: 38px;
        height: 38px;
        font-size: 1.5rem;
    }

    .assistant-page-title {
        font-size: 2rem;
    }

    .publisher-flow,
    .feishu-workbench-flow,
    .assistant-install-steps,
    .preview-data-grid,
    .assistant-tool-detail-grid {
        grid-template-columns: 1fr;
    }

    .assistant-tool-features {
        gap: 0.5rem;
    }

    .assistant-tool-actions {
        width: 100%;
        align-items: stretch;
    }

    .assistant-tool-actions .plugin-guide-btn {
        width: 100%;
    }

    .feishu-app-guide-card p {
        min-height: 0;
    }
}

.toolbar-content {
    background: var(--color-bg-secondary);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
}

.toolbar-section {
    margin-bottom: 1.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--color-border);
}

.toolbar-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.toolbar-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.toolbar-title span:first-child {
    font-size: 1rem;
}

/* ==================== 表单 ==================== */
.form-group {
    margin-bottom: 1rem;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 0.5rem;
}

.form-label input[type="checkbox"] {
    margin-right: 0.25rem;
    accent-color: var(--color-primary);
}

.required {
    color: var(--color-error);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.625rem 0.875rem;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    color: var(--color-text);
    transition: all 0.2s;
    font-family: inherit;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--color-text-secondary);
}

.form-textarea {
    resize: vertical;
    min-height: 70px;
    line-height: 1.5;
}

.form-textarea.code {
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    font-size: 0.8125rem;
}

.form-hint {
    margin-top: 0.375rem;
    font-size: 0.75rem;
    color: var(--color-text-secondary);
    line-height: 1.4;
}

/* ==================== 功能标签 ==================== */
.function-tabs {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.function-tab {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0.875rem;
    background: var(--color-bg);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
}

.function-tab:hover {
    border-color: var(--color-primary);
    background: rgba(16, 185, 129, 0.02);
}

.function-tab.active {
    border-color: var(--color-primary);
    background: rgba(16, 185, 129, 0.05);
}

.function-tab input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.tab-radio {
    width: 16px;
    height: 16px;
    border: 2px solid var(--color-border);
    border-radius: 50%;
    position: relative;
    transition: all 0.2s;
    flex-shrink: 0;
}

.function-tab input:checked + .tab-radio {
    border-color: var(--color-primary);
}

.function-tab input:checked + .tab-radio::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: var(--color-primary);
    border-radius: 50%;
}

.tab-info {
    flex: 1;
}

.tab-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text);
}

/* ==================== 分析选项 ==================== */
.analyze-options {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.analyze-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
}

.analyze-option:hover {
    border-color: var(--color-primary);
}

.analyze-option input[type="radio"] {
    accent-color: var(--color-primary);
}

.analyze-option span {
    font-size: 0.8125rem;
    color: var(--color-text);
}

/* ==================== 分析维度标签 ==================== */
.analyze-dimensions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.dimension-tag {
    cursor: pointer;
}

.dimension-tag input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.dimension-tag .tag-label {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 100px;
    font-size: 0.75rem;
    color: var(--color-text);
    transition: all 0.2s;
    user-select: none;
}

.dimension-tag:hover .tag-label {
    border-color: var(--color-primary);
}

.dimension-tag input:checked + .tag-label {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
}

/* ==================== 频率限制提示 ==================== */
.rate-limit-info {
    display: flex;
    gap: 0.625rem;
    padding: 0.75rem;
    background: rgba(255, 149, 10, 0.08);
    border: 1px solid rgba(255, 149, 10, 0.25);
    border-radius: var(--radius-sm);
    color: #B45309;
}

.rate-limit-info svg {
    flex-shrink: 0;
    margin-top: 0.0625rem;
}

.rate-limit-content {
    flex: 1;
}

.rate-limit-title {
    font-size: 0.8125rem;
    font-weight: 600;
    margin-bottom: 0.125rem;
}

.rate-limit-desc {
    font-size: 0.6875rem;
    opacity: 0.9;
    line-height: 1.4;
}

/* ==================== 按钮 ==================== */
.toolbar-actions {
    padding-top: 0.375rem;
}

.btn-start,
.btn-stop {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-start {
    background: var(--color-success);
    color: white;
}

.btn-start:hover:not(:disabled) {
    background: var(--color-primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-start:disabled {
    background: var(--color-border);
    cursor: not-allowed;
}

.btn-stop {
    background: var(--color-error);
    color: white;
}

.btn-stop:hover {
    background: #DC2626;
}

.btn-clear,
.btn-export,
.btn-sync-feishu {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.875rem;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    color: var(--color-text);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-clear:hover,
.btn-export:hover {
    background: var(--color-bg-secondary);
    border-color: var(--color-text-secondary);
}

.btn-sync-feishu {
    color: #0066FF;
    border-color: rgba(0, 102, 255, 0.3);
}

.btn-sync-feishu:hover {
    background: rgba(0, 102, 255, 0.05);
    border-color: #0066FF;
}

.btn-ai-analyze {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.875rem;
    background: linear-gradient(135deg, #7C3AED, #6D28D9);
    color: white;
    border: 1px solid rgba(124, 58, 237, 0.3);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-ai-analyze:hover {
    background: linear-gradient(135deg, #6D28D9, #5B21B6);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-ai-analyze:active {
    transform: translateY(0);
}

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

/* ==================== 右侧内容区 ==================== */
.content-area {
    flex: 1;
    min-width: 0;
}

/* ==================== 空状态 ==================== */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    background: var(--color-bg-secondary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    text-align: center;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    opacity: 0.8;
}

.empty-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 0.75rem;
}

.empty-desc {
    font-size: 1rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.empty-features {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9375rem;
    color: var(--color-text-secondary);
}

.feature-icon {
    font-size: 1.25rem;
}

/* ==================== 进度区 ==================== */
.progress-section {
    background: var(--color-bg-secondary);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1rem;
}

.progress-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.progress-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text);
}

.progress-bar-wrapper {
    margin-bottom: 0.5rem;
}

.progress-bar {
    height: 6px;
    background: var(--color-bg);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-success), var(--color-primary));
    border-radius: 3px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    text-align: center;
    font-size: 0.8125rem;
    color: var(--color-text-secondary);
}

.progress-status {
    text-align: center;
    font-size: 0.8125rem;
    color: var(--color-success);
    font-weight: 500;
}

/* ==================== 结果区 ==================== */
.results-section {
    background: var(--color-bg-secondary);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    position: relative;
    z-index: 5;
}

.results-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: relative;
    z-index: 5;
}

.results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--color-border);
}

.results-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text);
}

.results-meta {
    display: flex;
    gap: 1rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8125rem;
    color: var(--color-text-secondary);
}

.results-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.results-filters {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-select {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-bg-secondary);
    color: var(--color-text);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-select:hover {
    border-color: var(--color-primary);
}

.filter-select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.1);
}

.results-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-preview {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-preview:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.btn-batch-download {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #10B981, #059669);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-batch-download:hover {
    background: linear-gradient(135deg, #059669, #047857);
    box-shadow: var(--shadow-sm);
}

/* ==================== 数据来源徽章 ==================== */
.data-mode-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-md);
    font-size: 0.8125rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.data-mode-badge.mode-real {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(16, 185, 129, 0.05));
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.data-mode-badge.mode-mock {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(245, 158, 11, 0.05));
    color: #D97706;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.results-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* ==================== 结果卡片 ==================== */
.result-card {
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    padding: 1rem;
    gap: 1rem;
    min-height: 120px;
}

.result-card:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-md);
}

.result-cover {
    position: relative;
    width: 100px;
    height: 100px;
    flex-shrink: 0;
    overflow: hidden;
    background: var(--color-bg);
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.result-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.result-type-badge {
    position: absolute;
    bottom: 4px;
    right: 4px;
    left: auto;
    top: auto;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.6875rem;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    z-index: 2;
}

.result-type-badge.type-normal {
    background: rgba(0, 0, 0, 0.6);
    color: white;
}

.result-type-badge.type-video {
    background: rgba(239, 68, 68, 0.9);
    color: white;
}

.result-card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    min-width: 0;
}

.result-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--color-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
    overflow: hidden;
    cursor: pointer;
}

.result-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.result-link {
    display: none;
}

.result-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.result-author {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text);
}

.result-time {
    font-size: 0.75rem;
    color: var(--color-text-secondary);
}

.result-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--color-text);
    line-height: 1.4;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.result-content {
    font-size: 0.8125rem;
    color: var(--color-text-secondary);
    line-height: 1.4;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    max-width: 600px;
}

.result-location {
    font-size: 0.75rem;
    color: var(--color-primary);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.result-video {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.result-video-badge {
    font-size: 0.6875rem;
    color: var(--color-error);
}

.result-video-duration {
    font-size: 0.6875rem;
    color: var(--color-text-secondary);
}

.result-image-count {
    font-size: 0.75rem;
    color: var(--color-text-secondary);
}

.result-stats {
    display: flex;
    gap: 1rem;
    flex-shrink: 0;
}

.result-stat {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8125rem;
    color: var(--color-text-secondary);
}

.result-stat b {
    color: var(--color-text);
    font-weight: 600;
}

.result-tags {
    display: flex;
    gap: 0.375rem;
    flex-wrap: wrap;
}

.result-tag {
    padding: 0.125rem 0.5rem;
    background: var(--color-bg);
    color: var(--color-text-secondary);
    border-radius: 4px;
    font-size: 0.6875rem;
    cursor: pointer;
    transition: background 0.2s;
}

.result-tag:hover {
    background: rgba(16, 185, 129, 0.1);
    color: var(--color-success);
}

.result-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-shrink: 0;
    position: relative;
    z-index: 10;
}

.btn-view,
.btn-copy,
.btn-delete {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.5rem 0.75rem;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    color: var(--color-text);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    text-decoration: none;
    position: relative;
    z-index: 10;
    pointer-events: auto;
}

.btn-view {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

.btn-view:hover {
    background: var(--color-primary-hover);
    border-color: var(--color-primary-hover);
}

.btn-copy:hover {
    background: rgba(16, 185, 129, 0.1);
    border-color: var(--color-success);
    color: var(--color-success);
}

.btn-delete:hover {
    background: rgba(239, 68, 68, 0.05);
    border-color: var(--color-error);
    color: var(--color-error);
}

/* ==================== 分析结果区 ==================== */
.analysis-section {
    background: var(--color-bg-secondary);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    margin-top: 1rem;
    box-shadow: var(--shadow-sm);
}

.analysis-header {
    margin-bottom: 0.75rem;
}

.analysis-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text);
}

.analysis-content {
    display: grid;
    gap: 0.75rem;
}

.analysis-card {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 0.75rem;
}

.analysis-card-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 0.5rem;
}

.analysis-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 0.5rem;
}

.analysis-stat-item {
    padding: 0.625rem;
    background: var(--color-bg-secondary);
    border-radius: var(--radius-sm);
    text-align: center;
}

.analysis-stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-primary);
}

.analysis-stat-label {
    font-size: 0.6875rem;
    color: var(--color-text-secondary);
    margin-top: 0.125rem;
}

/* ==================== 弹窗 ==================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    background: var(--color-bg-secondary);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    transform: scale(0.9);
    transition: transform 0.3s;
}

.modal-overlay.active .modal {
    transform: scale(1);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--color-border);
}

.modal-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--color-text);
}

.modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.modal-close:hover {
    background: var(--color-bg);
    color: var(--color-text);
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.625rem;
    padding: 1.25rem 1.5rem;
    border-top: 1px solid var(--color-border);
}

.config-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--color-border);
}

.config-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.config-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 0.5rem;
}

.config-icon {
    font-size: 1.125rem;
}

.config-desc {
    font-size: 0.8125rem;
    color: var(--color-text-secondary);
    margin-bottom: 1rem;
}

.btn-primary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.625rem 1.25rem;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--color-primary);
    color: white;
}

.btn-primary:hover {
    background: var(--color-primary-hover);
}

.btn-secondary {
    background: var(--color-bg);
    color: var(--color-text);
    border: 1px solid var(--color-border);
}

.btn-secondary:hover {
    background: var(--color-bg-secondary);
    border-color: var(--color-text-secondary);
}

/* ==================== Toast ==================== */
.toast {
    position: fixed;
    top: 2rem;
    right: 2rem;
    max-width: 400px;
    padding: 1rem 1.25rem;
    background: var(--color-bg-secondary);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 0.625rem;
    z-index: 2000;
    transform: translateX(calc(100% + 2rem));
    transition: transform 0.3s ease;
    pointer-events: none;
}

.toast.show {
    transform: translateX(0);
}

.toast.success {
    border-left: 4px solid var(--color-success);
}

.toast.error {
    border-left: 4px solid var(--color-error);
}

.toast.info {
    border-left: 4px solid var(--color-primary);
}

.toast-message {
    font-size: 0.875rem;
    color: var(--color-text);
}

/* ==================== 加载动画 ==================== */
.loading {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* ==================== 详情弹窗 ==================== */
.detail-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.detail-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

.detail-content {
    position: relative;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    background: var(--color-bg-secondary);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    overflow-y: auto;
    z-index: 1;
}

.detail-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 2rem;
    height: 2rem;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 50%;
    color: var(--color-text-secondary);
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.detail-close:hover {
    background: var(--color-bg-secondary);
    color: var(--color-text);
}

.detail-content h2 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 0.75rem;
    padding-right: 2.5rem;
}

.detail-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.8125rem;
    color: var(--color-text-secondary);
    margin-bottom: 1rem;
}

.detail-body {
    font-size: 0.875rem;
    color: var(--color-text);
    line-height: 1.6;
    margin-bottom: 1rem;
    white-space: pre-wrap;
}

.detail-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.8125rem;
}

/* ==================== 图片轮播弹窗 ==================== */
.image-gallery-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
}

.image-gallery-modal.active {
    display: flex;
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
}

.gallery-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.gallery-image-container {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-image {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: var(--radius-md);
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    user-select: none;
}

.gallery-nav:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-50%) scale(1.1);
}

.gallery-nav:active {
    transform: translateY(-50%) scale(0.95);
}

.gallery-nav.prev {
    left: 20px;
}

.gallery-nav.next {
    right: 20px;
}

.gallery-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    z-index: 10;
}

.gallery-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.gallery-counter {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.gallery-thumbnails {
    position: absolute;
    bottom: 70px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    max-width: 80vw;
    overflow-x: auto;
    padding: 10px;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-md);
}

.gallery-thumbnails::-webkit-scrollbar {
    height: 4px;
}

.gallery-thumbnails::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

.gallery-thumbnails::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}

.gallery-thumbnail {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s;
}

.gallery-thumbnail:hover {
    border-color: rgba(255, 255, 255, 0.5);
}

.gallery-thumbnail.active {
    border-color: var(--color-primary);
}

.gallery-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 768px) {
    .gallery-nav {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }

    .gallery-nav.prev {
        left: 10px;
    }

    .gallery-nav.next {
        right: 10px;
    }

    .gallery-close {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
        top: 10px;
        right: 10px;
    }

    .gallery-thumbnails {
        bottom: 60px;
        max-width: 90vw;
    }

    .gallery-thumbnail {
        width: 50px;
        height: 50px;
    }
}

/* ==================== 响应式 ==================== */
@media (max-width: 1024px) {
    .toolbar-sidebar {
        width: 320px;
    }

    .plugin-guide-steps {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .assistant-main {
        flex-direction: column;
        padding: 1rem;
    }

    .toolbar-sidebar {
        width: 100%;
        position: static;
        max-height: none;
        overflow-y: visible;
    }

    .toolbar-content {
        padding: 1rem;
    }

    .content-area {
        width: 100%;
    }

    .plugin-guide-card {
        padding: 1.125rem;
        border-radius: 16px;
    }

    .plugin-guide-title {
        font-size: 1.25rem;
    }

    .plugin-guide-step {
        padding: 0.875rem;
    }

    .plugin-guide-actions {
        align-items: stretch;
    }

    .plugin-guide-btn {
        width: 100%;
    }

    .results-section,
    .progress-section {
        padding: 1rem;
    }

    .empty-state {
        padding: 3rem 1.5rem;
    }

    .empty-icon {
        font-size: 3rem;
    }

    .empty-title {
        font-size: 1.25rem;
    }

    .empty-features {
        flex-direction: column;
        gap: 0.75rem;
    }

    .results-toolbar {
        flex-direction: column;
    }

    .btn-export,
    .btn-sync-feishu {
        width: 100%;
        justify-content: center;
    }

    .analysis-stat-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .modal {
        width: 95%;
        max-height: 95vh;
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 1rem 1.25rem;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 0.75rem 1rem;
    }

    .logo-text {
        display: none;
    }

    .toolbar-content {
        padding: 0.875rem;
    }

    .toolbar-section {
        margin-bottom: 1rem;
        padding-bottom: 1rem;
    }

    .function-tab {
        padding: 0.625rem 0.75rem;
    }

    .analyze-dimensions {
        gap: 0.25rem;
    }

    .dimension-tag .tag-label {
        padding: 0.3125rem 0.625rem;
        font-size: 0.6875rem;
    }

    .analysis-stat-grid {
        grid-template-columns: 1fr;
    }

    .result-card-header {
        flex-direction: column;
        gap: 0.375rem;
    }

    .result-avatar {
        width: 32px;
        height: 32px;
    }
}

/* ==================== 知识库统一工具页视觉 ==================== */
.assistant-landing-page {
    --assistant-blue: #147dff;
    --assistant-blue-deep: #0a62db;
    --assistant-blue-soft: #edf6ff;
    --assistant-ink: #15263d;
    --assistant-muted: #6f8199;
    background:
        linear-gradient(rgba(52, 126, 255, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(52, 126, 255, 0.045) 1px, transparent 1px),
        radial-gradient(circle at 88% 4%, rgba(55, 135, 255, 0.13), transparent 30%),
        linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    background-size: 56px 56px, 56px 56px, auto, auto;
}

.assistant-landing-page .assistant-nav {
    border-bottom-color: rgba(36, 112, 220, 0.12);
    background: rgba(255, 255, 255, 0.87);
    box-shadow: 0 8px 28px rgba(25, 88, 159, 0.05);
}

.assistant-landing-page .nav-btn {
    border-color: rgba(20, 125, 255, 0.16);
    background: #f4f9ff;
    color: var(--assistant-blue-deep);
    font-weight: 700;
}

.assistant-landing-page .nav-btn:hover {
    border-color: rgba(20, 125, 255, 0.32);
    background: #eaf4ff;
}

.assistant-landing-page .assistant-main {
    max-width: 1240px;
    padding-top: 1.25rem;
}

.assistant-landing-page .assistant-page-hero,
.assistant-landing-page .assistant-tool-section,
.assistant-landing-page .publisher-panel,
.assistant-landing-page .publisher-checklist,
.assistant-landing-page .feishu-workbench-section {
    border-color: rgba(30, 104, 190, 0.15);
    box-shadow: 0 16px 38px rgba(35, 100, 172, 0.07);
}

.assistant-landing-page .assistant-page-hero {
    position: relative;
    align-items: center;
    min-height: 256px;
    padding: 2.25rem 2.4rem;
    overflow: hidden;
    background:
        radial-gradient(circle at 78% 10%, rgba(47, 132, 255, 0.17), transparent 28%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(240, 247, 255, 0.94));
}

.assistant-landing-page .assistant-page-hero::after {
    position: absolute;
    right: -52px;
    bottom: -84px;
    width: 300px;
    height: 300px;
    border: 48px solid rgba(68, 143, 255, 0.08);
    border-radius: 50%;
    content: '';
    pointer-events: none;
}

.assistant-landing-page .assistant-hero-copy,
.assistant-landing-page .assistant-install-note {
    position: relative;
    z-index: 1;
}

.assistant-landing-page .plugin-guide-badge,
.assistant-landing-page .assistant-tool-eyebrow,
.assistant-landing-page .assistant-tool-eyebrow.publish {
    color: var(--assistant-blue-deep);
    background: rgba(20, 125, 255, 0.1);
}

.assistant-landing-page .assistant-page-title,
.assistant-landing-page .assistant-tool-copy h2,
.assistant-landing-page .publisher-panel h2,
.assistant-landing-page .feishu-workbench-copy h2 {
    color: var(--assistant-ink);
    letter-spacing: -0.04em;
}

.assistant-landing-page .assistant-page-desc,
.assistant-landing-page .assistant-tool-copy p,
.assistant-landing-page .publisher-panel p,
.assistant-landing-page .feishu-workbench-copy p {
    color: var(--assistant-muted);
}

.assistant-landing-page .assistant-install-note {
    width: min(326px, 100%);
    border: 1px solid rgba(20, 125, 255, 0.16);
    background: rgba(255, 255, 255, 0.78);
    color: var(--assistant-ink);
    box-shadow: 0 16px 34px rgba(24, 102, 193, 0.1);
}

.assistant-landing-page .assistant-install-note span,
.assistant-landing-page .assistant-install-note li {
    color: var(--assistant-muted);
}

.assistant-landing-page .assistant-install-note li::before {
    background: var(--assistant-blue);
}

.assistant-landing-page .assistant-tool-section {
    gap: 1.75rem;
    padding: 1.9rem;
    background:
        radial-gradient(circle at 96% 4%, rgba(54, 143, 255, 0.14), transparent 29%),
        rgba(255, 255, 255, 0.88);
}

.assistant-landing-page .assistant-tool-features span,
.assistant-landing-page .assistant-tool-detail-grid div,
.assistant-landing-page .preview-data-grid div {
    border-color: rgba(20, 125, 255, 0.12);
    background: #f4f9ff;
    color: var(--assistant-blue-deep);
}

.assistant-landing-page .assistant-tool-detail-grid strong,
.assistant-landing-page .preview-data-grid b {
    color: var(--assistant-blue-deep);
}

.assistant-landing-page .assistant-tool-detail-grid span,
.assistant-landing-page .preview-data-grid span,
.assistant-landing-page .preview-search-row span {
    color: var(--assistant-muted);
}

.assistant-landing-page .preview-window {
    border-color: rgba(20, 125, 255, 0.14);
    background: #ffffff;
    box-shadow: 0 18px 42px rgba(31, 111, 203, 0.1);
}

.assistant-landing-page .preview-search-row {
    border: 1px solid rgba(20, 125, 255, 0.1);
    background: #f4f9ff;
}

.assistant-landing-page .preview-search-row strong {
    color: var(--assistant-ink);
}

.assistant-landing-page .plugin-guide-btn.primary,
.assistant-landing-page .plugin-guide-btn.primary.publish {
    background: linear-gradient(135deg, var(--assistant-blue), var(--assistant-blue-deep));
    box-shadow: 0 10px 22px rgba(20, 125, 255, 0.21);
}

.assistant-landing-page .plugin-guide-btn.secondary {
    border-color: rgba(20, 125, 255, 0.18);
    color: var(--assistant-blue-deep);
    box-shadow: none;
}

.assistant-landing-page .assistant-install-steps {
    gap: 12px;
}

.assistant-landing-page .plugin-guide-step {
    min-height: 128px;
    border-color: rgba(30, 104, 190, 0.14);
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 10px 24px rgba(37, 105, 184, 0.045);
}

.assistant-landing-page .step-number {
    background: linear-gradient(135deg, var(--assistant-blue), var(--assistant-blue-deep));
}

.assistant-landing-page .publisher-tool-section {
    gap: 1.25rem;
}

.assistant-landing-page .publisher-panel,
.assistant-landing-page .publisher-checklist {
    background:
        radial-gradient(circle at 91% 13%, rgba(57, 143, 255, 0.13), transparent 28%),
        rgba(255, 255, 255, 0.9);
}

.assistant-landing-page .publisher-flow div,
.assistant-landing-page .feishu-workbench-flow div {
    border-color: rgba(20, 125, 255, 0.12);
    background: #f4f9ff;
}

.assistant-landing-page .publisher-flow strong {
    color: var(--assistant-blue-deep);
}

.assistant-landing-page .publisher-checklist li::before {
    background: var(--assistant-blue);
}

.assistant-landing-page .feishu-workbench-section {
    background:
        radial-gradient(circle at 94% 8%, rgba(70, 157, 255, 0.15), transparent 28%),
        rgba(255, 255, 255, 0.9);
}

@media (max-width: 900px) {
    .assistant-landing-page .assistant-page-hero {
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {
    .assistant-landing-page .assistant-main {
        padding: 1rem 0.875rem 2.5rem;
    }

    .assistant-landing-page .assistant-page-hero,
    .assistant-landing-page .assistant-tool-section {
        padding: 1.25rem;
    }
}

/* ==================== 授权令牌区域样式 ==================== */
.help-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1px solid var(--color-border);
    background: var(--color-bg);
    color: var(--color-text-secondary);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    margin-left: auto;
}

.help-icon:hover {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

/* Homepage red theme: keep the tool workbench in the same coral system. */
html[data-home-theme="red"] .assistant-landing-page {
    --assistant-blue: #ef5860;
    --assistant-blue-deep: #d9434f;
    --assistant-blue-soft: #fff0ed;
    background:
        linear-gradient(rgba(233, 71, 82, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(233, 71, 82, 0.045) 1px, transparent 1px),
        radial-gradient(circle at 88% 4%, rgba(233, 71, 82, 0.13), transparent 30%),
        linear-gradient(180deg, #fffdfc 0%, #fff8f7 100%);
    background-size: 56px 56px, 56px 56px, auto, auto;
}

html[data-home-theme="red"] .assistant-landing-page .assistant-nav {
    border-bottom-color: rgba(217, 67, 79, 0.14);
    background: rgba(255, 253, 252, 0.9);
    box-shadow: 0 8px 28px rgba(165, 70, 78, 0.05);
}

html[data-home-theme="red"] .assistant-theme-toggle {
    background: linear-gradient(135deg, #ff8277, #e43e4c);
    box-shadow: 0 5px 16px rgba(228, 62, 76, 0.24), inset 0 1px 1px rgba(255, 255, 255, 0.36);
}

html[data-home-theme="red"] .assistant-theme-toggle:hover {
    box-shadow: 0 8px 20px rgba(228, 62, 76, 0.3), inset 0 1px 1px rgba(255, 255, 255, 0.36);
}

html[data-home-theme="red"] .assistant-theme-toggle:focus-visible {
    outline-color: rgba(228, 62, 76, 0.22);
}

html[data-home-theme="red"] .assistant-theme-toggle-dot {
    transform: translateX(22px);
    box-shadow: 0 2px 5px rgba(105, 29, 35, 0.26), 0 1px 1px rgba(255, 255, 255, 0.76) inset;
}

html[data-home-theme="red"] .assistant-theme-toggle-dot::after {
    background: #e94752;
    box-shadow: 0 0 0 2px rgba(233, 71, 82, 0.12);
}

html[data-home-theme="red"] .assistant-landing-page .nav-btn {
    border-color: rgba(217, 67, 79, 0.18);
    background: #fff5f3;
    color: #c83f4b;
}

html[data-home-theme="red"] .assistant-landing-page .nav-btn:hover {
    border-color: rgba(217, 67, 79, 0.34);
    background: #fff0ed;
}

html[data-home-theme="red"] .assistant-landing-page .assistant-page-hero {
    background:
        radial-gradient(circle at 78% 10%, rgba(233, 71, 82, 0.16), transparent 28%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(255, 244, 242, 0.94));
}

html[data-home-theme="red"] .assistant-landing-page .assistant-page-hero::after {
    border-color: rgba(233, 71, 82, 0.08);
}

html[data-home-theme="red"] .assistant-landing-page .assistant-tool-section,
html[data-home-theme="red"] .assistant-landing-page .publisher-panel,
html[data-home-theme="red"] .assistant-landing-page .publisher-checklist,
html[data-home-theme="red"] .assistant-landing-page .feishu-workbench-section {
    border-color: rgba(217, 67, 79, 0.15);
    box-shadow: 0 16px 38px rgba(165, 70, 78, 0.07);
}

html[data-home-theme="red"] .assistant-landing-page .assistant-tool-section,
html[data-home-theme="red"] .assistant-landing-page .publisher-panel,
html[data-home-theme="red"] .assistant-landing-page .publisher-checklist,
html[data-home-theme="red"] .assistant-landing-page .feishu-workbench-section {
    background:
        radial-gradient(circle at 94% 8%, rgba(233, 71, 82, 0.13), transparent 29%),
        rgba(255, 255, 255, 0.9);
}

html[data-home-theme="red"] .assistant-landing-page .assistant-install-note {
    border-color: rgba(217, 67, 79, 0.17);
    box-shadow: 0 16px 34px rgba(165, 70, 78, 0.1);
}

html[data-home-theme="red"] .assistant-landing-page .assistant-tool-features span,
html[data-home-theme="red"] .assistant-landing-page .assistant-tool-detail-grid div,
html[data-home-theme="red"] .assistant-landing-page .preview-data-grid div,
html[data-home-theme="red"] .assistant-landing-page .publisher-flow div,
html[data-home-theme="red"] .assistant-landing-page .feishu-workbench-flow div,
html[data-home-theme="red"] .assistant-landing-page .preview-search-row {
    border-color: rgba(217, 67, 79, 0.12);
    background: #fff5f3;
    color: #c83f4b;
}

html[data-home-theme="red"] .assistant-landing-page .plugin-guide-badge,
html[data-home-theme="red"] .assistant-landing-page .assistant-tool-eyebrow,
html[data-home-theme="red"] .assistant-landing-page .assistant-tool-eyebrow.publish {
    color: #c83f4b;
    background: #fff0ed;
}

html[data-home-theme="red"] .assistant-landing-page .plugin-guide-btn.primary,
html[data-home-theme="red"] .assistant-landing-page .plugin-guide-btn.primary.publish,
html[data-home-theme="red"] .assistant-landing-page .step-number {
    background: linear-gradient(135deg, #ff7569, #dc3f4d);
    box-shadow: 0 10px 22px rgba(220, 63, 77, 0.21);
}

html[data-home-theme="red"] .assistant-landing-page .plugin-guide-btn.secondary {
    border-color: rgba(217, 67, 79, 0.2);
    color: #c83f4b;
}

.token-security {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: #FFFBEB;
    border: 1px solid #FCD34D;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    color: #92400E;
}

.token-security svg {
    flex-shrink: 0;
}

.link-btn {
    background: none;
    border: none;
    color: var(--color-primary);
    font-size: 0.75rem;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
}

.link-btn:hover {
    color: var(--color-primary-hover);
}

/* ==================== Cookie 教程模态框样式 ==================== */
.cookie-tutorial-modal {
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}

.tutorial-steps {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.tutorial-step {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: var(--color-bg);
    border-radius: var(--radius-sm);
}

.step-number {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--color-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.step-content h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text);
}

.step-content p {
    margin: 0.25rem 0;
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    line-height: 1.5;
}

.step-content a {
    color: var(--color-primary);
    text-decoration: none;
}

.step-content a:hover {
    text-decoration: underline;
}

.step-content kbd {
    display: inline-block;
    padding: 0.125rem 0.375rem;
    background: #F3F4F6;
    border: 1px solid #D1D5DB;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.75rem;
    margin: 0 0.125rem;
}

.step-content code {
    display: block;
    padding: 0.75rem;
    background: #1F2937;
    color: #10B981;
    border-radius: var(--radius-sm);
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.75rem;
    overflow-x: auto;
    white-space: nowrap;
    margin: 0.5rem 0;
}

.step-image {
    margin: 0.5rem 0;
    display: flex;
    justify-content: center;
}

.step-image svg {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
}

.tutorial-tips {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #EFF6FF;
    border: 1px solid #3B82F6;
    border-radius: var(--radius-sm);
}

.tutorial-tips .tip-title {
    margin: 0 0 0.5rem 0;
    font-weight: 600;
    color: #1E40AF;
}

.tutorial-tips ul {
    margin: 0;
    padding-left: 1.25rem;
}

.tutorial-tips li {
    margin: 0.25rem 0;
    font-size: 0.875rem;
    color: #1E40AF;
    line-height: 1.5;
}

/* ==================== 响应式调整 ==================== */
@media (max-width: 768px) {
    .cookie-tutorial-modal {
        max-height: 90vh;
    }

    .tutorial-step {
        flex-direction: column;
        gap: 0.5rem;
    }

    .step-number {
        width: 24px;
        height: 24px;
        font-size: 0.75rem;
    }

    .step-image svg {
        width: 100%;
        height: auto;
    }
}

/* ==================== 正文预览样式 ==================== */
.result-content-preview {
    font-size: 0.8125rem;
    color: var(--color-text-secondary);
    line-height: 1.4;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    max-width: 600px;
    margin-top: 0.25rem;
}

/* ==================== 同步飞书按钮样式 ==================== */
.btn-sync-feishu-single {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.5rem 0.75rem;
    background: linear-gradient(135deg, #0066FF, #0052CC);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    position: relative;
    z-index: 10;
    pointer-events: auto;
}

.btn-sync-feishu-single:hover {
    background: linear-gradient(135deg, #0052CC, #0047B3);
    box-shadow: var(--shadow-sm);
}

/* ==================== 折叠式输入框样式 ==================== */
.collapsible-toggle {
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-right: 2rem;
}

.toggle-icon {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1px solid var(--color-border);
    background: var(--color-bg);
    color: var(--color-text-secondary);
    font-size: 14px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    line-height: 1;
}

.collapsible-toggle:hover .toggle-icon {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

.collapsible-content {
    animation: slideDown 0.3s ease;
}

/* ==================== 千帆登录相关样式 ==================== */
.qianfan-login-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3000;
    display: none;
}

.qianfan-login-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.login-modal-content {
    position: relative;
    background: var(--color-bg);
    border-radius: var(--radius-lg);
    padding: 2rem;
    max-width: 420px;
    width: 90%;
    box-shadow: var(--shadow-xl);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: var(--color-bg-secondary);
    color: var(--color-text-secondary);
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: var(--color-error);
    color: white;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header h2 {
    margin: 0 0 0.5rem 0;
    font-size: 1.5rem;
    color: var(--color-text);
}

.login-header p {
    margin: 0;
    color: var(--color-text-secondary);
    font-size: 0.875rem;
}

.login-body {
    margin-bottom: 1.5rem;
}

.qr-container {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.qr-placeholder {
    width: 240px;
    height: 240px;
    border: 2px dashed var(--color-border);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-secondary);
}

.qr-loading {
    text-align: center;
    color: var(--color-text-secondary);
}

.spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 1rem;
    border: 3px solid var(--color-border);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.qr-container img {
    width: 240px;
    height: 240px;
    border-radius: var(--radius-md);
}

.login-tips {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.tip-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-text-secondary);
    font-size: 0.875rem;
}

.tip-icon {
    font-size: 1.25rem;
}

.login-status {
    text-align: center;
    padding: 0.75rem;
    background: var(--color-bg-secondary);
    border-radius: var(--radius-md);
}

.status-text {
    color: var(--color-text-secondary);
    font-size: 0.875rem;
}

.login-status.success .status-text {
    color: var(--color-success);
}

.login-status.error .status-text {
    color: var(--color-error);
}

.login-footer {
    display: flex;
    justify-content: center;
}

.btn-refresh-qr {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-refresh-qr:hover {
    background: var(--color-bg-secondary);
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.btn-qianfan-login {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem;
    background: linear-gradient(135deg, #FF2442, #E31B39);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-qianfan-login:hover {
    background: linear-gradient(135deg, #E31B39, #C41230);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.login-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--color-bg-secondary);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
}

.login-status.logged-in {
    background: rgba(0, 200, 83, 0.1);
    color: var(--color-success);
}

.login-status.logged-in .status-icon {
    color: var(--color-success);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==================== 千帆4行选择器样式 ==================== */

/* 第一行：主Tab（卡片切换样式） */
.qianfan-main-tabs {
    display: flex;
    gap: 0.75rem;
}

.qianfan-main-tab {
    position: relative;
    flex: 1;
    cursor: pointer;
}

.qianfan-main-tab input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.qianfan-main-tab .tab-text {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1rem;
    background: var(--color-bg);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text);
    transition: all 0.2s;
    user-select: none;
}

.qianfan-main-tab:hover .tab-text {
    border-color: var(--color-primary);
}

.qianfan-main-tab.active .tab-text,
.qianfan-main-tab input[type="radio"]:checked + .tab-text {
    background: var(--color-bg-secondary);
    border-color: var(--color-primary);
    color: var(--color-primary);
}

/* 第二行：榜单类型（下划线样式） */
.qianfan-rank-types {
    display: flex;
    gap: 1.5rem;
}

.qianfan-rank-type {
    position: relative;
    cursor: pointer;
}

.qianfan-rank-type input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.qianfan-rank-type .type-text {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    padding-bottom: 0.375rem;
    transition: all 0.2s;
    position: relative;
    user-select: none;
}

.qianfan-rank-type:hover .type-text {
    color: var(--color-text);
}

.qianfan-rank-type.active .type-text,
.qianfan-rank-type input[type="radio"]:checked + .type-text {
    color: var(--color-primary);
}

.qianfan-rank-type.active .type-text::after,
.qianfan-rank-type input[type="radio"]:checked + .type-text::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--color-primary);
    border-radius: 1px;
}

/* 第三行和第四行：胶囊按钮样式 */
.qianfan-dimensions,
.qianfan-content-types {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.qianfan-dimension,
.qianfan-content-type {
    position: relative;
    cursor: pointer;
}

.qianfan-dimension input[type="radio"],
.qianfan-content-type input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.qianfan-dimension .dimension-text,
.qianfan-content-type .content-text {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 100px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--color-text);
    transition: all 0.2s;
    user-select: none;
}

.qianfan-dimension:hover .dimension-text,
.qianfan-content-type:hover .content-text {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.qianfan-dimension.active .dimension-text,
.qianfan-content-type.active .content-text,
.qianfan-dimension input[type="radio"]:checked + .dimension-text,
.qianfan-content-type input[type="radio"]:checked + .content-text {
    background: rgba(16, 185, 129, 0.1);
    border-color: var(--color-primary);
    color: var(--color-primary);
}

/* ==================== 千帆排行榜结果卡片样式 ==================== */
/* 通用卡片容器 */
.qianfan-result-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    margin-bottom: 0.75rem;
    transition: all 0.2s;
}

.qianfan-result-card:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-md);
}

/* 排名徽章 */
.qianfan-rank-badge {
    flex-shrink: 0;
    width: 3rem;
    display: flex;
    justify-content: center;
}

.rank-number {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--color-text-secondary);
}

.qianfan-result-card.rank-1 .rank-number {
    font-size: 1.5rem;
}

.qianfan-result-card.rank-2 .rank-number {
    font-size: 1.375rem;
}

.qianfan-result-card.rank-3 .rank-number {
    font-size: 1.25rem;
}

/* ========== 【优秀内容模式】样式 ========== */
.qianfan-content-card {
    flex-direction: row;
}

/* 信息列：封面 + 标题 + 作者 */
.qianfan-content-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    min-width: 0;
}

.qianfan-cover-wrapper {
    flex-shrink: 0;
}

.qianfan-note-cover {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
}

.qianfan-note-details {
    flex: 1;
    min-width: 0;
}

.qianfan-note-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 0.25rem;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.qianfan-note-author {
    font-size: 0.8125rem;
    color: var(--color-text-secondary);
}

/* ========== 【优秀账号模式】样式 ========== */
.qianfan-account-card {
    flex-direction: row;
}

/* 信息列：圆形头像 + 店铺名 + 粉丝数 */
.qianfan-account-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    min-width: 0;
}

.qianfan-avatar-wrapper {
    flex-shrink: 0;
}

.qianfan-account-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.qianfan-account-details {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.qianfan-shop-name {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 0.25rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.qianfan-shop-fans {
    font-size: 0.8125rem;
    color: var(--color-text-secondary);
}

/* ========== 数据指标列（通用） ========== */
.qianfan-metrics-section {
    flex-shrink: 0;
}

.qianfan-metrics-row {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.qianfan-metric-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.metric-label {
    font-size: 0.75rem;
    color: var(--color-text-secondary);
}

.metric-value {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text);
}

/* ========== 操作按钮（通用） ========== */
.qianfan-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.qianfan-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-bg-secondary);
    color: var(--color-text);
    font-size: 0.8125rem;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.qianfan-btn:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.qianfan-btn-view {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

.qianfan-btn-view:hover {
    background: var(--color-primary-hover);
    border-color: var(--color-primary-hover);
    color: white;
}

.qianfan-btn-copy {
    color: var(--color-text-secondary);
}

.qianfan-btn-delete {
    color: var(--color-error);
    border-color: rgba(239, 68, 68, 0.3);
}

.qianfan-btn-delete:hover {
    border-color: var(--color-error);
    background: rgba(239, 68, 68, 0.1);
}

/* ========== 响应式设计 ========== */
@media (max-width: 768px) {
    .qianfan-result-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .qianfan-content-info,
    .qianfan-account-info {
        width: 100%;
    }

    .qianfan-metrics-section {
        width: 100%;
    }

    .qianfan-metrics-row {
        justify-content: space-between;
        gap: 1rem;
    }

    .qianfan-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

/* ========== AI 智能卡片生成样式 ========== */
.card-preview-section {
    width: 100%;
    background: var(--color-bg-secondary);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    margin-top: var(--spacing-lg);
}

.card-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid var(--color-border);
}

.card-preview-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text);
}

.card-preview-actions {
    display: flex;
    gap: var(--spacing-sm);
}

.btn-download-card,
.btn-publish-card,
.btn-save-draft {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.btn-download-card {
    background: var(--color-primary);
    color: white;
}

.btn-download-card:hover {
    background: var(--color-primary-hover);
}

.btn-publish-card {
    background: #FF2442;
    color: white;
}

.btn-publish-card:hover {
    background: #E11D3C;
}

.btn-save-draft {
    background: var(--color-bg);
    color: var(--color-text);
    border: 1px solid var(--color-border);
}

.btn-save-draft:hover {
    background: var(--color-bg-secondary);
}

.card-preview-container {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-lg);
    justify-content: center;
    min-height: 400px;
    align-items: flex-start;
}

/* 卡片基础样式 */
.generated-card {
    width: 375px;
    min-height: 500px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* 卡片模板样式 */
.card-template-minimal {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
}

.card-template-minimal .card-content {
    padding: 40px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.card-template-minimal .card-title {
    font-size: 28px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 20px;
    line-height: 1.3;
}

.card-template-minimal .card-text {
    font-size: 16px;
    color: #64748b;
    line-height: 1.8;
    white-space: pre-wrap;
}

.card-template-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.card-template-gradient .card-content {
    padding: 40px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.card-template-gradient .card-title {
    font-size: 28px;
    font-weight: 700;
    color: white;
    margin-bottom: 20px;
    line-height: 1.3;
}

.card-template-gradient .card-text {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.8;
    white-space: pre-wrap;
}

.card-template-dark {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

.card-template-dark .card-content {
    padding: 40px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.card-template-dark .card-title {
    font-size: 28px;
    font-weight: 700;
    color: #f8fafc;
    margin-bottom: 20px;
    line-height: 1.3;
}

.card-template-dark .card-text {
    font-size: 16px;
    color: #cbd5e1;
    line-height: 1.8;
    white-space: pre-wrap;
}

.card-template-warm {
    background: linear-gradient(135deg, #ff9a56 0%, #ff6a88 100%);
}

.card-template-warm .card-content {
    padding: 40px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.card-template-warm .card-title {
    font-size: 28px;
    font-weight: 700;
    color: white;
    margin-bottom: 20px;
    line-height: 1.3;
}

.card-template-warm .card-text {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.8;
    white-space: pre-wrap;
}

.card-template-nature {
    background: linear-gradient(135deg, #134e5e 0%, #71b280 100%);
}

.card-template-nature .card-content {
    padding: 40px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.card-template-nature .card-title {
    font-size: 28px;
    font-weight: 700;
    color: white;
    margin-bottom: 20px;
    line-height: 1.3;
}

.card-template-nature .card-text {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.8;
    white-space: pre-wrap;
}

/* 卡片图片容器 */
.card-image-container {
    width: 100%;
    height: 300px;
    overflow: hidden;
    position: relative;
}

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

/* 卡片仓库样式 */
.card-warehouse-modal {
    max-width: 900px;
    width: 90%;
    max-height: 80vh;
}

.warehouse-filters {
    margin-bottom: var(--spacing-md);
}

.warehouse-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--spacing-md);
    max-height: 500px;
    overflow-y: auto;
}

.warehouse-card-item {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s;
}

.warehouse-card-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.warehouse-card-thumb {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.warehouse-card-info {
    padding: var(--spacing-sm);
}

.warehouse-card-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: var(--spacing-xs);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.warehouse-card-status {
    font-size: 0.75rem;
    color: var(--color-text-secondary);
}

.warehouse-card-status.published {
    color: var(--color-success);
}

.warehouse-card-status.draft {
    color: var(--color-warning);
}

/* 卡片生成状态 */
.card-generating {
    position: relative;
    overflow: hidden;
}

.card-generating::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* ========== AI 智能卡片生成器样式 ========== */
.card-generator-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
}

.cg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.cg-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    background: #f8fafc;
}

.cg-sidebar {
    width: 420px;
    background: #fff;
    border-right: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    z-index: 20;
    height: 100%;
    box-shadow: 2px 0 10px rgba(0,0,0,0.02);
}

.cg-header {
    padding: 18px 24px;
    border-bottom: 1px solid #e2e8f0;
    background: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cg-header h2 {
    font-size: 18px;
    font-weight: 800;
    color: #1e293b;
    letter-spacing: -0.5px;
    margin: 0;
}

.cg-close {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: #f1f5f9;
    color: #64748b;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}

.cg-close:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.cg-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.cg-section {
    background: #fff;
    padding: 0;
    margin-bottom: 10px;
}

.cg-section-publish {
    background: #fff5f7;
    border: 1px solid #ffe4e8;
    padding: 15px;
    border-radius: 12px;
}

.cg-section-title {
    font-size: 13px;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cg-section-publish .cg-section-title {
    color: #ff2442;
}

.cg-import-group {
    display: flex;
    gap: 8px;
}

.cg-import-btn {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    cursor: pointer;
    font-weight: 600;
    transition: 0.2s;
    background: #eff6ff;
    color: #3b82f6;
}

.cg-import-btn:hover {
    background: #3b82f6;
    color: white;
}

.cg-textarea,
.cg-input,
.cg-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 13px;
    background: #fff;
    outline: none;
    transition: 0.2s;
    color: #334155;
    font-family: inherit;
}

.cg-textarea {
    resize: vertical;
}

.cg-textarea:focus,
.cg-input:focus,
.cg-select:focus {
    border-color: #94a3b8;
    box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.1);
}

.cg-textarea::placeholder,
.cg-input::placeholder {
    color: #cbd5e1;
}

.cg-btn-smart {
    background: #ff2442;
    color: white;
    border: none;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
}

.cg-btn-smart:hover {
    background: #e11d3c;
}

.cg-btn-auto {
    background: #e0f2fe;
    color: #0284c7;
    border: 1px solid #bae6fd;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
}

.cg-btn-auto:hover {
    background: #0284c7;
    color: white;
}

.cg-btn-reset {
    background: #fff;
    color: #64748b;
    border: 1px solid #e2e8f0;
    width: 100%;
    padding: 8px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 20px;
    transition: 0.2s;
}

.cg-btn-reset:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #334155;
}

.cg-bg-control {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px dashed #ddd;
}

.cg-batch-panel {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 15px;
    border-radius: 12px;
    margin-top: 20px;
}

.cg-batch-header {
    font-size: 12px;
    font-weight: 800;
    color: #475569;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.cg-batch-row {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}

.cg-batch-label {
    font-size: 11px;
    color: #64748b;
    width: 50px;
    font-weight: 600;
}

.cg-file-custom {
    flex: 1;
    font-size: 12px;
    color: #64748b;
    background: white;
    border: 1px solid #cbd5e1;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    transition: 0.2s;
}

.cg-file-custom:hover {
    border-color: #94a3b8;
}

.cg-footer {
    padding: 20px 24px;
    border-top: 1px solid #e2e8f0;
    background: #fff;
}

.cg-btn-group {
    display: flex;
    gap: 12px;
}

.cg-btn-main {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 10px;
    background: #1e293b;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    font-size: 13px;
    transition: 0.2s;
}

.cg-btn-main:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
}

.cg-btn-save {
    background: #ff2442;
}

.cg-btn-save:hover {
    background: #e11d3c;
}

.cg-btn-outline {
    background: white;
    color: #333;
    border: 1px solid #cbd5e1;
}

.cg-btn-outline:hover {
    background: #f8fafc;
}

.cg-preview-area {
    flex: 1;
    background: #eef2f6;
    padding: 40px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 40px;
    align-items: flex-start;
}

/* 卡片样式 */
.cg-card-wrapper {
    position: relative;
    margin-bottom: 10px;
    transition: 0.3s;
}

.cg-card-container {
    width: 375px;
    min-height: 500px;
    background: var(--card-bg, #fff);
    color: var(--card-text, #222);
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.cg-bg-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0.1;
    z-index: 0;
    pointer-events: none;
}

.cg-layout-cover {
    padding: 40px;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.cg-cover-title {
    font-size: 50px;
    font-weight: 900;
    line-height: 1.15;
    margin-bottom: 20px;
    white-space: pre-wrap;
    position: relative;
    z-index: 1;
}

.cg-cover-sub {
    font-size: 18px;
    font-weight: 500;
    opacity: 0.8;
    margin-bottom: 25px;
    position: relative;
    z-index: 1;
}

.cg-cover-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.cg-tag {
    padding: 5px 12px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 700;
    border: 1px solid currentColor;
}

.cg-layout-content {
    justify-content: space-between;
}

.cg-content-body {
    flex: 1;
    padding: 45px 36px;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.cg-content-text p {
    margin-bottom: 20px;
    text-align: justify;
    white-space: pre-wrap;
    letter-spacing: 0.05em;
    line-height: 1.8;
}

.cg-card-footer {
    height: 50px;
    padding: 0 36px;
    display: flex;
    align-items: center;
    font-size: 11px;
    font-weight: 600;
    opacity: 0.5;
    border-top: 1px solid rgba(0,0,0,0.05);
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    margin-top: auto;
}

.cg-btn-card-del {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #ef4444;
    color: white;
    border: 2px solid white;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: 0.2s;
    opacity: 0;
    pointer-events: none;
    transform: scale(0.8);
}

.cg-card-wrapper:hover .cg-btn-card-del {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}

.cg-btn-card-del:hover {
    background: #dc2626;
    transform: scale(1.1);
}

/* 卡片主题 */
.cg-theme-rednote { --card-bg: #fff; --card-text: #222; --accent: #ff2442; }
.cg-theme-rednote .cg-tag { background: #ff2442; color: #fff; border: none; }

.cg-theme-dark { --card-bg: #111; --card-text: #f5f5f5; --accent: #d4af37; }
.cg-theme-dark .cg-tag { color: #d4af37; border-color: #d4af37; }

.cg-theme-acid { background: linear-gradient(135deg, #ccff00 0%, #00ff99 100%); --card-text: #000; --accent: #000; }
.cg-theme-acid .cg-tag { background: #000; color: #ccff00; border: none; border-radius: 0; }
.cg-theme-acid .cg-card-container { border: 2px solid #000; }

.cg-theme-mag { --card-bg: #fdfdfd; --card-text: #1a1a1a; --accent: #1a1a1a; }
.cg-theme-mag .cg-layout-cover { align-items: flex-start !important; text-align: left !important; }
.cg-theme-mag .cg-cover-title { font-size: 60px; letter-spacing: -2px; }
.cg-theme-mag .cg-tag { border: 1px solid #000; color: #000; background: transparent; }

.cg-theme-warning { --card-bg: #ffcc00; --card-text: #000; --accent: #000; }
.cg-theme-warning .cg-tag { background: #000; color: #ffcc00; border: none; }

.cg-theme-serif { --card-bg: #f4f0e6; --card-text: #4a3b2a; --accent: #8b5a2b; font-family: "Noto Serif SC", serif; }
.cg-theme-serif .cg-tag { border: 1px solid #8b5a2b; color: #8b5a2b; }

.cg-theme-blue { --card-bg: #f0f7ff; --card-text: #003366; --accent: #0056b3; }
.cg-theme-green { --card-bg: #e8f5e9; --card-text: #1b5e20; --accent: #2e7d32; }
.cg-theme-pink { --card-bg: #fff0f5; --card-text: #880e4f; --accent: #d81b60; }
.cg-theme-orange { --card-bg: #fff8e1; --card-text: #bf360c; --accent: #ff6f00; }

.cg-theme-cyber { background: linear-gradient(45deg, #120458, #ff00ff); --card-text: #00ffff; --accent: #ffff00; }
.cg-theme-cyber .cg-cover-title { text-shadow: 2px 2px 0px #ff00ff; }

.cg-theme-morandi { --card-bg: #e6e6e6; --card-text: #5c5c5c; --accent: #7a8b8b; }
.cg-theme-news { --card-bg: #fcf6e5; --card-text: #2f2f2f; --accent: #c0392b; }
.cg-theme-news .cg-card-container { border: 1px solid #ddd; }

.cg-theme-luxury { background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%); --card-text: #fcd34d; --accent: #f59e0b; }
.cg-theme-luxury .cg-tag { border: 1px solid #fcd34d; color: #fcd34d; }

.cg-theme-outline { --card-bg: #fff; --card-text: #000; --accent: #000; }
.cg-theme-outline .cg-card-container { border: 4px solid #000; }
.cg-theme-outline .cg-tag { border: 2px solid #000; font-weight: 900; }

/* 卡片仓库 */
.cg-warehouse-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1100;
}

.cg-warehouse-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #f8fafc;
}

.cg-warehouse-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.cg-wh-header {
    background: #fff;
    padding: 15px 30px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
}

.cg-wh-title {
    font-size: 18px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #1e293b;
}

.cg-wh-close {
    background: #fff;
    color: #475569;
    border: 1px solid #e2e8f0;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}

.cg-wh-close:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: #fff5f7;
}

.cg-wh-content {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
    width: 100%;
    background: #f8fafc;
}

.cg-draft-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    max-width: 1200px;
    margin: 0 auto;
}

.cg-draft-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    transition: 0.3s;
    border: 1px solid #f1f5f9;
    position: relative;
}

.cg-draft-img-box {
    width: 100%;
    height: 220px;
    background: #f1f5f9;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.cg-draft-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
}

.cg-draft-body {
    padding: 15px;
}

.cg-draft-title {
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #334155;
}

.cg-draft-date {
    color: #94a3b8;
    font-size: 12px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.cg-draft-actions {
    display: flex;
    gap: 10px;
}

.cg-btn-wh-pub {
    width: 100%;
    background: #222;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    font-size: 13px;
}

.cg-btn-wh-del {
    background: #fff0f0;
    color: #ff2442;
    border: 1px solid #ffcccc;
    width: 40px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

.cg-btn-wh-edit {
    background: #e0f2fe;
    color: #0284c7;
    border: 1px solid #bae6fd;
    width: 40px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

/* 字体样式 */
.cg-font-default { font-family: "Noto Sans SC", sans-serif; }
.cg-font-serif { font-family: "Noto Serif SC", "Songti SC", serif; }
.cg-font-kaiti { font-family: "Kaiti SC", "KaiTi", "STKaiti", serif; }
.cg-font-heavy { font-family: "Noto Sans SC", sans-serif; font-weight: 900; }
.cg-font-mono { font-family: "Menlo", "Monaco", "Courier New", monospace; }
.cg-font-round { font-family: "Varela Round", "Yuanti SC", "YouYuan", sans-serif; }
.cg-font-kuaile { font-family: "ZCOOL KuaiLe", cursive; }
.cg-font-brush { font-family: "Ma Shan Zheng", cursive; }
.cg-font-condensed { font-family: "ZCOOL QingKe HuangYou", sans-serif; }
.cg-font-elegant { font-family: "ZCOOL XiaoWei", serif; }

@media (max-width: 768px) {
    .cg-sidebar {
        width: 100%;
        height: auto;
    }

    .cg-container {
        flex-direction: column;
        overflow-y: auto;
    }

    .cg-preview-area {
        display: block;
        padding: 20px;
        min-height: 500px;
    }

    .cg-draft-grid {
        grid-template-columns: 1fr;
    }
}

/* ==================== 结果卡片移动端优化 ==================== */
@media (max-width: 768px) {
    .result-card {
        flex-direction: column;
        align-items: flex-start;
        padding: 1rem;
    }

    .result-cover {
        width: 100%;
        height: 200px;
    }

    .result-card-header {
        width: 100%;
    }

    .result-info {
        width: 100%;
    }

    .result-stats {
        flex-wrap: wrap;
        gap: 0.75rem;
        width: 100%;
    }

    .result-actions {
        flex-direction: row;
        flex-wrap: wrap;
        width: 100%;
        gap: 0.5rem;
    }

    .btn-view,
    .btn-copy,
    .btn-delete,
    .btn-sync-feishu-single {
        flex: 1;
        min-width: 80px;
        padding: 0.5rem 0.75rem;
        font-size: 0.8125rem;
    }

    .result-title {
        font-size: 0.9375rem;
    }

    .result-author,
    .result-time {
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .result-card {
        padding: 0.75rem;
    }

    .result-cover {
        height: 150px;
    }

    .result-actions {
        flex-direction: column;
    }

    .btn-view,
    .btn-copy,
    .btn-delete,
    .btn-sync-feishu-single {
        width: 100%;
    }
}

/* 运营助手真实操作截图：图片保持原样，页面仅提供统一的查看外框。 */
.assistant-landing-page .plugin-guide-btn.demo {
    border: 1px solid rgba(20, 125, 255, 0.2);
    background: var(--assistant-blue-soft);
    color: var(--assistant-blue-deep);
    box-shadow: none;
}

.assistant-landing-page .plugin-guide-btn.demo:hover {
    border-color: var(--assistant-blue);
    background: #fff;
    box-shadow: 0 10px 22px rgba(20, 125, 255, 0.12);
    transform: translateY(-1px);
}

.assistant-landing-page .plugin-guide-btn.demo svg {
    width: 1.1rem;
    height: 1.1rem;
}

.assistant-demo-modal {
    position: fixed;
    inset: 0;
    z-index: 4000;
    display: grid;
    place-items: center;
    padding: 1.5rem;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease, visibility 180ms ease;
}

.assistant-demo-modal.is-open {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

.assistant-download-modal {
    position: fixed;
    inset: 0;
    z-index: 4100;
    display: grid;
    place-items: center;
    padding: 1.5rem;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease, visibility 180ms ease;
}

.assistant-download-modal.is-open {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

.assistant-download-backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(9, 20, 38, 0.68);
    backdrop-filter: blur(10px);
}

.assistant-download-dialog {
    position: relative;
    z-index: 1;
    width: min(460px, 100%);
    box-sizing: border-box;
    padding: 2rem;
    border: 1px solid rgba(157, 190, 235, 0.52);
    border-radius: 24px;
    background: linear-gradient(145deg, #ffffff 0%, #f5f9ff 100%);
    box-shadow: 0 28px 90px rgba(4, 15, 34, 0.38);
}

.assistant-download-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 2rem;
    height: 2rem;
    border: 0;
    border-radius: 50%;
    background: #edf4ff;
    color: #3973ba;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
}

.assistant-download-eyebrow {
    display: inline-flex;
    margin-bottom: 0.65rem;
    color: #2563eb;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.12em;
}

.assistant-download-dialog h2 {
    margin: 0;
    color: var(--assistant-ink);
    font-size: clamp(1.65rem, 4vw, 2rem);
    letter-spacing: -0.035em;
}

.assistant-download-lead {
    margin: 0.65rem 0 1.15rem;
    color: #64748b;
    font-size: 0.96rem;
    line-height: 1.7;
}

.assistant-download-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.45rem;
    margin: 0 0 1.35rem;
    padding: 0;
    list-style: none;
}

.assistant-download-steps li {
    display: grid;
    gap: 0.42rem;
    min-width: 0;
    padding: 0.72rem 0.65rem;
    border: 1px solid rgba(191, 219, 254, 0.88);
    border-radius: 13px;
    background: rgba(239, 246, 255, 0.7);
    color: #526780;
    font-size: 0.75rem;
    line-height: 1.35;
}

.assistant-download-steps b {
    display: grid;
    width: 1.25rem;
    height: 1.25rem;
    place-items: center;
    border-radius: 50%;
    background: #2563eb;
    color: #fff;
    font-size: 0.7rem;
}

.assistant-download-label {
    display: block;
    margin-bottom: 0.55rem;
    color: #344862;
    font-size: 0.88rem;
    font-weight: 700;
}

.assistant-download-input {
    width: 100%;
    box-sizing: border-box;
    padding: 0.9rem 1rem;
    border: 1px solid #d5e3f5;
    border-radius: 12px;
    background: #fff;
    color: var(--assistant-ink);
    font-size: 1rem;
    letter-spacing: 0.035em;
    outline: none;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.assistant-download-input:focus {
    border-color: var(--assistant-blue);
    box-shadow: 0 0 0 4px rgba(20, 125, 255, 0.12);
}

.assistant-download-error {
    margin: 0.75rem 0 0;
    color: #c4384b;
    font-size: 0.88rem;
    line-height: 1.45;
}

.assistant-download-success {
    margin: 0.75rem 0 0;
    padding: 0.68rem 0.8rem;
    border: 1px solid rgba(22, 163, 74, 0.2);
    border-radius: 10px;
    background: rgba(240, 253, 244, 0.9);
    color: #167544;
    font-size: 0.85rem;
    line-height: 1.5;
}

.assistant-download-submit {
    width: 100%;
    margin-top: 1.15rem;
    padding: 0.92rem 1rem;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, #147dff 0%, #2468e8 100%);
    box-shadow: 0 13px 25px rgba(20, 125, 255, 0.22);
    color: #fff;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
}

.assistant-download-submit:disabled {
    cursor: wait;
    opacity: 0.72;
}

.assistant-download-get-code {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.1rem;
    padding: 0.9rem 1rem;
    border: 1px solid rgba(191, 219, 254, 0.9);
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(239, 246, 255, 0.92), rgba(255, 255, 255, 0.9));
}

.assistant-download-get-code div {
    display: grid;
    gap: 0.2rem;
}

.assistant-download-get-code strong {
    color: #21364f;
    font-size: 0.88rem;
}

.assistant-download-get-code span {
    color: #6b7f98;
    font-size: 0.78rem;
}

.assistant-download-copy {
    flex: 0 0 auto;
    padding: 0.55rem 0.68rem;
    border: 1px solid rgba(37, 99, 235, 0.22);
    border-radius: 9px;
    background: #fff;
    color: #2563eb;
    font-size: 0.78rem;
    font-weight: 750;
    cursor: pointer;
    transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.assistant-download-copy:hover {
    border-color: #2563eb;
    background: #eff6ff;
    transform: translateY(-1px);
}

@media (max-width: 520px) {
    .assistant-download-dialog {
        padding: 1.45rem;
        border-radius: 20px;
    }

    .assistant-download-steps {
        gap: 0.35rem;
    }

    .assistant-download-steps li {
        padding: 0.6rem 0.45rem;
        font-size: 0.69rem;
    }

    .assistant-download-get-code {
        align-items: flex-start;
        flex-direction: column;
    }
}

.assistant-demo-backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(9, 20, 38, 0.72);
    backdrop-filter: blur(12px);
    cursor: default;
}

.assistant-demo-dialog {
    position: relative;
    z-index: 1;
    width: min(1180px, 100%);
    max-height: min(840px, calc(100vh - 3rem));
    overflow: auto;
    border: 1px solid rgba(172, 194, 226, 0.7);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 28px 90px rgba(4, 15, 34, 0.38);
}

.assistant-demo-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.35rem 1rem;
    border-bottom: 1px solid rgba(20, 125, 255, 0.1);
}

.assistant-demo-header span {
    display: block;
    margin-bottom: 0.25rem;
    color: var(--assistant-blue-deep);
    font-size: 0.73rem;
    font-weight: 800;
    letter-spacing: 0.13em;
}

.assistant-demo-header h2 {
    margin: 0;
    color: var(--assistant-ink);
    font-size: 1.28rem;
}

.assistant-demo-close {
    display: grid;
    width: 2.35rem;
    height: 2.35rem;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid rgba(20, 125, 255, 0.14);
    border-radius: 50%;
    background: var(--assistant-blue-soft);
    color: var(--assistant-blue-deep);
    cursor: pointer;
    transition: transform 160ms ease, background 160ms ease;
}

.assistant-demo-close:hover {
    background: #fff;
    transform: rotate(6deg);
}

.assistant-demo-close svg {
    width: 1.05rem;
    height: 1.05rem;
}

.assistant-demo-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 250px;
    gap: 1rem;
    padding: 1rem;
}

.assistant-demo-stage {
    min-width: 0;
    margin: 0;
    border: 1px solid rgba(20, 125, 255, 0.13);
    border-radius: 16px;
    overflow: hidden;
    background: #f5f8fc;
}

.assistant-demo-image-wrap {
    display: grid;
    min-height: 360px;
    place-items: center;
    overflow: auto;
    padding: 0.85rem;
    background:
        linear-gradient(90deg, rgba(20, 125, 255, 0.035) 1px, transparent 1px),
        linear-gradient(rgba(20, 125, 255, 0.035) 1px, transparent 1px),
        #f7faff;
    background-size: 22px 22px;
}

.assistant-demo-image-wrap img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 520px;
    object-fit: contain;
    border-radius: 9px;
    box-shadow: 0 12px 28px rgba(24, 47, 78, 0.16);
}

.assistant-demo-stage figcaption {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.85rem 1rem;
    background: #fff;
}

.assistant-demo-stage figcaption span {
    flex: 0 0 auto;
    color: var(--assistant-blue-deep);
    font-size: 0.73rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.assistant-demo-stage figcaption p {
    margin: 0;
    color: var(--assistant-muted);
    font-size: 0.9rem;
    line-height: 1.55;
}

.assistant-demo-tabs {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.assistant-demo-tab {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    width: 100%;
    padding: 0.78rem;
    border: 1px solid transparent;
    border-radius: 13px;
    background: transparent;
    color: var(--assistant-ink);
    text-align: left;
    cursor: pointer;
    transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.assistant-demo-tab:hover {
    background: var(--assistant-blue-soft);
}

.assistant-demo-tab.is-active {
    border-color: rgba(20, 125, 255, 0.18);
    background: var(--assistant-blue-soft);
    box-shadow: 0 9px 18px rgba(20, 125, 255, 0.08);
}

.assistant-demo-tab b {
    display: grid;
    width: 2rem;
    height: 2rem;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 9px;
    background: #f0f5fc;
    color: var(--assistant-blue-deep);
    font-size: 0.72rem;
}

.assistant-demo-tab.is-active b {
    background: var(--assistant-blue);
    color: #fff;
}

.assistant-demo-tab span {
    min-width: 0;
    color: var(--assistant-ink);
    font-size: 0.9rem;
    font-weight: 750;
}

.assistant-demo-tab small {
    display: block;
    margin-top: 0.18rem;
    overflow: hidden;
    color: var(--assistant-muted);
    font-size: 0.73rem;
    font-weight: 500;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.assistant-demo-open {
    overflow: hidden;
}

html[data-home-theme="red"] .assistant-landing-page .plugin-guide-btn.demo {
    border-color: rgba(217, 67, 79, 0.2);
    color: #c83f4b;
}

html[data-home-theme="red"] .assistant-landing-page .plugin-guide-btn.demo:hover {
    border-color: #e94752;
    box-shadow: 0 10px 22px rgba(220, 63, 77, 0.12);
}

html[data-home-theme="red"] .assistant-demo-header {
    border-bottom-color: rgba(217, 67, 79, 0.12);
}

html[data-home-theme="red"] .assistant-demo-close,
html[data-home-theme="red"] .assistant-demo-tab.is-active {
    border-color: rgba(217, 67, 79, 0.18);
}

html[data-home-theme="red"] .assistant-demo-tab:hover,
html[data-home-theme="red"] .assistant-demo-tab.is-active {
    background: #fff0ed;
}

html[data-home-theme="red"] .assistant-demo-tab b {
    background: #fff0ed;
    color: #c83f4b;
}

html[data-home-theme="red"] .assistant-demo-tab.is-active b {
    background: #ef5860;
    color: #fff;
}

/* 下载弹窗位于主内容容器外，需单独继承首页的珊瑚红主题。 */
html[data-home-theme="red"] .assistant-download-backdrop {
    /* Keep the red page readable without turning the whole background muddy. */
    background: rgba(15, 23, 42, 0.42);
    backdrop-filter: blur(13px) saturate(0.82);
}

html[data-home-theme="red"] .assistant-download-dialog {
    border-color: rgba(231, 71, 82, 0.24);
    background: linear-gradient(145deg, #fffefe 0%, #fff5f3 100%);
    box-shadow: 0 28px 90px rgba(110, 32, 42, 0.34);
}

html[data-home-theme="red"] .assistant-download-close {
    background: #fff0ed;
    color: #d9434f;
}

html[data-home-theme="red"] .assistant-download-eyebrow {
    color: #d9434f;
}

html[data-home-theme="red"] .assistant-download-steps li {
    border-color: rgba(231, 71, 82, 0.18);
    background: rgba(255, 241, 238, 0.82);
    color: #806268;
}

html[data-home-theme="red"] .assistant-download-steps b {
    background: linear-gradient(135deg, #ff7569, #dc3f4d);
}

html[data-home-theme="red"] .assistant-download-label {
    color: #5f3d45;
}

html[data-home-theme="red"] .assistant-download-input {
    border-color: rgba(231, 71, 82, 0.26);
}

html[data-home-theme="red"] .assistant-download-input:focus {
    border-color: #e94752;
    box-shadow: 0 0 0 4px rgba(233, 71, 82, 0.12);
}

html[data-home-theme="red"] .assistant-download-submit {
    background: linear-gradient(135deg, #ff7569, #dc3f4d);
    box-shadow: 0 13px 25px rgba(220, 63, 77, 0.23);
}

html[data-home-theme="red"] .assistant-download-success {
    border-color: rgba(220, 63, 77, 0.18);
    background: #fff1ef;
    color: #c83f4b;
}

html[data-home-theme="red"] .assistant-download-get-code {
    border-color: rgba(231, 71, 82, 0.2);
    background: linear-gradient(135deg, rgba(255, 240, 237, 0.95), rgba(255, 255, 255, 0.92));
}

html[data-home-theme="red"] .assistant-download-get-code strong {
    color: #5f3d45;
}

html[data-home-theme="red"] .assistant-download-copy {
    border-color: rgba(217, 67, 79, 0.28);
    color: #d9434f;
}

html[data-home-theme="red"] .assistant-download-copy:hover {
    border-color: #e94752;
    background: #fff0ed;
}

@media (max-width: 760px) {
    .assistant-demo-modal {
        padding: 0.75rem;
    }

    .assistant-demo-dialog {
        max-height: calc(100vh - 1.5rem);
        border-radius: 18px;
    }

    .assistant-demo-layout {
        grid-template-columns: 1fr;
    }

    .assistant-demo-tabs {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .assistant-demo-image-wrap {
        min-height: 220px;
        padding: 0.45rem;
    }
}

@media (max-width: 480px) {
    .assistant-demo-header {
        padding: 1rem;
    }

    .assistant-demo-stage figcaption {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.3rem;
    }

    .assistant-demo-tabs {
        grid-template-columns: 1fr;
    }
}
