/* theme-light.css - 浅色主题覆盖样式
 * 当 html.light-theme 激活时，反转颜色方案
 * 品牌色 #FF85A2 保持不变
 */

/* ========== 全局基础 ========== */
html.light-theme {
    background: #f5f5f5;
}
html.light-theme body {
    background: #f5f5f5;
    color: #1a1a1a;
}
html.light-theme .bg-layer {
    background: #ffffff;
}
html.light-theme .bg-layer::after {
    background: transparent;
}

/* ========== 侧边栏 ========== */
html.light-theme .app-sidebar {
    background: rgba(255, 255, 255, 0.88);
    border-color: rgba(0, 0, 0, 0.10);
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
}
html.light-theme .sidebar-brand {
    border-bottom-color: rgba(0, 0, 0, 0.06);
}
html.light-theme .sidebar-back-btn {
    color: #555;
}
html.light-theme .sidebar-back-btn:hover {
    background: rgba(255, 133, 162, 0.08);
    color: #FF85A2;
}
html.light-theme .sidebar-nav-item {
    color: #777;
}
html.light-theme .sidebar-nav-item:hover {
    background: rgba(255, 133, 162, 0.08);
    color: #333;
}
html.light-theme .sidebar-nav-item.active {
    background: rgba(255, 133, 162, 0.12);
    border-color: rgba(255, 133, 162, 0.3);
    color: #FF85A2;
}
html.light-theme .sidebar-nav-item .nav-icon-img {
    filter: grayscale(100%) brightness(0.8);
}
html.light-theme .sidebar-nav-item:hover .nav-icon-img {
    filter: grayscale(0%) brightness(1);
}
html.light-theme .sidebar-nav-item.active .nav-icon-img {
    filter: grayscale(0%) brightness(1);
}
html.light-theme .sidebar-step .step-num {
    background: #ddd;
    color: #555;
}
html.light-theme .sidebar-step .step-name {
    color: rgba(0, 0, 0, 0.5);
}
html.light-theme .sidebar-bottom {
    border-top-color: rgba(0, 0, 0, 0.06);
}
html.light-theme .sidebar-user-info:hover {
    background: rgba(255, 133, 162, 0.08);
}
html.light-theme .sidebar-avatar-wrap:hover {
    background: rgba(255, 133, 162, 0.08);
}
html.light-theme .sidebar-menu-btn {
    color: #999;
}
html.light-theme .sidebar-menu-btn:hover {
    background: rgba(255, 133, 162, 0.08);
    color: #FF85A2;
}

/* 汉堡面板 */
html.light-theme .sidebar-menu-panel {
    background: rgba(255, 255, 255, 0.97);
    border-right-color: rgba(0, 0, 0, 0.08);
}
html.light-theme .menu-panel-item {
    color: #555;
}
html.light-theme .menu-panel-item:hover {
    background: rgba(255, 133, 162, 0.08);
    color: #FF85A2;
}

/* ========== 下拉菜单 ========== */
html.light-theme .profile-dropdown {
    background: rgba(255, 255, 255, 0.97);
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}
html.light-theme .profile-dropdown-header {
    border-bottom-color: rgba(0, 0, 0, 0.06);
}
html.light-theme .profile-dropdown-email {
    color: #333;
}
html.light-theme .profile-dropdown-role {
    color: rgba(255, 133, 162, 0.8);
}
html.light-theme .profile-dropdown-item {
    color: #555;
}
html.light-theme .profile-dropdown-item:hover {
    background: rgba(255, 133, 162, 0.06);
    color: #1a1a1a;
}
html.light-theme .profile-dropdown-item:hover svg {
    color: #FF85A2;
}
html.light-theme .profile-dropdown-divider {
    background: rgba(0, 0, 0, 0.06);
}

/* ========== 首页主内容区 ========== */
html.light-theme .home-main-wrapper {
    background: #f5f5f5;
}

/* Landing 区域 */
html.light-theme .landing-hero-title {
    background: linear-gradient(135deg, #FF85A2, #e04675, #d1336b);
    -webkit-background-clip: text;
    background-clip: text;
}
html.light-theme .landing-hero-sub {
    color: rgba(0, 0, 0, 0.65);
}
html.light-theme .landing-card {
    border-color: rgba(0, 0, 0, 0.1);
}
html.light-theme .landing-card:hover {
    border-color: rgba(255, 133, 162, 0.5);
    box-shadow: 0 16px 48px rgba(255, 133, 162, 0.15), 0 0 0 1px rgba(255, 133, 162, 0.1);
}

/* 画廊 */
html.light-theme .landing-gallery-title {
    color: #1a1a1a;
}
html.light-theme .gallery-tab {
    border-color: rgba(0, 0, 0, 0.08);
    background: rgba(0, 0, 0, 0.03);
    color: #777;
}
html.light-theme .gallery-tab:hover {
    color: #333;
    background: rgba(0, 0, 0, 0.05);
}
html.light-theme .gallery-tab.active {
    color: #fff;
    background: rgba(255, 133, 162, 0.8);
    border-color: #FF85A2;
}
html.light-theme .landing-gallery-item {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.06);
}
html.light-theme .landing-gallery-item:hover {
    border-color: rgba(255, 133, 162, 0.4);
}

/* ========== 项目卡片/列表 ========== */
html.light-theme .project-card,
html.light-theme .project-grid .project-card {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(0, 0, 0, 0.08);
    color: #333;
}

/* ========== 资产库标签 ========== */
html.light-theme .assets-tabs {
    border-bottom-color: rgba(0, 0, 0, 0.08);
}
html.light-theme .assets-tab {
    color: #777;
}
html.light-theme .assets-tab:hover {
    color: #333;
    background: rgba(0, 0, 0, 0.03);
}
html.light-theme .assets-tab.active {
    color: #FF85A2;
    background: rgba(255, 133, 162, 0.06);
}

/* ========== 工作台 ========== */
html.light-theme .studio-container {
    background: rgba(245, 245, 245, 0.95);
}
html.light-theme .studio-history-panel {
    background: rgba(255, 255, 255, 0.95);
    border-right-color: rgba(0, 0, 0, 0.06);
}
html.light-theme .studio-history-panel-header {
    border-bottom-color: rgba(0, 0, 0, 0.06);
}
html.light-theme .studio-history-panel-header h3 {
    color: #333;
}
html.light-theme .studio-welcome-title {
    color: #FF85A2;
}
html.light-theme .studio-welcome-sub {
    color: #999;
}
html.light-theme .studio-input-bubble {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.06);
}
html.light-theme .studio-prompt-input {
    color: #1a1a1a;
}
html.light-theme .studio-prompt-input:empty::before {
    color: #aaa;
}
html.light-theme .studio-toolbar-btn {
    border-color: rgba(0, 0, 0, 0.08);
    background: rgba(0, 0, 0, 0.03);
    color: #666;
}
html.light-theme .studio-toolbar-btn:hover {
    background: rgba(0, 0, 0, 0.06);
    color: #333;
}
html.light-theme .studio-msg-bubble.user {
    background: rgba(255, 133, 162, 0.08);
    border-color: rgba(255, 133, 162, 0.15);
}
html.light-theme .studio-msg-bubble.ai {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.06);
}
html.light-theme .studio-msg-text {
    color: #1a1a1a;
}
html.light-theme .studio-agent-text {
    color: #1a1a1a;
}

/* ========== 弹窗/模态框 ========== */
html.light-theme .mp-panel {
    background: linear-gradient(145deg, rgba(255,255,255,0.97) 0%, rgba(248,248,248,0.95) 100%);
    border-color: rgba(255, 133, 162, 0.15);
    color: #333;
}
html.light-theme .mp-header {
    border-bottom-color: rgba(0, 0, 0, 0.06);
    background: linear-gradient(90deg, rgba(255, 133, 162, 0.04), transparent);
}
html.light-theme .mp-user-name { color: #1a1a1a; }
html.light-theme .mp-tab { color: #888; }
html.light-theme .mp-tab.active { color: #FF85A2; }
html.light-theme .mp-tab-content { color: #333; }
html.light-theme .mp-rules-card {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.06);
}
html.light-theme .mp-rules-card-label { color: #888; }
html.light-theme .mp-rules-table td { color: #555; border-bottom-color: rgba(0,0,0,0.04); }
html.light-theme .mp-rules-table th { color: #999; border-bottom-color: rgba(0,0,0,0.06); }

/* 登录弹窗 */
html.light-theme .login-modal-card {
    background: rgba(255, 255, 255, 0.97);
    border-color: rgba(0, 0, 0, 0.1);
}
html.light-theme .form-input {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.1);
    color: #1a1a1a;
}
html.light-theme .form-label {
    color: #555;
}

/* ========== 设置页面 ========== */
html.light-theme .settings-page-wrapper {
    color: #333;
}
html.light-theme .settings-card {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.06);
}
html.light-theme .settings-card-title {
    color: #333;
}
html.light-theme .settings-tab {
    color: #777;
}
html.light-theme .settings-tab.active {
    color: #FF85A2;
}

/* ========== 通用覆盖 ========== */
html.light-theme .context-menu {
    background: rgba(255, 255, 255, 0.97);
    border-color: rgba(0, 0, 0, 0.1);
}
html.light-theme .context-menu-item {
    color: #555;
}
html.light-theme .context-menu-item:hover {
    background: rgba(255, 133, 162, 0.08);
    color: #FF85A2;
}

/* Scrollbar */
html.light-theme ::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
}
html.light-theme ::-webkit-scrollbar-track {
    background: transparent;
}

/* ========== 对话剧页面 ========== */
html.light-theme .dd-main {
    background: #f5f5f5;
}
html.light-theme .dd-content {
    color: #1a1a1a;
}
html.light-theme .dd-content::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
}
html.light-theme .dd-step-panel {
    color: #1a1a1a;
}
html.light-theme .dd-btn-primary {
    color: #fff;
}
/* 文本输入区 */
html.light-theme .dd-text-input-area {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.12);
    color: #1a1a1a;
}
html.light-theme .dd-text-input-area::placeholder {
    color: rgba(0, 0, 0, 0.3);
}
html.light-theme .dd-textarea,
html.light-theme .dd-content textarea {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.12);
    color: #1a1a1a;
}
/* 剧本面板 */
html.light-theme .dd-screenplay-panel {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(0, 0, 0, 0.1);
}
html.light-theme .dd-panel-title {
    color: #333;
}
html.light-theme .dd-panel-body::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.12);
}
html.light-theme .dd-screenplay-text {
    color: #1a1a1a;
}
html.light-theme .dd-action-line {
    color: #8b5a6a;
}
html.light-theme .dd-scene-list-item:hover {
    background: rgba(0, 0, 0, 0.04);
}
html.light-theme .dd-scene-list-item.active {
    background: rgba(255, 133, 162, 0.1);
}
html.light-theme .dd-scene-list-item .scene-loc {
    color: rgba(0, 0, 0, 0.5);
}
/* 工具栏 */
html.light-theme .dd-step2-toolbar,
html.light-theme .dd-step-panel .dd-empty-state {
    color: #555;
}
/* 镜头表格 */
html.light-theme .dd-shot-table thead th {
    background: rgba(0, 0, 0, 0.04);
    color: #555;
    border-bottom-color: rgba(0, 0, 0, 0.1);
}
html.light-theme .dd-shot-table tbody td {
    color: #333;
    border-bottom-color: rgba(0, 0, 0, 0.06);
}
html.light-theme .dd-shot-table tbody tr:hover td {
    background: rgba(255, 133, 162, 0.05);
}
html.light-theme .dd-shot-editable {
    color: #333;
}
html.light-theme .dd-shot-editable:hover {
    background: rgba(0, 0, 0, 0.03);
}
html.light-theme .dd-shot-editable:focus {
    background: rgba(0, 0, 0, 0.04);
}
html.light-theme .dd-shot-edit-select {
    background: rgba(0, 0, 0, 0.04);
    color: #333;
    border-color: rgba(0, 0, 0, 0.12);
}
html.light-theme .dd-shot-edit-select option {
    background: #fff;
    color: #333;
}
html.light-theme .dd-prompt-preview {
    color: #555;
}
html.light-theme .dd-prompt-preview:hover {
    background: rgba(0, 0, 0, 0.04);
}
html.light-theme .dd-shot-action-btn {
    background: rgba(0, 0, 0, 0.04);
    color: #555;
    border-color: rgba(0, 0, 0, 0.1);
}
html.light-theme .dd-shot-action-btn:hover {
    background: rgba(0, 0, 0, 0.08);
    color: #333;
    border-color: rgba(0, 0, 0, 0.2);
}
html.light-theme .dd-shot-size-tag {
    background: rgba(255, 133, 162, 0.12);
}
html.light-theme .dd-shot-type-tag {
    background: rgba(180, 130, 0, 0.1);
    color: #a08000;
}
html.light-theme .dd-shot-table .scene-label {
    background: rgba(130, 90, 220, 0.1);
    color: #7c4dcc;
}
/* 次要按钮 */
html.light-theme .dd-btn-secondary {
    background: rgba(0, 0, 0, 0.05);
    color: #555;
    border-color: rgba(0, 0, 0, 0.12);
}
html.light-theme .dd-btn-secondary:hover {
    background: rgba(0, 0, 0, 0.08);
    color: #333;
}
/* 加载状态 */
html.light-theme .dd-loading {
    color: #888;
}
/* 卡片 */
html.light-theme .dd-shot-card {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(0, 0, 0, 0.08);
}
html.light-theme .dd-char-card,
html.light-theme .dd-scene-card {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(0, 0, 0, 0.08);
    color: #333;
}
/* Step 4 分段布局 */
html.light-theme .dd-seg-layout {
    background: #f0f0f0;
}
html.light-theme .dd-seg-sidebar {
    background: rgba(255, 255, 255, 0.9);
    border-right-color: rgba(0, 0, 0, 0.08);
}
html.light-theme .dd-seg-sidebar-header {
    border-bottom-color: rgba(0, 0, 0, 0.08);
}
html.light-theme .dd-seg-btn {
    background: rgba(0, 0, 0, 0.03);
    color: #666;
}
html.light-theme .dd-seg-btn:hover {
    background: rgba(0, 0, 0, 0.06);
    color: #333;
}
html.light-theme .dd-seg-btn.active {
    background: rgba(255, 133, 162, 0.1);
    border-color: #FF85A2;
    color: #FF85A2;
}
html.light-theme .dd-seg-btn .seg-status {
    background: rgba(0, 0, 0, 0.12);
}
html.light-theme .dd-seg-shot-list {
    background: rgba(255, 255, 255, 0.85);
    border-right-color: rgba(0, 0, 0, 0.08);
}
html.light-theme .dd-seg-shot-header {
    color: #333;
    border-bottom-color: rgba(0, 0, 0, 0.08);
}
html.light-theme .dd-seg-shot-header span {
    color: rgba(0, 0, 0, 0.4);
}
html.light-theme .dd-seg-shot-card {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.06);
}
html.light-theme .dd-seg-shot-card:hover {
    background: rgba(0, 0, 0, 0.04);
}
html.light-theme .dd-seg-shot-desc {
    color: #555;
}
html.light-theme .dd-seg-shot-dialogue {
    color: rgba(0, 0, 0, 0.35);
}
html.light-theme .dd-seg-role-scene {
    background: rgba(255, 255, 255, 0.85);
    border-right-color: rgba(0, 0, 0, 0.08);
}
html.light-theme .dd-seg-rs-header {
    color: #333;
    border-bottom-color: rgba(0, 0, 0, 0.08);
}
html.light-theme .dd-seg-rs-section-title {
    color: rgba(0, 0, 0, 0.45);
}
html.light-theme .dd-seg-char-card {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.06);
}
html.light-theme .dd-seg-char-card:hover {
    background: rgba(255, 133, 162, 0.06);
    border-color: rgba(255, 133, 162, 0.2);
}
html.light-theme .dd-seg-char-thumb {
    background: rgba(0, 0, 0, 0.06);
}
html.light-theme .dd-seg-char-name {
    color: #333;
}
html.light-theme .dd-seg-char-label {
    color: rgba(0, 0, 0, 0.4);
}
html.light-theme .dd-seg-char-thumb .empty-char {
    color: rgba(0, 0, 0, 0.2);
}
html.light-theme .dd-seg-shot-container::-webkit-scrollbar-thumb,
html.light-theme .dd-seg-rs-body::-webkit-scrollbar-thumb,
html.light-theme .dd-seg-sidebar-list::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.12);
}
/* gc-form (内联样式覆盖) */
html.light-theme .gc-form-select {
    background: rgba(0, 0, 0, 0.03) !important;
    border-color: rgba(0, 0, 0, 0.12) !important;
    color: #333 !important;
}
/* 任务进度按钮 */
html.light-theme .dd-task-progress-btn {
    color: #555;
}
/* 模态框 (内联 dark bg) */
html.light-theme [id="ddGcModal"],
html.light-theme [id="ddScModal"] {
    background: #fff !important;
    border-color: rgba(0, 0, 0, 0.15) !important;
}
html.light-theme .wc-form-label {
    color: #333;
}
html.light-theme .gc-form-label {
    color: #333;
}

/* ========== 解说剧页面 ========== */
html.light-theme .app-viewport {
    background: #f5f5f5;
    color: #1a1a1a;
}
html.light-theme .sub-toolbar {
    background: rgba(255, 255, 255, 0.95) !important;
    border-bottom-color: rgba(0, 0, 0, 0.08) !important;
    color: #333;
}
html.light-theme .sub-toolbar button,
html.light-theme .sub-toolbar select {
    color: #555;
}
html.light-theme .wizard-container,
html.light-theme #initConfigPage {
    background: #f5f5f5 !important;
    color: #1a1a1a;
}
html.light-theme .wizard-container input,
html.light-theme .wizard-container textarea,
html.light-theme .wizard-container select,
html.light-theme #initConfigPage input,
html.light-theme #initConfigPage textarea,
html.light-theme #initConfigPage select {
    background: rgba(0, 0, 0, 0.03) !important;
    border-color: rgba(0, 0, 0, 0.12) !important;
    color: #1a1a1a !important;
}
html.light-theme .workflow-step-node {
    background: rgba(0, 0, 0, 0.04) !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
    color: #333;
}
html.light-theme .workflow-step {
    background: rgba(0, 0, 0, 0.04) !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
    color: #333;
}
html.light-theme .storyboard-row {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(0, 0, 0, 0.06);
}
html.light-theme .storyboard-cell {
    border-color: rgba(0, 0, 0, 0.06);
}
html.light-theme .storyboard-cell textarea {
    color: #1a1a1a;
}
/* 解说剧通用面板 */
html.light-theme .episode-panel,
html.light-theme .storyboard-container {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(0, 0, 0, 0.08);
}
html.light-theme .storyboard-header {
    border-bottom-color: rgba(0, 0, 0, 0.06);
    color: #333;
}
html.light-theme .shot-card {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.06);
    color: #333;
}
html.light-theme .shot-card:hover {
    background: rgba(0, 0, 0, 0.04);
}

/* ========== 共用：项目内弹窗/面板浅色 ========== */
html.light-theme .mp-panel {
    background: linear-gradient(145deg, rgba(255,255,255,0.97) 0%, rgba(248,248,248,0.95) 100%) !important;
    border-color: rgba(255, 133, 162, 0.15);
    color: #333;
}
html.light-theme .mp-header {
    border-bottom-color: rgba(0, 0, 0, 0.06);
}
html.light-theme .mp-user-name { color: #1a1a1a; }
html.light-theme .mp-tab { color: #888; }
html.light-theme .mp-tab.active { color: #FF85A2; }
html.light-theme .mp-tab-content { color: #333; }
html.light-theme .mp-rules-card {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.06);
}
html.light-theme .mp-rules-card-label { color: #888; }
html.light-theme .mp-rules-table td { color: #555; border-bottom-color: rgba(0,0,0,0.04); }
html.light-theme .mp-rules-table th { color: #999; border-bottom-color: rgba(0,0,0,0.06); }

/* ========== 内联深色样式覆盖（!important 打断 inline style） ========== */
html.light-theme #initConfigPage [style*="background:#111"],
html.light-theme #initConfigPage [style*="background:#0a0a0a"],
html.light-theme #initConfigPage [style*="background: #111"],
html.light-theme .wizard-container [style*="background:#111"] {
    background: rgba(0, 0, 0, 0.03) !important;
    border-color: rgba(0, 0, 0, 0.12) !important;
    color: #333 !important;
}
html.light-theme .sub-toolbar[style*="background:#0a0a0a"],
html.light-theme .sub-toolbar[style*="background: #0a0a0a"] {
    background: rgba(255, 255, 255, 0.95) !important;
    border-bottom-color: rgba(0, 0, 0, 0.08) !important;
}
html.light-theme [style*="background:#1a1a1a"],
html.light-theme [style*="background: #1a1a1a"] {
    background: #fff !important;
    border-color: rgba(0, 0, 0, 0.12) !important;
    color: #333 !important;
}
html.light-theme .dd-content [style*="color:#ddd"],
html.light-theme .dd-content [style*="color: #ddd"],
html.light-theme .dd-content [style*="color:#ccc"],
html.light-theme .dd-content [style*="color: #ccc"],
html.light-theme #initConfigPage [style*="color:#ddd"],
html.light-theme #initConfigPage [style*="color:#ccc"] {
    color: #333 !important;
}
html.light-theme .dd-content [style*="color:#555"],
html.light-theme #initConfigPage [style*="color:#555"] {
    color: #666 !important;
}
