/* 遮罩层 */
.mac_pop_bg,
.mac_pop_msg_bg {
    position: fixed;
    left:0; top:0;
    width:100%; height:100%;
    background: rgba(0,0,0,.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index:129;
    display:none;
    animation: popMaskFade .25s ease;
}

/* 主弹出容器 */
.mac_pop {
    position: fixed;
    left:50%; top:50%;
    transform: translate(-50%,-50%) scale(1);
    width:92vw;
    max-width:640px;
    max-height:86vh;
    min-height:140px;
    background:
            linear-gradient(150deg, rgba(26,26,30,.78), rgba(17,17,20,.78)),
            linear-gradient(25deg, rgba(255,255,255,.06), rgba(255,255,255,0) 55%);
    background-blend-mode: overlay;
    color:#f0f2f7;
    border:1px solid rgba(255,255,255,.10);
    border-radius:22px;
    overflow:hidden;
    box-shadow:
            0 18px 48px -16px rgba(0,0,0,.85),
            0 6px 20px -8px rgba(0,0,0,.65),
            inset 0 0 0 1px rgba(255,255,255,.04);
    backdrop-filter: blur(22px) saturate(160%);
    -webkit-backdrop-filter: blur(22px) saturate(160%);
    z-index:130;
    display:none;
    font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"PingFang SC","Microsoft YaHei",Arial,sans-serif;
    animation: popZoomIn .28s cubic-bezier(.34,1.56,.64,1);
    -webkit-font-smoothing: antialiased;
}

/* 更强玻璃：可选加类 .glass */
.mac_pop.glass {
    background:
            linear-gradient(155deg, rgba(35,35,40,.62), rgba(14,14,18,.62));
    border:1px solid rgba(255,255,255,.16);
}

/* 低性能模式：可在 body 或 .mac_pop 上加 lite 降级 */
.mac_pop.lite {
    backdrop-filter:none;
    -webkit-backdrop-filter:none;
    background:#141418;
    box-shadow:0 10px 32px -14px rgba(0,0,0,.8);
    border:1px solid #26262c;
}

/* 顶部区域 */
.mac_pop .pop_top {
    height:54px;
    display:flex;
    align-items:center;
    padding:0 18px;
    background:
            linear-gradient(to bottom, rgba(255,255,255,.08), rgba(255,255,255,0)),
            linear-gradient(140deg,#1b1e26,#141419);
    border-bottom:1px solid rgba(255,255,255,.08);
    position:relative;
}

.mac_pop .pop_top h2 {
    margin:0;
    font-size:16px;
    font-weight:600;
    letter-spacing:.5px;
    flex:1;
    overflow:hidden;
    white-space:nowrap;
    text-overflow:ellipsis;
    color:#fff;
    text-shadow:0 1px 2px rgba(0,0,0,.5);
}

/* 关闭按钮 */
.mac_pop .pop_close,
.mac_pop_msg .pop_close {
    width:34px;
    height:34px;
    line-height:34px;
    text-align:center;
    font-size:16px;
    font-weight:600;
    cursor:pointer;
    border-radius:12px;
    background:rgba(255,255,255,.10);
    color:#d5d8e0;
    user-select:none;
    transition: background .18s, transform .25s, box-shadow .25s;
    box-shadow:0 2px 4px rgba(0,0,0,.4), inset 0 0 0 1px rgba(255,255,255,.08);
}
.mac_pop .pop_close:hover,
.mac_pop_msg .pop_close:hover {
    background:rgba(255,255,255,.20);
    transform:scale(1.07);
}
.mac_pop .pop_close:active,
.mac_pop_msg .pop_close:active {
    transform:scale(.9);
    background:rgba(255,255,255,.30);
}

/* 内容区（兼容两种类名） */
.mac_pop .pop_content,
.mac_pop .pop-content {
    padding:16px 20px 24px;
    height:calc(100% - 54px);
    overflow-y:auto;
    font-size:14px;
    line-height:1.55;
    scrollbar-width:thin;
    scrollbar-color:#343943 transparent;
}

.mac_pop .pop_content::-webkit-scrollbar,
.mac_pop .pop-content::-webkit-scrollbar {
    width:10px;
}
.mac_pop .pop_content::-webkit-scrollbar-track,
.mac_pop .pop-content::-webkit-scrollbar-track {
    background:rgba(255,255,255,.04);
    border-radius:20px;
}
.mac_pop .pop_content::-webkit-scrollbar-thumb,
.mac_pop .pop-content::-webkit-scrollbar-thumb {
    background:#2d3440;
    border-radius:20px;
    border:2px solid transparent;
    background-clip:padding-box;
}
.mac_pop .pop_content::-webkit-scrollbar-thumb:hover,
.mac_pop .pop-content::-webkit-scrollbar-thumb:hover {
    background:#3a4352;
}

/* 底部按钮区（如果存在） */
.mac_pop .pop-foot {
    height:62px;
    display:flex;
    justify-content:flex-end;
    align-items:center;
    gap:12px;
    padding:0 18px;
    background:
            linear-gradient(to top, rgba(255,255,255,.06), rgba(255,255,255,0)),
            #15161b;
    border-top:1px solid rgba(255,255,255,.08);
}

/* 按钮通用 */
.mac_pop .pop-cancel,
.mac_pop .pop-ok {
    padding:10px 22px;
    font-size:14px;
    border:none;
    cursor:pointer;
    border-radius:14px;
    font-weight:500;
    letter-spacing:.5px;
    position:relative;
    overflow:hidden;
    outline:none;
    transition: transform .28s cubic-bezier(.34,1.56,.64,1),
    background .22s, box-shadow .28s, filter .25s;
    -webkit-tap-highlight-color:transparent;
}

/* 确认按钮 */
.mac_pop .pop-ok {
    background: linear-gradient(135deg,#2f6fff,#1a53ea);
    color:#fff;
    box-shadow:0 12px 30px -12px rgba(47,111,255,.75), 0 4px 14px -6px rgba(47,111,255,.6);
}
.mac_pop .pop-ok::after {
    content:"";
    position:absolute;
    inset:0;
    background:
            radial-gradient(circle at 25% 15%,rgba(255,255,255,.35),rgba(255,255,255,0) 65%),
            linear-gradient(160deg,rgba(255,255,255,.25),rgba(255,255,255,0) 55%);
    mix-blend-mode:overlay;
    pointer-events:none;
    opacity:.7;
}
.mac_pop .pop-ok:hover {
    transform:translateY(-4px);
    box-shadow:0 18px 42px -16px rgba(47,111,255,.85), 0 6px 18px -6px rgba(47,111,255,.55);
    filter:brightness(1.05);
}
.mac_pop .pop-ok:active {
    transform:translateY(0) scale(.95);
    filter:brightness(.92);
}

/* 取消按钮 */
.mac_pop .pop-cancel {
    background:linear-gradient(145deg,#23252b,#18191e);
    color:#d7dbe2;
    border:1px solid rgba(255,255,255,.10);
    box-shadow:0 4px 16px -8px rgba(0,0,0,.65), inset 0 0 0 1px rgba(255,255,255,.05);
}
.mac_pop .pop-cancel:hover {
    transform:translateY(-3px);
    background:linear-gradient(145deg,#272a31,#1c1d22);
}
.mac_pop .pop-cancel:active {
    transform:translateY(0) scale(.95);
    filter:brightness(.92);
}

/* 消息弹窗 */
.mac_pop_msg {
    position: fixed;
    left:50%; top:50%;
    transform:translate(-50%,-50%) scale(1);
    width: clamp(240px, 82vw, 420px);
    background:
            linear-gradient(150deg, rgba(28,28,32,.85), rgba(18,18,22,.85));
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    border:1px solid rgba(255,255,255,.12);
    border-radius:20px;
    padding:28px 26px 30px;
    display:none;
    z-index:140;
    color:#f2f4f8;
    box-shadow:0 20px 50px -18px rgba(0,0,0,.85), 0 6px 24px -10px rgba(0,0,0,.6);
    animation: popZoomIn .25s cubic-bezier(.34,1.56,.64,1);
    text-align:center;
}

.mac_pop_msg .pop-msg {
    font-size:14px;
    line-height:1.6;
    letter-spacing:.4px;
    word-break:break-word;
    margin-top:4px;
}

/* 小屏优化 */
@media (max-width:520px) {
    /*.mac_pop {*/
    /*    width:100vw;*/
    /*    max-width:100vw;*/
    /*    height:auto;*/
    /*    max-height:90vh;*/
    /*    border-radius:24px;*/
    /*    top:auto;*/
    /*    bottom:12px;*/
    /*    transform:translate(-50%,0);*/
    /*}*/
    .mac_pop .pop_top { height:52px; padding:0 16px; }
    .mac_pop .pop_content,
    .mac_pop .pop-content { padding:14px 16px 22px; }
    .mac_pop_msg { padding:24px 20px 26px; border-radius:22px; }
}

/* 全屏模式（如需：手动在元素加 .fullscreen） */
.mac_pop.fullscreen {
    width:100vw;
    height:100vh;
    max-width:100vw;
    max-height:100vh;
    top:50%; left:50%;
    transform:translate(-50%,-50%);
    border-radius:0;
    box-shadow:none;
}

/* 出场动画（如果你能在删除前加 .closing 类，可启用过渡） */
.mac_pop.closing,
.mac_pop_msg.closing {
    animation: popOut .22s ease forwards;
}

@keyframes popZoomIn {
    0% { opacity:0; transform:translate(-50%,-50%) scale(.85); filter:blur(4px); }
    55% { transform:translate(-50%,-50%) scale(1.035); }
    100% { opacity:1; transform:translate(-50%,-50%) scale(1); filter:blur(0); }
}

@keyframes popOut {
    to { opacity:0; transform:translate(-50%,-50%) scale(.9); filter:blur(4px); }
}

@keyframes popMaskFade {
    from { opacity:0; }
    to { opacity:1; }
}

/* 兼容旧结构左右布局（如果还用） */
.mac_pop .pop-content-left { float:left; }
.mac_pop .pop-content-right {
    float:left;
    width:310px;
    padding:20px 0 0 20px;
    font-size:14px;
    line-height:28px;
    color:#c9ced8;
}

/* 兼容旧类 .pop_content 不破坏结构 */
.pop_content { }

/* 文字选中颜色 */
.mac_pop ::selection,
.mac_pop_msg ::selection {
    background:#2f6fff;
    color:#fff;
}