/* 两级导航栏样式 */
/* ============================================ */
.navbar-wrapper { 
    width: 100%; 
    max-width: 1200px; 
    margin-bottom: 20px; 
    box-shadow: var(--navbar-shadow, 0 4px 6px -1px rgba(0,0,0,0.3)); 
    border-radius: 12px; 
    position: relative;
    z-index: 100;
    /* ⚠️ 不能用 overflow:hidden，否则下拉菜单会被裁切。
       改由内层 navbar-top 和 navbar-tabs 各自带圆角。 */
}
.navbar-wrapper .navbar-top {
    border-radius: 12px 12px 0 0;
}
.navbar-wrapper .navbar-tabs {
    border-radius: 0 0 12px 12px;
    overflow-x: auto;  /* 标签栏允许横向滚动（它原本就要这样） */
}
/* 如果 navbar-wrapper 里只有 navbar-top（没有 tabs 的页面），让它四角圆 */
.navbar-wrapper .navbar-top:last-child {
    border-radius: 12px;
}

/* 🌙/☀️ 主题切换按钮 */
.theme-toggle {
    background: none;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 4px 8px;
    line-height: 1;
    transition: all 0.2s;
    color: var(--text-sub);
    display: flex;
    align-items: center;
    justify-content: center;
}
.theme-toggle:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.25);
}
[data-theme="light"] .theme-toggle {
    border-color: rgba(0,0,0,0.12);
    color: #64748b;
}
[data-theme="light"] .theme-toggle:hover {
    background: rgba(0,0,0,0.04);
    border-color: rgba(0,0,0,0.2);
}

/* 顶部栏 - 用户信息栏 */
.navbar-top { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    background: var(--navbar-top-bg, #374151); 
    padding: 12px 20px; 
}

/* ========== Logo 响应式瘦身（v3.3.4） ========== */
/* 小屏下逐步隐藏次要元素：logo-sub → logo-pro → 只剩主名 */
@media (max-width: 600px) {
    .navbar-logo .logo-sub { display: none !important; }
    .navbar-logo .logo-slogan { display: none !important; }
}
@media (max-width: 400px) {
    .navbar-logo .logo-pro { display: none !important; }
}

.navbar-logo { 
    font-weight: 800; 
    font-size: 1.3rem; 
    color: white; 
    display: flex; 
    align-items: center; 
    gap: 10px; 
}
.navbar-logo .logo-sub { color: #9ca3af; font-weight: 400; font-size: 0.75rem; }
.navbar-logo a { display: inline; }
.navbar-logo .logo-slogan {
    font-size: 0.75rem;
    font-weight: 400;
    color: #6b7280;
    border-left: 1px solid #4b5563;
    padding-left: 10px;
    margin-left: 2px;
    letter-spacing: 0.05em;
}
[data-theme="light"] .logo-slogan { color: #94a3b8 !important; border-left-color: rgba(180,200,240,0.4) !important; }

.user-info-compact { 
    display: flex; 
    gap: 15px; 
    align-items: center; 
    font-size: 0.9rem; 
}

.username { 
    color: white; 
    font-weight: 600; 
    cursor: pointer; 
}

.username:hover { 
    text-decoration: underline; 
}

.user-id { 
    color: #9ca3af; 
    font-size: 0.8rem; 
}

.points-badge { 
    display: inline-flex; 
    gap: 5px; 
    align-items: center; 
    background: rgba(59, 130, 246, 0.08);
    padding: 6px 12px; 
    border-radius: 20px; 
    border: 1px solid rgba(59, 130, 246, 0.3);
    transition: all 0.2s ease;
}
.points-badge:hover {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.5);
}

.points-badge .icon {
    color: #60a5fa;
    font-size: 0.95rem;
    line-height: 1;
    text-shadow: 0 0 6px rgba(96, 165, 250, 0.6);
}

.points-badge .label { 
    color: #9ca3af; 
    font-size: 0.75rem; 
}

.points-badge .value { 
    color: #93c5fd;
    font-weight: 700; 
    font-size: 0.95rem;
    letter-spacing: 0.3px;
}

/* ============================================ */
/* 💎 黄金像素徽章（付费币，用于 AI 生图） */
/* C 站风格：金色闪电 + 数字，呼应蓝色普通点 */
/* ============================================ */
.gold-badge {
    display: inline-flex;
    gap: 5px;
    align-items: center;
    background: rgba(251, 191, 36, 0.08);
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid rgba(251, 191, 36, 0.35);
    position: relative;
    overflow: hidden;
    transition: all 0.2s ease;
}
.gold-badge:hover {
    background: rgba(251, 191, 36, 0.18);
    border-color: rgba(251, 191, 36, 0.6);
}

.gold-badge::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(251, 191, 36, 0.25), transparent);
    animation: gold-shimmer 4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes gold-shimmer {
    0%   { left: -100%; }
    50%  { left: 150%; }
    100% { left: 150%; }
}

.gold-badge .label {
    color: #fde68a;
    font-size: 0.75rem;
    position: relative;
    z-index: 1;
}

.gold-badge .value {
    color: #fbbf24;
    font-weight: 700;
    font-size: 0.95rem;
    text-shadow: 0 0 6px rgba(251, 191, 36, 0.5);
    letter-spacing: 0.3px;
    position: relative;
    z-index: 1;
}

.gold-badge .icon {
    color: #fbbf24;
    font-size: 0.95rem;
    line-height: 1;
    text-shadow: 0 0 8px rgba(251, 191, 36, 0.7);
    position: relative;
    z-index: 1;
}

/* 双币徽章组合容器 */
.dual-balance {
    display: flex;
    gap: 6px;
    align-items: center;
}

/* 移动端适配 */
@media (max-width: 767px) {
    .gold-badge {
        padding: 4px 8px;
        gap: 4px;
    }
    .gold-badge .label {
        display: none;
    }
}

.navbar-tabs { 
    display: flex; 
    gap: 5px; 
    background: var(--navbar-tabs-bg, #1f2937); 
    padding: 0 15px; 
    align-items: center; 
    overflow-x: auto; 
    scrollbar-width: none; 
}

.navbar-tabs::-webkit-scrollbar { 
    display: none; 
}

.nav-tab { 
    padding: 12px 20px; 
    cursor: pointer; 
    transition: all 0.2s; 
    white-space: nowrap; 
    font-size: 0.9rem; 
    font-weight: 500; 
    color: var(--text-sub); 
    border-radius: 8px 8px 0 0; 
    text-decoration: none; 
    display: flex; 
    align-items: center; 
    gap: 6px; 
}

/* 手机端短文字 / 桌面端长文字 */
.tab-short { display: none; }
.tab-full  { display: inline; }

.nav-tab:hover { 
    background: rgba(251, 191, 36, 0.1); 
    color: var(--text-main); 
}

.nav-tab.active { 
    background: var(--accent-char); 
    color: #000; 
    font-weight: 600; 
}

/* 菜单按钮 */
.menu-btn { 
    padding: 8px 14px; 
    border: none; 
    border-radius: 6px; 
    cursor: pointer; 
    font-size: 0.85rem; 
    font-weight: 600; 
    color: white; 
    background: #4b5563; 
    transition: 0.2s; 
}

.menu-btn:hover { 
    opacity: 0.9; 
    transform: translateY(-1px); 
}

/* "更多"菜单里的签到项：默认隐藏（桌面端用导航栏按钮），移动端才显示 */
.dropdown-content .menu-checkin-mobile {
    display: none;
}
@media (max-width: 768px) {
    .dropdown-content .menu-checkin-mobile {
        display: block;
    }
}

/* ==========================================================
   🎨 导航栏统一按钮系统 v3.2（黑金极简风）
   ==========================================================
   设计原则：
   1. 所有按钮统一 32px 高度、8px 圆角、一致留白
   2. 只有"充值"按钮是主视觉焦点（金色渐变）
   3. 其他按钮（签到/更多/登录）用低饱和的边框风
   4. 不允许 inline style 覆盖（全靠 class）
   ========================================================== */

/* 统一按钮基础样式（覆盖旧版 .btn-small） */
.navbar-top .btn-small,
.navbar-top .menu-btn {
    height: 32px;
    padding: 0 14px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    white-space: nowrap;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1;
    background: transparent;
    color: #d1d5db;
}

/* 次要按钮：签到 / 更多（透明底 + 细边框） */
.navbar-top .btn-small.btn-secondary,
.navbar-top .menu-btn {
    background: rgba(55, 65, 81, 0.5);
    border-color: #4b5563;
    color: #d1d5db;
}
.navbar-top .btn-small.btn-secondary:hover,
.navbar-top .menu-btn:hover {
    background: #4b5563;
    border-color: #6b7280;
    color: #fff;
    transform: translateY(-1px);
    opacity: 1;
}

/* "更多"菜单按钮单独强化（让 ⋮ 更明显 + 确保可点击） */
.navbar-top .menu-btn {
    width: 36px;
    min-width: 36px;
    padding: 4px 0;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 2px;
    line-height: 1;
    color: #e5e7eb;
    cursor: pointer;
    pointer-events: auto;
    position: relative;
    z-index: 101;
}
.navbar-top .menu-btn:active,
.navbar-top .dropdown-menu .menu-btn.active {
    background: #4b5563;
    color: #fbbf24;
}
/* 菜单打开时按钮高亮 */
.navbar-top .dropdown-menu:has(.dropdown-content.show) .menu-btn {
    background: #4b5563;
    color: #fbbf24;
    border-color: #fbbf24;
}

/* 签到按钮的"已签到"状态 */
.navbar-top .btn-small#checkInBtn.checked-in {
    background: rgba(16, 185, 129, 0.1);
    border-color: #10b981;
    color: #34d399;
    cursor: default;
}
.navbar-top .btn-small#checkInBtn.checked-in:hover {
    transform: none;
    background: rgba(16, 185, 129, 0.12);
}

/* 主按钮：充值（唯一的金色渐变） */
.navbar-top .btn-small.btn-pay,
#loggedBar .btn-small.btn-pay {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #fff !important;
    border-color: transparent;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
    font-weight: 700;
}
.navbar-top .btn-small.btn-pay:hover {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.5);
    transform: translateY(-1px);
}

/* 登录按钮：低调紫色 */
.navbar-top .btn-small.btn-login {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: #fff !important;
    border-color: transparent;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
    font-weight: 700;
}
.navbar-top .btn-small.btn-login:hover {
    background: linear-gradient(135deg, #818cf8 0%, #6366f1 100%);
    transform: translateY(-1px);
}

/* 徽章紧凑化（导航栏场景） */
.navbar-top .points-badge,
.navbar-top .gold-badge {
    height: 32px;
    padding: 0 12px;
    border-radius: 16px;
    font-size: 0.82rem;
    gap: 5px;
}
.navbar-top .points-badge .value,
.navbar-top .gold-badge .value {
    font-size: 0.9rem;
}
.navbar-top .points-badge .icon,
.navbar-top .gold-badge .icon {
    font-size: 0.9rem;
}

/* 用户名紧凑 */
.navbar-top .username {
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 6px;
    transition: background 0.2s;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.85rem;
}
.navbar-top .username:hover {
    background: rgba(251, 191, 36, 0.1);
}

/* ==========================================================
   👤 用户头像 + 昵称组合（v3.3 新增）
   ========================================================== */
.user-avatar-wrap {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 2px 8px 2px 2px;
    border-radius: 20px;
    transition: all 0.2s ease;
    background: rgba(31, 41, 55, 0.4);
    border: 1px solid transparent;
}
.user-avatar-wrap:hover {
    background: rgba(251, 191, 36, 0.1);
    border-color: rgba(251, 191, 36, 0.3);
    transform: translateY(-1px);
}

/* 首字母头像 */
.user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    flex-shrink: 0;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    box-shadow: 0 0 0 2px rgba(255,255,255,0.05);
    text-transform: uppercase;
    user-select: none;
}

/* 头像颜色变种（按用户ID哈希选择） */
.user-avatar.avatar-0 { background: linear-gradient(135deg, #6366f1, #8b5cf6); }
.user-avatar.avatar-1 { background: linear-gradient(135deg, #ec4899, #f43f5e); }
.user-avatar.avatar-2 { background: linear-gradient(135deg, #10b981, #14b8a6); }
.user-avatar.avatar-3 { background: linear-gradient(135deg, #f59e0b, #ef4444); }
.user-avatar.avatar-4 { background: linear-gradient(135deg, #3b82f6, #06b6d4); }
.user-avatar.avatar-5 { background: linear-gradient(135deg, #a855f7, #d946ef); }
.user-avatar.avatar-6 { background: linear-gradient(135deg, #f97316, #fbbf24); }
.user-avatar.avatar-7 { background: linear-gradient(135deg, #14b8a6, #22d3ee); }

/* 大头像颜色变种（个人中心） */
.user-avatar-large.avatar-0 { background: linear-gradient(135deg, #6366f1, #8b5cf6); }
.user-avatar-large.avatar-1 { background: linear-gradient(135deg, #ec4899, #f43f5e); }
.user-avatar-large.avatar-2 { background: linear-gradient(135deg, #10b981, #14b8a6); }
.user-avatar-large.avatar-3 { background: linear-gradient(135deg, #f59e0b, #ef4444); }
.user-avatar-large.avatar-4 { background: linear-gradient(135deg, #3b82f6, #06b6d4); }
.user-avatar-large.avatar-5 { background: linear-gradient(135deg, #a855f7, #d946ef); }
.user-avatar-large.avatar-6 { background: linear-gradient(135deg, #f97316, #fbbf24); }
.user-avatar-large.avatar-7 { background: linear-gradient(135deg, #14b8a6, #22d3ee); }

/* 图片头像：容器透明背景，img 用 object-fit 填满圆形 */
.user-avatar.avatar-img,
.user-avatar-large.avatar-img {
    background: #374151 !important;
    overflow: hidden;
    padding: 0;
}
.user-avatar.avatar-img img,
.user-avatar-large.avatar-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 评论区行内小头像（8 色 + 图片） */
.avatar-inline.avatar-0 { background: linear-gradient(135deg, #6366f1, #8b5cf6); }
.avatar-inline.avatar-1 { background: linear-gradient(135deg, #ec4899, #f43f5e); }
.avatar-inline.avatar-2 { background: linear-gradient(135deg, #10b981, #14b8a6); }
.avatar-inline.avatar-3 { background: linear-gradient(135deg, #f59e0b, #ef4444); }
.avatar-inline.avatar-4 { background: linear-gradient(135deg, #3b82f6, #06b6d4); }
.avatar-inline.avatar-5 { background: linear-gradient(135deg, #a855f7, #d946ef); }
.avatar-inline.avatar-6 { background: linear-gradient(135deg, #f97316, #fbbf24); }
.avatar-inline.avatar-7 { background: linear-gradient(135deg, #14b8a6, #22d3ee); }



/* 头像里的紧凑昵称 */
.user-avatar-wrap .avatar-nickname {
    font-size: 0.82rem;
    color: #e5e7eb;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding-right: 2px;
}

/* 个人中心里的大头像 */
.user-avatar-large {
    width: 64px;
    height: 64px;
    font-size: 1.8rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
    flex-shrink: 0;
    text-transform: uppercase;
    user-select: none;
}

/* ==========================================================
   📅 图标化签到按钮（v3.3）
   ========================================================== */
.navbar-top .btn-small.btn-icon {
    width: 32px;
    min-width: 32px;
    padding: 0;
    justify-content: center;
    font-size: 1rem;
    position: relative;
}
.navbar-top .btn-small.btn-icon.btn-pay {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}
/* 签到未完成的黄色脉动点 */
.navbar-top #checkInBtn.btn-icon:not(.checked-in)::after {
    content: '';
    position: absolute;
    top: 4px; right: 4px;
    width: 7px; height: 7px;
    background: #fbbf24;
    border-radius: 50%;
    box-shadow: 0 0 0 2px #374151, 0 0 8px rgba(251,191,36,0.6);
    animation: gold-pulse 2s ease-in-out infinite;
}
.navbar-top #checkInBtn.btn-icon.checked-in::after {
    content: '✓';
    position: absolute;
    top: -3px; right: -3px;
    width: 14px; height: 14px;
    line-height: 14px;
    background: #10b981;
    color: #fff;
    border-radius: 50%;
    font-size: 0.65rem;
    font-weight: bold;
    box-shadow: 0 0 0 2px #374151;
}

/* user-info-compact 间距统一 */
.navbar-top .user-info-compact {
    gap: 8px;
}

/* ========== 📱 移动端适配 ========== */
@media (max-width: 768px) {
    .navbar-top .user-info-compact {
        gap: 6px;
    }
    /* 移动端：签到按钮隐藏（收进"更多"菜单） */
    .navbar-top #checkInBtn {
        display: none !important;
    }
    /* 徽章压扁，只显数字 */
    .navbar-top .points-badge,
    .navbar-top .gold-badge {
        height: 30px;
        padding: 0 8px;
        font-size: 0.75rem;
    }
    .navbar-top .points-badge .label,
    .navbar-top .gold-badge .label {
        display: none !important;
    }
    .navbar-top .btn-small,
    .navbar-top .menu-btn {
        height: 30px;
        padding: 0 10px;
        font-size: 0.75rem;
    }
    /* 移动端：头像外层间距更紧凑 + 隐藏昵称文字（只剩头像图标） */
    .navbar-top .user-avatar-wrap {
        padding: 2px;
        gap: 0;
        background: transparent;
    }
    .navbar-top .user-avatar-wrap .avatar-nickname {
        display: none;
    }
    .navbar-top .user-avatar {
        width: 30px;
        height: 30px;
        font-size: 0.8rem;
    }
    /* 移动端：充值按钮变图标（保留"⚡"但隐藏"充值"文字） */
    .navbar-top .btn-small.btn-pay .btn-label {
        display: none;
    }
    .navbar-top .btn-small.btn-pay {
        width: 30px;
        min-width: 30px;
        padding: 0;
        justify-content: center;
    }
    /* 隐藏用户ID */
    .navbar-top .user-id {
        display: none !important;
    }
    /* 用户名更紧凑（兼容老结构） */
    .navbar-top .username {
        max-width: 70px;
        font-size: 0.78rem;
        padding: 3px 8px;
    }
}

@media (max-width: 480px) {
    .navbar-top .user-info-compact {
        gap: 4px;
    }
    .navbar-top .username {
        max-width: 55px;
        font-size: 0.72rem;
    }
    .navbar-top .btn-small,
    .navbar-top .menu-btn {
        height: 28px;
        padding: 0 8px;
        font-size: 0.72rem;
    }
    .navbar-top .points-badge,
    .navbar-top .gold-badge {
        height: 28px;
        padding: 0 8px;
        gap: 3px;
    }
    .navbar-top .points-badge .value,
    .navbar-top .gold-badge .value {
        font-size: 0.78rem;
    }
    .navbar-top .points-badge .icon,
    .navbar-top .gold-badge .icon {
        font-size: 0.8rem;
    }
    .navbar-top .user-avatar {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
    }
    .navbar-top .btn-small.btn-pay {
        width: 28px;
        min-width: 28px;
    }
    /* 头像外层减小（移动端已经是纯图标，不需要外层 wrap 留白） */
    .navbar-top .user-avatar-wrap {
        padding: 0;
    }
}

/* 极窄屏（<380px，常见机型内容区 240-280px）：终极压缩不换行 */
@media (max-width: 380px) {
    .navbar-top {
        padding: 8px 8px;
        gap: 3px;
    }
    .navbar-top .user-info-compact {
        gap: 3px;
    }
    .navbar-top .points-badge,
    .navbar-top .gold-badge {
        height: 26px;
        padding: 0 6px;
        border-radius: 13px;
    }
    .navbar-top .points-badge .value,
    .navbar-top .gold-badge .value {
        font-size: 0.72rem;
    }
    .navbar-top .points-badge .icon,
    .navbar-top .gold-badge .icon {
        font-size: 0.72rem;
    }
    .navbar-top .btn-small,
    .navbar-top .menu-btn {
        height: 26px;
        padding: 0 6px;
    }
    .navbar-top .btn-small.btn-pay {
        width: 26px;
        min-width: 26px;
    }
    .navbar-top .user-avatar {
        width: 26px;
        height: 26px;
        font-size: 0.7rem;
    }
    .navbar-logo {
        font-size: 0.88rem !important;
    }
}

/* ============================================ */
/* 响应式 - 移动端适配 */
/* ============================================ */

/* 平板端 (768px - 968px) */
@media (max-width: 968px) {
    .navbar-wrapper {
        max-width: 100%;
    }
    
    .navbar-logo {
        font-size: 1.1rem;
    }
    
    .server-id-tag {
        display: none; /* 隐藏域名标识 */
    }
    
    .user-info-compact {
        gap: 8px;
        font-size: 0.85rem;
    }
    
    .username {
        max-width: 80px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .user-id {
        display: none; /* 隐藏ID显示 */
    }
    
    .points-badge {
        padding: 4px 8px;
        gap: 4px;
    }
    
    .points-badge .label {
        display: none; /* 只显示数字 */
    }
    
    .btn-small {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
}

/* 移动端 (< 768px) */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .navbar-wrapper {
        margin-bottom: 15px;
    }
    
    /* 顶部栏 - 移动端布局（v3.3.4 禁止换行，防止右侧登录区跑到第二行） */
    .navbar-top {
        padding: 10px 15px;
        flex-wrap: nowrap;
        gap: 6px;
    }
    
    .navbar-logo {
        font-size: 1.05rem;
        flex: 0 1 auto;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .navbar-logo a {
        font-size: 1rem !important;
    }
    
    /* 隐藏次要信息 */
    .server-id-tag {
        display: none !important;
    }
    
    /* 用户信息区 - 紧凑布局（不换行） */
    .user-info-compact {
        gap: 5px;
        font-size: 0.85rem;
        flex-wrap: nowrap;
        flex: 0 0 auto;
    }
    
    .username {
        max-width: 70px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .user-id {
        display: none !important;
    }
    
    .points-badge {
        padding: 5px 10px;
        font-size: 0.8rem;
    }
    
    .points-badge .label {
        display: none; /* 移动端只显示数字 */
    }
    
    .points-badge .value {
        font-size: 1rem;
    }
    
    /* 按钮 - 移动端尺寸 */
    .btn-small {
        padding: 7px 12px;
        font-size: 0.8rem;
        white-space: nowrap;
    }
    
    .menu-btn {
        padding: 7px 12px;
        font-size: 0.8rem;
    }
    
    /* 功能标签栏 - 横向滚动 */
    .navbar-tabs {
        padding: 0 12px;
        gap: 5px;
        overflow-x: auto;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }
    
    .navbar-tabs::-webkit-scrollbar {
        display: none;
    }
    
    .nav-tab {
        padding: 10px 15px;
        font-size: 0.85rem;
        flex-shrink: 0; /* 防止标签被压缩 */
    }

    /* 手机端：短文字替换长文字 */
    .tab-full  { display: none !important; }
    .tab-short { display: inline !important; }

    /* v3.4: 手机端 tab 不再均分 —— 改为横向滚动 + 右侧渐隐提示，
       让用户能看到「还有内容可滑」，但默认不强占空间 */
    .navbar-tabs {
        justify-content: flex-start;
        position: relative;
        -webkit-overflow-scrolling: touch;
        /* 右侧渐隐：暗示后面还有 tab 可滑动到 */
        -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent);
                mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent);
    }
    .nav-tab {
        flex: 0 0 auto;
        padding: 10px 14px;
        font-size: 0.85rem;
    }
    /* 选中态露在视窗内：滚动锚定到 active */
    .nav-tab.active {
        scroll-snap-align: end;
    }
}

/* 桌面端去掉移动端的 mask（防止意外影响） */
@media (min-width: 769px) {
    .navbar-tabs {
        -webkit-mask-image: none;
                mask-image: none;
        justify-content: space-between;
    }
    .nav-tab {
        flex: 1;
        text-align: center;
        justify-content: center;
    }
}

/* v3.4: 中屏手机 (≤640px) 让 navbar 贴满屏幕（与 game.pxlsan.cn 对齐），
   tab 栏可视区最大化，渐隐遮罩自然不突兀 */
@media (max-width: 640px) {
    body {
        padding: 10px 0 0 !important;
    }
    .navbar-wrapper {
        border-radius: 0;
        margin: 0 0 14px;
    }
    .navbar-wrapper .navbar-top   { border-radius: 0; }
    .navbar-wrapper .navbar-tabs  { border-radius: 0; }
}

/* 退出登录确认弹窗 */
.logout-confirm-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(10px);
}

.logout-confirm-overlay.show {
    display: flex;
}

.logout-confirm-shell {
    width: min(440px, 94vw);
    position: relative;
    padding: 28px 24px 24px;
    border-radius: 22px;
    background: linear-gradient(180deg, #1f2937 0%, #111827 100%);
    border: 1px solid rgba(75, 85, 99, 0.9);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.65);
    text-align: center;
    animation: featureFramePop 0.22s ease-out;
}

.logout-confirm-close {
    position: absolute;
    top: 12px;
    right: 14px;
    border: none;
    background: transparent;
    color: #9ca3af;
    font-size: 1.7rem;
    line-height: 1;
    cursor: pointer;
}

.logout-confirm-close:hover {
    color: #fff;
}

.logout-confirm-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 14px;
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    background: linear-gradient(135deg, rgba(239,68,68,0.18), rgba(245,158,11,0.12));
    border: 1px solid rgba(239,68,68,0.3);
}

.logout-confirm-shell h2 {
    margin: 0 0 8px;
    color: #f9fafb;
    font-size: 1.35rem;
}

.logout-confirm-desc {
    margin: 0 0 14px;
    color: #9ca3af;
    font-size: 0.9rem;
    line-height: 1.7;
}

.logout-confirm-user {
    padding: 11px 14px;
    margin-bottom: 18px;
    border-radius: 14px;
    background: rgba(17, 24, 39, 0.72);
    border: 1px solid rgba(75, 85, 99, 0.72);
    color: #d1d5db;
    font-size: 0.86rem;
    word-break: break-all;
}

.logout-confirm-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.logout-confirm-actions button {
    border: none;
    border-radius: 14px;
    padding: 12px 16px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.18s ease, opacity 0.18s ease, background 0.18s ease;
}

.logout-confirm-actions button:hover {
    transform: translateY(-1px);
}

.logout-cancel-btn {
    background: rgba(55, 65, 81, 0.92);
    color: #e5e7eb;
    border: 1px solid rgba(75, 85, 99, 0.9) !important;
}

.logout-switch-btn {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    box-shadow: 0 10px 24px rgba(99, 102, 241, 0.24);
}

[data-theme="light"] .logout-confirm-overlay {
    background: rgba(15, 23, 42, 0.34);
}

[data-theme="light"] .logout-confirm-shell {
    background: #fff;
    border-color: rgba(180, 200, 240, 0.36);
    box-shadow: 0 24px 80px rgba(100, 140, 220, 0.24);
}

[data-theme="light"] .logout-confirm-shell h2 {
    color: #1e293b;
}

[data-theme="light"] .logout-confirm-desc {
    color: #64748b;
}

[data-theme="light"] .logout-confirm-user {
    background: rgba(240,245,255,0.84);
    border-color: rgba(180, 200, 240, 0.36);
    color: #334155;
}

[data-theme="light"] .logout-cancel-btn {
    background: rgba(100,140,220,0.08);
    color: #475569;
    border-color: rgba(180, 200, 240, 0.36) !important;
}

@media (min-width: 520px) {
    .logout-confirm-actions {
        grid-template-columns: 1fr 1fr;
    }
}

/* 签到结果弹窗 */
.checkin-result-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(10px);
}

.checkin-result-overlay.show {
    display: flex;
}

.checkin-result-shell {
    width: min(440px, 94vw);
    position: relative;
    padding: 28px 24px 24px;
    border-radius: 22px;
    background: linear-gradient(180deg, #1f2937 0%, #111827 100%);
    border: 1px solid rgba(75, 85, 99, 0.9);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.65);
    text-align: center;
    animation: featureFramePop 0.22s ease-out;
}

.checkin-result-close {
    position: absolute;
    top: 12px;
    right: 14px;
    border: none;
    background: transparent;
    color: #9ca3af;
    font-size: 1.7rem;
    line-height: 1;
    cursor: pointer;
}

.checkin-result-close:hover {
    color: #fff;
}

.checkin-result-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 14px;
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    background: linear-gradient(135deg, rgba(251,191,36,0.22), rgba(245,158,11,0.12));
    border: 1px solid rgba(251,191,36,0.35);
    box-shadow: 0 0 24px rgba(251,191,36,0.12);
}

.checkin-result-shell h2 {
    margin: 0 0 8px;
    color: #f9fafb;
    font-size: 1.35rem;
}

.checkin-result-message {
    margin: 0 0 18px;
    color: #9ca3af;
    font-size: 0.9rem;
    line-height: 1.7;
}

.checkin-result-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

.checkin-result-stats div,
.checkin-streak-panel {
    background: rgba(17, 24, 39, 0.72);
    border: 1px solid rgba(75, 85, 99, 0.72);
    border-radius: 14px;
}

.checkin-result-stats div {
    padding: 12px 8px;
}

.checkin-result-stats span {
    display: block;
    color: #fbbf24;
    font-size: 1.15rem;
    font-weight: 800;
}

.checkin-result-stats small {
    color: #9ca3af;
    font-size: 0.72rem;
}

.checkin-streak-panel {
    padding: 14px;
    margin-bottom: 18px;
}

.checkin-streak-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    color: #d1d5db;
    font-size: 0.86rem;
}

.checkin-streak-head strong {
    color: #fbbf24;
    font-size: 0.82rem;
}

.checkin-streak-dots {
    display: grid;
    grid-template-columns: repeat(6, 1fr) 1.4fr;
    gap: 6px;
    align-items: end;
}

.checkin-streak-dot {
    min-height: 42px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: #6b7280;
    background: rgba(31, 41, 55, 0.9);
    border: 1px solid rgba(75, 85, 99, 0.9);
    font-size: 0.78rem;
    font-weight: 700;
    padding: 6px 2px;
}

.checkin-streak-dot .dot-day {
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1;
}

.checkin-streak-dot .dot-pts {
    font-size: 0.66rem;
    font-weight: 600;
    color: #6b7280;
    line-height: 1;
}

.checkin-streak-dot.active .dot-pts {
    color: rgba(31, 41, 55, 0.75);
}

.checkin-streak-dot.bonus {
    min-height: 56px;
    border-radius: 14px;
    background: rgba(120, 53, 15, 0.45);
    border-color: rgba(251, 191, 36, 0.45);
}

.checkin-streak-dot.bonus .dot-day {
    font-size: 1rem;
}

.checkin-streak-dot.bonus .dot-pts {
    font-size: 0.7rem;
    color: #fbbf24;
}

.checkin-streak-dot.active {
    background: rgba(251, 191, 36, 0.12);
    border-color: rgba(251, 191, 36, 0.55);
    color: #fbbf24;
}

.checkin-streak-dot.active .dot-day {
    color: #fde68a;
}

.checkin-streak-dot.active .dot-pts {
    color: rgba(251, 191, 36, 0.8);
}

.checkin-streak-dot.active.bonus {
    background: rgba(251, 191, 36, 0.18);
    border-color: #fbbf24;
    box-shadow: 0 0 14px rgba(251, 191, 36, 0.35);
    animation: gold-pulse 1.4s ease-in-out infinite;
}

.checkin-streak-dot.active.bonus .dot-day {
    color: #fde68a;
}

.checkin-streak-dot.active.bonus .dot-pts {
    color: #fbbf24;
}


.checkin-result-ok {
    width: 100%;
    border: none;
    border-radius: 14px;
    padding: 13px 16px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(245, 158, 11, 0.24);
}

.checkin-result-overlay.is-bonus .checkin-result-icon {
    animation: gold-pulse 1.8s ease-in-out infinite;
}

[data-theme="light"] .checkin-result-overlay {
    background: rgba(15, 23, 42, 0.34);
}

[data-theme="light"] .checkin-result-shell {
    background: #fff;
    border-color: rgba(180, 200, 240, 0.36);
    box-shadow: 0 24px 80px rgba(100, 140, 220, 0.24);
}

[data-theme="light"] .checkin-result-shell h2 {
    color: #1e293b;
}

[data-theme="light"] .checkin-result-message,
[data-theme="light"] .checkin-result-stats small {
    color: #64748b;
}

[data-theme="light"] .checkin-result-stats div,
[data-theme="light"] .checkin-streak-panel {
    background: rgba(240,245,255,0.84);
    border-color: rgba(180, 200, 240, 0.36);
}

[data-theme="light"] .checkin-streak-dot {
    background: rgba(255,255,255,0.86);
    border-color: rgba(180, 200, 240, 0.36);
    color: #94a3b8;
}

[data-theme="light"] .checkin-streak-dot .dot-pts {
    color: #94a3b8;
}

[data-theme="light"] .checkin-streak-dot.bonus {
    background: rgba(254, 243, 199, 0.78);
    border-color: rgba(251, 191, 36, 0.38);
}

[data-theme="light"] .checkin-streak-dot.bonus .dot-pts {
    color: #b45309;
}

[data-theme="light"] .checkin-streak-dot.active {
    background: rgba(251, 191, 36, 0.15);
    border-color: rgba(217, 119, 6, 0.6);
    color: #92400e;
}

[data-theme="light"] .checkin-streak-dot.active .dot-day {
    color: #b45309;
}

[data-theme="light"] .checkin-streak-dot.active .dot-pts {
    color: rgba(180, 83, 9, 0.85);
}

[data-theme="light"] .checkin-streak-dot.active.bonus {
    border-color: #d97706;
    box-shadow: 0 0 12px rgba(217, 119, 6, 0.3);
}



[data-theme="light"] .checkin-streak-head {
    color: #334155;
}

/* 每日投票原生弹窗 */
.vote-native-overlay {
    position: fixed;
    inset: 0;
    z-index: 9998;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(10px);
}

.vote-native-overlay.show {
    display: flex;
}

.vote-native-shell {
    width: min(1080px, 96vw);
    max-height: min(88vh, 900px);
    background: var(--card-bg, #1f2937);
    border: 1px solid rgba(75, 85, 99, 0.9);
    border-radius: 18px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.65);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: featureFramePop 0.22s ease-out;
}

.vote-native-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 18px 22px;
    background: #1f2937;
    border-bottom: 1px solid #374151;
}

.vote-native-header h2 {
    margin: 0;
    color: #f9fafb;
    font-size: 1.18rem;
}

.vote-native-header p {
    margin: 5px 0 0;
    color: #9ca3af;
    font-size: 0.82rem;
}

.vote-native-close {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(17, 24, 39, 0.72);
    color: #cbd5e1;
    font-size: 1.7rem;
    line-height: 1;
    cursor: pointer;
    transition: all 0.18s ease;
}

.vote-native-close:hover {
    color: #fff;
    border-color: #fbbf24;
    transform: translateY(-1px);
}

.vote-native-body {
    flex: 1;
    overflow: auto;
    padding: 16px;
}

.vote-native-wrap {
    max-width: 100%;
    animation: none;
}

#voteLightbox.lightbox-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10001;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.86);
    padding: 20px;
}

#voteLightbox.lightbox-overlay.active {
    display: flex;
}

#voteLightbox .lightbox-content {
    max-width: 92vw;
    max-height: 88vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 20px 70px rgba(0,0,0,0.6);
}

#voteLightbox .lightbox-close {
    position: absolute;
    top: 18px;
    right: 24px;
    color: #fff;
    font-size: 2.2rem;
    cursor: pointer;
    z-index: 2;
}

#voteLightbox .lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.22);
    background: rgba(15,23,42,0.62);
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

#voteLightbox .lightbox-nav.prev { left: 20px; }
#voteLightbox .lightbox-nav.next { right: 20px; }

#voteLightbox .lightbox-counter {
    position: absolute;
    bottom: 22px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    background: rgba(15,23,42,0.72);
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 0.82rem;
}

[data-theme="light"] .vote-native-overlay {
    background: rgba(15, 23, 42, 0.34);
}

[data-theme="light"] .vote-native-shell {
    background: #fff;
    border-color: rgba(180, 200, 240, 0.36);
    box-shadow: 0 24px 80px rgba(100, 140, 220, 0.24);
}

[data-theme="light"] .vote-native-header {
    background: rgba(240, 245, 255, 0.94);
    border-bottom-color: rgba(180, 200, 240, 0.34);
}

[data-theme="light"] .vote-native-header h2 {
    color: #1e293b;
}

[data-theme="light"] .vote-native-header p {
    color: #64748b;
}

[data-theme="light"] .vote-native-close {
    background: rgba(255,255,255,0.78);
    color: #64748b;
    border-color: rgba(180, 200, 240, 0.36);
}

[data-theme="light"] .vote-native-close:hover {
    color: #1e293b;
    border-color: #f59e0b;
}

@media (max-width: 768px) {
    .vote-native-overlay {
        align-items: flex-end;
        padding: 10px;
    }
    .vote-native-shell {
        width: 100%;
        max-height: 88vh;
        border-radius: 18px 18px 0 0;
    }
    .vote-native-header {
        padding: 14px 16px;
    }
    .vote-native-header h2 {
        font-size: 1rem;
    }
    .vote-native-header p {
        font-size: 0.75rem;
    }
    .vote-native-body {
        padding: 12px;
    }
}

/* 定制服务简化弹窗 */
.custom-native-overlay {
    position: fixed;
    inset: 0;
    z-index: 9998;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(10px);
}

.custom-native-overlay.show {
    display: flex;
}

.custom-native-shell {
    width: min(560px, 94vw);
    position: relative;
    padding: 28px;
    border-radius: 22px;
    background: linear-gradient(180deg, #1e1b4b 0%, #0f172a 100%);
    border: 1px solid rgba(139, 92, 246, 0.36);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.65);
    animation: featureFramePop 0.22s ease-out;
}

.custom-native-close {
    position: absolute;
    top: 14px;
    right: 16px;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    background: rgba(15, 23, 42, 0.54);
    color: #cbd5e1;
    font-size: 1.7rem;
    line-height: 1;
    cursor: pointer;
}

.custom-native-close:hover {
    color: #fff;
    border-color: #fbbf24;
}

.custom-native-hero {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 20px;
    padding-right: 34px;
}

.custom-native-icon {
    width: 58px;
    height: 58px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.35), rgba(251, 191, 36, 0.18));
    border: 1px solid rgba(251, 191, 36, 0.24);
    font-size: 1.7rem;
}

.custom-native-kicker {
    margin-bottom: 6px;
    color: #fbbf24;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.custom-native-hero h2 {
    margin: 0 0 8px;
    color: #f9fafb;
    font-size: 1.5rem;
}

.custom-native-hero p {
    margin: 0;
    color: #cbd5e1;
    font-size: 0.92rem;
    line-height: 1.7;
}

.custom-native-price {
    display: grid;
    gap: 6px;
    padding: 16px;
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.54);
    border: 1px solid rgba(251, 191, 36, 0.22);
    margin-bottom: 16px;
}

.custom-native-price span {
    color: #94a3b8;
    font-size: 0.78rem;
}

.custom-native-price strong {
    color: #fbbf24;
    font-size: 1rem;
}

.custom-native-price small {
    color: #94a3b8;
    line-height: 1.6;
}

.custom-native-steps {
    display: grid;
    gap: 10px;
    margin-bottom: 16px;
}

.custom-native-steps div {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 13px;
    background: rgba(139, 92, 246, 0.1);
    color: #e2e8f0;
    font-size: 0.9rem;
}

.custom-native-steps b {
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 999px;
    background: rgba(251, 191, 36, 0.16);
    color: #fbbf24;
}

.custom-native-tip {
    margin-bottom: 18px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(96, 165, 250, 0.22);
    color: #bfdbfe;
    font-size: 0.84rem;
    line-height: 1.7;
}

.custom-native-actions {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 10px;
}

.custom-native-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 14px;
    border-radius: 14px;
    font-weight: 800;
    text-decoration: none;
    transition: transform 0.18s ease, opacity 0.18s ease;
}

.custom-native-actions a:hover {
    transform: translateY(-1px);
}

.custom-native-primary {
    color: #1f2937;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    box-shadow: 0 12px 28px rgba(251, 191, 36, 0.2);
}

.custom-native-secondary {
    color: #e2e8f0;
    background: rgba(148, 163, 184, 0.14);
    border: 1px solid rgba(148, 163, 184, 0.24);
}

[data-theme="light"] .custom-native-overlay {
    background: rgba(15, 23, 42, 0.34);
}

[data-theme="light"] .custom-native-shell {
    background: #fff;
    border-color: rgba(180, 200, 240, 0.36);
    box-shadow: 0 24px 80px rgba(100, 140, 220, 0.24);
}

[data-theme="light"] .custom-native-close {
    background: rgba(255, 255, 255, 0.82);
    border-color: rgba(180, 200, 240, 0.36);
    color: #64748b;
}

[data-theme="light"] .custom-native-close:hover {
    color: #1e293b;
    border-color: #f59e0b;
}

[data-theme="light"] .custom-native-icon,
[data-theme="light"] .custom-native-price,
[data-theme="light"] .custom-native-steps div,
[data-theme="light"] .custom-native-tip {
    background: rgba(240, 245, 255, 0.82);
    border-color: rgba(180, 200, 240, 0.36);
}

[data-theme="light"] .custom-native-hero h2 {
    color: #1e293b;
}

[data-theme="light"] .custom-native-hero p,
[data-theme="light"] .custom-native-price span,
[data-theme="light"] .custom-native-price small,
[data-theme="light"] .custom-native-steps div {
    color: #64748b;
}

[data-theme="light"] .custom-native-tip {
    color: #475569;
}

[data-theme="light"] .custom-native-secondary {
    color: #475569;
    background: rgba(100, 140, 220, 0.08);
    border-color: rgba(180, 200, 240, 0.36);
}

@media (max-width: 640px) {
    .custom-native-overlay {
        align-items: flex-end;
        padding: 10px;
    }
    .custom-native-shell {
        width: 100%;
        padding: 24px 18px 18px;
        border-radius: 18px 18px 0 0;
    }
    .custom-native-hero {
        gap: 12px;
    }
    .custom-native-icon {
        width: 48px;
        height: 48px;
        border-radius: 15px;
        font-size: 1.45rem;
    }
    .custom-native-hero h2 {
        font-size: 1.25rem;
    }
    .custom-native-actions {
        grid-template-columns: 1fr;
    }
}

/* 功能浮窗：定制服务 */
.feature-frame-overlay {
    position: fixed;
    inset: 0;
    z-index: 9998;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(10px);
}

.feature-frame-overlay.show {
    display: flex;
}

.feature-frame-shell {
    width: min(1040px, 96vw);
    height: min(86vh, 860px);
    background: var(--card-bg, #1f2937);
    border: 1px solid rgba(75, 85, 99, 0.9);
    border-radius: 18px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.65);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: featureFramePop 0.22s ease-out;
}

@keyframes featureFramePop {
    from { transform: translateY(10px) scale(0.98); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

.feature-frame-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 18px 22px;
    background: #1f2937;
    border-bottom: 1px solid #374151;
}

.feature-frame-header h2 {
    margin: 0;
    color: #f9fafb;
    font-size: 1.18rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.feature-frame-header p {
    margin: 5px 0 0;
    color: #9ca3af;
    font-size: 0.82rem;
}

.feature-frame-close {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(17, 24, 39, 0.72);
    color: #cbd5e1;
    font-size: 1.7rem;
    line-height: 1;
    cursor: pointer;
    transition: all 0.18s ease;
}

.feature-frame-close:hover {
    color: #fff;
    border-color: #fbbf24;
    transform: translateY(-1px);
}

.feature-frame-iframe {
    width: 100%;
    flex: 1;
    border: 0;
    background: transparent;
}

[data-theme="light"] .feature-frame-overlay {
    background: rgba(15, 23, 42, 0.34);
}

[data-theme="light"] .feature-frame-shell {
    background: #fff;
    border-color: rgba(180, 200, 240, 0.36);
    box-shadow: 0 24px 80px rgba(100, 140, 220, 0.24);
}

[data-theme="light"] .feature-frame-header {
    background: rgba(240, 245, 255, 0.94);
    border-bottom-color: rgba(180, 200, 240, 0.34);
}

[data-theme="light"] .feature-frame-header h2 {
    color: #1e293b;
}

[data-theme="light"] .feature-frame-header p {
    color: #64748b;
}

[data-theme="light"] .feature-frame-close {
    background: rgba(255,255,255,0.78);
    color: #64748b;
    border-color: rgba(180, 200, 240, 0.36);
}

[data-theme="light"] .feature-frame-close:hover {
    color: #1e293b;
    border-color: #f59e0b;
}

@media (max-width: 768px) {
    .feature-frame-overlay {
        align-items: flex-end;
        padding: 10px;
    }
    .feature-frame-shell {
        width: 100%;
        height: 88vh;
        border-radius: 18px 18px 0 0;
    }
    .feature-frame-header {
        padding: 14px 16px;
    }
    .feature-frame-header h2 {
        font-size: 1rem;
    }
    .feature-frame-header p {
        font-size: 0.75rem;
    }
}

/* 小屏手机 (< 480px) */
@media (max-width: 480px) {
    body {
        padding: 5px 0 0 !important;
    }
    
    .navbar-wrapper {
        border-radius: 0;
    }
    
    .navbar-top {
        padding: 8px 10px;
        gap: 4px;
        flex-wrap: nowrap;
    }
    
    .navbar-logo {
        font-size: 0.95rem;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    /* 用户信息更紧凑 */
    .user-info-compact {
        gap: 4px;
        flex-wrap: nowrap;
    }
    
    .username {
        max-width: 50px;
        font-size: 0.75rem;
    }
    
    .points-badge {
        padding: 3px 6px;
    }
    
    .points-badge .value {
        font-size: 0.85rem;
    }
    
    /* 按钮更小 */
    .btn-small {
        padding: 5px 8px;
        font-size: 0.7rem;
    }
    
    .menu-btn {
        padding: 5px 8px;
        font-size: 0.7rem;
    }
    
    /* 标签栏 */
    .navbar-tabs {
        padding: 0 8px;
    }
    
    .nav-tab {
        padding: 6px 12px;
        font-size: 0.75rem;
        flex: 0 0 auto;
    }
    
    /* 下拉菜单 */
    .dropdown-content {
        min-width: 120px;
        right: -10px;
    }
    
    .dropdown-content button {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
}

