/*
 * 仅保留 MDUI 1 无法表达的结构性补充：
 * 页面底色、图表画布高度、桌面端常驻抽屉、登录页居中、代码块换行。
 * 一切视觉样式（颜色、间距、阴影、排版、组件外观）均来自 MDUI 1 原生组件。
 */

body {
    background: #f2f3f5;
}

body.mdui-theme-layout-dark {
    background: #212121;
}

/* 抽屉底色：MDUI 1 抽屉默认透明，页面底色为浅灰时需要白底以符合设计规范 */
.mdui-drawer {
    background: #fff;
}

body.mdui-theme-layout-dark .mdui-drawer {
    background: #424242;
}

/* 桌面端抽屉常驻，移动端仍使用 MDUI 原生抽屉交互 */
@media (min-width: 1024px) {
    #site-drawer {
        transform: translateX(0) !important;
        box-shadow: none;
    }
    #nav-toggle {
        display: none;
    }
}

/* 顶栏品牌：按钮组件会强制全大写，这里用普通链接保持站名原样 */
.appbar-brand {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0 8px;
    color: #fff;
    text-decoration: none;
}

.appbar-brand .material-icons {
    margin-right: 8px;
}

/* MDUI 1 工具栏默认无内边距，右侧按钮会贴边 */
.mdui-appbar .mdui-toolbar {
    padding-right: 16px;
}

/* 工具栏元素不压缩，避免窄屏下按钮文字被截断 */
.mdui-appbar .mdui-toolbar > * {
    flex-shrink: 0;
}

.mdui-appbar .mdui-toolbar > .mdui-toolbar-spacer {
    flex: 1 1 auto;
}

/* 抽屉固定满高，内容少时也铺满整列 */
#site-drawer {
    height: 100vh;
    overflow-y: auto;
}

/* 站点名属专有名词，不适用按钮组件的全大写规则 */
.site-name {
    text-transform: none;
}

/* 内容较少时页脚仍贴近视口底部 */
main.mdui-container-fluid {
    min-height: calc(100vh - 80px);
    box-sizing: border-box;
}

/* MDUI 1 卡片内容固定 24px 行高，大号数字需按字号撑开，否则上下被裁 */
.mdui-card-content > .mdui-typo-display-1 {
    line-height: 1.2;
}

/* 表格操作列不换行、按钮间距一致 */
.mdui-table th:last-child,
.mdui-table td:last-child {
    white-space: nowrap;
}

.mdui-table td:last-child .mdui-btn-icon + .mdui-btn-icon,
.mdui-table td:last-child form + form .mdui-btn-icon {
    margin-left: 4px;
}

/* 表格内的操作按钮并排显示（MDUI 1 未提供该布局工具类） */
.mdui-table td form {
    display: inline-block;
    vertical-align: middle;
}

/* 等高卡片网格：同一行的卡片高度一致，避免参差与空缺 */
.card-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

/* 手机端指标卡两列，避免五张卡各占一整行 */
@media (max-width: 599px) {
    .card-grid-4,
    .card-grid-5 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .card-grid-5 > .mdui-card:last-child {
        grid-column: span 2;
    }
}

@media (min-width: 600px) {
    .card-grid-2,
    .card-grid-3,
    .card-grid-4,
    .card-grid-5 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    /* 5 个指标在双列下让最后一张占满整行，避免右侧留空 */
    .card-grid-5 > .mdui-card:last-child {
        grid-column: span 2;
    }
}

@media (min-width: 1024px) {
    .card-grid-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .card-grid-4 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
    .card-grid-5 {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
    .card-grid-5 > .mdui-card:last-child {
        grid-column: auto;
    }
}

.card-grid > .mdui-card {
    display: flex;
    flex-direction: column;
    margin: 0;
}

.card-grid > .mdui-card > .mdui-list {
    flex: 1 1 auto;
}

/* 长路径 / 长标题在列表中省略显示，避免撑破行高 */
.mdui-list-item-title,
.mdui-list-item-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 图表画布必须有确定高度，Chart.js 才能正确计算尺寸 */
#hs-chart {
    height: 300px;
}

#hs-realtime-chart {
    height: 180px;
}

canvas {
    max-width: 100%;
}

/* 登录页垂直居中 */
#login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 16px;
    box-sizing: border-box;
}

/* 跟踪代码、文档代码块自动换行 */
pre {
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-all;
}

/* Material 规范里的链接色：MDUI 不提供，避免暗色下链接不可读 */
a {
    color: var(--slx-primary, #3f51b5);
}

body.mdui-theme-layout-dark a {
    color: var(--slx-primary-soft, #7986cb);
}

/* 暗色主题下 MDUI tab 非激活项对比度补齐（MDUI 原生 opacity .7 在深底上偏暗） */
body.mdui-theme-layout-dark .mdui-tab a {
    color: #fff;
    opacity: .8;
}


/* 验证码：输入框与图片同一行 */
.captcha-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.captcha-row .mdui-textfield {
    flex: 1 1 auto;
    min-width: 0;
}

.captcha-img {
    width: 132px;
    height: 44px;
    margin-top: 20px;
    border-radius: 2px;
    cursor: pointer;
    flex: 0 0 auto;
}

/* 世界地图：国家按访问量着色 */
.worldmap {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    overflow: hidden;
}

.worldmap path {
    fill: #e0e0e0;
    stroke: #fff;
    stroke-width: .4;
    transition: fill .2s;
}

body.mdui-theme-layout-dark .worldmap path {
    fill: #4a4a4a;
    stroke: #424242;
}

.worldmap path.has-data {
    fill: var(--slx-primary, #3f51b5);
    fill-opacity: .3;
}

.worldmap path.lv1 { fill-opacity: .24; }
.worldmap path.lv2 { fill-opacity: .38; }
.worldmap path.lv3 { fill-opacity: .54; }
.worldmap path.lv4 { fill-opacity: .72; }
.worldmap path.lv5 { fill-opacity: 1; }

body.mdui-theme-layout-dark .worldmap path.has-data {
    fill: var(--slx-primary-soft, #7986cb);
}

/* 台湾、香港、澳门与大陆同色同边，视觉上连成一片 */
.worldmap path.is-cn-part {
    stroke: var(--slx-primary, #3f51b5);
    stroke-opacity: .5;
}

body.mdui-theme-layout-dark .worldmap path.is-cn-part {
    stroke: var(--slx-primary-soft, #7986cb);
    stroke-opacity: .5;
}

/* 首页动效：逐行淡入、渐变标题、数字滚动 */
@keyframes slx-rise {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes slx-sheen {
    from { background-position: 0% 50%; }
    to   { background-position: 200% 50%; }
}

/* 未启用脚本时保持可见，避免内容永久隐藏 */
.reveal {
    opacity: 1;
}

html.js .reveal {
    opacity: 0;
}

.reveal.is-in {
    animation: slx-rise .7s cubic-bezier(.2, .7, .3, 1) forwards;
}

.hero-title {
    background: linear-gradient(100deg, var(--slx-primary, #3f51b5) 0%, var(--slx-primary-soft, #7986cb) 26%, var(--slx-primary, #3f51b5) 48%, var(--slx-primary-soft, #7986cb) 72%, var(--slx-primary, #3f51b5) 100%);
    background: linear-gradient(100deg,
        color-mix(in srgb, var(--slx-primary, #3f51b5) 78%, #0b0b0b) 0%,
        color-mix(in srgb, var(--slx-primary-soft, #7986cb) 74%, #0b0b0b) 26%,
        color-mix(in srgb, var(--slx-primary, #3f51b5) 88%, #0b0b0b) 48%,
        color-mix(in srgb, var(--slx-primary-soft, #7986cb) 74%, #0b0b0b) 72%,
        color-mix(in srgb, var(--slx-primary, #3f51b5) 78%, #0b0b0b) 100%);
    background-size: 220% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: var(--slx-primary, #3f51b5);
    animation: slx-sheen 12s linear infinite;
}

body.mdui-theme-layout-dark .hero-title {
    background: linear-gradient(100deg, #e8eaf6 0%, var(--slx-primary-soft, #c5cae9) 26%, #e8eaf6 48%, var(--slx-primary-soft, #c5cae9) 72%, #e8eaf6 100%);
    background-size: 220% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #e8eaf6;
}

.hero-cursor::after {
    content: '';
    display: inline-block;
    width: 2px;
    height: .95em;
    margin-left: 4px;
    background: var(--slx-primary, #3f51b5);
    vertical-align: -.08em;
    animation: slx-blink 1.1s steps(1) infinite;
}

@keyframes slx-blink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}

/* 卡片悬浮轻微上浮，强调可点 */
.lift {
    transition: transform .22s ease, box-shadow .22s ease;
}

.lift:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 14px -4px rgba(0, 0, 0, .22);
}

@media (prefers-reduced-motion: reduce) {
    .reveal, .hero-title, .hero-cursor::after, .lift {
        animation: none !important;
        transition: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}

/* 世界地图容器与图例 */
.worldmap svg {
    width: 100%;
    height: auto;
    max-height: 400px;
    display: block;
}

.worldmap path:hover {
    fill: var(--slx-primary, #3f51b5);
    fill-opacity: 1;
    cursor: pointer;
}

body.mdui-theme-layout-dark .worldmap path:hover {
    fill: var(--slx-primary-soft, #7986cb);
    fill-opacity: 1;
}

.worldmap-loading {
    padding: 56px 0;
    text-align: center;
}

.worldmap-legend {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 8px;
}

.worldmap-swatch {
    width: 18px;
    height: 10px;
    border-radius: 2px;
    display: inline-block;
}

.worldmap-swatch.lv1 { background: var(--slx-primary, #3f51b5); opacity: .24; }
.worldmap-swatch.lv2 { background: var(--slx-primary, #3f51b5); opacity: .38; }
.worldmap-swatch.lv3 { background: var(--slx-primary, #3f51b5); opacity: .54; }
.worldmap-swatch.lv4 { background: var(--slx-primary, #3f51b5); opacity: .72; }
.worldmap-swatch.lv5 { background: var(--slx-primary, #3f51b5); }

/* 访问质量分 */
.slx-score {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 4px 0 12px;
}

.slx-score-value {
    font-size: 56px;
    line-height: 1;
    font-weight: 300;
    color: var(--slx-primary, #3f51b5);
}

body.mdui-theme-layout-dark .slx-score-value {
    color: var(--slx-primary-soft, #9fa8da);
}

.slx-score-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* 表格与卡片内的小图标对齐 */
.slx-inline-icon {
    font-size: 18px;
    vertical-align: -4px;
    margin-right: 4px;
}

.slx-cell-path {
    max-width: 420px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 成员表格：首列收窄，操作按钮横向排列不换行 */
.slx-col-member {
    width: 42%;
}

.mdui-table td .mdui-btn-icon {
    margin: 0 2px;
}

.mdui-table td form {
    display: inline-block;
    margin: 0;
}

/* 落地页步骤卡的大号序号 */
.slx-step-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(63, 81, 181, .12);
    background: color-mix(in srgb, var(--slx-primary, #3f51b5) 12%, transparent);
    color: var(--slx-primary, #3f51b5);
    font-size: 20px;
    font-weight: 500;
}

body.mdui-theme-layout-dark .slx-step-index {
    background: rgba(159, 168, 218, .18);
    color: #9fa8da;
}

/* 卡片底部按钮：图标与文字之间留出固定间距 */
.slx-btn-icon {
    padding-left: 8px;
    padding-right: 12px;
}

.slx-btn-icon > i.material-icons {
    font-size: 18px;
    margin-right: 6px;
    vertical-align: -4px;
}

.slx-icon-trail {
    font-size: 18px;
    margin-left: 6px;
}

/* 站点设置里的开关行：复选框独占一行，说明紧随其下 */
.slx-check-row {
    display: block;
    margin-top: 18px;
}

.slx-check-row .mdui-checkbox {
    display: inline-flex;
    align-items: center;
}

.slx-check-row .mdui-typo-caption-opacity {
    display: block;
    margin: 4px 0 0 32px;
}

/* 主题色选择：菜单里的小圆点与设置页的色块 */
.slx-dot {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    margin-right: 12px;
    vertical-align: -2px;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08);
}

.slx-color-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.slx-color-chip {
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08);
    transition: transform .18s ease, box-shadow .18s ease;
}

.slx-color-chip:hover {
    transform: scale(1.08);
}

.slx-color-chip.is-active {
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(0, 0, 0, .28);
}

body.mdui-theme-layout-dark .slx-color-chip.is-active {
    box-shadow: 0 0 0 2px #303030, 0 0 0 4px rgba(255, 255, 255, .5);
}

/* 首页：斜放在一台笔记本上的面板截图 */
.slx-hero-visual {
    position: relative;
    perspective: 1500px;
    padding: 30px 40px 46px 30px;
    margin-top: 8px;
    max-width: 100%;
}

.slx-laptop {
    position: relative;
    transform: rotateX(7deg) rotateY(-17deg) rotate(-1.5deg);
    transform-style: preserve-3d;
    transition: transform .5s ease;
}

.slx-hero-visual:hover .slx-laptop {
    transform: rotateX(3deg) rotateY(-9deg) rotate(-1deg);
}

.slx-laptop-screen {
    padding: 9px 9px 12px;
    border-radius: 12px;
    background: linear-gradient(160deg, #2a2d3a, #1b1d27);
    box-shadow: 0 26px 50px -18px rgba(26, 35, 126, .45), 0 4px 10px rgba(0, 0, 0, .16);
}

.slx-laptop-screen img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 4px;
}

.slx-laptop-base {
    height: 13px;
    margin: 0 -8px;
    border-radius: 0 0 12px 12px;
    background: linear-gradient(#d5d8e2, #a9aebc);
    box-shadow: 0 10px 18px -8px rgba(0, 0, 0, .3);
}

.slx-float {
    position: absolute;
    width: 40%;
    overflow: hidden;
    border: 4px solid #fff;
    border-radius: 9px;
    background: #fff;
    box-shadow: 0 16px 32px -12px rgba(0, 0, 0, .35);
}

.slx-float img {
    display: block;
    width: 100%;
    height: auto;
}

.slx-float-a {
    top: -16px;
    right: 0;
    transform: rotate(6deg);
}

.slx-float-b {
    bottom: 0;
    left: 0;
    transform: rotate(-6deg);
}

body.mdui-theme-layout-dark .slx-float {
    border-color: #303030;
    background: #303030;
}

/* 手机上不叠放悬浮卡，避免遮挡主体 */
@media (max-width: 767px) {
    .slx-hero-visual {
        padding: 12px 4px 24px;
    }
    .slx-laptop {
        transform: rotateX(6deg) rotateY(-10deg) rotate(-1deg);
    }
    .slx-float {
        width: 34%;
        border-width: 3px;
    }
    .slx-float-a {
        top: -10px;
        right: -6px;
    }
    .slx-float-b {
        bottom: -6px;
        left: -10px;
    }
}

/* 浅色主题下的深色文字：保证按钮与顶栏的对比度 */
body.mdui-theme-primary-amber .mdui-color-theme,
body.mdui-theme-primary-light-green .mdui-color-theme,
body.mdui-theme-primary-light-blue .mdui-color-theme,
body.mdui-theme-primary-cyan .mdui-color-theme,
body.mdui-theme-primary-orange .mdui-color-theme,
body.mdui-theme-primary-deep-orange .mdui-color-theme {
    color: rgba(0, 0, 0, .87) !important;
}

body.mdui-theme-primary-amber .mdui-appbar .mdui-appbar-inset,
body.mdui-theme-primary-amber .mdui-appbar,
body.mdui-theme-primary-light-green .mdui-appbar,
body.mdui-theme-primary-light-blue .mdui-appbar,
body.mdui-theme-primary-cyan .mdui-appbar,
body.mdui-theme-primary-orange .mdui-appbar,
body.mdui-theme-primary-deep-orange .mdui-appbar {
    color: rgba(0, 0, 0, .87);
}

body.mdui-theme-primary-amber .mdui-appbar .mdui-text-color-white,
body.mdui-theme-primary-light-green .mdui-appbar .mdui-text-color-white,
body.mdui-theme-primary-light-blue .mdui-appbar .mdui-text-color-white,
body.mdui-theme-primary-cyan .mdui-appbar .mdui-text-color-white,
body.mdui-theme-primary-orange .mdui-appbar .mdui-text-color-white,
body.mdui-theme-primary-deep-orange .mdui-appbar .mdui-text-color-white {
    color: rgba(0, 0, 0, .87) !important;
}

/* 地图悬停提示 */
.worldmap-tip {
    position: absolute;
    z-index: 5;
    min-width: 108px;
    padding: 8px 11px;
    border-radius: 6px;
    background: rgba(33, 33, 33, .95);
    color: #fff;
    box-shadow: 0 6px 18px -6px rgba(0, 0, 0, .45);
    pointer-events: none;
    opacity: 0;
    transform: translateY(2px);
    transition: opacity .12s ease, transform .12s ease;
}

.worldmap-tip.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.worldmap-tip-name {
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    white-space: nowrap;
}

.worldmap-tip-value {
    margin-top: 2px;
    font-size: 12px;
    line-height: 1.4;
    color: rgba(255, 255, 255, .72);
    white-space: nowrap;
}

body.mdui-theme-layout-dark .worldmap-tip {
    background: rgba(66, 66, 66, .98);
}

/* ---------- 落地页视觉 ---------- */
html.mdui-theme-layout-dark body,
body.mdui-theme-layout-dark {
    background: #17171c;
}

.slx-landing {
    position: relative;
}

.slx-landing::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(760px 460px at 82% -4%, rgba(63, 81, 181, .16), transparent 68%),
        radial-gradient(560px 420px at 6% 14%, rgba(121, 134, 203, .14), transparent 70%);
}

body.slx-landing.mdui-theme-layout-dark::before,
html.mdui-theme-layout-dark body.slx-landing::before {
    background:
        radial-gradient(760px 460px at 82% -4%, rgba(121, 134, 203, .22), transparent 68%),
        radial-gradient(560px 420px at 6% 14%, rgba(63, 81, 181, .18), transparent 70%);
}

.slx-landing main,
.slx-landing footer {
    position: relative;
    z-index: 1;
}

/* 主按钮：深色实心 + 投影，和浅灰背景拉开层次 */
.slx-cta.mdui-btn {
    height: 44px;
    padding: 0 26px;
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    box-shadow: 0 8px 20px -8px rgba(0, 0, 0, .5);
}

.slx-cta.mdui-btn:hover {
    box-shadow: 0 12px 24px -8px rgba(0, 0, 0, .55);
}

/* 次按钮：白底 + 浅描边 + 双层投影，和主按钮同一高度但仍是次要层级 */
.slx-btn-outline.mdui-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    padding: 0 22px;
    font-size: 14px;
    line-height: 1;
    border: 1px solid rgba(0, 0, 0, .12);
    background: #fff;
    box-shadow:
        0 1px 1px rgba(0, 0, 0, .06),
        0 6px 16px -8px rgba(0, 0, 0, .45),
        inset 0 1px 0 rgba(255, 255, 255, .9);
    transition: box-shadow .2s ease, transform .2s ease;
}

.slx-btn-outline.mdui-btn:hover {
    box-shadow:
        0 2px 2px rgba(0, 0, 0, .08),
        0 10px 22px -8px rgba(0, 0, 0, .5),
        inset 0 1px 0 rgba(255, 255, 255, .9);
}

.slx-btn-outline.mdui-btn:active {
    transform: translateY(1px);
    box-shadow: 0 2px 8px -4px rgba(0, 0, 0, .4);
}

body.mdui-theme-layout-dark .slx-btn-outline.mdui-btn {
    border-color: rgba(255, 255, 255, .16);
    background: #26262e;
    color: #fff;
    box-shadow:
        0 1px 1px rgba(0, 0, 0, .3),
        0 8px 20px -10px rgba(0, 0, 0, .9),
        inset 0 1px 0 rgba(255, 255, 255, .08);
}

.slx-appbar-cta.mdui-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    background: #fff;
    color: rgba(0, 0, 0, .87) !important;
    box-shadow: 0 4px 10px -4px rgba(0, 0, 0, .35);
}

.slx-appbar-cta.mdui-btn:hover {
    background: #f5f5f5;
}

body.mdui-theme-primary-amber .slx-appbar-cta.mdui-btn,
body.mdui-theme-primary-light-green .slx-appbar-cta.mdui-btn,
body.mdui-theme-primary-light-blue .slx-appbar-cta.mdui-btn,
body.mdui-theme-primary-cyan .slx-appbar-cta.mdui-btn,
body.mdui-theme-primary-orange .slx-appbar-cta.mdui-btn,
body.mdui-theme-primary-deep-orange .slx-appbar-cta.mdui-btn {
    border-color: rgba(0, 0, 0, .35);
    color: rgba(0, 0, 0, .87) !important;
}

.slx-cta-light.mdui-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: rgba(0, 0, 0, .87);
    line-height: 1;
    box-shadow: 0 8px 18px -8px rgba(0, 0, 0, .45);
}

/* 分区标题左边的小竖条，给版面一个呼吸的切入点 */
.slx-landing #features > .mdui-typo,
.slx-landing #why > .mdui-typo,
.slx-landing #start > .mdui-typo {
    position: relative;
}

.slx-landing #features > .mdui-typo::after,
.slx-landing #why > .mdui-typo::after,
.slx-landing #start > .mdui-typo::after {
    content: '';
    display: block;
    width: 36px;
    height: 3px;
    margin: 14px auto 0;
    border-radius: 2px;
    background: var(--slx-primary, #3f51b5);
    opacity: .8;
}

/* 功能卡图标底 */
.slx-landing .mdui-card-primary-title .material-icons {
    width: 34px;
    height: 34px;
    margin-right: 10px;
    border-radius: 9px;
    background: rgba(63, 81, 181, .1);
    background: color-mix(in srgb, var(--slx-primary, #3f51b5) 12%, transparent);
    font-size: 19px;
    line-height: 34px;
    text-align: center;
    vertical-align: middle;
}

/* 深色下的卡片与文字 */
body.mdui-theme-layout-dark .mdui-card {
    background: #23232b;
}

body.mdui-theme-layout-dark .mdui-card-content,
body.mdui-theme-layout-dark .mdui-card-primary-title {
    color: rgba(255, 255, 255, .92);
}

body.mdui-theme-layout-dark .mdui-text-color-black-secondary,
body.mdui-theme-layout-dark .mdui-typo-body-1-opacity,
body.mdui-theme-layout-dark .mdui-typo-caption-opacity {
    color: rgba(255, 255, 255, .72) !important;
}

/* 深色下顶栏压深一档，和深底更协调 */
body.mdui-theme-layout-dark .mdui-appbar.mdui-color-theme {
    background-color: color-mix(in srgb, var(--slx-primary, #3f51b5) 72%, #0b0b10);
}

body.mdui-theme-layout-dark .hero-title {
    color: #e8eaf6;
}

body.mdui-theme-layout-dark .slx-laptop-screen {
    background: linear-gradient(160deg, #1b1b22, #0e0e13);
}

body.mdui-theme-layout-dark .slx-laptop-base {
    background: linear-gradient(#3a3a45, #23232b);
}

/* 深色下 MDUI 会把 .mdui-text-color-white 反转成黑字，顶栏压深后必须强制回白 */
body.mdui-theme-layout-dark .mdui-appbar .appbar-brand,
body.mdui-theme-layout-dark .mdui-appbar .mdui-toolbar > a.mdui-btn.mdui-text-color-white:not(.mdui-btn-raised):not(.slx-appbar-cta),
body.mdui-theme-layout-dark .mdui-appbar .mdui-toolbar > a.mdui-btn-dense:not(.mdui-btn-raised):not(.slx-appbar-cta),
body.mdui-theme-layout-dark .mdui-appbar .mdui-toolbar > button.mdui-btn-icon,
body.mdui-theme-layout-dark .mdui-appbar .mdui-toolbar .material-icons,
body.mdui-theme-layout-dark .mdui-appbar .mdui-toolbar > .mdui-btn-icon .material-icons {
    color: #fff !important;
}

body.mdui-theme-layout-dark .mdui-appbar .mdui-toolbar > a.mdui-btn.mdui-text-color-white:not(.mdui-btn-raised):hover,
body.mdui-theme-layout-dark .mdui-appbar .mdui-toolbar > button.mdui-btn-icon:hover {
    color: #fff !important;
    background-color: rgba(255, 255, 255, .12);
}

body.mdui-theme-layout-dark footer .mdui-divider {
    background-color: rgba(255, 255, 255, .12);
}

/* 在线人数 chip：图标在圆心里真正居中 */
.mdui-chip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.mdui-chip-icon .material-icons {
    font-size: 18px;
    line-height: 18px;
}

/* 分享页：居中容器 + 可横向滚动的分段标签 */
.slx-share-main {
    max-width: 1280px;
}

.slx-share-toolbar .mdui-tab {
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.slx-share-toolbar .mdui-tab::-webkit-scrollbar {
    display: none;
}

.slx-share-toolbar .mdui-tab a {
    flex: 0 0 auto;
    padding: 0 18px;
}

.slx-range-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.slx-range-line .material-icons {
    font-size: 17px;
    margin-right: 6px;
    vertical-align: -3px;
}

/* 同一行的卡片等高，避免右侧空一块 */
.mdui-row > div[class*="mdui-col"] > .mdui-card {
    height: 100%;
    box-sizing: border-box;
}

/* 设置页：字段标签与单选行 */
.slx-field-label {
    font-size: 12px;
    color: rgba(0, 0, 0, .54);
    margin: 6px 0 8px;
    letter-spacing: .2px;
}

.mdui-theme-layout-dark .slx-field-label {
    color: rgba(255, 255, 255, .5);
}

.slx-radio-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 22px;
    min-height: 32px;
}

.slx-radio-row .mdui-radio {
    margin: 0;
}

.slx-form-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid rgba(0, 0, 0, .08);
}

.mdui-theme-layout-dark .slx-form-actions {
    border-top-color: rgba(255, 255, 255, .1);
}

.slx-form-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
}

.slx-inline-code {
    margin: 0;
    padding: 6px 10px;
    font-size: 12px;
    border-radius: 4px;
    background: rgba(0, 0, 0, .05);
    color: rgba(0, 0, 0, .7);
    font-family: Roboto Mono, Menlo, Consolas, monospace;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.mdui-theme-layout-dark .slx-inline-code {
    background: rgba(255, 255, 255, .08);
    color: rgba(255, 255, 255, .7);
}

/* 等高行：让同一行卡片上下边对齐 */
.slx-row {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
}

.slx-row > [class*="mdui-col"] {
    display: flex;
    flex-direction: column;
}

.slx-row > [class*="mdui-col"] > .mdui-card {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
}

.slx-row > [class*="mdui-col"] > .mdui-card > .mdui-card-content {
    flex: 1 0 auto;
}

/* 登录卡：收紧顶部留白，验证码辅助文字不裁切 */
#login-page .mdui-card-primary {
    padding-bottom: 4px;
}

#login-page .mdui-card-content {
    padding-top: 4px;
}

.captcha-row .mdui-textfield-helper {
    white-space: nowrap;
    font-size: 11px;
    letter-spacing: 0;
}

/* 弹窗：去掉标题后，内容区自己撑起上边距 */
.slx-dialog-body {
    padding-top: 20px;
}

/* 顶栏：文字与图标统一垂直居中，基线不再漂 */
.mdui-toolbar {
    align-items: center;
}

.mdui-toolbar > a,
.mdui-toolbar > button,
.mdui-toolbar > .appbar-brand,
.mdui-toolbar > .mdui-toolbar-spacer + a,
.mdui-toolbar > .mdui-toolbar-spacer + button {
    display: inline-flex;
    align-items: center;
    align-self: center;
}

.mdui-toolbar .appbar-brand {
    height: 56px;
    line-height: 1;
    text-decoration: none;
}

.mdui-toolbar .mdui-btn,
.mdui-toolbar .mdui-btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    line-height: 1;
}

.mdui-toolbar .material-icons {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.mdui-toolbar .mdui-typo-title,
.mdui-toolbar .mdui-typo-caption-opacity {
    line-height: 1;
    display: inline-flex;
    align-items: center;
}

/* 下拉菜单不能被卡片裁掉：卡片与内容区不建立裁剪上下文 */
.mdui-card,
.mdui-card-content,
.card-grid > .mdui-card {
    overflow: visible;
}

.mdui-select-menu {
    z-index: 4000;
}

.mdui-card .mdui-table-fluid {
    overflow-x: auto;
    overflow-y: visible;
}

.slx-nowrap {
    white-space: nowrap;
}

/* 地区下钻条：返回 + 当前范围 */
.slx-drill-bar {
    padding: 8px 12px;
}

.slx-drill-inner {
    display: flex;
    align-items: center;
    gap: 12px;
}

.slx-drill-text {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex: 1 1 auto;
    min-width: 0;
}

.slx-drill-label {
    font-size: 12px;
    color: rgba(0, 0, 0, .5);
}

.slx-drill-title {
    font-size: 15px;
    font-weight: 500;
    color: rgba(0, 0, 0, .87);
}

.mdui-theme-layout-dark .slx-drill-label {
    color: rgba(255, 255, 255, .5);
}

.mdui-theme-layout-dark .slx-drill-title {
    color: rgba(255, 255, 255, .87);
}

/* 首页按钮组：同一行垂直居中，间距统一 */
.slx-cta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 24px;
}

.slx-cta-row .mdui-btn {
    margin: 0 !important;
}
