137 lines
3.0 KiB
CSS

/* ========== 基础重置 ========== */
@import url('https://cdn.jsdelivr.net/npm/remixicon@3.5.0/fonts/remixicon.css');
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;700&display=swap');
:where(*, *::before, *::after) {
box-sizing: border-box;
margin: 0;
padding: 0;
}
:where(html) {
-webkit-text-size-adjust: 100%;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-rendering: optimizeLegibility;
scroll-behavior: smooth;
}
:where(body) {
min-height: 100vh;
min-height: 100dvh;
line-height: 1.6;
font-family:
'Noto Sans SC',
system-ui,
-apple-system,
'Segoe UI',
Roboto,
'Helvetica Neue',
sans-serif;
color: var(--color-text-primary);
background-color: var(--color-bg-light);
background-image:
radial-gradient(at 80% 20%, var(--color-primary-100) 0px, transparent 50%),
radial-gradient(at 0% 50%, var(--color-primary-50) 0px, transparent 50%);
}
/* ========== 排版系统 ========== */
:where(h1, h2, h3, h4, h5, h6) {
font-weight: 700;
line-height: 1.2;
margin-bottom: var(--spacing-md);
}
:where(h1) { font-size: var(--text-4xl); }
:where(h2) { font-size: var(--text-3xl); }
:where(h3) { font-size: var(--text-2xl); }
:where(h4) { font-size: var(--text-xl); }
:where(p) { margin-bottom: var(--spacing-md); }
/* ========== 交互元素 ========== */
:where(a) {
color: var(--color-primary-500);
text-decoration: none;
transition: color var(--transition-fast);
cursor: pointer;
}
:where(a:hover) {
color: var(--color-primary-600);
text-decoration: underline;
}
:where(button) {
border: none;
background: none;
font-family: inherit;
cursor: pointer;
padding: var(--spacing-sm) var(--spacing-md);
border-radius: var(--radius-md);
transition: all var(--transition-fast);
}
:where(button:focus-visible) {
outline: 2px solid var(--color-primary-400);
outline-offset: 2px;
}
/* ========== 实用类 ========== */
.container {
width: 100%;
max-width: 1200px;
margin: 0 auto;
padding: 0 var(--spacing-md);
}
.section {
padding: var(--spacing-xl) 0;
position: relative;
}
/* ========== 动画基础 ========== */
@keyframes float {
0%, 100% { transform: translateY(0); }
50% { transform: translateY(-12px); }
}
@keyframes pulse {
0%, 100% { opacity: 1; }
50% { opacity: 0.5; }
}
/* ========== 猫咪主题元素 ========== */
.cat-paw {
position: absolute;
width: 40px;
height: 40px;
background-image: url('@/assets/paw-print.png');
background-size: contain;
opacity: 0.15;
pointer-events: none;
z-index: var(--z-index-background);
}
/* ========== 响应式调整 ========== */
@media (max-width: 768px) {
:where(h1) { font-size: var(--text-3xl); }
:where(h2) { font-size: var(--text-2xl); }
.section {
padding: var(--spacing-lg) 0;
}
}
/* ========== 打印样式 ========== */
@media print {
:where(body) {
background: none !important;
color: black !important;
}
:where(a) {
color: black !important;
text-decoration: underline !important;
}
}