/* ============================================================
   全站公共「站点外框」样式
   顶部导航栏(header.glass-topbar) + 页脚(footer.glass-footer) + 手机底部 Tab(.mobile-tabbar)
   ------------------------------------------------------------
   来源：app/index/view/default/index/header.html 的内联 <style>（原样抽出，勿手改本文件以外的地方）。
   为什么要抽出来：Neko 首页需要与「产品套餐」页**完全一致**的顶栏与页脚，但又不该把
   header.html 那套 `*{}` 重置、`body{}`、`body.glass-enabled` 一起带进首页（会改掉 Neko 排版）。
   所以把「外框」单独成文件，header.html 与首页都 link 它 —— 一处生效、全站同步。
   改这里 = 同时改所有页面（含首页）。
   ============================================================ */
        header.glass-topbar {
            position: sticky;
            top: 12px;
            z-index: 1000;
        }

        header.scrolled {
            box-shadow: var(--glass-shadow-lg);
        }

        @media (max-width: 768px) {
            header.glass-topbar {
                top: 8px;
            }
        }

        nav {
            display: flex;
            justify-content: space-between;
            align-items: center;
            height: 64px;
        }

        .logo {
            display: flex;
            align-items: center;
            gap: 10px;
            font-size: 18px;
            font-weight: 700;
            color: var(--glass-text);
            text-decoration: none;
            flex-shrink: 0;
        }

        .logo-icon {
            width: 36px;
            height: 36px;
            background: linear-gradient(135deg, var(--glass-primary), var(--glass-primary-dark));
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #fff;
            font-size: 16px;
            flex-shrink: 0;
            overflow: hidden;
        }
        .logo-icon img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            padding: 0;
            background: transparent;
            border-radius: 0;
        }

        .logo-text {
            font-weight: 700;
            letter-spacing: -0.3px;
        }

        .nav-links {
            display: flex;
            align-items: center;
            gap: 4px;
        }

        .auth-buttons {
            display: flex;
            align-items: center;
            gap: 10px;
            flex-shrink: 0;
        }

        .nav-right {
            display: flex;
            align-items: center;
            gap: 12px;
            flex-shrink: 0;
            margin-left: auto;
        }

        /* v1.3.75：去掉按钮外发光（光晕），保留品牌色本身 */
        .btn-qq {
            background: #12B7F5;
            color: #fff;
            border-color: transparent;
            box-shadow: 0 1px 2px rgba(15, 23, 42, 0.10);
        }
        .btn-qq:hover {
            background: #0EA5D9;
            color: #fff;
            border-color: transparent;
            box-shadow: 0 2px 6px rgba(15, 23, 42, 0.14);
            transform: translateY(-1px);
        }

        .menu-toggle {
            display: none;
            background: var(--glass-bg-light);
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
            border: 1px solid var(--glass-border);
            color: var(--glass-text);
            font-size: 1.3rem;
            cursor: pointer;
            padding: 8px;
            border-radius: var(--glass-radius-sm);
            transition: all var(--glass-transition);
        }
        .menu-toggle:hover {
            background: var(--glass-bg);
        }

        /* Mobile Menu */
        .mobile-menu {
            display: none;
            position: fixed;
            top: calc(64px + 12px);
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0,0,0,0.4);
            z-index: 999;
            opacity: 0;
            transition: opacity var(--glass-transition);
        }
        .mobile-menu.active {
            opacity: 1;
        }
        .mobile-menu-panel {
            background: var(--glass-bg-strong);
            backdrop-filter: blur(var(--glass-blur-strong));
            -webkit-backdrop-filter: blur(var(--glass-blur-strong));
            border-top: 1px solid var(--glass-border);
            padding: 16px;
            display: flex;
            flex-direction: column;
            gap: 4px;
            max-height: calc(100vh - 64px - 12px);
            overflow-y: auto;
            transform: translateY(-10px);
            transition: transform var(--glass-transition);
        }
        .mobile-menu.active .mobile-menu-panel {
            transform: translateY(0);
        }
        .mobile-menu-panel .mobile-auth {
            display: flex;
            gap: 10px;
            padding: 12px 0;
            margin-top: 8px;
            border-top: 1px solid var(--glass-border);
        }
        .mobile-menu-panel .mobile-auth .btn {
            flex: 1;
            justify-content: center;
        }

        /* Mobile header nav */
        .mobile-header-nav {
            display: none;
            align-items: center;
            gap: 8px;
            margin-left: auto;
            flex: 1 1 auto;
            min-width: 0;
            justify-content: flex-end;
            overflow-x: auto;
            scrollbar-width: none;
            -ms-overflow-style: none;
        }
        .mobile-header-nav::-webkit-scrollbar {
            display: none;
        }
        .mobile-nav-links {
            display: flex;
            align-items: center;
            gap: 2px;
        }
        .mobile-auth {
            display: flex;
            align-items: center;
            gap: 8px;
            padding-left: 6px;
            border-left: 1px solid var(--glass-border);
        }
        .mobile-register-link {
            color: var(--glass-text-secondary);
            text-decoration: none;
            font-size: 13px;
            font-weight: 500;
            white-space: nowrap;
            transition: color var(--glass-transition);
        }
        .mobile-register-link:hover {
            color: var(--glass-primary);
        }

        @media (max-width: 768px) {
            .nav-right {
                display: none;
            }
            .menu-toggle {
                display: none;
            }
            .mobile-header-nav {
                display: flex;
            }
            .mobile-menu {
                display: none;
            }
            .mobile-menu.active {
                display: none;
            }
            nav {
                height: 56px;
                gap: 8px;
            }
            .logo {
                gap: 8px;
                font-size: 16px;
            }
            .logo-icon {
                width: 32px;
                height: 32px;
                font-size: 14px;
            }
            .container {
                padding: 0 12px;
            }
        }

        @media (max-width: 480px) {
            .mobile-nav-links {
                gap: 0;
            }
            .mobile-nav-links a {
                padding: 6px 6px;
                font-size: 12px;
            }
            .mobile-auth {
                gap: 6px;
                padding-left: 4px;
            }
            .mobile-auth .btn {
                padding: 6px 12px;
                font-size: 13px;
            }
            .mobile-register-link {
                font-size: 12px;
            }
        }

        /* ========== Footer ========== */
        footer {
            padding: 60px 0 0;
            color: var(--glass-text-secondary);
        }
        .footer-grid {
            display: grid;
            grid-template-columns: 1.8fr 1fr 1fr 1fr;
            gap: 48px;
            margin-bottom: 48px;
        }
        .footer-brand .logo {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            font-size: 18px;
            font-weight: 700;
            color: var(--glass-text);
            text-decoration: none;
            margin-bottom: 16px;
        }
        .footer-brand .logo-icon {
            background: linear-gradient(135deg, var(--glass-primary-light), var(--glass-primary));
            border-radius: 50%;
            overflow: hidden;
        }
        .footer-brand .logo-icon img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            padding: 0;
            background: transparent;
            border-radius: 0;
        }
        .footer-brand p {
            font-size: 13px;
            line-height: 1.8;
            margin-bottom: 20px;
            max-width: 340px;
            color: var(--glass-text-secondary);
        }
        .footer-contact {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }
        .footer-contact-item {
            display: flex;
            align-items: center;
            gap: 10px;
            font-size: 13px;
        }
        .footer-contact-item i {
            color: var(--glass-primary);
            width: 16px;
            text-align: center;
            font-size: 14px;
        }
        .footer-col h4 {
            font-size: 14px;
            color: var(--glass-text);
            margin-bottom: 20px;
            font-weight: 600;
            letter-spacing: 0.3px;
        }
        .footer-col ul {
            list-style: none;
        }
        .footer-col ul li {
            margin-bottom: 12px;
        }
        .footer-col a {
            color: var(--glass-text-secondary);
            text-decoration: none;
            font-size: 13px;
            transition: all var(--glass-transition);
            display: inline-flex;
            align-items: center;
            gap: 6px;
        }
        .footer-col a:hover {
            color: var(--glass-primary);
            transform: translateX(3px);
        }
        .footer-bottom {
            padding: 24px 0;
            border-top: 1px solid var(--glass-border);
            font-size: 13px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-wrap: wrap;
            gap: 12px;
        }
        .footer-bottom p {
            margin: 0;
            color: var(--glass-text-secondary);
        }
        .footer-bottom a {
            color: var(--glass-text-secondary);
            text-decoration: none;
            transition: color var(--glass-transition);
        }
        .footer-bottom a:hover {
            color: var(--glass-primary);
        }
        .footer-bottom-links {
            display: flex;
            gap: 20px;
        }
        .footer-licenses {
            display: flex;
            flex-wrap: wrap;
            gap: 8px 16px;
            color: var(--glass-text-muted);
            font-size: 12px;
        }
        .footer-licenses a {
            color: var(--glass-text-muted);
        }
        .footer-licenses a:hover {
            color: var(--glass-primary);
        }

        @media (max-width: 992px) {
            .footer-grid {
                grid-template-columns: repeat(2, 1fr);
                gap: 36px;
            }
            .footer-brand {
                grid-column: 1 / -1;
            }
        }

        /* 手机端页脚：与其它页面一致 —— 直接隐藏这块桌面页脚，导航交给底部 Tab Bar。
           这条规则原先只写在 header.html 的 `@media (max-width:768px)` 里，首页因为不 include
           header.html，手机端会多出一整块页脚（实测 780px 高）。放在这份共享样式里，
           所有页面（含首页）行为一致。 */
        @media (max-width: 768px) {
            footer.glass-footer {
                display: none !important;
            }
        }

        @media (max-width: 576px) {
            .footer-grid {
                grid-template-columns: 1fr;
                gap: 32px;
            }
            .footer-bottom {
                flex-direction: column;
                text-align: center;
            }
        }

        /* ========== Common Page Styles ========== */
        /* 外框内的 .container 就用外框这一套（左右 24px 内边距）。
           其它页面本来就是这一套（见 header.html 的 .container）；首页是 Neko 模板，
           Neko 的 .container 是 Bootstrap 3 的 `width:1170px`，会让顶栏/页脚内容比别的页
           多缩进 15px（实测页脚网格 373.5px vs 378px）。这里只限定在外框内，不动 Neko 自己的容器。
           v1.3.60：顶栏容器放开 max-width（通栏）—— LOGO+站名贴最左、功能按钮贴最右，
           不再两侧留大片空白（用户反馈）；页脚维持 1200px 居中不变。 */
        header.glass-topbar .container {
            width: auto;
            max-width: none;
            padding: 0 28px;
        }
        footer.glass-footer .container {
            width: auto;
            max-width: 1200px;
            padding: 0 24px;
        }

        /* ===== 页脚上方的猫娘（v1.3.60）：全站页面 footer-chrome 统一带 =====
           必须占正常文档流（不能 position:relative + top 位移），否则会叠进页脚
           被白色页脚底盖住脚 —— 首页旧版 .footer-img{top:75px} 就是这个事故。
           v1.3.60 微调：用 **负 margin-bottom** 让猫娘往下沉，坐在白色页脚块的上沿
           （腿垂在白框上），而不是整只悬在深色雨珠背景里、只有脚尖搭到框边；
           同时给 z-index:2 抬到页脚之上（页脚在 DOM 里排在后面且有不透明白底，
           不抬层级的话沉下去的那截就会被白底盖掉 = 用户反馈的「脚被挡住」）。
           素材 00078 是带 tRNS 的透明底 PNG，下沉后是直接压在白色页脚上的。
           ⚠️ 下沉量别再往上加：实测 >110px 会压住页脚「关于我们」那一列的链接。 */
        .footer-neko-wrap {
            display: flex;
            justify-content: flex-end;
            padding: 0 2vw 0 24px;
            pointer-events: none;
            line-height: 0;
            position: relative;
            z-index: 2;
            margin-bottom: -95px;
        }
        .footer-neko-img {
            width: 210px;
            height: auto;
            display: block;
            user-select: none;
        }
        /* 页脚顶部给猫娘让出「坐」的位置：她往下沉 95px 坐在白框上沿，
           这一段必须是空白（否则会压住页脚「关于我们」那一列的标题）。
           手机端桌面页脚隐藏，不需要这段留白。 */
        @media (min-width: 769px) {
            footer.glass-footer {
                padding-top: 104px;
            }
        }

        .page-wrapper {
            min-height: 100vh;
            display: flex;
            flex-direction: column;
        }
        .page-content {
            flex: 1;
        }

        /* ===== v1.3.66 手机端比例归一 =====
           部分 Android / QQ / 微信内置浏览器会启用「Font Boosting（字体放大）」或在横屏时
           自动放大正文，导致整站（首页与其它页面）观感「比例偏大、排版被撑开」。
           显式声明 text-size-adjust:100% 关闭该行为，统一以设计尺寸渲染。 */
        html {
            -webkit-text-size-adjust: 100%;
            -moz-text-size-adjust: 100%;
            -ms-text-size-adjust: 100%;
            text-size-adjust: 100%;
        }

        .mobile-tabbar {
            display: none;
            position: fixed;
            left: 0;
            right: 0;
            bottom: 0;
            z-index: 1001;
            background: var(--glass-bg-strong);
            backdrop-filter: blur(var(--glass-blur-strong));
            -webkit-backdrop-filter: blur(var(--glass-blur-strong));
            border-top: 1px solid var(--glass-border);
            box-shadow: 0 -2px 12px rgba(0,0,0,0.06);
            padding-bottom: env(safe-area-inset-bottom);
        }
        .mobile-tabbar-list {
            display: flex;
            align-items: center;
            justify-content: space-around;
            height: 56px;
        }
        .mobile-tabbar-item {
            flex: 1;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 3px;
            height: 100%;
            color: var(--glass-text-secondary);
            text-decoration: none;
            font-size: 11px;
            transition: all var(--glass-transition);
        }
        .mobile-tabbar-item i {
            font-size: 18px;
            margin-bottom: 1px;
        }
        .mobile-tabbar-item.active,
        .mobile-tabbar-item:hover {
            color: var(--glass-primary);
        }

        @media (max-width: 768px) {
            .mobile-tabbar {
                display: block;
            }
        }

@media (max-width: 768px) {
            /* 顶部导航栏改为 APP 风格：贴边、无圆角、固定 */
            header.glass-topbar {
                position: fixed !important;
                top: 0 !important;
                left: 0 !important;
                right: 0 !important;
                margin: 0 !important;
                border-radius: 0 !important;
                border: none !important;
                border-bottom: 1px solid var(--glass-border) !important;
                box-shadow: 0 1px 8px rgba(0,0,0,0.06) !important;
                z-index: 1000 !important;
            }
            nav {
                height: 52px !important;
                padding: 0 12px !important;
            }
            .logo-icon {
                width: 30px !important;
                height: 30px !important;
                font-size: 13px !important;
            }
            .logo-text {
                font-size: 16px !important;
                max-width: 110px;
                overflow: hidden;
                text-overflow: ellipsis;
                white-space: nowrap;
            }
            .mobile-header-nav {
                gap: 4px !important;
                justify-content: space-between !important;
            }
            /* 390px 实测：导航项 + 登录/注册按钮总宽超出，flex 会把按钮压到换行
               （「登录」竖成两行）。这里让导航项自己可横向滚动，右侧鉴权区不缩不换行。 */
            .mobile-nav-links {
                flex: 0 1 auto !important;
                min-width: 0 !important;
                overflow-x: auto !important;
                scrollbar-width: none;
                -ms-overflow-style: none;
            }
            .mobile-nav-links::-webkit-scrollbar { display: none; }
            .mobile-nav-links a {
                padding: 6px 6px !important;
                font-size: 12px !important;
            }
            .mobile-auth {
                flex: 0 0 auto !important;
            }
            .mobile-auth .glass-btn,
            .mobile-auth .mobile-register-link {
                white-space: nowrap !important;
            }
            .mobile-auth .glass-btn {
                padding: 5px 12px !important;
                font-size: 12px !important;
            }

            /* body 顶部留出导航栏空间 */
            body {
                padding-top: 60px !important;
                padding-bottom: calc(60px + env(safe-area-inset-bottom)) !important;
                -webkit-tap-highlight-color: transparent;
            }

            /* 容器边距收紧 */
            .container {
                padding: 0 12px !important;
            }

            /* 手机端桌面页脚是隐藏的（交给底部 Tab Bar），猫娘没有白色页脚可踩，
               下沉量归零、尺寸收小，避免脚悬空在页面底边之外 */
            .footer-neko-wrap {
                margin-bottom: 0;
                padding: 0 5vw 0 16px;
            }
            .footer-neko-img {
                width: 150px;
            }

            /* 底部 Tab Bar 优化 */
            .mobile-tabbar {
                height: calc(58px + env(safe-area-inset-bottom)) !important;
                padding-bottom: env(safe-area-inset-bottom) !important;
                background: rgba(255,255,255,0.92) !important;
            }
            .mobile-tabbar-list {
                height: 58px !important;
            }
            .mobile-tabbar-item {
                font-size: 10px !important;
                gap: 2px !important;
                -webkit-tap-highlight-color: transparent;
            }
            .mobile-tabbar-item i {
                font-size: 20px !important;
            }
            .mobile-tabbar-item.active {
                color: var(--glass-primary) !important;
                transform: scale(1.05);
            }

            /* 按钮触摸区域优化 */
            .glass-btn {
                min-height: 42px !important;
                border-radius: 12px !important;
            }
            .glass-btn-sm {
                min-height: 32px !important;
            }
            .glass-btn-lg {
                min-height: 48px !important;
                font-size: 15px !important;
            }
}

/* ==========================================================================
   手机端整体比例收敛（≤768px）
   --------------------------------------------------------------------------
   站点绝大多数业务页沿用 PC 版式（固定 px 字号 / 间距），在手机浏览器里
   整体观感偏大。本段只收敛「排版尺度」：基础字号、标题层级、正文留白、
   卡片内边距、表单控件字号。

   刻意不动的东西：
     - 不改配色、不改布局结构、不改 flex/grid
     - 不碰 hero（.big-title 由 #top-content 专门适配，这里显式排除）
     - 不碰产品卡 nk-plans / 数据大屏等已单独适配的组件
   桌面端（>768px）完全不受影响。
   ========================================================================== */
@media (max-width: 768px) {
    html {
        -webkit-text-size-adjust: 100%;
        -moz-text-size-adjust: 100%;
        text-size-adjust: 100%;
    }
    /* v1.3.75：手机端整体比例再收一档（更小更紧凑），桌面端不受影响 */
    body {
        font-size: 13px;
        line-height: 1.55;
    }

    /* 正文会话区左右留白收紧 */
    .page-content {
        padding-left: 10px;
        padding-right: 10px;
    }

    /* 标题层级降一档（显式排除首页 hero 大标题） */
    .page-content h1:not(.big-title) { font-size: 18px; line-height: 1.32; }
    .page-content h2:not(.big-title) { font-size: 15.5px; line-height: 1.38; }
    .page-content h3:not(.big-title) { font-size: 14px; line-height: 1.42; }
    .page-content h4:not(.big-title),
    .page-content h5:not(.big-title) { font-size: 13px; }

    /* 通用卡片内边距收敛 */
    .page-content .content-card-body,
    .page-content .card-body { padding: 12px; }

    /* 宽表可横向滚动，避免撑破视口导致整页被放大 */
    .page-content .table-responsive,
    .page-content .table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* 表单控件字号收敛 */
    .page-content .form-control,
    .page-content .form-input { font-size: 13px; }

    /* 按钮尺寸收敛（点击区域仍 ≥ 36px，兼顾可用性） */
    .page-content .glass-btn,
    .glass-btn { min-height: 36px !important; font-size: 13px !important; }
    .glass-btn-sm { min-height: 30px !important; font-size: 12px !important; }
    .glass-btn-lg { min-height: 42px !important; font-size: 14px !important; }
    .container { padding: 0 10px !important; }

    /* 常见大字号组件（数字/金额/统计）统一收小 */
    .page-content .stat-num,
    .page-content .data-value,
    .page-content .num,
    .page-content .amount { font-size: 20px !important; }
}
