/* 自定义样式 - 补充Tailwind CSS */ /* 全局样式 */ * { box-sizing: border-box; } body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.6; background: #f9fafb; } /* 自定义scrollbar */ ::-webkit-scrollbar { width: 8px; height: 8px; } ::-webkit-scrollbar-track { background: #f1f5f9; border-radius: 4px; } ::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; } ::-webkit-scrollbar-thumb:hover { background: #94a3b8; } /* 文件拖拽区域样式 - 增强视觉效果 */ #fileDropZone { transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); cursor: pointer; position: relative; overflow: hidden; } #fileDropZone::before { content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%; background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.1), transparent); transition: left 0.6s; } #fileDropZone:hover::before { left: 100%; } #fileDropZone.drag-over { border-color: #3b82f6 !important; background: linear-gradient(135deg, #dbeafe 0%, #eff6ff 100%) !important; transform: scale(1.02); box-shadow: 0 10px 25px rgba(59, 130, 246, 0.15); } /* 按钮增强效果 */ button { transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); position: relative; overflow: hidden; } button:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); } button:active:not(:disabled) { transform: translateY(0); } button:disabled { opacity: 0.6; cursor: not-allowed; } /* 按钮加载效果 */ button.loading::after { content: ''; position: absolute; top: 50%; left: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; border: 2px solid transparent; border-top-color: currentColor; border-radius: 50%; animation: spin 1s linear infinite; } /* 卡片悬停效果 */ .bg-white { transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); } .bg-white:hover { box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1); transform: translateY(-2px); } /* 文件项样式 */ .file-item { transition: all 0.2s ease; border: 1px solid transparent; } .file-item:hover { background: #f8fafc; border-color: #e2e8f0; transform: translateX(4px); } /* 进度条样式 */ .progress-bar { background: linear-gradient(90deg, #10b981, #059669); border-radius: 8px; position: relative; overflow: hidden; } .progress-bar::after { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent); animation: shimmer 2s infinite; } @keyframes shimmer { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } } /* 状态指示器增强 */ .status-indicator { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 8px; position: relative; } .status-connected { background: #10b981; box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2); } .status-connecting { background: #f59e0b; animation: pulse-status 2s infinite; } .status-disconnected { background: #ef4444; } @keyframes pulse-status { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.7; transform: scale(1.2); } } /* 输入框增强 */ input[type="text"], input[type="file"] { transition: all 0.2s ease; } input[type="text"]:focus { transform: translateY(-1px); box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1); } /* 取件码显示增强 */ #pickupCodeDisplay { position: relative; background: linear-gradient(135deg, #10b981, #059669); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; } /* 微交互和动画效果 */ @keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } } @keyframes fadeInDown { from { opacity: 0; transform: translateY(-30px); } to { opacity: 1; transform: translateY(0); } } @keyframes slideInRight { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: translateX(0); } } @keyframes slideInLeft { from { opacity: 0; transform: translateX(-30px); } to { opacity: 1; transform: translateX(0); } } @keyframes scaleIn { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } } @keyframes pulse-slow { 0%, 100% { opacity: 1; } 50% { opacity: 0.7; } } .fade-in-up { animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1); } .fade-in-down { animation: fadeInDown 0.6s cubic-bezier(0.4, 0, 0.2, 1); } .slide-in-right { animation: slideInRight 0.6s cubic-bezier(0.4, 0, 0.2, 1); } .slide-in-left { animation: slideInLeft 0.6s cubic-bezier(0.4, 0, 0.2, 1); } .scale-in { animation: scaleIn 0.4s cubic-bezier(0.4, 0, 0.2, 1); } /* 页面加载动画 */ .animate-on-scroll { opacity: 0; transform: translateY(20px); transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1); } .animate-on-scroll.visible { opacity: 1; transform: translateY(0); } /* 悬停时的微妙变化 */ .hover-lift { transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); } .hover-lift:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15); } /* 点击反馈 */ .click-feedback { position: relative; overflow: hidden; } .click-feedback::after { content: ''; position: absolute; top: 50%; left: 50%; width: 0; height: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.5); transform: translate(-50%, -50%); transition: width 0.6s, height 0.6s; } .click-feedback:active::after { width: 300px; height: 300px; } /* 渐变文字效果 */ .gradient-text { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; } /* 成功/错误提示动画增强 */ @keyframes bounce { 0%, 20%, 53%, 80%, 100% { transform: translate3d(0,0,0); } 40%, 43% { transform: translate3d(0, -20px, 0); } 70% { transform: translate3d(0, -10px, 0); } 90% { transform: translate3d(0, -4px, 0); } } .success-bounce { animation: bounce 1s ease; } @keyframes shake { 0%, 100% { transform: translateX(0); } 10%, 30%, 50%, 70%, 90% { transform: translateX(-8px); } 20%, 40%, 60%, 80% { transform: translateX(8px); } } .error-shake { animation: shake 0.5s ease-in-out; } /* 加载状态增强 */ @keyframes spin { to { transform: rotate(360deg); } } @keyframes loading-dots { 0%, 20% { color: rgba(0, 0, 0, 0.4); text-shadow: 0.25em 0 0 rgba(0, 0, 0, 0.2), 0.5em 0 0 rgba(0, 0, 0, 0.2); } 40% { color: rgba(0, 0, 0, 1); text-shadow: 0.25em 0 0 rgba(0, 0, 0, 0.4), 0.5em 0 0 rgba(0, 0, 0, 0.2); } 60% { text-shadow: 0.25em 0 0 rgba(0, 0, 0, 1), 0.5em 0 0 rgba(0, 0, 0, 0.4); } 80%, 100% { text-shadow: 0.25em 0 0 rgba(0, 0, 0, 1), 0.5em 0 0 rgba(0, 0, 0, 1); } } .loading-dots::after { content: '...'; animation: loading-dots 1.4s infinite; } /* 卡片阴影层次 */ .shadow-soft { box-shadow: 0 2px 15px -3px rgba(0, 0, 0, 0.07), 0 10px 20px -2px rgba(0, 0, 0, 0.04); } .shadow-medium { box-shadow: 0 4px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); } .shadow-strong { box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.25); } /* 焦点状态增强 */ .focus-ring { transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); } .focus-ring:focus { outline: none; box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1); border-color: #3b82f6; } /* 连接状态指示器 */ .connection-pulse { position: relative; } .connection-pulse::before { content: ''; position: absolute; top: 50%; left: 50%; width: 100%; height: 100%; border-radius: 50%; background: currentColor; opacity: 0.3; transform: translate(-50%, -50%); animation: pulse-ring 2s infinite; } @keyframes pulse-ring { 0% { transform: translate(-50%, -50%) scale(0.8); opacity: 0.3; } 50% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.1; } 100% { transform: translate(-50%, -50%) scale(1.4); opacity: 0; } } /* 响应式设计优化 */ @media (max-width: 640px) { .container { padding-left: 0.75rem; padding-right: 0.75rem; } .lg\\:grid-cols-2 { grid-template-columns: 1fr; gap: 1.5rem; } .text-3xl { font-size: 1.75rem; line-height: 2rem; } .text-2xl { font-size: 1.25rem; line-height: 1.75rem; } .text-xl { font-size: 1.125rem; line-height: 1.75rem; } .px-6 { padding-left: 1rem; padding-right: 1rem; } .py-6 { padding-top: 1rem; padding-bottom: 1rem; } .px-4 { padding-left: 0.75rem; padding-right: 0.75rem; } .py-4 { padding-top: 0.75rem; padding-bottom: 0.75rem; } #fileDropZone { padding: 1.5rem 1rem; } .rounded-2xl { border-radius: 1rem; } .rounded-xl { border-radius: 0.75rem; } /* 移动端按钮优化 */ button { min-height: 44px; touch-action: manipulation; } /* 移动端输入框优化 */ input[type="text"] { font-size: 16px; /* 防止iOS Safari缩放 */ min-height: 44px; } /* 移动端文件项优化 */ .file-item { padding: 1rem; } .file-item .w-10 { width: 2.5rem; height: 2.5rem; } .file-item .w-12 { width: 2.5rem; height: 2.5rem; } /* 移动端进度条优化 */ #transferProgress .px-6 { padding-left: 1rem; padding-right: 1rem; } /* 移动端通知优化 */ .notification { left: 1rem; right: 1rem; top: 1rem; width: auto; transform: translateY(-100%); } .notification.show { transform: translateY(0); } } @media (max-width: 768px) { .max-w-6xl { max-width: 100%; } .grid.lg\\:grid-cols-2 { grid-template-columns: 1fr; gap: 1.5rem; } #transferProgress { margin-top: 1.5rem; } /* 平板端优化 */ .text-3xl { font-size: 2rem; line-height: 2.25rem; } } /* 大屏幕优化 */ @media (min-width: 1280px) { .max-w-6xl { max-width: 80rem; } .container { padding-left: 2rem; padding-right: 2rem; } } /* 深色模式支持 */ @media (prefers-color-scheme: dark) { body { background: #111827; color: #f9fafb; } .bg-gray-50 { background: #111827; } .bg-white { background: #1f2937; color: #f9fafb; } .text-gray-600 { color: #d1d5db; } .text-gray-700 { color: #f3f4f6; } .text-gray-900 { color: #f9fafb; } .border-gray-100 { border-color: #374151; } .border-gray-200 { border-color: #4b5563; } .border-gray-300 { border-color: #6b7280; } input[type="text"] { background: #374151; color: #f9fafb; border-color: #4b5563; } input[type="text"]:focus { border-color: #10b981; background: #1f2937; } #fileDropZone { background: #1f2937; border-color: #4b5563; } #fileDropZone:hover { background: #374151; border-color: #6b7280; } } /* 打印样式优化 */ @media print { body { background: white !important; color: black !important; } .bg-white, .bg-gray-50 { background: white !important; box-shadow: none !important; } button, .no-print { display: none !important; } .rounded-2xl { border-radius: 0; border: 1px solid #ccc; } } /* 高对比度支持 */ @media (prefers-contrast: high) { button { border: 2px solid currentColor; font-weight: bold; } .border { border-width: 2px; } input[type="text"] { border-width: 2px; } #fileDropZone { border-width: 3px; } } /* 减少动画支持 */ @media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; } .fade-in-up, .fade-in-down, .slide-in-right, .slide-in-left { animation: none !important; } } /* 辅助功能增强 */ @media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } } /* Focus可见性增强 */ button:focus-visible, input:focus-visible, details:focus-visible { outline: 2px solid #3b82f6; outline-offset: 2px; } /* 高分辨率屏幕优化 */ @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) { .status-indicator { border-radius: 50%; background-clip: padding-box; } } /* 触摸设备优化 */ @media (hover: none) and (pointer: coarse) { button { min-height: 44px; min-width: 44px; } input[type="text"] { font-size: 16px; /* 防止iOS缩放 */ } .hover\\:bg-blue-600:hover { background-color: #2563eb; } } /* 工具提示样式增强 */ .tooltip { position: relative; display: inline-block; } .tooltip::after { content: attr(data-tooltip); position: absolute; bottom: 125%; left: 50%; transform: translateX(-50%); background: #1f2937; color: white; padding: 0.5rem 0.75rem; border-radius: 0.375rem; font-size: 0.75rem; white-space: nowrap; opacity: 0; visibility: hidden; transition: all 0.2s ease; z-index: 1000; } .tooltip::before { content: ''; position: absolute; bottom: 115%; left: 50%; transform: translateX(-50%); border: 5px solid transparent; border-top-color: #1f2937; opacity: 0; visibility: hidden; transition: all 0.2s ease; } .tooltip:hover::after, .tooltip:hover::before { opacity: 1; visibility: visible; } /* 加载状态样式 */ .skeleton { background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%); background-size: 200% 100%; animation: loading 1.5s infinite; } @keyframes loading { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } } /* 通知样式 */ .notification { position: fixed; top: 20px; right: 20px; background: white; border-radius: 0.75rem; box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1); border: 1px solid #e5e7eb; padding: 1rem 1.5rem; z-index: 1000; transform: translateX(100%); transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); } .notification.show { transform: translateX(0); } .notification.success { border-left: 4px solid #10b981; } .notification.error { border-left: 4px solid #ef4444; } .notification.warning { border-left: 4px solid #f59e0b; } .notification.info { border-left: 4px solid #3b82f6; } /* 自定义选择样式 */ ::selection { background: #3b82f6; color: white; } ::-moz-selection { background: #3b82f6; color: white; } /* 代码块样式优化 */ pre, code { font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', 'Source Code Pro', monospace; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 0.5rem; padding: 0.25rem 0.5rem; font-size: 0.875rem; } pre { padding: 1rem; overflow-x: auto; white-space: pre-wrap; word-wrap: break-word; line-height: 1.5; } /* 标签页样式 */ .tab-button { position: relative; transition: all 0.3s ease; } .tab-button::after { content: ''; position: absolute; bottom: -2px; left: 0; right: 0; height: 2px; background: currentColor; transform: scaleX(0); transition: transform 0.3s ease; } .tab-button.active::after { transform: scaleX(1); } .tab-button:hover { transform: translateY(-1px); } .tab-content { opacity: 0; transform: translateY(10px); transition: all 0.3s ease; } .tab-content.active { opacity: 1; transform: translateY(0); } .tab-content.hidden { display: none !important; } /* 标签页切换动画 */ @keyframes tab-slide-in { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } } .tab-content.active { animation: tab-slide-in 0.3s ease; } /* 取件码点击效果 */ #pickupCodeDisplay, #pickupLinkDisplay { cursor: pointer; transition: all 0.2s ease; } #pickupCodeDisplay:hover, #pickupLinkDisplay:hover { background: rgba(34, 197, 94, 0.1); transform: scale(1.02); } /* 成功反馈动画 */ .success-bounce { animation: success-bounce 0.6s ease; color: #16a34a !important; } @keyframes success-bounce { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } } /* 紧凑布局优化 */ .text-xs { font-size: 0.75rem; line-height: 1rem; } /* 选择文本样式 */ .select-all { user-select: all; } /* 固定Header样式 */ .fixed { position: fixed; } .backdrop-blur-sm { backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); } .bg-white\/95 { background-color: rgba(255, 255, 255, 0.95); } .z-50 { z-index: 50; } /* 主内容区域顶部边距 */ .pt-20 { padding-top: 5rem; } /* Header动画 */ .fixed-header { transition: all 0.3s ease; } /* 页面滚动时Header阴影 */ .header-shadow { box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); }