Files
monkey-ai-web/src/pages/SkillMarket/skill-market.css
T

1268 lines
24 KiB
CSS
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/*
* 技能超市(/skill-market)页面作用域样式,mock 与真实页面共用。
* 依据:原型 http://192.168.0.161:8888 顶栏「技能超市」页 .sm-* 规则与 computed style(2026-11-04 只读采集,
* report/survey/proto-sm-rules.css、proto-css.json)。类名与原型一致,便于同一探针比较。
* 约定:颜色只在 .sm-theme / html.dark .sm-theme 的 --sm-* 变量中定义(浅深均为原型实测值);
* 主色、正文由 theme.useToken() 注入 --sm-brand / --sm-text(useSkillMarketThemeStyle);
* 下方样式规则只引用变量,不使用 !important。滚动条遵循全站统一规格(--brand-scroll,6px)。
*/
.sm-theme {
--sm-bg: #f4f6f9;
--sm-surface: #ffffff;
--sm-muted: #626f80;
--sm-border: #e0e5ec;
--sm-tint: #fff2dc;
--sm-glow: #e3b76226;
/* 文字型主色(筛选“重置”、详情标签):浅色即主色,深色为原型实测 #f2ad41(与 Ant 主色 #d1963a 分离) */
--sm-accent: var(--sm-brand);
--sm-hero-bg:
radial-gradient(at 25% 0, rgba(237, 213, 158, 0.44), transparent 47%),
radial-gradient(at 90% 20%, rgba(206, 222, 219, 0.396), transparent 40%),
linear-gradient(110deg, #f5f1e7, #fff8eb 50%, #edf2f1);
--sm-hero-fade: linear-gradient(transparent 45%, #f4f6f940 65%, #f4f6f9);
--sm-search-bg: rgba(255, 255, 255, 0.86);
--sm-search-border: #ffffff;
--sm-search-shadow: 0 9px 36px rgba(123, 93, 27, 0.063);
--sm-dot: rgba(189, 151, 84, 0.26);
--sm-mask-solid: #000000;
--sm-orbit: rgba(187, 147, 76, 0.15);
--sm-connector: #c38c36;
--sm-flow-stroke: #dca84c;
--sm-module-bg: linear-gradient(
135deg,
rgba(255, 255, 255, 0.6),
rgba(245, 230, 201, 0.51)
);
--sm-module-border: rgba(197, 165, 107, 0.4);
--sm-module-shadow:
9px 14px 28px rgba(136, 106, 38, 0.063), inset 0 1px #ffffff;
--sm-module-ink: #b3802e;
--sm-module-line: rgba(196, 170, 119, 0.2);
--sm-module-bar: rgba(187, 155, 90, 0.333);
--sm-symbol-shadow: 0 3px 8px rgba(165, 116, 25, 0.063);
--sm-symbol-bg: #fbf0d9;
--sm-symbol-ink: #ac7926;
--sm-symbol-border: rgba(196, 150, 70, 0.208);
--sm-symbol-ai-bg: #eaf1f7;
--sm-symbol-ai-ink: #567795;
--sm-symbol-ai-border: rgba(109, 146, 185, 0.17);
--sm-symbol-design-bg: #ebf1eb;
--sm-symbol-design-ink: #66846e;
--sm-symbol-design-border: rgba(109, 146, 111, 0.17);
--sm-symbol-marketing-bg: #fcf0e3;
--sm-symbol-marketing-ink: #b27f48;
--sm-symbol-marketing-border: rgba(189, 149, 96, 0.17);
--sm-tag-bg: rgba(125, 139, 155, 0.05);
--sm-card-hover-border: #c39343;
--sm-card-hover-shadow: 0 10px 30px rgba(142, 107, 25, 0.09);
--sm-detail-tag-bg: color-mix(in srgb, var(--sm-brand) 6.3%, transparent);
--sm-detail-text: var(--sm-text);
--sm-detail-border: var(--border-subtle);
--sm-updated: var(--text-secondary);
--sm-scroll-thumb: var(--brand-scroll);
--sm-scroll-thumb-hover: var(--brand-scroll-hover);
--sm-mask: rgba(0, 0, 0, 0.3);
--sm-transparent: transparent;
}
html.dark .sm-theme {
--sm-bg: #111720;
--sm-surface: #1b232e;
--sm-muted: #aab6c5;
--sm-border: #344151;
--sm-tint: #3c2f1f;
--sm-glow: #e1ac4225;
--sm-accent: #f2ad41;
--sm-hero-bg:
radial-gradient(at 25% 0, rgba(147, 113, 47, 0.19), transparent 47%),
radial-gradient(at 90% 20%, rgba(59, 91, 93, 0.19), transparent 40%),
linear-gradient(110deg, #21251f, #24251f 50%, #1a242b);
--sm-hero-fade: linear-gradient(transparent 45%, #11172040 65%, #111720);
--sm-search-bg: rgba(24, 33, 45, 0.86);
--sm-search-border: rgba(108, 87, 59, 0.333);
--sm-module-bg: linear-gradient(
135deg,
rgba(65, 55, 32, 0.61),
rgba(39, 48, 42, 0.51)
);
--sm-module-border: rgba(163, 131, 72, 0.298);
--sm-module-shadow: 9px 14px 28px rgba(0, 0, 0, 0.133);
--sm-module-ink: #e7b666;
--sm-symbol-bg: #3b3020;
--sm-symbol-ink: #e6b869;
--sm-symbol-border: rgba(128, 99, 53, 0.4);
--sm-symbol-ai-bg: #273442;
--sm-symbol-ai-ink: #a3bfda;
--sm-symbol-ai-border: rgba(128, 99, 53, 0.4);
--sm-symbol-design-bg: #283c30;
--sm-symbol-design-ink: #a2c4ac;
--sm-symbol-design-border: rgba(128, 99, 53, 0.4);
--sm-symbol-marketing-bg: #453525;
--sm-symbol-marketing-ink: #e4b683;
--sm-symbol-marketing-border: rgba(128, 99, 53, 0.4);
--sm-detail-tag-bg: color-mix(in srgb, var(--sm-accent) 8.2%, transparent);
}
/* ---------- 页面骨架:顶栏下方整屏,侧栏与卡片列表各自滚动 ----------
* 公告栏高度由 PageLayout 的占位 div 让出(--content-top-offset),这里只让出固定顶栏:
* body[data-ui-scope='admin'] 上的 --app-header-height 为顶栏本身高度(桌面 72 / 移动 56),
* 两者相加即原型的 107px,页面高度 = 视口 − 占位,外层不滚动。 */
.sm-page {
height: calc(100vh - var(--content-top-offset, 0px));
padding-top: var(--app-header-height, 72px);
min-height: 0;
display: flex;
flex-direction: column;
overflow: hidden;
background: var(--sm-bg);
color: var(--sm-text);
font-size: 14px;
line-height: 1.5714;
}
/* ---------- Hero ---------- */
.sm-hero {
flex-shrink: 0;
min-height: 235px;
padding: 28px 32px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 24px;
position: relative;
isolation: isolate;
overflow: hidden;
background: var(--sm-hero-bg);
}
.sm-hero::after {
content: '';
position: absolute;
inset: 0;
z-index: 0;
background: var(--sm-hero-fade);
pointer-events: none;
}
.sm-intro,
.sm-search {
position: relative;
z-index: 1;
}
.sm-intro {
text-align: center;
}
.sm-intro h1 {
font-size: 34px;
line-height: 1.4;
margin: 0;
letter-spacing: 0.5px;
font-weight: 650;
color: var(--sm-text);
}
.sm-intro p {
font-size: 14px;
margin: 10px 0 0;
color: var(--sm-muted);
line-height: 1.8;
}
.sm-search {
display: flex;
gap: 10px;
align-items: center;
width: min(720px, 100%);
padding: 8px;
background: var(--sm-search-bg);
border: 1px solid var(--sm-search-border);
border-radius: 12px;
box-shadow: var(--sm-search-shadow);
backdrop-filter: blur(16px);
}
.sm-search .ant-input-affix-wrapper {
flex: 1 1 0%;
min-width: 0;
background: var(--sm-transparent);
border: 0;
height: 40px;
box-shadow: none;
}
.sm-search .ant-input-affix-wrapper:focus-within {
box-shadow: none;
}
.sm-search .ant-input {
background: var(--sm-transparent);
}
.sm-search > .ant-btn {
height: 40px;
padding-inline: 18px;
}
/* 原型按钮文字行高为 normal(实测文字行盒 19px),与 antd 默认 22px 相差 1px 基线 */
.sm-search > .ant-btn,
.sm-filter-title .ant-btn,
.sm-empty .ant-btn,
.sm-card-footer .ant-btn,
.sm-detail-footer .ant-btn {
line-height: normal;
}
/* ---------- Hero 线路与模块(原型 .sm-art DOM 复刻,颜色走变量) ---------- */
.sm-art {
position: absolute;
inset: 0;
pointer-events: none;
}
.sm-dot-field {
position: absolute;
inset: 0;
background-image: radial-gradient(
var(--sm-dot) 0.8px,
var(--sm-transparent) 1px
);
background-size: 15px 15px;
mask-image: linear-gradient(
90deg,
var(--sm-mask-solid),
var(--sm-transparent) 33%,
var(--sm-transparent) 67%,
var(--sm-mask-solid)
);
}
.sm-orbit {
position: absolute;
border: 1px solid var(--sm-orbit);
border-radius: 50%;
width: 420px;
height: 280px;
left: -90px;
top: -95px;
transform: rotate(-25deg);
}
.sm-orbit-two {
left: auto;
right: -70px;
top: 20px;
width: 340px;
height: 220px;
transform: rotate(30deg);
}
.sm-connectors {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
}
.sm-connect-stop {
stop-color: var(--sm-connector);
}
.sm-flow {
stroke: var(--sm-flow-stroke);
stroke-dasharray: 18, 360;
animation: sm-flow 15s linear infinite;
}
.sm-module {
position: absolute;
width: 88px;
height: 85px;
padding: 16px;
display: flex;
flex-direction: column;
align-items: start;
gap: 8px;
border: 1px solid var(--sm-module-border);
border-radius: 14px;
background: var(--sm-module-bg);
box-shadow: var(--sm-module-shadow);
backdrop-filter: blur(6px);
color: var(--sm-module-ink);
transform: rotate(-12deg);
animation: sm-drift 10s ease-in-out infinite;
}
.sm-module > i {
width: 100%;
height: 3px;
background: var(--sm-module-line);
border-radius: 3px;
}
.sm-module > i:last-child {
width: 65%;
}
.sm-module-code {
left: 8%;
top: 28px;
}
/* 原型 KeyOutlined 使用 PNG 遮罩,提取原始资源以保留轮廓及透明度。 */
.sm-module-key {
display: inline-flex;
align-items: center;
justify-content: center;
width: 22px;
height: 22px;
font-size: 22px;
background-color: currentColor;
mask-image: url('../../assets/prototype/skill-market-hero-key.png');
mask-size: 100% 100%;
mask-repeat: no-repeat;
}
.sm-module-data {
right: 7%;
top: 18px;
transform: rotate(12deg);
animation-delay: -5s;
}
.sm-module-data > div {
display: flex;
align-items: end;
gap: 5px;
height: 23px;
width: 100%;
}
.sm-module-data i {
width: 9px;
height: 60%;
background: var(--sm-module-bar);
border-radius: 2px;
}
.sm-module-data i:nth-child(2) {
height: 90%;
}
.sm-module-data i:nth-child(3) {
height: 45%;
}
.sm-module-data i:nth-child(4) {
height: 75%;
}
.sm-module-file {
left: 20%;
top: 148px;
width: 65px;
height: 68px;
opacity: 0.7;
animation-delay: -3s;
}
.sm-module-tool {
right: 20%;
top: 147px;
width: 70px;
height: 64px;
opacity: 0.6;
animation-delay: -7s;
}
.sm-module-tool > span {
height: 2px;
width: 65%;
background: var(--sm-module-bar);
}
@keyframes sm-flow {
100% {
stroke-dashoffset: -1512;
}
}
@keyframes sm-drift {
50% {
translate: 0 -7px;
}
}
/* ---------- 工作区:筛选侧栏 + 技能目录 ---------- */
.sm-workspace {
display: flex;
gap: 22px;
padding: 20px 28px 24px;
flex: 1 1 0%;
min-height: 0;
max-width: 1920px;
width: 100%;
margin: 0 auto;
}
.sm-sidebar {
min-height: 0;
align-self: stretch;
flex-shrink: 0;
width: 264px;
background: var(--sm-surface);
border: 1px solid var(--sm-border);
border-radius: 12px;
padding: 12px 22px 12px 18px;
overflow-y: auto;
scrollbar-gutter: stable;
overscroll-behavior: contain;
}
.sm-sidebar::-webkit-scrollbar {
width: 6px;
}
.sm-sidebar::-webkit-scrollbar-track {
background: var(--sm-transparent);
}
.sm-sidebar::-webkit-scrollbar-thumb {
background: var(--sm-transparent);
border-radius: 3px;
}
.sm-sidebar:hover::-webkit-scrollbar-thumb,
.sm-sidebar:focus-within::-webkit-scrollbar-thumb {
background: var(--sm-scroll-thumb);
}
.sm-sidebar::-webkit-scrollbar-thumb:hover {
background: var(--sm-scroll-thumb-hover);
}
.sm-filter-title {
display: flex;
align-items: center;
justify-content: space-between;
padding-bottom: 5px;
}
.sm-filter-title h2 {
font-size: 16px;
font-weight: 700;
line-height: 1.5714;
margin: 0;
}
.sm-filter-title .ant-btn {
color: var(--sm-accent);
}
.sm-filter-section {
padding: 18px 0;
border-top: 1px solid var(--sm-border);
}
.sm-filter-section h3 {
font-size: 15px;
font-weight: 700;
line-height: 1.5714;
margin: 0 0 14px;
}
.sm-tag-heading {
display: flex;
justify-content: space-between;
align-items: baseline;
}
.sm-tag-select {
width: 100%;
}
.sm-scope-options {
display: flex;
flex-direction: column;
gap: 8px;
}
.sm-scope-options .ant-btn {
height: 40px;
padding-inline: 14px;
justify-content: space-between;
color: var(--sm-text);
}
.sm-scope-options .ant-btn.is-active {
color: var(--sm-accent);
border-color: var(--sm-brand);
background: var(--sm-tint);
font-weight: 600;
}
.sm-scope-count {
padding-inline: 5px;
border-radius: 3px;
background: var(--sm-tag-bg);
color: var(--sm-muted);
font-size: 12px;
font-weight: 400;
}
.sm-tag-heading > span,
.sm-tag-hint {
color: var(--sm-muted);
font-size: 12px;
}
.sm-tag-hint {
margin: 9px 0 0;
}
.sm-selected-tags {
display: flex;
flex-wrap: wrap;
gap: 8px;
margin-top: 16px;
}
.sm-selected-tags .ant-tag {
margin: 0;
max-width: 100%;
white-space: normal;
overflow-wrap: anywhere;
padding: 3px 8px;
color: var(--sm-accent);
background: var(--sm-tint);
border-color: color-mix(in srgb, var(--sm-brand) 35%, var(--sm-border));
}
.sm-selected-tags .ant-btn {
height: auto;
padding: 0;
font-size: 12px;
color: var(--sm-accent);
}
.sm-mobile-filter.ant-btn {
display: none;
}
.sm-catalog {
flex: 1 1 0%;
min-width: 0;
min-height: 0;
display: flex;
flex-direction: column;
}
.sm-result-bar {
min-height: 45px;
display: flex;
justify-content: space-between;
align-items: center;
gap: 12px;
margin-bottom: 12px;
padding: 0 4px;
flex-shrink: 0;
}
.sm-result-bar > div:first-child {
display: flex;
align-items: center;
gap: 12px;
flex-wrap: wrap;
}
.sm-result-bar h2 {
font-size: 18px;
font-weight: 700;
line-height: 1.5714;
margin: 0;
}
.sm-result-bar > div:first-child > span {
font-size: 13px;
line-height: 1.5714;
color: var(--sm-muted);
}
.sm-result-bar > div:first-child > .sm-selected-count {
color: var(--sm-accent);
}
/* 结果栏右侧:页面已有操作(mock 的本地演示说明与新增 / 恢复按钮),窄屏换行 */
.sm-result-extra {
display: flex;
align-items: center;
justify-content: flex-end;
flex-wrap: wrap;
gap: 8px;
min-width: 0;
}
.sm-result-extra .ant-tag {
margin: 0;
}
.sm-notice {
flex-shrink: 0;
margin: 0 4px 12px;
}
.sm-org-context {
display: inline-flex;
flex-wrap: wrap;
align-items: center;
gap: 6px 10px;
}
.sm-org-context strong {
font-weight: 600;
word-break: break-all;
}
.sm-list {
min-height: 0;
flex: 1 1 0%;
overflow: hidden auto;
padding: 4px 4px 20px;
overscroll-behavior: contain;
outline-offset: -2px;
}
.sm-list::-webkit-scrollbar {
display: none;
width: 0;
height: 0;
}
@supports not selector(::-webkit-scrollbar) {
.sm-list {
scrollbar-width: none;
}
}
.sm-grid {
display: grid;
grid-template-columns: repeat(4, minmax(0, 1fr));
gap: 16px;
}
.sm-pager {
display: flex;
justify-content: center;
margin-top: 24px;
}
/* ---------- 技能卡片(Ant Design Card) ---------- */
.sm-card.ant-card {
background: var(--sm-surface);
border-color: var(--sm-border);
border-radius: 12px;
overflow: hidden;
cursor: pointer;
position: relative;
isolation: isolate;
transition:
transform 0.24s,
border-color 0.24s,
box-shadow 0.24s;
}
.sm-card.ant-card .ant-card-body {
padding: 20px 18px 0;
display: flex;
flex-direction: column;
height: 100%;
position: relative;
z-index: 1;
}
.sm-card.sm-card-loading.ant-card {
cursor: default;
}
.sm-card.sm-card-loading.ant-card .ant-card-body {
padding-bottom: 20px;
}
.sm-card::before {
content: '';
position: absolute;
inset: 0;
background: radial-gradient(
260px circle at var(--sm-x, 50%) var(--sm-y, 0%),
var(--sm-glow),
var(--sm-transparent) 75%
);
opacity: 0;
transition: opacity 0.24s;
pointer-events: none;
}
.sm-card:focus-visible {
outline: 2px solid var(--sm-brand);
outline-offset: -2px;
}
.sm-card-heading {
display: flex;
align-items: center;
gap: 12px;
margin-bottom: 14px;
}
.sm-skill-symbol {
display: grid;
place-items: center;
width: 40px;
height: 40px;
flex-shrink: 0;
border: 1px solid var(--sm-symbol-border);
border-radius: 11px;
background: var(--sm-symbol-bg);
color: var(--sm-symbol-ink);
box-shadow: var(--sm-symbol-shadow);
}
.sm-symbol-ai {
background: var(--sm-symbol-ai-bg);
color: var(--sm-symbol-ai-ink);
border-color: var(--sm-symbol-ai-border);
}
.sm-symbol-design {
background: var(--sm-symbol-design-bg);
color: var(--sm-symbol-design-ink);
border-color: var(--sm-symbol-design-border);
}
.sm-symbol-marketing {
background: var(--sm-symbol-marketing-bg);
color: var(--sm-symbol-marketing-ink);
border-color: var(--sm-symbol-marketing-border);
}
.sm-card-heading > div {
min-width: 0;
flex: 1 1 0%;
display: flex;
flex-direction: column;
justify-content: space-between;
min-height: 40px;
}
.sm-card-heading h3 {
font-size: 16px;
line-height: 1.35;
margin: 0;
font-weight: 600;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
overflow-wrap: anywhere;
}
.sm-card-heading > div > span {
display: block;
margin-top: 3px;
font-size: 12px;
line-height: 16px;
color: var(--sm-muted);
}
.sm-card-description {
font-size: 13px;
color: var(--sm-muted);
line-height: 1.9;
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
overflow: hidden;
margin: 0 0 18px;
min-height: 74px;
}
.sm-card-tags {
display: flex;
align-items: center;
gap: 6px;
flex-wrap: wrap;
margin-top: auto;
margin-bottom: 18px;
min-height: 24px;
}
.sm-card-tags .ant-tag {
margin: 0;
font-size: 11px;
line-height: 22px;
border-radius: 5px;
max-width: 100%;
white-space: normal;
overflow-wrap: anywhere;
}
.sm-card-tags .ant-tag.sm-tag {
background: var(--sm-tag-bg);
color: var(--sm-muted);
}
.sm-card-footer {
display: flex;
align-items: center;
justify-content: space-between;
gap: 8px;
border-top: 1px solid var(--sm-border);
padding: 12px 0;
}
.sm-card-footer > span {
font-size: 12px;
line-height: 1.5714;
color: var(--sm-muted);
font-variant-numeric: tabular-nums;
}
.sm-card-actions {
display: flex;
align-items: center;
justify-content: flex-end;
flex-wrap: wrap;
gap: 4px;
min-width: 0;
}
.sm-card-actions .ant-typography {
font-size: 12px;
}
.sm-card-footer .ant-btn.ant-btn {
font-size: 12px;
height: 32px;
padding-inline: 15px;
box-shadow: none;
}
/* ---------- 空态(原型 .sm-empty) ---------- */
.sm-empty {
background: var(--sm-surface);
border: 1px dashed var(--sm-border);
border-radius: 12px;
text-align: center;
padding: 70px 20px;
}
.sm-empty h3 {
font-size: 17px;
font-weight: 700;
line-height: 1.5714;
margin: 0;
}
.sm-empty p {
color: var(--sm-muted);
margin: 12px 0 22px;
font-size: 14px;
}
/* ---------- 详情抽屉(Portal,rootClassName='sm-detail-drawer sm-theme') ---------- */
.sm-detail-drawer .ant-drawer-content-wrapper,
.sm-form-drawer .ant-drawer-content-wrapper {
max-width: 100vw;
}
/* Portal 不在 .sm-page 内:基础行高按原型 14px/22px,不继承全局 1.5 */
.sm-detail-drawer .ant-drawer-content-wrapper {
line-height: 1.5714;
}
.sm-detail-drawer .ant-drawer-body {
padding: 24px;
overflow-wrap: anywhere;
}
.sm-form-drawer .ant-drawer-body {
overflow-wrap: anywhere;
}
.sm-detail-drawer .ant-drawer-footer {
padding: 8px 16px;
}
/* 原型抽屉遮罩:rgba(0,0,0,.3) + 4px 背景模糊(浅深相同,原型实测) */
.sm-detail-drawer .ant-drawer-mask {
background: var(--sm-mask);
backdrop-filter: blur(4px);
}
.sm-detail-description {
font-size: 14px;
line-height: 1.95;
color: var(--sm-detail-text);
margin: 0 0 24px;
}
.sm-detail-drawer section {
border-top: 1px solid var(--sm-detail-border);
padding: 22px 0;
}
.sm-detail-drawer h3 {
font-size: 15px;
font-weight: 700;
line-height: 1.5714;
margin: 0 0 12px;
}
.sm-detail-drawer section p,
.sm-detail-drawer li {
font-size: 14px;
color: var(--sm-detail-text);
line-height: 1.9;
}
.sm-detail-drawer section p {
margin: 0 0 12px;
}
.sm-detail-drawer ul {
list-style: disc;
padding-left: 20px;
margin: 0;
}
.sm-detail-drawer li + li {
margin-top: 7px;
}
.sm-detail-tags,
.sm-detail-badges {
display: flex;
gap: 8px;
flex-wrap: wrap;
}
.sm-detail-tags .ant-tag {
margin: 0;
padding: 3px 8px;
font-size: 12px;
line-height: 20px;
background: var(--sm-detail-tag-bg);
color: var(--sm-accent);
white-space: normal;
overflow-wrap: anywhere;
}
.sm-detail-badges .ant-tag {
margin: 0;
}
.sm-detail-updated {
color: var(--sm-updated);
font-size: 12px;
line-height: 1.5714;
padding: 12px 0;
}
.sm-detail-footer {
display: flex;
align-items: center;
justify-content: flex-end;
flex-wrap: wrap;
gap: 10px;
}
.sm-detail-footer .ant-btn {
display: inline-flex;
align-items: center;
justify-content: center;
text-align: center;
min-width: 80px;
}
/* ---------- 交互反馈(原型:仅精确指针悬停上浮 + 光晕;减少动态时取消位移与过渡) ---------- */
@media (hover: hover) and (pointer: fine) {
.sm-card.ant-card:not(.sm-card-loading):hover,
.sm-card.ant-card:not(.sm-card-loading):focus-within {
transform: translateY(-3px);
box-shadow: var(--sm-card-hover-shadow);
border-color: var(--sm-card-hover-border);
}
.sm-card:not(.sm-card-loading):hover::before,
.sm-card:not(.sm-card-loading):focus-within::before {
opacity: 1;
}
}
@media (prefers-reduced-motion: reduce) {
.sm-flow,
.sm-module {
animation: none;
}
.sm-card.ant-card,
.sm-card::before {
transition: none;
}
.sm-card.ant-card:hover,
.sm-card.ant-card:focus-within {
transform: none;
}
}
/* ---------- 断点(与原型 1540 / 1180 / 850 / 600 一致) ---------- */
@media (max-width: 1540px) {
.sm-grid {
grid-template-columns: repeat(3, minmax(0, 1fr));
}
.sm-sidebar {
width: 248px;
}
}
@media (max-width: 1180px) {
.sm-grid {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
.sm-workspace {
gap: 18px;
padding: 18px 20px 20px;
}
.sm-sidebar {
width: 230px;
padding-inline: 14px;
}
.sm-hero {
min-height: 215px;
}
.sm-module-code {
left: 5%;
}
.sm-module-data {
right: 5%;
}
.sm-module-file {
left: 13%;
}
.sm-module-tool {
right: 13%;
}
}
@media (max-width: 850px) {
.sm-sidebar {
width: 205px;
}
.sm-workspace {
padding: 16px;
gap: 12px;
}
.sm-grid {
gap: 12px;
}
.sm-card.ant-card .ant-card-body {
padding: 16px 14px 0;
}
.sm-card-heading {
gap: 9px;
}
.sm-card-heading h3 {
font-size: 15px;
}
.sm-card-footer .ant-btn.ant-btn {
padding-inline: 9px;
}
.sm-module {
opacity: 0.4;
}
.sm-module-file,
.sm-module-tool {
display: none;
}
.sm-intro h1 {
font-size: 30px;
}
.sm-intro p {
max-width: 440px;
}
}
/* Mobile filters collapse so the catalog remains usable below the hero. */
@media (max-width: 600px) {
.sm-hero {
min-height: 193px;
padding: 22px 16px;
gap: 18px;
}
.sm-intro h1 {
font-size: 24px;
letter-spacing: 0;
}
.sm-intro p {
font-size: 13px;
max-width: 310px;
margin-top: 8px;
}
.sm-search {
padding: 5px;
gap: 5px;
}
.sm-search .ant-input-affix-wrapper {
height: 36px;
padding-inline: 5px;
}
.sm-search .ant-input {
font-size: 13px;
}
.sm-search > .ant-btn {
height: 36px;
padding-inline: 9px;
font-size: 13px;
}
.sm-search > .ant-btn .ant-btn-icon {
display: none;
}
.sm-module {
scale: 0.65;
top: 0;
opacity: 0.25;
}
.sm-module-code {
left: -15px;
}
.sm-module-data {
right: -15px;
}
.sm-workspace {
flex-direction: column;
gap: 0;
padding: 10px 12px 14px;
}
.sm-sidebar {
display: none;
width: 100%;
flex-shrink: 1;
margin-bottom: 10px;
padding: 12px 16px;
max-height: 45%;
overflow-y: auto;
}
.sm-sidebar.sm-sidebar-open {
display: block;
}
.sm-scope-options {
flex-direction: row;
}
.sm-scope-options .ant-btn {
flex: 1;
}
.sm-mobile-filter.ant-btn {
display: inline-flex;
}
.sm-filter-section {
padding: 14px 0;
}
.sm-result-bar {
min-height: 40px;
margin-bottom: 8px;
flex-wrap: wrap;
}
.sm-result-bar h2 {
font-size: 16px;
}
.sm-result-bar > div:first-child {
gap: 8px;
}
.sm-result-bar > div:first-child > .sm-selected-count {
display: none;
}
.sm-grid {
grid-template-columns: minmax(0, 1fr);
gap: 14px;
}
.sm-list {
padding: 4px 3px 16px;
}
.sm-card.ant-card .ant-card-body {
padding: 20px 20px 0;
}
.sm-card-heading {
gap: 12px;
}
.sm-card-heading h3 {
font-size: 16px;
}
.sm-card-description {
font-size: 14px;
min-height: 0;
}
.sm-card-footer .ant-btn.ant-btn {
height: 38px;
font-size: 13px;
padding-inline: 14px;
}
.sm-card-tags .ant-tag {
font-size: 12px;
}
.sm-detail-drawer .ant-drawer-body {
padding: 20px 16px;
}
}