Files
file-transfer-go/web/static/css/style.css
MatrixSeven 70ad644a71 第一版本
2025-07-28 16:33:10 +08:00

358 lines
6.1 KiB
CSS

/* 自定义样式 - 补充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;
}
/* 响应式设计优化 */
@media (max-width: 640px) {
.max-w-7xl {
padding-left: 1rem;
padding-right: 1rem;
}
nav .flex {
flex-direction: column;
align-items: flex-start;
height: auto;
padding: 1rem 0;
}
nav .space-x-4 {
margin-top: 1rem;
width: 100%;
display: flex;
justify-content: space-around;
}
.grid.md\\:grid-cols-2 {
grid-template-columns: 1fr;
gap: 1rem;
}
.grid.md\\:grid-cols-3 {
grid-template-columns: 1fr;
gap: 1rem;
}
.text-4xl {
font-size: 2rem;
}
.text-3xl {
font-size: 1.5rem;
}
}
@media (max-width: 768px) {
.lg\\:grid-cols-2 {
grid-template-columns: 1fr;
}
.lg\\:max-w-md {
max-width: 100%;
}
}
/* 文件拖拽区域样式 */
#dropZone {
transition: all 0.3s ease;
cursor: pointer;
}
#dropZone:hover {
border-color: #3b82f6;
background-color: #eff6ff;
}
#dropZone.drag-over {
border-color: #3b82f6 !important;
background-color: #dbeafe !important;
transform: scale(1.02);
}
/* 进度条动画 */
#progressBar {
transition: width 0.3s ease-in-out;
}
/* 视频元素样式 */
video {
background-color: #000;
border-radius: 0.5rem;
}
video::-webkit-media-controls {
display: none !important;
}
/* 聊天消息滚动条样式 */
#chatMessages {
scrollbar-width: thin;
scrollbar-color: #cbd5e0 #f7fafc;
}
#chatMessages::-webkit-scrollbar {
width: 6px;
}
#chatMessages::-webkit-scrollbar-track {
background: #f7fafc;
border-radius: 3px;
}
#chatMessages::-webkit-scrollbar-thumb {
background: #cbd5e0;
border-radius: 3px;
}
#chatMessages::-webkit-scrollbar-thumb:hover {
background: #a0aec0;
}
/* 按钮悬停效果优化 */
button {
transition: all 0.2s ease-in-out;
}
button:hover {
transform: translateY(-1px);
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
button:active {
transform: translateY(0);
}
/* 卡片悬停效果 */
.bg-white {
transition: box-shadow 0.3s ease;
}
.bg-white:hover {
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}
/* 加载动画 */
@keyframes spin {
to {
transform: rotate(360deg);
}
}
.loading {
animation: spin 1s linear infinite;
}
/* 渐入动画 */
@keyframes fadeIn {
from {
opacity: 0;
transform: translateY(20px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.fade-in {
animation: fadeIn 0.5s ease-out;
}
/* 成功提示动画 */
@keyframes bounce {
0%, 20%, 53%, 80%, 100% {
transform: translate3d(0,0,0);
}
40%, 43% {
transform: translate3d(0, -30px, 0);
}
70% {
transform: translate3d(0, -15px, 0);
}
90% {
transform: translate3d(0, -4px, 0);
}
}
.success-bounce {
animation: bounce 1s ease;
}
/* 错误提示样式 */
.error-shake {
animation: shake 0.5s ease-in-out;
}
@keyframes shake {
0%, 100% {
transform: translateX(0);
}
10%, 30%, 50%, 70%, 90% {
transform: translateX(-10px);
}
20%, 40%, 60%, 80% {
transform: translateX(10px);
}
}
/* 文件图标样式 */
.file-icon {
font-size: 2rem;
margin-right: 0.75rem;
}
/* 状态指示器 */
.status-indicator {
width: 12px;
height: 12px;
border-radius: 50%;
display: inline-block;
margin-right: 8px;
}
.status-connected {
background-color: #10b981;
box-shadow: 0 0 10px #10b981;
}
.status-connecting {
background-color: #f59e0b;
animation: pulse 2s infinite;
}
.status-disconnected {
background-color: #ef4444;
}
@keyframes pulse {
0% {
opacity: 1;
}
50% {
opacity: 0.5;
}
100% {
opacity: 1;
}
}
/* 代码块样式 */
pre, code {
font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
background-color: #f8f9fa;
border: 1px solid #e9ecef;
border-radius: 4px;
padding: 0.25rem 0.5rem;
font-size: 0.875rem;
}
pre {
padding: 1rem;
overflow-x: auto;
white-space: pre-wrap;
word-wrap: break-word;
}
/* 工具提示样式 */
.tooltip {
position: relative;
display: inline-block;
}
.tooltip .tooltiptext {
visibility: hidden;
width: 120px;
background-color: #555;
color: white;
text-align: center;
border-radius: 6px;
padding: 5px;
position: absolute;
z-index: 1;
bottom: 125%;
left: 50%;
margin-left: -60px;
opacity: 0;
transition: opacity 0.3s;
font-size: 0.75rem;
}
.tooltip:hover .tooltiptext {
visibility: visible;
opacity: 1;
}
/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
body {
background-color: #1f2937;
color: #f9fafb;
}
.bg-white {
background-color: #374151;
color: #f9fafb;
}
.bg-gray-50 {
background-color: #111827;
}
.text-gray-600 {
color: #d1d5db;
}
.text-gray-900 {
color: #f9fafb;
}
.border-gray-300 {
border-color: #4b5563;
}
}
/* 打印样式 */
@media print {
nav, footer, button, .no-print {
display: none !important;
}
body {
background: white !important;
color: black !important;
}
.bg-white {
background: white !important;
box-shadow: none !important;
}
}
/* 高对比度支持 */
@media (prefers-contrast: high) {
button {
border: 2px solid currentColor;
}
.border {
border-width: 2px;
}
}
/* 减少动画支持 */
@media (prefers-reduced-motion: reduce) {
*, *::before, *::after {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
}
}