/* =========================================== 🎨 全局变量与重置 =========================================== */ /* 导入 BlueCDN 反代字体 */ @import url('https://fonts.bluecdn.com/css2?family=Open+Sans:wght@300;400;500;600;700&display=swap'); @import url('https://fonts.bluecdn.com/css2?family=Google+Sans:wght@400;500;700&display=swap'); @import url('https://fonts.bluecdn.com/css2?family=Google+Sans+Code:wght@400..700&display=swap'); @import url('https://fonts.bluecdn.com/css2?family=Ubuntu:wght@400;700&display=swap'); @import url('https://fonts.bluecdn.com/css2?family=Roboto+Mono:wght@400;500;700&display=swap'); @font-face { font-family: "Sora"; src: url("../fonts/Sora-VariableFont_wght.ttf") format("truetype"); font-weight: 100 900; font-style: normal; font-display: swap; } :root { /* 颜色系统 */ --color-blue: #0052D9; --color-blue-light: #3385FF; --color-purple: #8e44ad; --color-green: #007A33; --color-green-dark: #007A33; --color-red: #e74c3c; --color-orange: #f39c12; --color-cyan: #00bcd4; --color-white: #ffffff; --color-yellow: #f7e018; /* 浅色主题默认值 */ --color-bg: #F8F9FA; --color-bg-light: #FFFFFF; --color-text: #2D3748; --color-text-dim: rgba(45, 55, 72, 0.7); --color-border: #E2E8F0; --shadow-color: rgba(0, 0, 0, 0.1); /* 字体系统 */ --font-title: "Microsoft Jhenghei", "PingFang SC", "SF Pro SC", system-ui, -apple-system, sans-serif; --font-cn: "Microsoft Jhenghei", "PingFang SC", "SF Pro SC", "SF Pro Text", system-ui, -apple-system, sans-serif; --font-en: "Open Sans", system-ui, -apple-system, BlinkMacSystemFont, sans-serif; --font-code: "Google Sans Code", "Papermono", "Roboto Mono", SFMono-Regular, Menlo, Monaco, Consolas, monospace; /* 兼容性别名 */ --font-main: var(--font-cn); --font-mono: var(--font-code); /* 过渡效果 */ --transition-base: all 0.3s ease; /* 基础重置 */ box-sizing: border-box; line-height: 1.6; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } /* 深色主题 */ [data-theme="dark"] { --color-bg: #121212; --color-bg-light: #1E1E1E; --color-text: #FFFFFF; --color-text-dim: rgba(255, 255, 255, 0.7); --color-border: #333333; --shadow-color: rgba(0, 0, 0, 0.3); } /* =========================================== 📐 布局系统样式 (layout.css) =========================================== */ /* 0. 背景:仅保留 SVG 背景图(不使用 canvas 动画) */ /* 1. 主容器 */ .container { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 1.5rem; box-sizing: border-box; position: relative; z-index: 1; } /* 首页不需要容器左右内边距 */ .page-home .container { padding: 0; } /* 2. 网格系统 */ .grid { display: grid; gap: 1.5rem; } .theme-switcher { position: relative; display: flex; align-items: center; gap: 0.5rem; } .theme-toggle-btn { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.5rem 1rem; height: 40px; border: 1px solid #1a1a1a; background: #0d0d0d; border-radius: 8px; color: #aaaaaa; cursor: pointer; font-weight: 600; transition: all 0.3s ease; } .theme-toggle-btn:hover { background: #1a1a1a; border-color: var(--color-blue); transform: translateY(-1px); } .theme-toggle-btn svg { width: 22px; height: 22px; } .theme-toggle-text { font-size: 0.95rem; color: var(--color-text-dim); } .theme-dropdown { position: absolute; right: 0; bottom: calc(100% + 0.5rem); background: #0d0d0d; border: 1px solid #1a1a1a; border-radius: 12px; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3); padding: 0.5rem; width: 190px; opacity: 0; transform: translateY(6px); visibility: hidden; transition: all 0.2s ease; z-index: 100; } .theme-dropdown.show { opacity: 1; transform: translateY(0); visibility: visible; } .theme-option { display: flex; align-items: center; gap: 0.6rem; padding: 0.65rem 0.75rem; border-radius: 10px; color: #aaaaaa; cursor: pointer; transition: all 0.2s ease; } .theme-option:hover { background: #1a1a1a; color: #ffffff; } .theme-option.active { background: rgba(0, 102, 252, 0.15); color: var(--color-blue); } .theme-option svg { width: 18px; height: 18px; color: #888888; } .theme-option:hover svg { color: #ffffff; } .theme-option.active svg { color: var(--color-blue); } .theme-option-check { margin-left: auto; opacity: 0; color: var(--color-blue); } .theme-option.active .theme-option-check { opacity: 1; } [data-theme='dark'] .theme-dropdown { background: var(--color-bg-light); } [data-theme='dark'] .theme-option:hover { background: var(--color-bg); } .grid-2 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); } /* 3. Flex布局工具 */ .flex { display: flex; } .flex-col { flex-direction: column; } .flex-wrap { flex-wrap: wrap; } .items-center { align-items: center; } .justify-between { justify-content: space-between; } .justify-center { justify-content: center; } .gap-1 { gap: 0.25rem; } .gap-2 { gap: 0.5rem; } .gap-4 { gap: 1rem; } .gap-6 { gap: 1.5rem; } .gap-8 { gap: 2rem; } /* 4. 间距工具 */ .m-0 { margin: 0; } .m-1 { margin: 0.25rem; } .m-2 { margin: 0.5rem; } .m-4 { margin: 1rem; } .m-6 { margin: 1.5rem; } .m-8 { margin: 2rem; } .mx-auto { margin-left: auto; margin-right: auto; } .my-4 { margin-top: 1rem; margin-bottom: 1rem; } .my-8 { margin-top: 2rem; margin-bottom: 2rem; } .p-0 { padding: 0; } .p-1 { padding: 0.25rem; } .p-2 { padding: 0.5rem; } .p-4 { padding: 1rem; } .p-6 { padding: 1.5rem; } .p-8 { padding: 2rem; } /* 5. 定位工具 */ .relative { position: relative; } .absolute { position: absolute; } .fixed { position: fixed; } .sticky { position: sticky; top: 0; } .z-10 { z-index: 10; } .z-20 { z-index: 20; } .z-50 { z-index: 50; } .z-100 { z-index: 100; } /* 6. 显示与可见性 */ .hidden { display: none; } .block { display: block; } .inline-block { display: inline-block; } .visible { visibility: visible; } .invisible { visibility: hidden; } /* 7. 宽度和高度工具 */ .w-full { width: 100%; } .w-auto { width: auto; } .h-full { height: 100%; } .h-screen { height: 100vh; } .min-h-screen { min-height: 100vh; } /* 8. 溢出控制 */ .overflow-hidden { overflow: hidden; } .overflow-auto { overflow: auto; } .overflow-x-auto { overflow-x: auto; } .overflow-y-auto { overflow-y: auto; } /* 9. 响应式布局 */ @media (max-width: 1320px) { .container { margin-left: 1.5rem; margin-right: 1.5rem; } .grid-4 { grid-template-columns: repeat(3, 1fr); } } @media (max-width: 1024px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } } @media (max-width: 768px) { .container { margin-left: 1rem; margin-right: 1rem; padding: 0 1rem; } .grid { gap: 1rem; } .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } /* 移动端Flex调整 */ .sm-flex-col { flex-direction: column; } .sm-items-stretch { align-items: stretch; } } /* 10. 布局辅助类 */ .clearfix::after { content: ''; display: table; clear: both; } .wrapper { position: relative; width: 100%; } .center-content { display: flex; align-items: center; justify-content: center; } .space-between { display: flex; justify-content: space-between; align-items: center; } /* =========================================== 📝 基础样式 =========================================== */ /* 重置 */ *, *::before, *::after { box-sizing: inherit; margin: 0; padding: 0; } /* 字体应用 */ body { font-family: var(--font-cn); background-color: var(--color-bg); position: relative; color: var(--color-text); min-height: 100vh; transition: var(--transition-base); overflow-x: hidden; } /* 背景:固定在底层,确保始终可见且不影响布局 */ body::before { content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none; background-color: var(--color-bg); background-image: url('/static/images/background.svg'); background-repeat: no-repeat; background-position: top center; /* 以视口宽度铺满,确保左右图标可见;中间内容由页面本身覆盖 */ background-size: 100% auto; opacity: 0.5; filter: saturate(0.95) brightness(1.08) contrast(0.92); transition: opacity 0.25s ease, filter 0.25s ease; } /* 深色模式:稍微加深、降低对比,避免在暗底上太亮 */ [data-theme="dark"] body::before { opacity: 0.45; filter: saturate(0.9) brightness(0.82) contrast(0.9); } /* 内容层始终在背景之上 */ .container { position: relative; z-index: 1; } /* 使用代码字体的元素 */ code, pre, .monospace, .lib-url, .code-box, .lib-url-container .lib-url { font-family: var(--font-code); font-feature-settings: "liga" 1, "calt" 1; } /* 标题/副标题字体(Microsoft Jhenghei 优先) */ h1, h2, h3, h4, .section-title, .section-lead { font-family: var(--font-title); } /* 使用苹方的元素 */ p, .lib-description, .advantage-list li, .search-input::placeholder, .footer, .faq-answer { font-family: var(--font-cn); } /* =========================================== 🚀 服务优势模块 (advantages.css) =========================================== */ /* 1. 版块标题样式 */ .section-title { display: flex; align-items: center; gap: 0.6rem; font-size: 1.25rem; font-weight: 700; color: var(--color-text); margin: 0 0 1.5rem; white-space: nowrap; line-height: 1.2; } h2.section-title { display: flex !important; align-items: center !important; gap: 0.6rem !important; flex-wrap: nowrap !important; flex-direction: row !important; margin: 0 !important; } .section-title i { color: var(--color-blue); flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; min-width: 1.25rem; min-height: 1.25rem; } .fixed-section .section-title, .advantage-section .section-title { margin: 3rem auto 2rem; max-width: 1230px; font-size: 1.5rem; } /* 2. 主体容器样式 */ .advantage-section { max-width: 1230px; margin: 2rem auto; padding: 2rem; background: var(--color-bg-light); border-radius: 12px; box-sizing: border-box; } /* 3. 网格列表样式 */ .advantage-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; margin: 0; padding: 0; list-style: none; } /* 4. 卡片项样式 */ .advantage-item { background: var(--color-bg); border-radius: 16px; padding: 2rem; transition: all 0.3s ease; position: relative; border: 1px solid var(--color-border); } .advantage-item:hover { transform: translateY(-5px); box-shadow: 0 10px 20px var(--shadow-color); border-color: var(--color-blue); } /* 5. 图标样式 */ .advantage-icon { width: 3.5rem; height: 3.5rem; border-radius: 12px; background: var(--color-bg-light); display: flex; align-items: center; justify-content: center; margin-bottom: 1.5rem; transition: all 0.3s ease; border: 1px solid var(--color-border); } .advantage-icon i { font-size: 1.5rem; color: var(--color-blue); transition: all 0.3s ease; } .advantage-item:hover .advantage-icon { background: var(--color-blue); border-color: var(--color-blue); } .advantage-item:hover .advantage-icon i { color: var(--color-white); transform: scale(1.1); } /* 6. 文本内容样式 */ .advantage-title { font-size: 1.25rem; font-weight: 600; margin-bottom: 1rem; color: var(--color-text); } .advantage-desc { color: var(--color-text-dim); line-height: 1.7; font-size: 0.95rem; margin: 0; } .advantage-desc code { background: var(--color-bg-light); padding: 0.2em 0.4em; border-radius: 4px; font-size: 0.9em; color: var(--color-blue); } .advantage-desc strong { color: var(--color-blue); font-weight: 600; } /* 7. 响应式布局 */ @media (max-width: 1320px) { .fixed-section .section-title, .advantage-section .section-title { margin-left: 1.5rem; margin-right: 1.5rem; } } @media (max-width: 1200px) { .advantage-list { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; } } @media (max-width: 768px) { .fixed-section .section-title, .advantage-section .section-title { margin: 2rem 1rem 1.5rem; font-size: 1.25rem; } .advantage-section { margin: 1.5rem 1rem; padding: 1.5rem; } .advantage-list { grid-template-columns: 1fr; gap: 1rem; } .advantage-item { padding: 1.5rem; } .advantage-icon { width: 3rem; height: 3rem; margin-bottom: 1rem; } .advantage-icon i { font-size: 1.25rem; } .advantage-title { font-size: 1.1rem; margin-bottom: 0.75rem; } .advantage-desc { font-size: 0.9rem; } } /* =========================================== 🎯 头部导航样式 (header.css) =========================================== */ /* 1. 头部容器 */ .header { max-width: none; width: 100%; margin: 0 0 2rem 0; padding: 1.5rem max(2rem, calc((100vw - 1280px) / 2)); display: flex; align-items: center; justify-content: space-between; gap: 1rem; position: sticky; top: 0; z-index: 20; background: var(--color-bg); backdrop-filter: blur(10px); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.05); } /* 让头部铺满视口宽度(容器内溢出) */ .container > .header { position: relative; left: 50%; right: 50%; margin-left: -50vw; margin-right: -50vw; width: 100vw; max-width: 100vw; padding-left: calc((100vw - 1280px) / 2); padding-right: calc((100vw - 1280px) / 2); } @media (max-width: 1320px) { .container > .header { padding-left: 2rem; padding-right: 2rem; } } .header-actions { display: flex; align-items: center; gap: 1rem; } /* 统一头部三按钮尺寸(CDN切换 / 状态 / 主题) */ .header-actions .cdn-toggle { height: 46px; min-width: 140px; box-sizing: border-box; } .header-actions .service-status { height: 52px; min-width: auto; box-sizing: border-box; } .header-actions .theme-toggle { height: 52px; width: 52px; box-sizing: border-box; } /* 2. Logo样式 */ .header-logo { display: flex; align-items: center; gap: 1rem; } .logo-link { display: flex; align-items: center; text-decoration: none; color: var(--color-text); transition: opacity 0.3s ease; } .logo-link:hover { opacity: 0.8; } .logo-lockup { display: flex; align-items: center; gap: 0.9rem; } .logo-mark { width: 3.8rem; height: 3.8rem; display: block; flex: 0 0 auto; filter: drop-shadow(0 5px 12px rgba(0, 82, 217, 0.16)); } .logo-copy { display: flex; flex-direction: column; justify-content: center; min-width: 0; line-height: 1; } .logo-title { display: block; font-family: "Sora", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 2.65rem; font-weight: 900; letter-spacing: 0; line-height: 0.95; white-space: nowrap; } .logo-title-blue { color: #0052D9; } .logo-title-deep { color: #0B3AAE; } .logo-subtitle { display: block; margin-top: 0.42rem; color: #4B5563; font-size: 1rem; font-weight: 600; line-height: 1.15; white-space: nowrap; } .logo-svg { height: 3.8rem; width: auto; display: block; transition: opacity 0.3s ease; } /* 3. 服务状态 */ .service-status { display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 1rem; height: 40px; border-radius: 8px; border: 1px solid #1a1a1a; background: #0d0d0d; color: #aaaaaa; font-size: 0.9rem; text-decoration: none; /* 移除链接下划线 */ transition: all 0.3s ease; /* 添加过渡效果 */ } .service-status:hover { border-color: var(--color-blue); background: #1a1a1a; transform: translateY(-1px); } .service-status:active { transform: translateY(0); } .status-dot { color: #10B981; /* 绿色 */ font-size: 0.75rem; animation: pulse 2s infinite; } .status-pulse { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; margin: 0 0.25rem; border-radius: 50%; background: var(--color-bg); border: 1px solid rgba(16, 185, 129, 0.2); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); cursor: pointer; transition: transform 0.2s ease, box-shadow 0.2s ease; flex-shrink: 0; } .status-pulse:hover { box-shadow: 0 6px 16px rgba(16, 185, 129, 0.2); } .status-pulse .pulse-dot { width: 8px; height: 8px; background: #10B981; border-radius: 50%; position: relative; z-index: 2; animation: pulse-dot 1.5s ease-in-out infinite; } .status-pulse .pulse-ring { position: absolute; width: 8px; height: 8px; border-radius: 50%; background: #10B981; animation: pulse-ring 1.5s ease-out infinite; z-index: 1; } .status-pulse.is-degraded { border-color: rgba(245, 158, 11, 0.25); } .status-pulse.is-degraded .pulse-dot, .status-pulse.is-degraded .pulse-ring { background: #F59E0B; } .status-pulse.is-offline { border-color: rgba(239, 68, 68, 0.25); } .status-pulse.is-offline .pulse-dot, .status-pulse.is-offline .pulse-ring { background: #EF4444; } .service-status.is-online .status-dot { color: #10B981; } .service-status.is-degraded .status-dot { color: #F59E0B; } .service-status.is-offline .status-dot { color: #EF4444; } /* 状态点脉冲动画 */ @keyframes pulse-dot { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(0.85); opacity: 0.6; } } /* 状态环扩散动画 */ @keyframes pulse-ring { 0% { transform: scale(0.8); opacity: 1; } 50% { transform: scale(2.8); opacity: 0.2; } 100% { transform: scale(4); opacity: 0; } } /* 回到顶部按钮 */ .scroll-top-btn { position: fixed; right: 1.5rem; bottom: 1.5rem; width: 48px; height: 48px; border-radius: 12px; border: 1px solid var(--color-border); background: var(--color-bg); color: var(--color-text); display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12); opacity: 0; pointer-events: none; transform: translateY(12px); transition: opacity 0.25s ease, transform 0.25s ease, background 0.2s ease; z-index: 30; } .scroll-top-btn.show { opacity: 1; pointer-events: auto; transform: translateY(0); } .scroll-top-btn:hover { background: var(--color-bg-light); } /* 4. 主标题样式 */ /* 英雄区域已移除 */ /* 功能指标网格 */ .metrics-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin-top: 2.5rem; padding-top: 2.5rem; border-top: 1px solid var(--color-border); } .metric-card-compact { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 1.5rem; border-radius: 12px; background: rgba(0, 47, 167, 0.03); border: 1px solid rgba(0, 47, 167, 0.08); transition: all 0.3s ease; } .metric-card-compact:hover { background: rgba(0, 47, 167, 0.06); border-color: rgba(0, 47, 167, 0.15); transform: translateY(-3px); box-shadow: 0 6px 16px rgba(0, 47, 167, 0.1); } .metric-icon { font-size: 2rem; color: var(--color-blue); margin-bottom: 0.75rem; } .metric-card-compact .metric-label { font-size: 0.95rem; font-weight: 600; color: var(--color-text); margin-bottom: 0.5rem; } .metric-card-compact .metric-value { font-size: 1.4rem; font-weight: 700; color: var(--color-blue); margin-bottom: 0.3rem; } .metric-card-compact .metric-desc { font-size: 0.8rem; color: var(--color-text-dim); line-height: 1.4; margin: 0; } .pill { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.4rem 0.9rem; border-radius: 999px; background: rgba(0, 47, 167, 0.06); color: var(--color-text); font-size: 0.875rem; border: 1px solid rgba(0, 47, 167, 0.12); transition: all 0.3s ease; white-space: nowrap; } .pill:hover { background: rgba(0, 47, 167, 0.1); border-color: rgba(0, 47, 167, 0.2); transform: translateY(-1px); } .pill i { color: var(--color-blue); font-size: 0.9rem; } .pill-primary { background: linear-gradient(135deg, rgba(0, 47, 167, 0.1), rgba(26, 74, 207, 0.08)); border-color: rgba(0, 47, 167, 0.2); font-weight: 600; color: var(--color-blue); } .pill-ghost { background: var(--color-bg); border-color: var(--color-border); color: var(--color-text); } .btn { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.8rem 1.2rem; border-radius: 10px; border: 1px solid var(--color-border); background: var(--color-bg); color: var(--color-text); text-decoration: none; font-weight: 600; transition: all 0.25s ease; cursor: pointer; } .btn-primary { background: linear-gradient(135deg, #002FA7, #1A4ACF); color: #fff; border-color: transparent; box-shadow: 0 10px 30px rgba(0, 47, 167, 0.25); } .btn-primary:hover { transform: translateY(-1px); box-shadow: 0 14px 34px rgba(0, 47, 167, 0.3); } .btn-ghost:hover { border-color: var(--color-blue); background: var(--color-bg-light); } .btn:active { transform: translateY(0); box-shadow: none; } .section-header { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 1rem; } .section-header--inline { flex-direction: row !important; align-items: center !important; justify-content: space-between !important; gap: 2rem !important; margin-bottom: 1.5rem !important; } .section-header__content { flex: 1; display: flex; flex-direction: row; align-items: center; gap: 1rem; } .section-header__content .section-title { flex-shrink: 0; margin: 0 !important; font-weight: 700; font-size: 1.25rem; white-space: nowrap; line-height: 1.2; } .section-header__content .section-lead { flex: 1; margin: 0 !important; font-weight: 400; color: var(--color-text-dim); font-size: 0.95rem; line-height: 1.5; } .section-header h2.section-title { display: flex !important; align-items: center !important; gap: 0.6rem !important; flex-wrap: nowrap !important; flex-direction: row !important; margin: 0 !important; flex-shrink: 0; } .section-header h2.section-title i { flex-shrink: 0; display: inline-flex !important; align-items: center; justify-content: center; } .section-header h2.section-title span { flex: 0 1 auto; overflow: hidden; text-overflow: ellipsis; } .section-lead { color: var(--color-text-dim); max-width: 720px; margin: 0; } /* 库类型切换按钮 */ /* 库类型切换开关 - From Uiverse.io */ .library-type-toggle { --_switch-bg-clr: #0066FC; --_switch-padding: 4px; --_slider-bg-clr: rgba(0, 102, 252, 0.4); --_slider-bg-clr-on: rgba(0, 102, 252, 0.9); --_slider-txt-clr: #ffffff; --_label-padding: 0.7rem 1.2rem; --_switch-easing: cubic-bezier(0.47, 1.64, 0.41, 0.8); color: white; width: fit-content; display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; position: relative; isolation: isolate; border-radius: 9999px; cursor: pointer; flex-shrink: 0 !important; align-self: center !important; } .library-type-toggle input[type="checkbox"] { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border-width: 0; } .toggle-btn { display: flex; align-items: center; gap: 0.5rem; transition: opacity 300ms ease-in-out 150ms; padding: var(--_label-padding); border: none; background: none; cursor: pointer; font-size: 0.9rem; font-weight: 500; color: var(--_slider-txt-clr); } .library-type-toggle::before, .library-type-toggle::after { content: ""; position: absolute; border-radius: inherit; transition: inset 150ms ease-in-out; } /* switch slider */ .library-type-toggle::before { background-color: var(--_slider-bg-clr); inset: var(--_switch-padding) 50% var(--_switch-padding) var(--_switch-padding); transition: inset 500ms var(--_switch-easing), background-color 500ms ease-in-out; z-index: -1; box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.2), 0 1px rgba(255, 255, 255, 0.2); } /* switch bg color */ .library-type-toggle::after { background-color: var(--_switch-bg-clr); inset: 0; z-index: -2; } /* switch hover & focus */ .library-type-toggle:focus-within::after { inset: -0.25rem; } /* active state - move slider to right */ .toggle-btn.active { opacity: 1; } .library-type-toggle:has(.toggle-btn.active:last-of-type)::before { background-color: var(--_slider-bg-clr-on); inset: var(--_switch-padding) var(--_switch-padding) var(--_switch-padding) 50%; } /* switch hover */ .library-type-toggle:hover .toggle-btn:first-of-type:not(.active), .library-type-toggle:hover .toggle-btn:last-of-type.active { opacity: 1; transition-delay: 0ms; transition-duration: 100ms; } .toggle-btn i { font-size: 1.1rem; } .section-lead.section-lead--single-line { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .hero-cta { display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.75rem; } .metric-label { color: var(--color-text-dim); font-size: 0.95rem; margin-bottom: 0.25rem; } .metric-value { font-size: 1.6rem; font-weight: 700; color: var(--color-text); } .metric-desc { color: var(--color-text-dim); margin-top: 0.25rem; font-size: 0.95rem; } .feature-section { max-width: 1280px; margin: 2rem auto; } .feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.25rem; } .feature-card { background: var(--color-bg-light); border: 1px solid var(--color-border); border-radius: 12px; padding: 1.25rem 1.5rem; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto auto; column-gap: 0.75rem; row-gap: 0.5rem; transition: all 0.3s ease; } .feature-card:hover { border-color: var(--color-blue); box-shadow: 0 10px 22px var(--shadow-color); transform: translateY(-3px); } .feature-icon { width: 2.5rem; height: 2.5rem; border-radius: 12px; background: rgba(0, 47, 167, 0.08); color: var(--color-blue); display: grid; place-items: center; font-size: 1.1rem; grid-column: 1; grid-row: 1; } .feature-card h3 { font-size: 1.2rem; margin: 0; grid-column: 2; grid-row: 1; align-self: center; } .feature-card p { color: var(--color-text-dim); margin: 0; grid-column: 1 / span 2; } .feature-bullets { list-style: none; padding: 0; margin: 0.25rem 0 0; display: grid; gap: 0.35rem; color: var(--color-text-dim); font-size: 0.95rem; grid-column: 1 / span 2; } .feature-bullets li { position: relative; padding-left: 1rem; } .feature-bullets li::before { content: '•'; position: absolute; left: 0; color: var(--color-blue); } /* 生态展示区 */ .ecosystem-section { max-width: 1280px; margin: 3rem auto; } .ecosystem-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1.25rem; } .ecosystem-card { background: var(--color-bg-light); border: 1px solid var(--color-border); border-radius: 12px; padding: 1.75rem 1rem; text-align: center; transition: all 0.3s ease; display: flex; flex-direction: column; align-items: center; gap: 0.75rem; } .ecosystem-card:hover { border-color: var(--color-blue); box-shadow: 0 10px 22px var(--shadow-color); transform: translateY(-5px); } .ecosystem-logo { width: 60px; height: 60px; border-radius: 50%; background: linear-gradient(135deg, rgba(0, 102, 252, 0.1), rgba(51, 133, 255, 0.05)); display: flex; align-items: center; justify-content: center; font-size: 1.8rem; color: var(--color-blue); transition: all 0.3s ease; } .ecosystem-card:hover .ecosystem-logo { background: linear-gradient(135deg, rgba(0, 102, 252, 0.2), rgba(51, 133, 255, 0.1)); transform: scale(1.1); } .ecosystem-card h3 { font-size: 1.1rem; margin: 0; color: var(--color-text); font-weight: 600; } .ecosystem-card p { font-size: 0.9rem; margin: 0; color: var(--color-text-dim); } .ecosystem-link { color: var(--color-blue); text-decoration: none; font-size: 0.95rem; font-weight: 500; transition: all 0.3s ease; padding: 0.5rem 0.75rem; border-radius: 6px; margin-top: 0.25rem; display: inline-block; } .ecosystem-link:hover { color: var(--color-white); background: var(--color-blue); } .cta-banner { max-width: 1280px; margin: 3rem auto 0; padding: 1.5rem 1.75rem; border-radius: 16px; border: 1px solid var(--color-border); background: linear-gradient(135deg, rgba(0, 47, 167, 0.08), rgba(26, 74, 207, 0.05)); display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; } .cta-text h2 { margin: 0 0 0.25rem; font-size: 1.35rem; } .cta-text p { margin: 0; color: var(--color-text-dim); } .cta-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; } /* 6. 主题切换按钮 - Uiverse 风格 */ .theme-toggle { width: 56px; height: 56px; border-radius: 50%; display: grid; padding: 0.5rem 1rem; height: 46px; cursor: pointer; line-height: 1; border: none; background: transparent; color: var(--color-text); transition: background 0.3s ease, border-color 0.3s ease, transform 0.2s ease; position: relative; } .theme-toggle:hover { background: transparent; border-color: transparent; transform: translateY(-1px) scale(1.05); } .theme-toggle:active { transform: translateY(0) scale(0.98); } .theme-input { display: none; } .icon { grid-column: 1 / 1; grid-row: 1 / 1; transition: transform 600ms cubic-bezier(0.34, 1.56, 0.64, 1), opacity 300ms ease; line-height: 0.1; display: flex; align-items: center; justify-content: center; } .icon--moon { transition-delay: 100ms; color: #b4b4b4; opacity: 1; } .icon--sun { transform: scale(0) rotate(-180deg); color: #ffa500; opacity: 0; } #themeSwitch:checked + .icon--moon { transform: rotate(180deg) scale(0); opacity: 0; transition-delay: 0ms; } #themeSwitch:checked ~ .icon--sun { transition-delay: 100ms; transform: scale(1) rotate(0deg); opacity: 1; } /* 7. 响应式适配 */ @media (max-width: 1320px) { .header { margin-left: 1.5rem; margin-right: 1.5rem; } } @media (max-width: 768px) { .header { padding: 1rem; margin: 0 1rem 1.5rem; } .header-actions .cdn-toggle { height: 50px; min-width: 150px; } .header-actions .service-status { height: 46px; min-width: auto; } .header-actions .theme-toggle { height: 46px; width: 46px; } .logo-svg { height: 2.6rem; } .logo-lockup { gap: 0.62rem; } .logo-mark { width: 2.75rem; height: 2.75rem; } .logo-title { font-size: 1.85rem; } .logo-subtitle { margin-top: 0.28rem; font-size: 0.78rem; } .header-actions { gap: 0.75rem; } .service-status { padding: 0.4rem 0.8rem; font-size: 0.85rem; } .status-text { display: none; /* 在移动端只显示状态点 */ } .header { position: relative; } .metrics-grid { grid-template-columns: repeat(2, 1fr); gap: 0.875rem; margin-top: 2rem; } .metric-card-compact { padding: 1.25rem 1rem; } .metric-icon { font-size: 1.75rem; margin-bottom: 0.5rem; } .metric-card-compact .metric-label { font-size: 0.9rem; margin-bottom: 0.4rem; } .metric-card-compact .metric-value { font-size: 1.2rem; margin-bottom: 0.2rem; } .metric-card-compact .metric-desc { font-size: 0.75rem; } .hero-cta { flex-direction: column; } .hero-cta .btn { width: 100%; justify-content: center; } .theme-toggle { padding: 0.4rem 0.8rem; font-size: 0.85rem; } } @media (max-width: 480px) { .header { flex-direction: column; gap: 1rem; text-align: center; } .container > .header { width: calc(100% + 2rem); margin-left: -1rem; margin-right: -1rem; padding-left: 1rem; padding-right: 1rem; } .cta-banner { padding: 1.25rem 1.1rem; flex-direction: column; align-items: flex-start; } .cta-actions { width: 100%; } .cta-actions .btn { flex: 1; justify-content: center; } } /* 8. 暗色主题适配 */ [data-theme="dark"] .theme-toggle { background: var(--color-bg-light); } [data-theme="dark"] .theme-toggle:hover { background: var(--color-bg); } [data-theme="dark"] .service-status { background: var(--color-bg-light); } /* =========================================== 🔍 搜索模块样式 (search.css) =========================================== */ /* 1. 搜索区域容器 */ .search-section { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding: 0 1.5rem; margin: 0 auto 1rem; position: relative; z-index: 1; } /* 不再使用“向下滚动提示”(搜索框顶部布局) */ .search-section::before, .search-section::after { display: none; } /* 2. 搜索框输入区域 */ .search-input-wrapper { position: relative; display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1rem 0.75rem 1.5rem; background: linear-gradient(135deg, rgba(0, 47, 167, 0.05), rgba(26, 74, 207, 0.03)); border: 2px solid var(--color-border); border-radius: 20px; transition: all 0.3s ease; box-shadow: 0 8px 32px rgba(0, 47, 167, 0.12); width: 100%; max-width: 800px; } .search-input-wrapper:focus-within { border-color: var(--color-blue); box-shadow: 0 8px 24px rgba(0, 47, 167, 0.15); background: linear-gradient(135deg, rgba(0, 47, 167, 0.08), rgba(26, 74, 207, 0.05)); } .search-icon { color: var(--color-blue); font-size: 1.25rem; flex-shrink: 0; } /* 3. 输入框样式 */ .search-input { flex: 1; padding: 1rem 0.75rem; font-size: 1.15rem; border: none; background: transparent; color: var(--color-text); transition: all 0.3s ease; } .search-input::placeholder { color: var(--color-text-dim); opacity: 0.6; } .search-input:focus { outline: none; } .search-shortcut { flex: 0 0 auto; min-width: 3.3rem; height: 2.35rem; display: inline-flex; align-items: center; justify-content: center; padding: 0 0.75rem; border: 1px solid rgba(0, 82, 217, 0.18); border-radius: 10px; background: rgba(255, 255, 255, 0.74); box-shadow: inset 0 -1px 0 rgba(0, 82, 217, 0.08), 0 6px 14px rgba(0, 82, 217, 0.08); color: #0052D9; font-family: "Sora", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 0.78rem; font-weight: 700; letter-spacing: 0; line-height: 1; white-space: nowrap; user-select: none; } .search-btn { flex-shrink: 0; width: 48px; height: 48px; border-radius: 12px; border: none; background: linear-gradient(135deg, #002FA7, #1A4ACF); color: #fff; font-size: 1.1rem; cursor: pointer; transition: all 0.25s ease; display: grid; place-items: center; box-shadow: 0 4px 12px rgba(0, 47, 167, 0.25); } .search-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0, 47, 167, 0.3); } .search-btn:active { transform: translateY(0); } .fontawesome-section { width: 100%; max-width: 1280px; margin: 2rem auto 2.5rem; padding: 0 1.5rem; } .fa-search-meta { display: inline-flex; align-items: center; gap: 0.6rem; padding: 0.55rem 0.75rem; border: 1px solid rgba(0, 82, 217, 0.12); border-radius: 8px; background: rgba(255, 255, 255, 0.7); color: var(--color-text-dim); font-size: 0.82rem; white-space: nowrap; } .fa-search-meta strong { color: #0052D9; font-weight: 800; } .fa-search-panel { margin-top: 1rem; padding: 1.25rem; border: 1px solid var(--color-border); border-radius: 8px; background: rgba(255, 255, 255, 0.78); box-shadow: 0 10px 28px rgba(0, 47, 167, 0.08); } .fa-search-input-wrap { display: flex; align-items: center; gap: 0.85rem; height: 56px; padding: 0 1rem; border: 1px solid rgba(0, 82, 217, 0.16); border-radius: 8px; background: #fff; color: #0052D9; } .fa-search-input-wrap:focus-within { border-color: #0052D9; box-shadow: 0 0 0 4px rgba(0, 82, 217, 0.08); } .fa-search-input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--color-text); font-size: 1rem; } .fa-search-input::placeholder { color: var(--color-text-dim); opacity: 0.72; } .fa-search-hints { display: flex; flex-wrap: wrap; gap: 0.65rem; margin: 0.85rem 0 1rem; color: var(--color-text-dim); font-size: 0.82rem; } .fa-search-hints span { display: inline-flex; align-items: center; gap: 0.35rem; } .fa-search-hints code, .fa-icon-title-row code { font-family: "Roboto Mono", "SFMono-Regular", Consolas, monospace; color: #0052D9; background: rgba(0, 82, 217, 0.07); border-radius: 6px; padding: 0.12rem 0.38rem; } .fa-search-results { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0.8rem; min-height: 88px; } .fa-search-empty { grid-column: 1 / -1; min-height: 88px; display: flex; align-items: center; justify-content: center; gap: 0.65rem; border: 1px dashed rgba(0, 82, 217, 0.2); border-radius: 8px; color: var(--color-text-dim); background: rgba(0, 82, 217, 0.03); } .fa-search-empty i { color: #0052D9; font-size: 1.2rem; } .fa-icon-card { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 0.75rem; align-items: center; min-height: 92px; padding: 0.85rem; border: 1px solid rgba(0, 82, 217, 0.12); border-radius: 8px; background: #fff; } .fa-icon-preview { width: 52px; height: 52px; display: flex; align-items: center; justify-content: center; border-radius: 8px; background: rgba(0, 82, 217, 0.07); color: #0052D9; font-size: 1.55rem; } .fa-icon-main { min-width: 0; } .fa-icon-title-row { display: flex; align-items: center; gap: 0.5rem; min-width: 0; } .fa-icon-title-row h3 { margin: 0; overflow: hidden; color: var(--color-text); font-size: 0.98rem; font-weight: 800; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; } .fa-icon-main p { margin: 0.28rem 0 0; overflow: hidden; color: var(--color-text-dim); font-family: "Roboto Mono", "SFMono-Regular", Consolas, monospace; font-size: 0.78rem; text-overflow: ellipsis; white-space: nowrap; } .fa-icon-styles { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.48rem; } .fa-icon-styles span { padding: 0.12rem 0.38rem; border-radius: 999px; background: rgba(0, 82, 217, 0.07); color: #0052D9; font-size: 0.68rem; font-weight: 700; } .fa-icon-actions { display: flex; gap: 0.38rem; } .fa-icon-actions button { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid rgba(0, 82, 217, 0.14); border-radius: 8px; background: #fff; color: #0052D9; cursor: pointer; } .fa-icon-actions button:hover { border-color: #0052D9; background: rgba(0, 82, 217, 0.06); } .fonts-section { width: 100%; max-width: 1280px; margin: 2rem auto 2.5rem; padding: 0 1.5rem; } .font-count { padding: 0.55rem 0.75rem; border: 1px solid rgba(0, 82, 217, 0.12); border-radius: 8px; background: rgba(255, 255, 255, 0.7); color: #0052D9; font-size: 0.82rem; font-weight: 800; white-space: nowrap; } .font-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 0.85rem; margin-top: 1rem; } .font-card, .font-empty { border: 1px solid rgba(0, 82, 217, 0.12); border-radius: 8px; background: rgba(255, 255, 255, 0.78); box-shadow: 0 10px 28px rgba(0, 47, 167, 0.06); } .font-card { display: flex; flex-direction: column; gap: 0.75rem; min-height: 176px; padding: 1rem; } .font-card__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.75rem; } .font-card__header h3 { margin: 0; color: var(--color-text); font-size: 1.05rem; font-weight: 800; line-height: 1.2; } .font-card__header span { flex: 0 0 auto; padding: 0.18rem 0.45rem; border-radius: 999px; background: rgba(0, 82, 217, 0.07); color: #0052D9; font-size: 0.72rem; font-weight: 800; } .font-card__meta { margin: 0; color: var(--color-text-dim); font-size: 0.86rem; } .font-card__sample { margin: 0; overflow: hidden; color: var(--color-text); font-family: "Google Sans", var(--font-en); font-size: 1.12rem; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; } .font-card__sample.is-mono { font-family: var(--font-code); font-size: 0.95rem; } .font-card__footer { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin-top: auto; } .font-card__footer code { overflow: hidden; color: #0052D9; font-family: var(--font-code); font-size: 0.8rem; text-overflow: ellipsis; white-space: nowrap; } .font-card__footer button { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid rgba(0, 82, 217, 0.14); border-radius: 8px; background: #fff; color: #0052D9; cursor: pointer; } .font-card__footer button:hover { border-color: #0052D9; background: rgba(0, 82, 217, 0.06); } .font-empty { grid-column: 1 / -1; padding: 1.5rem; color: var(--color-text-dim); text-align: center; } /* 4. 搜索结果区域 */ .search-results { position: absolute; top: calc(100% + 0.5rem); left: 0; right: 0; background: var(--color-bg); border: 1px solid var(--color-border); border-radius: 12px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); z-index: 1000; max-height: 400px; overflow-y: auto; display: none; } /* 5. 搜索结果项 */ .search-result-item { padding: 1rem; border-bottom: 1px solid var(--color-border); transition: all 0.3s ease; cursor: pointer; } .search-result-item:last-child { border-bottom: none; } .search-result-item:hover { background: var(--color-bg-light); } /* 6. 搜索结果内容样式 */ .search-result-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 0.5rem; } /* 在 search.css 模块中搜索结果图标的样式部分添加 */ .search-result-icon { font-size: 1.25rem; width: 1.5rem; text-align: center; } /* CSS 图标保持蓝色 */ .search-result-icon.fa-css { color: var(--color-blue); } /* JS 图标使用 JavaScript 标准黄色 */ .search-result-icon.fa-js { color: var(--color-yellow); } .search-result-name { font-weight: 600; color: var(--color-text); } .search-result-desc { color: var(--color-text-dim); font-size: 0.9rem; margin-bottom: 0.75rem; } /* 7. 搜索结果链接样式 */ .search-result-url { display: block; font-family: var(--font-code); font-size: 0.85rem; color: var(--color-blue); background: var(--color-bg-light); padding: 0.5rem; border-radius: 6px; margin-bottom: 0.5rem; word-break: break-all; } /* 8. 搜索结果操作按钮 */ .search-result-actions { display: flex; gap: 0.5rem; justify-content: flex-end; } .search-copy-btn { padding: 0.4rem 0.8rem; border: 1px solid var(--color-border); border-radius: 6px; background: var(--color-bg); color: var(--color-text); font-size: 0.85rem; cursor: pointer; transition: all 0.2s ease; display: flex; align-items: center; gap: 0.4rem; } .search-copy-btn:hover { background: var(--color-bg-light); border-color: var(--color-blue); } .search-copy-btn i { font-size: 0.9rem; color: var(--color-blue); } .search-download-btn i { color: var(--color-green); } .search-download-btn:hover { border-color: var(--color-green); } /* 9. 加载状态 */ .search-loading { display: flex; align-items: center; justify-content: center; gap: 0.75rem; padding: 3rem; color: var(--color-text-dim); } .search-loading i { font-size: 1.5rem; color: var(--color-blue); animation: spin 1s linear infinite; } /* 10. 空状态 */ .search-empty { padding: 2rem; text-align: center; color: var(--color-text-dim); } /* 11. 滚动条美化 */ .search-results::-webkit-scrollbar { width: 8px; } .search-results::-webkit-scrollbar-track { background: var(--color-bg-light); border-radius: 4px; } .search-results::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: 4px; } .search-results::-webkit-scrollbar-thumb:hover { background: var(--color-text-dim); } /* 12. 响应式适配 */ @media (max-width: 1320px) { .search-section { padding: 0 1.5rem; margin: 0 auto 1rem; } } @media (max-width: 768px) { .search-section { padding: 0 1rem; margin: 0 auto 1rem; } .search-input-wrapper { padding: 0.6rem 0.75rem 0.6rem 1.25rem; border-radius: 16px; max-width: 100%; } .search-icon { font-size: 1.1rem; } .search-input { padding: 0.7rem 0.4rem; font-size: 0.95rem; } .search-shortcut { display: none; } .search-btn { width: 42px; height: 42px; font-size: 1rem; } .search-result-item { padding: 0.75rem; } .search-result-header { gap: 0.75rem; } .search-result-icon { font-size: 1.1rem; } .search-result-desc { font-size: 0.85rem; } .search-result-url { font-size: 0.8rem; padding: 0.4rem; } .search-copy-btn { padding: 0.3rem 0.6rem; font-size: 0.8rem; } } /* 13. 暗色主题适配 */ [data-theme="dark"] .search-results { box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); } [data-theme="dark"] .search-copy-btn:hover { background: var(--color-bg); } /* =========================================== 📚 热门推荐模块样式 (popular.css) =========================================== */ /* 1. 主体容器 */ .fixed-section { max-width: 1280px; margin: 0 auto 2rem; padding: 0; } /* 2. 列表容器 */ .library-list { position: relative; background: var(--color-bg-light); border-radius: 12px; padding: 2rem; transition: all 0.3s ease; } .library-list.is-loading { min-height: 220px; } .library-loading-overlay { position: absolute; inset: 0; z-index: 5; display: flex; align-items: center; justify-content: center; gap: 0.65rem; border-radius: inherit; color: var(--color-text); font-size: 0.95rem; font-weight: 600; background: rgba(255, 255, 255, 0.72); backdrop-filter: blur(3px); animation: fadeIn 0.16s ease-out; } [data-theme="dark"] .library-loading-overlay { background: rgba(15, 23, 42, 0.68); } .library-list.switching-in { animation: listFadeIn 0.22s ease forwards; } /* 3. 库卡片基础样式 */ .lib-item { background: var(--color-bg); border: 1px solid var(--color-border); border-radius: 12px; padding: 1.5rem; margin-bottom: 1rem; transition: all 0.3s ease; animation: slideInUp 0.4s ease; } .lib-item:hover { transform: translateY(-2px); box-shadow: 0 8px 16px var(--shadow-color); border-color: var(--color-blue); } .lib-item.single-line-view { padding: 1rem 1.25rem; margin-bottom: 0.75rem; border-radius: 10px; animation: none; } .lib-item.single-line-view .lib-content { gap: 0.75rem; } .lib-item.single-line-view .lib-main-row { flex-wrap: nowrap; gap: 1rem; min-width: 0; } .lib-item.single-line-view .lib-icon { width: 1.75rem; flex: 0 0 1.75rem; font-size: 1.15rem; } .lib-item.single-line-view .lib-name-group { flex: 0 1 15rem; min-width: 0; gap: 0.55rem; } .lib-item.single-line-view .lib-name { max-width: none; font-size: 1rem; } .lib-item.single-line-view .github-badge, .lib-item.single-line-view .tag-badge, .lib-item.single-line-view .version-badge, .lib-item.single-line-view .update-badge, .lib-item.single-line-view .latest-update-badge { flex: 0 0 auto; padding: 0.2rem 0.6rem; font-size: 0.78rem; line-height: 1.2; } .lib-item.single-line-view .lib-description { flex: 1 1 auto; min-width: 8rem; margin-top: 0; overflow: hidden; color: var(--color-text-dim); font-size: 0.86rem; text-overflow: ellipsis; white-space: nowrap; } .lib-item.single-line-view .lib-tags, .lib-item.single-line-view .version-info { flex: 0 0 auto; } .lib-item.single-line-view .version-info { gap: 0.55rem; margin-left: auto; } .lib-item.single-line-view .update-badge { margin-left: auto; } .lib-item.single-line-view .lib-url-row { gap: 0.65rem; padding: 0.55rem 0.65rem; } .lib-item.single-line-view .lib-url { min-width: 0; font-size: 0.82rem; } .lib-item.single-line-view .copy-actions { flex: 0 0 auto; } /* 4. 卡片内容布局 */ .lib-content { display: flex; flex-direction: column; gap: 1rem; } .lib-main-row { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; } /* 5. 图标样式 */ .lib-icon { font-size: 1.5rem; color: var(--color-blue); width: 2.5rem; text-align: center; } /* 6. 名称和描述 */ .lib-name-group { display: flex; align-items: center; gap: 1rem; flex: 1; } .lib-name { text-decoration: none; font-size: 1.25rem; font-weight: 600; color: var(--color-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; /* 根据需要调整 */ } .lib-name:hover { color: var(--color-blue); } .lib-description { color: var(--color-text-dim); font-size: 0.95rem; flex: 2; } /* 7. GitHub 徽章 */ .github-badge { display: flex; align-items: center; gap: 0.5rem; text-decoration: none; color: var(--color-text-dim); font-size: 0.9rem; padding: 0.25rem 0.75rem; border-radius: 20px; background: var(--color-bg-light); transition: all 0.3s ease; } .github-badge:hover { background: var(--color-bg); color: var(--color-blue); } .github-stars { display: flex; align-items: center; gap: 0.25rem; } /* GitHub 星星样式 */ .github-stars i { color: #f1c40f; } .github-badge:hover .github-stars i { color: #f39c12; } /* 8. 标签样式 */ .lib-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; } .tag-badge { font-size: 0.85rem; padding: 0.25rem 0.75rem; border-radius: 20px; background: var(--color-bg-light); color: var(--color-text-dim); } /* 9. 版本信息 */ .version-info { display: flex; align-items: center; gap: 1rem; margin-left: auto; } .version-badge { font-size: 0.85rem; padding: 0.25rem 0.75rem; border-radius: 20px; background: var(--color-bg-light); color: var(--color-blue); } .update-badge { display: flex; align-items: center; gap: 0.5rem; font-size: 0.85rem; color: var(--color-text-dim); } .update-badge.latest { color: var(--color-blue); } /* 10. URL 区域 */ .lib-url-row { display: flex; align-items: center; gap: 1rem; background: var(--color-bg-light); padding: 0.75rem; border-radius: 8px; } .lib-url { font-family: var(--font-code); font-size: 0.9rem; color: var(--color-text); flex: 1; overflow-x: auto; white-space: nowrap; } /* 11. 复制按钮组 */ .copy-actions { display: flex; gap: 0.5rem; } .copy-btn { width: 2rem; height: 2rem; padding: 0; border: 1px solid var(--color-border); border-radius: 6px; background: var(--color-bg); color: var(--color-text); font-size: 0.85rem; cursor: pointer; transition: all 0.2s ease; display: flex; align-items: center; justify-content: center; flex: 0 0 2rem; aspect-ratio: 1 / 1; } .copy-btn:hover { background: var(--color-bg-light); border-color: var(--color-blue); } .copy-btn i { font-size: 0.9rem; color: var(--color-blue); } .copy-btn.download-btn i { color: var(--color-green); } .copy-btn.download-btn:hover { border-color: var(--color-green); } /* 12. 加载和错误状态 */ .loading { display: flex; align-items: center; justify-content: center; gap: 0.75rem; padding: 3rem; color: var(--color-text-dim); animation: fadeInScale 0.3s ease-out; min-height: 120px; } .loading.show { animation: fadeInScale 0.3s ease-out; } .loading-spinner-svg { width: 2rem; height: 2rem; flex: 0 0 auto; display: block; } .error { padding: 2rem; text-align: center; color: var(--color-text-dim); } .error-detail { margin-top: 0.5rem; font-size: 0.9rem; color: var(--color-red); } /* 13. 响应式适配 */ @media (max-width: 1320px) { .fixed-section { margin-left: 1.5rem; margin-right: 1.5rem; } } @media (max-width: 1200px) { .lib-main-row { gap: 1rem; } .lib-description { flex: 1 0 100%; margin-top: 0.5rem; } } @media (max-width: 768px) { .fixed-section { margin: 1.5rem 1rem; padding: 0; } .section-header--inline { flex-direction: column !important; align-items: flex-start !important; gap: 1rem !important; } .section-header__content { flex-direction: column !important; gap: 0.4rem; width: 100%; } .library-type-toggle { --_label-padding: 0.6rem 1.2rem; width: fit-content; align-self: flex-start !important; } .toggle-btn { padding: var(--_label-padding); font-size: 0.85rem; } .library-list { padding: 1.5rem; } .lib-item { padding: 1rem; } .lib-name { font-size: 1.1rem; } .lib-description { font-size: 0.9rem; } .lib-url { font-size: 0.85rem; } .version-info { flex-wrap: wrap; margin-left: 0; margin-top: 0.5rem; } .lib-item.single-line-view .lib-main-row { flex-wrap: wrap; gap: 0.75rem; } .lib-item.single-line-view .lib-name-group, .lib-item.single-line-view .lib-description, .lib-item.single-line-view .version-info { flex: 1 1 100%; } .lib-item.single-line-view .version-info { margin-left: 0; margin-top: 0; } .lib-item.single-line-view .lib-url-row { align-items: stretch; flex-direction: column; } .lib-item.single-line-view .copy-actions { align-self: flex-end; } } /* 14. 暗色主题适配 */ [data-theme="dark"] .lib-url-row { background: var(--color-bg); } [data-theme="dark"] .copy-btn:hover { background: var(--color-bg); } /* =========================================== 📖 FAQ与使用说明样式 (faq.css) =========================================== */ /* 1. 主体容器 */ .section-group-wrapper { margin: 5rem auto; max-width: 1360px; padding: 0; } /* 2. 网格布局 - 完美左右两栏 */ .section-group { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: flex-start; } /* 3. 区域基础样式 */ .usage-section, .faq-section { background: linear-gradient(135deg, var(--color-bg-light) 0%, rgba(255, 255, 255, 0.02) 100%); border: 1px solid var(--color-border); border-radius: 16px; padding: 2.5rem; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05); transition: all 0.3s ease; } .usage-section:hover, .faq-section:hover { box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1); border-color: var(--color-blue); } /* 4. 标题样式:复用全局 .section-title 定义 */ .usage-section .section-title, .faq-section .section-title { margin-bottom: 1.5rem; font-size: 1.5rem; font-weight: 700; } .usage-section .section-title i, .faq-section .section-title i { margin-right: 0.5rem; color: var(--color-blue); } /* 5. 使用说明样式 */ .section-content { display: flex; flex-direction: column; gap: 1.5rem; } .usage-step { margin-bottom: 0.5rem; } .step-label { display: flex; align-items: center; gap: 0.5rem; color: var(--color-text); margin-bottom: 0.5rem; } .step-label i { color: var(--color-blue); font-size: 0.9rem; } /* 6. 代码框样式 */ .code-box { background: var(--color-bg); border: 1.5px solid var(--color-border); border-radius: 10px; padding: 1.2rem; margin: 0.75rem 0; position: relative; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); overflow: hidden; } .code-box::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--color-blue), var(--color-cyan)); opacity: 0; transition: opacity 0.3s ease; } .code-box:hover { border-color: var(--color-blue); box-shadow: 0 4px 16px rgba(0, 102, 252, 0.15); } .code-box:hover::before { opacity: 1; } .code-box code { font-family: var(--font-code); font-size: 0.9rem; color: var(--color-text); display: block; overflow-x: auto; } .url-label { position: absolute; right: 1rem; top: 1rem; font-size: 0.8rem; color: var(--color-text-dim); } /* 7. 复制按钮 */ .copy-btn-inline { position: absolute; right: 1rem; bottom: 1rem; padding: 0.4rem 0.8rem; border: 1px solid var(--color-border); border-radius: 6px; background: var(--color-bg); color: var(--color-text); font-size: 0.85rem; cursor: pointer; transition: all 0.2s ease; display: flex; align-items: center; gap: 0.4rem; } .copy-btn-inline:hover { background: var(--color-bg-light); border-color: var(--color-blue); } .copy-btn-inline i { color: var(--color-blue); } /* 8. 使用提示样式 */ .usage-tips { margin-top: 1.5rem; padding: 1.5rem; background: linear-gradient(135deg, rgba(0, 102, 252, 0.05) 0%, rgba(0, 102, 252, 0.02) 100%); border-left: 4px solid var(--color-blue); border-radius: 8px; transition: all 0.3s ease; } .usage-tips:hover { background: linear-gradient(135deg, rgba(0, 102, 252, 0.1) 0%, rgba(0, 102, 252, 0.05) 100%); } .tips-list { list-style: none; padding: 0; margin: 0; } .tips-list li { position: relative; padding-left: 1.75rem; margin-bottom: 0.75rem; color: var(--color-text-dim); line-height: 1.5; transition: all 0.2s ease; } .tips-list li:hover { color: var(--color-text); padding-left: 2rem; } .tips-list li::before { content: '✓'; position: absolute; left: 0; color: var(--color-blue); font-weight: 600; } /* 9. FAQ样式 */ .faq-list { display: flex; flex-direction: column; gap: 1.25rem; } .faq-item { margin-bottom: 0; padding: 1.25rem; background: var(--color-bg); border: 1px solid var(--color-border); border-radius: 10px; transition: all 0.3s ease; } .faq-item:hover { background: var(--color-bg-light); border-color: var(--color-blue); box-shadow: 0 4px 16px rgba(0, 102, 252, 0.1); transform: translateY(-2px); } .faq-question { display: flex; align-items: flex-start; gap: 0.75rem; font-size: 1.05rem; font-weight: 600; color: var(--color-text); margin-bottom: 0.75rem; } .faq-question i { color: var(--color-blue); margin-top: 2px; flex-shrink: 0; } .faq-answer { color: var(--color-text-dim); line-height: 1.6; margin: 0; font-size: 0.95rem; } /* 10. 响应式适配 */ @media (max-width: 1320px) { .section-group-wrapper { margin-left: 1.5rem; margin-right: 1.5rem; } } @media (max-width: 1024px) { .section-group { gap: 2.5rem; } .usage-section, .faq-section { padding: 2rem; } } @media (max-width: 768px) { .section-group-wrapper { margin: 3rem 1rem; padding: 0; } .section-group { grid-template-columns: 1fr; gap: 2rem; } .usage-section, .faq-section { padding: 1.5rem; } .usage-section .section-title, .faq-section .section-title { font-size: 1.25rem; margin-bottom: 1.25rem; } .code-box { padding: 1rem; font-size: 0.85rem; } .code-box code { font-size: 0.85rem; } .copy-btn-inline { padding: 0.35rem 0.65rem; font-size: 0.8rem; } .faq-question { font-size: 1rem; } .faq-answer { font-size: 0.9rem; } .tips-list li { padding-left: 1.5rem; } .usage-tips { padding: 1.25rem; } } /* 11. 暗色主题适配 */ [data-theme="dark"] .usage-section, [data-theme="dark"] .faq-section { background: linear-gradient(135deg, rgba(13, 13, 13, 0.8) 0%, rgba(13, 13, 13, 0.5) 100%); border-color: rgba(255, 255, 255, 0.08); } [data-theme="dark"] .usage-section:hover, [data-theme="dark"] .faq-section:hover { border-color: var(--color-blue); } [data-theme="dark"] .code-box { background: rgba(0, 0, 0, 0.3); border-color: rgba(255, 255, 255, 0.08); } [data-theme="dark"] .code-box:hover { border-color: var(--color-blue); box-shadow: 0 4px 16px rgba(0, 102, 252, 0.2); } [data-theme="dark"] .faq-item { background: rgba(0, 0, 0, 0.3); border-color: rgba(255, 255, 255, 0.08); } [data-theme="dark"] .faq-item:hover { background: rgba(0, 102, 252, 0.05); border-color: var(--color-blue); } [data-theme="dark"] .usage-tips { background: linear-gradient(135deg, rgba(0, 102, 252, 0.1) 0%, rgba(0, 102, 252, 0.05) 100%); border-left-color: var(--color-blue); } [data-theme="dark"] .copy-btn-inline { background: rgba(0, 0, 0, 0.3); border-color: rgba(255, 255, 255, 0.08); } [data-theme="dark"] .copy-btn-inline:hover { background: rgba(0, 102, 252, 0.1); border-color: var(--color-blue); } /* =========================================== 👣 页脚样式 (footer.css) =========================================== */ /* 1. 页脚容器 - 全宽黑色背景 */ .footer { background: #0A0A0A !important; color: #999999; margin-top: 4rem; padding: 3rem 0 0 0; border-top: 1px solid #1a1a1a; width: 100%; left: 0; right: 0; box-sizing: border-box; margin-left: 0; margin-right: 0; position: relative; z-index: 10; } /* 2. 页脚内容网格布局 */ .footer-content { max-width: 1280px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 2rem; } /* 3. 页脚列 */ .footer-column { display: flex; flex-direction: column; gap: 0.75rem; } .footer-column-title { font-size: 1rem; font-weight: 600; color: #ffffff; margin: 0 0 0.5rem; line-height: 1.4; } .footer-links-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.5rem; } .footer-links-list li { margin: 0; } .footer-links-list a { color: #999999; text-decoration: none; transition: all 0.3s ease; display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.9rem; } .footer-links-list a:hover { color: #ffffff; transform: translateX(3px); } .footer-links-list i { font-size: 0.9rem; color: #0066FC; } /* 4. 页脚底部 */ .footer-bottom { max-width: 100%; margin-top: 2rem; padding: 1.5rem 0; border-top: 1px solid #1a1a1a; background: #000000 !important; width: 100%; margin-left: 0; margin-right: 0; } .footer-bottom-content { max-width: 1280px; margin: 0 auto; text-align: center; font-size: 0.85rem; display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; flex-wrap: wrap; } .footer-copyright { margin: 0 0 0.5rem; color: #666666; } .footer-icp { display: inline-flex; align-items: center; color: #7a7a7a; font-size: 0.82rem; line-height: 1.4; } .footer-copyright a { color: #0066FC; text-decoration: none; transition: all 0.3s ease; font-weight: 500; } .footer-copyright a:hover { color: #3385FF; } .footer-slogan { margin: 0; color: #555555; font-style: italic; } .footer-bottom-content .service-status { margin-left: auto; } /* 5. 响应式适配 */ @media (max-width: 1024px) { .footer-content { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; } } @media (max-width: 768px) { .footer { padding: 2rem 0; margin-top: 3rem; } .footer-content { grid-template-columns: 1fr; gap: 1.5rem; } .footer-links-list a { font-size: 0.85rem; } } /* =========================================== ✨ 动画效果样式 (animations.css) =========================================== */ /* 1. 基础动画关键帧 */ @keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } } @keyframes fadeOut { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(10px); } } @keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } } /* 库列表切换动画 */ @keyframes fadeInScale { from { opacity: 0; transform: scale(0.98); } to { opacity: 1; transform: scale(1); } } @keyframes listFadeIn { from { opacity: 0.68; } to { opacity: 1; } } @keyframes fadeOutScale { from { opacity: 1; transform: scale(1); } to { opacity: 0; transform: scale(0.98); } } @keyframes slideInUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } } @keyframes slideOutDown { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(10px); } } @keyframes pulse-scale { 0% { transform: scale(1); } 50% { transform: scale(1.05); } 100% { transform: scale(1); } } @keyframes slideIn { from { transform: translateX(-20px); opacity: 0; } to { transform: translateX(0); opacity: 1; } } /* 2. 加载动画 */ .loading { display: flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 2rem; color: var(--color-text-dim); animation: fadeIn 0.3s ease; } .fa-spin { animation: spin 1s linear infinite; } /* 3. 复制成功动画 */ .copy-success { animation: fadeIn 0.3s ease; } .copy-error { animation: pulse-scale 0.3s ease; } /* 4. 卡片悬停动画 */ .hover-lift { transition: transform 0.3s ease, box-shadow 0.3s ease; } .hover-lift:hover { transform: translateY(-5px); box-shadow: 0 8px 16px var(--shadow-color); } /* 5. 按钮点击动画 */ .btn-press { transition: transform 0.2s ease; } .btn-press:active { transform: scale(0.95); } /* 6. 列表项动画 */ .list-item-appear { animation: slideIn 0.3s ease forwards; opacity: 0; } /* 7. 过渡效果类 */ .transition-all { transition: all 0.3s ease; } .transition-transform { transition: transform 0.3s ease; } .transition-opacity { transition: opacity 0.3s ease; } /* 8. 动画延迟类 */ .delay-100 { animation-delay: 100ms; } .delay-200 { animation-delay: 200ms; } .delay-300 { animation-delay: 300ms; } .delay-400 { animation-delay: 400ms; } .delay-500 { animation-delay: 500ms; } /* 9. 动画持续时间类 */ .duration-300 { animation-duration: 300ms; } .duration-500 { animation-duration: 500ms; } .duration-700 { animation-duration: 700ms; } .duration-1000 { animation-duration: 1000ms; } /* 10. 动画缓动函数类 */ .ease-in-out { animation-timing-function: ease-in-out; } .ease-out { animation-timing-function: ease-out; } .ease-in { animation-timing-function: ease-in; } .linear { animation-timing-function: linear; } /* 11. 动画工具类 */ .animate-once { animation-iteration-count: 1; } .animate-infinite { animation-iteration-count: infinite; } .animate-hover { animation-play-state: paused; } .animate-hover:hover { animation-play-state: running; } /* 12. 响应式适配 */ @media (max-width: 768px) { .hover-lift:hover { transform: none; box-shadow: none; } .animate-mobile-none { animation: none !important; transition: none !important; } } /* =========================================== 📱 响应式适配 (responsive.css) =========================================== */ /* 1. 大屏幕适配 (1320px以上) */ @media (min-width: 1321px) { .container { max-width: 1280px; margin: 0 auto; padding: 0; } } /* 2. 桌面端适配 (1320px) */ @media (max-width: 1320px) { /* 布局容器 */ .container, .fixed-section, .advantage-section, .section-group-wrapper, .search-section, .header, .footer { margin-left: 1.5rem; margin-right: 1.5rem; } } /* 3. 平板电脑适配 (1200px) */ @media (max-width: 1200px) { /* 网格布局调整 */ .advantage-list { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; } .section-group { grid-template-columns: 1fr; gap: 1.5rem; } /* 卡片内容调整 */ .lib-main-row { gap: 1rem; } .lib-description { flex: 1 0 100%; margin-top: 0.5rem; } } /* 4. 平板/大手机适配 (768px) */ @media (max-width: 768px) { /* 通用间距调整 */ .container { margin: 0 1rem; } /* 头部样式 */ .header { padding: 1rem; margin: 0 1rem 1.5rem; } .metrics-grid { grid-template-columns: repeat(2, 1fr); gap: 0.875rem; margin-top: 2rem; margin-bottom: 2rem; } /* 搜索区域 */ .search-section { margin: 1.5rem 1rem; padding: 0; } .search-input { padding: 0.75rem 1rem; font-size: 0.9rem; } /* 服务优势区域 */ .advantage-section { margin: 1.5rem 1rem; padding: 1.5rem; } .advantage-list { grid-template-columns: 1fr; gap: 1rem; } /* 热门推荐区域 */ .fixed-section { margin: 1.5rem 1rem; padding: 0; } .library-list { padding: 1.5rem; } .lib-item { padding: 1rem; } /* FAQ与使用说明 */ .section-group-wrapper { margin: 2rem 1rem; padding: 0; } .usage-section, .faq-section { padding: 1.5rem; } /* 页脚样式 */ .footer { margin: 3rem 1rem 0; padding: 1.5rem 0; } } /* 5. 小屏手机适配 (480px) */ @media (max-width: 480px) { /* 头部样式 */ .header { flex-direction: column; gap: 1rem; text-align: center; } /* 指标网格响应式 */ .metrics-grid { grid-template-columns: 1fr; gap: 0.75rem; margin-top: 1.5rem; } .metric-card-compact { padding: 1rem; } .metric-icon { font-size: 1.5rem; margin-bottom: 0.5rem; } .metric-card-compact .metric-label { font-size: 0.85rem; } .metric-card-compact .metric-value { font-size: 1.1rem; } .metric-card-compact .metric-desc { font-size: 0.7rem; } /* 标签组样式 */ .lib-tags { justify-content: center; } /* 按钮组样式 */ .copy-actions { flex-direction: column; align-items: stretch; } } /* 6. 触摸屏优化 */ @media (hover: none) { .hover-lift:hover { transform: none; box-shadow: none; } .animate-hover { animation: none !important; } } /* 7. 高分屏适配 */ @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) { .logo-svg { transform: translateZ(0); } } /* 8. 打印样式优化 */ @media print { .theme-toggle, .copy-actions, .search-section { display: none !important; } .container { margin: 0; padding: 0; } body { background: white; color: black; } } @media (max-width: 768px) { .fonts-section { padding: 0 1rem; margin: 1.5rem auto 2rem; } .font-count { margin-top: 0.75rem; } .font-list { grid-template-columns: 1fr; } .fontawesome-section { padding: 0 1rem; margin: 1.5rem auto 2rem; } .fa-search-meta { margin-top: 0.75rem; } .fa-search-panel { padding: 1rem; } .fa-search-input-wrap { height: 50px; } .fa-search-results { grid-template-columns: 1fr; } .fa-icon-card { grid-template-columns: 48px minmax(0, 1fr); } .fa-icon-preview { width: 48px; height: 48px; } .fa-icon-actions { grid-column: 1 / -1; justify-content: flex-end; } } /* =========================================== 💖 点赞按钮样式 (From Uiverse.io by vinodjangid07) =========================================== */ .like-button { width: 140px; height: 35px; display: flex; align-items: center; justify-content: flex-start; border: none; border-radius: 5px; overflow: hidden; box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.089); cursor: pointer; background-color: transparent; } .leftContainer { width: 60%; height: 100%; background-color: rgb(238, 0, 0); display: flex; align-items: center; justify-content: center; gap: 8px; transition: background-color 0.3s ease; } .leftContainer .like-text { color: white; font-weight: 600; } .leftContainer svg { transition: transform 0.2s ease; } .likeCount { width: 40%; height: 100%; display: flex; align-items: center; justify-content: center; color: rgb(238, 0, 0); font-weight: 600; position: relative; background-color: white; } .likeCount::before { height: 8px; width: 8px; position: absolute; content: ""; background-color: rgb(255, 255, 255); transform: rotate(45deg); left: -4px; } .like-button:hover .leftContainer { background-color: rgb(219, 0, 0); } .like-button:active .leftContainer { background-color: rgb(201, 0, 0); } .like-button:active .leftContainer svg { transform: scale(1.15); transform-origin: top; } /* 飘动的心形动画 */ .floating-heart { position: fixed; pointer-events: none; z-index: 10000; animation: floatUp 1.5s ease-out forwards; font-size: 1.5rem; color: #ff69b4; } @keyframes floatUp { 0% { opacity: 1; transform: translateY(0) scale(1); } 50% { opacity: 0.8; transform: translateY(-50px) scale(1.2); } 100% { opacity: 0; transform: translateY(-100px) scale(0.8); } } /* 提示消息 */ .like-toast { position: fixed; top: 100px; left: 50%; transform: translateX(-50%) translateY(-20px); padding: 0.75rem 1.5rem; background: rgba(0, 0, 0, 0.8); color: white; border-radius: 50px; font-size: 0.9rem; z-index: 10000; opacity: 0; transition: all 0.3s ease; pointer-events: none; backdrop-filter: blur(10px); } .like-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); } /* 深色主题适配 */ [data-theme="dark"] .likeCount { background-color: rgba(255, 255, 255, 0.1); color: rgb(238, 0, 0); } [data-theme="dark"] .likeCount::before { background-color: rgba(255, 255, 255, 0.1); } /* 9. 减少动画 */ @media (prefers-reduced-motion: reduce) { /* 避免在 Windows/浏览器触发该选项时“全站动画消失” */ html:focus-within { scroll-behavior: auto !important; } /* 只缩短过渡(不动关键加载动画) */ *, *::before, *::after { transition-duration: 0.01ms !important; } /* 关闭少量非必要动效,保留加载旋转/提示类动画 */ .floating-heart, .like-toast, .library-list.switching-in { animation: none !important; } }