Files
2026-03-16 20:08:21 -05:00

162 lines
3.2 KiB
CSS

@import "tailwindcss";
/* 使 Tailwind dark: 变体响应 class="dark",与 next-themes 配合 */
@custom-variant dark (&:where(.dark, .dark *));
:root {
--background: #faf8f5;
--foreground: #1c1917;
--accent: #b45309;
--accent-hover: #92400e;
}
html.dark {
--background: #0c0a09;
--foreground: #fafaf9;
color-scheme: dark;
}
body {
color: var(--foreground);
background: var(--background);
}
.safe-area-pb {
padding-bottom: env(safe-area-inset-bottom, 0);
}
.hero-gradient-text {
background: linear-gradient(135deg, #b45309 0%, #d97706 50%, #f59e0b 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}
.form-input:focus {
outline: none;
border-color: #b45309;
box-shadow: 0 0 0 2px rgba(180, 83, 9, 0.2);
}
.items-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
gap: 1rem;
max-width: 1400px;
margin: 0 auto;
padding: 1rem;
}
.right-item {
border-radius: 1rem;
overflow: hidden;
background: white;
border: 1px solid #e5e7eb;
transition: box-shadow 0.2s;
}
.right-item:hover {
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.right-item-header {
padding: 0.5rem 1rem;
font-weight: 600;
font-size: 0.875rem;
background: #f9fafb;
border-bottom: 1px solid #e5e7eb;
}
.community-card {
border-radius: 1rem;
overflow: hidden;
background: white;
border: 1px solid #e5e7eb;
transition: box-shadow 0.2s;
}
.community-card:hover {
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.form-input {
width: 100%;
padding: 0.625rem 0.875rem;
border: 1px solid #e2e8f0;
border-radius: 0.5rem;
font-size: 0.9375rem;
transition: border-color 0.15s, box-shadow 0.15s;
}
.form-input:disabled {
opacity: 0.6;
cursor: not-allowed;
}
.form-input::placeholder {
color: #9ca3af;
}
.dark .form-input {
border-color: #374151;
background: #1f2937;
}
.dark .form-input::placeholder {
color: #6b7280;
}
.dark .right-item,
.dark .community-card {
background: #111827;
border-color: #374151;
}
.dark .right-item-header {
background: #1f2937;
border-color: #374151;
}
.city-card {
border-radius: 1rem;
overflow: hidden;
transition: transform 0.2s, box-shadow 0.2s;
}
.city-card:hover {
transform: translateY(-2px);
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}
@keyframes fadeIn {
from { opacity: 0; transform: translateY(20px); }
to { opacity: 1; transform: translateY(0); }
}
.animate-fade-in {
animation: fadeIn 0.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
/* 卡片依次淡入,用于列表 */
.animate-fade-in-stagger > * {
opacity: 0;
animation: fadeIn 0.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.animate-fade-in-stagger > *:nth-child(1) { animation-delay: 0ms; }
.animate-fade-in-stagger > *:nth-child(2) { animation-delay: 80ms; }
.animate-fade-in-stagger > *:nth-child(3) { animation-delay: 160ms; }
.animate-fade-in-stagger > *:nth-child(4) { animation-delay: 240ms; }
.animate-fade-in-stagger > *:nth-child(5) { animation-delay: 320ms; }
.animate-fade-in-stagger > *:nth-child(6) { animation-delay: 400ms; }
/* 骨架屏脉冲 */
@keyframes pulse-subtle {
0%, 100% { opacity: 0.6; }
50% { opacity: 1; }
}
.animate-pulse-subtle {
animation: pulse-subtle 1.5s ease-in-out infinite;
}