    /* ============================================
       响应式设计 - 移动端优化 V2.0
       ============================================ */
    
    /* 平板和中等屏幕 (1024px 以下) */
    @media (max-width: 1024px) {
        /* 移动端允许页面滚动 */
        body {
            overflow: auto !important;
            -webkit-overflow-scrolling: touch;
        }
        
        .fullscreen-editor-wrapper {
            position: relative;
            top: 0;
            overflow: visible; /* 改为整页滚动 */
            height: auto;
        }
        
        /* 1024px以下但大于768px时显示编辑器 */
        .html-editor-container {
            display: flex !important;
            flex-direction: column !important;
            grid-template-columns: none !important;
            gap: 0;
            height: auto !important;
            min-height: auto;
            overflow: visible !important;
        }
        
        /* 768px以下强制隐藏编辑器，使用聊天界面 */
        @media (max-width: 768px) {
            .html-editor-container {
                display: none !important;
            }
            
            .editor-top-bar {
                display: none !important;
            }
        }
        
        .editor-section {
            border-right: none;
            border-bottom: 2px solid #3e3e42;
            height: auto !important;
            min-height: 280px; /* 减少最小高度 */
            overflow: visible !important;
            width: 100%;
        }
        
        .preview-section {
            height: auto !important;
            min-height: 300px; /* 减少最小高度 */
            overflow: visible !important;
            width: 100%;
        }
        
        #htmlEditor {
            min-height: 350px;
            max-height: none !important;
            font-size: 14px;
        }
        
        .preview-container {
            min-height: 300px; /* 减少最小高度 */
            overflow: visible !important; /* 改为整页滚动 */
            -webkit-overflow-scrolling: touch;
        }
        
        /* 顶部工具栏优化 - 平板 */
        .editor-top-bar {
            padding: 8px 12px;
            height: auto;
            min-height: 48px;
            flex-wrap: wrap;
            gap: 6px;
        }
        
        .editor-actions {
            flex-wrap: wrap;
            gap: 6px;
            width: 100%;
            justify-content: flex-end;
        }
        
        .editor-btn {
            padding: 8px 14px;
            font-size: 12px;
            white-space: nowrap;
        }
    }
    
    /* 中等屏幕适配 */
    @media (max-width: 768px) and (min-width: 600px) {
        .editor-section, .preview-section {
            padding: 15px;
            overflow: visible !important;
        }
        
        .controls {
            gap: 12px;
            flex-wrap: wrap;
            justify-content: center;
            align-items: center;
            width: 100%;
        }
        
        .controls .btn {
            padding: 10px 18px;
            font-size: 13px;
            flex: 0 0 auto;
            min-width: 120px;
            max-width: 160px;
            text-align: center;
            border-radius: 10px;
        }
        
        .controls .btn i {
            margin-right: 5px;
        }
        
        .preview-container {
            overflow: visible !important; /* 改为整页滚动 */
        }
    }
    
    @media (max-width: 600px) {
        .editor-section, .preview-section {
            padding: 15px;
            overflow: visible !important;
        }
        
        /* 下方操作按钮优化 */
        .controls {
            gap: 10px;
            flex-wrap: wrap;
            justify-content: center;
            align-items: center;
            width: 100%;
            margin-top: 16px;
        }
        
        .controls .btn {
            padding: 14px 20px;
            font-size: 15px;
            flex: 1;
            min-width: 0;
            min-height: 48px;
            text-align: center;
            white-space: nowrap;
            border-radius: 8px;
            font-weight: 700;
        }
        
        /* 统一配色 - 绿白黑 */
        .controls .btn-success {
            background: #ffffff !important;
            color: #10b981 !important;
            border: 2px solid #10b981 !important;
        }
        
        .controls .btn-warning {
            background: #10b981 !important;
            color: #ffffff !important;
            border: 2px solid #10b981 !important;
        }
        
        .controls .btn-outline-secondary {
            display: none; /* 隐藏次要按钮 */
        }
        
        /* 确保按钮图标清晰 */
        .controls .btn i {
            margin-right: 6px;
            font-size: 16px;
        }
        
        .preview-container {
            overflow: visible !important;
        }
    }
    
    @media (max-width: 768px) {
        /* 移动端基础适配 */
        body {
            overflow: auto !important;
            -webkit-overflow-scrolling: touch;
        }
        
        /* 隐藏底部平台导航 */
        footer, .footer {
            display: none;
        }
        
        /* 手机端使用聊天界面，强制隐藏PC端编辑器容器 */
        .html-editor-container {
            display: none !important;
        }
        
        .editor-top-bar {
            display: none !important;
        }
        
        /* 编辑器全屏布局 - 改为可滚动 */
        .fullscreen-editor-wrapper {
            position: relative !important; /* 改为相对定位，允许页面滚动 */
            top: auto !important;
            left: auto !important;
            right: auto !important;
            bottom: auto !important;
            overflow: visible !important; /* 允许内容溢出，整页滚动 */
            height: auto !important;
            min-height: 100vh;
        }
        
        .editor-section, .preview-section {
            width: 100% !important;
            height: auto !important;
            padding: 12px;
            overflow: visible !important;
            position: relative !important;
            flex-shrink: 0; /* 防止被压缩 */
        }
        
        /* 确保编辑区域在预览区域之前 */
        .editor-section {
            order: 1;
            z-index: 1;
            margin-bottom: 15px; /* 编辑区域下方留出间距 */
        }
        
        .preview-section {
            order: 2;
            z-index: 1;
            margin-top: 0; /* 移除多余间距 */
            padding-top: 0;
        }
        
        /* 顶部工具栏优化 - 更大更清晰 */
        .editor-top-bar {
            padding: 8px;
            height: auto;
            min-height: 54px;
            background: #ffffff;
            border-bottom: 2px solid #10b981;
        }
        
        .editor-title {
            font-size: 13px;
            color: #000000;
            font-weight: 700;
        }
        
        .editor-title i {
            color: #10b981;
            font-size: 16px;
        }
        
        /* 手机端按钮布局 - 美观统一的横向布局 */
        .editor-actions {
            display: flex !important;
            gap: 10px !important;
            width: 100% !important;
            margin-left: 0 !important;
            flex-wrap: nowrap !important;
            align-items: center !important;
        }
        
        /* 手机端极简模式：隐藏所有非必要按钮 */
        .editor-btn[onclick*="toggleSidebar"],
        .editor-btn[onclick*="showTemplateLibrary"],
        .editor-btn[onclick*="fullscreenMode"],
        .editor-btn[onclick*="showInstructions"],
        .editor-btn[onclick*="showDraftList"],
        .mobile-menu-toggle {
            display: none !important;
        }
        
        /* 手机端只保留：保存草稿、下载、上传（发布）按钮 - 统一美观样式 */
        .editor-btn[onclick*="saveDraft"],
        .editor-btn[onclick*="downloadHTML"],
        .editor-btn[onclick*="publishHTML"],
        .editor-btn-publish-cta {
            display: flex !important;
            flex: 1 1 auto !important;
            min-width: 0 !important;
            min-height: 44px !important;
            padding: 10px 14px !important;
            font-size: 13px !important;
            border-radius: 8px !important;
            font-weight: 600 !important;
            align-items: center !important;
            justify-content: center !important;
            gap: 6px !important;
            transition: all 0.2s ease !important;
            border: 2px solid !important;
            white-space: nowrap !important;
        }
        
        /* 保存草稿和下载按钮 - 白底绿字 */
        .editor-btn[onclick*="saveDraft"],
        .editor-btn[onclick*="downloadHTML"] {
            background: #ffffff !important;
            color: #10b981 !important;
            border-color: #10b981 !important;
        }
        
        .editor-btn[onclick*="saveDraft"]:active,
        .editor-btn[onclick*="downloadHTML"]:active {
            background: #f0fdf4 !important;
            transform: scale(0.97) !important;
        }
        
        /* 上传（发布）按钮 - 绿底白字，更突出 */
        .editor-btn[onclick*="publishHTML"],
        .editor-btn-publish-cta {
            background: #10b981 !important;
            color: #ffffff !important;
            border-color: #10b981 !important;
            font-weight: 700 !important;
            box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25) !important;
            flex: 1.5 1 auto !important; /* 发布按钮稍大一些 */
        }
        
        .editor-btn[onclick*="publishHTML"]:active {
            background: #059669 !important;
            transform: scale(0.97) !important;
            box-shadow: 0 1px 4px rgba(16, 185, 129, 0.3) !important;
        }
        
        /* 按钮图标样式 */
        .editor-btn[onclick*="saveDraft"] i,
        .editor-btn[onclick*="downloadHTML"] i,
        .editor-btn[onclick*="publishHTML"] i {
            font-size: 15px !important;
            margin-right: 0 !important;
            margin-bottom: 0 !important;
        }
        
        /* 手机端极简模式：输入源选择器已隐藏（在2133行设置） */
        
        /* AI输入区 - 美观优化 */
        .ai-input-bar {
            display: flex !important;
            flex-wrap: wrap !important;
            gap: 10px !important;
            padding: 12px !important;
            border-radius: 10px !important;
            background: #f9fafb !important;
        }
        
        .ai-prompt-input {
            width: 100% !important;
            min-height: 50px !important;
            font-size: 15px !important;
            padding: 12px 16px !important;
            border-radius: 10px !important;
            border: 2px solid #e5e7eb !important;
            background: #ffffff !important;
            color: #333333 !important;
            transition: all 0.2s ease !important;
        }
        
        .ai-prompt-input:focus {
            border-color: #10b981 !important;
            outline: none !important;
            box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1) !important;
        }
        
        .ai-prompt-input::placeholder {
            color: #9ca3af !important;
        }
        
        /* AI 按钮容器 - 优化布局 */
        #textInputArea {
            display: flex !important;
            flex-wrap: wrap !important;
            gap: 8px !important;
            align-items: stretch !important;
        }
        
        /* 输入框占第一行 */
        #textInputArea .ai-prompt-input {
            flex: 1 1 100% !important;
            order: 1;
        }
        
        /* 按钮占第二行 - 只保留生成和新对话 */
        #textInputArea .ai-generate-btn {
            flex: 2 !important;
            order: 2;
        }
        
        #textInputArea .ai-new-conversation-btn {
            flex: 1 !important;
            order: 3;
        }
        
        /* 手机端极简模式：隐藏新对话、最近对话等按钮（保留“继续生成”） */
        #textInputArea .ai-conversation-dropdown,
        #textInputArea .ai-recent-btn,
        #textInputArea .ai-new-conversation-btn {
            display: none !important;
        }
        
        /* 手机端极简模式：隐藏输入方式选择器（只保留文字输入） */
        .input-source-selector {
            display: none !important;
            visibility: hidden !important;
            height: 0 !important;
            margin: 0 !important;
            padding: 0 !important;
            overflow: hidden !important;
        }
        
        /* 手机端隐藏文件、截图、草稿输入区域 */
        #fileInputArea,
        #imageInputArea,
        #draftInputArea,
        #featuredTemplateInputArea {
            display: none !important;
            visibility: hidden !important;
            height: 0 !important;
            overflow: hidden !important;
        }

        /* 手机端隐藏 PC 精选模板模式区（移动端有独立入口卡片） */
        
        /* 手机端隐藏代码搜索框 */
        #codeSearchBox {
            display: none !important;
            visibility: hidden !important;
            height: 0 !important;
            margin: 0 !important;
            padding: 0 !important;
            overflow: hidden !important;
        }
        
        /* 生成按钮 - 美观优化 */
        .ai-generate-btn {
            padding: 12px 20px !important;
            font-size: 15px !important;
            min-height: 48px !important;
            display: flex !important;
            align-items: center !important;
            justify-content: center !important;
            white-space: nowrap !important;
            background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
            color: #ffffff !important;
            border: none !important;
            border-radius: 10px !important;
            font-weight: 700 !important;
            box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3) !important;
            transition: all 0.2s ease !important;
        }
        
        .ai-generate-btn i {
            margin-right: 6px !important;
            font-size: 16px !important;
        }
        
        .ai-generate-btn:active {
            background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
            transform: scale(0.97) !important;
            box-shadow: 0 1px 4px rgba(16, 185, 129, 0.4) !important;
        }
        
        /* 风格选择器 - 美观优化 */
        .style-selector {
            overflow-x: auto !important;
            flex-wrap: nowrap !important;
            -webkit-overflow-scrolling: touch !important;
            scrollbar-width: none !important;
            gap: 8px !important;
            padding: 8px 12px !important;
            margin-top: 8px !important;
            background: #f9fafb !important;
            border-radius: 10px !important;
        }
        
        .style-selector::-webkit-scrollbar {
            display: none !important;
        }
        
        .style-selector-label {
            font-size: 13px !important;
            color: #666666 !important;
            font-weight: 600 !important;
            margin-right: 8px !important;
            white-space: nowrap !important;
        }
        
        .style-btn {
            flex-shrink: 0 !important;
            padding: 8px 14px !important;
            font-size: 12px !important;
            min-height: 38px !important;
            border-radius: 8px !important;
            font-weight: 600 !important;
            background: #ffffff !important;
            color: #666666 !important;
            border: 2px solid #e5e7eb !important;
            transition: all 0.2s ease !important;
            white-space: nowrap !important;
        }
        
        .style-btn:active {
            transform: scale(0.95) !important;
        }
        
        /* 风格按钮选中状态 - 绿色主题 */
        .style-btn.active,
        .style-btn[data-selected="true"] {
            background: #10b981 !important;
            color: #ffffff !important;
            border-color: #10b981 !important;
            box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3) !important;
        }
        
        /* 隐藏代码搜索 */
        .code-search-box {
            display: none;
        }
        
        /* 区域标题优化 - 美观统一 */
        .section-header {
            background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
            height: 48px !important;
            padding: 0 16px !important;
            border-radius: 10px 10px 0 0 !important;
            display: flex !important;
            align-items: center !important;
            justify-content: space-between !important;
            box-shadow: 0 2px 4px rgba(16, 185, 129, 0.1) !important;
        }
        
        .section-title {
            font-size: 15px !important;
            color: #ffffff !important;
            font-weight: 700 !important;
            display: flex !important;
            align-items: center !important;
            gap: 8px !important;
        }
        
        .section-title i {
            color: #ffffff !important;
            font-size: 17px !important;
        }
        
        /* 代码编辑区域 - 美观优化 */
        #htmlEditor {
            border-radius: 0 0 10px 10px !important;
            border: 2px solid #e5e7eb !important;
            border-top: none !important;
            padding: 16px !important;
            font-size: 14px !important;
            line-height: 1.6 !important;
            background: #ffffff !important;
            color: #333333 !important;
            min-height: 300px !important;
        }
        
        #htmlEditor:focus {
            border-color: #10b981 !important;
            outline: none !important;
            box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1) !important;
        }
        
        /* 预览区域 - 美观优化 */
        .preview-container {
            border-radius: 0 0 10px 10px !important;
            border: 2px solid #e5e7eb !important;
            border-top: none !important;
            background: #ffffff !important;
            min-height: 300px !important;
        }
        
        .preview-container iframe {
            border-radius: 0 0 10px 10px !important;
        }
        
        /* 编辑器 - 美观优化 */
        #htmlEditor {
            min-height: 300px !important;
            max-height: 400px !important;
            height: 300px !important;
            font-size: 14px !important;
            overflow-y: auto !important;
            -webkit-overflow-scrolling: touch !important;
            line-height: 1.6 !important;
            padding: 16px !important;
            border: 2px solid #e5e7eb !important;
            border-radius: 10px !important;
            background: #ffffff !important;
            color: #333333 !important;
            transition: all 0.2s ease !important;
        }
        
        #htmlEditor:focus {
            border-color: #10b981 !important;
            outline: none !important;
            box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1) !important;
        }
        
        /* 预览区域 - 美观优化 */
        .preview-container {
            min-height: 300px !important;
            max-height: 450px !important;
            height: 400px !important;
            overflow-y: auto !important;
            overflow-x: hidden !important;
            -webkit-overflow-scrolling: touch !important;
            position: relative !important;
            margin-bottom: 30px !important;
            border: 2px solid #e5e7eb !important;
            border-radius: 10px !important;
            background: #ffffff !important;
        }
        
        .preview-container iframe {
            border-radius: 10px !important;
        }
        
        #preview {
            min-height: 100% !important;
            height: 100% !important;
            width: 100% !important;
            overflow: visible !important; /* iframe内部内容可见 */
            border: none;
        }
        
        /* 隐藏侧边栏 */
        .editor-sidebar,
        .sidebar-overlay {
            display: none;
        }
        
        /* 移动端下拉菜单样式 - 默认完全隐藏 */
        .mobile-menu-dropdown {
            display: none !important;
            visibility: hidden !important;
            opacity: 0 !important;
            position: fixed;
            top: 48px;
            right: 10px;
            background: #2d2d30;
            border: 1px solid #3e3e42;
            border-radius: 8px;
            box-shadow: 0 4px 12px rgba(0,0,0,0.4);
            z-index: -1 !important;
            min-width: 160px;
            overflow: hidden;
        }
        
        /* 只在移动端且激活时显示 */
        @media (max-width: 768px) {
            .mobile-menu-dropdown {
                z-index: 1002 !important;
            }
            
            .mobile-menu-dropdown.active {
                display: block !important;
                visibility: visible !important;
                opacity: 1 !important;
                animation: slideDown 0.2s ease;
            }
        }
        
        @keyframes slideDown {
            from {
                opacity: 0;
                transform: translateY(-10px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
        
        .mobile-menu-item {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 12px 15px;
            color: #cccccc;
            font-size: 13px;
            border-bottom: 1px solid #3e3e42;
            cursor: pointer;
            transition: background 0.2s ease;
        }
        
        .mobile-menu-item:last-child {
            border-bottom: none;
        }
        
        .mobile-menu-item:active {
            background: #3e3e42;
        }
        
        .mobile-menu-item i {
            font-size: 14px;
            width: 18px;
            text-align: center;
            color: #10b981;
        }
        
        /* AI指令输入区域紧凑化 */
        .section-header {
            padding: 0 12px;
            height: 40px;
        }
        
        .section-title {
            font-size: 12px;
        }
        
        /* 风格选择器优化 */
        .style-selector {
            padding: 4px 8px !important;
            min-height: auto !important;
        }
        
        .style-selector-label {
            font-size: 10px !important;
            margin-right: 4px;
            white-space: nowrap !important;
        }
        
        .style-btn {
            padding: 4px 8px !important;
            font-size: 10px !important;
        }
        
        /* 搜索框紧凑化 */
        .code-search-box {
            padding: 6px 8px !important;
            margin-top: 8px !important;
        }
        
        .page-header {
            padding: 20px 0;
        }
        
        .page-header h1 {
            font-size: 1.8rem;
        }
        
        .page-header p {
            font-size: 1rem;
        }
        
        .feature-badges {
            gap: 6px;
        }
        
        .badge-feature {
            font-size: 0.75rem;
            padding: 4px 8px;
        }
        
        .status-info {
            flex-direction: column;
            gap: 6px;
            align-items: flex-start;
        }
        
        .editor-status-bar {
            padding: 6px 8px;
            font-size: 10px;
        }
        
        .section-title .btn {
            font-size: 0.75em;
            padding: 4px 8px;
        }
        
        #htmlEditor {
            min-height: 300px;
            max-height: none !important;
            font-size: 13px;
            padding: 10px;
        }
        
        .preview-container {
            min-height: 280px; /* 减少最小高度 */
            overflow: visible !important; /* 改为整页滚动 */
        }
        
        /* AI输入框和生成按钮优化 - 缩小版 */
        #textInputArea {
            display: flex !important;
            flex-wrap: wrap !important;
            gap: 4px !important;
            padding: 6px !important;
        }
        
        /* 输入框占第一行 */
        #textInputArea .ai-prompt-input {
            flex: 1 1 100% !important;
            padding: 8px !important;
            font-size: 13px !important;
            margin-bottom: 0 !important;
            min-height: 60px;
            line-height: 1.4;
            order: 1;
        }
        
        /* 三个按钮占第二行，横向排列 */
        #textInputArea .ai-generate-btn {
            flex: 1 1 32% !important;
            order: 2;
        }
        
        #textInputArea .ai-continue-btn {
            flex: 1 1 32% !important;
            order: 2;
        }
        
        #textInputArea .ai-new-conversation-btn {
            flex: 1 1 32% !important;
            order: 3;
        }
        
        #textInputArea .ai-conversation-dropdown {
            flex: 1 1 32% !important;
            order: 4;
        }
        
        /* 按钮样式 */
        .ai-generate-btn,
        .ai-continue-btn,
        .ai-new-conversation-btn,
        .ai-recent-btn {
            padding: 8px 4px !important;
            font-size: 11px !important;
            min-height: 34px;
            display: flex !important;
            align-items: center !important;
            justify-content: center !important;
        }
        
        .ai-generate-btn i,
        .ai-continue-btn i,
        .ai-new-conversation-btn i,
        .ai-recent-btn i:first-child {
            margin-right: 3px !important;
            font-size: 11px !important;
        }
        
        /* Section header 优化 */
        .section-header {
            flex-wrap: wrap;
            height: auto;
            min-height: 44px; /* 确保触摸目标足够大 */
            padding: 5px 8px;
        }
        
        .section-title {
            font-size: 11px;
            width: 100%;
            margin-bottom: 3px;
        }
        
        .section-title::before {
            width: 3px;
            height: 16px;
            margin-right: 6px;
        }
        
        /* 移动端只显示5个核心按钮 */
        .controls {
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
            padding: 8px;
            justify-content: space-between;
        }
        
        .controls .btn {
            padding: 10px 12px;
            font-size: 12px;
            min-width: 0;
            flex: 1 1 48%;
            white-space: nowrap;
            border-radius: 6px;
            font-weight: 500;
            text-align: center;
        }
        
        .controls .btn i {
            margin-right: 4px;
            font-size: 12px;
        }
        
        /* 一键发布按钮全宽显示 */
        .controls .btn-warning {
            flex: 1 1 100%;
            font-size: 14px;
            padding: 12px;
        }
        
        /* 编辑器 - 加大高度 */
        #htmlEditor {
            font-size: 13px;
            padding: 8px;
            min-height: 500px;
            max-height: none;
            line-height: 1.5;
            overflow-y: auto;
        }
        
        /* 预览区域 - 适中高度 */
        .preview-container {
            min-height: 350px; /* 适中高度，不覆盖输入框 */
            max-height: 400px; /* 设置最大高度 */
            overflow: auto;
            -webkit-overflow-scrolling: touch;
        }
        
        #preview {
            min-height: 350px; /* 适中预览框高度 */
        }
    }
    
    /* ==================== 超小屏幕手机优化 (480px 以下) - DeepSeek风格 ==================== */
    @media (max-width: 480px) {
        /* ========== DeepSeek聊天式布局样式 ========== */
        
        /* 隐藏原有编辑器双栏布局，改为聊天流 */
        .html-editor-container {
            display: none !important;
        }
        
        /* 隐藏旧的顶部工具栏 */
        .editor-top-bar {
            display: none !important;
        }
        
        /* 小屏幕全屏模式 */
        body {
            overflow: auto !important;
            -webkit-overflow-scrolling: touch;
            background: #f3f4f6 !important;
        }
        
        /* 隐藏底部导航 */
        footer, .footer, nav.navbar-bottom, .platform-footer {
            display: none !important;
        }
        
        .fullscreen-editor-wrapper {
            position: fixed !important;
            top: var(--dkfile-navbar-height, 80px) !important;
            left: 0 !important;
            right: 0 !important;
            bottom: 0 !important;
            width: 100% !important;
            height: calc(100vh - var(--dkfile-navbar-height, 80px)) !important;
            z-index: 1000 !important;
            display: flex !important;
            flex-direction: column !important;
            background: #f3f4f6 !important;
        }
        
        .html-editor-container {
            display: flex !important;
            flex-direction: column !important;
            height: 100% !important;
            overflow: visible !important;
        }
        
        .editor-section, .preview-section {
            padding: 5px;
            overflow: visible !important;
            height: auto !important;
            width: 100%;
        }
        
        .editor-section {
            min-height: 250px;
        }
        
        .preview-section {
            min-height: auto;
            flex: 0 0 auto;
        }
        
        /* ========== 顶部工具栏优化 - 只保留2个核心按钮 ========== */
        .editor-top-bar {
            padding: 8px !important;
            height: auto !important;
            min-height: 54px !important;
            background: #ffffff !important;
            border-bottom: 2px solid #10b981 !important;
            flex-wrap: nowrap !important;
        }
        
        .editor-title {
            font-size: 13px !important;
            color: #000000 !important;
            font-weight: 700 !important;
            display: flex !important;
        }
        
        .editor-title i {
            color: #10b981 !important;
            font-size: 16px !important;
        }
        
        /* 只显示2个核心按钮：草稿箱、一键发布 */
        .editor-actions {
            display: flex !important;
            gap: 8px !important;
            width: auto !important;
            margin-left: auto !important;
            flex-wrap: nowrap !important;
        }
        
        /* 手机端极简模式：隐藏所有非必要按钮 */
        .editor-btn[onclick*="toggleSidebar"],
        .editor-btn[onclick*="showTemplateLibrary"],
        .editor-btn[onclick*="fullscreenMode"],
        .editor-btn[onclick*="showInstructions"],
        .editor-btn[onclick*="showDraftList"],
        .mobile-menu-toggle {
            display: none !important;
        }
        
        /* 手机端只保留：保存草稿、下载、上传（发布）按钮 */
        .editor-btn[onclick*="saveDraft"],
        .editor-btn[onclick*="downloadHTML"],
        .editor-btn[onclick*="publishHTML"] {
            display: flex !important;
            flex: 1 !important;
            min-width: 0 !important;
            background: #ffffff !important;
            color: #10b981 !important;
            border: 2px solid #10b981 !important;
            font-weight: 600 !important;
            min-height: 46px !important;
            font-size: 14px !important;
            border-radius: 8px !important;
            padding: 12px 16px !important;
            flex-direction: row !important;
            align-items: center !important;
            justify-content: center !important;
            gap: 6px !important;
        }
        
        /* 上传（发布）按钮 - 绿底白字（更突出） */
        .editor-btn[onclick*="publishHTML"] {
            background: #10b981 !important;
            color: #ffffff !important;
            border: 2px solid #10b981 !important;
            font-weight: 700 !important;
            font-size: 15px !important;
            box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3) !important;
        }
        
        /* 按钮图标优化 */
        .editor-btn[onclick*="saveDraft"] i,
        .editor-btn[onclick*="downloadHTML"] i,
        .editor-btn[onclick*="publishHTML"] i {
            font-size: 16px !important;
            margin-right: 0 !important;
            margin-bottom: 0 !important;
        }
        
        /* 🔧 修复：确保按钮文字显示 */
        .editor-btn[onclick*="saveDraft"] span,
        .editor-btn[onclick*="downloadHTML"] span,
        .editor-btn[onclick*="publishHTML"] span {
            display: inline-block !important;
            visibility: visible !important;
            opacity: 1 !important;
            font-size: 14px !important;
            font-weight: 600 !important;
            white-space: nowrap !important;
        }
        
        /* 触摸反馈 */
        .editor-btn[onclick*="saveDraft"]:active,
        .editor-btn[onclick*="downloadHTML"]:active {
            background: #f0fdf4 !important;
            transform: scale(0.98) !important;
        }
        
        .editor-btn[onclick*="publishHTML"]:active {
            background: #059669 !important;
            transform: scale(0.98) !important;
        }
        
        /* ========== 风格选择器优化 - 统一绿色 ========== */
        .style-selector {
            gap: 8px !important;
            padding: 4px 0 !important;
            overflow-x: auto !important;
            -webkit-overflow-scrolling: touch !important;
        }
        
        .style-selector-label {
            font-size: 13px !important;
            color: #000000 !important;
            font-weight: 600 !important;
        }
        
        .style-btn {
            padding: 10px 14px !important;
            font-size: 13px !important;
            min-height: 42px !important;
            border-radius: 8px !important;
            font-weight: 600 !important;
            background: #ffffff !important;
            color: #666666 !important;
            border: 2px solid #e5e7eb !important;
        }
        
        /* 选中状态统一绿色 */
        .style-btn.active,
        .style-btn[data-selected="true"] {
            background: #10b981 !important;
            color: #ffffff !important;
            border-color: #10b981 !important;
        }
        
        /* ========== 输入源选择器优化 ========== */
        .input-source-btn {
            padding: 10px 8px !important;
            font-size: 13px !important;
            min-height: 42px !important;
            border-radius: 8px !important;
            font-weight: 600 !important;
            background: #ffffff !important;
            color: #666666 !important;
            border: 2px solid #e5e7eb !important;
        }
        
        /* 选中状态统一绿色 */
        .input-source-btn.active,
        .input-source-btn[data-active="true"] {
            background: #10b981 !important;
            color: #ffffff !important;
            border-color: #10b981 !important;
        }

        .input-source-btn.input-source-featured {
            background: #10b981 !important;
            color: #ffffff !important;
            border-color: #10b981 !important;
            box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35) !important;
        }
        .input-source-btn.input-source-featured.active {
            box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.35), 0 2px 10px rgba(16, 185, 129, 0.4) !important;
        }
        
        .input-source-btn i {
            font-size: 14px !important;
        }
        
        /* 搜索框按钮优化 */
        .search-btn {
            padding: 8px 10px !important;
            font-size: 11px !important;
        }
        
        .search-btn span {
            display: none; /* 隐藏"上一个""下一个"等文字 */
        }
        
        /* ========== Section header 优化 ========== */
        .section-header {
            background: #10b981 !important;
            height: 44px !important;
            padding: 0 12px !important;
        }
        
        .section-title {
            font-size: 14px !important;
            color: #ffffff !important;
            font-weight: 700 !important;
        }
        
        .section-title i {
            color: #ffffff !important;
            font-size: 16px !important;
        }
        
        .section-title::before {
            display: none !important;
        }
        
        /* ========== 下方控制按钮优化 ========== */
        .controls {
            display: flex !important;
            flex-wrap: wrap !important;
            gap: 10px !important;
            align-items: stretch !important;
            justify-content: center !important;
            width: 100% !important;
            padding: 10px !important;
            margin-top: 16px !important;
        }
        
        .controls .btn {
            padding: 14px 20px !important;
            font-size: 15px !important;
            min-width: 0 !important;
            flex: 1 !important;
            min-height: 48px !important;
            border-radius: 8px !important;
            font-weight: 700 !important;
            text-align: center !important;
            white-space: nowrap !important;
        }
        
        /* 统一配色 - 绿白黑 */
        .controls .btn-success {
            background: #ffffff !important;
            color: #10b981 !important;
            border: 2px solid #10b981 !important;
        }
        
        .controls .btn-warning {
            background: #10b981 !important;
            color: #ffffff !important;
            border: 2px solid #10b981 !important;
        }
        
        .controls .btn-outline-secondary {
            display: none !important; /* 隐藏次要按钮 */
        }
        
        /* 按钮图标 */
        .controls .btn i {
            margin-right: 6px !important;
            font-size: 16px !important;
        }
        
        /* 触摸反馈 */
        .controls .btn:active {
            transform: scale(0.98) !important;
            transition: transform 0.1s ease !important;
        }
        
        .controls .btn-success:active {
            background: #f0fdf4 !important;
        }
        
        .controls .btn-warning:active {
            background: #059669 !important;
        }
        
        .page-header h1 {
            font-size: 1.2rem;
        }
        
        .page-header p {
            font-size: 0.75rem;
        }
        
        /* 编辑器文本区域 - 缩小 */
        #htmlEditor {
            min-height: 200px;
            max-height: none !important;
            font-size: 13px;
            padding: 6px;
            line-height: 1.5;
            border-radius: 4px;
        }
        
        /* 预览区域 */
        .preview-container {
            min-height: 400px; /* 增大高度，充分利用空间 */
            max-height: 550px; /* 增大最大高度 */
            border-radius: 6px;
            overflow: auto !important; /* 独立滚动 */
            -webkit-overflow-scrolling: touch;
        }
        
        #preview {
            min-height: 400px; /* 增大预览框高度 */
        }
        
        /* ========== AI 输入区域优化 ========== */
        #textInputArea {
            display: flex !important;
            flex-wrap: wrap !important;
            gap: 8px !important;
            padding: 10px !important;
            border-radius: 8px !important;
        }
        
        /* 输入框占第一行 - 更大更清晰 */
        #textInputArea .ai-prompt-input {
            flex: 1 1 100% !important;
            font-size: 15px !important;
            padding: 12px !important;
            min-height: 56px !important;
            line-height: 1.6 !important;
            border-radius: 8px !important;
            border: 2px solid #e5e7eb !important;
            order: 1 !important;
            background: #ffffff !important;
            color: #000000 !important;
        }
        
        #textInputArea .ai-prompt-input:focus {
            border-color: #10b981 !important;
            outline: none !important;
        }
        
        /* 只保留2个按钮：生成、新对话 */
        #textInputArea .ai-generate-btn {
            flex: 2 !important;
            order: 2 !important;
        }
        
        #textInputArea .ai-new-conversation-btn {
            flex: 1 !important;
            order: 3 !important;
        }
        
        /* 隐藏继续按钮和最近对话 */
        #textInputArea .ai-continue-btn,
        #textInputArea .ai-conversation-dropdown,
        #textInputArea .ai-recent-btn {
            display: none !important;
        }
        
        /* 生成按钮 - 绿底白字 */
        .ai-generate-btn {
            padding: 14px 16px !important;
            font-size: 15px !important;
            min-height: 48px !important;
            border-radius: 8px !important;
            font-weight: 700 !important;
            background: #10b981 !important;
            color: #ffffff !important;
            border: none !important;
            display: flex !important;
            align-items: center !important;
            justify-content: center !important;
            white-space: nowrap !important;
        }
        
        /* 新对话按钮 - 白底绿字 */
        .ai-new-conversation-btn {
            padding: 14px 16px !important;
            font-size: 14px !important;
            min-height: 48px !important;
            border-radius: 8px !important;
            font-weight: 600 !important;
            background: #ffffff !important;
            color: #10b981 !important;
            border: 2px solid #10b981 !important;
            display: flex !important;
            align-items: center !important;
            justify-content: center !important;
            white-space: nowrap !important;
        }
        
        /* 按钮图标 */
        .ai-generate-btn i,
        .ai-new-conversation-btn i {
            margin-right: 6px !important;
            font-size: 16px !important;
        }
        
        /* 触摸反馈 */
        .ai-generate-btn:active {
            background: #059669 !important;
            transform: scale(0.98) !important;
        }
        
        .ai-new-conversation-btn:active {
            background: #f0fdf4 !important;
            transform: scale(0.98) !important;
        }
        
        /* Section 标题优化 */
        .section-title {
            font-size: 10px;
            flex-wrap: wrap;
        }
        
        .section-title i {
            font-size: 10px;
        }
        
        .section-title::before {
            display: none;
        }
        
        /* ========== DeepSeek聊天式样式 - 开始 ========== */
        
        /* 手机端强制隐藏PC端编辑器容器 - 优先级最高 */
        .html-editor-container {
            display: none !important;
        }
        
        .editor-top-bar {
            display: none !important;
        }
        
        /* 消息流布局（在原编辑器位置显示） */
        .fullscreen-editor-wrapper {
            background: #f3f4f6 !important;
            display: flex !important;
            flex-direction: column !important;
            overflow-y: auto !important;
            -webkit-overflow-scrolling: touch !important;
            position: fixed !important;
            top: var(--dkfile-navbar-height, 80px) !important;
            left: 0 !important;
            right: 0 !important;
            bottom: 0 !important;
            width: 100% !important;
            height: calc(100vh - var(--dkfile-navbar-height, 80px)) !important;
            z-index: 1000 !important;
        }
        
        /* 确保消息容器可见 */
        #mobileMessagesContainer {
            display: flex !important;
            flex-direction: column !important;
            flex: 1 !important;
            overflow-y: auto !important;
            padding: 0 !important;
            padding-bottom: 20px !important;
            -webkit-overflow-scrolling: touch !important;
            min-height: 0 !important;
        }
        
        /* 手机端输入框聚焦样式 */
        #mobileUserInput:focus {
            background: #ffffff !important;
            box-shadow: 0 0 0 2px #10b981 !important;
        }
        
        #mobileUserInput::placeholder {
            color: #9ca3af !important;
        }
        
        /* textarea 自动换行和滚动 */
        #mobileUserInput {
            font-family: inherit !important;
            vertical-align: top !important;
        }
        
        /* 隐藏输入框滚动条 */
        #mobileUserInput::-webkit-scrollbar {
            display: none !important;
            width: 0 !important;
            height: 0 !important;
        }
        
        /* 消息气泡样式 */
        .message {
            margin-bottom: 16px !important;
            display: flex !important;
            flex-direction: column !important;
            animation: messageSlideIn 0.3s ease !important;
        }
        
        @keyframes messageSlideIn {
            from {
                opacity: 0;
                transform: translateY(10px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
        
        /* 用户消息 */
        .message.user {
            align-items: flex-end !important;
        }
        
        .message.user .bubble {
            background: #10b981 !important;
            color: white !important;
            border-radius: 16px !important;
            padding: 12px 16px !important;
            max-width: 80% !important;
            box-shadow: none !important;
        }
        
        /* AI消息 */
        .message.ai {
            align-items: flex-start !important;
        }
        
        .message.ai .bubble {
            background: white !important;
            color: #000 !important;
            border-radius: 16px !important;
            padding: 16px !important;
            max-width: 95% !important;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
        }
        
        .message.ai.full-width-card {
            width: 100% !important;
            margin: 0 !important;
            padding: 0 !important;
        }
        
        .message.ai.full-width-card .bubble {
            background: transparent !important;
            box-shadow: none !important;
            padding: 0 !important;
            max-width: 100% !important;
            width: 100% !important;
            border-radius: 0 !important;
        }
        
        /* 思考过程卡片 */
        .mobile-thinking-card {
            background: #f0fdf4 !important;
            border: none !important;
            border-radius: 12px !important;
            padding: 16px !important;
            margin-bottom: 12px !important;
        }
        
        .mobile-thinking-title {
            display: flex !important;
            align-items: center !important;
            gap: 8px !important;
            color: #059669 !important;
            font-weight: 600 !important;
            margin-bottom: 12px !important;
            font-size: 15px !important;
        }
        
        .mobile-thinking-steps {
            display: flex !important;
            flex-direction: column !important;
            gap: 8px !important;
        }
        
        .mobile-thinking-step {
            display: flex !important;
            align-items: center !important;
            gap: 8px !important;
            color: #065f46 !important;
            font-size: 14px !important;
        }
        
        .mobile-thinking-step i {
            color: #10b981 !important;
            font-size: 12px !important;
        }
        
        /* 代码卡片扁平化 */
        .mobile-code-card {
            background: #1e1e1e !important;
            border-radius: 8px !important;
            overflow: hidden !important;
            margin-top: 12px !important;
        }
        
        .mobile-code-header {
            background: #2d2d2d !important;
            padding: 10px 16px !important;
            display: flex !important;
            justify-content: space-between !important;
            align-items: center !important;
            flex-wrap: wrap !important;
            gap: 8px !important;
        }
        
        .mobile-code-lang {
            color: #10b981 !important;
            font-size: 13px !important;
            font-weight: 600 !important;
        }
        
        .mobile-code-actions {
            display: flex !important;
            gap: 6px !important;
        }
        
        .mobile-code-btn {
            background: #10b981 !important;
            color: white !important;
            border: none !important;
            padding: 10px 14px !important;
            border-radius: 8px !important;
            font-size: 13px !important;
            font-weight: 600 !important;
            display: flex !important;
            align-items: center !important;
            gap: 5px !important;
            box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2) !important;
        }
        
        .mobile-code-btn.secondary {
            background: #ffffff !important;
            color: #10b981 !important;
            border: 2px solid #10b981 !important;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
        }
        
        .mobile-code-btn.upload {
            background: #ffffff !important;
            color: #10b981 !important;
            border: 2px solid #10b981 !important;
        }
        
        .mobile-code-btn.generate {
            background: #10b981 !important;
            color: white !important;
        }
        
        .mobile-code-content {
            padding: 16px !important;
            color: #d4d4d4 !important;
            font-size: 13px !important;
            line-height: 1.6 !important;
            /* 完全展开，无滚动条 */
        }
        
        /* 结果信息卡片 */
        .mobile-result-card {
            background: transparent;
            border-radius: 8px;
            padding: 0;
            box-shadow: none;
            border: none;
            display: flex;
            flex-direction: column;
            gap: 12px;
            width: 100%;
        }
        
        .mobile-result-section {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }
        
        .mobile-result-section-title {
            display: flex;
            align-items: center;
            justify-content: space-between;
            font-size: 14px;
            font-weight: 600;
            color: #064e3b;
            gap: 10px;
        }
        
        .mobile-result-section-title button {
            background: #10b981;
            border: none;
            color: #ffffff;
            padding: 6px 12px;
            border-radius: 999px;
            font-size: 12px;
            font-weight: 600;
            display: inline-flex;
            align-items: center;
            gap: 4px;
            box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
        }
        
        .mobile-result-preview {
            border: 1px dashed rgba(16, 185, 129, 0.5);
            background: rgba(16, 185, 129, 0.06);
            border-radius: 12px;
            padding: 10px 12px;
            cursor: pointer;
            transition: all 0.2s ease;
        }
        
        .mobile-result-preview:hover {
            background: rgba(16, 185, 129, 0.1);
            border-color: #10b981;
        }
        
        .mobile-result-preview-hint {
            display: flex;
            align-items: center;
            justify-content: space-between;
            color: #065f46;
            font-size: 13px;
            font-weight: 500;
        }
        
        .mobile-result-summary-box {
            background: #f8f9fa;
            border-radius: 10px;
            padding: 10px 12px;
            border: 1px solid #e5e7eb;
        }
        
        .mobile-result-summary-list {
            list-style: none;
            margin: 0;
            padding: 0;
            display: flex;
            flex-direction: column;
            gap: 6px;
            color: #374151;
            font-size: 13px;
            line-height: 1.5;
        }
        
        .mobile-result-summary-list li::before {
            content: '•';
            color: #10b981;
            margin-right: 6px;
        }
        
        /* 全屏预览层 */
        .mobile-fullscreen-preview {
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, 0.75);
            z-index: 100000;
            display: flex;
            justify-content: center;
            align-items: center;
        }
        
        .mobile-preview-panel {
            background: #ffffff;
            width: 100%;
            height: 100%;
            display: flex;
            flex-direction: column;
        }
        
        .mobile-preview-toolbar {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            padding: 12px 16px;
            border-bottom: 1px solid #e5e7eb;
            gap: 12px;
            flex-wrap: wrap;
            background: #ffffff;
        }
        
        .mobile-preview-controls {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            flex-wrap: wrap;
            flex-shrink: 0;
        }
        
        .mobile-preview-title {
            display: flex;
            flex-direction: column;
            color: #065f46;
            font-size: 14px;
            font-weight: 600;
            min-width: 0;
            flex: 1 1 auto;
            max-width: 100%;
        }
        
        .mobile-preview-title strong {
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        
        .mobile-preview-title small {
            font-size: 11px;
            margin-top: 2px;
            color: #6b7280;
        }
        
        /* 手机端响应式优化 */
        @media (max-width: 480px) {
            .mobile-preview-toolbar {
                padding: 10px 12px;
                gap: 8px;
            }
            
            .mobile-preview-title {
                font-size: 13px;
            }
            
            .mobile-preview-title small {
                font-size: 10px;
            }
            
            .mobile-preview-controls {
                gap: 6px;
            }
            
            .mobile-preview-tabs {
                padding: 3px;
                gap: 3px;
            }
            
            .mobile-preview-tabs button {
                padding: 5px 12px;
                font-size: 12px;
            }
            
            .mobile-preview-publish {
                padding: 6px 12px;
                font-size: 12px;
            }
            
            .mobile-preview-publish span {
                display: inline;
            }
            
            .mobile-preview-close {
                width: 32px;
                height: 32px;
                font-size: 18px;
            }
        }
        
        /* 小屏手机优化（iPhone SE、小屏Android等） */
        @media (max-width: 375px) {
            .mobile-preview-toolbar {
                padding: 8px 10px;
                gap: 6px;
                flex-wrap: wrap;
                align-items: center;
            }
            
            .mobile-preview-title {
                font-size: 12px;
                min-width: 0;
                flex: 1 1 auto;
                max-width: calc(100% - 200px); /* 为控件预留空间 */
            }
            
            .mobile-preview-title strong {
                font-size: 12px;
                line-height: 1.3;
                overflow: hidden;
                text-overflow: ellipsis;
                white-space: nowrap;
            }
            
            .mobile-preview-title small {
                font-size: 9px;
                margin-top: 2px;
                line-height: 1.2;
            }
            
            .mobile-preview-controls {
                gap: 4px;
                flex-shrink: 0;
                align-items: center;
            }
            
            .mobile-preview-tabs {
                padding: 2px;
                gap: 2px;
                flex-shrink: 0;
            }
            
            .mobile-preview-tabs button {
                padding: 4px 10px;
                font-size: 11px;
                font-weight: 600;
            }
            
            .mobile-preview-publish {
                padding: 5px 10px;
                font-size: 11px;
                gap: 4px;
                flex-shrink: 0;
            }
            
            .mobile-preview-publish i {
                font-size: 11px;
            }
            
            .mobile-preview-publish span {
                display: inline;
                font-size: 11px;
            }
            
            .mobile-preview-close {
                width: 28px;
                height: 28px;
                font-size: 16px;
                flex-shrink: 0;
            }
            
            .mobile-preview-code {
                padding: 12px;
                font-size: 11px;
            }
        }
        
        /* 超小屏手机优化（iPhone 5、小屏设备等） */
        @media (max-width: 320px) {
            .mobile-preview-toolbar {
                padding: 6px 8px;
                gap: 4px;
            }
            
            .mobile-preview-title {
                font-size: 11px;
            }
            
            .mobile-preview-title strong {
                font-size: 11px;
            }
            
            .mobile-preview-title small {
                font-size: 8px;
                display: none; /* 超小屏隐藏提示文字 */
            }
            
            .mobile-preview-controls {
                gap: 3px;
            }
            
            .mobile-preview-tabs {
                padding: 2px;
                gap: 1px;
            }
            
            .mobile-preview-tabs button {
                padding: 3px 8px;
                font-size: 10px;
            }
            
            .mobile-preview-publish {
                padding: 4px 8px;
                font-size: 10px;
                gap: 3px;
            }
            
            .mobile-preview-publish .mobile-publish-text {
                display: none; /* 超小屏只显示图标 */
            }
            
            .mobile-preview-publish {
                padding: 4px 8px;
            }
            
            .mobile-preview-close {
                width: 26px;
                height: 26px;
                font-size: 14px;
            }
            
            .mobile-preview-code {
                padding: 10px;
                font-size: 10px;
            }
        }
        
        .mobile-preview-tabs {
            display: inline-flex;
            background: #ecfdf5;
            border-radius: 999px;
            padding: 4px;
            gap: 4px;
        }
        
        .mobile-preview-tabs button {
            border: none;
            background: transparent;
            color: #065f46;
            font-size: 13px;
            font-weight: 600;
            padding: 6px 14px;
            border-radius: 999px;
        }
        
        .mobile-preview-tabs button.active {
            background: #10b981;
            color: #ffffff;
            box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3);
        }
        
        .mobile-preview-publish {
            border: none;
            background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
            color: #000000;
            padding: 8px 16px;
            border-radius: 999px;
            font-size: 13px;
            font-weight: 700;
            display: inline-flex;
            align-items: center;
            gap: 6px;
            box-shadow: 0 4px 12px rgba(251, 191, 36, 0.4);
            cursor: pointer;
            transition: all 0.2s;
            white-space: nowrap;
        }
        
        .mobile-preview-publish:active {
            transform: scale(0.97);
            box-shadow: 0 2px 8px rgba(251, 191, 36, 0.5);
        }
        
        .mobile-preview-publish:hover {
            transform: translateY(-1px);
            box-shadow: 0 6px 16px rgba(251, 191, 36, 0.5);
        }
        
        .mobile-preview-close {
            border: 1px solid rgba(15, 23, 42, 0.15);
            background: #ffffff;
            width: 36px;
            height: 36px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 20px;
            font-weight: 700;
            font-family: 'HarmonyOS Sans SC', 'PingFang SC', 'Microsoft YaHei', Arial, sans-serif;
            color: #0f172a !important;
            cursor: pointer;
            line-height: 1;
            box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
        }
        
        .mobile-preview-body {
            flex: 1;
            position: relative;
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }
        
        .mobile-preview-body iframe {
            width: 100%;
            height: 100%;
            border: none;
            background: #ffffff;
            flex: 1 1 auto;
        }
        
        .mobile-preview-code {
            display: none;
            flex: 1 1 auto;
            width: 100%;
            height: 100%;
            overflow-y: auto;
            overflow-x: auto;
            padding: 16px;
            background: #0f172a;
            color: #e2e8f0;
            font-family: 'Fira Code', 'Consolas', monospace;
            font-size: 13px;
            line-height: 1.5;
            white-space: pre-wrap;
            -webkit-overflow-scrolling: touch;
        }
        
        .mobile-preview-code code {
            display: block;
            min-width: 100%;
        }
        
        /* 加载状态样式优化 */
        #mobilePreviewLoading {
            display: flex;
            align-items: center;
            justify-content: center;
            height: 100%;
            color: #6b7280;
            font-size: 14px;
            background: #ffffff;
        }
        
        #mobilePreviewLoading i {
            font-size: 24px;
            margin-bottom: 8px;
            display: block;
            color: #10b981;
        }
        
        #mobilePreviewLoading div {
            text-align: center;
        }
        
        /* 小屏优化加载状态 */
        @media (max-width: 375px) {
            #mobilePreviewLoading {
                font-size: 12px;
            }
            
            #mobilePreviewLoading i {
                font-size: 20px;
                margin-bottom: 6px;
            }
        }
        
        @media (max-width: 320px) {
            #mobilePreviewLoading {
                font-size: 11px;
            }
            
            #mobilePreviewLoading i {
                font-size: 18px;
                margin-bottom: 4px;
            }
        }
        
        @media (min-width: 769px) {
            .mobile-preview-panel {
                width: min(960px, 95%);
                height: 90%;
                border-radius: 18px;
                overflow: hidden;
                box-shadow: 0 25px 80px rgba(0, 0, 0, 0.25);
            }
        }
        
        /* 侧边栏完全隐藏 */
        .editor-sidebar,
        .sidebar-overlay {
            display: none !important;
        }
        
        /* ========== 输入方式切换样式 ========== */
        
        /* 输入方式切换按钮 */
        .mobile-input-mode-btn {
            background: #f3f4f6 !important;
            border: none !important;
            width: 40px !important;
            height: 40px !important;
            border-radius: 50% !important;
            display: flex !important;
            align-items: center !important;
            justify-content: center !important;
            color: #6b7280 !important;
            font-size: 18px !important;
            flex-shrink: 0 !important;
        }
        
        .mobile-input-mode-btn.active {
            background: #10b981 !important;
            color: white !important;
        }
        
        /* 输入方式选择器弹窗 */
        .mobile-input-mode-selector {
            position: absolute !important;
            bottom: 100% !important;
            left: 16px !important;
            right: 16px !important;
            background: white !important;
            border-radius: 12px !important;
            box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15) !important;
            margin-bottom: 8px !important;
            padding: 12px !important;
            display: none !important;
        }
        
        .mobile-input-mode-selector.active {
            display: block !important;
        }
        
        .mobile-mode-options {
            display: grid !important;
            grid-template-columns: repeat(3, 1fr) !important;
            gap: 8px !important;
        }
        
        .mobile-mode-option {
            background: #f3f4f6 !important;
            border: 2px solid #e5e7eb !important;
            border-radius: 8px !important;
            padding: 16px 8px !important;
            text-align: center !important;
        }
        
        .mobile-mode-option.selected {
            background: #d1fae5 !important;
            border-color: #10b981 !important;
        }
        
        .mobile-mode-option-icon {
            font-size: 24px !important;
            color: #10b981 !important;
            margin-bottom: 6px !important;
        }
        
        .mobile-mode-option-text {
            font-size: 13px !important;
            color: #374151 !important;
            font-weight: 600 !important;
            display: block !important;
            visibility: visible !important;
            opacity: 1 !important;
            line-height: 1.2 !important;
            margin-top: 4px !important;
        }
        
        /* 确保选中状态下文字也可见 */
        .mobile-mode-option.selected .mobile-mode-option-text {
            color: #065f46 !important;
        }
        
        /* ========== DeepSeek样式结束 ========== */
        
        .sidebar-section {
            padding: 12px;
        }
        
        .sidebar-title {
            font-size: 11px;
        }
        
        .sidebar-content {
            font-size: 12px;
        }
        
        /* 侧边栏遮罩层在移动端 */
        .sidebar-overlay {
            z-index: 1000;
        }
        
        /* 模态框优化 - 移动端全屏显示 */
        .template-library-modal {
            width: 100vw !important;
            max-width: 100vw !important;
            height: 100vh !important;
            max-height: 100vh !important;
            margin: 0 !important;
            border-radius: 0 !important;
        }
        
        .template-library-content {
            max-height: calc(100vh - 80px) !important;
            padding: 15px !important;
        }
        
        .template-card {
            min-height: auto !important;
        }
        
        /* 虚拟键盘弹出时的优化 */
        .editor-section textarea:focus,
        .ai-prompt-input:focus {
            position: relative;
            z-index: 10;
        }
        
        /* 防止虚拟键盘遮挡输入框 - 使用更智能的方式 */
        @supports (-webkit-touch-callout: none) {
            /* iOS Safari - 使用 Visual Viewport API 优化 */
            .ai-prompt-input:focus {
                /* 移除固定 transform，改用 JavaScript 动态调整 */
            }
        }
        
        /* Android 和其他浏览器 - 确保输入框可见 */
        .ai-prompt-input:focus {
            /* 确保输入框在视口内 */
            scroll-margin-bottom: 300px;
        }
        
        .preview-section {
            overflow: visible !important;
        }
    }
    
    /* 移动端横屏优化 */
    @media (max-width: 768px) and (orientation: landscape) {
        .editor-top-bar {
            height: 44px;
            min-height: 44px;
            padding: 0 8px;
        }
        
        .editor-btn {
            padding: 6px 8px;
            min-width: 32px;
            min-height: 44px; /* 确保触摸目标足够大 */
        }
        
        .editor-btn i {
            font-size: 13px;
        }
        
        .section-header {
            height: 32px;
            padding: 0 10px;
        }
        
        .section-title {
            font-size: 11px;
        }
    }
    
    /* 移动端触摸优化 */
    @media (hover: none) and (pointer: coarse) {
        /* 移除所有悬停效果，改为点击效果 */
        .editor-btn:hover,
        .style-btn:hover,
        .input-source-btn:hover {
            transform: none;
        }
        
        .editor-btn:active,
        .style-btn:active,
        .input-source-btn:active {
            transform: scale(0.95);
            transition: transform 0.1s ease;
        }
        
        /* 增大触摸区域 */
        .editor-btn,
        .style-btn,
        .input-source-btn {
            min-height: 44px; /* iOS人机界面指南建议的最小触摸目标 */
        }
        
        /* 优化文字输入区域 */
        #htmlEditor,
        .ai-prompt-input {
            font-size: 14px !important; /* 防止iOS自动缩放 */
        }
        
        /* 预览区域触摸滚动优化 */
        .preview-container,
        #preview {
            -webkit-overflow-scrolling: touch;
            scroll-behavior: smooth;
        }
    }
    
    /* 移动端预览区域额外优化 - 已整合到上方样式，删除此冲突规则 */
    
    /* 移动端输入源选择器优化 - 手机端极简模式：完全隐藏 */
    @media (max-width: 768px) {
        /* 手机端极简模式：隐藏输入源选择器 */
        .input-source-selector {
            display: none !important;
            visibility: hidden !important;
            height: 0 !important;
            margin: 0 !important;
            padding: 0 !important;
            overflow: hidden !important;
        }
        
        .input-source-btn {
            display: none !important;
            visibility: hidden !important;
            height: 0 !important;
            overflow: hidden !important;
        }
        
        .input-source-btn i {
            display: none !important;
        }
        
        /* 隐藏提示文字 */
        #inputSourceHint {
            display: none !important;
        }
        
        /* 手机端隐藏编辑按钮 */
        .mobile-edit-btn {
            display: none !important;
        }
    }
    
    @media (max-width: 480px) {
        /* 手机端极简模式：完全隐藏输入源选择器 */
        .input-source-selector {
            display: none !important;
            visibility: hidden !important;
            height: 0 !important;
            margin: 0 !important;
            padding: 0 !important;
            overflow: hidden !important;
        }
        
        .input-source-btn {
            display: none !important;
            visibility: hidden !important;
            height: 0 !important;
            overflow: hidden !important;
        }
        
        .input-source-btn i {
            display: none !important;
        }
        
        /* 手机端隐藏编辑按钮 */
        .mobile-edit-btn {
            display: none !important;
        }
    }

/* H5 访客额度条（对齐电脑端 aicode-quota-strip.is-empty；挂在 #mobileH5InputBar） */
.mobile-guest-quota-bar {
    display: none;
    flex: 1 1 100%;
    width: 100%;
    box-sizing: border-box;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 0;
    padding: 8px 12px;
    border-radius: 12px;
    border: 1px solid rgba(16, 185, 129, 0.22);
    background: #f0fdf4;
    color: #065f46;
    font-size: 12px;
    line-height: 1.35;
    order: -1;
}

.mobile-guest-quota-bar.is-empty {
    border-color: rgba(239, 68, 68, 0.28);
    background: #fef2f2;
    color: #b91c1c;
}

.mobile-guest-quota-text {
    flex: 1;
    min-width: 0;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mobile-guest-quota-bar.is-empty .mobile-guest-quota-text {
    color: #b91c1c;
}

a.mobile-guest-quota-login {
    flex-shrink: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    border-radius: 999px;
    background: #10b981;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none !important;
    white-space: nowrap;
}

a.mobile-guest-quota-login:link,
a.mobile-guest-quota-login:visited,
a.mobile-guest-quota-login:hover,
a.mobile-guest-quota-login:focus,
a.mobile-guest-quota-login:active {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff;
    text-decoration: none !important;
}

#mobileH5InputBar.is-guest-quota-empty #mobileUserInput {
    border-color: #fca5a5 !important;
    background: #fff7f7 !important;
}

#mobileH5InputBar.is-guest-quota-empty #mobileSendButton {
    background: linear-gradient(135deg, #9ca3af 0%, #6b7280 100%) !important;
    box-shadow: 0 2px 8px rgba(107, 114, 128, 0.28) !important;
    opacity: 0.92;
}
