/* 小程序精选案例（顶部「小程序精选案例」遮罩内容）
   截图是 380x906 的竖版手机图，套进 CSS 画的手机外壳里展示，
   比直接贴一张裸图更像真实产品。外壳不用图片资源，纯 CSS 实现。 */

.mini-lib {
    display: none;                 /* 有数据时由 JS 显示 */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
    /* 顶部间距固定 128px，与「企业建站一条龙」「热门小游戏案例」对齐。
       原来写的是 9vw，视口一宽就跟着变大（1920 下到 173px），
       三个遮罩的标题高度就对不上了。 */
    padding: 128px 40px 60px;
    text-align: center;
}

.mini-lib-head {
    margin-bottom: 44px;
}

.mini-lib-head i {
    display: block;
    font-size: 30px;
    font-style: normal;
    font-weight: 700;
    color: #fff;
    letter-spacing: 2px;
}

.mini-lib-head span {
    display: block;
    margin-top: 10px;
    font-size: 13px;
    color: rgba(255, 255, 255, .45);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.mini-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 52px 46px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.mini-list li {
    width: 300px;
    cursor: pointer;
}

/* 可点进详情，给个明确的可点提示 */
.mini-list li:focus-visible {
    outline: 1px dotted rgba(255, 255, 255, .8);
    outline-offset: 8px;
}

.mini-more {
    display: inline-block;
    margin-top: 14px;
    padding: 5px 16px;
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 16px;
    font-size: 12px;
    color: rgba(255, 255, 255, .7);
    transition: border-color .28s, color .28s, background .28s;
}

.mini-list li:hover .mini-more {
    border-color: #6f9aee;
    background: rgba(111, 154, 238, .16);
    color: #fff;
}

/* 手机外壳：深色边框 + 圆角，内部留出屏幕区域 */
.mini-phone {
    position: relative;
    width: 300px;
    /* 380:906 的截图比例，按 268px 屏宽换算出屏高 */
    padding: 14px 16px 16px;
    box-sizing: border-box;
    background: linear-gradient(160deg, #3a3f47, #22262c);
    border-radius: 34px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, .55),
                inset 0 1px 0 rgba(255, 255, 255, .12);
    transition: transform .35s cubic-bezier(.4, 0, .2, 1),
                box-shadow .35s;
}

.mini-list li:hover .mini-phone {
    transform: translateY(-8px);
    box-shadow: 0 26px 54px rgba(0, 0, 0, .62),
                inset 0 1px 0 rgba(255, 255, 255, .16);
}

/* 听筒/摄像头一条，做出真机感 */
.mini-phone:before {
    content: "";
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 58px;
    height: 4px;
    border-radius: 3px;
    background: rgba(255, 255, 255, .18);
}

.mini-screen {
    position: relative;
    display: block;
    width: 100%;
    /* 按截图比例 380/906 撑出高度，加载前也不塌陷 */
    padding-top: 238.4%;
    overflow: hidden;
    border-radius: 22px;
    background: #0e1116;
}

.mini-screen img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.mini-info {
    margin-top: 22px;
}

.mini-info h3 {
    font-size: 19px;
    font-weight: 500;
    color: #fff;
    line-height: 1.5;
    letter-spacing: 1px;
}

.mini-info p {
    margin-top: 9px;
    font-size: 13px;
    line-height: 1.8;
    color: rgba(255, 255, 255, .5);
}

.mini-loading {
    padding: 80px 0;
    font-size: 15px;
    color: rgba(255, 255, 255, .5);
}

@media screen and (max-width: 900px) {
    .mini-lib { padding: 128px 20px 50px; }
    .mini-lib-head { margin-bottom: 34px; }
    .mini-lib-head i { font-size: 24px; }
    .mini-list { gap: 40px 30px; }
}

@media screen and (max-width: 560px) {
    .mini-lib-head i { font-size: 21px; }
    /* 单列时略收窄，两侧留出边距 */
    .mini-list li,
    .mini-phone { width: 258px; }
    .mini-info h3 { font-size: 17px; }
}

/* ===== 视图切换：列表 / 详情 同页互斥显示 ===== */
.mini-view-detail {
    display: none;
    text-align: left;
    max-width: 1080px;
    margin: 0 auto;
}

.mini-lib.is-detail .mini-view-list { display: none; }
.mini-lib.is-detail .mini-view-detail { display: block; }

/* 返回按钮 */
.mini-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 30px;
    padding: 8px 18px 8px 14px;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 20px;
    font-size: 14px;
    color: rgba(255, 255, 255, .78);
    cursor: pointer;
    user-select: none;
    transition: border-color .28s, color .28s, background .28s;
}

.mini-back:hover {
    border-color: #6f9aee;
    background: rgba(111, 154, 238, .16);
    color: #fff;
}

.mini-back:focus-visible {
    outline: 1px dotted rgba(255, 255, 255, .8);
    outline-offset: 3px;
}

/* 用 CSS 画左箭头，省一个图片资源 */
.mini-back-arrow {
    width: 8px;
    height: 8px;
    border-left: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg);
}

.mini-detail-head {
    padding-bottom: 22px;
    margin-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, .12);
}

.mini-detail-name {
    font-size: 27px;
    font-weight: 700;
    color: #fff;
    line-height: 1.4;
    letter-spacing: 1px;
}

.mini-detail-sub {
    margin-top: 10px;
    font-size: 14px;
    line-height: 1.8;
    color: rgba(255, 255, 255, .5);
}

/* 功能描述：后台富文本，这里统一排版 */
.mini-detail-desc {
    font-size: 15px;
    line-height: 2;
    color: rgba(255, 255, 255, .78);
}

.mini-detail-desc:empty { display: none; }

.mini-detail-desc h1,
.mini-detail-desc h2,
.mini-detail-desc h3,
.mini-detail-desc h4 {
    margin: 26px 0 12px;
    color: #fff;
    font-weight: 600;
    line-height: 1.5;
}

.mini-detail-desc h1 { font-size: 21px; }
.mini-detail-desc h2 { font-size: 19px; }
.mini-detail-desc h3 { font-size: 17px; }
.mini-detail-desc h4 { font-size: 15px; }

.mini-detail-desc p { margin-bottom: 12px; }

.mini-detail-desc ul,
.mini-detail-desc ol {
    margin: 0 0 14px 22px;
    padding: 0;
}

.mini-detail-desc ul li { list-style: disc; margin-bottom: 6px; }
.mini-detail-desc ol li { list-style: decimal; margin-bottom: 6px; }

.mini-detail-desc strong,
.mini-detail-desc b { color: #fff; font-weight: 600; }

.mini-detail-desc a { color: #6f9aee; }

.mini-detail-desc img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 10px 0;
}

.mini-detail-desc table {
    width: 100%;
    margin: 12px 0;
    border-collapse: collapse;
}

.mini-detail-desc th,
.mini-detail-desc td {
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, .15);
    font-size: 14px;
}

/* 详情截图：手机端、电脑端各成一组，组内横向排列。
   两种外壳宽度差异大，混排会参差不齐，所以分组。 */
.mini-shots {
    margin-top: 40px;
}

.mini-shots:empty { display: none; }

.mini-shot-group + .mini-shot-group {
    margin-top: 46px;
}

.mini-shot-title {
    position: relative;
    margin-bottom: 22px;
    padding-left: 12px;
    font-size: 16px;
    font-weight: 500;
    color: rgba(255, 255, 255, .88);
    letter-spacing: 1px;
}

/* 标题前加竖色条，和富文本里的小标题区分开 */
.mini-shot-title:before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 14px;
    border-radius: 2px;
    background: #6f9aee;
}

.mini-shot-row {
    display: flex;
    flex-wrap: wrap;
    gap: 40px 34px;
}

.mini-shot-row.is-desktop {
    gap: 30px;
}

.mini-shots .mini-phone {
    width: 240px;
    cursor: zoom-in;
}

.mini-shots .mini-screen { border-radius: 18px; }

@media screen and (max-width: 900px) {
    .mini-detail-name { font-size: 22px; }
    .mini-shots { gap: 30px 24px; justify-content: center; }
    .mini-shots .mini-phone { width: 210px; }
}

@media screen and (max-width: 560px) {
    .mini-detail-name { font-size: 19px; }
    .mini-back { margin-bottom: 22px; }
    .mini-shots { gap: 26px; }
    .mini-shots .mini-phone { width: 236px; }
}

/* ===== 电脑窗口外壳 =====
   电脑截图是 16:8 左右的横图，套手机壳会被裁掉大半，
   这里用一个带标题栏的浏览器窗口造型，同样纯 CSS 不加图片资源。 */
.mini-desktop {
    position: relative;
    /* 容器最大 1080px，取 510 可让宽屏并排放两张 */
    width: 510px;
    max-width: 100%;
    padding: 0;
    background: linear-gradient(160deg, #3a3f47, #22262c);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 18px 40px rgba(0, 0, 0, .55),
                inset 0 1px 0 rgba(255, 255, 255, .12);
    transition: transform .35s cubic-bezier(.4, 0, .2, 1), box-shadow .35s;
    cursor: zoom-in;
}

.mini-desktop:hover {
    transform: translateY(-6px);
    box-shadow: 0 26px 54px rgba(0, 0, 0, .62),
                inset 0 1px 0 rgba(255, 255, 255, .16);
}

/* 标题栏：左侧三个圆点 + 一条地址栏占位 */
.mini-desktop-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 28px;
    padding: 0 12px;
    background: rgba(255, 255, 255, .07);
}

.mini-desktop-bar i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .28);
    flex: 0 0 auto;
}

.mini-desktop-bar i:nth-child(1) { background: #ff5f57; }
.mini-desktop-bar i:nth-child(2) { background: #febc2e; }
.mini-desktop-bar i:nth-child(3) { background: #28c840; }

.mini-desktop-bar span {
    flex: 1;
    height: 12px;
    margin-left: 8px;
    border-radius: 6px;
    background: rgba(255, 255, 255, .1);
}

/* 屏幕区：按截图 2560x1279 的比例留高，避免加载前塌陷 */
.mini-desktop-screen {
    position: relative;
    display: block;
    width: 100%;
    padding-top: 49.96%;
    overflow: hidden;
    background: #0e1116;
}

.mini-desktop-screen img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 电脑图外层包一层，宽屏时两张并排、窄屏自动换行 */
.mini-shot-row.is-desktop .mini-shot-desktop {
    flex: 0 1 auto;
}

@media screen and (max-width: 1200px) {
    /* 容器变窄后电脑图改为一行一张，避免缩得太小看不清 */
    .mini-shot-row.is-desktop .mini-shot-desktop { flex: 1 1 100%; }
}

@media screen and (max-width: 900px) {
    .mini-desktop { width: 100%; max-width: 560px; }
    .mini-shot-title { font-size: 15px; }
    .mini-shot-group + .mini-shot-group { margin-top: 36px; }
}

/* ===== 图片放大查看 =====
   前台没有弹层库，这里自己实现，零依赖。
   层级要高于 .header-mini-nav（z-index:4）才能盖住遮罩。 */
.mini-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 20;
    background: rgba(0, 0, 0, .92);
    text-align: center;
    cursor: zoom-out;
}

.mini-lightbox.is-open { display: block; }

/* 图片容器：垂直居中且不超出视口 */
.mini-lightbox-stage {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 92vw;
    max-height: 86vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mini-lightbox-stage img {
    max-width: 92vw;
    max-height: 86vh;
    width: auto;
    height: auto;
    display: block;
    border-radius: 4px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .6);
    cursor: default;
}

.mini-lightbox-close {
    position: absolute;
    top: 22px;
    right: 28px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .28);
    background: rgba(255, 255, 255, .06);
    cursor: pointer;
    transition: background .25s, border-color .25s;
}

.mini-lightbox-close:hover {
    background: rgba(255, 255, 255, .16);
    border-color: rgba(255, 255, 255, .5);
}

/* 用两条斜线画叉，省一个图片资源 */
.mini-lightbox-close:before,
.mini-lightbox-close:after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 1.5px;
    background: #fff;
}

.mini-lightbox-close:before { transform: translate(-50%, -50%) rotate(45deg); }
.mini-lightbox-close:after { transform: translate(-50%, -50%) rotate(-45deg); }

/* 左右切换按钮 */
.mini-lightbox-prev,
.mini-lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .24);
    background: rgba(255, 255, 255, .06);
    cursor: pointer;
    transition: background .25s, border-color .25s;
}

.mini-lightbox-prev { left: 26px; }
.mini-lightbox-next { right: 26px; }

.mini-lightbox-prev:hover,
.mini-lightbox-next:hover {
    background: rgba(255, 255, 255, .16);
    border-color: rgba(255, 255, 255, .5);
}

/* CSS 画箭头 */
.mini-lightbox-prev:before,
.mini-lightbox-next:before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 10px;
    border-top: 1.5px solid #fff;
    border-right: 1.5px solid #fff;
}

.mini-lightbox-prev:before { transform: translate(-60%, -50%) rotate(-135deg); }
.mini-lightbox-next:before { transform: translate(-40%, -50%) rotate(45deg); }

/* 只有一张图时隐藏切换按钮 */
.mini-lightbox.is-single .mini-lightbox-prev,
.mini-lightbox.is-single .mini-lightbox-next { display: none; }

.mini-lightbox-count {
    position: absolute;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%);
    font-size: 13px;
    color: rgba(255, 255, 255, .6);
    letter-spacing: 1px;
}

.mini-lightbox.is-single .mini-lightbox-count { display: none; }

@media screen and (max-width: 560px) {
    .mini-lightbox-prev { left: 10px; }
    .mini-lightbox-next { right: 10px; }
    .mini-lightbox-prev,
    .mini-lightbox-next { width: 38px; height: 38px; }
    .mini-lightbox-close { top: 14px; right: 14px; }
}
