@charset "UTF-8"; /** * YCat Editor 移动端专项优化 * 解决编辑器侧边栏/裁剪弹窗/按钮布局等移动端问题 */ /* ===== 编辑器页面移动端优化 ===== */ @media (max-width: 768px) { /* 编辑器主布局改为单列 */ .editor-layout { flex-direction: column !important; } /* 编辑器主体占满宽度 */ .editor-main { width: 100% !important; max-width: 100% !important; padding: 12px !important; } /* 侧边栏移到底部,作为抽屉 */ .editor-sidebar { width: 100% !important; max-width: 100% !important; max-height: 60vh; overflow-y: auto; border-top: 1px solid var(--border); border-left: none !important; position: fixed; bottom: 0; left: 0; right: 0; z-index: 100; transform: translateY(100%); transition: transform 0.3s ease; background: var(--surface); border-radius: 16px 16px 0 0; box-shadow: 0 -4px 20px rgba(0,0,0,0.15); } .editor-sidebar.open { transform: translateY(0); } /* 侧边栏切换按钮 */ .sidebar-toggle-btn { display: flex !important; position: fixed; bottom: 20px; right: 20px; z-index: 101; width: 56px; height: 56px; border-radius: 50%; background: var(--brand); color: white; border: none; box-shadow: 0 4px 16px rgba(99, 102, 241, 0.4); font-size: 24px; align-items: center; justify-content: center; cursor: pointer; transition: all 0.2s; } .sidebar-toggle-btn:hover { transform: scale(1.1); } /* 平台选择网格改为 4 列 */ .platforms-grid { grid-template-columns: repeat(4, 1fr) !important; gap: 8px !important; } .platform-item { padding: 6px !important; } .platform-icon { width: 28px !important; height: 28px !important; font-size: 12px !important; } .platform-name { font-size: 10px !important; } /* AI 助手按钮改为 2 列 */ .ai-actions-grid { display: grid !important; grid-template-columns: 1fr 1fr !important; gap: 8px !important; } .ai-action-btn { padding: 10px 12px !important; font-size: 12px !important; } /* 裁剪弹窗全屏 */ .crop-modal-content { max-width: 100% !important; width: 95% !important; max-height: 90vh; overflow-y: auto; padding: 16px !important; border-radius: 16px !important; } .crop-container { max-height: 50vh !important; } /* 裁剪比例按钮缩小 */ .crop-ratios { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; } .crop-ratios button { padding: 6px 12px !important; font-size: 12px !important; } /* 编辑器工具栏简化 */ .editor-toolbar { flex-wrap: wrap; gap: 6px; padding: 8px !important; } .editor-toolbar button { padding: 8px 12px !important; font-size: 12px !important; } /* 标题输入框 */ .title-input { font-size: 20px !important; padding: 12px !important; } /* 封面上传区域 */ .cover-upload-area { padding: 20px !important; min-height: 150px !important; } /* 内容统计面板 */ .content-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; font-size: 12px; } } /* ===== 移动端导航系统 ===== */ @media (max-width: 900px) { /* 导航栏:可水平滚动 + 左右渐变边缘提示 */ .header .nav-links { overflow-x: auto !important; overflow-y: hidden !important; white-space: nowrap !important; flex-wrap: nowrap !important; scrollbar-width: none !important; -ms-overflow-style: none !important; -webkit-mask-image: linear-gradient(to right, transparent 0px, black 20px, black calc(100% - 20px), transparent 100%) !important; mask-image: linear-gradient(to right, transparent 0px, black 20px, black calc(100% - 20px), transparent 100%) !important; padding: 0 20px !important; flex: 1 !important; min-width: 0 !important; } .header .nav-links::-webkit-scrollbar { display: none !important; } .header .nav-links a { flex-shrink: 0 !important; padding: 8px 10px !important; font-size: 13px !important; } /* Header 紧凑模式 */ .header { padding: 0 12px !important; height: auto !important; min-height: 56px !important; flex-wrap: nowrap !important; overflow: hidden !important; } .header-left { flex: 0 0 auto !important; min-width: 0 !important; } .header-right { flex-shrink: 0 !important; } /* Logo 缩小 */ .logo-text { font-size: 16px !important; } .logo-icon { font-size: 22px !important; } /* 用户信息紧凑 */ .user-info { gap: 6px !important; } .user-name, .user-plan { display: none !important; } .user-avatar { width: 32px !important; height: 32px !important; font-size: 14px !important; } .logout-btn { padding: 4px 8px !important; font-size: 12px !important; } .theme-toggle { width: 32px !important; height: 32px !important; font-size: 16px !important; } } /* 超小屏幕 logo 也隐藏文字 */ @media (max-width: 600px) { .logo-text { display: none !important; } .header { padding: 0 8px !important; } } /* ===== 悬浮返回顶部按钮 ===== */ .back-to-top { position: fixed; bottom: 24px; right: 24px; width: 48px; height: 48px; border-radius: 50%; background: var(--brand); color: white; border: none; box-shadow: 0 4px 16px rgba(124, 106, 247, 0.4); font-size: 20px; cursor: pointer; z-index: 9999; display: flex; align-items: center; justify-content: center; transition: all 0.3s ease; opacity: 0; pointer-events: none; transform: translateY(20px); } .back-to-top.visible { opacity: 1; pointer-events: auto; transform: translateY(0); } .back-to-top:hover { transform: scale(1.1); box-shadow: 0 6px 20px rgba(124, 106, 247, 0.5); } /* ===== 移动端快速操作浮动条 ===== */ .mobile-quick-bar { display: none; } @media (max-width: 768px) { .mobile-quick-bar { display: flex !important; position: fixed; bottom: 0; left: 0; right: 0; z-index: 200; background: var(--header-bg); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-top: 1px solid var(--border); padding: 8px 12px; padding-bottom: max(8px, env(safe-area-inset-bottom)); gap: 8px; box-shadow: 0 -4px 20px rgba(0,0,0,0.1); } .mobile-quick-bar button { flex: 1; padding: 10px 8px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font-size: 12px; font-weight: 600; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 3px; transition: all 0.2s; } .mobile-quick-bar button:active { background: var(--brand-dim); color: var(--brand); } .mobile-quick-bar .save-btn { background: var(--brand); color: white; border-color: var(--brand); } .mobile-quick-bar .save-btn:active { background: var(--brand-hover); } /* 编辑器底部留白,给快速操作条让位 */ .editor-layout { padding-bottom: 80px !important; } } /* ===== 超小屏幕 (< 400px) 优化 ===== */ @media (max-width: 400px) { .platforms-grid { grid-template-columns: repeat(3, 1fr) !important; } .ai-actions-grid { grid-template-columns: 1fr !important; } .sidebar-toggle-btn { width: 48px; height: 48px; bottom: 16px; right: 16px; font-size: 20px; } } /* ===== 分发页面移动端优化 ===== */ @media (max-width: 768px) { .distribute-header { padding: 12px !important; } .distribute-title { font-size: 18px !important; } .platform-checkbox-grid { grid-template-columns: 1fr !important; gap: 12px !important; } .platform-checkbox-item { padding: 12px !important; } .distribute-actions { flex-direction: column; gap: 8px !important; } .distribute-actions button { width: 100%; } } /* ===== 文章管理页移动端优化 ===== */ @media (max-width: 768px) { .articles-header { flex-direction: column; align-items: stretch !important; gap: 12px !important; padding: 12px !important; } .articles-search { width: 100% !important; } .articles-actions { flex-wrap: wrap; gap: 8px; } .article-item { padding: 12px !important; } .article-meta { flex-direction: column; align-items: flex-start !important; gap: 8px !important; } .article-actions { width: 100%; justify-content: flex-end; gap: 8px !important; } } /* ===== 设置页面移动端优化 ===== */ @media (max-width: 768px) { .settings-layout { flex-direction: column !important; } .settings-nav { width: 100% !important; flex-direction: row !important; overflow-x: auto; white-space: nowrap; padding: 8px !important; gap: 8px !important; border-right: none !important; border-bottom: 1px solid var(--border); } .settings-nav-item { padding: 8px 16px !important; font-size: 12px !important; } .settings-content { padding: 12px !important; } } /* ===== 媒体库移动端优化 ===== */ @media (max-width: 768px) { .media-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 8px !important; } .media-item { padding: 8px !important; } .media-item img { max-height: 120px !important; } } /* ===== 日历页面移动端优化 ===== */ @media (max-width: 768px) { .calendar-grid { font-size: 12px !important; } .calendar-day { min-height: 60px !important; padding: 4px !important; } .calendar-event { font-size: 10px !important; padding: 2px 4px !important; } } /* ===== 通用移动端优化 ===== */ @media (max-width: 768px) { /* 弹窗全屏 */ .modal { max-width: 95% !important; max-height: 90vh !important; } /* 统计卡片 */ .stats-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 12px !important; } .stat-card { padding: 12px !important; } .stat-value { font-size: 24px !important; } /* 图表容器高度 */ .chart-container { height: 200px !important; } /* 分页 */ .pagination { font-size: 12px !important; } .pagination button { padding: 8px 12px !important; min-width: 36px !important; } /* Tab 切换 */ .tabs { overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; } .tab-item { padding: 10px 16px !important; font-size: 13px !important; } } /* ===== 触摸设备特殊优化 ===== */ @media (hover: none) and (pointer: coarse) { /* 增大点击区域 */ .platform-item { min-height: 44px; } .ai-action-btn { min-height: 44px; } /* 防止双击缩放 */ button, a, .clickable { touch-action: manipulation; } /* 滚动优化 */ .editor-sidebar { -webkit-overflow-scrolling: touch; } /* 快速点击反馈 */ button:active, .btn:active { transform: scale(0.98); opacity: 0.9; } } /* ===== 横屏模式优化 ===== */ @media (max-width: 768px) and (orientation: landscape) { .editor-sidebar { max-height: 50vh; } .crop-container { max-height: 40vh !important; } }