/* 梦幻引导系统 - 前台样式
   开发：梦幻网络工作室 www.menghuanwl.cn */

*,
*::before,
*::after {
    box-sizing: border-box;
}

:root {
    --bg: #f4f6fb;
    --bg-soft: #eef2f9;
    --card: #ffffff;
    --border: #e7ebf3;
    --border-hover: #d7e0f0;
    --text: #161d2d;
    --text-soft: #5d6679;
    --muted: #8b94a8;
    --brand: #2563eb;
    --brand-soft: #eaf1ff;
    --green: #22c55e;
    --radius-lg: 18px;
    --radius: 14px;
    --shadow-sm: 0 1px 2px rgba(19, 36, 71, .04);
    --shadow: 0 10px 30px rgba(23, 44, 84, .08);
    --shadow-card: 0 2px 10px rgba(23, 44, 84, .04);
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    padding: 54px 20px 40px;
    background:
        radial-gradient(1100px 480px at 50% -180px, #ffffff 0%, rgba(255, 255, 255, 0) 70%),
        var(--bg);
    color: var(--text);
    font-family: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.page {
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
}

/* ---------------------------------------------------------------- 头部 */

.hero {
    text-align: center;
}

.brand-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    border-radius: 18px;
    background: linear-gradient(160deg, #232838 0%, #151925 100%);
    color: #fff;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: 0;
    box-shadow: 0 10px 24px rgba(21, 25, 37, .22), inset 0 1px 0 rgba(255, 255, 255, .12);
    user-select: none;
}

.site-logo {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
}

.hero h1 {
    margin: 20px 0 8px;
    font-size: 30px;
    font-weight: 800;
    letter-spacing: .5px;
    line-height: 1.35;
}

.subtitle {
    margin: 0;
    color: var(--text-soft);
    font-size: 14px;
}

.notice {
    max-width: 470px;
    margin: 14px auto 0;
    color: var(--muted);
    font-size: 12.5px;
    line-height: 1.95;
}

.contacts {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 30px;
    margin-top: 16px;
    color: var(--muted);
    font-size: 13.5px;
}

.contacts b {
    color: #37415a;
    font-weight: 600;
}

/* ---------------------------------------------------------------- 链接卡片 */

.links {
    display: grid;
    gap: 12px;
    margin-top: 26px;
}

.link-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 72px;
    padding: 13px 14px 13px 16px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.link-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-hover);
    box-shadow: 0 10px 24px rgba(23, 44, 84, .09);
}

.link-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.link-body {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding-right: 4px;
}

.link-title {
    overflow: hidden;
    color: #131a29;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.link-desc {
    overflow: hidden;
    margin-top: 2px;
    color: var(--muted);
    font-size: 12.5px;
    line-height: 1.5;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.link-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
    padding-left: 4px;
}

.go-arrow {
    display: inline-flex;
    color: #a3adc2;
    transition: color .18s ease, transform .18s ease;
}

.link-card:hover .go-arrow {
    color: var(--brand);
    transform: translateX(2px);
}

.copy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    color: #6c7690;
    background: #f7f9fd;
    border: 1px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    transition: color .18s ease, background .18s ease, border-color .18s ease;
    -webkit-tap-highlight-color: transparent;
}

.copy-btn:hover {
    color: var(--brand);
    background: #fff;
    border-color: #cfdcf5;
}

.copy-btn:active {
    transform: scale(.94);
}

.card-hit {
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: inherit;
}

.link-actions {
    position: relative;
    z-index: 2;
    pointer-events: auto;
}

/* 配色 */

.c-blue .link-icon {
    color: #2f7cf6;
    background: #e8f1ff;
}

.c-green .link-icon {
    color: #10b981;
    background: #e4f8f0;
}

.c-orange .link-icon {
    color: #f59e0b;
    background: #fdf1dd;
}

.c-purple .link-icon {
    color: #8b5cf6;
    background: #f1eaff;
}

/* ---------------------------------------------------------------- 空状态 */

.empty-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px;
    color: var(--text-soft);
    background: var(--card);
    border: 1px dashed #d9e1f0;
    border-radius: var(--radius);
}

.empty-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 40px;
    height: 40px;
    color: #93a2bd;
    background: #f2f5fb;
    border-radius: 50%;
}

.empty-card p {
    margin: 0;
    font-size: 13.5px;
    line-height: 1.6;
}

.empty-card p span {
    color: var(--muted);
    font-size: 12.5px;
}

/* ---------------------------------------------------------------- 二维码 */

.qr-card {
    width: 236px;
    margin: 34px auto 0;
    padding: 18px 18px 16px;
    text-align: center;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.qr-img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 12px;
}

.qr-title {
    margin: 10px 0 0;
    color: var(--green);
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 1px;
}

.qr-desc {
    margin: 2px 0 0;
    color: var(--muted);
    font-size: 11.5px;
}

/* ---------------------------------------------------------------- 页脚与提示 */

.site-footer {
    margin-top: 34px;
    padding-bottom: 6px;
    color: #a2aabc;
    font-size: 12px;
    text-align: center;
}

.toast {
    position: fixed;
    left: 50%;
    bottom: 34px;
    z-index: 50;
    padding: 10px 20px;
    color: #fff;
    font-size: 13.5px;
    background: rgba(22, 29, 45, .92);
    border-radius: 999px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, .25);
    opacity: 0;
    transform: translate(-50%, 12px);
    transition: opacity .22s ease, transform .22s ease;
    pointer-events: none;
    white-space: nowrap;
}

.toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* ---------------------------------------------------------------- 响应式 */

@media (max-width: 600px) {
    body {
        padding: 38px 14px 30px;
    }

    .hero h1 {
        font-size: 25px;
    }

    .notice {
        font-size: 12px;
    }

    .links {
        margin-top: 22px;
        gap: 10px;
    }

    .link-card {
        min-height: 66px;
        gap: 11px;
        padding: 11px 12px;
    }

    .link-icon {
        width: 36px;
        height: 36px;
    }

    .link-title {
        font-size: 14.5px;
    }

    .link-desc {
        font-size: 12px;
    }

    .copy-btn {
        width: 32px;
        height: 32px;
    }

    .qr-card {
        width: 216px;
        margin-top: 28px;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
    }

    .banner-track {
        transform: none !important;
    }
}

/* ---------------------------------------------------------------- 首页轮播图 */

.banner {
    position: relative;
    overflow: hidden;
    margin-top: 26px;
    aspect-ratio: 16 / 9;
    background: #e7ecf6;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
}

.banner-track {
    display: flex;
    height: 100%;
    transition: transform .55s cubic-bezier(.4, 0, .2, 1);
    will-change: transform;
}

.banner.is-single .banner-track {
    transform: none !important;
}

.banner-slide {
    flex: 0 0 100%;
    min-width: 0;
    height: 100%;
    margin: 0;
}

.banner-link {
    display: block;
    width: 100%;
    height: 100%;
}

.banner-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.banner-nav {
    position: absolute;
    top: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    color: #24304a;
    background: rgba(255, 255, 255, .86);
    border: 0;
    border-radius: 50%;
    box-shadow: 0 4px 14px rgba(15, 23, 42, .18);
    cursor: pointer;
    opacity: 0;
    transform: translateY(-50%);
    transition: opacity .2s ease, background .2s ease;
}

.banner-nav:hover {
    background: #fff;
}

.banner-nav:focus-visible {
    opacity: 1;
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}

.banner:hover .banner-nav,
.banner:focus-within .banner-nav {
    opacity: 1;
}

.banner-nav.prev {
    left: 10px;
}

.banner-nav.next {
    right: 10px;
}

.banner-dots {
    position: absolute;
    right: 0;
    bottom: 10px;
    left: 0;
    display: flex;
    justify-content: center;
    gap: 6px;
    pointer-events: none;
}

.banner-dots button {
    width: 7px;
    height: 7px;
    padding: 0;
    background: rgba(255, 255, 255, .62);
    border: 0;
    border-radius: 999px;
    box-shadow: 0 1px 4px rgba(15, 23, 42, .22);
    cursor: pointer;
    pointer-events: auto;
    transition: width .2s ease, background .2s ease;
}

.banner-dots button.active {
    width: 18px;
    background: #fff;
}

.banner-dots button:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* ---------------------------------------------------------------- 测速 */

.speed-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    height: 34px;
    padding: 0 9px;
    color: #6c7690;
    font-size: 12px;
    line-height: 1;
    background: #f7f9fd;
    border: 1px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    white-space: nowrap;
    transition: color .18s ease, background .18s ease, border-color .18s ease;
    -webkit-tap-highlight-color: transparent;
}

.speed-btn:hover {
    color: var(--brand);
    background: #fff;
    border-color: #cfdcf5;
}

.speed-btn:active {
    transform: scale(.96);
}

.speed-btn:focus-visible,
.copy-btn:focus-visible,
.card-hit:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}

.speed-btn .speed-label {
    min-width: 26px;
    font-variant-numeric: tabular-nums;
    text-align: center;
}

.speed-btn.is-testing {
    color: var(--muted);
    cursor: progress;
}

.speed-btn.is-testing .speed-icon {
    animation: speed-spin 1s linear infinite;
}

.speed-btn.fast {
    color: #0f9f6e;
    background: #e9f9f1;
    border-color: #c9efdd;
}

.speed-btn.fast .speed-icon,
.speed-btn.slow .speed-icon,
.speed-btn.mid .speed-icon {
    display: none;
}

.speed-btn.mid {
    color: #c07a0b;
    background: #fdf5e6;
    border-color: #f2e0bd;
}

.speed-btn.slow {
    color: #d94f4f;
    background: #fdeeee;
    border-color: #f5d3d3;
}

.speed-btn.fail {
    color: var(--muted);
    background: #f5f7fa;
}

.speed-btn.fail .speed-icon {
    display: none;
}

@keyframes speed-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 600px) {
    .banner {
        margin-top: 20px;
        border-radius: var(--radius);
    }

    .banner-nav {
        display: none;
    }

    .banner-dots {
        bottom: 8px;
    }

    .link-actions {
        gap: 7px;
    }

    .speed-btn {
        height: 32px;
        padding: 0 7px;
        font-size: 11.5px;
    }

    .speed-btn .speed-label {
        min-width: 24px;
    }

    .speed-btn .speed-icon {
        width: 13px;
        height: 13px;
    }
}