﻿/* alert.css
   - modal: 使用 .alert-modal-backdrop / .alert-modal-panel / .alert-modal-header / .alert-modal-list
   - 顶部提示: .alert-topbar
   - 持久弹框(重连/退出): .persistent-backdrop / .persistent-panel / .persistent-header / .persistent-body / .persistent-footer / .persistent-btn
*/

/* 覆盖主页面容器(#game-root)的全屏弹框 */
.alert-modal-backdrop {
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    width: 100%;
    max-width: 600px; /* 与主页面 max-width 对齐 */
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    pointer-events: auto;
    z-index: 10050; /* 提升到最上层 */
}

/* 面板宽度限定为 backdrop 内宽度的一个合理值 */
.alert-modal-panel {
    width: calc(100% - 48px);
    max-width: 560px; /* 面板在 backdrop 内的最大宽度 */
    max-height: 86vh; /* 面板最大高度 */
    border-radius: 12px;
    background: #323232;
    box-shadow: 0 18px 60px rgba(0,0,0,.35);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin: 24px; /* 小屏幕时避免贴边 */
    box-sizing: border-box;
    z-index: 10060; /* 面板比遮罩更高，确保在遮罩之上 */
}

/* 标题区 */
.alert-modal-header {
    padding: 16px 20px;
    font-size: 18px;
    font-weight: 600;
    border-bottom: 1px solid #b99191bf;
    text-align: center;
    color: #d17b1e;
}

/* 图片列表区：固定 60x60，列数自适应（最多 4 列），不足 4 个居中显示；滚动条隐藏但可滚 */
.alert-modal-list {
    padding: 30px;
    display: grid;
    grid-template-columns: repeat(4, 60px); /* 始终以最多 4 列为准 */
    column-gap: 15px;
    row-gap: 15px;
    justify-content: center; /* 不足 4 个时居中整块网格 */
    align-content: start;
    max-height: calc(86vh - 62px - 60px);
    overflow: auto;
    scrollbar-width: none; /* Firefox */
}

    .alert-modal-list::-webkit-scrollbar {
        display: none;
    }

    .alert-modal-list img {
        width: 60px !important;
        height: 60px !important;
        object-fit: cover;
        border-radius: 8px;
        background: #f5f5f5;
        display: block;
    }

/* 顶部提示条（不影响操作，距顶部 10%） */
.alert-topbar {
    left: 50%;
    top: 10%;
    transform: translateX(-50%);
    background: rgba(0,0,0,.85);
    color:var(--btn_color_q);
    padding: 10px;
    font-size: 14px;
    border-radius: 4px;
    box-shadow: 0 6px 18px rgba(0,0,0,.25);
    transition: opacity .18s ease;
    pointer-events: none;
    min-width: 200px;
    text-align: center;
    z-index:1000;
}

    .alert-topbar.alert-topbar-show {
        opacity: 1;
        pointer-events: auto;
    }

    .alert-topbar.alert-topbar-hide {
        opacity: 0;
        pointer-events: none;
    }
.alert-increase{
    left: 50%;
    top: 10%;
    transform: translateX(-50%);
    background: var(--btn_bg_s);
    color: var(--btn_color_q);
    padding: 10px;
    font-size: 18px;
    border-radius: 10px;
    box-shadow: 0 6px 18px var(--btn_color_q);
    transition: opacity .18s ease;
    pointer-events: none;
    min-width: 250px;
    min-height: 100px;
    text-align: center;
}
/* ===== 修改：持久弹框（不可点空白关闭），与主页面对齐并覆盖主页面 ===== */
.persistent-backdrop {
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    width: 100%;
    max-width: 600px; /* 与主页面 max-width 对齐 */
    height: 100%;
    background: rgba(0,0,0,0.7); /* 加深遮罩，突出弹框 */
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    pointer-events: auto; /* 持久弹框应阻止底层交互 */
    z-index: 1000;
    padding: 0px;
    border: 0px;
}

/* 持久面板与 alert-modal-panel 保持一致的尺寸与背景 */
.persistent-panel {
    width: calc(100% - 40px);
    max-width: 560px;
    border-radius: 12px;
    box-shadow: 0 18px 60px rgba(0,0,0,.35);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center; /* 内容水平居中 */
    justify-content: center; /* 内容垂直居中 */
    padding: 0; /* 内部 body 管理间距 */
    box-sizing: border-box;
    z-index: 9999; /* 面板在遮罩之上 */
    min-height: 300px;
    gap:0px;
    padding-top:25px;
}

/* 标题保持风格一致 */
.persistent-header {
    width: 65%;
    padding: 8px 18px;
    font-size: 18px;
    font-weight: 700;
    /* border-bottom: 1px solid rgba(255, 255, 255, 0.03); */
    background: linear-gradient(90deg, rgb(0 0 0 / 29%), rgb(255 255 255 / 0%));
    text-align: center;
    color: rgb(169 74 0);
}

/* 内容区居中显示（图片或文本均居中） */
.persistent-body {
    color: #3a1f00;
    font-size: 14px;
    white-space: pre-wrap;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 70%;
    box-sizing: border-box;
    padding: 10px;
    background-color: #ffffff17;
    min-height: 100px;
    border-radius: 6px;
}

/* 按钮区：按钮居中 */
.persistent-footer {
    display: flex;
    justify-content: center; /* 居中显示按钮 */
    gap: 12px;
    padding: 8px;
    border-top: 1px solid rgba(255,255,255,0.03);
    width: 100%;
}

/* 按钮样式略作调整以与 modal 风格一致 */
.persistent-btn {
    min-width: 100px;
    padding: 6px 0px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500; /* 新增：字体加粗 */
}

/* 底部 tab 的小红点 */
.fp-tab-reddot {
    position: relative;
}

    .fp-tab-reddot::after {
        content: "";
        position: absolute;
        top: 6px;
        right: 10px;
        width: 8px;
        height: 8px;
        background: #f44336;
        border-radius: 50%;
        box-shadow: 0 0 0 2px rgba(0,0,0,0.15);
    }