/**
 * design-mode.css
 * Luna 设计模式专属样式
 * 100% 仿照 Manus 风格
 */

/* 1. 分屏布局样式 */
.workspace {
    display: flex;
    width: 100%;
    height: calc(100vh - 60px);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.chat-section {
    flex: 1;
    min-width: 0;
    overflow-y: auto;
    transition: flex 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 当没有任何面板显示时，聊天区域占满100% */
.workspace:not(:has(.design-panel.visible)):not(:has(.ppt-panel.visible)) .chat-section {
    flex: 1 1 100% !important;
    border-right: none !important;
}

/* 当设计面板显示时，锁定比例为 50/50 */
.workspace:has(.design-panel.visible) .chat-section {
    flex: 1 1 50% !important;
    min-width: 0 !important;
    overflow-y: auto !important;
    /* 恢复纵向滚动条 */
    overflow-x: hidden !important;
    margin: 0 !important;
    padding: 20px !important;
    border-right: 1px solid var(--manus-border);
    max-width: none !important;
}

.workspace:has(.design-panel.visible) .chat-section .messages-container-split {
    max-width: 100% !important;
    /* 允许消息流充满一半的屏幕 */
    margin: 0 !important;
}

/* 当 PPT 面板显示时，同样锁定比例 */
.workspace:has(.ppt-panel.visible) .chat-section {
    flex: 1 1 40% !important;
    min-width: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    margin: 0 !important;
    padding: 20px !important;
    border-right: 1px solid var(--manus-border);
    max-width: none !important;
}

.workspace:has(.ppt-panel.visible) .chat-section .messages-container-split {
    max-width: 100% !important;
    margin: 0 !important;
}

/* 2. 设计面板主容器 */
.design-panel {
    flex: 0 0 0;
    width: 0;
    height: 100%;
    background: var(--manus-bg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: flex 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s;
    border-left: none;
    opacity: 0;
}

/* 拖拽时的即时响应 */
.workspace.is-resizing .chat-section,
.workspace.is-resizing .design-panel {
    transition: none !important;
}

/* 修复设计面板可能被侧边栏或其他容器挤压的问题 */
.workspace:has(.design-panel.visible) {
    justify-content: flex-start !important;
}

.design-panel.visible {
    flex: 1 1 50% !important;
    min-width: 0 !important;
    border-left: 1px solid var(--manus-border);
    opacity: 1;
}

/* 2.1 拖拽手柄 */
.design-resize-handle {
    width: 8px;
    height: 100%;
    cursor: col-resize;
    position: relative;
    z-index: 100;
    margin-left: -4px;
    margin-right: -4px;
    background: transparent;
    transition: background 0.2s;
}

.design-resize-handle:hover,
.design-resize-handle:active {
    background: rgba(236, 72, 153, 0.2);
}

/* PPT 模式下的拖拽手柄使用橙色 */
.workspace:has(.ppt-panel.visible) .design-resize-handle:hover,
.workspace:has(.ppt-panel.visible) .design-resize-handle:active {
    background: rgba(249, 115, 22, 0.2);
}

.design-resize-handle::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 2px;
    height: 40px;
    background: var(--manus-border);
    border-radius: 1px;
}

/* PPT 模式下的拖拽手柄指示条 */
.workspace:has(.ppt-panel.visible) .design-resize-handle::after {
    background: rgba(249, 115, 22, 0.5);
}

/* 3. 设计按钮 (Pink Gradient) */
.manus-feature-btn.design-btn {
    background: linear-gradient(135deg, #ec4899 0%, #8b5cf6 100%) !important;
    box-shadow: 0 4px 12px rgba(236, 72, 153, 0.3) !important;
}

.manus-feature-btn.design-btn:hover:not(:disabled) {
    box-shadow: 0 6px 20px rgba(236, 72, 153, 0.45) !important;
}

.design-inline-tag {
    background: rgba(236, 72, 153, 0.85) !important;
}

/* 4. 面板内部结构 */
.design-panel-header {
    padding: 16px 24px;
    border-bottom: 1px solid var(--manus-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.design-panel-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--manus-text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.design-panel-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    background: var(--background-color);
    transition: width 0.3s ease;
}

/* 关键修复：当设计面板可见时，解除左侧内容的 max-width 限制 */
.chat-section[style*="width"] .column-content,
.chat-section[style*="width"] #agent-message-list,
.chat-section[style*="width"] .agent-input-area .input-container {
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
}

/* 主图预览区 */
.main-design-preview {
    width: 100%;
    aspect-ratio: 1;
    background: #f3f4f6;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.dark-theme .main-design-preview {
    background: #1f2937;
}

.main-design-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

/* 5. 悬浮工具栏 */
.design-image-toolbar {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    padding: 6px;
    border-radius: 12px;
    display: flex;
    gap: 4px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.dark-theme .design-image-toolbar {
    background: rgba(31, 41, 55, 0.8);
}

.design-toolbar-btn {
    padding: 8px 12px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: var(--manus-text);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.design-toolbar-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

.dark-theme .design-toolbar-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.design-toolbar-btn i {
    font-size: 14px;
}

/* 6. 编辑模式覆盖层 */
.design-edit-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 20;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: grayscale(100%) blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: crosshair;
}

.design-extracting-loader {
    background: white;
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
}

.design-edit-canvas {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 21;
}

/* 编辑文本弹窗 */
.design-text-popup {
    position: absolute;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 240px;
    z-index: 30;
    transform: translateY(10px);
}

.design-text-popup input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
}

.design-text-popup input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.design-popup-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.design-popup-btn {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    border: none;
}

.design-popup-btn.cancel {
    background: #f3f4f6;
    color: #4b5563;
}

.design-popup-btn.apply {
    background: #3b82f6;
    color: white;
}

/* 7. 历史图片画廊 */
.design-history-gallery {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: thin;
}

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

.design-history-gallery::-webkit-scrollbar-thumb {
    background: var(--manus-border);
    border-radius: 2px;
}

.design-history-item {
    flex: 0 0 100px;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
    background: #eee;
}

.design-history-item.active {
    border-color: #ec4899;
}

.design-history-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.design-history-item:hover {
    transform: scale(1.05);
}

/* 8. 生成中动画样式 */
.design-generating-placeholder {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    text-align: center;
    background: rgba(236, 72, 153, 0.03);
    border-radius: 16px;
    margin-bottom: 24px;
}

.manus-loading-spinner {
    position: relative;
    width: 64px;
    height: 64px;
    margin-bottom: 20px;
}

.spinner-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px solid rgba(236, 72, 153, 0.1);
    border-top-color: #ec4899;
    border-radius: 50%;
    animation: manus-spin 1s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.spinner-core {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    background: #ec4899;
    border-radius: 50%;
    box-shadow: 0 0 15px #ec4899;
    animation: manus-pulse 1.5s ease-in-out infinite;
}

.generating-text {
    font-size: 16px;
    font-weight: 600;
    color: var(--manus-text);
    margin-bottom: 8px;
}

.generating-subtext {
    font-size: 13px;
    color: var(--manus-text-hint);
}

.design-generating-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
}

.dark-theme .design-generating-overlay {
    background: rgba(26, 26, 26, 0.6);
}

.overlay-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: #ec4899;
    font-weight: 600;
    font-size: 14px;
}

@keyframes manus-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes manus-pulse {

    0%,
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }

    50% {
        opacity: 0.5;
        transform: translate(-50%, -50%) scale(1.5);
    }
}

/* ========================================
   9. PPT 分页展示模式样式
   ======================================== */

/* PPT 面板容器 */
.ppt-panel {
    flex: 0 0 0;
    width: 0;
    height: 100%;
    background: var(--manus-bg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: flex 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s;
    border-left: none;
    opacity: 0;
}

.ppt-panel.visible {
    flex: 1 1 60% !important;
    min-width: 0 !important;
    border-left: 1px solid var(--manus-border);
    opacity: 1;
}

/* PPT 面板头部 */
.ppt-panel-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--manus-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--manus-bg);
    backdrop-filter: blur(10px);
}

.ppt-panel-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--manus-text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.ppt-panel-title i {
    color: var(--manus-text-secondary);
    font-size: 16px;
    opacity: 0.8;
}

.ppt-panel-title .ppt-badge {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 0.3px;
}

/* PPT 页码指示器 */
.ppt-page-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: var(--manus-text-secondary);
    background: transparent;
    padding: 4px 8px;
    border-radius: 4px;
}

.ppt-page-indicator .current-page {
    font-weight: 600;
    color: var(--manus-text);
    font-size: 14px;
}

.ppt-page-indicator .total-pages {
    font-weight: 400;
    opacity: 0.7;
}

/* PPT 面板操作按钮 */
.ppt-panel-header .design-panel-actions {
    display: flex;
    align-items: center;
}

.ppt-panel-header .design-panel-actions .nav-button {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: var(--manus-text-secondary);
    cursor: pointer;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.ppt-panel-header .design-panel-actions .nav-button:hover {
    background: var(--manus-hover);
    color: var(--manus-text);
}

/* PPT 内容区域 */
.ppt-panel-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    padding: 16px;
    background: linear-gradient(180deg, #f8f9fa 0%, #f1f3f5 100%);
}

.dark-theme .ppt-panel-content {
    background: linear-gradient(180deg, #1e1e1e 0%, #141414 100%);
}

/* PPT 幻灯片展示区 */
.ppt-slide-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(145deg, #1a1a2e 0%, #0d0d1a 100%);
    border-radius: 16px;
    box-shadow:
        0 4px 6px rgba(0, 0, 0, 0.1),
        0 20px 50px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* 幻灯片包装器 - 用于动画 */
.ppt-slide-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 幻灯片图片 */
.ppt-slide-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
    transition: opacity 0.3s ease, transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 幻灯片切换动画 */
.ppt-slide-wrapper.slide-left .ppt-slide-image {
    animation: slideInFromRight 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.ppt-slide-wrapper.slide-right .ppt-slide-image {
    animation: slideInFromLeft 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes slideInFromRight {
    0% {
        opacity: 0;
        transform: translateX(60px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes slideInFromLeft {
    0% {
        opacity: 0;
        transform: translateX(-60px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

/* 幻灯片导航按钮 */
.ppt-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 10;
    opacity: 0;
}

.ppt-slide-container:hover .ppt-nav-btn {
    opacity: 1;
}

.ppt-nav-btn:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.2);
}

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

.ppt-nav-btn:disabled {
    opacity: 0.3 !important;
    cursor: not-allowed;
}

.ppt-nav-btn.prev {
    left: 16px;
}

.ppt-nav-btn.next {
    right: 16px;
}

.dark-theme .ppt-nav-btn {
    background: rgba(50, 50, 50, 0.9);
    color: #fff;
}

.dark-theme .ppt-nav-btn:hover {
    background: rgba(70, 70, 70, 0.95);
}

/* PPT 页码指示点 */
.ppt-dots-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 16px 0;
    flex-wrap: wrap;
    max-width: 100%;
}

.ppt-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.15);
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0;
}

.ppt-dot:hover {
    background: rgba(249, 115, 22, 0.5);
    transform: scale(1.2);
}

.ppt-dot.active {
    background: #f97316;
    width: 28px;
    border-radius: 5px;
    box-shadow: 0 2px 8px rgba(249, 115, 22, 0.4);
}

.dark-theme .ppt-dot {
    background: rgba(255, 255, 255, 0.2);
}

.dark-theme .ppt-dot:hover {
    background: rgba(249, 115, 22, 0.6);
}

.dark-theme .ppt-dot.active {
    background: #f97316;
}

/* PPT 缩略图导航 */
.ppt-thumbnails-container {
    display: flex;
    gap: 10px;
    padding: 12px 14px;
    overflow-x: auto;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.02) 0%, rgba(0, 0, 0, 0.04) 100%);
    border-radius: 14px;
    margin-top: 12px;
    scrollbar-width: thin;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.ppt-thumbnails-container::-webkit-scrollbar {
    height: 5px;
}

.ppt-thumbnails-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.03);
    border-radius: 3px;
}

.ppt-thumbnails-container::-webkit-scrollbar-thumb {
    background: rgba(249, 115, 22, 0.35);
    border-radius: 3px;
}

.ppt-thumbnails-container::-webkit-scrollbar-thumb:hover {
    background: rgba(249, 115, 22, 0.55);
}

.dark-theme .ppt-thumbnails-container {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0%, rgba(255, 255, 255, 0.04) 100%);
    border-color: rgba(255, 255, 255, 0.06);
}

.ppt-thumbnail {
    flex: 0 0 auto;
    width: 100px;
    aspect-ratio: 16/9;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    background: linear-gradient(135deg, #e8e8e8 0%, #d4d4d4 100%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.ppt-thumbnail:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
    border-color: rgba(249, 115, 22, 0.3);
}

.ppt-thumbnail.active {
    border-color: #f97316;
    box-shadow: 0 4px 16px rgba(249, 115, 22, 0.35);
    transform: translateY(-2px);
}

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

.ppt-thumbnail-number {
    position: absolute;
    bottom: 4px;
    left: 4px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
}

.ppt-thumbnail.active .ppt-thumbnail-number {
    background: #f97316;
}

/* 无图片时的缩略图占位符 */
.ppt-thumbnail-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    color: #94a3b8;
}

.ppt-thumbnail-placeholder i {
    font-size: 20px;
    color: #f97316;
    opacity: 0.7;
}

.ppt-thumbnail-placeholder .ppt-thumbnail-title {
    font-size: 8px;
    text-align: center;
    line-height: 1.2;
    max-width: 90%;
    overflow: hidden;
    color: #64748b;
}

.ppt-thumbnail.active .ppt-thumbnail-placeholder {
    background: linear-gradient(135deg, #fff7ed 0%, #fed7aa 100%);
}

.ppt-thumbnail.active .ppt-thumbnail-placeholder i {
    opacity: 1;
}

.dark-theme .ppt-thumbnail-placeholder {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: #64748b;
}

.dark-theme .ppt-thumbnail-placeholder .ppt-thumbnail-title {
    color: #94a3b8;
}

.dark-theme .ppt-thumbnail.active .ppt-thumbnail-placeholder {
    background: linear-gradient(135deg, #431407 0%, #7c2d12 100%);
}

.dark-theme .ppt-thumbnail {
    background: #374151;
}

/* PPT 控制栏 */
.ppt-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.02) 0%, rgba(0, 0, 0, 0.04) 100%);
    border-radius: 14px;
    margin-top: 12px;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.ppt-control-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: none;
    background: rgba(255, 255, 255, 0.8);
    color: var(--manus-text);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.ppt-control-btn:hover {
    background: rgba(249, 115, 22, 0.12);
    color: #f97316;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(249, 115, 22, 0.15);
}

.ppt-control-btn.active {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: white;
    box-shadow: 0 3px 10px rgba(249, 115, 22, 0.35);
}

.ppt-control-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none !important;
}

.dark-theme .ppt-controls {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0%, rgba(255, 255, 255, 0.04) 100%);
    border-color: rgba(255, 255, 255, 0.06);
}

.dark-theme .ppt-control-btn {
    background: rgba(255, 255, 255, 0.08);
}

.dark-theme .ppt-control-btn:hover {
    background: rgba(249, 115, 22, 0.2);
}

/* PPT 生成中状态 */
.ppt-generating-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.05) 0%, rgba(234, 88, 12, 0.08) 100%);
    border-radius: 12px;
    z-index: 5;
}

.ppt-generating-animation {
    position: relative;
    width: 80px;
    height: 80px;
    margin-bottom: 24px;
}

.ppt-generating-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 4px solid rgba(249, 115, 22, 0.1);
    border-top-color: #f97316;
    border-radius: 50%;
    animation: ppt-spin 1s linear infinite;
}

.ppt-generating-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 28px;
    color: #f97316;
    animation: ppt-pulse 1.5s ease-in-out infinite;
}

.ppt-generating-text {
    font-size: 16px;
    font-weight: 600;
    color: var(--manus-text);
    margin-bottom: 8px;
}

.ppt-generating-page {
    font-size: 14px;
    color: #f97316;
    font-weight: 500;
}

@keyframes ppt-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes ppt-pulse {
    0%, 100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 0.6;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

/* PPT 空状态 */
.ppt-empty-state {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--manus-text-hint);
    gap: 16px;
}

.ppt-empty-state i {
    font-size: 64px;
    opacity: 0.3;
    color: #f97316;
}

.ppt-empty-state span {
    font-size: 16px;
    font-weight: 500;
}

/* PPT 进度条 */
.ppt-progress-bar {
    height: 4px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 8px;
}

.ppt-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #f97316, #ea580c);
    border-radius: 2px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.dark-theme .ppt-progress-bar {
    background: rgba(255, 255, 255, 0.1);
}

/* PPT 面板的响应式调整 */
@media (max-width: 768px) {
    .ppt-nav-btn {
        width: 40px;
        height: 40px;
        font-size: 16px;
        opacity: 1;
    }

    .ppt-thumbnail {
        width: 80px;
    }

    .ppt-panel-header {
        padding: 12px 16px;
    }

    .ppt-panel-content {
        padding: 12px;
    }
}

/* ========================================
   10. PPT 完整幻灯片预览样式
   ======================================== */

/* 完整幻灯片预览容器 */
.ppt-slide-full {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: linear-gradient(145deg, #1a365d 0%, #1e3a5f 30%, #0f172a 100%);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

/* 幻灯片背景装饰 */
.ppt-slide-full::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 40%;
    height: 100%;
    background: radial-gradient(ellipse at top right, rgba(249, 115, 22, 0.08) 0%, transparent 60%);
    pointer-events: none;
}

/* 幻灯片标题区域 */
.ppt-slide-title {
    padding: 28px 36px 18px;
    font-size: 26px;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.25) 0%, transparent 100%);
    line-height: 1.35;
    letter-spacing: -0.02em;
    position: relative;
    z-index: 1;
}

/* 标题装饰线 */
.ppt-slide-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 36px;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #f97316 0%, #fb923c 100%);
    border-radius: 2px;
}

/* 幻灯片内容区域 */
.ppt-slide-body {
    flex: 1;
    display: flex;
    padding: 20px 36px 32px;
    gap: 28px;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

/* 左侧文本内容 */
.ppt-slide-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding-right: 16px;
}

.ppt-slide-text.full-width {
    max-width: 100%;
}

/* 文本内容区 */
.ppt-slide-content {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.ppt-content-line {
    font-size: 15px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    padding: 4px 0;
}

.ppt-content-line.bullet-point {
    padding-left: 26px;
    position: relative;
}

.ppt-content-line.bullet-point::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 7px;
    height: 7px;
    background: linear-gradient(135deg, #f97316 0%, #fb923c 100%);
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(249, 115, 22, 0.4);
}

/* 空内容占位 */
.ppt-slide-placeholder {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.35);
    gap: 14px;
}

.ppt-slide-placeholder i {
    font-size: 52px;
    opacity: 0.4;
    color: rgba(249, 115, 22, 0.5);
}

.ppt-slide-placeholder span {
    font-size: 14px;
    font-weight: 500;
}

/* 右侧配图容器 */
.ppt-slide-image-container {
    flex: 0 0 42%;
    max-width: 42%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, rgba(0, 0, 0, 0.25) 0%, rgba(0, 0, 0, 0.15) 100%);
    border-radius: 14px;
    overflow: hidden;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.2);
}

.ppt-slide-image-container .ppt-slide-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* 纯图片模式 */
.ppt-slide-image-only {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
    transition: opacity 0.3s ease, transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 全屏图片容器 (用于 metadata 模式下的纯图片幻灯片) */
.ppt-slide-image-fullscreen {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 16px;
}

.ppt-slide-image-fullscreen .ppt-slide-image-only {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* 全屏图片上的标题悬浮层 */
.ppt-slide-title-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 20px 24px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.7) 0%, transparent 100%);
    color: white;
    font-size: 18px;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    z-index: 5;
}

/* 页码标识 */
.ppt-slide-page-badge {
    position: absolute;
    bottom: 16px;
    right: 16px;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 16px;
}

/* 加载中叠加层 */
.ppt-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    z-index: 20;
}

.ppt-loading-spinner {
    font-size: 32px;
    color: #f97316;
}

.ppt-loading-text {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

/* 幻灯片切换动画 - 完整模式 */
.ppt-slide-wrapper.slide-left .ppt-slide-full,
.ppt-slide-wrapper.slide-left .ppt-slide-image-only,
.ppt-slide-wrapper.slide-left .ppt-slide-image-fullscreen {
    animation: slideInFromRight 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.ppt-slide-wrapper.slide-right .ppt-slide-full,
.ppt-slide-wrapper.slide-right .ppt-slide-image-only,
.ppt-slide-wrapper.slide-right .ppt-slide-image-fullscreen {
    animation: slideInFromLeft 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* PPT 完成加载时的渐入动画 */
.ppt-slide-wrapper.fade-in .ppt-slide-full,
.ppt-slide-wrapper.fade-in .ppt-slide-image-only,
.ppt-slide-wrapper.fade-in .ppt-slide-image-fullscreen {
    animation: pptFadeInScale 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes pptFadeInScale {
    0% {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* 滚动条美化 - 幻灯片文本区 */
.ppt-slide-text::-webkit-scrollbar {
    width: 6px;
}

.ppt-slide-text::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.ppt-slide-text::-webkit-scrollbar-thumb {
    background: rgba(249, 115, 22, 0.5);
    border-radius: 3px;
}

.ppt-slide-text::-webkit-scrollbar-thumb:hover {
    background: rgba(249, 115, 22, 0.7);
}

/* 响应式调整 - 完整预览模式 */
@media (max-width: 768px) {
    .ppt-slide-title {
        font-size: 20px;
        padding: 16px 20px 12px;
    }

    .ppt-slide-body {
        flex-direction: column;
        padding: 12px 20px 20px;
    }

    .ppt-slide-image-container {
        flex: 0 0 auto;
        max-width: 100%;
        max-height: 40%;
    }

    .ppt-content-line {
        font-size: 14px;
    }
}

/* ========================================
   11. PPT 预览面板重新打开悬浮按钮
   ======================================== */

.ppt-reopen-fab {
    position: fixed;
    right: 24px;
    bottom: 100px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: white;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(249, 115, 22, 0.4), 0 8px 32px rgba(0, 0, 0, 0.15);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    animation: pptFabEnter 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.ppt-reopen-fab:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 28px rgba(249, 115, 22, 0.5), 0 12px 40px rgba(0, 0, 0, 0.2);
}

.ppt-reopen-fab:active {
    transform: scale(0.95);
}

.ppt-reopen-fab i {
    font-size: 24px;
}

/* 页数角标 */
.ppt-reopen-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    background: #1e3a5f;
    color: white;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

@keyframes pptFabEnter {
    0% {
        opacity: 0;
        transform: scale(0.5) translateY(20px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* 响应式调整 */
@media (max-width: 768px) {
    .ppt-reopen-fab {
        right: 16px;
        bottom: 80px;
        width: 48px;
        height: 48px;
    }

    .ppt-reopen-fab i {
        font-size: 20px;
    }

    .ppt-reopen-badge {
        min-width: 18px;
        height: 18px;
        font-size: 10px;
    }
}

/* 深色主题适配 */
.dark-theme .ppt-reopen-badge {
    background: #0f172a;
}
