/* ====================================================================
 * THEME NEXTGEN (次世代顶奢 Agent 视觉系统)
 * 涵盖三大全新视觉宇宙：
 * 1. vision  : 空间浮光 (visionOS Spatial Glass / 微晶高光与全息景深)
 * 2. aurora  : 霓光流体 (Apple Intelligence / 流体极光呼吸感)
 * 3. titanium: 钛金工坊 (Titanium Studio / Linear 极客发丝级生产力美学)
 * ================================================================== */

/* --------------------------------------------------------------------
 * 1. 空间浮光 (visionOS Spatial Glass)
 * ------------------------------------------------------------------ */
html[data-cow-theme="vision"] {
    --cow-accent: #38bdf8;
    --cow-accent-soft: rgba(56, 189, 248, 0.2);
    --cow-page: #0a0d16;
    --cow-surface: rgba(255, 255, 255, 0.08);
    --cow-surface-elevated: rgba(255, 255, 255, 0.12);
    --cow-sidebar: rgba(14, 18, 28, 0.75);
    --cow-border: rgba(255, 255, 255, 0.15);
    --cow-border-specular: rgba(255, 255, 255, 0.35);
    --cow-text: #f8fafc;
    --cow-text-muted: #94a3b8;
    --cow-radius: 18px;
    --cow-radius-lg: 26px;
    --cow-shadow-soft: 0 16px 40px rgba(0, 0, 0, 0.45);
    --cow-shadow-float: 0 24px 60px rgba(0, 0, 0, 0.6), 0 0 35px rgba(56, 189, 248, 0.15);
}

html[data-cow-theme="vision"] body {
    color: var(--cow-text) !important;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Segoe UI", sans-serif !important;
    background-color: #080a14 !important;
    background-image: 
        radial-gradient(circle 680px at 20% 15%, rgba(56, 189, 248, 0.28), transparent 70%),
        radial-gradient(circle 720px at 80% 20%, rgba(168, 85, 247, 0.24), transparent 70%),
        radial-gradient(circle 650px at 50% 60%, rgba(14, 165, 233, 0.16), transparent 75%),
        radial-gradient(circle 800px at 50% 100%, rgba(99, 102, 241, 0.20), transparent 75%),
        linear-gradient(180deg, #070912 0%, #0d1220 100%) !important;
    background-attachment: fixed !important;
    letter-spacing: -0.012em;
}

html[data-cow-theme="vision"] #app,
html[data-cow-theme="vision"] #main-content,
html[data-cow-theme="vision"] #content-area,
html[data-cow-theme="vision"] #view-chat,
html[data-cow-theme="vision"] .chat-main {
    background: transparent !important;
}

/* 侧边栏：VisionOS 悬浮毛玻璃 */
html[data-cow-theme="vision"] #sidebar {
    background: rgba(12, 16, 26, 0.68) !important;
    backdrop-filter: blur(36px) saturate(210%) !important;
    -webkit-backdrop-filter: blur(36px) saturate(210%) !important;
    border-right: 1px solid rgba(255, 255, 255, 0.10) !important;
    box-shadow: 12px 0 36px rgba(0, 0, 0, 0.38) !important;
}

html[data-cow-theme="vision"] #sidebar > div:first-child {
    border-bottom: 1px solid rgba(255, 255, 255, 0.10) !important;
}

html[data-cow-theme="vision"] .sidebar-item {
    color: #94a3b8 !important;
    border-radius: 12px !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

html[data-cow-theme="vision"] .sidebar-item:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.09) !important;
    backdrop-filter: blur(14px) !important;
}

html[data-cow-theme="vision"] .sidebar-item.active {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.14) !important;
    border: 1px solid rgba(255, 255, 255, 0.22) !important;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.35) !important;
    backdrop-filter: blur(20px) !important;
}

html[data-cow-theme="vision"] .sidebar-item.active .item-icon {
    color: #38bdf8 !important;
    text-shadow: 0 0 12px rgba(56, 189, 248, 0.7);
}

/* 顶部导航 Header */
html[data-cow-theme="vision"] #main-content > header {
    background: rgba(12, 16, 26, 0.58) !important;
    backdrop-filter: blur(32px) saturate(200%) !important;
    -webkit-backdrop-filter: blur(32px) saturate(200%) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.10) !important;
}

html[data-cow-theme="vision"] #main-content > header .font-medium {
    color: #ffffff !important;
    letter-spacing: 0.01em;
}

html[data-cow-theme="vision"] #main-content > header button {
    background: rgba(255, 255, 255, 0.07) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 999px !important;
    color: #f1f5f9 !important;
}

html[data-cow-theme="vision"] #main-content > header button:hover {
    background: rgba(255, 255, 255, 0.14) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
}

/* 对话主区域：微晶星阵漫射 */
html[data-cow-theme="vision"] #chat-messages {
    background: transparent !important;
}

/* 欢迎页卡片 (Example Cards) - 极致物理拟态高光玻璃 */
html[data-cow-theme="vision"] .example-card {
    background: rgba(255, 255, 255, 0.07) !important;
    backdrop-filter: blur(36px) saturate(210%) !important;
    -webkit-backdrop-filter: blur(36px) saturate(210%) !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.38) !important;
    border-radius: var(--cow-radius) !important;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.45), inset 0 1px 1px rgba(255, 255, 255, 0.28) !important;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

html[data-cow-theme="vision"] .example-card:hover {
    transform: translateY(-5px) scale(1.015) !important;
    background: rgba(255, 255, 255, 0.12) !important;
    border-color: rgba(255, 255, 255, 0.28) !important;
    border-top-color: rgba(255, 255, 255, 0.65) !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55), 0 0 35px rgba(56, 189, 248, 0.25), inset 0 1px 1px rgba(255, 255, 255, 0.5) !important;
}

html[data-cow-theme="vision"] .example-card .font-medium {
    color: #ffffff !important;
    font-weight: 600 !important;
}

html[data-cow-theme="vision"] .example-card > p {
    color: #94a3b8 !important;
}

/* AI 消息气泡：悬浮晶体 */
html[data-cow-theme="vision"] .bot-message-group > div > .msg-content {
    background: rgba(255, 255, 255, 0.07) !important;
    backdrop-filter: blur(36px) saturate(210%) !important;
    -webkit-backdrop-filter: blur(36px) saturate(210%) !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.38) !important;
    border-radius: var(--cow-radius) !important;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45), inset 0 1px 1px rgba(255, 255, 255, 0.25) !important;
    color: #f1f5f9 !important;
}

/* 用户气泡：全息渐变晶体 */
html[data-cow-theme="vision"] .user-bubble {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.92) 0%, rgba(147, 51, 234, 0.92) 100%) !important;
    backdrop-filter: blur(24px) !important;
    border: 1px solid rgba(255, 255, 255, 0.35) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.65) !important;
    border-radius: 20px !important;
    box-shadow: 0 10px 28px rgba(56, 189, 248, 0.35), inset 0 1px 1px rgba(255, 255, 255, 0.5) !important;
    color: #ffffff !important;
}

html[data-cow-theme="vision"] .user-bubble * {
    color: #ffffff !important;
}

/* 底部输入框：Vision 拟态浮岛 */
html[data-cow-theme="vision"] #composer-card {
    background: rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(40px) saturate(220%) !important;
    -webkit-backdrop-filter: blur(40px) saturate(220%) !important;
    border: 1px solid rgba(255, 255, 255, 0.16) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.42) !important;
    border-radius: 20px !important;
    box-shadow: 0 20px 55px rgba(0, 0, 0, 0.6), 0 0 35px rgba(56, 189, 248, 0.12), inset 0 1px 1px rgba(255, 255, 255, 0.28) !important;
    transition: all 0.25s ease;
}

html[data-cow-theme="vision"] #composer-card:focus-within {
    border-color: rgba(56, 189, 248, 0.6) !important;
    border-top-color: rgba(255, 255, 255, 0.75) !important;
    box-shadow: 0 24px 65px rgba(0, 0, 0, 0.7), 0 0 45px rgba(56, 189, 248, 0.35), inset 0 1px 1px rgba(255, 255, 255, 0.5) !important;
}

html[data-cow-theme="vision"] #chat-input {
    color: #ffffff !important;
    border: none !important;
    border-color: transparent !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    outline: none !important;
}

html[data-cow-theme="vision"] #chat-input:focus {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

html[data-cow-theme="vision"] #chat-input::placeholder {
    color: #94a3b8 !important;
}

html[data-cow-theme="vision"] #send-btn {
    background: linear-gradient(135deg, #38bdf8 0%, #818cf8 100%) !important;
    box-shadow: 0 4px 18px rgba(56, 189, 248, 0.5) !important;
    border-radius: 12px !important;
    color: #030712 !important;
}

/* ⌘K 弹窗与所有浮层菜单 */
html[data-cow-theme="vision"] #spotlight-modal,
html[data-cow-theme="vision"] .session-panel,
html[data-cow-theme="vision"] .workspace-panel,
html[data-cow-theme="vision"] .confirm-modal,
html[data-cow-theme="vision"] .cfg-dropdown-menu,
html[data-cow-theme="vision"] .attach-menu,
html[data-cow-theme="vision"] .slash-menu,
html[data-cow-theme="vision"] #visual-theme-menu,
html[data-cow-theme="vision"] #lang-menu {
    background: rgba(16, 21, 33, 0.85) !important;
    backdrop-filter: blur(45px) saturate(220%) !important;
    -webkit-backdrop-filter: blur(45px) saturate(220%) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.42) !important;
    border-radius: var(--cow-radius) !important;
    box-shadow: var(--cow-shadow-float) !important;
}

html[data-cow-theme="vision"] .spotlight-item:hover,
html[data-cow-theme="vision"] .spotlight-item.active {
    background: rgba(255, 255, 255, 0.10) !important;
    border: 1px solid rgba(255, 255, 255, 0.22) !important;
}


/* --------------------------------------------------------------------
 * 2. 霓光流体 (Apple Intelligence / Aurora Lumina)
 * 多光谱（青翠、洋红、晨曦橙）高透流体呼吸美学
 * ------------------------------------------------------------------ */
html[data-cow-theme="aurora"] {
    --cow-accent: #f43f5e;
    --cow-accent-soft: rgba(244, 63, 94, 0.18);
    --cow-page: #0a0b10;
    --cow-surface: rgba(255, 255, 255, 0.06);
    --cow-surface-elevated: rgba(255, 255, 255, 0.10);
    --cow-sidebar: rgba(12, 14, 20, 0.72);
    --cow-border: rgba(255, 255, 255, 0.12);
    --cow-text: #f8fafc;
    --cow-text-muted: #94a3b8;
    --cow-radius: 18px;
    --cow-radius-lg: 26px;
    --cow-shadow-soft: 0 14px 36px rgba(0, 0, 0, 0.5);
    --cow-shadow-float: 0 24px 65px rgba(0, 0, 0, 0.7), 0 0 50px rgba(244, 63, 94, 0.22);
}

@keyframes cowAuroraBorderGlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

html[data-cow-theme="aurora"] body {
    color: var(--cow-text) !important;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", sans-serif !important;
    background-color: #090a10 !important;
    background-image: 
        radial-gradient(circle 650px at 10% 10%, rgba(244, 63, 94, 0.32), transparent 70%),
        radial-gradient(circle 700px at 90% 15%, rgba(6, 182, 212, 0.30), transparent 70%),
        radial-gradient(circle 600px at 50% 55%, rgba(249, 115, 22, 0.22), transparent 75%),
        radial-gradient(circle 750px at 70% 95%, rgba(168, 85, 247, 0.26), transparent 75%),
        linear-gradient(180deg, #08090e 0%, #0e1017 100%) !important;
    background-attachment: fixed !important;
}

html[data-cow-theme="aurora"] #app,
html[data-cow-theme="aurora"] #main-content,
html[data-cow-theme="aurora"] #content-area,
html[data-cow-theme="aurora"] #view-chat,
html[data-cow-theme="aurora"] .chat-main {
    background: transparent !important;
}

html[data-cow-theme="aurora"] #sidebar {
    background: rgba(12, 14, 22, 0.72) !important;
    backdrop-filter: blur(32px) saturate(200%) !important;
    -webkit-backdrop-filter: blur(32px) saturate(200%) !important;
    border-right: 1px solid rgba(255, 255, 255, 0.10) !important;
}

html[data-cow-theme="aurora"] .sidebar-item {
    color: #94a3b8 !important;
    border-radius: 12px !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

html[data-cow-theme="aurora"] .sidebar-item:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(14px) !important;
}

html[data-cow-theme="aurora"] .sidebar-item.active {
    color: #ffffff !important;
    background: linear-gradient(90deg, rgba(244, 63, 94, 0.22), rgba(6, 182, 212, 0.18)) !important;
    border: 1px solid rgba(244, 63, 94, 0.35) !important;
    border-left: 3px solid #f43f5e !important;
    box-shadow: 0 4px 18px rgba(244, 63, 94, 0.25) !important;
}

html[data-cow-theme="aurora"] .sidebar-item.active .item-icon {
    color: #f43f5e !important;
    text-shadow: 0 0 12px rgba(244, 63, 94, 0.7);
}

html[data-cow-theme="aurora"] #main-content > header {
    background: rgba(12, 14, 22, 0.65) !important;
    backdrop-filter: blur(28px) saturate(190%) !important;
    -webkit-backdrop-filter: blur(28px) saturate(190%) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.10) !important;
}

html[data-cow-theme="aurora"] .example-card {
    background: rgba(255, 255, 255, 0.06) !important;
    backdrop-filter: blur(32px) saturate(200%) !important;
    -webkit-backdrop-filter: blur(32px) saturate(200%) !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.36) !important;
    border-radius: var(--cow-radius) !important;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45), inset 0 1px 1px rgba(255, 255, 255, 0.22) !important;
    transition: all 0.25s ease !important;
}

html[data-cow-theme="aurora"] .example-card:hover {
    transform: translateY(-4px) scale(1.01) !important;
    background: rgba(255, 255, 255, 0.10) !important;
    border-color: rgba(244, 63, 94, 0.5) !important;
    border-top-color: rgba(255, 255, 255, 0.65) !important;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.55), 0 0 35px rgba(244, 63, 94, 0.28), inset 0 1px 1px rgba(255, 255, 255, 0.4) !important;
}

html[data-cow-theme="aurora"] .example-card .font-medium {
    color: #ffffff !important;
    font-weight: 600 !important;
}

html[data-cow-theme="aurora"] .example-card > p {
    color: #94a3b8 !important;
}

/* 霓光流体输入卡片：带多光谱流光呼吸动画 */
html[data-cow-theme="aurora"] #composer-card {
    position: relative;
    background: rgba(18, 20, 28, 0.82) !important;
    backdrop-filter: blur(36px) saturate(210%) !important;
    -webkit-backdrop-filter: blur(36px) saturate(210%) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.38) !important;
    border-radius: 20px !important;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.6), 0 0 32px rgba(244, 63, 94, 0.12), inset 0 1px 1px rgba(255, 255, 255, 0.25) !important;
    transition: all 0.3s ease;
}

html[data-cow-theme="aurora"] #composer-card:focus-within {
    border-color: transparent !important;
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.7), 0 0 45px rgba(244, 63, 94, 0.45) !important;
}

html[data-cow-theme="aurora"] #composer-card:focus-within::before {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: 22px;
    padding: 2px;
    background: linear-gradient(90deg, #f43f5e, #f97316, #06b6d4, #a855f7, #f43f5e);
    background-size: 300% 300%;
    animation: cowAuroraBorderGlow 4s linear infinite;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

html[data-cow-theme="aurora"] #chat-input {
    color: #ffffff !important;
    border: none !important;
    border-color: transparent !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    outline: none !important;
}

html[data-cow-theme="aurora"] #chat-input:focus {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

html[data-cow-theme="aurora"] #chat-input::placeholder {
    color: #94a3b8 !important;
}

html[data-cow-theme="aurora"] #send-btn {
    background: linear-gradient(135deg, #f43f5e 0%, #06b6d4 100%) !important;
    box-shadow: 0 4px 18px rgba(244, 63, 94, 0.5) !important;
    border-radius: 12px !important;
    color: #ffffff !important;
}

html[data-cow-theme="aurora"] .user-bubble {
    background: linear-gradient(135deg, #f43f5e 0%, #9333ea 100%) !important;
    border: 0 !important;
    border-radius: 18px !important;
    box-shadow: 0 8px 25px rgba(244, 63, 94, 0.38) !important;
    color: #ffffff !important;
}

html[data-cow-theme="aurora"] .bot-message-group > div > .msg-content {
    background: rgba(255, 255, 255, 0.07) !important;
    backdrop-filter: blur(32px) !important;
    -webkit-backdrop-filter: blur(32px) !important;
    border: 1px solid var(--cow-border) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: var(--cow-radius) !important;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.45), inset 0 1px 1px rgba(255, 255, 255, 0.2) !important;
    color: #f1f5f9 !important;
}

html[data-cow-theme="aurora"] #spotlight-modal,
html[data-cow-theme="aurora"] .session-panel,
html[data-cow-theme="aurora"] .workspace-panel,
html[data-cow-theme="aurora"] .confirm-modal,
html[data-cow-theme="aurora"] .cfg-dropdown-menu,
html[data-cow-theme="aurora"] .attach-menu,
html[data-cow-theme="aurora"] .slash-menu,
html[data-cow-theme="aurora"] #visual-theme-menu,
html[data-cow-theme="aurora"] #lang-menu {
    background: rgba(16, 18, 26, 0.90) !important;
    backdrop-filter: blur(40px) saturate(210%) !important;
    -webkit-backdrop-filter: blur(40px) saturate(210%) !important;
    border: 1px solid rgba(255, 255, 255, 0.16) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.36) !important;
    border-radius: var(--cow-radius) !important;
    box-shadow: var(--cow-shadow-float) !important;
}

html[data-cow-theme="aurora"] .spotlight-item:hover,
html[data-cow-theme="aurora"] .spotlight-item.active {
    background: rgba(244, 63, 94, 0.14) !important;
    border: 1px solid rgba(244, 63, 94, 0.3) !important;
}


/* --------------------------------------------------------------------
 * 3. 钛金工坊 (Titanium Studio / Linear Pro)
 * ------------------------------------------------------------------ */
/* --------------------------------------------------------------------
 * 3. 钛金工坊 (White Titanium Studio / 原色白钛 × Linear 纯白工程极客)
 * ------------------------------------------------------------------ */
html[data-cow-theme="titanium"] {
    --cow-accent: #059669;
    --cow-accent-soft: rgba(5, 150, 105, 0.10);
    --cow-page: #f8f9fc;
    --cow-surface: #ffffff;
    --cow-surface-elevated: #ffffff;
    --cow-sidebar: #f1f3f8;
    --cow-border: rgba(0, 0, 0, 0.08);
    --cow-border-hairline: rgba(0, 0, 0, 0.12);
    --cow-text: #0f172a;
    --cow-text-muted: #64748b;
    --cow-radius: 10px;
    --cow-radius-lg: 14px;
    --cow-shadow-soft: 0 4px 14px rgba(15, 23, 42, 0.05);
    --cow-shadow-float: 0 18px 48px rgba(15, 23, 42, 0.12);
}

html[data-cow-theme="titanium"] body {
    color: var(--cow-text) !important;
    font-family: -apple-system, BlinkMacSystemFont, "JetBrains Mono", "SF Pro Text", "Segoe UI", monospace !important;
    background-color: #f8f9fc !important;
    background-image: 
        linear-gradient(to right, rgba(0, 0, 0, 0.035) 1px, transparent 1px) 0 0 / 28px 28px,
        linear-gradient(to bottom, rgba(0, 0, 0, 0.035) 1px, transparent 1px) 0 0 / 28px 28px !important;
    letter-spacing: -0.01em;
}

html[data-cow-theme="titanium"] #app,
html[data-cow-theme="titanium"] #main-content,
html[data-cow-theme="titanium"] #content-area,
html[data-cow-theme="titanium"] #view-chat,
html[data-cow-theme="titanium"] .chat-main {
    background: transparent !important;
}

html[data-cow-theme="titanium"] #sidebar {
    background: var(--cow-sidebar) !important;
    border-right: 1px solid var(--cow-border) !important;
    box-shadow: 2px 0 12px rgba(15, 23, 42, 0.03) !important;
}

html[data-cow-theme="titanium"] #sidebar > div:first-child {
    border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
}
html[data-cow-theme="titanium"] #sidebar > div:first-child img {
    display: none !important;
}

html[data-cow-theme="titanium"] #sidebar .text-white {
    color: #0f172a !important;
}

html[data-cow-theme="titanium"] #sidebar .text-neutral-500,
html[data-cow-theme="titanium"] #sidebar .text-neutral-600 {
    color: #64748b !important;
}

/* 侧边栏：新对话与看板操作按钮 */
html[data-cow-theme="titanium"] .sidebar-analytics-btn,
html[data-cow-theme="titanium"] .sidebar-new-chat {
    color: #0f172a !important;
    background: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.10) !important;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04) !important;
    font-weight: 600 !important;
}

html[data-cow-theme="titanium"] .sidebar-analytics-btn:hover,
html[data-cow-theme="titanium"] .sidebar-new-chat:hover {
    color: #059669 !important;
    border-color: rgba(5, 150, 105, 0.40) !important;
    background: rgba(5, 150, 105, 0.06) !important;
}

html[data-cow-theme="titanium"] .sidebar-analytics-btn.active {
    color: #ffffff !important;
    background: #059669 !important;
    border-color: #059669 !important;
    box-shadow: 0 2px 8px rgba(5, 150, 105, 0.25) !important;
}

html[data-cow-theme="titanium"] .sidebar-new-chat-kbd {
    color: #64748b !important;
    background: rgba(0, 0, 0, 0.04) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
}

/* 侧边栏：搜索按钮 */
html[data-cow-theme="titanium"] .sidebar-search-btn {
    color: #475569 !important;
    background: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03) !important;
}

html[data-cow-theme="titanium"] .sidebar-search-btn:hover {
    color: #0f172a !important;
    border-color: rgba(5, 150, 105, 0.35) !important;
    background: rgba(5, 150, 105, 0.04) !important;
}

html[data-cow-theme="titanium"] .sidebar-search-btn:hover .sidebar-search-kbd {
    color: #059669 !important;
    border-color: rgba(5, 150, 105, 0.3) !important;
}

/* 侧边栏底部操作图标（机器人、设置等）悬停高亮为主题翠绿色 */
html[data-cow-theme="titanium"] .sidebar-footer-action {
    color: #64748b !important;
}

html[data-cow-theme="titanium"] .sidebar-footer-action:hover {
    color: #059669 !important;
    background: rgba(5, 150, 105, 0.08) !important;
}
html[data-cow-theme="titanium"] .sidebar-item {
    color: #475569 !important;
    border-radius: 8px !important;
    font-size: 13px !important;
    transition: all 0.15s ease;
}

html[data-cow-theme="titanium"] .sidebar-item:hover {
    color: #0f172a !important;
    background: rgba(0, 0, 0, 0.045) !important;
}

html[data-cow-theme="titanium"] .sidebar-item.active {
    color: #059669 !important;
    background: #ffffff !important;
    border: 1px solid rgba(5, 150, 105, 0.25) !important;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04), 0 0 0 1px rgba(5, 150, 105, 0.15) !important;
    font-weight: 600;
}
html[data-cow-theme="titanium"] .sidebar-item.active .item-icon {
    color: #059669 !important;
}

html[data-cow-theme="titanium"] .sidebar-recent-session {
    color: #475569 !important;
}

html[data-cow-theme="titanium"] .sidebar-recent-session:hover {
    color: #0f172a !important;
    background: rgba(0, 0, 0, 0.04) !important;
}

html[data-cow-theme="titanium"] .sidebar-recent-session.active {
    color: #059669 !important;
    background: rgba(5, 150, 105, 0.08) !important;
    font-weight: 600;
}

html[data-cow-theme="titanium"] #main-content > header {
    background: rgba(248, 249, 252, 0.94) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border-bottom: 1px solid var(--cow-border) !important;
}

html[data-cow-theme="titanium"] #main-content > header .font-medium {
    color: #0f172a !important;
}

html[data-cow-theme="titanium"] #main-content > header button {
    background: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    border-radius: 8px !important;
    color: #475569 !important;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04) !important;
}

html[data-cow-theme="titanium"] #main-content > header button:hover {
    color: #0f172a !important;
    border-color: rgba(0, 0, 0, 0.16) !important;
}

html[data-cow-theme="titanium"] #welcome-title {
    color: #0f172a !important;
}

html[data-cow-theme="titanium"] #welcome-subtitle {
    color: #64748b !important;
}

html[data-cow-theme="titanium"] .example-card {
    background: #ffffff !important;
    border: 1px solid var(--cow-border) !important;
    border-radius: var(--cow-radius) !important;
    box-shadow: var(--cow-shadow-soft) !important;
    transition: all 0.2s ease !important;
}

html[data-cow-theme="titanium"] .example-card:hover {
    transform: translateY(-2px) !important;
    border-color: #059669 !important;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08), 0 0 0 1px #059669 !important;
}

html[data-cow-theme="titanium"] .example-card .font-medium {
    color: #0f172a !important;
    font-weight: 600 !important;
}

html[data-cow-theme="titanium"] .example-card > p {
    color: #64748b !important;
}

html[data-cow-theme="titanium"] .chat-main > .flex-shrink-0 {
    background: transparent !important;
    border-top: 1px solid rgba(0, 0, 0, 0.05) !important;
}

html[data-cow-theme="titanium"] #composer-card {
    border: 1px solid rgba(255, 255, 255, 0.90) !important;
    border-radius: 16px !important;
    background: rgba(255, 255, 255, 0.88) !important;
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    transition: box-shadow .2s ease, border-color .2s ease;
}

html[data-cow-theme="titanium"] #composer-card:focus-within {
    border-color: rgba(5, 150, 105, 0.40) !important;
    box-shadow: 0 10px 36px rgba(5, 150, 105, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.95) !important;
}

html[data-cow-theme="titanium"] #chat-input {
    color: #0f172a !important;
    border: none !important;
    border-color: transparent !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    outline: none !important;
}

html[data-cow-theme="titanium"] #chat-input:focus {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

html[data-cow-theme="titanium"] #chat-input::placeholder {
    color: #94a3b8 !important;
}

html[data-cow-theme="titanium"] #send-btn {
    background: #059669 !important;
    color: #ffffff !important;
    font-weight: 600;
    border-radius: 8px !important;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.28) !important;
}

html[data-cow-theme="titanium"] #send-btn:hover {
    background: #047857 !important;
}

html[data-cow-theme="titanium"] .user-bubble {
    background: #059669 !important;
    border: 0 !important;
    border-radius: 18px !important;
    color: #ffffff !important;
    box-shadow: 0 3px 14px rgba(5, 150, 105, 0.30) !important;
}

html[data-cow-theme="titanium"] .user-bubble * {
    color: #ffffff !important;
}

html[data-cow-theme="titanium"] .bot-message-group > div > .msg-content {
    background: #ffffff !important;
    border: 1px solid var(--cow-border) !important;
    border-radius: 10px !important;
    box-shadow: 0 3px 12px rgba(15, 23, 42, 0.04) !important;
    color: #0f172a !important;
}

html[data-cow-theme="titanium"] #spotlight-modal,
html[data-cow-theme="titanium"] .session-panel,
html[data-cow-theme="titanium"] .workspace-panel,
html[data-cow-theme="titanium"] .confirm-modal,
html[data-cow-theme="titanium"] .cfg-dropdown-menu,
html[data-cow-theme="titanium"] .attach-menu,
html[data-cow-theme="titanium"] .slash-menu,
html[data-cow-theme="titanium"] #visual-theme-menu,
html[data-cow-theme="titanium"] #lang-menu {
    background: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.10) !important;
    border-radius: 12px !important;
    box-shadow: var(--cow-shadow-float) !important;
}

html[data-cow-theme="titanium"] .spotlight-item:hover,
html[data-cow-theme="titanium"] .spotlight-item.active {
    background: rgba(5, 150, 105, 0.06) !important;
    border: 1px solid rgba(5, 150, 105, 0.25) !important;
}
/* --------------------------------------------------------------------
 * 通用适配：全平台多页面 (知识库 / 记忆库 / 技能 / 工具卡片 / 设置)
 * ------------------------------------------------------------------ */
html[data-cow-theme="vision"] .view,
html[data-cow-theme="aurora"] .view,
html[data-cow-theme="titanium"] .view {
    color: var(--cow-text);
}

html[data-cow-theme="vision"] .knowledge-card,
html[data-cow-theme="vision"] .memory-card,
html[data-cow-theme="vision"] .skill-card,
html[data-cow-theme="vision"] .config-card {
    background: var(--cow-surface) !important;
    backdrop-filter: blur(28px) !important;
    border: 1px solid var(--cow-border) !important;
    border-top: 1px solid var(--cow-border-specular) !important;
    border-radius: var(--cow-radius) !important;
}

html[data-cow-theme="aurora"] .knowledge-card,
html[data-cow-theme="aurora"] .memory-card,
html[data-cow-theme="aurora"] .skill-card,
html[data-cow-theme="aurora"] .config-card {
    background: var(--cow-surface) !important;
    backdrop-filter: blur(28px) !important;
    border: 1px solid var(--cow-border) !important;
    border-radius: var(--cow-radius) !important;
}

html[data-cow-theme="titanium"] .knowledge-card,
html[data-cow-theme="titanium"] .memory-card,
html[data-cow-theme="titanium"] .skill-card,
html[data-cow-theme="titanium"] .config-card {
    background: var(--cow-surface) !important;
    border: 1px solid var(--cow-border) !important;
    border-radius: var(--cow-radius) !important;
}
