450 lines
8.8 KiB
CSS
450 lines
8.8 KiB
CSS
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
|
|
@import "tailwindcss";
|
|
@tailwind base;
|
|
@tailwind components;
|
|
@tailwind utilities;
|
|
|
|
:root {
|
|
--background: #ffffff;
|
|
--foreground: #171717;
|
|
--navbar-height: 64px; /* 与pt-16对应 */
|
|
--primary-orange: #f97316;
|
|
--primary-orange-dark: #ea580c;
|
|
--transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
|
|
--transition-normal: 300ms cubic-bezier(0.4, 0, 0.2, 1);
|
|
--transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
|
|
}
|
|
|
|
@media (prefers-color-scheme: dark) {
|
|
:root {
|
|
--background: #0a0a0a;
|
|
--foreground: #ededed;
|
|
}
|
|
}
|
|
|
|
body {
|
|
color: var(--foreground);
|
|
background: var(--background);
|
|
font-family: 'Inter', Arial, Helvetica, sans-serif;
|
|
scroll-behavior: smooth;
|
|
}
|
|
|
|
/* Custom utility classes */
|
|
.text-balance {
|
|
text-wrap: balance;
|
|
}
|
|
|
|
/* Enhanced Custom component classes with micro-interactions */
|
|
.btn-carrot {
|
|
background-color: var(--primary-orange);
|
|
color: white;
|
|
font-weight: 500;
|
|
padding: 0.5rem 1rem;
|
|
border-radius: 0.5rem;
|
|
transition: all var(--transition-normal);
|
|
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
|
|
position: relative;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.btn-carrot:hover {
|
|
background-color: var(--primary-orange-dark);
|
|
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
|
|
transform: translateY(-2px);
|
|
}
|
|
|
|
.btn-carrot:active {
|
|
transform: translateY(0);
|
|
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
|
|
}
|
|
|
|
.btn-carrot::before {
|
|
content: '';
|
|
position: absolute;
|
|
top: 0;
|
|
left: -100%;
|
|
width: 100%;
|
|
height: 100%;
|
|
background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
|
|
transition: left var(--transition-slow);
|
|
}
|
|
|
|
.btn-carrot:hover::before {
|
|
left: 100%;
|
|
}
|
|
|
|
.btn-carrot-outline {
|
|
border: 2px solid var(--primary-orange);
|
|
color: var(--primary-orange);
|
|
font-weight: 500;
|
|
padding: 0.5rem 1rem;
|
|
border-radius: 0.5rem;
|
|
transition: all var(--transition-normal);
|
|
position: relative;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.btn-carrot-outline:hover {
|
|
background-color: var(--primary-orange);
|
|
color: white;
|
|
transform: translateY(-2px);
|
|
box-shadow: 0 10px 15px -3px rgba(249, 115, 22, 0.3);
|
|
}
|
|
|
|
.btn-carrot-outline:active {
|
|
transform: translateY(0);
|
|
}
|
|
|
|
.card-minecraft {
|
|
background-color: white;
|
|
border: 2px solid #fed7aa;
|
|
border-radius: 0.5rem;
|
|
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
|
|
transition: all var(--transition-normal);
|
|
position: relative;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.card-minecraft:hover {
|
|
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
|
|
transform: translateY(-4px);
|
|
border-color: var(--primary-orange);
|
|
}
|
|
|
|
.card-minecraft::after {
|
|
content: '';
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
background: linear-gradient(135deg, rgba(249, 115, 22, 0.1) 0%, transparent 50%);
|
|
opacity: 0;
|
|
transition: opacity var(--transition-normal);
|
|
}
|
|
|
|
.card-minecraft:hover::after {
|
|
opacity: 1;
|
|
}
|
|
|
|
@media (prefers-color-scheme: dark) {
|
|
.card-minecraft {
|
|
background-color: #1f2937;
|
|
border-color: #c2410c;
|
|
}
|
|
|
|
.card-minecraft:hover {
|
|
border-color: var(--primary-orange);
|
|
}
|
|
}
|
|
|
|
.text-gradient {
|
|
background: linear-gradient(to right, #fb923c, #f97316);
|
|
background-clip: text;
|
|
-webkit-background-clip: text;
|
|
color: transparent;
|
|
transition: all var(--transition-normal);
|
|
}
|
|
|
|
.text-gradient:hover {
|
|
background: linear-gradient(to right, #f97316, #ea580c);
|
|
background-clip: text;
|
|
-webkit-background-clip: text;
|
|
}
|
|
|
|
.bg-gradient-carrot {
|
|
background: linear-gradient(to bottom right, #fb923c, #f97316, #ea580c);
|
|
transition: all var(--transition-normal);
|
|
}
|
|
|
|
/* 现代布局解决方案 */
|
|
@layer utilities {
|
|
/* 全屏减去navbar高度 */
|
|
.h-screen-nav {
|
|
height: calc(100vh - var(--navbar-height));
|
|
}
|
|
|
|
/* 侧栏最大高度,确保底部按钮可见 */
|
|
.sidebar-max-height {
|
|
max-height: calc(100vh - var(--navbar-height) - 120px);
|
|
}
|
|
|
|
/* 首页hero section专用高度 */
|
|
.min-h-screen-nav {
|
|
min-height: calc(100vh - var(--navbar-height));
|
|
}
|
|
|
|
/* 增强的过渡效果 */
|
|
.transition-all-enhanced {
|
|
transition: all var(--transition-normal);
|
|
}
|
|
|
|
.transition-colors-enhanced {
|
|
transition: color var(--transition-normal), background-color var(--transition-normal), border-color var(--transition-normal);
|
|
}
|
|
|
|
.transition-transform-enhanced {
|
|
transition: transform var(--transition-normal);
|
|
}
|
|
|
|
/* 微交互效果 */
|
|
.micro-interaction {
|
|
transition: all var(--transition-fast);
|
|
}
|
|
|
|
.micro-interaction:hover {
|
|
transform: scale(1.02);
|
|
}
|
|
|
|
.micro-interaction:active {
|
|
transform: scale(0.98);
|
|
}
|
|
|
|
/* 加载动画 */
|
|
.animate-pulse-slow {
|
|
animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
|
|
}
|
|
|
|
.animate-pulse-fast {
|
|
animation: pulse 1s cubic-bezier(0.4, 0, 0.6, 1) infinite;
|
|
}
|
|
|
|
/* 弹跳动画 */
|
|
.animate-bounce-slow {
|
|
animation: bounce 2s infinite;
|
|
}
|
|
|
|
.animate-bounce-fast {
|
|
animation: bounce 1s infinite;
|
|
}
|
|
|
|
/* 旋转动画 */
|
|
.animate-spin-slow {
|
|
animation: spin 3s linear infinite;
|
|
}
|
|
|
|
.animate-spin-fast {
|
|
animation: spin 1s linear infinite;
|
|
}
|
|
|
|
/* 渐变动画 */
|
|
.animate-gradient {
|
|
background-size: 200% 200%;
|
|
animation: gradient 3s ease infinite;
|
|
}
|
|
|
|
/* 阴影动画 */
|
|
.shadow-animated {
|
|
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
|
|
transition: box-shadow var(--transition-normal);
|
|
}
|
|
|
|
.shadow-animated:hover {
|
|
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
|
|
}
|
|
|
|
/* 模糊动画 */
|
|
.backdrop-blur-animated {
|
|
backdrop-filter: blur(8px);
|
|
transition: backdrop-filter var(--transition-normal);
|
|
}
|
|
|
|
.backdrop-blur-animated:hover {
|
|
backdrop-filter: blur(16px);
|
|
}
|
|
}
|
|
|
|
/* 自定义关键帧动画 */
|
|
@keyframes gradient {
|
|
0% {
|
|
background-position: 0% 50%;
|
|
}
|
|
50% {
|
|
background-position: 100% 50%;
|
|
}
|
|
100% {
|
|
background-position: 0% 50%;
|
|
}
|
|
}
|
|
|
|
@keyframes float {
|
|
0%, 100% {
|
|
transform: translateY(0px);
|
|
}
|
|
50% {
|
|
transform: translateY(-10px);
|
|
}
|
|
}
|
|
|
|
@keyframes shimmer {
|
|
0% {
|
|
background-position: -200% 0;
|
|
}
|
|
100% {
|
|
background-position: 200% 0;
|
|
}
|
|
}
|
|
|
|
@keyframes slideInUp {
|
|
from {
|
|
transform: translateY(30px);
|
|
opacity: 0;
|
|
}
|
|
to {
|
|
transform: translateY(0);
|
|
opacity: 1;
|
|
}
|
|
}
|
|
|
|
@keyframes slideInDown {
|
|
from {
|
|
transform: translateY(-30px);
|
|
opacity: 0;
|
|
}
|
|
to {
|
|
transform: translateY(0);
|
|
opacity: 1;
|
|
}
|
|
}
|
|
|
|
@keyframes slideInLeft {
|
|
from {
|
|
transform: translateX(-30px);
|
|
opacity: 0;
|
|
}
|
|
to {
|
|
transform: translateX(0);
|
|
opacity: 1;
|
|
}
|
|
}
|
|
|
|
@keyframes slideInRight {
|
|
from {
|
|
transform: translateX(30px);
|
|
opacity: 0;
|
|
}
|
|
to {
|
|
transform: translateX(0);
|
|
opacity: 1;
|
|
}
|
|
}
|
|
|
|
@keyframes scaleIn {
|
|
from {
|
|
transform: scale(0.9);
|
|
opacity: 0;
|
|
}
|
|
to {
|
|
transform: scale(1);
|
|
opacity: 1;
|
|
}
|
|
}
|
|
|
|
@keyframes scaleOut {
|
|
from {
|
|
transform: scale(1);
|
|
opacity: 1;
|
|
}
|
|
to {
|
|
transform: scale(0.9);
|
|
opacity: 0;
|
|
}
|
|
}
|
|
|
|
/* 动画工具类 */
|
|
.animate-slide-in-up {
|
|
animation: slideInUp 0.3s ease-out;
|
|
}
|
|
|
|
.animate-slide-in-down {
|
|
animation: slideInDown 0.3s ease-out;
|
|
}
|
|
|
|
.animate-slide-in-left {
|
|
animation: slideInLeft 0.3s ease-out;
|
|
}
|
|
|
|
.animate-slide-in-right {
|
|
animation: slideInRight 0.3s ease-out;
|
|
}
|
|
|
|
.animate-scale-in {
|
|
animation: scaleIn 0.2s ease-out;
|
|
}
|
|
|
|
.animate-scale-out {
|
|
animation: scaleOut 0.2s ease-out;
|
|
}
|
|
|
|
/* 加载状态样式 */
|
|
.loading-shimmer {
|
|
background: linear-gradient(
|
|
90deg,
|
|
#f0f0f0 0%,
|
|
#e0e0e0 50%,
|
|
#f0f0f0 100%
|
|
);
|
|
background-size: 200% 100%;
|
|
animation: shimmer 1.5s infinite;
|
|
}
|
|
|
|
.dark .loading-shimmer {
|
|
background: linear-gradient(
|
|
90deg,
|
|
#374151 0%,
|
|
#4b5563 50%,
|
|
#374151 100%
|
|
);
|
|
background-size: 200% 100%;
|
|
animation: shimmer 1.5s infinite;
|
|
}
|
|
|
|
/* 焦点样式 */
|
|
.focus-visible-enhanced {
|
|
outline: 2px solid var(--primary-orange);
|
|
outline-offset: 2px;
|
|
}
|
|
|
|
/* 滚动条样式 */
|
|
.custom-scrollbar::-webkit-scrollbar {
|
|
width: 6px;
|
|
}
|
|
|
|
.custom-scrollbar::-webkit-scrollbar-track {
|
|
background: rgba(0, 0, 0, 0.1);
|
|
border-radius: 3px;
|
|
}
|
|
|
|
.custom-scrollbar::-webkit-scrollbar-thumb {
|
|
background: var(--primary-orange);
|
|
border-radius: 3px;
|
|
}
|
|
|
|
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
|
|
background: var(--primary-orange-dark);
|
|
}
|
|
|
|
/* 响应式动效 */
|
|
@media (prefers-reduced-motion: reduce) {
|
|
*, *::before, *::after {
|
|
animation-duration: 0.01ms !important;
|
|
animation-iteration-count: 1 !important;
|
|
transition-duration: 0.01ms !important;
|
|
}
|
|
}
|
|
|
|
/* 触摸设备优化 */
|
|
@media (hover: none) and (pointer: coarse) {
|
|
.btn-carrot:hover,
|
|
.btn-carrot-outline:hover,
|
|
.card-minecraft:hover {
|
|
transform: none;
|
|
}
|
|
|
|
.btn-carrot:active,
|
|
.btn-carrot-outline:active,
|
|
.card-minecraft:active {
|
|
transform: scale(0.98);
|
|
}
|
|
}
|