/* ===========================================================
   FREE福瑞 · 液态玻璃皮肤
   -----------------------------------------------------------
   两档材质：
     .hy    轻量磨砂（默认）—— blur + 渐变高光，滚动不掉帧
     .hy-r  完整折射（hyalite）—— 只给弹窗/登录卡这类背景不动的表面

   为什么分两档：SVG 位移折射在滚动时每帧都要重采样背景，
   实测整页 8 块玻璃滚动只有 7fps；纯模糊同场景 54fps。

   关闭：任意页面加 ?glass=off （访问 ?glass=on 恢复）
   =========================================================== */

:root{
    --ffg-amb: .9;                 /* 背景光斑浓度，每页可覆盖 */
}

/* ---------- 1. 背景光斑：折射需要背景有东西可弯 ---------- */
.ff-amb{
    position: fixed; inset: 0; z-index: -1;
    overflow: hidden; pointer-events: none; contain: strict;
    opacity: var(--ffg-amb);
}
.ff-amb i{
    position: absolute; display: block; border-radius: 50%;
}
/* 不用 filter:blur()。全屏固定层上的大半径模糊会在滚动时每帧重算，
   是整站卡顿的主因；径向渐变本身带柔边，渲染成本几乎为零。 */
.ff-amb i:nth-child(1){
    width: 62vw; height: 62vw; min-width: 520px; min-height: 520px;
    left: -20vw; top: -24vw;
    background: radial-gradient(closest-side, rgba(255,174,99,.80), rgba(255,174,99,.42) 46%, rgba(255,174,99,0) 74%);
}
.ff-amb i:nth-child(2){
    width: 54vw; height: 54vw; min-width: 460px; min-height: 460px;
    right: -18vw; top: -14vw;
    background: radial-gradient(closest-side, rgba(255,176,192,.62), rgba(255,176,192,.30) 46%, rgba(255,176,192,0) 74%);
}
.ff-amb i:nth-child(3){
    width: 64vw; height: 64vw; min-width: 520px; min-height: 520px;
    left: 12vw; bottom: -38vw;
    background: radial-gradient(closest-side, rgba(168,198,255,.62), rgba(168,198,255,.28) 46%, rgba(168,198,255,0) 74%);
}
.ff-amb i:nth-child(4){
    width: 44vw; height: 44vw; min-width: 380px; min-height: 380px;
    right: -6vw; bottom: -18vw;
    background: radial-gradient(closest-side, rgba(143,240,216,.50), rgba(143,240,216,.22) 46%, rgba(143,240,216,0) 74%);
}
/* 细斜纹：给玻璃边缘一点可读的纹理 */
.ff-amb::after{
    content: ""; position: absolute; inset: -12%; opacity: .5;
    background:
        repeating-linear-gradient(112deg, rgba(120,80,40,.055) 0 1px, transparent 1px 9px),
        repeating-linear-gradient(-34deg, rgba(120,80,40,.035) 0 1px, transparent 1px 15px);
}

/* ---------- 2. 磨砂玻璃（默认档） ---------- */
.hy{
    background: linear-gradient(158deg,
                rgba(255,255,255,.62) 0%,
                rgba(255,255,255,.34) 46%,
                rgba(255,255,255,.46) 100%) !important;
    border: 1px solid rgba(255,255,255,.72);
    -webkit-backdrop-filter: blur(12px) saturate(1.25);
            backdrop-filter: blur(12px) saturate(1.25);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.9),
                inset 0 -1px 0 rgba(255,255,255,.32),
                0 18px 42px -22px rgba(96,58,26,.30),
                0 2px 8px -6px rgba(96,58,26,.16);
    background-clip: padding-box;
}

/* ---------- 3. 折射玻璃（只在背景不动的表面用） ---------- */
.hy-r{
    background: linear-gradient(158deg,
                rgba(255,255,255,.84) 0%,
                rgba(255,251,244,.68) 55%,
                rgba(255,253,248,.74) 100%) !important;
    -webkit-backdrop-filter: var(--hyalite, blur(12px)) saturate(1.15);
            backdrop-filter: var(--hyalite, blur(12px)) saturate(1.15);
}

/* 深色玻璃（左侧竖导航这类本来就是深底的） */
.hy-d{
    background: linear-gradient(158deg,
                rgba(58,52,46,.72) 0%,
                rgba(40,35,31,.58) 100%) !important;
    border-color: rgba(255,255,255,.13);
}

/* 滚出视口的玻璃：彻底停掉滤镜。看不见的地方不该继续吃 GPU */
.hy-off{
    -webkit-backdrop-filter: none !important;
            backdrop-filter: none !important;
}

/* ---------- 4. 首页 ---------- */
.ffg-home{ --ffg-amb: 1; }
.ffg-home .navbar{
    padding: 10px 20px !important;
    border-radius: 999px;
    margin-top: 8px;
}
.ffg-home .hero-image{ border-radius: 48px; }
.ffg-home .feature-item{ border-radius: 26px; }
.ffg-home .team-card{ border-radius: 22px; }
.ffg-home .modal-box{ border: 0; }

/* ---------- 5. 登录 ---------- */
.ffg-login{ --ffg-amb: .75; }
.ffg-login .card{ border: 0; }
.ffg-login .right{ background: transparent; }

/* ---------- 6. 个人中心 ---------- */
.ffg-me{ --ffg-amb: .85; }
.ffg-me .top{
    border-bottom: 1px solid rgba(255, 255, 255, .7);
}
.ffg-me .card{ border: 1px solid rgba(255, 255, 255, .62); }
.ffg-me .dlg{ border: 0; }

/* ---------- 7. 聊天（桌面） ---------- */
.ffg-chat{ --ffg-amb: .62; }
.ffg-chat .main{ background: transparent; }
.ffg-chat .rail{ border-right: 1px solid rgba(255, 255, 255, .1); }
.ffg-chat .side{ border-right: 1px solid rgba(255, 255, 255, .55); }
.ffg-chat .main-head{ border-bottom: 1px solid rgba(255, 255, 255, .6); }
.ffg-chat .composer{ border-top: 1px solid rgba(255, 255, 255, .6); }
.ffg-chat .dialog{ border: 0; }
.ffg-chat .menu-pop, .ffg-chat .emoji-pop{ border: 0; }

/* ---------- 8. 聊天（手机） ---------- */
.ffg-chatm{ --ffg-amb: .6; }
/* 列表页透出背景光斑；聊天页必须自带底色，
   否则下面叠着的列表视图会透过玻璃露出来（白条鬼影） */
.ffg-chatm .list-view{ background: transparent; }
.ffg-chatm .chat-view{
    background: linear-gradient(180deg, rgba(250,246,240,.94), rgba(245,239,231,.91));
    -webkit-backdrop-filter: blur(18px) saturate(1.06);
            backdrop-filter: blur(18px) saturate(1.06);
}
.ffg-chatm .bar{ border-bottom: 1px solid rgba(255, 255, 255, .62); }
.ffg-chatm .composer{ border-top: 1px solid rgba(255, 255, 255, .62); }
.ffg-chatm .sheet{ border: 0; }
.ffg-chatm .sheet-mask{ background: rgba(60, 45, 30, .28); }

/* ---------- 9. 广场 ---------- */
.ffg-app{ --ffg-amb: .9; }
.ffg-app .glass{ border: 1px solid rgba(255, 255, 255, .66); }

/* ---------- 10. 统一圆润度：贴边面板圆内角，浮层一律大圆角 ---------- */
/* 聊天（桌面）：整体悬浮卡片化——四周留缝、四角全圆 */
.ffg-chat .rail{
    margin: 10px 0 10px 10px;
    border-radius: 28px;
}
.ffg-chat .side{
    margin: 10px 0 10px 10px;
    border-radius: 28px;
}
.ffg-chat .main-head{
    margin: 10px 10px 0;
    border-radius: 26px;
}
.ffg-chat .composer{
    margin: 0 10px 10px;
    border-radius: 26px;
}
/* 窄屏（原站 <=820px 断点）：side 变通栏，宽度要扣掉两侧留缝 */
@media (max-width: 820px){
    .ffg-chat .side{ width: calc(100% - 20px); }
}
.ffg-chat .menu-pop, .ffg-chat .emoji-pop{ border-radius: 22px; }
.ffg-chatm .bar{ border-radius: 0 0 24px 24px; }
.ffg-chatm .composer{ border-radius: 24px 24px 0 0; }
.ffg-chatm .sheet{ border-radius: 24px 24px 0 0; }
.ffg-me .top{ border-radius: 0 0 24px 24px; }
.ffg-me .card{ border-radius: 24px; }
.ffg-me .dlg{ border-radius: 24px; }
.ffg-app .glass{ border-radius: 32px; }

/* ---------- 11. 兜底：不支持模糊的浏览器 ---------- */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))){
    .hy{ background: rgba(255, 253, 250, .93) !important; }
}

/* ---------- 12. 新软件体系四页（/home/ 兽友 兽聚 社区，2026-11-18） ---------- */
.ffg-apphome{ --ffg-amb: .82; }
.ffg-apphome .rail{ border-right: 1px solid rgba(255, 255, 255, .55); }
.ffg-apphome .cl-panel{ border-right: 1px solid rgba(255, 255, 255, .5); }
.ffg-apphome .ov{ border: 0; border-radius: 24px; }
.ffg-fur{ --ffg-amb: .8; }
.ffg-fur .fv-card{ border: 1px solid rgba(255, 255, 255, .55); border-radius: 20px; }
.ffg-gath{ --ffg-amb: .8; }
.ffg-gath .evt{ border: 1px solid rgba(255, 255, 255, .55); border-radius: 20px; }
.ffg-cm{ --ffg-amb: .72; }
.ffg-cm .cm-nav{ border-bottom: 1px solid rgba(255, 255, 255, .5); }
.ffg-cm .cm-hero{ border-radius: 26px; }
