/* AI 批量写稿大师 - 顶级暗黑玻璃拟态风格设计 */

:root {
    --bg-dark: #070a13;
    --bg-glass: rgba(13, 20, 38, 0.6);
    --bg-glass-active: rgba(17, 26, 52, 0.85);
    --border-glass: rgba(255, 255, 255, 0.06);
    --border-glass-focus: rgba(99, 102, 241, 0.4);
    
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #14b8a6 100%);
    --primary-color: #6366f1;
    --secondary-color: #14b8a6;
    --accent-color: #a855f7;
    
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    
    --card-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.4);
    --font-heading: 'Outfit', 'Inter', -apple-system, sans-serif;
    --font-body: 'Inter', -apple-system, "Microsoft YaHei", sans-serif;
/* 全局主题切换过渡效果 */
body, aside, main, .card-glass, .form-control, .btn-secondary, h1, h2, h3, p, span, label, input, select, textarea {
    transition: background 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                background-color 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                border-color 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                color 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 基础重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-weight: 400;
    line-height: 1.5;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
}

/* 极致背景发光球动效 */
.glow-bg {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(140px);
    opacity: 0.15;
}

.orb-1 {
    top: -10%;
    left: 10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, #6366f1 0%, rgba(99, 102, 241, 0) 70%);
    animation: orbPulse 15s infinite ease-in-out alternate;
}

.orb-2 {
    bottom: -10%;
    right: 10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, #14b8a6 0%, rgba(20, 184, 166, 0) 70%);
    animation: orbPulse 20s infinite ease-in-out alternate-reverse;
}

@keyframes orbPulse {
    0% { transform: scale(1) translate(0, 0); }
    100% { transform: scale(1.2) translate(8%, 5%); }
}

/* 容器布局 */
.app-container {
    display: flex;
    height: 100vh;
    width: 100vw;
    position: relative;
    z-index: 1;
}

/* 侧边栏样式 */
.sidebar {
    width: 380px;
    height: 100%;
    background: rgba(10, 15, 30, 0.7);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--border-glass);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    box-shadow: var(--card-shadow);
    transition: width 0.28s ease, transform 0.28s ease, box-shadow 0.28s ease;
}

.sidebar-header {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-glass);
    gap: 10px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    color: var(--secondary-color);
    filter: drop-shadow(0 0 8px rgba(20, 184, 166, 0.5));
}

.logo span {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
    background: linear-gradient(120deg, #fff 40%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.version-tag {
    font-size: 0.75rem;
    background: rgba(99, 102, 241, 0.15);
    color: var(--primary-color);
    padding: 4px 8px;
    border-radius: 20px;
    border: 1px solid rgba(99, 102, 241, 0.3);
    font-weight: 500;
}

.sidebar-toggle-btn,
.mobile-sidebar-trigger {
    border: 1px solid var(--border-glass);
    background: var(--bg-glass);
    color: var(--text-secondary);
    border-radius: 10px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease, color 0.22s ease;
}

.sidebar-toggle-btn {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
}

.sidebar-toggle-btn:hover,
.mobile-sidebar-trigger:hover {
    color: var(--text-primary);
    border-color: rgba(20, 184, 166, 0.35);
    background: rgba(20, 184, 166, 0.1);
}

.sidebar-toggle-btn:active,
.mobile-sidebar-trigger:active {
    transform: scale(0.96);
}

.mobile-sidebar-trigger {
    display: none;
    gap: 6px;
    padding: 8px 10px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
}

.sidebar-backdrop {
    display: none;
}

.app-container.sidebar-collapsed .sidebar {
    width: 76px;
}

.app-container.sidebar-collapsed .sidebar-header {
    flex-direction: column;
    justify-content: flex-start;
    padding: 12px 10px;
}

.app-container.sidebar-collapsed .logo {
    justify-content: center;
}

.app-container.sidebar-collapsed .logo span,
.app-container.sidebar-collapsed .version-tag,
.app-container.sidebar-collapsed .sidebar-content {
    display: none !important;
}

.app-container.sidebar-collapsed .sidebar-toggle-btn svg {
    transform: rotate(180deg);
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sidebar-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--border-glass);
    background: rgba(8, 12, 24, 0.4);
}

/* 主内容区域布局 */
.main-content {
    flex: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: rgba(7, 10, 19, 0.25);
}

.main-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-glass);
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 16px;
    background: rgba(8, 12, 24, 0.3);
    backdrop-filter: blur(10px);
}

.main-header .header-info {
    justify-self: start;
    min-width: 0;
}

.main-header .breadcrumb-nav.centered-capsule-nav {
    justify-self: center;
}

.main-header > div:last-child {
    justify-self: end;
    min-width: 0;
}

.main-header h1 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.3rem;
    letter-spacing: -0.2px;
}

/* 新增：面包屑导航样式 */
/* 主顶部居中胶囊式导航面包屑 */
.breadcrumb-nav.centered-capsule-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 0;
    background: rgba(13, 20, 38, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 5px 6px;
    border-radius: 40px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(15px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.breadcrumb-nav.centered-capsule-nav .breadcrumb-item {
    font-size: 0.95rem; /* 面包屑大尺寸 */
    padding: 8px 18px;
    border-radius: 30px;
    border: 1px solid transparent;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 激活状态：翡翠绿微光胶囊 */
.breadcrumb-nav.centered-capsule-nav .breadcrumb-item.active {
    color: #ffffff !important;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    border-color: rgba(16, 185, 129, 0.2) !important;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4) !important;
}

/* 非激活项的 Hover 效果：3D微浮动放大 */
.breadcrumb-nav.centered-capsule-nav .breadcrumb-item:not(.active):hover {
    color: var(--text-primary) !important;
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* 分割线样式优化 */
.breadcrumb-nav.centered-capsule-nav .breadcrumb-separator {
    color: rgba(255, 255, 255, 0.12);
    font-size: 1.1rem;
    margin: 0 2px;
    font-weight: 300;
}

.subtitle {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 0.85rem;
}

.status-indicator.running {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.2);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--success);
    box-shadow: 0 0 8px var(--success);
}

.status-indicator.running .status-dot {
    background-color: var(--primary-color);
    box-shadow: 0 0 8px var(--primary-color);
    animation: pulse 1.5s infinite;
}

.workspace {
    flex: 1;
    overflow-y: auto;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* 卡片与模块面板样式 */
.card-glass {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    padding: 16px;
    box-shadow: var(--card-shadow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-glass:hover {
    border-color: rgba(255, 255, 255, 0.1);
}

.grid-cols-2 {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 16px;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.panel-header-action {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
}

.panel-title {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
}

.panel-title svg {
    color: var(--secondary-color);
}

.panel-hint {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.panel-subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

#local-output-dir-display {
    max-width: min(100%, 760px);
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    line-height: 1.55;
}

/* 侧边栏配置栏控件定义 */
.config-section {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.section-title {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.section-title svg {
    color: var(--primary-color);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.label-with-val {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.value-badge {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--secondary-color);
    background: rgba(20, 184, 166, 0.12);
    padding: 2px 8px;
    border-radius: 12px;
}

.form-control {
    width: 100%;
    background: rgba(6, 9, 18, 0.6);
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    color: var(--text-primary);
    padding: 6px 10px;
    font-size: 0.85rem;
    font-family: var(--font-body);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(0);
}

.form-control:hover:not(:focus) {
    border-color: rgba(99, 102, 241, 0.35);
    box-shadow: 0 0 6px rgba(99, 102, 241, 0.15);
    transform: translateY(-1px);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18);
    background: rgba(6, 9, 18, 0.85);
    transform: translateY(-1px);
}

select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px;
    padding-right: 40px;
}

/* 按钮通用设定 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
/* 极致解压的点击水波纹特效 */
.btn::after {
    content: "";
    background: rgba(255, 255, 255, 0.3);
    display: block;
    position: absolute;
    border-radius: 50%;
    padding-top: 240%;
    padding-left: 240%;
    margin-left: -120%;
    margin-top: -120%;
    opacity: 0;
    transition: all 0.8s ease;
}
.btn:active::after {
    padding-top: 0;
    padding-left: 0;
    margin-left: 0;
    margin-top: 0;
    opacity: 1;
    transition: 0s;
}

.btn-primary {
    background: var(--primary-gradient);
    color: #fff;
    box-shadow: 0 4px 14px 0 rgba(99, 102, 241, 0.35);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px 0 rgba(99, 102, 241, 0.5);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.25);
}

.btn-icon {
    padding: 8px 14px;
}

.btn-clear-tasks, .btn-clear-console {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.8rem;
    cursor: pointer;
    transition: color 0.2s;
}

.btn-clear-tasks:hover, .btn-clear-console:hover {
    color: var(--error);
}

.w-100 {
    width: 100%;
}

/* 密码切换组件 */
/* 禁用并隐藏所有浏览器（如Edge/Chrome）自带的密码框辅助图标（眼睛、钥匙等），防范与自定义小眼睛重合 */
input::-ms-reveal,
input::-ms-clear {
    display: none !important;
}

input::-webkit-contacts-auto-fill-button,
input::-webkit-credentials-auto-fill-button {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-wrapper .form-control {
    padding-right: 42px !important;
}

.btn-toggle-pwd {
    position: absolute;
    right: 14px;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.btn-toggle-pwd:hover {
    color: var(--text-primary);
}

/* 滑块 input range 与滑竿 */
.form-range {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    outline: none;
    margin: 8px 0;
}

.form-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--secondary-color);
    cursor: pointer;
    box-shadow: 0 0 8px rgba(20, 184, 166, 0.6);
    transition: transform 0.1s;
}

.form-range::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

/* 拖拽上传板 (Dropzone) */
.dropzone {
    border: 2px dashed rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px 20px;
    text-align: center;
    background: rgba(255, 255, 255, 0.01);
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.dropzone-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.dropzone:hover, .dropzone.dragover {
    border-color: var(--secondary-color);
    background: rgba(20, 184, 166, 0.04);
}

.dropzone.has-file {
    padding: 14px;
    border-style: solid;
    border-color: rgba(20, 184, 166, 0.28);
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.08), rgba(99, 102, 241, 0.06));
    text-align: left;
}

.dropzone-icon {
    color: var(--text-secondary);
    transition: transform 0.3s;
}

.dropzone:hover .dropzone-icon {
    transform: translateY(-4px);
    color: var(--secondary-color);
}

.dropzone-title {
    font-weight: 500;
    font-size: 0.95rem;
}

.dropzone-title span {
    color: var(--secondary-color);
    text-decoration: underline;
}

.dropzone-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    max-width: 80%;
}

.dropzone-file {
    width: 100%;
    min-width: 0;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
}

.dropzone-empty[hidden],
.dropzone-file[hidden] {
    display: none !important;
}

.import-file-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    color: var(--secondary-color);
    background: rgba(20, 184, 166, 0.1);
    border: 1px solid rgba(20, 184, 166, 0.24);
    box-shadow: inset 0 0 18px rgba(20, 184, 166, 0.06);
}

.import-file-meta {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.import-file-label,
.import-file-count,
.import-file-action {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.import-file-name {
    display: block;
    color: var(--text-primary);
    font-size: 0.95rem;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.import-file-action {
    color: var(--secondary-color);
    white-space: nowrap;
}

/* 手动文本域 */
.manual-input-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.manual-textarea {
    height: 160px;
    resize: none;
    font-family: monospace;
    font-size: 0.85rem;
    line-height: 1.6;
    background: rgba(5, 8, 16, 0.5);
}

/* 霓虹发光运行大按钮组 */
.btn-group-glow {
    display: flex;
    gap: 18px;
    width: 100%;
}

.btn-glow {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 0.95rem;
    font-family: var(--font-heading);
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-glow-start {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: #fff;
    box-shadow: 0 0 20px 0 rgba(99, 102, 241, 0.25);
}

.btn-glow-start:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 0 30px 4px rgba(99, 102, 241, 0.45);
}

.btn-glow-start:active:not(:disabled) {
    transform: scale(0.98);
}

.btn-glow-stop {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(220, 38, 38, 0.25) 100%);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--error);
}

.btn-glow-stop:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.3) 0%, rgba(220, 38, 38, 0.4) 100%);
    box-shadow: 0 0 20px 0 rgba(239, 68, 68, 0.25);
    transform: translateY(-1px);
}

.btn-glow:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* 进度看板定义 */
.progress-dashboard {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.progress-bar-container {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.progress-bar-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.progress-track {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #6366f1 0%, #14b8a6 100%);
    border-radius: 20px;
    width: 0%;
    transition: width 0.4s cubic-bezier(0.1, 0.8, 0.25, 1);
    position: relative;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.7);
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.3) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    animation: flowLight 2s infinite linear;
}

@keyframes flowLight {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.metric-card {
    position: relative;
    padding: 12px 10px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.055);
    border: 1px solid rgba(255, 255, 255, 0.095);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.055);
    overflow: hidden;
    cursor: default;
    transform: translateY(0);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.metric-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0));
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
}

.metric-card:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.085);
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.09);
}

.metric-card:hover::before {
    opacity: 1;
}

.metric-card:active {
    transform: translateY(-1px) scale(0.985);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.metric-title {
    font-size: 0.75rem;
    color: var(--text-secondary);
    position: relative;
    z-index: 1;
}

.metric-value {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.2rem;
    position: relative;
    z-index: 1;
    transition: transform 0.22s ease, text-shadow 0.22s ease;
}

.metric-card:hover .metric-value {
    transform: scale(1.05);
    text-shadow: 0 0 14px currentColor;
}

/* 霓虹发光卡片细微区别 */
.bg-glow-blue .metric-value { color: #60a5fa; }
.bg-glow-green .metric-value { color: var(--success); }
.bg-glow-red .metric-value { color: var(--error); }
.bg-glow-purple .metric-value { color: var(--accent-color); }

.pulse-indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--primary-color);
    box-shadow: 0 0 8px var(--primary-color);
    animation: pulse 1.2s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.9); opacity: 0.5; }
    50% { transform: scale(1.3); opacity: 1; }
    100% { transform: scale(0.9); opacity: 0.5; }
}

/* 终端黑客日志框 */
.terminal-console {
    background: #04060b;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    height: 140px;
    padding: 10px 12px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.825rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.console-line {
    word-break: break-all;
    line-height: 1.4;
    white-space: pre-wrap;
}

.line-info { color: #94a3b8; }
.line-success { color: #10b981; }
.line-warning { color: #f59e0b; }
.line-error { color: #ef4444; text-shadow: 0 0 4px rgba(239, 68, 68, 0.3); }
.line-system { color: #818cf8; }

/* 成果展示表格库 */
.gallery-wrapper {
    overflow-x: auto;
    overflow-y: auto;
    max-height: 224px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    background: rgba(255, 255, 255, 0.01);
}

.article-retention-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px 4px 8px;
    border-radius: 999px;
    border: 1px solid rgba(245, 158, 11, 0.24);
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.14), rgba(20, 184, 166, 0.1));
    color: #fbbf24;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 10px 24px rgba(245, 158, 11, 0.08);
    font-size: 0.74rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.article-retention-pill svg {
    width: 13px;
    height: 13px;
    flex: 0 0 auto;
    color: #f59e0b;
}

.gallery-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.875rem;
}

.gallery-table th, .gallery-table td {
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.gallery-table th {
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-secondary);
    font-weight: 500;
    position: sticky;
    top: 0;
    z-index: 1;
}

.gallery-table tbody tr {
    transition: background 0.2s;
}

.gallery-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.gallery-table td {
    color: var(--text-primary);
}

.gallery-table td.text-muted {
    color: var(--text-muted);
}

.gallery-table .text-right {
    text-align: right;
}

.gallery-table th:last-child,
.gallery-table td:last-child {
    width: 148px;
    min-width: 148px;
    white-space: nowrap;
}

.gallery-table td.text-right .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 58px;
}

.gallery-table td.text-right .btn + .btn {
    margin-left: 8px;
}

.gallery-table .text-center {
    text-align: center;
}

/* 状态药丸标签 */
.badge-file {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-file-docx { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }
.badge-file-md { background: rgba(168, 85, 247, 0.15); color: #a855f7; }
.badge-file-txt { background: rgba(148, 163, 184, 0.15); color: #94a3b8; }

/* 预览弹窗 Modal Styling */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(4, 6, 12, 0.85);
    backdrop-filter: blur(8px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.modal-card-glass {
    width: 100%;
    max-width: 900px;
    max-height: 85vh;
    background: rgba(13, 20, 38, 0.85);
    backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: modalScaleUp 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.1);
}

@keyframes modalScaleUp {
    0% { transform: scale(0.92); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.modal-header {
    padding: 24px 32px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title-box {
    display: flex;
    align-items: center;
    gap: 12px;
}

.modal-badge {
    background: var(--primary-gradient);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 20px;
    text-transform: uppercase;
}

.modal-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.25rem;
}

.btn-close-modal {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.2s;
}

.btn-close-modal:hover {
    color: var(--error);
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 36px 40px;
    line-height: 1.8;
}

.modal-footer {
    padding: 20px 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    justify-content: flex-end;
    gap: 16px;
    background: rgba(8, 12, 24, 0.3);
}

/* Markdown 排版高保真优雅化 */
.markdown-body {
    color: #cbd5e1;
    font-size: 1.05rem;
}

.markdown-body h1, .markdown-body h2, .markdown-body h3 {
    color: #fff;
    font-family: var(--font-heading);
    font-weight: 700;
    margin-top: 24px;
    margin-bottom: 14px;
}

.markdown-body h1 { font-size: 1.8rem; border-bottom: 1px solid rgba(255,255,255,0.08); padding-bottom: 8px;}
.markdown-body h2 { font-size: 1.4rem; }
.markdown-body h3 { font-size: 1.15rem; }

.markdown-body p {
    margin-bottom: 16px;
    text-align: justify;
}

.markdown-body ul, .markdown-body ol {
    margin-bottom: 16px;
    padding-left: 24px;
}

.markdown-body li {
    margin-bottom: 6px;
}

.markdown-body blockquote {
    border-left: 4px solid var(--secondary-color);
    background: rgba(20, 184, 166, 0.06);
    padding: 12px 20px;
    border-radius: 0 8px 8px 0;
    margin-bottom: 16px;
    font-style: italic;
    color: var(--text-secondary);
}

.markdown-body strong {
    color: #fff;
    font-weight: 600;
}

/* 滚动条定制 */
.scrollbar-custom::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.scrollbar-custom::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 4px;
}

.scrollbar-custom::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 4px;
}

.scrollbar-custom::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* ================= 自定义弹窗系统 (Toast & Modal) ================= */

/* Toast 提示容器 */
.toast-container {
    position: fixed;
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

/* 单个 Toast 样式 */
.config-section {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}
.custom-toast {
    min-width: 260px;
    max-width: min(520px, calc(100vw - 32px));
    background: rgba(13, 20, 38, 0.92);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(20, 184, 166, 0.16);
    color: var(--text-primary);
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 500;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    animation: toastSlideIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    pointer-events: auto;
    text-align: center;
}

.custom-toast span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.custom-toast.fade-out {
    animation: toastFadeOut 0.4s ease forwards;
}

/* Toast 变体 */
.custom-toast.toast-success { border-bottom: 2px solid var(--success); }
.custom-toast.toast-warning { border-bottom: 2px solid var(--warning); }
.custom-toast.toast-error { border-bottom: 2px solid var(--error); }
.custom-toast.toast-info { border-bottom: 2px solid var(--primary-color); }

@keyframes toastSlideIn {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes toastFadeOut {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-20px); }
}

/* 强制确认对话框 (Modal Alert) */
.custom-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(2, 6, 23, 0.72);
    backdrop-filter: blur(12px);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.custom-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.custom-modal-box {
    background: linear-gradient(145deg, rgba(17, 26, 52, 0.96), rgba(7, 10, 19, 0.96));
    border: 1px solid rgba(20, 184, 166, 0.18);
    border-radius: 14px;
    width: 420px;
    max-width: 90vw;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.64), 0 0 0 1px rgba(99, 102, 241, 0.18) inset;
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
}

.custom-modal-overlay.active .custom-modal-box {
    transform: scale(1);
}

.custom-modal-header {
    padding: 18px 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.custom-modal-header h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: #fff;
    margin: 0;
}

.custom-modal-body {
    padding: 22px;
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.custom-modal-footer {
    padding: 14px 22px 18px;
    background: rgba(0, 0, 0, 0.14);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.custom-modal-footer .btn {
    padding: 9px 18px;
}

.custom-modal-footer .btn-primary {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.9), rgba(168, 85, 247, 0.82));
    border-color: rgba(239, 68, 68, 0.45);
    box-shadow: 0 10px 28px rgba(239, 68, 68, 0.18);
}

.custom-modal-footer .btn-secondary {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
}

.custom-modal-box.permission-modal {
    width: 480px;
    border-color: rgba(20, 184, 166, 0.26);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.52), 0 0 0 1px rgba(20, 184, 166, 0.12) inset;
}

.permission-modal .custom-modal-header h3 {
    color: #e8fff9;
}

.permission-modal-content {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.permission-icon {
    flex: 0 0 46px;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    color: var(--secondary-color);
    background: rgba(20, 184, 166, 0.1);
    border: 1px solid rgba(20, 184, 166, 0.2);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.permission-copy {
    min-width: 0;
}

.permission-copy p {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.65;
}

.permission-copy p + p {
    margin-top: 8px;
}

.permission-copy strong {
    color: var(--text-primary);
    font-weight: 700;
    word-break: break-all;
}

.custom-modal-box.permission-modal .custom-modal-footer .btn-primary {
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.96), rgba(16, 185, 129, 0.9));
    border-color: rgba(20, 184, 166, 0.45);
    box-shadow: 0 14px 30px rgba(20, 184, 166, 0.22);
}

.custom-modal-box.permission-modal .custom-modal-footer .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 36px rgba(20, 184, 166, 0.28);
}

/* ================= 成功状态按钮高亮 ================= */
.btn-success-glow {
    background: rgba(16, 185, 129, 0.15) !important;
    border-color: rgba(16, 185, 129, 0.4) !important;
    color: #34d399 !important;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.2), inset 0 0 10px rgba(16, 185, 129, 0.1) !important;
    transition: all 0.3s ease;
}

.btn-success-glow:hover {
    background: rgba(16, 185, 129, 0.25) !important;
    border-color: rgba(16, 185, 129, 0.6) !important;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.3), inset 0 0 10px rgba(16, 185, 129, 0.2) !important;
}

/* ================= 联网搜索 Switch 样式 ================= */
.switch-container {
    position: relative;
    display: inline-block;
    width: 38px;
    height: 20px;
}

.switch-container input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.1);
    transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.switch-slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 2px;
    bottom: 2px;
    background-color: var(--text-secondary);
    transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50%;
}

.switch-container input:checked + .switch-slider {
    background-color: rgba(99, 102, 241, 0.2);
    border-color: rgba(99, 102, 241, 0.4);
}

.switch-container input:checked + .switch-slider:before {
    transform: translateX(18px);
    background-color: var(--primary-color);
    box-shadow: 0 0 8px rgba(99, 102, 241, 0.8);
}

/* Custom Checkbox */
.custom-checkbox-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}
.custom-checkbox-wrapper input[type="checkbox"] {
    display: none !important;
}
.custom-checkbox {
    position: relative;
    display: inline-block;
    width: 16px;
    height: 16px;
    min-width: 16px;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.custom-checkbox-wrapper:hover .custom-checkbox {
    border-color: #10b981;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.35);
}
.custom-checkbox-wrapper input:checked + .custom-checkbox {
    background-color: #10b981;
    border-color: #10b981;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.6);
}
.custom-checkbox-wrapper input:checked + .custom-checkbox::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 1px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* ==========================================================================
   极致奢华：极境纯白高透玻璃拟态风格（白天模式）
   ========================================================================== */
[data-theme="light"] {
    --bg-dark: #ffffff;                 /* 纯白色大背景 */
    --bg-glass: rgba(255, 255, 255, 0.75); /* 高洁乳白玻璃卡片，保证纯白背景下的绝佳层次 */
    --bg-glass-active: rgba(255, 255, 255, 0.95);
    --border-glass: rgba(15, 23, 42, 0.05); /* 极细轻薄浅深色边界 */
    --border-glass-focus: rgba(99, 102, 241, 0.4);
    
    --primary-gradient: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #0d9488 100%);
    --primary-color: #4f46e5;
    --secondary-color: #0d9488;
    --accent-color: #7c3aed;
    
    --text-primary: #0f172a;            /* 深邃蓝灰主字 */
    --text-secondary: #475569;          /* 温和中灰辅字 */
    --text-muted: #94a3b8;
    
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.025), 0 1px 8px rgba(0, 0, 0, 0.015); /* 浅悬浮投影 */
}

/* 亮色下卡片独立框架升级与悬浮3D特效 */
[data-theme="light"] .card-glass {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    box-shadow: var(--card-shadow);
    transform: translateY(0);
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), 
                box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), 
                border-color 0.3s ease;
}

[data-theme="light"] .card-glass:hover {
    border-color: rgba(99, 102, 241, 0.25);
    transform: translateY(-2px); /* 悬浮上浮 2px */
    box-shadow: 0 16px 36px rgba(99, 102, 241, 0.06), 0 3px 12px rgba(0, 0, 0, 0.01); /* 淡蓝紫极光外阴影 */
}

/* 亮色模式下局部发光球精细适配 */
[data-theme="light"] .glow-orb {
    opacity: 0.25;
}
[data-theme="light"] .orb-1 {
    background: radial-gradient(circle, rgba(99, 102, 241, 0.3) 0%, rgba(99, 102, 241, 0) 70%);
}
[data-theme="light"] .orb-2 {
    background: radial-gradient(circle, rgba(13, 148, 136, 0.25) 0%, rgba(13, 148, 136, 0) 70%);
}

/* 输入控件自适应：雪白极简，与背景融合 */
[data-theme="light"] .form-control {
    background: #ffffff;
    border-color: rgba(15, 23, 42, 0.08);
}
[data-theme="light"] .form-control:focus {
    background: #ffffff;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

/* 按钮投影自适应 */
[data-theme="light"] .btn-primary {
    box-shadow: 0 4px 14px 0 rgba(79, 70, 229, 0.25);
}
[data-theme="light"] .btn-primary:hover {
    box-shadow: 0 6px 20px 0 rgba(79, 70, 229, 0.4);
}

/* 侧边栏和主背景完美拉开纵深 */
[data-theme="light"] .sidebar {
    background: rgba(248, 250, 252, 0.85); /* 淡淡乳冷灰，确保极致层次 */
    border-right-color: rgba(15, 23, 42, 0.06);
    box-shadow: 6px 0 30px rgba(0, 0, 0, 0.015);
}
[data-theme="light"] .main-content {
    background: #ffffff; /* 纯洁净白 */
}
[data-theme="light"] .main-header {
    background: rgba(255, 255, 255, 0.65);
    border-bottom-color: rgba(15, 23, 42, 0.06);
}

/* 亮色模式 Logo 特效重塑：100% 物理消除白色遮挡 Bug */
[data-theme="light"] .logo span {
    background: linear-gradient(120deg, #0f172a 40%, #0d9488 100%) !important;
    background-color: transparent !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
}
[data-theme="light"] .logo-icon {
    filter: drop-shadow(0 0 6px rgba(13, 148, 136, 0.2));
}

/* 亮色下主顶部居中胶囊式导航面包屑自适应 */
[data-theme="light"] .breadcrumb-nav.centered-capsule-nav {
    background: rgba(15, 23, 42, 0.04);
    border-color: rgba(15, 23, 42, 0.08);
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.02);
}
[data-theme="light"] .breadcrumb-nav.centered-capsule-nav .breadcrumb-separator {
    color: rgba(15, 23, 42, 0.1);
}
[data-theme="light"] .breadcrumb-nav.centered-capsule-nav .breadcrumb-item.active {
    color: #ffffff !important;
    background: linear-gradient(135deg, #10b981 0%, #0d9488 100%) !important;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25) !important;
}
[data-theme="light"] .breadcrumb-nav.centered-capsule-nav .breadcrumb-item:not(.active):hover {
    background: rgba(15, 23, 42, 0.03);
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.02);
}

/* 微信排版微调侧边栏的独立板块大框架与特效 */
[data-theme="light"] .config-section {
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid rgba(15, 23, 42, 0.04);
    border-radius: 12px;
    padding: 14px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.015);
    transition: all 0.3s ease;
}
[data-theme="light"] .config-section:hover {
    border-color: rgba(99, 102, 241, 0.15);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.04);
}

/* 终端控制台自适应 */
[data-theme="light"] .console-panel {
    background: rgba(255, 255, 255, 0.7) !important;
    border-color: rgba(15, 23, 42, 0.08) !important;
    box-shadow: var(--card-shadow) !important;
}
[data-theme="light"] .console-body {
    background: rgba(255, 255, 255, 0.5) !important;
    color: #334155 !important;
}
[data-theme="light"] .console-line.info {
    color: #2563eb !important;
}
[data-theme="light"] .console-line.success {
    color: #059669 !important;
}
[data-theme="light"] .console-line.error {
    color: #dc2626 !important;
}

/* 成果库文件列表自适应：纯白不透明表头物理阻挡滚动穿透 */
[data-theme="light"] .gallery-table th {
    background: #ffffff !important;
    color: var(--text-secondary) !important;
    border-bottom: 2px solid rgba(15, 23, 42, 0.06) !important;
    position: sticky;
    top: 0;
    z-index: 10;
}
[data-theme="light"] .gallery-table tr:hover {
    background: rgba(15, 23, 42, 0.01) !important;
}

[data-theme="light"] .article-retention-pill {
    border-color: rgba(217, 119, 6, 0.22);
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.13), rgba(20, 184, 166, 0.08));
    color: #a16207;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 8px 22px rgba(217, 119, 6, 0.08);
}

[data-theme="light"] .article-retention-pill svg {
    color: #d97706;
}

[data-theme="light"] .metric-card {
    background: rgba(255, 255, 255, 0.72);
    border-color: rgba(15, 23, 42, 0.07);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.045), inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

[data-theme="light"] .metric-card::before {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.58), rgba(255, 255, 255, 0));
}

[data-theme="light"] .metric-card:hover {
    background: rgba(255, 255, 255, 0.92);
    border-color: rgba(99, 102, 241, 0.16);
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.075), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

[data-theme="light"] .metric-card:active {
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.84);
}

@media (max-width: 1199px) {
    body {
        overflow: hidden;
    }

    .app-container {
        display: block;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: min(380px, calc(100vw - 32px));
        max-width: 92vw;
        z-index: 1200;
        transform: translateX(-105%);
        border-right: 1px solid var(--border-glass);
    }

    .app-container.sidebar-open .sidebar {
        transform: translateX(0);
        box-shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
    }

    .sidebar-toggle-btn {
        transform: rotate(180deg);
    }

    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        z-index: 1190;
        display: block;
        opacity: 0;
        visibility: hidden;
        background: rgba(2, 6, 23, 0.52);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        transition: opacity 0.22s ease, visibility 0.22s ease;
    }

    .app-container.sidebar-open .sidebar-backdrop {
        opacity: 1;
        visibility: visible;
    }

    .main-content {
        width: 100vw;
        height: 100vh;
    }

    .main-header {
        grid-template-columns: auto minmax(0, 1fr) auto;
        gap: 10px;
        align-items: center;
    }

    .mobile-sidebar-trigger {
        display: inline-flex;
    }

    .main-header h1 {
        font-size: 1.12rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .main-header .subtitle {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .main-header .breadcrumb-nav.centered-capsule-nav {
        grid-column: 1 / -1;
        grid-row: 2;
        justify-self: stretch;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 5px;
        scrollbar-width: none;
    }

    .main-header .breadcrumb-nav.centered-capsule-nav::-webkit-scrollbar {
        display: none;
    }

    .breadcrumb-nav.centered-capsule-nav .breadcrumb-item {
        flex: 0 0 auto;
        font-size: 0.88rem;
        padding: 7px 12px;
    }

    .header-actions {
        gap: 8px !important;
        min-width: 0;
    }

    #netverify-vip-badge {
        max-width: 220px;
        overflow: hidden;
    }

    .workspace {
        padding: 12px;
    }

    .grid-cols-2 {
        grid-template-columns: 1fr;
    }

    .panel-header-action {
        flex-wrap: wrap;
        gap: 12px;
    }

    .action-buttons,
    .control-actions {
        flex-wrap: wrap;
    }

    .metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .format-workspace-container {
        flex-direction: column;
        height: auto !important;
        min-height: 100%;
    }

    .format-editor-wrapper,
    .format-preview-wrapper {
        width: 100% !important;
        min-height: 520px;
    }
}

@media (max-width: 760px) {
    .main-header {
        grid-template-columns: auto minmax(0, 1fr);
        padding: 10px;
    }

    .header-actions {
        grid-column: 1 / -1;
        grid-row: 3;
        justify-self: stretch;
        justify-content: space-between;
        flex-wrap: wrap;
    }

    #netverify-vip-badge {
        max-width: 100%;
        flex: 1 1 auto;
        justify-content: center;
    }

    .status-indicator {
        flex: 1 1 auto;
        justify-content: center;
    }

    .workspace {
        padding: 10px;
        gap: 10px;
    }

    .card-glass {
        padding: 12px;
        border-radius: 14px;
    }

    .panel-header,
    .panel-header-action {
        align-items: flex-start;
        gap: 10px;
    }

    .dropzone {
        min-height: 150px;
        padding: 18px 12px;
    }

    .control-actions,
    .action-buttons {
        flex-direction: column;
        align-items: stretch !important;
        width: 100%;
    }

    .btn-glow,
    .action-buttons .btn,
    .local-export-menu-wrap,
    .local-export-menu-wrap .btn {
        width: 100%;
    }

    .metric-grid {
        gap: 8px;
    }

    .metric-card {
        min-width: 0;
        padding: 10px 8px;
    }

    .metric-title {
        text-align: center;
        line-height: 1.35;
    }

    .gallery-wrapper {
        overflow-x: auto;
    }

    .gallery-table {
        min-width: 720px;
    }
}

@media (max-width: 460px) {
    .main-header h1 {
        font-size: 1rem;
    }

    .main-header .subtitle {
        display: none;
    }

    .breadcrumb-nav.centered-capsule-nav .breadcrumb-item {
        padding: 7px 10px;
        font-size: 0.82rem;
    }

    .metric-grid {
        grid-template-columns: 1fr;
    }
}

/* 亮色模式下选择框 100% 完美可见性修复 */
[data-theme="light"] .custom-checkbox {
    background-color: rgba(15, 23, 42, 0.04) !important;
    border: 1px solid rgba(15, 23, 42, 0.18) !important;
}
[data-theme="light"] .custom-checkbox-wrapper:hover .custom-checkbox {
    border-color: #10b981 !important;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.3) !important;
}
[data-theme="light"] .custom-checkbox-wrapper input:checked + .custom-checkbox {
    background-color: #10b981 !important;
    border-color: #10b981 !important;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.5) !important;
}

/* 下拉选单 select 与 option 选项亮色下可读性彻底修复 */
[data-theme="light"] select.form-control {
    background-color: #ffffff !important;
    color: #0f172a !important;
}
[data-theme="light"] select.form-control option {
    background-color: #ffffff !important;
    color: #0f172a !important;
}

/* 自定义弹窗系统白天模式高自适应适配（修复测试API成功弹窗为纯黑色的Bug） */
[data-theme="light"] .custom-toast {
    background: rgba(255, 255, 255, 0.95) !important;
    border: 1px solid rgba(15, 23, 42, 0.08) !important;
    color: #0f172a !important;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08) !important;
}

[data-theme="light"] .custom-toast.toast-success {
    border: 1px solid rgba(16, 185, 129, 0.25) !important;
    border-bottom: 3px solid #10b981 !important;
}
[data-theme="light"] .custom-toast.toast-warning {
    border: 1px solid rgba(245, 158, 11, 0.25) !important;
    border-bottom: 3px solid #f59e0b !important;
}
[data-theme="light"] .custom-toast.toast-error {
    border: 1px solid rgba(239, 68, 68, 0.25) !important;
    border-bottom: 3px solid #ef4444 !important;
}
[data-theme="light"] .custom-toast.toast-info {
    border: 1px solid rgba(79, 70, 229, 0.2) !important;
    border-bottom: 3px solid #4f46e5 !important;
}

/* 强制确认对话框白天模式高雅自适应（同步大升级） */
[data-theme="light"] .custom-modal-box {
    background: #ffffff !important;
    border: 1px solid rgba(15, 23, 42, 0.08) !important;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08) !important;
}
[data-theme="light"] .custom-modal-header {
    border-bottom-color: rgba(15, 23, 42, 0.05) !important;
}
[data-theme="light"] .custom-modal-header h3 {
    color: #0f172a !important;
}
[data-theme="light"] .custom-modal-body {
    color: #334155 !important;
}
[data-theme="light"] .custom-modal-footer {
    background: rgba(15, 23, 42, 0.02) !important;
    border-top-color: rgba(15, 23, 42, 0.05) !important;
}
[data-theme="light"] .custom-modal-footer .btn-secondary {
    background: #ffffff !important;
    border-color: rgba(15, 23, 42, 0.12) !important;
    color: #334155 !important;
}
[data-theme="light"] .custom-modal-footer .btn-secondary:hover {
    background: rgba(15, 23, 42, 0.03) !important;
}

[data-theme="light"] .custom-modal-box.permission-modal {
    background: rgba(255, 255, 255, 0.96) !important;
    border-color: rgba(20, 184, 166, 0.22) !important;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.12), 0 0 0 1px rgba(20, 184, 166, 0.08) inset !important;
}

[data-theme="light"] .permission-modal .custom-modal-header h3 {
    color: #0f172a !important;
}

[data-theme="light"] .permission-icon {
    background: rgba(20, 184, 166, 0.09);
    border-color: rgba(20, 184, 166, 0.18);
    color: #0f9f8f;
}

[data-theme="light"] .permission-copy p {
    color: #475569;
}

[data-theme="light"] .permission-copy strong {
    color: #0f172a;
}

/* 全局滑动微起伏与悬浮特效 */
.breadcrumb-item, .theme-btn, .custom-checkbox-wrapper, .btn-secondary {
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 微信排版模板按钮 Hover */
.theme-btn:hover {
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.12) !important;
    border-color: rgba(99, 102, 241, 0.3) !important;
}

/* 次级按钮 Hover */
.btn-secondary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.03);
}
[data-theme="light"] .btn-secondary:hover {
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
}

/* ==========================================================================
   🔑 微信文章排版双区高拟真 3D 模拟器样式
   ========================================================================== */

/* 弹性双列容器 */
.format-workspace-container {
    animation: fadeInSlideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 微信一键排版按钮流光呼吸特效 */
.btn-glow-run {
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #14b8a6 100%) !important;
    background-size: 200% auto !important;
    border: none !important;
    color: #ffffff !important;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.35) !important;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
    animation: gradientMove 4s infinite linear, glowPulse 2s infinite alternate;
}

.btn-glow-run:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.5) !important;
}

.btn-glow-run:active {
    transform: translateY(1px);
}

@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes glowPulse {
    0% { box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35), 0 0 0 0px rgba(99, 102, 241, 0.2); }
    100% { box-shadow: 0 4px 22px rgba(99, 102, 241, 0.5), 0 0 0 6px rgba(99, 102, 241, 0); }
}

/* 3D 手机外壳容器 (宽 365px, 高 730px 完美真机比例) */
.phone-mockup {
    width: 365px;
    height: 730px;
    background: #000000;
    border: 12px solid #1c1d22; /* 耀黑磨砂质感哑光保护套 */
    border-radius: 40px;
    position: relative;
    box-shadow: 
        0 25px 65px -15px rgba(0, 0, 0, 0.7), /* 极致深悬浮投影 */
        inset 0 0 10px rgba(255, 255, 255, 0.15), /* 内圈钢化膜倒角反光 */
        0 0 0 2px rgba(255, 255, 255, 0.05),
        0 0 0 1px rgba(0, 0, 0, 0.8);
    overflow: hidden;
    user-select: none;
    transform: perspective(800px) rotateX(1.5deg) rotateY(-0.5deg); /* 精致 3D 物理悬浮微倾角 */
    transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.5s ease;
}

.phone-mockup:hover {
    transform: perspective(800px) rotateX(0deg) rotateY(0deg) translateY(-4px); /* 悬浮拟真回正 */
    box-shadow: 
        0 35px 80px -15px rgba(0, 0, 0, 0.85),
        inset 0 0 12px rgba(255, 255, 255, 0.2),
        0 0 0 2px rgba(255, 255, 255, 0.08);
}

/* 顶部灵动岛（刘海） */
.phone-notch {
    position: absolute;
    top: 11px;
    left: 50%;
    transform: translateX(-50%);
    width: 116px;
    height: 24px;
    background: #000000;
    border-radius: 12px;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.08);
}

/* 灵动岛摄像头与听筒 */
.camera-lens {
    width: 6px;
    height: 6px;
    background: radial-gradient(circle, #0f1c3f 0%, #03050b 70%);
    border-radius: 50%;
    box-shadow: 0 0 1px rgba(255, 255, 255, 0.15);
}

.speaker-grill {
    width: 32px;
    height: 2.2px;
    background: #262626;
    border-radius: 1px;
    box-shadow: inset 0 0.5px 1px rgba(0, 0, 0, 0.5);
}

/* 充电呼吸状态指示灯 */
.phone-status-light {
    display: none;
}

@keyframes batteryPulse {
    0% { opacity: 0.3; }
    50% { opacity: 0.95; box-shadow: 0 0 6px #10b981; }
    100% { opacity: 0.3; }
}

/* 侧边物理按键 */
.phone-btn {
    position: absolute;
    background: #2e2f38;
    border-radius: 2px;
    z-index: -1;
    box-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.phone-btn-power {
    right: -13px;
    top: 110px;
    width: 2.5px;
    height: 46px;
}

.phone-btn-vol-up {
    left: -13px;
    top: 90px;
    width: 2.5px;
    height: 38px;
}

.phone-btn-vol-down {
    left: -13px;
    top: 140px;
    width: 2.5px;
    height: 38px;
}

/* 真实显示屏幕区域 (常驻白屏/暗黑自适应，支持双向滚动) */
.phone-screen-on {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
    background: #ffffff;
    transition: background 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    flex-direction: column;
}

.phone-app-status {
    height: 36px;
    padding: 8px 24px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #111827;
    font-size: 12px;
    font-weight: 500;
    flex-shrink: 0;
    background: #ffffff;
    z-index: 20;
}

.phone-status-icons {
    display: flex;
    align-items: center;
    gap: 8px;
}

.phone-status-icons span:first-child {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #4b5563;
}

.phone-status-icons span:last-child {
    width: 8px;
    height: 13px;
    border: 1.8px solid #4b5563;
    border-radius: 2px;
    position: relative;
}

.phone-status-icons span:last-child::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    bottom: 2px;
    background: #4b5563;
    border-radius: 1px;
}

.phone-webview {
    flex: 1;
    min-height: 0;
    background: #ffffff;
}

.phone-bottom-bar {
    height: 64px;
    flex-shrink: 0;
    background: #ffffff;
    border-top: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 22px;
    padding: 0 22px;
    color: #9ca3af;
    z-index: 20;
    margin-top: auto;
}

.phone-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-right: auto;
    white-space: nowrap;
}

.phone-brand-mark {
    width: 32px;
    height: 32px;
    color: var(--secondary-color);
    filter: drop-shadow(0 0 8px rgba(20, 184, 166, 0.5));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.phone-brand span:last-child {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
    background: linear-gradient(120deg, #fff 40%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

[data-theme="light"] .phone-brand span:last-child {
    background: linear-gradient(120deg, #0f172a 40%, #0d9488 100%) !important;
    background-color: transparent !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
}

[data-theme="light"] .phone-brand-mark {
    filter: drop-shadow(0 0 6px rgba(13, 148, 136, 0.2));
}

.phone-bottom-bar button {
    border: none;
    background: transparent;
    color: #9ca3af;
    padding: 0;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: default;
}

/* ==========================================================================
   ☀️ [data-theme="light"] 白天模式下自适应手机屏幕底色
   ========================================================================== */

[data-theme="light"] .phone-screen-on {
    background: #ffffff; /* 白天常驻清亮白屏 */
}

/* 微调排版界面侧边栏白天字号对比度 */
[data-theme="light"] .sidebar-content#sidebar-format {
    border-color: rgba(15, 23, 42, 0.05);
}

/* 已升级面包屑悬浮动效至居中胶囊内部规范 */

/* 水晶悬浮复制按钮一键高保真微信排版大作精致动效 */
.btn-glow-copy:hover {
    transform: scale(1.06) translateY(-2px);
    box-shadow: 0 15px 35px rgba(99, 102, 241, 0.45), 0 0 15px rgba(20, 184, 166, 0.25) !important;
    border-color: rgba(255, 255, 255, 0.35) !important;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.45), rgba(20, 184, 166, 0.45)) !important;
}
.btn-glow-copy:active {
    transform: scale(0.97);
}

/* ==========================================================================
   📂 历史成果大作向上弹出悬浮气泡选择面板 (Premium Glassmorphism Dropup)
   ========================================================================== */

.article-dropdown-panel {
    position: absolute;
    bottom: 54px;
    right: 0;
    width: 330px;
    background: rgba(15, 23, 42, 0.94);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1.5px solid rgba(20, 184, 166, 0.22);
    border-radius: 12px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.65), 0 0 15px rgba(99, 102, 241, 0.15);
    z-index: 999;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    animation: dropupSlideUp 0.3s cubic-bezier(0.25, 0.8, 0.25, 1.1) forwards;
}

@keyframes dropupSlideUp {
    from { opacity: 0; transform: translateY(15px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* 检索过滤打字框 */
.dropdown-search-box {
    position: relative;
    width: 100%;
}

.dropdown-search-box input {
    width: 100%;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.8rem;
    color: #fff;
    outline: none;
    transition: all 0.25s ease;
}

.dropdown-search-box input:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 10px rgba(20, 184, 166, 0.35);
    background: rgba(0, 0, 0, 0.5);
}

/* 可滚动成果列表项容器 */
.dropdown-list {
    max-height: 250px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-right: 2px;
}

/* 单个成果大作行 */
.dropdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.dropdown-item:hover {
    background: rgba(20, 184, 166, 0.1);
    border-color: rgba(20, 184, 166, 0.25);
    transform: translateX(2px);
}

.dropdown-item-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 1;
}

.dropdown-item-icon {
    color: var(--secondary-color);
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.dropdown-item-title {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-item-time {
    font-size: 0.7rem;
    color: var(--text-muted);
    flex-shrink: 0;
    margin-left: 8px;
}

/* 列表为空时的提示 */
.dropdown-empty {
    padding: 20px;
    text-align: center;
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* ==========================================================================
   ☀️ 白天模式与默认模式下预览弹窗、次级按钮完美高对比度自适应 (Modal & Secondary Button Adaptive)
   ========================================================================== */

/* 1. 优化默认护眼模式下，预览弹窗底部“关闭预览”等次级按钮的能见度，防止因底色过深而看不清 */
.modal-footer .btn-secondary {
    background: rgba(255, 255, 255, 0.12) !important;
    color: #f1f5f9 !important;
    border: 1px solid rgba(255, 255, 255, 0.22) !important;
    transition: all 0.2s ease !important;
}

.modal-footer .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.35) !important;
    transform: translateY(-1px);
}

/* 2. 白天模式下，将深色蒙层重塑为清亮淡雅的浅色高保真毛玻璃蒙层，消除背景死黑视觉差 */
[data-theme="light"] .modal-backdrop {
    background: rgba(241, 245, 249, 0.55) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
}

/* 3. 白天模式下亮白毛玻璃浮动弹窗重塑，提供高贵温润的象牙白，根治暗黑视觉断层 */
[data-theme="light"] .modal-card-glass {
    background: rgba(255, 255, 255, 0.92) !important;
    backdrop-filter: blur(35px) !important;
    -webkit-backdrop-filter: blur(35px) !important;
    border: 1px solid rgba(15, 23, 42, 0.06) !important;
    box-shadow: 0 25px 60px rgba(15, 23, 42, 0.12) !important;
    color: #1e293b !important;
}

[data-theme="light"] .modal-header {
    border-bottom: 1px solid rgba(15, 23, 42, 0.05) !important;
    background: transparent !important;
}

[data-theme="light"] .modal-title {
    color: #0f172a !important;
}

[data-theme="light"] .modal-body {
    color: #334155 !important;
}

[data-theme="light"] .modal-footer {
    border-top: 1px solid rgba(15, 23, 42, 0.05) !important;
    background: rgba(15, 23, 42, 0.02) !important;
}

/* 4. 白天模式下次级按钮特调，提供极佳的灰蓝高对比度，彻底看清并恢复之前的风格 */
[data-theme="light"] .btn-secondary {
    background: rgba(15, 23, 42, 0.08) !important;
    color: #334155 !important;
    border: 1px solid rgba(15, 23, 42, 0.15) !important;
}

[data-theme="light"] .btn-secondary:hover {
    background: rgba(15, 23, 42, 0.14) !important;
    color: #0f172a !important;
    border-color: rgba(15, 23, 42, 0.25) !important;
}

/* 5. 白天模式下关闭图标自适应自调 */
[data-theme="light"] .btn-close-modal {
    color: #64748b !important;
}

[data-theme="light"] .btn-close-modal:hover {
    color: var(--error) !important;
}



/* ---------------- 修复：成果库下拉弹窗白天模式 ---------------- */
[data-theme="light"] .article-dropdown-panel {
    background: rgba(255, 255, 255, 0.94);
    border-color: rgba(99, 102, 241, 0.25);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12), 0 0 15px rgba(99, 102, 241, 0.08);
}
[data-theme="light"] .dropdown-search-box input {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
    color: var(--text-primary);
}
[data-theme="light"] .dropdown-search-box input:focus {
    background: rgba(255, 255, 255, 0.8);
    border-color: var(--secondary-color);
}
[data-theme="light"] .dropdown-item {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.05);
}
[data-theme="light"] .dropdown-item:hover {
    background: rgba(99, 102, 241, 0.08);
    border-color: rgba(99, 102, 241, 0.2);
}
[data-theme="light"] .dropdown-item-title {
    color: var(--text-primary);
}
[data-theme="light"] .dropdown-empty {
    color: var(--text-secondary);
}

@media (max-width: 760px) {
    html,
    body {
        height: auto;
        min-height: 100%;
        overflow-x: hidden;
        overflow-y: auto;
    }

    .app-container {
        height: auto;
        min-height: 100svh;
        overflow: visible;
    }

    .main-content {
        height: auto !important;
        min-height: 100svh;
        overflow: visible;
    }

    .workspace {
        flex: 0 0 auto;
        overflow: visible;
    }

    .main-header .breadcrumb-nav.centered-capsule-nav {
        width: 100%;
        max-width: 100%;
        justify-self: center;
        justify-content: center;
        gap: 2px;
        padding: 5px 4px;
        overflow: visible;
    }

    .breadcrumb-nav.centered-capsule-nav .breadcrumb-item {
        flex: 1 1 0;
        min-width: 0;
        justify-content: center;
        gap: 5px;
        padding: 7px 6px;
        white-space: nowrap;
    }

    .breadcrumb-nav.centered-capsule-nav .breadcrumb-item svg {
        width: 14px;
        height: 14px;
        flex: 0 0 auto;
    }

    .breadcrumb-nav.centered-capsule-nav .breadcrumb-item span {
        min-width: 0;
        white-space: nowrap;
    }

    .breadcrumb-nav.centered-capsule-nav .breadcrumb-separator {
        flex: 0 0 auto;
        margin: 0 1px;
        font-size: 0.95rem;
    }

    #workspace-format {
        overflow: visible !important;
    }

    #workspace-format .format-workspace-container {
        height: auto !important;
        min-height: 0 !important;
        padding: 0 0 16px !important;
        gap: 12px !important;
        overflow: visible;
    }

    #workspace-format .format-editor-wrapper,
    #workspace-format .format-preview-wrapper {
        min-width: 0 !important;
        min-height: 0 !important;
        overflow: visible !important;
    }

    #workspace-format .format-editor-wrapper {
        padding: 14px !important;
    }

    #format-markdown-input {
        height: 42svh !important;
        min-height: 300px !important;
        max-height: none !important;
    }

    .format-action-bar {
        display: grid !important;
        grid-template-columns: 1fr;
        gap: 8px !important;
        align-items: stretch !important;
    }

    .format-action-bar > * {
        width: 100% !important;
        min-width: 0 !important;
        flex: none !important;
    }

    .format-action-bar .btn {
        width: 100% !important;
        min-height: 44px;
    }

    #format-article-dropdown.article-dropdown-panel {
        left: 0;
        right: 0;
        width: 100%;
        max-height: min(52svh, 360px);
        overflow: hidden;
    }

    #format-article-dropdown .dropdown-list {
        max-height: min(42svh, 280px);
        overflow-y: auto;
    }

    #workspace-format .format-preview-wrapper > .panel-header {
        flex-wrap: wrap;
        gap: 10px;
        padding: 14px !important;
    }

    #workspace-format .format-preview-wrapper > .panel-header > div {
        width: 100%;
        justify-content: space-between;
        gap: 8px;
    }

    .phone-dock {
        padding: 10px !important;
        align-items: stretch !important;
        justify-content: center !important;
        overflow: visible !important;
        background: rgba(0, 0, 0, 0.12) !important;
    }

    .phone-mockup {
        width: 100% !important;
        height: min(72svh, 640px) !important;
        min-height: 420px;
        border: 0 !important;
        border-radius: 18px !important;
        background: #ffffff !important;
        box-shadow: 0 14px 34px rgba(0, 0, 0, 0.24) !important;
        transform: none !important;
        overflow: hidden !important;
    }

    .phone-mockup:hover {
        transform: none !important;
    }

    .phone-notch,
    .phone-status-light,
    .phone-btn,
    .phone-app-status,
    .phone-bottom-bar {
        display: none !important;
    }

    .phone-screen-on {
        position: relative !important;
        inset: auto !important;
        width: 100% !important;
        height: 100% !important;
        border-radius: 18px !important;
        overflow: hidden !important;
        background: #ffffff !important;
    }

    .phone-webview {
        flex: 1 1 auto !important;
        height: 100% !important;
        min-height: 0 !important;
        border-radius: 18px !important;
        overflow: hidden !important;
        background: #ffffff;
    }

    #format-preview-frame {
        display: block;
        border-radius: 18px !important;
    }

    .vip-license-workspace {
        padding: 12px 10px 24px !important;
        overflow: visible !important;
    }

    .vip-license-shell {
        min-height: auto !important;
        display: flex !important;
        align-items: center;
        justify-content: center;
        padding: 0 !important;
    }

    .vip-license-card {
        width: 100% !important;
        max-width: calc(100vw - 20px) !important;
        margin: 0 auto !important;
        padding: 26px 20px !important;
        box-sizing: border-box;
    }

    .vip-form-row,
    .vip-license-input,
    .vip-activate-btn {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
    }
}

@media (max-width: 460px) {
    .breadcrumb-nav.centered-capsule-nav .breadcrumb-item {
        gap: 4px;
        padding: 7px 4px;
        font-size: 0.76rem;
    }

    .breadcrumb-nav.centered-capsule-nav .breadcrumb-item svg {
        width: 13px;
        height: 13px;
    }

    .breadcrumb-nav.centered-capsule-nav .breadcrumb-separator {
        margin: 0;
        font-size: 0.86rem;
    }

    .phone-mockup {
        height: min(68svh, 600px) !important;
        min-height: 380px;
    }
}
