/* =========================================================
   门户Plus 首页模板 —— 上（菜单栏）/ 中（系统介绍）/ 下（联系方式）
   完全自包含：不依赖 Bootstrap，图标为页面内联 SVG。
   ========================================================= */

:root {
    --brand: #5b6cf0;
    --brand-2: #8b5cf6;
    --brand-soft: #eef0ff;
    --ink: #161c30;
    --ink-2: #454e68;
    --muted: #7b849c;
    --line: #e6eaf4;
    --bg: #f5f7fc;
    --card: #ffffff;
    --dark: #111a2e;
    --dark-2: #18233c;
    --green: #16835f;
    --green-bg: #e6f7ef;
    --amber: #a86a12;
    --amber-bg: #fff3dd;
    --radius: 18px;
    --shadow: 0 8px 26px rgba(28, 40, 80, .06);
    --shadow-lg: 0 18px 48px rgba(28, 40, 80, .16);
    --wrap: 1200px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
                 "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    /* 内容精简后按一屏式布局：主区自动撑满 header 与 footer 之间的剩余高度 */
    min-height: 100vh; display: flex; flex-direction: column;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
[hidden], .d-none { display: none !important; }
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ico {
    width: 18px; height: 18px; flex: none;
    fill: none; stroke: currentColor; stroke-width: 1.8;
    stroke-linecap: round; stroke-linejoin: round;
}
.ico-sm { width: 15px; height: 15px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

/* 顶部菜单栏常驻，锚点跳转要留出它的高度（主栏 80 + 分类栏 64 + 渐变线 3） */
#zoneIntro, #zoneContact { scroll-margin-top: 162px; }

/* ---------- 通用按钮 ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    border: 1px solid transparent; border-radius: 10px;
    padding: 8px 16px; font-size: 13px; font-weight: 600;
    transition: background .18s, border-color .18s, color .18s, transform .18s;
    white-space: nowrap;
}
.btn-lg { padding: 12px 22px; font-size: 14px; border-radius: 12px; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: #4a5ae0; }
.btn-ghost { background: #fff; color: var(--ink-2); border-color: var(--line); }
.btn-ghost:hover { color: var(--brand); border-color: #c8cffa; background: #fafbff; }
.btn-light { background: #fff; color: #4657d8; box-shadow: 0 8px 22px rgba(15, 25, 70, .18); }
.btn-light:hover { background: #f3f5ff; }
.btn-ghost-light { background: rgba(255, 255, 255, .08); color: #fff; border-color: rgba(255, 255, 255, .45); }
.btn-ghost-light:hover { background: rgba(255, 255, 255, .18); }
.btn-outline-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .32); }
.btn-outline-light:hover { background: rgba(255, 255, 255, .1); }

/* =========================================================
   上：菜单栏模块
   ========================================================= */
/* 整个上部菜单栏常驻：sticky 若只加在 .topbar 上，会被 header 的
   固定高度限制住，往下滚一百多像素就失效，所以加在父容器上。 */
.zone-top {
    position: sticky; top: 0; z-index: 60; background: #fff;
    box-shadow: 0 6px 26px rgba(28, 40, 80, .07);
}
/* 顶部一条品牌渐变线，给菜单栏压一个视觉起点 */
.zone-top::before {
    content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; z-index: 3;
    background: linear-gradient(90deg, var(--brand), var(--brand-2) 55%, #48b6e8);
}
.topbar {
    position: relative; z-index: 2;
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
}
.topbar-inner { display: flex; align-items: center; gap: 32px; height: 80px; }

.brand { display: flex; align-items: center; gap: 13px; flex: none; }
.brand-mark {
    width: 46px; height: 46px; border-radius: 14px;
    display: grid; place-items: center; color: #fff;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    box-shadow: 0 8px 20px rgba(91, 108, 240, .34);
}
.brand-mark .ico { width: 25px; height: 25px; stroke-width: 1.7; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; font-size: 21px; font-weight: 800; letter-spacing: .5px; }
.brand-text small { font-size: 10px; font-weight: 600; color: var(--muted); letter-spacing: 1.6px; margin-top: 4px; }

.nav-links { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.nav-link {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 10px 16px; border-radius: 12px;
    font-size: 14.5px; font-weight: 600; color: var(--ink-2);
    background: none; border: 0; transition: background .18s, color .18s;
}
.nav-link:hover { background: #f3f5ff; color: var(--brand); }
.nav-link.is-active { background: var(--brand-soft); color: var(--brand); }
.dropdown-toggle .ico { transition: transform .2s; }
.dropdown.open > .dropdown-toggle .ico { transform: rotate(180deg); }

.top-actions { display: flex; align-items: center; gap: 12px; flex: none; margin-left: auto; }
.icon-btn {
    width: 40px; height: 40px; display: grid; place-items: center;
    border: 1px solid var(--line); border-radius: 12px;
    background: #fff; color: var(--ink-2); transition: all .18s;
}
.icon-btn:hover { color: var(--brand); border-color: #c8cffa; background: #fafbff; }
.icon-btn.is-on { color: var(--brand); border-color: #c8cffa; background: var(--brand-soft); }
.menu-btn { display: none; }
.guest { display: flex; align-items: center; gap: 9px; }
.guest .btn { padding: 9px 18px; border-radius: 11px; }

/* 下拉菜单（含 Auth.js 动态注入的「后台管理」） */
.dropdown { position: relative; }
.dropdown-menu {
    position: absolute; top: calc(100% + 10px); right: 0; z-index: 80;
    min-width: 216px; margin: 0; padding: 8px;
    list-style: none; background: #fff;
    border: 1px solid var(--line); border-radius: 14px;
    box-shadow: var(--shadow-lg); display: none;
}
.dropdown.open > .dropdown-menu { display: block; animation: dropIn .16s ease-out; }
@keyframes dropIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.dropdown-menu-end { right: 0; left: auto; }
.dropdown-label { display: block; padding: 7px 12px 4px; font-size: 11px; color: var(--muted); letter-spacing: .6px; }
.dropdown-item {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 12px; border-radius: 9px;
    font-size: 13px; color: var(--ink-2); white-space: nowrap;
}
.dropdown-item:hover { background: #f3f5ff; color: var(--brand); }
.dropdown-item .ico { width: 16px; height: 16px; color: var(--muted); }
.dropdown-item:hover .ico { color: var(--brand); }
.dropdown-item.danger { color: #c0444e; }
.dropdown-item.danger:hover { background: #fff0f1; color: #c0444e; }
.dropdown-item.danger .ico { color: #c0444e; }
.dropdown-divider { border: 0; border-top: 1px solid var(--line); margin: 6px 4px; }
/* Auth.js 注入的图标是 CDN 字体图标；离线时给一个占位，避免文字被挤压 */
.dropdown-menu .bi-shield-lock::before { content: "\25C8"; font-style: normal; width: 16px; color: var(--muted); }

.user-toggle {
    display: flex; align-items: center; gap: 9px;
    background: #fff; border: 1px solid var(--line); border-radius: 999px;
    padding: 5px 12px 5px 5px; color: var(--ink); font-size: 13.5px; font-weight: 600;
}
.user-toggle:hover { border-color: #c8cffa; }
.user-toggle .avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; background: var(--brand-soft); }
.user-toggle .ico { color: var(--muted); }

/* 搜索面板 */
.search-panel {
    position: absolute; left: 0; right: 0; top: 100%; z-index: 90;
    background: #fff; border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 32px rgba(28, 40, 80, .1);
    padding: 18px 0 20px;
}
.search-box {
    display: flex; align-items: center; gap: 12px;
    max-width: calc(var(--wrap) - 48px); padding: 0 24px;
}
.search-box > .ico { width: 20px; height: 20px; color: var(--brand); }
.search-box input {
    flex: 1; border: 0; outline: none; background: transparent;
    font-size: 16px; color: var(--ink); padding: 10px 0;
}
.search-box input::placeholder { color: #a5adc0; }
.search-esc {
    border: 1px solid var(--line); background: #f7f8fc; color: var(--muted);
    font-size: 11px; border-radius: 6px; padding: 4px 8px;
}
.search-results { padding-top: 8px; max-height: 320px; overflow-y: auto; }
.search-hint { color: var(--muted); font-size: 12px; padding: 6px 0; }
.search-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 14px; border-radius: 10px; cursor: pointer;
}
.search-item:hover, .search-item.is-sel { background: #f3f5ff; }
.search-item .s-name { font-weight: 600; font-size: 14px; }
.search-item .s-desc { color: var(--muted); font-size: 12px; margin-left: auto; text-align: right; }
.search-item .s-cat { font-size: 11px; color: var(--brand); background: var(--brand-soft); border-radius: 6px; padding: 2px 8px; }
.search-item mark { background: #fff0b8; color: inherit; border-radius: 3px; }
.search-empty { color: var(--muted); font-size: 13px; padding: 10px 0; }

/* 分类导航条：六大业务分类，鼠标移入即展开；触屏 / 键盘点击展开 */
.shortcut {
    position: relative; z-index: 1;
    background: linear-gradient(180deg, #fff 0%, #f7f9ff 100%);
    border-bottom: 1px solid var(--line);
}
.shortcut-inner { display: flex; align-items: center; justify-content: center; gap: 0; min-height: 64px; }
.shortcut-label {
    display: inline-flex; align-items: center; gap: 8px; flex: none;
    padding-right: 22px; border-right: 1px solid var(--line);
    font-size: 13px; font-weight: 800; color: var(--ink);
}
.shortcut-label > .ico { color: var(--brand); }
.zone-no {
    font-style: normal; font-size: 10px; letter-spacing: 1.1px; font-weight: 800;
    color: var(--brand); background: var(--brand-soft);
    border-radius: 6px; padding: 4px 8px; margin-right: 2px;
}

/* 不能用 overflow-x:auto 横向滚动：会连带裁掉向下展开的菜单，
   所以窄屏用 flex-wrap 换行，并缩小按钮保证六个分类仍能放一行。 */
.cat-nav { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px; padding: 0; }
.cat-dropdown { position: relative; }
.cat-toggle {
    position: relative;
    display: inline-flex; align-items: center; gap: 7px;
    border: 0; background: transparent;
    border-radius: 10px; padding: 11px 18px;
    font-size: 15px; font-weight: 700; color: var(--ink-2); white-space: nowrap;
    transition: color .18s, background .18s;
}
/* 底部品牌色指示条，展开时由中间展开成实线 */
.cat-toggle::after {
    content: ""; position: absolute; left: 18px; right: 18px; bottom: 4px; height: 2px;
    border-radius: 2px; background: var(--brand);
    transform: scaleX(0); transition: transform .2s;
}
.cat-toggle:hover { color: var(--brand); background: #eef1ff; }
.cat-dropdown.open > .cat-toggle { color: var(--brand); background: var(--brand-soft); }
.cat-dropdown.open > .cat-toggle::after { transform: scaleX(1); }
.cat-toggle .ico { width: 14px; height: 14px; opacity: .65; transition: transform .2s, opacity .2s; }
.cat-dropdown.open > .cat-toggle .ico { transform: rotate(180deg); opacity: 1; }
/* 没有可点条目的分类：灰化占位，不弹出空面板（有条目后由 JS 自动恢复） */
.cat-dropdown.is-empty > .cat-toggle { color: #a6aec1; cursor: default; }
.cat-dropdown.is-empty > .cat-toggle:hover { color: #a6aec1; background: transparent; }
.cat-dropdown.is-empty > .cat-toggle .ico { opacity: .3; }
/* 一级直达入口（云网盘）：复用分类按钮外观，用右箭头区别于「展开下拉」的箭头 */
a.cat-link { text-decoration: none; }
a.cat-link .ico { opacity: .55; }
a.cat-link:hover .ico { opacity: 1; transform: translateX(2px); }

.cat-dropdown > .dropdown-menu {
    left: 0; right: auto; top: calc(100% + 8px);
    min-width: 292px; padding: 14px;
    border-color: #dfe5f5; border-radius: 16px;
    box-shadow: 0 22px 52px rgba(28, 40, 80, .18);
}
/* 菜单水平位置由 Home.js 按视口夹取（内联 left 覆盖这里的默认值） */
/* 透明桥：盖住按钮与菜单之间的 8px 空隙，鼠标斜移过去不会中断 hover */
.cat-dropdown > .dropdown-menu::before {
    content: ""; position: absolute; left: 0; right: 0; top: -10px; height: 10px;
}
.cat-menu-head {
    display: block; padding: 3px 8px 12px; margin-bottom: 6px;
    border-bottom: 1px solid var(--line);
    font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: .8px;
}
.cat-item {
    display: flex; align-items: center; gap: 12px;
    padding: 9px 10px; border-radius: 12px; color: var(--ink-2);
}
/* 图标加浅色圆角底，下拉看起来更成块、不至于飘 */
.cat-item > .ico {
    box-sizing: content-box; width: 18px; height: 18px; padding: 8px; margin-top: 0;
    border-radius: 11px; background: #f0f3ff; color: var(--brand);
}
.cat-item-text { min-width: 0; }
.cat-item b { display: block; font-size: 14px; font-weight: 700; color: var(--ink); white-space: nowrap; }
.cat-item small { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; white-space: nowrap; }
a.cat-item::after {
    content: "\203A"; margin-left: auto; align-self: center;
    font-size: 19px; line-height: 1; color: #bcc5da;
    transition: transform .18s, color .18s;
}
a.cat-item:hover { background: #f3f5ff; }
a.cat-item:hover b { color: var(--brand); }
a.cat-item:hover > .ico { background: #e2e8ff; }
a.cat-item:hover::after { color: var(--brand); transform: translateX(3px); }
.cat-item.is-planned { cursor: default; opacity: .68; }
.cat-item.is-planned b { color: var(--muted); }
.cat-badge {
    display: inline-block; font-style: normal; font-size: 10px; font-weight: 700;
    line-height: 1.4; border-radius: 5px; padding: 1px 6px; margin-left: 4px;
    background: #eef1f8; color: #9099ad; vertical-align: 1px;
}
.cat-badge.badge-login { background: var(--brand-soft); color: var(--brand); }
.cat-badge.badge-admin { background: var(--amber-bg); color: var(--amber); }

/* =========================================================
   中：首页轮播图（原 Hero / 系统速览已整体移除）
   ========================================================= */
/* 主区撑满剩余视口并垂直居中，轮播作为唯一主视觉 */
.zone-mid { flex: 1; display: flex; align-items: center; padding: 28px 0 36px; }
.zone-mid > .wrap { width: 100%; }

.carousel {
    position: relative; width: 100%;
    height: clamp(320px, 42vw, 540px);
    border-radius: 24px; overflow: hidden;
    background: #e6ebf7;
    box-shadow: 0 24px 60px rgba(28, 40, 80, .16);
}
.carousel-track { position: absolute; inset: 0; }
/* 切换走「旧帧淡出 → 新帧淡入」错峰过渡，避免两图半透明叠加出现鬼影 */
.carousel-slide {
    position: absolute; inset: 0; opacity: 0;
    transition: opacity .32s ease; will-change: opacity;
}
.carousel-slide.is-active { opacity: 1; }
.carousel-slide img {
    display: block; width: 100%; height: 100%;
    object-fit: cover; object-position: center;
}
/* 图片缺失时不留白，给一层柔和占位底色 */
.carousel-slide.is-broken { background: linear-gradient(135deg, #c9d4f5, #eef1ff); }
/* 上下轻微压暗，保证白色控件在浅色照片上也看得清 */
.carousel::after {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(180deg, rgba(12, 18, 40, .10), transparent 30%, transparent 68%, rgba(12, 18, 40, .22));
}
.carousel-arrow {
    position: absolute; top: 50%; z-index: 2;
    width: 42px; height: 42px; margin-top: -21px;
    display: grid; place-items: center;
    border: 1px solid rgba(255, 255, 255, .55); border-radius: 50%;
    background: rgba(18, 26, 48, .34); color: #fff;
    backdrop-filter: blur(6px); cursor: pointer;
    opacity: .72; transition: opacity .25s, background .2s;
}
.carousel:hover .carousel-arrow,
.carousel:focus-within .carousel-arrow { opacity: 1; }
.carousel-arrow:hover { background: rgba(18, 26, 48, .62); }
.carousel-prev { left: 18px; }
.carousel-next { right: 18px; }
.carousel-prev .ico { transform: rotate(90deg); }
.carousel-next .ico { transform: rotate(-90deg); }
.carousel-arrow .ico { width: 20px; height: 20px; stroke-width: 2.4; }

.carousel-dots {
    position: absolute; left: 50%; bottom: 18px; z-index: 2;
    transform: translateX(-50%);
    display: flex; align-items: center; gap: 9px;
}
.carousel-dot {
    width: 9px; height: 9px; padding: 0; border: 0; border-radius: 999px;
    background: rgba(255, 255, 255, .55); cursor: pointer;
    box-shadow: 0 1px 4px rgba(12, 18, 40, .25);
    transition: width .25s, background .25s;
}
.carousel-dot:hover { background: #fff; }
.carousel-dot.is-active { width: 26px; background: #fff; }
/* 只有一张图片时隐藏控件，也不启动自动播放 */
.carousel.is-single .carousel-arrow,
.carousel.is-single .carousel-dots { display: none; }

/* 区块标题 */
.intro-block { margin-top: 64px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.kicker { font-size: 11px; letter-spacing: 1.8px; font-weight: 800; color: var(--brand); }
.section-head h2 { font-size: 28px; font-weight: 800; margin: 8px 0 6px; letter-spacing: .3px; }
.section-head p { margin: 0; color: var(--muted); font-size: 13px; }
.filters { display: flex; flex-wrap: wrap; gap: 6px; }
.filters button {
    border: 1px solid var(--line); background: #fff; color: var(--ink-2);
    border-radius: 999px; padding: 6px 14px; font-size: 12px; font-weight: 600;
    transition: all .16s;
}
.filters button:hover { color: var(--brand); border-color: #c8cffa; }
.filters button.is-on { background: var(--brand); border-color: var(--brand); color: #fff; }

/* 模块卡片：10 张，桌面 5 列 × 2 行固定排布 */
.module-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.module-card {
    display: flex; flex-direction: column; min-height: 208px;
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 20px 18px 16px; box-shadow: var(--shadow);
    transition: transform .2s, box-shadow .2s, border-color .2s;
}
@media (hover: hover) and (pointer: fine) {
    .module-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: #c8cffa; }
    .module-card:hover .go { transform: translateX(4px); color: var(--brand); }
}
.tile {
    width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
    color: #fff; margin-bottom: 16px;
}
.tile .ico { width: 22px; height: 22px; }
.tile-data { background: linear-gradient(135deg, #4f7cf0, #48b6e8); }
.tile-work { background: linear-gradient(135deg, #6b6ae8, #a06bea); }
.tile-file { background: linear-gradient(135deg, #2ea98d, #59c9a5); }
.tile-life { background: linear-gradient(135deg, #ef7f6a, #f2b25c); }
.tile-sys  { background: linear-gradient(135deg, #43506c, #7786a8); }
.module-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.module-top h3 { font-size: 15px; font-weight: 700; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.badge { flex: none; font-size: 10px; font-weight: 700; border-radius: 6px; padding: 2px 7px; }
.badge-open { background: var(--green-bg); color: var(--green); }
.badge-login { background: var(--brand-soft); color: var(--brand); }
.badge-admin { background: var(--amber-bg); color: var(--amber); }
.module-card p { font-size: 12px; line-height: 1.7; color: var(--muted); margin: 9px 0 14px; }
.module-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.tag { font-size: 11px; color: var(--muted); background: #f3f5fa; border-radius: 6px; padding: 2px 9px; }
.go { color: #b6bed0; transition: transform .2s, color .2s; }
.empty-filter { text-align: center; color: var(--muted); padding: 30px 0; }

.roadmap {
    display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
    margin-top: 20px; padding: 14px 18px;
    background: #eef1f8; border: 1px dashed #d3d9e8; border-radius: 14px;
}
.roadmap-label { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--muted); }
.roadmap em { font-style: normal; font-size: 12px; color: #9099ad; background: #fff; border-radius: 6px; padding: 3px 10px; }
.roadmap-note { font-size: 11px; color: #9aa3b6; margin-left: auto; }

/* 系统特性 */
.capabilities { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 56px; }
.cap {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    padding: 22px 22px 24px; box-shadow: var(--shadow);
}
.cap-icon {
    width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center;
    background: var(--brand-soft); color: var(--brand); margin-bottom: 14px;
}
.cap h3 { font-size: 15px; font-weight: 700; margin: 0 0 8px; }
.cap p { font-size: 12.5px; line-height: 1.75; color: var(--muted); margin: 0; }

/* =========================================================
   下：联系方式（深色收尾带：左侧标题 + 右侧邮箱卡片 / 赞赏按钮）
   ========================================================= */
.zone-bottom {
    position: relative; overflow: hidden;
    background:
        radial-gradient(620px 220px at 86% -20%, rgba(123, 131, 255, .22), transparent 72%),
        linear-gradient(180deg, #1b2540 0%, #111a2e 100%);
    color: #c8d2e6; padding: 16px 0 15px;
}
/* 顶部一道细渐变高光，把收尾带和上方浅色轮播干净地切开 */
.zone-bottom::before {
    content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(139, 92, 246, .6) 32%, rgba(72, 182, 232, .42) 72%, transparent);
}
.contact-wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.contact-head { display: flex; flex-direction: column; gap: 3px; flex: none; }
.contact-kicker {
    font-size: 10px; font-weight: 800; letter-spacing: 2.2px;
    color: #9aa6ff; text-transform: uppercase;
}
.contact-head h2 {
    color: #fff; font-size: 21px; font-weight: 800;
    margin: 0; letter-spacing: 1.2px;
}
.contact-actions { display: flex; align-items: center; gap: 22px; }
.contact-mail {
    display: flex; align-items: center; gap: 12px;
    padding: 7px 16px 7px 8px; border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, .10);
    background: rgba(255, 255, 255, .045);
    transition: background .2s, border-color .2s, transform .2s;
}
.contact-ico {
    width: 36px; height: 36px; flex: none; display: grid; place-items: center;
    border-radius: 11px; background: rgba(154, 166, 255, .16); color: #b9c2ff;
}
.contact-ico .ico { width: 18px; height: 18px; }
.contact-mail-text { display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }
.contact-mail-text small { font-size: 10.5px; letter-spacing: 1px; color: #8d9ab6; }
.contact-mail-text b { color: #fff; font-size: 14px; font-weight: 700; letter-spacing: .2px; white-space: nowrap; }
.contact-mail:hover, .contact-mail:focus-visible {
    background: rgba(255, 255, 255, .09); border-color: rgba(185, 194, 255, .45);
    transform: translateY(-1px);
}
.contact-sep {
    width: 1px; height: 32px; flex: none;
    background: linear-gradient(180deg, transparent, rgba(255, 255, 255, .2), transparent);
}
.reward-btn {
    display: inline-flex; align-items: center; gap: 9px; white-space: nowrap;
    padding: 11px 17px; border-radius: 999px;
    border: 1px solid rgba(185, 194, 255, .42);
    background: linear-gradient(135deg, rgba(91, 108, 240, .30), rgba(139, 92, 246, .22));
    color: #fff; font-size: 13.5px; font-weight: 700; letter-spacing: .5px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .09);
    transition: background .2s, border-color .2s, transform .2s, box-shadow .2s;
}
.reward-btn .ico { width: 16px; height: 16px; }
.reward-btn .ico-sm { width: 14px; height: 14px; opacity: .7; transition: transform .2s, opacity .2s; }
.reward-btn:hover, .reward-btn:focus-visible {
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    border-color: transparent; transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(91, 108, 240, .36);
}
.reward-btn:hover .ico-sm, .reward-btn:focus-visible .ico-sm { opacity: 1; transform: translateX(2px); }

/* 赞赏码弹层：点「赞赏」才出现，图片同样首次打开时才加载 */
.qr-lightbox {
    position: fixed; inset: 0; z-index: 120;
    display: grid; place-items: center; padding: 20px;
    background: rgba(8, 13, 28, .76); backdrop-filter: blur(5px);
    animation: qrIn .18s ease-out;
}
@keyframes qrIn { from { opacity: 0; } to { opacity: 1; } }
.qr-panel {
    position: relative; width: min(340px, 88vw);
    padding: 26px 24px 20px; border-radius: 22px; overflow: hidden;
    background: #fff; text-align: center;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .45);
    animation: qrPop .22s ease-out;
}
@keyframes qrPop { from { opacity: 0; transform: translateY(12px) scale(.97); } to { opacity: 1; transform: none; } }
.qr-panel::before {
    content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px;
    background: linear-gradient(90deg, var(--brand), var(--brand-2), #48b6e8);
}
.qr-kicker { display: block; font-size: 10px; font-weight: 800; letter-spacing: 2.2px; color: var(--brand); }
.qr-panel h3 { margin: 7px 0 16px; font-size: 18px; font-weight: 800; color: var(--ink); letter-spacing: .5px; }
.qr-panel > img { display: block; width: 100%; height: auto; border-radius: 14px; background: #f7f9ff; }
.qr-panel p { margin: 14px 0 0; color: var(--muted); font-size: 12px; }
.qr-close {
    position: absolute; top: 12px; right: 12px; z-index: 1;
    width: 30px; height: 30px; display: grid; place-items: center;
    border: 0; border-radius: 50%; background: rgba(17, 26, 46, .07); color: var(--ink-2);
}
.qr-close:hover { background: rgba(17, 26, 46, .15); color: var(--ink); }
.qr-close .ico { width: 15px; height: 15px; }

/* =========================================================
   响应式
   ========================================================= */
@media (max-width: 1180px) {
    .module-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 1020px) {
    .module-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .carousel { height: clamp(300px, 50vw, 460px); }
}
@media (max-width: 900px) {
    .nav-links {
        display: none; position: absolute; left: 0; right: 0; top: 100%;
        flex-direction: column; align-items: stretch; gap: 2px;
        margin: 0; padding: 12px 24px 16px;
        background: #fff; border-bottom: 1px solid var(--line);
        box-shadow: 0 16px 30px rgba(28, 40, 80, .1);
    }
    .nav-links.open { display: flex; }
    .nav-link { width: 100%; justify-content: space-between; }
    .nav-more > .dropdown-menu { position: static; box-shadow: none; border: none; padding: 2px 0 6px 12px; }
    .nav-more > .dropdown-menu .dropdown-item { font-size: 13px; }
    .roadmap-note { margin-left: 0; width: 100%; }
}
@media (max-width: 760px) {
    .module-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .capabilities { grid-template-columns: 1fr; }
    .section-head { flex-direction: column; align-items: flex-start; gap: 16px; }
    /* 窄屏轮播保持居中，避免上下留白一边倒 */
    .carousel { height: clamp(250px, 58vw, 380px); }
}
@media (max-width: 560px) {
    .wrap { padding: 0 16px; }
    #zoneIntro, #zoneContact { scroll-margin-top: 128px; }
    .topbar-inner { height: 64px; gap: 10px; }
    .brand-text { font-size: 17px; }
    .brand-text small { display: none; }
    .brand-mark { width: 36px; height: 36px; }
    /* 手机端「登录」「注册」都要在，不再隐藏 ghost 按钮：
       窄屏只留注册会导致未登录用户找不到登录入口。两个按钮压缩到一行足够放。 */
    .guest { gap: 6px; }
    .guest .btn { padding: 10px 12px; font-size: 12.5px; border-radius: 9px; }
    .user-toggle span[data-role="nickname"] { display: none; }
    .search-box { padding: 0 16px; }
    .shortcut-inner { gap: 0; min-height: 0; }
    .shortcut-label { display: none; }
    /* 七个入口（含云网盘）仍保持一行，靠缩小字号与内边距，不换行 */
    .cat-nav { gap: 1px; padding: 6px 0; }
    .cat-toggle { font-size: 12px; padding: 6px 8px; border-radius: 8px; }
    .cat-toggle::after { left: 10px; right: 10px; bottom: 2px; }
    .cat-toggle .ico { display: none; }
    .cat-dropdown > .dropdown-menu { min-width: 230px; padding: 10px; }
    .cat-item > .ico { padding: 6px; width: 16px; height: 16px; }
    .cat-item b { font-size: 13px; white-space: normal; }
    .cat-item small { font-size: 11px; white-space: normal; line-height: 1.4; }
    .cat-item-text { flex: 1; }
    a.cat-item::after { display: none; }
    .zone-mid { padding: 18px 0 26px; }
    .carousel { height: clamp(250px, 76vw, 330px); border-radius: 18px; }
    .carousel-arrow { width: 34px; height: 34px; margin-top: -17px; }
    .carousel-prev { left: 10px; }
    .carousel-next { right: 10px; }
    .carousel-dots { bottom: 12px; }
    .intro-block { margin-top: 44px; }
    .section-head h2 { font-size: 23px; }
    .module-grid { grid-template-columns: 1fr; gap: 12px; }
    .module-card { min-height: 0; padding: 17px; }
    .module-card p { margin-bottom: 12px; }
    .capabilities { margin-top: 38px; }
    /* 窄屏底部两行：标题一行，邮箱卡片 + 赞赏按钮一行，仍保持紧凑 */
    .zone-bottom { padding: 14px 0 13px; }
    .contact-wrap { flex-direction: column; align-items: stretch; gap: 12px; }
    .contact-head { gap: 2px; }
    .contact-head h2 { font-size: 19px; }
    .contact-actions { justify-content: space-between; gap: 10px; }
    .contact-mail { flex: 1; min-width: 0; gap: 9px; padding: 6px 10px 6px 6px; }
    .contact-ico { width: 32px; height: 32px; }
    .contact-mail-text b { font-size: 12.5px; }
    .contact-sep { display: none; }
    .reward-btn { padding: 9px 13px; font-size: 12.5px; gap: 7px; }
}
@media (max-width: 380px) {
    .cat-toggle { font-size: 11.5px; padding: 5px 7px; }
    .cat-nav { gap: 1px; }
}
