/* 
 * LoliMeow Theme - 首页弹窗样式
 * 双弹窗系统（普通弹窗+VIP弹窗）
 */

/* ========== 遮罩层 ========== */
.boxmoe-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none; /* 初始状态不可交互 */
    transition: opacity 0.4s ease;
}

.boxmoe-popup-overlay.active {
    opacity: 1;
    pointer-events: auto; /* 激活时可交互 */
}

/* ========== 弹窗主体 ========== */
.boxmoe-popup-content {
    /* 简洁的深色背景 */
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    
    /* 从顶部向下的绿色渐变叠加层 - 加深颜色 */
    background-image: 
        linear-gradient(
            to bottom,
            rgba(53, 235, 144, 0.18) 0%,      /* 顶部绿色 - 从 0.12 提升到 0.18 */
            rgba(53, 235, 144, 0.10) 25%,     /* 快速淡化 - 从 0.06 提升到 0.10 */
            rgba(53, 235, 144, 0.04) 50%,     /* 继续淡化 - 从 0.02 提升到 0.04 */
            transparent 70%                    /* 完全透明消失 */
        ),
        linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    
    /* 移除固定边框，使用 glow-effect 类的扫光边框 */
    border: none;
    border-radius: 16px;
    
    /* 多层阴影：外发光 + 深色投影 + 内发光 */
    box-shadow: 
        0 0 60px rgba(53, 235, 144, 0.15),        /* 绿色外发光 */
        0 30px 90px rgba(0, 0, 0, 0.6),           /* 深色投影 */
        inset 0 1px 0 rgba(53, 235, 144, 0.1),    /* 顶部内发光 */
        inset 0 -1px 0 rgba(0, 0, 0, 0.3);        /* 底部内阴影 */
    
    /* 合理的尺寸范围 */
    width: 90%;
    max-width: 580px;  /* 更合理的最大宽度 */
    min-width: 320px;
    
    /* 高度自适应 */
    min-height: 400px;
    max-height: calc(100vh - 40px);
    
    position: relative;
    padding: 0;
    opacity: 1;
    transform: scale(0.95);
    transition: transform 0.3s ease;
    overflow: hidden;
    z-index: 1;  /* 确保弹窗内容在遮罩层之上，但在关闭按钮之下 */
}

/* 顶部方棋纹效果 - 始终显示，整体从上到下渐变消失 */
.boxmoe-popup-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 200px;  /* 方棋纹覆盖区域 */
    
    /* 方棋纹图案 - 加深透明度使其更明显 */
    background-image: repeating-conic-gradient(
        from 0deg at 50% 50%,
        rgba(53, 235, 144, 0.08) 0deg 90deg,    /* 从 0.06 提升到 0.08 */
        transparent 90deg 180deg,
        rgba(53, 235, 144, 0.08) 180deg 270deg,
        transparent 270deg 360deg
    );
    background-size: 20px 20px;  /* 方格20px */
    background-position: 0 0;
    
    /* 使用 mask 实现整体从上到下的渐变消失 */
    -webkit-mask-image: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 1) 0%,        /* 顶部完全可见 */
        rgba(0, 0, 0, 0.5) 40%,     /* 中部淡化 */
        rgba(0, 0, 0, 0.2) 70%,     /* 继续淡化 */
        transparent 100%             /* 底部完全透明 */
    );
    mask-image: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 1) 0%,
        rgba(0, 0, 0, 0.5) 40%,
        rgba(0, 0, 0, 0.2) 70%,
        transparent 100%
    );
    
    pointer-events: none;
    z-index: 0;  /* 在最底层 */
    opacity: 1;  /* 始终显示 */
}

/* 弹窗专属扫光效果 - 覆盖 glow-effect 的 z-index */
.boxmoe-popup-content.glow-effect::before {
    z-index: 10;  /* 扫光背景效果在方棋纹之上 */
}

.boxmoe-popup-content.glow-effect::after {
    z-index: 11;  /* 扫光边框效果在最上层（但在内容之下） */
}

/* 弹窗激活状态 */
.boxmoe-popup-overlay.active .boxmoe-popup-content {
    transform: scale(1);
}

/* 内容容器 */
.boxmoe-popup-content .boxmoe-popup-inner {
    padding: 80px 40px 40px;  /* 顶部留空给悬浮标题 */
    overflow-y: auto;
    max-height: 100%;
    box-sizing: border-box;
    position: relative;
    z-index: 1;  /* 确保内容在动态光晕之上 */
}

/* 确保内容在装饰层之上 */
.boxmoe-popup-inner {
    position: relative;
    z-index: 1;
}

/* ========== 关闭按钮 - 悬浮在弹窗内右上角 ========== */
.boxmoe-popup-close {
    position: absolute;
    top: 10px;  /* 相对于 inner 容器的顶部 */
    right: 10px;  /* 相对于 inner 容器的右侧 */
    width: 48px;
    height: 48px;
    border: none;
    background: transparent;  /* 无背景 */
    color: rgba(255, 255, 255, 0.6);  /* 半透明白色 */
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    z-index: 1000;  /* 确保在最上层 */
    pointer-events: auto;  /* 确保可点击 */
}

.boxmoe-popup-close:hover {
    background: transparent;  /* 悬停时也无背景 */
    color: rgba(255, 255, 255, 1);  /* 悬停时完全不透明 */
    transform: rotate(90deg) scale(1.2);  /* 旋转并放大 */
}

/* ========== 弹窗头部 - 悬浮在弹窗容器左上角 ========== */
.boxmoe-popup-header {
    position: absolute;
    top: 30px;
    left: 40px;
    z-index: 5;  /* 低于关闭按钮的 z-index */
    background: transparent;
    padding: 0;
    margin: 0;
}

.boxmoe-popup-title {
    font-size: 32px;
    font-weight: 800;
    /* 清晰的绿色渐变 */
    background: linear-gradient(135deg, var(--theme-primary) 0%, #2BC97A 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: var(--theme-primary);
    margin: 0;
    padding: 0;
    line-height: 1.3;
    letter-spacing: -0.5px;
    /* 微妙的文字阴影 */
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    white-space: nowrap;  /* 防止标题换行 */
}

/* ========== 主要描述文字 ========== */
.boxmoe-popup-description {
    color: var(--text-primary); /* 清晰的白色 */
    font-size: 15px;
    line-height: 1.9;
    margin-bottom: var(--spacing-24); /* 24px */
    text-align: left;
    padding: 0 5px;
    position: relative; /* 为装饰元素提供定位基准 */
}

.boxmoe-popup-description p {
    margin: 0 0 10px 0;
    color: var(--text-primary) !important; /* 强制定义p标签颜色 */
}

.boxmoe-popup-description p:last-child {
    margin-bottom: 0;
}

.boxmoe-popup-description strong {
    color: var(--theme-primary) !important; /* 绿色强调文字 */
    font-weight: 600;
}

/* ========== 专属卡片容器 ========== */
.boxmoe-popup-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-24); /* 24px */
    margin-bottom: var(--spacing-24); /* 24px */
    position: relative; /* 为装饰元素提供定位基准 */
}

/* ========== 专属卡片样式 ========== */
.boxmoe-special-card {
    background: var(--bg-darker);
    border-radius: 8px;
    padding: 20px 18px;
    border: 1px solid var(--border-primary);
    position: relative;
    overflow: hidden;
}

/* 移除原有的hover边框效果 */
/* 使用主题统一的glow-effect扫光效果代替 */

/* ========== 卡片标签 ========== */
.boxmoe-card-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px; /* 从14px放大到18px */
    font-weight: 700;
    margin-bottom: 12px;
    text-align: left; /* 靠左对齐 */
}

.boxmoe-card-label span:first-child {
    font-size: 20px; /* emoji图标稍大一点 */
}

/* 新朋友卡片 - 移除背景色，使用渐变文字 */
.boxmoe-special-card.new-user .boxmoe-card-label {
    background: none;
    padding: 0;
    border-radius: 0;
}

.boxmoe-special-card.new-user .boxmoe-card-label span:last-child {
    background: linear-gradient(135deg, var(--theme-primary) 0%, #2BC97A 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 老朋友卡片 - 移除背景色，使用渐变文字 */
.boxmoe-special-card.old-user .boxmoe-card-label {
    background: none;
    padding: 0;
    border-radius: 0;
}

.boxmoe-special-card.old-user .boxmoe-card-label span:last-child {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ========== 卡片内容 ========== */
.boxmoe-card-content {
    color: var(--text-secondary); /* 清晰的白色 */
    font-size: 13.5px;
    line-height: 1.7;
    text-align: left;
}

/* ========== 按钮区域 ========== */
.boxmoe-popup-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-24); /* 24px */
    position: relative; /* 为装饰元素提供定位基准 */
}

/* 如果只有一个按钮，占满全宽 */
.boxmoe-popup-actions > :only-child {
    grid-column: 1 / -1;
}

/* 如果是奇数个按钮，最后一个占满全宽 */
.boxmoe-popup-actions > :nth-child(odd):last-child {
    grid-column: 1 / -1;
}

/* ========== 按钮基础样式 ========== */
.boxmoe-action-btn {
        padding: 10px 24px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

/* 主按钮 - 使用主题绿色 */
.boxmoe-action-btn.primary {
    background: linear-gradient(135deg, var(--theme-primary) 0%, var(--theme-primary-hover) 100%);
    color: var(--bg-primary);
    box-shadow: 0 4px 15px rgba(53, 235, 144, 0.3);
}

.boxmoe-action-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(53, 235, 144, 0.3); /* 保持阴影不变 */
    background: linear-gradient(135deg, var(--theme-primary-hover) 0%, var(--theme-primary) 100%);
}

.boxmoe-action-btn.primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.boxmoe-action-btn.primary:hover::before {
    width: 300px;
    height: 300px;
}

/* 次要按钮 - 使用填充动画效果 */
.boxmoe-action-btn.secondary {
    background: var(--bg-tertiary);
    color: var(--theme-primary);
    border: 1px solid var(--theme-primary);
    box-shadow: 0 4px 15px rgba(53, 235, 144, 0.15);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

/* 填充动画的两层伪元素 */
.boxmoe-action-btn.secondary::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%) scaleY(1) scaleX(1.25);
    top: 100%;
    width: 140%;
    height: 180%;
    background-color: var(--theme-primary-lighter);
    border-radius: 50%;
    display: block;
    transition: all 0.5s 0.1s cubic-bezier(0.55, 0, 0.1, 1);
    z-index: -1;
}

.boxmoe-action-btn.secondary::after {
    content: '';
    position: absolute;
    left: 55%;
    transform: translateX(-50%) scaleY(1) scaleX(1.45);
    top: 180%;
    width: 160%;
    height: 190%;
    background-color: var(--theme-primary);
    border-radius: 50%;
    display: block;
    transition: all 0.5s 0.1s cubic-bezier(0.55, 0, 0.1, 1);
    z-index: -1;
}

.boxmoe-action-btn.secondary:hover {
    color: var(--bg-primary);
    border-color: var(--theme-primary);
    box-shadow: 0 4px 15px rgba(53, 235, 144, 0.15); /* 保持阴影不变 */
}

.boxmoe-action-btn.secondary:hover::before {
    top: -35%;
    background-color: var(--theme-primary);
    transform: translateX(-50%) scaleY(1.3) scaleX(0.8);
}

.boxmoe-action-btn.secondary:hover::after {
    top: -45%;
    background-color: var(--theme-primary);
    transform: translateX(-50%) scaleY(1.3) scaleX(0.8);
}

/* 关闭按钮 - 保持低调 */
.boxmoe-action-btn.close {
    background: var(--bg-darker);
    color: var(--text-secondary);
    font-size: 14px;
    padding: 12px 24px;
    border: 1px solid var(--border-primary);
    position: relative;
    overflow: hidden;
}

/* 关闭按钮 - 背景发光效果（基于鼠标位置） */
.boxmoe-action-btn.close::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(
        600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
        rgba(255, 255, 255, 0.03),
        transparent 40%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1;
}

/* 关闭按钮 - 边框发光效果（基于鼠标位置） - 白色扫光 */
.boxmoe-action-btn.close::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: inherit;
    padding: 1px;
    background: radial-gradient(
        200px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
        rgba(255, 255, 255, 0.4),
        transparent 40%
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 2;
}

.boxmoe-action-btn.close:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--border-primary); /* 保持边框颜色不变 */
}

.boxmoe-action-btn.close:hover::before {
    opacity: 1;
}

.boxmoe-action-btn.close:hover::after {
    opacity: 1;
}

/* 确保按钮内部元素在发光层之上 */
.boxmoe-action-btn.close > * {
    position: relative;
    z-index: 3;
}

/* ========== 防止页面滚动 ========== */
body.boxmoe-popup-open {
    overflow: hidden;
}

/* 左下角小光点 */
.boxmoe-popup-description::after {
    content: '';
    position: absolute;
    bottom: 10px;
    left: 10px;
    width: 3px;
    height: 3px;
    background: rgba(53, 235, 144, 0.4);
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(53, 235, 144, 0.3);
    pointer-events: none;
    opacity: 1 !important; /* 强制始终显示 */
}

/* VIP弹窗左下角光点 - 金色 */
.boxmoe-vip-popup-content .boxmoe-vip-description::after {
    background: rgba(255, 215, 0, 0.4);
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.3);
    opacity: 1 !important; /* 强制始终显示 */
}


/* ========== VIP弹窗专属样式 ========== */

/* VIP弹窗专属内容样式 - 金色装饰主题 */
.boxmoe-vip-popup-content {
    /* VIP 专属的金色渐变背景 */
    background-image: 
        var(--vip-bg-gradient), 
        linear-gradient(148deg, var(--vip-primary) 0%, var(--vip-secondary) 40%, var(--vip-tertiary) 100%) !important;
    
    /* 移除固定边框，使用 glow-effect 类的扫光边框 */
    border: none !important;
    
    /* 纯黑色阴影 */
    box-shadow: 
        0 30px 90px rgba(0, 0, 0, 0.6),           /* 深色投影 */
        inset 0 1px 0 rgba(0, 0, 0, 0.2),         /* 顶部内阴影 */
        inset 0 -1px 0 rgba(0, 0, 0, 0.3) !important;  /* 底部内阴影 */
    
    /* VIP 弹窗更宽的尺寸 */
    max-width: 720px !important;  /* 从 580px 增加到 720px */
    min-width: 360px !important;
}

/* VIP弹窗关闭按钮 - 金色 hover 效果 */
.boxmoe-vip-popup-content .boxmoe-popup-close:hover {
    color: var(--vip-primary);  /* 悬停时变为金色 */
}

/* VIP弹窗顶部金色方棋纹效果 - 始终显示，整体从上到下渐变消失 */
.boxmoe-vip-popup-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 200px;  /* 方棋纹覆盖区域 */
    
    /* 金色方棋纹图案 - 使用 VIP 主色 */
    background-image: repeating-conic-gradient(
        from 0deg at 50% 50%,
        rgba(255, 186, 107, 0.08) 0deg 90deg,    /* VIP 主色半透明 */
        transparent 90deg 180deg,
        rgba(255, 186, 107, 0.08) 180deg 270deg,
        transparent 270deg 360deg
    );
    background-size: 20px 20px;  /* 方格20px */
    background-position: 0 0;
    
    /* 使用 mask 实现整体从上到下的渐变消失 */
    -webkit-mask-image: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 1) 0%,        /* 顶部完全可见 */
        rgba(0, 0, 0, 0.5) 40%,     /* 中部淡化 */
        rgba(0, 0, 0, 0.2) 70%,     /* 继续淡化 */
        transparent 100%             /* 底部完全透明 */
    );
    mask-image: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 1) 0%,
        rgba(0, 0, 0, 0.5) 40%,
        rgba(0, 0, 0, 0.2) 70%,
        transparent 100%
    );
    
    pointer-events: none;
    z-index: 0;  /* 在最底层 */
    opacity: 1;  /* 始终显示 */
}

/* VIP弹窗专属扫光效果 - 覆盖 glow-effect 的 z-index */
.boxmoe-vip-popup-content.glow-effect::before {
    z-index: 10;  /* 扫光背景效果在方棋纹之上 */
}

.boxmoe-vip-popup-content.glow-effect::after {
    z-index: 11;  /* 扫光边框效果在最上层（但在内容之下） */
}

/* VIP弹窗：纵向布局，便于按钮区独立滚动 */
.boxmoe-vip-popup .boxmoe-popup-inner {
    display: flex;
    flex-direction: column;
    overflow: hidden !important;
}

/* VIP弹窗标题 - 金色渐变（使用 VIP 配色） */
.boxmoe-vip-title {
    background: linear-gradient(135deg, var(--vip-primary) 0%, var(--vip-secondary) 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    text-shadow: 0 2px 8px var(--vip-primary-light) !important;
}

.boxmoe-vip-description {
    color: #ffffff !important;
    font-size: 17px !important;
    line-height: 1.8 !important;
    margin-bottom: var(--spacing-24); /* 24px */
}

.boxmoe-vip-description p {
    color: #ffffff !important;
    margin: 0 0 10px 0;
}

.boxmoe-vip-description p:last-child {
    margin-bottom: 0;
}

.boxmoe-vip-description strong {
    color: var(--vip-primary) !important; /* VIP强调文字使用金色 */
    font-weight: 600;
}

/* VIP介绍欢迎语 - 简洁纯文字 */
.boxmoe-vip-intro {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 16px 0;
    box-shadow: none;
    color: #ffffff;
}

/* VIP描述区域 - 为装饰元素提供定位基准 */
.boxmoe-vip-description {
    position: relative;
}

/* VIP课程按钮列表 */
.boxmoe-vip-buttons-list {
    display: flex;
    flex-direction: column;
    gap: 16px;  /* 从 24px 减少到 16px */
    margin-bottom: var(--spacing-24); /* 24px */
    padding: 0;  /* 确保列表本身没有额外 padding */
}

/* 可滚动容器 */
.boxmoe-vip-buttons-scroll {
    max-height: calc(3 * 56px + 32px);  /* 调整为 3 个按钮的高度 */
    overflow-y: auto;
    overflow-x: hidden;
    padding: 4px 4px 4px 0;  /* 上下各留 4px 空间，防止 hover 上浮被裁剪 */
    margin: -4px 0;  /* 负边距抵消 padding，保持整体高度不变 */
    flex: 1 1 auto;
    min-height: 0;
}

/* VIP 课程按钮 - 金黄色主题（使用 VIP 配色） */
.boxmoe-vip-course-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;  /* 从 16px 减少到 14px */
    min-height: 56px;  /* 从 64px 减少到 56px */
    box-sizing: border-box;
    width: 100%;
    border-radius: 8px;  /* 从 6px 增加到 8px */
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    
    /* 金黄色渐变背景 - 使用 VIP 配色变量 */
    background: linear-gradient(135deg, var(--vip-primary-lighter) 0%, rgba(255, 214, 133, 0.15) 100%) !important;
    border: 1px solid var(--vip-primary-light) !important;
    box-shadow: 0 2px 8px var(--vip-primary-lighter);
}

.boxmoe-vip-course-btn:hover {
    /* 悬停时加深金色背景 */
    background: linear-gradient(135deg, var(--vip-primary-light) 0%, rgba(255, 214, 133, 0.25) 100%) !important;
    border-color: rgba(255, 186, 107, 0.5) !important;
    box-shadow: 0 4px 16px var(--vip-primary-light);
    transform: translateY(-2px);
}

.boxmoe-vip-btn-text {
    color: var(--vip-primary) !important;  /* 金色文字 */
    font-size: 15px;
    font-weight: 600;
    flex: 1;
}

.boxmoe-vip-btn-arrow {
    color: var(--vip-primary) !important;  /* 金色箭头 */
    font-size: 20px;
    font-weight: bold;
    transition: transform 0.3s ease;
}

.boxmoe-vip-course-btn:hover .boxmoe-vip-btn-arrow {
    transform: translateX(5px);
    color: var(--vip-secondary) !important;  /* 悬停时变为浅金色 */
}

.boxmoe-vip-btn-arrow {
    color: #ffffff;
    font-size: 20px;
    font-weight: bold;
    transition: transform 0.3s ease;
}

.boxmoe-vip-course-btn:hover .boxmoe-vip-btn-arrow {
    transform: translateX(5px);
}

/* VIP关闭按钮 - 低调灰色主题 */
.boxmoe-vip-close-wrapper {
    text-align: center;
    margin-top: 16px;  /* 从 10px 增加到 16px */
}

.boxmoe-vip-close-btn {
    background: var(--bg-darker);  /* 深色背景 */
    color: var(--text-tertiary);  /* 灰色文字 */
    border: 1px solid var(--border-primary);  /* 深色边框 */
    padding: 12px 30px;
    border-radius: 8px;  /* 从 6px 增加到 8px */
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* 关闭按钮 - 背景发光效果（基于鼠标位置） */
.boxmoe-vip-close-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(
        600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
        rgba(255, 255, 255, 0.03),
        transparent 40%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1;
}

/* 关闭按钮 - 边框发光效果（基于鼠标位置） - 白色扫光 */
.boxmoe-vip-close-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: inherit;
    padding: 1px;
    background: radial-gradient(
        200px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
        rgba(255, 255, 255, 0.4),
        transparent 40%
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 2;
}

.boxmoe-vip-close-btn:hover {
    background: var(--bg-tertiary);  /* 悬停时稍微亮一点 */
    color: var(--text-secondary);  /* 悬停时文字稍微亮一点 */
    border-color: var(--border-secondary);  /* 悬停时边框稍微亮一点 */
}

.boxmoe-vip-close-btn:hover::before {
    opacity: 1;
}

.boxmoe-vip-close-btn:hover::after {
    opacity: 1;
}

/* 确保按钮内部元素在发光层之上 */
.boxmoe-vip-close-btn > * {
    position: relative;
    z-index: 3;
}

/* ========== 响应式设计 - 平板 ========== */
@media (max-width: 768px) {
    .boxmoe-popup-content,
    .boxmoe-vip-popup-content {
        width: 90%;
        max-width: 500px;  /* 平板端适当缩小 */
        min-width: 320px;
        min-height: 380px;
    }

    .boxmoe-popup-inner {
        padding: 70px 20px 25px;
        box-sizing: border-box;
    }
    
    .boxmoe-popup-header {
        top: 25px;
        left: 20px;
    }
    
    .boxmoe-popup-title {
        font-size: 24px;
    }
    
    .boxmoe-popup-close {
        top: 8px;
        right: 8px;
        width: 42px;
        height: 42px;
        font-size: 28px;
    }

    .boxmoe-popup-description {
        font-size: 13.5px;
        line-height: 1.7;
        margin-bottom: 20px;
    }

    .boxmoe-popup-cards {
        grid-template-columns: 1fr;
        gap: 10px;
        margin-bottom: 20px;
    }

    .boxmoe-special-card {
        padding: 15px 14px;
    }

    .boxmoe-card-label {
        font-size: 15px; /* 平板端稍小 */
        margin-bottom: 10px;
        gap: 6px;
    }
    
    .boxmoe-card-label span:first-child {
        font-size: 17px;
    }

    .boxmoe-card-content {
        font-size: 12.5px;
        line-height: 1.6;
    }

    .boxmoe-action-btn {
        padding: 13px 18px;
        font-size: 14px;
    }

    .boxmoe-popup-actions {
        gap: 10px;
    }
}

/* ========== 响应式设计 - 手机端 ========== */
@media (max-width: 480px) {
    .boxmoe-popup-overlay {
        padding: 20px 15px;
        align-items: center;
        overflow-y: auto;
        overflow-x: hidden;
    }

    .boxmoe-popup-content,
    .boxmoe-vip-popup-content {
        width: calc(100% - 30px);
        max-width: 100%;
        min-width: 280px;
        min-height: 320px;
        border-radius: 12px;
        margin: auto 0;
    }

    .boxmoe-popup-inner {
        padding: 60px 14px 16px;
        max-height: 100%;
        overflow-y: auto;
        box-sizing: border-box;
    }
    
    .boxmoe-popup-close {
        top: 6px;
        right: 6px;
        width: 36px;
        height: 36px;
        font-size: 24px;
    }
    
    .boxmoe-popup-header {
        top: 20px;
        left: 14px;
    }

    .boxmoe-popup-title {
        font-size: 19px;
        letter-spacing: -0.3px;
        line-height: 1.2;
    }

    /* 手机端隐藏描述文字 */
    .boxmoe-popup-description {
        display: none;
    }

    .boxmoe-popup-cards {
        gap: 8px;
        margin-bottom: 14px;
    }

    .boxmoe-special-card {
        padding: 10px;
        border-radius: 6px;
    }

    .boxmoe-card-label {
        font-size: 14px; /* 手机端 */
        margin-bottom: 8px;
        gap: 5px;
    }

    .boxmoe-card-label span:first-child {
        font-size: 16px;
    }

    .boxmoe-card-content {
        font-size: 11px;
        line-height: 1.5;
        max-height: 52px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .boxmoe-popup-actions {
        gap: 7px;
        grid-template-columns: 1fr; /* 手机端改为单列 */
    }
    
    /* 手机端所有按钮都占满全宽 */
    .boxmoe-popup-actions > * {
        grid-column: 1 / -1;
    }

    .boxmoe-action-btn {
        padding: 10px 14px;
        font-size: 12px;
        border-radius: 6px;
        gap: 5px;
    }

    .boxmoe-action-btn.close {
        padding: 9px 14px;
        font-size: 11px;
    }

    .boxmoe-popup-header {
        top: 45px;  /* 手机端对应缩小的边框 */
        left: 37px;
    }
    
    .boxmoe-popup-title {
        font-size: 20px;
        letter-spacing: -0.2px;
    }

    /* VIP弹窗手机端优化 */
    .boxmoe-vip-description {
        display: block !important;
        font-size: 13px !important;
        line-height: 1.7 !important;
        margin-bottom: 20px;
    }
    
    .boxmoe-vip-buttons-scroll {
        max-height: none; /* 移除固定高度限制 */
        overflow-y: visible; /* 不需要滚动 */
        overflow-x: visible; /* 不需要滚动 */
        padding-right: 0; /* 移除右侧padding */
        flex: 1 1 auto;
    }
    
    .boxmoe-vip-buttons-list {
        gap: 10px;
        margin-bottom: 20px;
    }
    
    .boxmoe-vip-course-btn {
        padding: 14px 16px;
        border-radius: 6px;
    }
    
    .boxmoe-vip-btn-text {
        font-size: 14px;
    }
    
    .boxmoe-vip-btn-arrow {
        font-size: 18px;
    }
    
    .boxmoe-vip-close-btn {
        padding: 10px 24px;
        font-size: 13px;
    }
}

/* ========== 超小屏幕优化 ========== */
@media (max-width: 360px) {
    .boxmoe-popup-overlay {
        padding: 15px 10px;
        align-items: center;
        overflow-y: auto;
        overflow-x: hidden;
    }

    .boxmoe-popup-content,
    .boxmoe-vip-popup-content {
        width: calc(100vw - 20px);
        min-width: 260px;
        min-height: 280px;
        max-height: calc(100vh - 30px);
        border-radius: 10px;
    }

    .boxmoe-popup-inner {
        padding: 55px 12px 14px;
        max-height: 100%;
        overflow-y: auto;
        box-sizing: border-box;
    }
    
    .boxmoe-popup-header {
        top: 18px;
        left: 12px;
    }
    
    .boxmoe-popup-title {
        font-size: 17px;
    }
    
    .boxmoe-popup-close {
        top: 5px;
        right: 5px;
        width: 32px;
        height: 32px;
        font-size: 20px;
    }

    .boxmoe-popup-title {
        font-size: 17px;
    }

    .boxmoe-card-content {
        font-size: 10px;
        max-height: 48px;
    }

    .boxmoe-action-btn {
        padding: 9px 12px;
        font-size: 11px;
    }

    .boxmoe-action-btn.close {
        font-size: 10px;
    }
}

/* ========== 滚动条美化 ========== */
.boxmoe-popup-inner::-webkit-scrollbar,
.boxmoe-vip-buttons-scroll::-webkit-scrollbar {
    width: 8px;
}

.boxmoe-popup-inner::-webkit-scrollbar-track,
.boxmoe-vip-buttons-scroll::-webkit-scrollbar-track {
    background: var(--bg-darker);
    border-radius: 10px;
}

.boxmoe-popup-inner::-webkit-scrollbar-thumb,
.boxmoe-vip-buttons-scroll::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--theme-primary) 0%, #2BC97A 100%);
    border-radius: 10px;
}

.boxmoe-popup-inner::-webkit-scrollbar-thumb:hover,
.boxmoe-vip-buttons-scroll::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #2BC97A 0%, var(--theme-primary) 100%);
}

/* Firefox 滚动条美化 */
.boxmoe-vip-buttons-scroll {
    scrollbar-width: thin;
    scrollbar-color: var(--theme-primary) var(--bg-darker);
}
