@tailwind base; @tailwind components; @tailwind utilities; /* NProgress 进度条样式 */ #nprogress { pointer-events: none; } #nprogress .bar { background: #3b82f6; position: fixed; z-index: 9999; top: 0; left: 0; width: 100%; height: 3px; box-shadow: 0 0 10px rgba(59, 130, 246, 0.8), 0 0 5px rgba(59, 130, 246, 0.6); } #nprogress .peg { display: block; position: absolute; right: 0px; width: 100px; height: 100%; box-shadow: 0 0 10px rgba(59, 130, 246, 0.8), 0 0 5px rgba(59, 130, 246, 0.6); opacity: 1.0; transform: rotate(3deg) translate(0px, -4px); } /* 暗色模式下的进度条样式 */ .dark #nprogress .bar { background: #60a5fa; box-shadow: 0 0 10px rgba(96, 165, 250, 0.8), 0 0 5px rgba(96, 165, 250, 0.6); } .dark #nprogress .peg { box-shadow: 0 0 10px rgba(96, 165, 250, 0.8), 0 0 5px rgba(96, 165, 250, 0.6); } @layer utilities { .scrollbar-hide { -ms-overflow-style: none; /* IE and Edge */ scrollbar-width: none; /* Firefox */ } .scrollbar-hide::-webkit-scrollbar { display: none; /* Chrome, Safari and Opera */ } } :root { --foreground-rgb: 255, 255, 255; } html, body { height: 100%; overflow-x: hidden; /* 阻止 iOS Safari 拉动回弹 */ overscroll-behavior: none; } body { color: rgb(var(--foreground-rgb)); } html:not(.dark) body { background: linear-gradient( 180deg, #e6f3fb 0%, #eaf3f7 18%, #f7f7f3 38%, #e9ecef 60%, #dbe3ea 80%, #d3dde6 100% ); background-attachment: fixed; } /* 自定义滚动条样式 */ ::-webkit-scrollbar { width: 8px; height: 8px; } ::-webkit-scrollbar-track { background: rgba(31, 41, 55, 0.1); } ::-webkit-scrollbar-thumb { background: rgba(75, 85, 99, 0.3); border-radius: 4px; } ::-webkit-scrollbar-thumb:hover { background: rgba(107, 114, 128, 0.5); } /* 视频卡片悬停效果 */ .video-card-hover { transition: transform 0.3s ease; } .video-card-hover:hover { transform: scale(1.05); } /* 渐变遮罩 */ .gradient-overlay { background: linear-gradient( to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.8) 100% ); } /* 隐藏移动端(<768px)垂直滚动条 */ @media (max-width: 767px) { html, body { -ms-overflow-style: none; /* IE & Edge */ scrollbar-width: none; /* Firefox */ } html::-webkit-scrollbar, body::-webkit-scrollbar { display: none; /* Chrome Safari */ } } /* 隐藏所有滚动条(兼容 WebKit、Firefox、IE/Edge) */ * { -ms-overflow-style: none; /* IE & Edge */ scrollbar-width: none; /* Firefox */ } *::-webkit-scrollbar { display: none; /* Chrome, Safari, Opera */ } /* View Transitions API 动画 */ @keyframes slide-from-top { from { clip-path: polygon(0 0, 100% 0, 100% 0, 0 0); } to { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); } } @keyframes slide-from-bottom { from { clip-path: polygon(0 100%, 100% 100%, 100% 100%, 0 100%); } to { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); } } ::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.8s; animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1); animation-fill-mode: both; } /* 切换时,旧的视图不应该有动画,它应该在下面,等待被新的视图覆盖。 这可以防止在动画完成前,页面底部提前变色。 */ ::view-transition-old(root) { animation: none; } /* 从浅色到深色:新内容(深色)从顶部滑入 */ html.dark::view-transition-new(root) { animation-name: slide-from-top; } /* 从深色到浅色:新内容(浅色)从底部滑入 */ html:not(.dark)::view-transition-new(root) { animation-name: slide-from-bottom; } /* 强制播放器内部的 video 元素高度为 100%,并保持内容完整显示 */ div[data-media-provider] video { height: 100%; object-fit: contain; } .art-poster { background-size: contain !important; /* 使图片完整展示 */ background-position: center center !important; /* 居中显示 */ background-repeat: no-repeat !important; /* 防止重复 */ background-color: #000 !important; /* 其余区域填充为黑色 */ } /* 隐藏移动端竖屏时的 pip 按钮 */ @media (max-width: 768px) { .art-control-pip { display: none !important; } .art-control-fullscreenWeb { display: none !important; } .art-control-volume { display: none !important; } } /* 水波纹缩放动画 - 第一层 (快速扩散) */ @keyframes ping-scale { 0% { transform: scale(1); opacity: 0.6; } 75%, 100% { transform: scale(2); opacity: 0; } } /* 水波纹缩放动画 - 第二层 (慢速脉冲) */ @keyframes pulse-scale { 0%, 100% { transform: scale(1); opacity: 0.4; } 50% { transform: scale(1.15); opacity: 0.2; } } /* 主体徽章缩放动画 */ @keyframes badge-scale { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } } @keyframes reader-book-flip { 0%, 100% { transform: perspective(120px) rotateY(0deg) translateY(0); } 30% { transform: perspective(120px) rotateY(-24deg) translateY(-2px); } 60% { transform: perspective(120px) rotateY(24deg) translateY(0); } } .reader-book-loader { display: flex; align-items: center; justify-content: center; color: #0284c7; animation: reader-book-flip 1.5s ease-in-out infinite; transform-origin: center; } .dark .reader-book-loader { color: #38bdf8; } /* TV 端遥控器焦点:深色选中 + 放大,而不是细边框 */ .tv-focusable { position: relative; scroll-margin-top: 150px; scroll-margin-bottom: 96px; scroll-margin-left: 48px; scroll-margin-right: 48px; transform-origin: center; scale: 1; transition: scale 180ms ease, background-color 180ms ease, color 180ms ease, box-shadow 180ms ease, opacity 180ms ease; } .tv-focusable:focus, .tv-focusable:focus-visible, .tv-focused { outline: none !important; scale: 1.055; background-color: rgba(15, 23, 42, 0.96) !important; color: #ffffff !important; box-shadow: 0 18px 44px rgba(0, 0, 0, 0.68), 0 0 26px rgba(225, 29, 72, 0.38) !important; z-index: 30; } .tv-focusable:focus::after, .tv-focusable:focus-visible::after, .tv-focused::after { content: ''; position: absolute; inset: -3px; border-radius: inherit; background: linear-gradient(135deg, rgba(255,255,255,0.22), rgba(225,29,72,0.28)); opacity: 0.45; pointer-events: none; } .tv-focusable:active { scale: 1.03; } @media (prefers-reduced-motion: reduce) { .tv-focusable, .tv-focusable:focus, .tv-focusable:focus-visible, .tv-focused { transition: none; } }