mengstack-website/.vitepress/theme/custom.css
MengStack Dev 4c610fde51 style: 全面交互美化 + 多分辨率适配
首页:
- 按钮/卡片/芯片/统计数字添加 hover + active 按压反馈
- 架构层标签 hover 高亮,快速开始卡片悬浮效果
- 导航链接 active 状态添加底部金色指示条
- Ghost 按钮 hover 添加底色填充
- CTA 主按钮增强发光阴影
- 新增 1440px 宽屏适配(加宽内容区至 1320px)
- 新增 980-1200px 平板横屏适配
- 优化 768-980px 平板竖屏(统计保持3列)
- 优化 <560px 手机(统计改单列,缩小间距)
- 新增 <380px 超小屏适配

栏目页:
- 新增 1440px 宽屏(内容区加宽至 1100px,侧栏 280px)
- 新增 960px/768px/420px 三级手机断点
- 侧栏链接 hover 文字变色
- 表格行 hover 高亮
- 功能卡片图标 hover 旋转缩放
- 按钮 active 按压反馈
- 导航链接 active 透明度过渡
2026-10-03 01:08:48 +08:00

662 lines
15 KiB
CSS

/* ========================================
MengStack Brand Theme — Gold & Bronze
======================================== */
:root {
/* Brand palette */
--ms-gold: #C8963E;
--ms-gold-light: #E0B86A;
--ms-gold-dark: #A07830;
--ms-bronze: #B87333;
--ms-bronze-dark: #8B5A2B;
--ms-cream: #FDF8EF;
--ms-cream-dark: #F5EDD8;
/* Override VitePress brand colors */
--vp-c-brand-1: var(--ms-gold);
--vp-c-brand-2: var(--ms-gold-dark);
--vp-c-brand-3: var(--ms-bronze);
--vp-c-brand-soft: rgba(200, 150, 62, 0.14);
--vp-c-brand-soft-2: rgba(200, 150, 62, 0.25);
}
/* ============ NAV BAR ============ */
.VPNav {
backdrop-filter: blur(12px);
-webkit-backdrop-filter: blur(12px);
}
.VPNavBar {
border-bottom: 1px solid rgba(200, 150, 62, 0.1) !important;
background: rgba(255, 255, 255, 0.85) !important;
}
.dark .VPNavBar {
background: rgba(27, 27, 30, 0.88) !important;
border-bottom-color: rgba(200, 150, 62, 0.12) !important;
}
.VPNavBarTitle a.title {
font-weight: 700;
}
.VPNavBarTitle a.title span {
background: linear-gradient(135deg, var(--ms-gold-dark), var(--ms-gold-light));
-webkit-background-clip: text;
background-clip: text;
color: transparent !important;
}
.VPNavBar .VPNavBarMenuLink,
.VPNavBar .VPNavBarMenuGroup .title {
font-weight: 500;
transition: color 0.25s;
}
.VPNavBar .VPNavBarMenuLink:active,
.VPNavBar .VPNavBarMenuGroup .title:active {
opacity: 0.7;
}
.VPNavBar .VPNavBarMenuLink:hover,
.VPNavBar .VPNavBarMenuGroup .title:hover {
color: var(--ms-gold) !important;
}
.VPNavBar .VPNavBarMenuLink.active {
color: var(--ms-gold) !important;
}
.VPNavBar .VPNavBarMenuLink.active::after {
background: var(--ms-gold) !important;
}
/* Social icon */
.VPNavBar .VPSocialLink:hover {
color: var(--ms-gold) !important;
transform: scale(1.1);
}
.VPNavBar .VPSocialLink {
transition: color 0.25s, transform 0.25s;
}
/* ============ HERO SECTION ============ */
.VPHero {
padding-top: 48px;
padding-bottom: 40px;
position: relative;
overflow: hidden;
}
.VPHero::before {
content: '';
position: absolute;
top: -40%;
left: -20%;
width: 140%;
height: 180%;
background: radial-gradient(ellipse at 30% 20%, rgba(200, 150, 62, 0.06) 0%, transparent 60%),
radial-gradient(ellipse at 70% 80%, rgba(184, 115, 51, 0.04) 0%, transparent 50%);
pointer-events: none;
z-index: 0;
}
.dark .VPHero::before {
background: radial-gradient(ellipse at 30% 20%, rgba(200, 150, 62, 0.08) 0%, transparent 60%),
radial-gradient(ellipse at 70% 80%, rgba(184, 115, 51, 0.05) 0%, transparent 50%);
}
.VPHero .main {
position: relative;
z-index: 1;
}
/* Hide empty image column, make content full-width */
.VPHero .image {
display: none !important;
}
.VPHero .container {
grid-template-columns: 1fr !important;
gap: 0 !important;
max-width: 100% !important;
width: 100% !important;
flex-grow: 1 !important;
}
.VPHero .content {
max-width: 100% !important;
flex: 1 1 100% !important;
}
/* Hero name — premium gold gradient text */
.VPHero .heading {
margin-bottom: 8px;
}
.VPHero .heading .name {
font-size: 4.2rem !important;
line-height: 1.1 !important;
letter-spacing: -0.03em;
font-weight: 800;
background: linear-gradient(135deg, #B8862D 0%, #D4A84B 25%, #F0D078 50%, #D4A84B 75%, #A07020 100%);
-webkit-background-clip: text !important;
background-clip: text !important;
color: transparent !important;
text-shadow: none;
position: relative;
display: inline-block;
}
/* Decorative accent line under the name */
.VPHero .heading .name::after {
content: '';
position: absolute;
bottom: -6px;
left: 0;
width: 80px;
height: 3px;
background: linear-gradient(90deg, var(--ms-gold), var(--ms-gold-light), transparent);
border-radius: 2px;
}
.VPHero .text {
font-size: 1.6rem !important;
line-height: 1.4 !important;
font-weight: 600;
margin-top: 20px;
}
.dark .VPHero .text {
color: rgba(255, 255, 255, 0.88) !important;
}
.VPHero .tagline {
font-size: 1.1rem !important;
color: var(--ms-gold-dark) !important;
font-weight: 400;
letter-spacing: 0.03em;
margin-top: 12px;
}
.dark .VPHero .tagline {
color: var(--ms-gold-light) !important;
}
/* Hero buttons */
.VPHero .actions .action a.VPButton.brand {
background: linear-gradient(135deg, var(--ms-gold-dark), var(--ms-gold)) !important;
border: none !important;
color: #fff !important;
font-weight: 600;
border-radius: 10px !important;
padding: 0 28px !important;
height: 44px !important;
line-height: 44px !important;
font-size: 0.95rem !important;
box-shadow: 0 4px 14px rgba(200, 150, 62, 0.3);
transition: all 0.3s ease;
}
.VPHero .actions .action a.VPButton.brand:hover {
box-shadow: 0 6px 20px rgba(200, 150, 62, 0.45);
transform: translateY(-2px);
}
.VPHero .actions .action a.VPButton.brand:active {
transform: translateY(0) scale(0.97);
}
.VPHero .actions .action a.VPButton.alt {
border: 1.5px solid var(--ms-gold) !important;
color: var(--ms-gold-dark) !important;
border-radius: 10px !important;
padding: 0 28px !important;
height: 44px !important;
line-height: 42px !important;
font-size: 0.95rem !important;
font-weight: 600;
background: transparent !important;
transition: all 0.3s ease;
}
.dark .VPHero .actions .action a.VPButton.alt {
color: var(--ms-gold-light) !important;
border-color: var(--ms-gold-light) !important;
}
.VPHero .actions .action a.VPButton.alt:hover {
background: rgba(200, 150, 62, 0.08) !important;
transform: translateY(-2px);
}
.VPHero .actions .action a.VPButton.alt:active {
transform: translateY(0) scale(0.97);
}
/* ============ FEATURES SECTION ============ */
.VPFeatures {
padding: 48px 0 56px !important;
}
.VPFeatures .VPFeature .box {
border: 1px solid rgba(200, 150, 62, 0.12) !important;
border-radius: 14px !important;
padding: 28px 24px 24px !important;
background: rgba(255, 255, 255, 0.7) !important;
backdrop-filter: blur(6px);
-webkit-backdrop-filter: blur(6px);
transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
position: relative;
overflow: hidden;
}
.dark .VPFeatures .VPFeature .box {
background: rgba(40, 40, 44, 0.6) !important;
border-color: rgba(200, 150, 62, 0.1) !important;
}
.VPFeatures .VPFeature .box::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
height: 3px;
background: linear-gradient(90deg, var(--ms-gold-dark), var(--ms-gold-light), var(--ms-bronze));
opacity: 0;
transition: opacity 0.35s;
}
.VPFeatures .VPFeature:hover .box {
border-color: rgba(200, 150, 62, 0.3) !important;
box-shadow: 0 8px 30px rgba(200, 150, 62, 0.1), 0 2px 8px rgba(0, 0, 0, 0.04);
transform: translateY(-4px);
}
.dark .VPFeatures .VPFeature:hover .box {
border-color: rgba(200, 150, 62, 0.25) !important;
box-shadow: 0 8px 30px rgba(200, 150, 62, 0.08), 0 2px 8px rgba(0, 0, 0, 0.2);
}
.VPFeatures .VPFeature:hover .box::before {
opacity: 1;
}
/* Feature icon */
.VPFeatures .VPFeature .icon {
width: 52px !important;
height: 52px !important;
display: flex;
align-items: center;
justify-content: center;
font-size: 1.6rem;
background: linear-gradient(135deg, rgba(200, 150, 62, 0.08), rgba(184, 115, 51, 0.05)) !important;
border: 1px solid rgba(200, 150, 62, 0.12);
border-radius: 12px !important;
margin-bottom: 4px;
transition: transform 0.3s ease, background 0.3s;
}
.VPFeatures .VPFeature:hover .icon {
transform: scale(1.08) rotate(-3deg);
background: linear-gradient(135deg, rgba(200, 150, 62, 0.14), rgba(184, 115, 51, 0.08)) !important;
}
.dark .VPFeatures .VPFeature .icon {
background: linear-gradient(135deg, rgba(200, 150, 62, 0.12), rgba(184, 115, 51, 0.08)) !important;
border-color: rgba(200, 150, 62, 0.15);
}
/* Feature title */
.VPFeatures .VPFeature .title {
font-size: 1.05rem !important;
font-weight: 700 !important;
color: var(--ms-bronze-dark) !important;
letter-spacing: 0.01em;
}
.dark .VPFeatures .VPFeature .title {
color: var(--ms-gold-light) !important;
}
/* Feature details — prevent truncation */
.VPFeatures .details {
display: -webkit-box;
-webkit-line-clamp: 4;
-webkit-box-orient: vertical;
overflow: hidden;
line-height: 1.65;
font-size: 0.88rem !important;
color: var(--vp-c-text-2) !important;
}
/* Feature link arrow */
.VPFeatures .VPFeature .link-text {
color: var(--ms-gold) !important;
font-weight: 600;
}
/* ============ ABOUT SECTION ============ */
.VPDoc:has(.content-container) .main .content .content-body {
max-width: none;
}
.VPHome .VPHomeContent {
max-width: 1152px;
margin: 0 auto;
padding: 0 24px;
}
/* Style the "关于 MengStack" section */
.VPHome .vp-doc h2 {
font-size: 1.8rem;
font-weight: 700;
text-align: center;
margin: 48px 0 24px;
background: linear-gradient(135deg, var(--ms-gold-dark), var(--ms-bronze));
-webkit-background-clip: text;
background-clip: text;
color: transparent;
position: relative;
}
.VPHome .vp-doc h2::after {
content: '';
display: block;
width: 60px;
height: 3px;
background: linear-gradient(90deg, var(--ms-gold), var(--ms-bronze));
margin: 12px auto 0;
border-radius: 2px;
}
.VPHome .vp-doc p {
font-size: 1.05rem;
line-height: 1.85;
color: var(--vp-c-text-1);
max-width: 720px;
margin: 0 auto 16px;
text-align: center;
}
/* ============ FOOTER ============ */
.VPFooter {
border-top: 1px solid rgba(200, 150, 62, 0.1) !important;
background: rgba(250, 247, 240, 0.6) !important;
padding: 28px 0 !important;
}
.dark .VPFooter {
background: rgba(20, 20, 22, 0.8) !important;
border-top-color: rgba(200, 150, 62, 0.08) !important;
}
.VPFooter .message {
color: var(--ms-gold-dark) !important;
font-weight: 500;
}
.dark .VPFooter .message {
color: var(--ms-gold-light) !important;
}
.VPFooter a {
color: var(--vp-c-text-2);
text-decoration: none;
transition: color 0.25s;
}
.VPFooter a:hover {
color: var(--ms-gold) !important;
text-decoration: none;
}
.footer-extra {
margin-top: 8px;
font-size: 12px;
color: var(--vp-c-text-2);
}
.footer-extra a {
color: var(--vp-c-text-2);
text-decoration: none;
transition: color 0.25s;
}
.footer-extra a:hover {
color: var(--ms-gold);
text-decoration: underline;
}
/* ============ DOC PAGES ============ */
/* Sidebar active item */
.VPSidebarItem.is-active > .item .link .link-text {
color: var(--ms-gold) !important;
font-weight: 600;
}
.VPSidebarItem.is-active > .item .link {
background: rgba(200, 150, 62, 0.06) !important;
border-left-color: var(--ms-gold) !important;
}
/* Sidebar hover */
.VPSidebarItem .item .link {
transition: background 0.2s, border-color 0.2s;
}
.VPSidebarItem .item .link:hover {
background: rgba(200, 150, 62, 0.04) !important;
}
.VPSidebarItem .item .link:hover .link-text {
color: var(--ms-gold-dark) !important;
}
.dark .VPSidebarItem .item .link:hover .link-text {
color: var(--ms-gold-light) !important;
}
/* Inline code */
.vp-doc code {
background: rgba(200, 150, 62, 0.08) !important;
color: var(--ms-bronze-dark) !important;
border: 1px solid rgba(200, 150, 62, 0.1);
border-radius: 5px;
padding: 2px 6px;
font-size: 0.88em;
}
.dark .vp-doc code {
background: rgba(200, 150, 62, 0.1) !important;
color: var(--ms-gold-light) !important;
border-color: rgba(200, 150, 62, 0.12);
}
/* Blockquote / custom containers */
.vp-doc blockquote {
border-left: 3px solid var(--ms-gold) !important;
background: rgba(200, 150, 62, 0.04);
padding: 12px 16px;
border-radius: 0 8px 8px 0;
color: var(--vp-c-text-2);
}
/* Links in content */
.vp-doc a {
color: var(--ms-gold) !important;
font-weight: 500;
text-decoration: none;
border-bottom: 1px solid transparent;
transition: border-color 0.25s;
}
.vp-doc a:hover {
border-bottom-color: var(--ms-gold);
}
/* Headings in doc pages */
.vp-doc h1, .vp-doc h2, .vp-doc h3, .vp-doc h4 {
color: var(--ms-bronze-dark);
font-weight: 700;
}
.dark .vp-doc h1, .dark .vp-doc h2, .dark .vp-doc h3, .dark .vp-doc h4 {
color: var(--ms-gold-light);
}
.vp-doc h2 {
border-bottom: 1px solid rgba(200, 150, 62, 0.15) !important;
}
/* Table styling */
.vp-doc table {
border-collapse: collapse;
width: 100%;
}
.vp-doc table th {
background: rgba(200, 150, 62, 0.06) !important;
color: var(--ms-bronze-dark);
font-weight: 600;
}
.dark .vp-doc table th {
background: rgba(200, 150, 62, 0.08) !important;
color: var(--ms-gold-light);
}
.vp-doc table tr {
border-bottom: 1px solid rgba(200, 150, 62, 0.08);
transition: background 0.15s;
}
.vp-doc table tr:hover {
background: rgba(200, 150, 62, 0.03);
}
/* ============ SEARCH ============ */
.VPLocalSearchBox .filter {
background: rgba(200, 150, 62, 0.08) !important;
border-color: rgba(200, 150, 62, 0.15) !important;
color: var(--ms-gold-dark);
}
/* ============ SCROLLBAR ============ */
::-webkit-scrollbar {
width: 8px;
height: 8px;
}
::-webkit-scrollbar-track {
background: transparent;
}
::-webkit-scrollbar-thumb {
background: rgba(200, 150, 62, 0.2);
border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
background: rgba(200, 150, 62, 0.35);
}
/* ============ SELECTION ============ */
::selection {
background: rgba(200, 150, 62, 0.2);
color: inherit;
}
/* ============ TRANSITIONS ============ */
.VPNavBar, .VPFeatures .VPFeature, .VPHero .actions a, .VPFooter {
transition-property: background, border-color, box-shadow, transform;
transition-duration: 0.3s;
transition-timing-function: ease;
}
/* ============ RESPONSIVE ============ */
/* --- Widescreen 1440+ --- */
@media (min-width:1440px) {
.VPDoc .content-container {
max-width: 1100px !important;
}
.VPDoc .sidebar {
width: 280px !important;
}
}
/* --- Tablet 768-960 --- */
@media (max-width: 960px) {
.VPHero .heading .name {
font-size: 3rem !important;
}
.VPHero .text {
font-size: 1.35rem !important;
}
.VPFeatures {
padding: 36px 0 44px !important;
}
}
/* --- Mobile <768 --- */
@media (max-width: 768px) {
.VPHero .heading .name {
font-size: 2.4rem !important;
}
.VPHero .text {
font-size: 1.15rem !important;
}
.VPHero .tagline {
font-size: 0.95rem !important;
}
.VPHero {
padding-top: 32px !important;
padding-bottom: 28px !important;
}
.VPFeatures .VPFeature .box {
padding: 20px 16px 16px !important;
}
.VPHome .vp-doc h2 {
font-size: 1.5rem;
margin: 36px 0 18px;
}
.VPHome .vp-doc p {
font-size: 0.95rem;
}
.vp-doc h1 { font-size: 1.8rem !important; }
.vp-doc h2 { font-size: 1.4rem !important; }
.vp-doc h3 { font-size: 1.15rem !important; }
.vp-doc table { font-size: 0.85rem; }
.vp-doc .content-container {
padding: 0 16px !important;
}
}
/* --- Small mobile <420 --- */
@media (max-width: 420px) {
.VPHero .heading .name {
font-size: 2rem !important;
}
.VPHero .actions .action a.VPButton {
padding: 0 20px !important;
font-size: 0.88rem !important;
}
}
/* ============ HOME LAYOUT OVERRIDES ============ */
/* Hide VitePress default nav and footer on custom homepage */
html.home-layout .VPNav {
display: none !important;
}
html.home-layout .VPFooter {
display: none !important;
}
html.home-layout .Layout {
padding-top: 0 !important;
}