/* ==========================================================================
   全局模态弹窗基础样式垫片（深海科研蓝 · 半透明磨砂玻璃版）
   100% 适配深海科研蓝视觉规范 (#38bdf8 / #040d1a)
   ========================================================================== */
.modal {
    position: fixed;
    inset: 0;
    z-index: 99999 !important;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    background-color: rgba(2, 8, 20, 0.76) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: opacity 0.28s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.28s ease;
}

.modal-open {
    display: flex !important;
    pointer-events: auto !important;
}

.modal-box {
    width: 100%;
    max-width: 320px;
    padding: 24px 20px 20px 20px;
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(12, 32, 60, 0.88) 0%, rgba(5, 16, 32, 0.96) 100%);
    border: 1px solid rgba(148, 197, 253, 0.25);
    box-shadow:
            0 24px 60px rgba(2, 8, 20, 0.85),
            0 0 28px rgba(56, 189, 248, 0.14),
            inset 0 1px 0 rgba(224, 242, 254, 0.16);
    backdrop-filter: blur(24px) saturate(160%);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
    color: #f8fafc;
    text-align: center;
    position: relative;
    overflow: hidden;
    transform: scale(0.94);
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

/* 顶部科研蓝微光流光细线 */
.modal-box::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(56, 189, 248, 0.75) 50%, transparent 100%);
    pointer-events: none;
}

.modal-open .modal-box {
    transform: scale(1) !important;
}

/* 弹窗开启时虚化并锁定底层滚动容器 */
body:has(.modal-open) #scroll-container {
    filter: blur(2px);
    pointer-events: none !important;
    transition: filter 0.25s ease;
}