douyinWEB/frontend/src/app/globals.css
eric 60ea916a4d feat: 全站 H5 响应式导航与可选 PWA 安装
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-14 22:19:06 -05:00

388 lines
6.5 KiB
CSS

@tailwind base;
@tailwind components;
@tailwind utilities;
:root {
--bg0: #071018;
--bg1: #0f1c2e;
--line: rgba(255, 255, 255, 0.08);
--text: #edf3ff;
--muted: #93a4bd;
--accent: #ff2d55;
--teal: #2dd4bf;
--amber: #fbbf24;
}
html,
body {
min-height: 100%;
min-height: 100dvh;
overflow-x: clip;
}
body {
margin: 0;
color: var(--text);
font-family: "IBM Plex Sans", "Noto Sans SC", sans-serif;
background:
radial-gradient(1100px 520px at 8% -8%, rgba(255, 45, 85, 0.2), transparent 55%),
radial-gradient(900px 480px at 92% 0%, rgba(45, 212, 191, 0.14), transparent 52%),
radial-gradient(700px 400px at 50% 100%, rgba(56, 189, 248, 0.06), transparent 60%),
linear-gradient(160deg, #071018 0%, #0f1c2e 45%, #0a1422 100%);
background-attachment: fixed;
-webkit-tap-highlight-color: transparent;
text-size-adjust: 100%;
}
@media (max-width: 767px) {
body {
background-attachment: scroll;
}
.ambient-orb {
opacity: 0.22;
filter: blur(48px);
animation: none;
}
}
@media (prefers-reduced-motion: reduce) {
.ambient-orb,
.animate-fade-up,
.animate-fade-in,
.stagger > *,
.page-enter {
animation: none !important;
}
}
* {
box-sizing: border-box;
}
img,
video,
canvas,
svg {
max-width: 100%;
height: auto;
}
/* Edge-to-edge horizontal scroll for wide tables on phones */
.table-scroll {
margin-left: -0.75rem;
margin-right: -0.75rem;
padding-left: 0.75rem;
padding-right: 0.75rem;
overflow-x: auto;
-webkit-overflow-scrolling: touch;
overscroll-behavior-x: contain;
}
@media (min-width: 640px) {
.table-scroll {
margin-left: 0;
margin-right: 0;
padding-left: 0;
padding-right: 0;
}
}
.touch-target {
min-height: 2.75rem;
min-width: 2.75rem;
}
input,
select,
textarea,
button {
font-size: 16px; /* avoid iOS zoom on focus */
}
@media (min-width: 640px) {
input,
select,
textarea,
button {
font-size: inherit;
}
}
::selection {
background: rgba(255, 45, 85, 0.35);
color: #fff;
}
/* ambient drifting orbs */
.ambient-orb {
position: fixed;
border-radius: 9999px;
filter: blur(60px);
pointer-events: none;
z-index: 0;
opacity: 0.45;
animation: orb-drift 18s ease-in-out infinite;
}
.ambient-orb.a {
width: 280px;
height: 280px;
left: -40px;
top: 120px;
background: rgba(255, 45, 85, 0.35);
}
.ambient-orb.b {
width: 220px;
height: 220px;
right: -30px;
top: 40%;
background: rgba(45, 212, 191, 0.28);
animation-delay: -6s;
animation-duration: 22s;
}
.ambient-orb.c {
width: 180px;
height: 180px;
left: 40%;
bottom: -40px;
background: rgba(56, 189, 248, 0.2);
animation-delay: -11s;
animation-duration: 26s;
}
@keyframes orb-drift {
0%,
100% {
transform: translate3d(0, 0, 0) scale(1);
}
50% {
transform: translate3d(24px, -18px, 0) scale(1.08);
}
}
@keyframes fade-up {
from {
opacity: 0;
transform: translateY(14px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
@keyframes fade-in {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
@keyframes pulse-ring {
0% {
transform: scale(0.85);
opacity: 0.7;
}
70% {
transform: scale(1.55);
opacity: 0;
}
100% {
transform: scale(1.55);
opacity: 0;
}
}
@keyframes live-blink {
0%,
100% {
opacity: 1;
}
50% {
opacity: 0.35;
}
}
@keyframes shimmer {
0% {
background-position: -200% 0;
}
100% {
background-position: 200% 0;
}
}
@keyframes marquee {
from {
transform: translateX(0);
}
to {
transform: translateX(-50%);
}
}
@keyframes float-y {
0%,
100% {
transform: translateY(0);
}
50% {
transform: translateY(-6px);
}
}
@keyframes draw-stroke {
from {
stroke-dashoffset: 120;
}
to {
stroke-dashoffset: 0;
}
}
.animate-fade-up {
animation: fade-up 0.55s ease both;
}
.animate-fade-in {
animation: fade-in 0.4s ease both;
}
.stagger > * {
animation: fade-up 0.5s ease both;
}
.stagger > *:nth-child(1) {
animation-delay: 0.02s;
}
.stagger > *:nth-child(2) {
animation-delay: 0.06s;
}
.stagger > *:nth-child(3) {
animation-delay: 0.1s;
}
.stagger > *:nth-child(4) {
animation-delay: 0.14s;
}
.stagger > *:nth-child(5) {
animation-delay: 0.18s;
}
.stagger > *:nth-child(6) {
animation-delay: 0.22s;
}
.stagger > *:nth-child(7) {
animation-delay: 0.26s;
}
.stagger > *:nth-child(8) {
animation-delay: 0.3s;
}
.live-dot {
position: relative;
display: inline-flex;
width: 0.55rem;
height: 0.55rem;
border-radius: 9999px;
background: #ff2d55;
box-shadow: 0 0 0 0 rgba(255, 45, 85, 0.5);
}
.live-dot::after {
content: "";
position: absolute;
inset: -3px;
border-radius: 9999px;
border: 1.5px solid rgba(255, 45, 85, 0.7);
animation: pulse-ring 1.6s ease-out infinite;
}
.glass-panel {
border: 1px solid rgba(255, 255, 255, 0.1);
background: linear-gradient(160deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
backdrop-filter: blur(10px);
}
.btn-glow {
transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn-glow:hover {
transform: translateY(-1px);
box-shadow: 0 8px 24px rgba(255, 45, 85, 0.25);
}
.nav-chip {
position: relative;
overflow: hidden;
transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}
.nav-chip:hover {
transform: translateY(-1px);
}
.nav-chip.active::before {
content: "";
position: absolute;
inset: 0;
background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
background-size: 200% 100%;
animation: shimmer 2.4s linear infinite;
}
.ticker-track {
display: flex;
width: max-content;
animation: marquee 28s linear infinite;
}
.ticker-track:hover {
animation-play-state: paused;
}
.float-slow {
animation: float-y 4.5s ease-in-out infinite;
}
.logo-stroke {
fill: none;
stroke: #2dd4bf;
stroke-width: 2.2;
stroke-linecap: round;
stroke-linejoin: round;
stroke-dasharray: 120;
animation: draw-stroke 1.4s ease forwards;
}
.page-enter {
/* opacity-only: avoid transform so nested `fixed` overlays stay viewport-bound */
animation: fade-in 0.35s ease both;
}
.hover-lift {
transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}
.hover-lift:hover {
transform: translateY(-3px);
border-color: rgba(45, 212, 191, 0.35);
}
.timeline-rail {
position: relative;
}
.timeline-rail::before {
content: "";
position: absolute;
left: 11px;
top: 8px;
bottom: 8px;
width: 2px;
background: linear-gradient(180deg, rgba(45, 212, 191, 0.5), rgba(255, 45, 85, 0.15), transparent);
}