@import "tailwindcss"; :root { --background: 0 0% 100%; --foreground: 222.2 84% 4.9%; --card: 0 0% 100%; --card-foreground: 222.2 84% 4.9%; --popover: 0 0% 100%; --popover-foreground: 222.2 84% 4.9%; --primary: 217.2 91.2% 59.8%; --primary-foreground: 0 0% 100%; --secondary: 210 40% 96.1%; --secondary-foreground: 222.2 47.4% 11.2%; --muted: 210 40% 96.1%; --muted-foreground: 215.4 16.3% 46.9%; --accent: 210 40% 96.1%; --accent-foreground: 222.2 47.4% 11.2%; --destructive: 0 84.2% 60.2%; --destructive-foreground: 210 40% 98%; --border: 214.3 31.8% 91.4%; --input: 214.3 31.8% 91.4%; --ring: 217.2 91.2% 59.8%; --radius: 0.75rem; /* 增强视觉细节,让 Shadcn UI 迁移更明显 */ --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05); --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1); --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1); --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1); /* Chatbase 风格 - 更大阴影(用于卡片 hover) */ --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1); --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25); /* 渐变背景变量(用于 Hero 等) */ --gradient-primary: linear-gradient(135deg, hsl(var(--primary)) 0%, hsl(var(--primary) / 0.7) 100%); --gradient-hero: linear-gradient(180deg, hsl(var(--background)) 0%, hsl(var(--muted) / 0.2) 100%); } .dark { --background: 222.2 84% 4.9%; --foreground: 210 40% 98%; --card: 222.2 84% 4.9%; --card-foreground: 210 40% 98%; --popover: 222.2 84% 4.9%; --popover-foreground: 210 40% 98%; --primary: 210 40% 98%; --primary-foreground: 222.2 47.4% 11.2%; --secondary: 217.2 32.6% 17.5%; --secondary-foreground: 210 40% 98%; --muted: 217.2 32.6% 17.5%; --muted-foreground: 215 20.2% 65.1%; --accent: 217.2 32.6% 17.5%; --accent-foreground: 210 40% 98%; --destructive: 0 62.8% 30.6%; --destructive-foreground: 210 40% 98%; --border: 217.2 32.6% 17.5%; --input: 217.2 32.6% 17.5%; --ring: 212.7 26.8% 83.9%; } @theme inline { --color-background: hsl(var(--background)); --color-foreground: hsl(var(--foreground)); --color-card: hsl(var(--card)); --color-card-foreground: hsl(var(--card-foreground)); --color-popover: hsl(var(--popover)); --color-popover-foreground: hsl(var(--popover-foreground)); --color-primary: hsl(var(--primary)); --color-primary-foreground: hsl(var(--primary-foreground)); --color-secondary: hsl(var(--secondary)); --color-secondary-foreground: hsl(var(--secondary-foreground)); --color-muted: hsl(var(--muted)); --color-muted-foreground: hsl(var(--muted-foreground)); --color-accent: hsl(var(--accent)); --color-accent-foreground: hsl(var(--accent-foreground)); --color-destructive: hsl(var(--destructive)); --color-destructive-foreground: hsl(var(--destructive-foreground)); --color-border: hsl(var(--border)); --color-input: hsl(var(--input)); --color-ring: hsl(var(--ring)); --font-sans: var(--font-geist-sans); --font-mono: var(--font-geist-mono); } * { border-color: hsl(var(--border)); /* Firefox 滚动条 */ scrollbar-width: thin; scrollbar-color: hsl(var(--border)) transparent; } html { scroll-behavior: smooth; } /* 移动端:刘海 / 手势条安全区(与 Tailwind 任意值 env(safe-area-inset-*) 配合) */ @supports (padding: env(safe-area-inset-bottom)) { .pb-safe { padding-bottom: env(safe-area-inset-bottom); } .pt-safe { padding-top: env(safe-area-inset-top); } } body { background-color: hsl(var(--background)); color: hsl(var(--foreground)); font-family: var(--font-geist-sans), ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", sans-serif; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; } /* Chatbase 风格 - Hero 渐变背景动画 */ @keyframes gradient-shift { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } } .animate-gradient { background-size: 200% 200%; animation: gradient-shift 15s ease infinite; } /* 卡片 hover 过渡(可与 Tailwind 类组合使用) */ .card-hover { transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); } .card-hover:hover { transform: translateY(-4px); box-shadow: var(--shadow-xl); } /* 自定义滚动条样式 - 更隐蔽、更现代 */ /* Webkit (Chrome, Safari, Edge) */ *::-webkit-scrollbar { width: 8px; height: 8px; } *::-webkit-scrollbar-track { background: transparent; } *::-webkit-scrollbar-thumb { background-color: hsl(var(--border)); border-radius: 4px; border: 2px solid transparent; background-clip: padding-box; transition: background-color 0.2s ease; } *::-webkit-scrollbar-thumb:hover { background-color: hsl(var(--muted-foreground) / 0.3); } /* 可选:只在hover容器时显示滚动条 */ .scrollbar-hide { scrollbar-width: none; /* Firefox */ -ms-overflow-style: none; /* IE and Edge */ } .scrollbar-hide::-webkit-scrollbar { display: none; /* Chrome, Safari, Opera */ } .scrollbar-auto { scrollbar-width: thin; scrollbar-color: transparent transparent; } .scrollbar-auto:hover { scrollbar-color: hsl(var(--border)) transparent; } .scrollbar-auto::-webkit-scrollbar { width: 8px; height: 8px; } .scrollbar-auto::-webkit-scrollbar-track { background: transparent; } .scrollbar-auto::-webkit-scrollbar-thumb { background-color: transparent; border-radius: 4px; transition: background-color 0.2s ease; } .scrollbar-auto:hover::-webkit-scrollbar-thumb { background-color: hsl(var(--border)); }