/* =========================================================
   导航站前端样式（响应式 / 移动优先）
   ========================================================= */
:root {
    --accent: #3b6ef6;
    --accent-2: #1c47c4;
    --ink: #16233a;
    --text: #4d5f7a;
    --muted: #8fa0b8;
    --line: #eef2f9;
    --card: #ffffff;
    --bg: #f4f7fd;
    --radius: 18px;
    --shadow-sm: 0 2px 10px rgba(23, 43, 84, .05);
    --shadow-md: 0 10px 26px rgba(23, 43, 84, .10);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
                 "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
}

a { color: inherit; text-decoration: none; }

/* 背景装饰 */
.bg-deco {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}
.bg-deco .blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: .55;
}
.bg-deco .b1 { width: 320px; height: 320px; left: -110px; top: -120px; background: rgba(90, 140, 255, .28); }
.bg-deco .b2 { width: 260px; height: 260px; right: -100px; top: 180px; background: rgba(160, 120, 255, .16); }
.bg-deco .b3 { width: 300px; height: 300px; left: 40%; bottom: -160px; background: rgba(80, 190, 255, .16); }

/* 页面容器 */
.page {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: var(--page-max, 560px);
    margin: 0 auto;
    padding: 34px 16px 20px;
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
}

/* 顶部 */
.hero { text-align: center; }

.hero-logo {
    width: 52px;
    height: 52px;
    margin: 0 auto 7px;
    display: grid;
    place-items: center;
    font-size: 32px;
    line-height: 1;
    border-radius: 16px;
    background: #fff;
    box-shadow: var(--shadow-sm);
}

.site-title {
    margin: 0;
    font-size: 32px;
    line-height: 1.25;
    font-weight: 800;
    letter-spacing: .5px;
    background: linear-gradient(120deg, #5b8bff 0%, var(--accent) 42%, var(--accent-2) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    word-break: break-word;
}

.site-sub {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin: 9px 0 0;
    font-size: 12.5px;
    letter-spacing: 1.2px;
    color: #98a7bd;
}
.site-sub .deco-dot { font-size: 12px; color: #b6c5dd; }
.site-sub .deco-dot:first-child::before { content: "▸"; }
.site-sub .deco-dot:last-child::before { content: "◂"; }

/* 导航列表：列数由后台布局设置控制（--cols-mob / --cols-desk） */
.nav-list {
    display: grid;
    grid-template-columns: repeat(var(--cols-mob, 1), minmax(0, 1fr));
    gap: 12px;
    margin-top: 26px;
}
.nav-list[data-cols="2"] .nav-item { min-height: 62px; padding-left: 12px; gap: 9px; }
.nav-list[data-cols="2"] .nav-title { font-size: 14px; }
.nav-list[data-cols="2"] .nav-badge { font-size: 10.5px; padding: 1px 6px; }

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 66px;
    padding: 13px 12px 13px 16px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
    position: relative;
    overflow: hidden;
}
.nav-item::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(120deg, rgba(91, 139, 255, .06), transparent 55%);
    opacity: 0;
    transition: opacity .2s ease;
}
.nav-item:hover,
.nav-item:focus-visible {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: #e1eafb;
    outline: none;
}
.nav-item:hover::after { opacity: 1; }
.nav-item:active { transform: translateY(0) scale(.995); }

.nav-item.is-highlight {
    background: linear-gradient(135deg, #f4f8ff 0%, #eaf1ff 100%);
    border-color: #dbe8ff;
    box-shadow: 0 8px 22px rgba(59, 110, 246, .10);
}

.nav-icon {
    flex: 0 0 auto;
    width: 34px;
    display: grid;
    place-items: center;
    font-size: 26px;
    line-height: 1;
}
.nav-icon img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    border-radius: 8px;
}

.nav-main {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-title {
    font-size: 16px;
    font-weight: 600;
    color: #1b2a44;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-badge {
    flex: 0 0 auto;
    font-size: 11.5px;
    font-weight: 500;
    line-height: 1.5;
    padding: 3px 9px;
    border-radius: 999px;
    border: 1px solid transparent;
    white-space: nowrap;
    letter-spacing: .2px;
}

.nav-arrow {
    flex: 0 0 auto;
    width: 17px;
    height: 17px;
    color: #ccd6e6;
    transition: transform .2s ease, color .2s ease;
}
.nav-item:hover .nav-arrow { transform: translateX(2px); color: #9fb4d6; }

.nav-empty {
    padding: 26px 18px;
    text-align: center;
    color: var(--muted);
    font-size: 13.5px;
    background: #fff;
    border: 1px dashed #e2eaf6;
    border-radius: var(--radius);
}

/* 感谢支持 */
.thanks {
    margin: 26px 0 18px;
    text-align: center;
    font-size: 15px;
    color: #3f5374;
    letter-spacing: .5px;
}
.thanks::before {
    content: "";
    display: block;
    height: 1px;
    margin: 0 10px 22px;
    background: repeating-linear-gradient(90deg, #dde5f1 0 6px, transparent 6px 12px);
}

/* 底部提示卡 */
.tip-card {
    background: #f8fafd;
    border: 1px solid #edf1f8;
    border-radius: 16px;
    padding: 16px 18px 19px;
    box-shadow: 0 1px 0 rgba(255, 255, 255, .8) inset;
}
.tip-title {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0 0 9px;
    font-size: 15px;
    font-weight: 700;
    color: #1b2a44;
}
.tip-title .tip-ico { font-size: 16px; }
.tip-body {
    font-size: 13.5px;
    line-height: 2;
    color: #5f7189;
    word-break: break-word;
}
.tip-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.tip-body p { margin: 0 0 4px; }
.tip-body ul, .tip-body ol { margin: 4px 0; padding-left: 20px; }
.tip-body li { margin: 1px 0; }

.site-footer {
    flex: 0 0 auto;
    margin-top: auto;
    width: 100%;
    padding: 22px 16px calc(14px + env(safe-area-inset-bottom, 0px));
    text-align: center;
    font-size: 12.5px;
    letter-spacing: .5px;
    line-height: 1.7;
    color: #b9c4d5;
    position: relative;
    z-index: 1;
}

/* =========================================================
   微信 / QQ 接管页
   ========================================================= */
.guard-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 22px 16px;
    background-color: #ffffff;
    background-image:
        radial-gradient(680px 380px at 12% -8%, rgba(96, 148, 255, .18), transparent 70%),
        radial-gradient(520px 320px at 100% 108%, rgba(120, 205, 255, .16), transparent 70%);
}
.guard-body.guard-has-bg { background-image: none; }
.guard-wrap { width: 100%; max-width: 430px; }
.guard-card {
    background: #fff;
    border: 1px solid #edf1f9;
    border-radius: 24px;
    padding: 28px 20px 22px;
    text-align: center;
    box-shadow: 0 22px 48px rgba(28, 52, 100, .10);
    animation: cardIn .38s ease both;
}
@keyframes cardIn {
    from { opacity: 0; transform: translateY(10px) scale(.99); }
    to   { opacity: 1; transform: none; }
}
.guard-app { font-size: 44px; line-height: 1; margin-bottom: 12px; }
.guard-title { margin: 0 0 6px; font-size: 21px; font-weight: 800; color: #15243d; letter-spacing: .3px; }
.guard-sub { margin: 0 0 20px; font-size: 13px; color: #8595ac; }
.guard-sub b { color: #2f63e0; }

.guard-steps {
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-align: left;
    background: #f7f9fd;
    border: 1px solid #eff3fa;
    border-radius: 14px;
    padding: 14px;
    margin-bottom: 16px;
}
.guard-step { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.6; color: #4d5f7a; }
.step-no {
    flex: 0 0 auto;
    width: 19px; height: 19px;
    margin-top: 2px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: grid;
    place-items: center;
}
.guard-step .dots { color: var(--accent); font-weight: 700; letter-spacing: 1px; }
.guard-step .step-text { min-width: 0; word-break: break-word; }
.guard-step .step-text b, .guard-step .step-text strong { color: var(--accent); }

.guard-url { display: flex; gap: 8px; }
.guard-url input {
    flex: 1 1 auto;
    min-width: 0;
    height: 42px;
    padding: 0 12px;
    border: 1px solid #e4ebf7;
    border-radius: 11px;
    background: #fbfcff;
    color: #5b6c85;
    font-size: 12px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    outline: none;
}
.copy-btn {
    flex: 0 0 auto;
    height: 42px;
    padding: 0 16px;
    border: 0;
    border-radius: 11px;
    background: linear-gradient(135deg, #5285ff, #2f63e0);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(59, 110, 246, .26);
    transition: transform .15s ease, background .2s ease;
    white-space: nowrap;
}
.copy-btn:active { transform: scale(.97); }
.copy-btn.is-ok { background: linear-gradient(135deg, #28b877, #0f9950); box-shadow: 0 8px 18px rgba(32, 178, 108, .24); }
.copy-btn.is-fail { background: linear-gradient(135deg, #ef7280, #d84457); }

.guard-hint { margin: 9px 0 16px; font-size: 11.5px; line-height: 1.7; color: #9dabc0; }
.guard-tips {
    text-align: left;
    font-size: 12px;
    line-height: 1.9;
    color: #8593a8;
    border-top: 1px dashed #e8eef8;
    padding-top: 13px;
}
.guard-continue {
    display: inline-block;
    margin-top: 14px;
    font-size: 11.5px;
    color: #a8b5c8;
    border-bottom: 1px dashed #dbe3f0;
    padding-bottom: 1px;
}
.guard-footer { margin-top: 16px; font-size: 11.5px; color: #b9c4d5; word-break: break-all; }

.guard-arrow {
    position: fixed;
    top: 8px;
    right: 12px;
    color: #b3c2d8;
    opacity: .9;
    animation: floatArrow 1.8s ease-in-out infinite;
}
@keyframes floatArrow {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(3px, -3px); }
}

/* =========================================================
   拦截页
   ========================================================= */
.block-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 22px 16px;
    background: radial-gradient(600px 320px at 50% -10%, #26324c, #131a28 70%);
    color: #e8eefc;
}
.block-card {
    width: 100%;
    max-width: 430px;
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 20px;
    padding: 28px 22px;
    text-align: center;
    backdrop-filter: blur(8px);
}
.block-icon { font-size: 42px; }
.block-card h1 { margin: 10px 0 8px; font-size: 20px; }
.block-desc { margin: 0 0 18px; font-size: 13px; color: #9fb0cc; line-height: 1.8; }
.block-meta {
    text-align: left;
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(255, 255, 255, .06);
    border-radius: 12px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 12px;
}
.block-meta div { display: flex; gap: 10px; justify-content: space-between; }
.block-meta span { color: #8496b3; flex: 0 0 auto; }
.block-meta b { color: #dbe5f7; font-weight: 500; text-align: right; word-break: break-all; }
.block-tip { margin: 16px 0 0; font-size: 11.5px; color: #71829e; }

/* =========================================================
   大屏 / 中转页
   ========================================================= */
.jump-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px 18px;
    background: radial-gradient(620px 340px at 50% 0%, #eaf1ff, #f6f9ff 65%);
    text-align: center;
}
.jump-card { max-width: 380px; width: 100%; }
.jump-spinner {
    width: 52px; height: 52px;
    margin: 0 auto 18px;
    border-radius: 50%;
    border: 3px solid #dfe9ff;
    border-top-color: var(--accent);
    animation: spin .9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.jump-title { font-size: 18px; font-weight: 700; color: #1b2a44; margin: 0 0 6px; }
.jump-sub { font-size: 13px; color: #8b9ab0; margin: 0 0 18px; word-break: break-all; }
.jump-btn {
    display: inline-block;
    padding: 11px 22px;
    border-radius: 12px;
    background: linear-gradient(135deg, #5285ff, #2f63e0);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 10px 22px rgba(59, 110, 246, .24);
}

@media (min-width: 560px) {
    .page { padding: 46px 20px 52px; }
    .site-title { font-size: 36px; }
    .nav-item { min-height: 70px; }
    .guard-card { padding: 26px 18px 20px; border-radius: 20px; }
    .guard-title { font-size: 19px; }
    .guard-url input { font-size: 11.5px; }
}

/* 桌面端：加宽容器并改为两列，避免中间一条窄带 */
@media (min-width: 900px) {
    .page { padding: 46px 24px 34px; }
    .site-title { font-size: 40px; }
    .nav-list {
        grid-template-columns: repeat(var(--cols-desk, 2), minmax(0, 1fr));
        gap: 14px;
        margin-top: 30px;
    }
    .nav-item { padding: 15px 12px 15px 18px; }
    .guard-page .page { max-width: 520px; }
}

/* ===== 内嵌访问页 ===== */
.embed-body {
    margin: 0; height: 100vh; display: flex; flex-direction: column;
    background: #f6f8fc; overflow: hidden;
}
.embed-bar {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px; background: #fff; border-bottom: 1px solid #e9eff8;
    flex: 0 0 auto;
}
.embed-back {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; border-radius: 10px; color: #4d5f79;
    background: #f2f6fd; flex: 0 0 auto;
}
.embed-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.embed-meta b { font-size: 14px; color: #1b2a44; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.embed-meta span { font-size: 11px; color: #93a1b7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.embed-open {
    flex: 0 0 auto; font-size: 12.5px; font-weight: 600; color: #fff;
    background: linear-gradient(135deg, #5285ff, #2f63e0);
    padding: 8px 14px; border-radius: 10px;
    box-shadow: 0 6px 16px rgba(59, 110, 246, .22);
}
.embed-tip {
    display: flex; align-items: flex-start; gap: 8px;
    padding: 10px 14px; background: #fffdf3; border-bottom: 1px solid #f4ecd6;
    font-size: 12px; line-height: 1.7; color: #8a6d3b; flex: 0 0 auto;
}
.embed-tip-ico { flex: 0 0 auto; }
.embed-frame-wrap { position: relative; flex: 1 1 auto; }
.embed-frame { width: 100%; height: 100%; border: 0; background: #fff; display: block; }
.embed-loading {
    position: absolute; inset: 0; display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 12px;
    background: #f6f8fc; color: #8b9ab0; font-size: 13px; z-index: 2;
}
.embed-fail { text-align: center; padding: 24px; }
.embed-fail-ico { font-size: 34px; margin-bottom: 10px; }
.embed-fail p { font-size: 13px; color: #6d7c93; line-height: 1.8; margin: 0 0 16px; }
.embed-fail-why { font-size: 11.5px !important; color: #a3b1c6 !important; margin: -8px 0 16px !important; }
