/* ------------------------------------------------------------
   完整保留所有原始样式 + 专业弹窗样式 + 下拉刷新完整保留 + 新增欢迎弹窗(精致小比例)
   未删除任何功能
   修改：整体比例改小，字体改小，间距改小，底部导航比例/字体也相应调小
   新增：背景彩色小球画布 (位于线条画布下方，确保线条可见)
   底部导航栏：主页按钮向上凸起，其他平整（凸起幅度相应微调）
   新增：兑换码弹窗及按钮 (完全遵循原比例/风格，未改动任何原有样式)

   【本次修改】：搜索栏与顶栏分离，搜索栏独立放在顶栏下方，增加间隔。保留全部功能与样式。
------------------------------------------------------------ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', sans-serif;
}

body {
    background: linear-gradient(145deg, #ecf5fa 0%, #daeaf5 50%, #e8f0f8 100%);
    background-size: 200% 200%;
    animation: gradientShift 15s ease infinite;
    color: #333;
    /* 全局基础字体缩小约15% (原9px → 7.5px) */
    font-size: 7.5px; 
    line-height: 1.2;
    max-width: 100%;
    min-height: 100vh;
    overflow-x: hidden;
    /* 底部内边距配合凸起按钮缩小 */
    padding-bottom: 70px !important; 
    position: relative;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* 动态线条 Canvas — 白色线条效果 (保留) */
#dynamic-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.65;
    will-change: transform;
}

/* ===== 彩色小球背景画布 (全部为蓝色系) ===== */
#colorful-bubbles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.85;
    background: transparent;
}

.header, .pull-refresh-container, .banner-section, .announcement-section, 
.main-content, .bottom-nav, .sidebar, .sidebar-overlay, .modal-overlay {
    position: relative;
    z-index: 2;
}

.glass-bg-light {
    background: rgba(255, 255, 255, 0.58) !important;
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    border: 1px solid rgba(255,255,255,0.25);
}

/* ===== 顶栏 (缩小间距与字体) ===== */
.header {
    background: #ffffff;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    padding: 4px 0 4px;        /* 原6/5 → 4/4 */
    border-bottom: 1px solid rgba(0, 0, 0, 0.25);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.header-content { 
    padding: 0 10px;            /* 原12 → 10 */
}

.header-top { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 0;         /* 原6 → 0 (搜索栏已分离，不需要底部间距) */
}

.logo-area { 
    display: flex; 
    align-items: center; 
    gap: 6px;                   /* 原10 → 6 */
}

.menu-toggle {
    background: #ffffff;
    border: 1.5px solid #2c3e50;   /* 原2px → 1.5 */
    font-size: 15px;                /* 原18 → 15 */
    color: #2c3e50;
    cursor: pointer;
    padding: 4px 6px;               /* 原6/8 → 4/6 */
    border-radius: 8px;              /* 原12 → 8 */
    transition: all 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.03);
    backdrop-filter: none;
}

.logo { 
    display: flex; 
    align-items: center; 
    gap: 3px;               /* 原6 → 3 */
    font-weight: 700; 
    font-size: 10px;        /* 原12 → 10 */
    color: #2c3e50; 
}

.logo-img { 
    width: 18px;            /* 原22 → 18 */
    height: 18px; 
    border-radius: 4px; 
    object-fit: contain; 
}

.member-card-btn {
    background: #ffffff;
    color: #495057;
    border: 1px solid #dee2e6;
    border-radius: 6px;          /* 原8 → 6 */
    padding: 2px 6px;            /* 原4/8 → 2/6 */
    font-size: 7.5px;            /* 原9 → 7.5 */
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 2px;
    margin-left: 4px;
    text-decoration: none;
    backdrop-filter: none;
}

.header-stats { 
    display: flex; 
    gap: 5px;           /* 原8 → 5 */
    font-size: 7px;     /* 原8 → 7 */
    color: #666; 
}

.stat-item {
    display: flex; 
    align-items: center; 
    gap: 2px;
    background: #ffffff;
    padding: 2px 4px;       /* 原3/6 → 2/4 */
    border-radius: 6px;      /* 原8 → 6 */
    border: 1px solid rgba(0, 0, 0, 0.2);
    font-weight: 500; 
    backdrop-filter: none;
}

/* ===== 独立的搜索容器 (与顶栏分离，增加间隔) ===== */
.search-section {
    padding: 6px 10px 6px;   /* 与顶栏间隔6px，左右保持10px */
    position: relative;
    z-index: 99;
}
.search-container { 
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.25);
    border-radius: 8px;      /* 原10 → 8 */
    background: #ffffff;
    width: 100%;
}

.search-box {
    width: 100%; 
    padding: 4px 25px 4px 8px;    /* 原6/30/6/10 → 4/25/4/8 */
    border-radius: 8px;
    border: none;
    background: #ffffff;
    font-size: 8px;                /* 原10 → 8 */
    color: #1e2a36; 
    backdrop-filter: none;
    box-shadow: none;
}

.search-box:focus {
    outline: none; 
    box-shadow: 0 0 0 2px rgba(44,62,80,0.08);
}

.search-icon { 
    position: absolute; 
    right: 8px; 
    top: 50%; 
    transform: translateY(-50%); 
    color: #5e6870; 
    font-size: 9px;                /* 原10 → 9 */
}

/* ===== 下拉刷新 (间距微调) ===== */
.pull-refresh-container {
    position: relative;
    width: 100%;
    z-index: 99;
    pointer-events: none;
    display: flex;
    justify-content: center;
    margin-top: -6px;            /* 原-10 → -6 */
}

.refresh-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    width: 100%;
    height: 0;
    min-height: 0;
    background: transparent;
    color: #2a405e;
    overflow: hidden;
    transition: height 0.1s ease;
    pointer-events: none;
}

.refresh-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: 40px;                /* 原60 → 40 */
    padding: 4px 18px;                  /* 原8/26 → 4/18 */
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 12px 24px -8px rgba(50, 80, 140, 0.2), 0 0 0 1px rgba(255,255,255,0.5) inset;
    margin-bottom: 8px;
    opacity: 0.98;
}

.refresh-spinner {
    width: 22px;                /* 原30 → 22 */
    height: 22px;
    border: 2.5px solid rgba(255, 255, 255, 0.9);
    border-top-color: #2e5aaf;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 3px;          /* 原6 → 3 */
    filter: drop-shadow(0 2px 6px rgba(0,20,70,0.15));
    background: rgba(255,255,255,0.2);
    box-shadow: 0 0 0 1px rgba(255,255,255,0.3) inset;
}

.refresh-text {
    font-size: 9px;             /* 原11 → 9 */
    font-weight: 600;
    color: #1e3b6b;
    letter-spacing: 0.2px;
    text-shadow: 0 1px 4px rgba(255,255,255,0.8);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== 轮播图 ===== */
.banner-section { 
    padding: 4px 8px 3px;       /* 原8/10/5 → 4/8/3 */
}

.banner-image {
    width: 100%; 
    border-radius: 6px;         /* 原8 → 6 */
    overflow: hidden; 
    margin-bottom: 3px;         /* 原5 → 3 */
    background-color: #f8f9fa; 
    display: flex; 
    align-items: center; 
    justify-content: center;
    border: 2px solid rgba(0, 0, 0, 0.25);
    min-height: 70px;           /* 原90 → 70 */
    box-shadow: 0 1px 4px rgba(0,0,0,0.03);
}

.banner-image img { 
    width: 100%; 
    height: auto; 
    object-fit: contain; 
    display: block; 
}

/* ===== 公告栏 ===== */
.announcement-section { 
    padding: 0 8px 3px;         /* 原0/10/5 → 0/8/3 */
}

.announcement-container {
    background: rgba(255, 255, 255, 0.80);  
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-radius: 6px;          /* 原8 → 6 */
    padding: 4px 8px;            /* 原6/10 → 4/8 */
    border: 1px solid rgba(180, 186, 192, 0.75);
    display: flex; 
    align-items: center; 
    gap: 4px;                    /* 原6 → 4 */
    cursor: pointer;
    position: relative; 
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.03);
}

.announcement-container.gray { 
    margin-top: 3px !important;  /* 原4 → 3 */
}

.announcement-container::before {
    content: ''; 
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 3px; 
    height: 100%;
    background: rgba(180, 186, 192, 0.8);
}

.announcement-icon {
    width: 20px;                /* 原24 → 20 */
    height: 20px; 
    border-radius: 5px;         /* 原6 → 5 */
    background: rgba(248,249,250,0.85); 
    display: flex; 
    align-items: center; 
    justify-content: center;
    flex-shrink: 0; 
    z-index: 1; 
    border: 1px solid rgba(180,186,192,0.6);
    backdrop-filter: blur(4px);
}

.announcement-content { 
    flex: 1; 
    overflow: hidden; 
    z-index: 1; 
}

.announcement-title { 
    font-size: 8px;            /* 原9 → 8 */
    font-weight: 600; 
    color: #1e2a36; 
    margin-bottom: 1px; 
    display: flex; 
    align-items: center; 
    gap: 2px;                  /* 原3 → 2 */
}

.announcement-marquee { 
    position: relative; 
    height: 12px;              /* 原14 → 12 */
    overflow: hidden; 
}

.marquee-content {
    position: absolute; 
    white-space: nowrap; 
    animation: marquee 20s linear infinite;
    font-size: 7px;            /* 原8 → 7 */
    color: #3a4a5a; 
    line-height: 12px; 
    font-weight: 500;
}

@keyframes marquee { 
    0% { transform: translateX(100%); } 
    100% { transform: translateX(-100%); } 
}

.announcement-tag {
    position: absolute; 
    top: -4px; 
    right: 6px;
    background: rgba(248,249,250,0.9); 
    color: #3a4a5a; 
    font-size: 4.5px;          /* 原5 → 4.5 */
    font-weight: 700;
    padding: 1px 3px;          /* 原1/4 → 1/3 */
    border-radius: 4px;        /* 原6 → 4 */
    z-index: 2; 
    border: 1px solid #c2c8cc;
    backdrop-filter: blur(4px);
}

/* ===== 侧边栏 (内部字体稍微缩小, 间距调小) ===== */
.sidebar {
    position: fixed; 
    top: 0; 
    left: -280px; 
    width: 260px;               /* 原280 → 260 */
    height: 100vh;
    background: rgba(255, 255, 255, 0.58);
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    z-index: 1000; 
    box-shadow: 2px 0 18px rgba(0,0,0,0.1);
    transition: left 0.3s cubic-bezier(0.25,0.46,0.45,0.94);
    overflow-y: auto; 
    padding: 0; 
    border-right: 1px solid rgba(255,255,255,0.25);
}

.sidebar.active { 
    left: 0; 
}

.sidebar-overlay {
    position: fixed; 
    top: 0; 
    left: 0; 
    right: 0; 
    bottom: 0;
    background: rgba(0,0,0,0.3); 
    backdrop-filter: blur(2px);
    z-index: 999; 
    opacity: 0; 
    visibility: hidden; 
    transition: all 0.3s;
}

.sidebar-overlay.active { 
    opacity: 1; 
    visibility: visible; 
}

.sidebar-header {
    text-align: center; 
    padding: 16px 14px;            /* 原22/18 → 16/14 */
    background: rgba(255,255,255,0.5); 
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.user-avatar { 
    width: 56px;                    /* 原68 → 56 */
    height: 56px; 
    border-radius: 50%; 
    margin: 0 auto 8px;             /* 原12 → 8 */
    border: 2px solid rgba(255,255,255,0.7); 
    background: rgba(248,249,250,0.6); 
    display: flex; 
    align-items: center; 
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    overflow: hidden;
    position: relative;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 50%;
}

.avatar-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: #cbd5e0;
    color: #2c3e50;
    font-size: 22px;                /* 原28 → 22 */
    font-weight: 600;
    border-radius: 50%;
    text-transform: uppercase;
}

.user-name { 
    font-size: 14px;                /* 原16 → 14 */
    font-weight: 700; 
    color: #1e2a36; 
    margin-bottom: 4px;              /* 原6 → 4 */
}

.user-status { 
    font-size: 9px;                 /* 原11 → 9 */
    color: #2c3e50; 
    background: rgba(241,243,245,0.7); 
    padding: 2px 10px;               /* 原4/14 → 2/10 */
    border-radius: 16px; 
    display: inline-block; 
    backdrop-filter: blur(4px); 
    border: 0.5px solid rgba(0,0,0,0.04); 
}

.nav-menu { 
    padding: 4px 10px 12px;          /* 原6/14/16 → 4/10/12 */
    background: rgba(255,255,255,0.4); 
    backdrop-filter: blur(8px); 
    margin: 0 8px 10px;              /* 原0/10/14 → 0/8/10 */
    border: 1px solid rgba(255,255,255,0.4); 
    border-radius: 12px;              /* 原16 → 12 */
    box-shadow: 0 4px 12px rgba(0,0,0,0.02); 
}

.nav-item { 
    display: flex; 
    align-items: center; 
    padding: 7px 10px;               /* 原10/14 → 7/10 */
    margin-bottom: 4px;               /* 原6 → 4 */
    border-radius: 8px;               /* 原12 → 8 */
    color: #2c3e50; 
    text-decoration: none; 
    font-size: 10px;                  /* 原12 → 10 */
    background: rgba(255,255,255,0.55); 
    border: 1px solid rgba(233,236,239,0.3); 
    transition: all 0.2s; 
    font-weight: 500; 
}

.nav-item i { 
    margin-right: 8px;                /* 原12 → 8 */
    font-size: 14px;                  /* 原16 → 14 */
    width: 18px;                      /* 原20 → 18 */
    color: #4a5b6b; 
}

.nav-item:hover { 
    background: rgba(255,255,255,0.8); 
    border-color: rgba(173,181,189,0.5); 
    transform: translateX(2px);        /* 原4 → 2 */
}

.sidebar-footer { 
    margin-top: 2px; 
    padding: 12px 12px;                /* 原18/16 → 12/12 */
    background: rgba(255,255,255,0.4); 
    backdrop-filter: blur(8px); 
    margin: 6px 8px 12px;              /* 原10/12/16 → 6/8/12 */
    border: 1px solid rgba(255,255,255,0.3); 
    border-radius: 12px; 
    text-align: center; 
}

.app-version { 
    font-size: 9px;                    /* 原11 → 9 */
    color: #4a5b6b; 
    background: rgba(248,249,250,0.7); 
    padding: 4px 8px;                  /* 原6/12 → 4/8 */
    border-radius: 20px; 
    display: inline-block; 
    backdrop-filter: blur(4px); 
    border: 0.5px solid rgba(0,0,0,0.04); 
    font-weight: 500; 
}

/* ===== 服务分类图标 ===== */
.game-icons-section { 
    padding: 3px 8px 5px;          /* 原5/10/8 → 3/8/5 */
}

.game-icons-title { 
    font-size: 9px;                /* 原11 → 9 */
    font-weight: 600; 
    color: #2c3e50; 
    margin-bottom: 5px;            /* 原8 → 5 */
    display: flex; 
    align-items: center; 
    gap: 3px; 
}

.game-icons-scroll { 
    overflow-x: auto; 
    white-space: nowrap; 
    -webkit-overflow-scrolling: touch; 
    padding-bottom: 3px;           /* 原5 → 3 */
}

.game-icons-container { 
    display: inline-flex; 
    gap: 8px;                      /* 原12 → 8 */
}

.game-icon-item { 
    display: inline-flex; 
    flex-direction: column; 
    align-items: center; 
    width: 48px;                   /* 原60 → 48 */
    text-decoration: none; 
}

.game-icon-image { 
    width: 42px;                   /* 原52 → 42 */
    height: 42px; 
    border-radius: 10px;           /* 原14 → 10 */
    overflow: hidden; 
    border: 1px solid rgba(0, 0, 0, 0.2); 
    background: #f8f9fa; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
}

.game-icon-image img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
}

.game-icon-name { 
    font-size: 7px;                /* 原9 → 7 */
    font-weight: 500; 
    color: #495057; 
    text-align: center; 
    white-space: nowrap; 
    overflow: hidden; 
    text-overflow: ellipsis; 
    max-width: 48px; 
}

/* ===== 功能卡片 ===== */
.feature-cards {
    padding: 0 8px 6px;             /* 原0/10/10 → 0/8/6 */
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;                       /* 原8 → 6 */
}

.feature-cards.bottom-tools {
    padding-top: 2px;
    padding-bottom: 5px;            /* 原8 → 5 */
}

.feature-card {
    background: #ffffff;
    backdrop-filter: none;
    border-radius: 6px;              /* 原8 → 6 */
    padding: 7px;                    /* 原10 → 7 */
    border: 1px solid rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 6px;                        /* 原10 → 6 */
    cursor: pointer;
    transition: all 0.1s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.feature-card:hover {
    background: #f8f9fa;
    border-color: #aab2b8;
}

.feature-icon {
    width: 26px;                      /* 原32 → 26 */
    height: 26px; 
    border-radius: 5px;               /* 原7 → 5 */
    display: flex; 
    align-items: center; 
    justify-content: center;
    font-size: 12px;                  /* 原14 → 12 */
    color: #666; 
    flex-shrink: 0;
    background: #f8f9fa;
    border: 1px solid #e0e4e8;
}

.feature-info { 
    flex: 1; 
}

.feature-title { 
    font-size: 8.5px;                 /* 原10 → 8.5 */
    font-weight: 600; 
    color: #2c3e50; 
    margin-bottom: 1px; 
}

.feature-desc { 
    font-size: 7.5px;                 /* 原9 → 7.5 */
    color: #868e96; 
}

/* ===== 游戏卡片 ===== */
.game-cards-section { 
    padding: 0 8px 5px;                /* 原0/10/8 → 0/8/5 */
}

.game-cards-title { 
    font-size: 9px;                    /* 原11 → 9 */
    font-weight: 600; 
    color: #2c3e50; 
    margin-bottom: 5px;                /* 原8 → 5 */
    display: flex; 
    align-items: center; 
    gap: 3px; 
}

.game-cards-grid { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 6px;                          /* 原8 → 6 */
}

.game-card { 
    background: #ffffff;
    backdrop-filter: none;
    border-radius: 8px;                /* 原10 → 8 */
    border: 1px solid rgba(0, 0, 0, 0.25);
    overflow: hidden; 
    transition: all 0.2s; 
    text-decoration: none; 
    display: flex; 
    flex-direction: column; 
    opacity: 0; 
    transform: translateY(8px);        /* 原12 → 8 */
    transition: opacity 0.25s cubic-bezier(0.2, 0.9, 0.3, 1), transform 0.3s cubic-bezier(0.2, 0.9, 0.3, 1), border 0.15s; 
}

.game-card.visible { 
    opacity: 1; 
    transform: translateY(0); 
}

.game-card:hover { 
    transform: translateY(-2px);       /* 原-3 → -2 */
    box-shadow: 0 6px 12px rgba(0,0,0,0.08); 
    border-color: rgba(0, 0, 0, 0.45); 
}

.game-card-cover { 
    width: 100%; 
    aspect-ratio: 16 / 7; 
    background: #ffffff; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    border-bottom: 1px solid rgba(0, 0, 0, 0.15); 
    overflow: hidden; 
}

.game-card-cover img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    display: block; 
}

.game-card-info { 
    padding: 4px 6px;                  /* 原5/8 → 4/6 */
    display: flex; 
    align-items: flex-start; 
    gap: 4px;                          /* 原6 → 4 */
}

.game-card-icon { 
    width: 12px;                       /* 原14 → 12 */
    height: 12px; 
    flex-shrink: 0; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    background: transparent; 
    border-radius: 2px;                /* 原3 → 2 */
    overflow: hidden; 
}

.game-card-icon img { 
    width: 100%; 
    height: 100%; 
    object-fit: contain; 
}

.game-card-text { 
    display: flex; 
    flex-direction: column; 
    flex: 1; 
    min-width: 0; 
}

.game-card-name { 
    font-size: 9px;                    /* 原11 → 9 */
    font-weight: 600; 
    color: #2c3e50; 
    white-space: nowrap; 
    overflow: hidden; 
    text-overflow: ellipsis; 
}

.game-tag { 
    background: rgba(233,236,239,0.7); 
    backdrop-filter: blur(2px); 
    color: #495057; 
    padding: 1px 3px;                  /* 原1/4 → 1/3 */
    border-radius: 2px;                /* 原3 → 2 */
    font-size: 6px;                    /* 原7 → 6 */
    border: 0.5px solid #dee2e6; 
    display: inline-block; 
}

/* ===== 底部导航 - 整体缩小，字体缩小，凸起幅度微调 ===== */
.bottom-nav {
    position: fixed; 
    bottom: 0; 
    left: 0; 
    right: 0; 
    height: 66px;                     /* 原80 → 66 (整体压缩) */
    background: rgba(230, 235, 240, 0.75);
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    border-top: 1px solid rgba(160, 170, 180, 0.3);
    display: flex; 
    justify-content: space-around; 
    align-items: flex-end;
    z-index: 998; 
    box-shadow: 0 -4px 12px rgba(0,0,0,0.04);
    padding-bottom: env(safe-area-inset-bottom, 0);
    padding-top: 0;
}

.bottom-nav .nav-item {
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: flex-end;
    text-decoration: none; 
    color: #6b7a8a;
    font-size: 9px;                    /* 原11 → 9 */
    padding: 4px 0 6px 0;               /* 原8/0/10 → 4/0/6 */
    flex: 1; 
    gap: 2px;                           /* 原4 → 2 */
    transition: all 0.2s cubic-bezier(0.2, 0, 0, 1);
    border-radius: 20px 20px 0 0;       /* 原30 → 20 */
    margin: 0 1px;
    height: 100%;
    position: relative;
    background: transparent;
    border: none;
    transform: translateY(0);
    box-shadow: none;
}

/* 主页按钮（选中状态）- 向上凸起 (幅度略微降低，比例协调) */
.bottom-nav .nav-item.active {
    color: #1e3a5f;
    font-weight: 600;
    background: #ffffff;
    transform: translateY(-7px);         /* 原-10 → -7 (缩小后凸起幅度适应) */
    box-shadow: 
        0 -3px 6px -2px rgba(0, 0, 0, 0.1),
        0 3px 8px -4px rgba(0, 0, 0, 0.2),
        inset 0 1px 2px rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-bottom: none;
    z-index: 10;
}

.bottom-nav .nav-icon {
    font-size: 22px;                    /* 原26 → 22 */
    line-height: 1;
    filter: drop-shadow(0 1px 1px rgba(255,255,255,0.5));
    color: #5e6f7e;
    transition: color 0.2s;
}

.bottom-nav .nav-item.active .nav-icon {
    color: #1e3a5f;
}

.bottom-nav .nav-item:not(.active) {
    background: transparent;
    box-shadow: none;
    border: none;
    transform: translateY(0);
    color: #7c8a9a;
}

/* ===== 弹窗 - 完全重构（比例缩小一致） ===== */
.modal-overlay {
    position: fixed; 
    top: 0; 
    left: 0; 
    right: 0; 
    bottom: 0;
    background: rgba(10, 20, 30, 0.6);
    backdrop-filter: blur(10px); 
    -webkit-backdrop-filter: blur(10px);
    z-index: 2000; 
    display: flex; 
    align-items: center; 
    justify-content: center;
    opacity: 0; 
    visibility: hidden; 
    transition: opacity 0.3s ease, visibility 0.3s;
}

.modal-overlay.active { 
    opacity: 1; 
    visibility: visible; 
}

.modal-content {
    width: 280px;                       /* 原320 → 280 */
    max-width: 90%;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-radius: 28px;                 /* 原32 → 28 */
    box-shadow: 0 30px 60px -15px rgba(0, 20, 40, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.5) inset;
    transform: scale(0.92) translateY(12px);
    transition: transform 0.35s cubic-bezier(0.21, 1.11, 0.3, 1), box-shadow 0.3s;
    overflow: hidden;
    border: none;
    color: #1e2b39;
}

.modal-overlay.active .modal-content { 
    transform: scale(1) translateY(0);
}

.modal-header-custom {
    display: flex; 
    align-items: center; 
    gap: 8px;                           /* 原12 → 8 */
    padding: 14px 16px 5px;              /* 原18/20/8 → 14/16/5 */
}

.modal-icon-wrapper {
    background: linear-gradient(145deg, #ffffff, #f2f5f8);
    width: 36px;                         /* 原44 → 36 */
    height: 36px;
    border-radius: 14px;                 /* 原18 → 14 */
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 16px -6px rgba(0,32,64,0.2), 0 0 0 1px rgba(0,0,0,0.06) inset;
    color: #1f3a57;
    font-size: 20px;                     /* 原24 → 20 */
}

.modal-header-custom h3 {
    font-size: 15px;                     /* 原18 → 15 */
    font-weight: 700; 
    color: #1a2c3f; 
    margin: 0; 
    letter-spacing: -0.2px;
    text-shadow: 0 1px 2px rgba(255,255,255,0.5);
}

.modal-date-badge {
    background: rgba(44,62,80,0.08);
    backdrop-filter: blur(4px);
    padding: 2px 8px;                    /* 原4/12 → 2/8 */
    border-radius: 30px;                 /* 原40 → 30 */
    font-size: 7px;                      /* 原9 → 7 */
    font-weight: 600;
    color: #2c3e50;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    margin-left: auto;
    border: 1px solid rgba(255,255,255,0.5);
}

.modal-scroll-body {
    padding: 8px 12px 12px;               /* 原12/16/16 → 8/12/12 */
    max-height: 280px;                    /* 原320 → 280 */
    overflow-y: auto;
    background: rgba(248,250,252,0.3);
    border-top: 1px solid rgba(0,0,0,0.05);
    border-bottom: 1px solid rgba(255,255,255,0.5);
    scrollbar-width: thin;
    scrollbar-color: #b0c0cf #eef3f8;
}

.modal-scroll-body::-webkit-scrollbar {
    width: 4px;
}
.modal-scroll-body::-webkit-scrollbar-track {
    background: #eef3f8;
    border-radius: 10px;
}
.modal-scroll-body::-webkit-scrollbar-thumb {
    background: #b0c0cf;
    border-radius: 10px;
}

.announcement-item {
    display: flex;
    gap: 12px;                           /* 原16 → 12 */
    padding: 12px 10px;                   /* 原16/14 → 12/10 */
    margin-bottom: 8px;                   /* 原10 → 8 */
    background: rgba(255,255,255,0.6);
    backdrop-filter: blur(8px);
    border-radius: 18px;                  /* 原22 → 18 */
    border: 1px solid rgba(255,255,255,0.9);
    box-shadow: 0 4px 12px rgba(0,0,0,0.02), 0 0 0 1px rgba(255,255,255,0.8) inset;
    transition: transform 0.15s, box-shadow 0.2s;
}

.announcement-item:hover {
    transform: translateY(-1px);          /* 原-2 → -1 */
    box-shadow: 0 8px 20px rgba(0,20,40,0.08);
    background: rgba(255,255,255,0.75);
}

.item-badge {
    width: 32px;                          /* 原40 → 32 */
    height: 32px;
    border-radius: 12px;                  /* 原16 → 12 */
    background: linear-gradient(135deg, #eaf0f6, #d8e2ed);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;                      /* 原20 → 16 */
    color: #1f3a57;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}

.item-content {
    flex: 1;
}

.item-title {
    font-size: 11px;                      /* 原13 → 11 */
    font-weight: 700;
    color: #102331;
    margin-bottom: 3px;                   /* 原5 → 3 */
    display: flex;
    align-items: center;
    gap: 5px;                             /* 原8 → 5 */
}

.item-desc {
    font-size: 9px;                       /* 原11 → 9 */
    color: #2e4258;
    line-height: 1.4;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 6px;                         /* 原6/8 → 4/6 */
}

.item-desc span {
    background: rgba(44,62,80,0.08);
    padding: 1px 6px;                     /* 原2/8 → 1/6 */
    border-radius: 30px;                  /* 原40 → 30 */
    font-size: 7px;                       /* 原8 → 7 */
    font-weight: 600;
    color: #1f3a57;
    border: 0.5px solid rgba(255,255,255,0.5);
    backdrop-filter: blur(2px);
}

.new-tag {
    background: #ffd966;
    color: #3d2f1a;
    font-size: 7px;                       /* 原8 → 7 */
    font-weight: 700;
    padding: 2px 6px;                     /* 原3/8 → 2/6 */
    border-radius: 30px;
    letter-spacing: 0.3px;
}

.modal-footer-buttons {
    display: flex;
    padding: 12px 16px 16px;              /* 原16/20/20 → 12/16/16 */
    gap: 8px;                              /* 原10 → 8 */
}

.modal-footer-buttons button {
    flex: 1;
    padding: 9px 0;                        /* 原12 → 9 */
    border: none;
    border-radius: 50px;                   /* 原60 → 50 */
    font-size: 11px;                       /* 原13 → 11 */
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.8);
    color: #1f3a57;
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
    transition: all 0.2s ease;
}

.modal-footer-buttons button:first-child {
    background: rgba(44,62,80,0.9);
    backdrop-filter: blur(12px);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
}

.modal-footer-buttons button:active {
    transform: scale(0.96);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* ===== 数据统计区域 (相应缩小字体/间距) ===== */
.stats-section {
    padding: 0 8px 6px;            /* 原0/10/9 → 0/8/6 */
}
.stats-container {
    background: #ffffff;
    backdrop-filter: none;
    border-radius: 8px;             /* 原10 → 8 */
    padding: 8px;                   /* 原12 → 8 */
    border: 1px solid rgba(0, 0, 0, 0.2);
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.stats-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;             /* 原12 → 8 */
    border-bottom: 1px solid rgba(233,236,239,0.7);
    padding-bottom: 5px;            /* 原8 → 5 */
}
.stats-title {
    font-size: 9px;                 /* 原11 → 9 */
    font-weight: 600;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 3px;
}
.stats-title i {
    color: #666;
    font-size: 9px;
}
.time-filter {
    display: flex;
    gap: 2px;
}
.time-btn {
    padding: 2px 5px;               /* 原3/7 → 2/5 */
    background: #ffffff;
    border: 0.8px solid #dee2e6;
    border-radius: 6px;             /* 原8 → 6 */
    font-size: 7px;                 /* 原8 → 7 */
    color: #666;
    cursor: pointer;
    transition: all 0.15s;
    font-weight: 500;
    backdrop-filter: none;
}
.time-btn.active {
    background: #f1f3f5;
    color: #2c3e50;
    border-color: #2c3e50;
}
.stats-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;                       /* 原12 → 8 */
}
@media (min-width: 380px) {
    .stats-grid {
        grid-template-columns: 1.2fr 1fr;
    }
}
.chart-container {
    background: #ffffff;
    backdrop-filter: none;
    border-radius: 6px;             /* 原8 → 6 */
    padding: 6px;                   /* 原10 → 6 */
    border: 1px solid rgba(0, 0, 0, 0.15);
}
.chart-title {
    font-size: 8px;                 /* 原10 → 8 */
    font-weight: 600;
    color: #495057;
    margin-bottom: 5px;             /* 原8 → 5 */
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.chart-title span {
    font-size: 7px;                 /* 原9 → 7 */
    color: #868e96;
    font-weight: 500;
}
.chart-wrapper {
    height: 80px;                   /* 原100 → 80 */
    position: relative;
    display: flex;
    align-items: flex-end;
    padding-top: 3px;
}
.chart-bars {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    width: 100%;
    height: 65px;                   /* 原80 → 65 */
    position: relative;
}
.chart-bar {
    width: 10px;                    /* 原14 → 10 */
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.bar-value {
    height: var(--bar-height, 35px);
    width: 7px;                     /* 原10 → 7 */
    background: #adb5bd;
    border-radius: 2px 2px 0 0;      /* 原3 → 2 */
    transition: all 0.3s;
    position: relative;
}
.bar-value.up {
    background: linear-gradient(to top, #868e96, #adb5bd);
}
.bar-value.down {
    background: linear-gradient(to top, #adb5bd, #ced4da);
}
.bar-label {
    font-size: 6px;                 /* 原7 → 6 */
    color: #868e96;
    margin-top: 2px;                /* 原4 → 2 */
    font-weight: 500;
}
.bar-tooltip {
    position: absolute;
    top: -20px;                     /* 原-25 → -20 */
    background: #2c3e50;
    color: white;
    padding: 2px 4px;               /* 原3/6 → 2/4 */
    border-radius: 3px;             /* 原4 → 3 */
    font-size: 6px;                 /* 原7 → 6 */
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 10;
}
.bar-tooltip:after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 3px;              /* 原4 → 3 */
    border-style: solid;
    border-color: #2c3e50 transparent transparent transparent;
}
.chart-bar:hover .bar-tooltip {
    opacity: 1;
}
.chart-stats {
    display: flex;
    justify-content: space-between;
    margin-top: 5px;                /* 原8 → 5 */
    padding-top: 5px;               /* 原8 → 5 */
    border-top: 1px solid rgba(233,236,239,0.7);
}
.chart-stat {
    text-align: center;
}
.chart-stat-value {
    font-size: 9px;                 /* 原11 → 9 */
    font-weight: 600;
    color: #2c3e50;
}
.chart-stat-label {
    font-size: 6px;                 /* 原7 → 6 */
    color: #868e96;
    margin-top: 1px;
}
.hot-apps-container {
    background: #ffffff;
    backdrop-filter: none;
    border-radius: 6px;             /* 原8 → 6 */
    padding: 6px;                   /* 原10 → 6 */
    border: 1px solid rgba(0, 0, 0, 0.15);
}
.hot-apps-title {
    font-size: 8px;                 /* 原10 → 8 */
    font-weight: 600;
    color: #495057;
    margin-bottom: 5px;             /* 原8 → 5 */
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.hot-apps-title span {
    font-size: 7px;                 /* 原9 → 7 */
    color: #868e96;
    font-weight: 500;
}
.hot-apps-list {
    display: flex;
    flex-direction: column;
    gap: 4px;                       /* 原6 → 4 */
}
.hot-app-item {
    display: flex;
    align-items: center;
    padding: 4px;                   /* 原6 → 4 */
    border-radius: 4px;             /* 原6 → 4 */
    background: #f8f9fa;
    transition: all 0.15s;
    border: 1px solid transparent;
    cursor: pointer;
}
.hot-app-item:hover {
    background: #f1f3f5;
    border-color: #e9ecef;
    transform: translateY(-1px);
}
.hot-app-rank {
    width: 16px;                    /* 原20 → 16 */
    height: 16px;
    border-radius: 8px;             /* 原10 → 8 */
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 7px;                 /* 原9 → 7 */
    font-weight: 700;
    color: #495057;
    margin-right: 5px;              /* 原8 → 5 */
    flex-shrink: 0;
}
.hot-app-rank.top {
    background: #f8f9fa;
    color: #2c3e50;
    border: 1px solid #dee2e6;
}
.hot-app-info {
    flex: 1;
    min-width: 0;
}
.hot-app-name {
    font-size: 8px;                 /* 原9 → 8 */
    font-weight: 600;
    color: #2c3e50;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 1px;
}
.hot-app-meta {
    display: flex;
    gap: 5px;                       /* 原8 → 5 */
    font-size: 6px;                 /* 原7 → 6 */
    color: #868e96;
}
.hot-app-downloads {
    display: flex;
    align-items: center;
    gap: 1px;
}
.hot-app-trend {
    display: flex;
    align-items: center;
    gap: 1px;
    font-size: 6px;                 /* 原7 → 6 */
    font-weight: 600;
}
.hot-app-trend.up {
    color: #2c3e50;
}
.hot-app-trend.down {
    color: #868e96;
}
.hot-app-icon {
    width: 18px;                    /* 原22 → 18 */
    height: 18px;
    border-radius: 4px;             /* 原5 → 4 */
    overflow: hidden;
    margin-left: 4px;               /* 原6 → 4 */
    border: 1px solid #e9ecef;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.hot-app-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.stats-tags {
    display: flex;
    gap: 3px;                       /* 原4 → 3 */
    flex-wrap: wrap;
    margin-top: 6px;                /* 原10 → 6 */
}
.stats-tag {
    background: #ffffff;
    color: #495057;
    padding: 2px 5px;               /* 原3/7 → 2/5 */
    border-radius: 6px;             /* 原8 → 6 */
    font-size: 7px;                 /* 原8 → 7 */
    font-weight: 500;
    border: 0.8px solid #dee2e6;
    display: flex;
    align-items: center;
    gap: 2px;
    backdrop-filter: none;
}
.stats-tag i {
    font-size: 6px;                 /* 原7 → 6 */
}
.stats-tag.highlight {
    background: #f8f9fa;
    color: #2c3e50;
    border-color: #adb5bd;
}
.changelog-section { display: none; }
@media (max-width: 480px) {
    body { padding-bottom: 72px !important; } /* 配合底部导航 */
    .bottom-nav { height: 62px; }
    .sidebar { width: 240px; left: -240px; }
}
.game-icon-item, .feature-card, .game-card, .hot-app-item, .nav-item, .time-btn, .stats-tag {
    transition: transform 0.2s cubic-bezier(0.2, 0, 0, 1), box-shadow 0.2s, background 0.15s, border-color 0.15s !important;
}
.game-icon-item:active, .feature-card:active, .game-card:active, .hot-app-item:active, .time-btn:active, .stats-tag:active {
    transform: scale(0.97) !important;
}

/* ---------- 新增欢迎弹窗 (圆头像 + 精致介绍) ---------- */
#welcomeModal .modal-content {
    width: 260px;  /* 更小一点，符合比例要求 */
}
.welcome-avatar-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    margin: 10px auto 6px auto;
    border: 2px solid rgba(255,255,255,0.8);
    box-shadow: 0 8px 16px rgba(0,20,40,0.2);
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}
.welcome-avatar-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.welcome-intro {
    text-align: center;
    padding: 4px 12px 12px 12px;
    font-size: 9px;
    color: #1e2b39;
    line-height: 1.5;
}
.welcome-intro p {
    margin: 6px 0 4px 0;
}
.welcome-intro strong {
    font-size: 11px;
    color: #1e3a5f;
}
.welcome-intro .highlight {
    background: rgba(44,62,80,0.08);
    display: inline-block;
    padding: 2px 8px;
    border-radius: 30px;
    font-weight: 600;
    margin: 5px 0 2px;
    font-size: 8px;
}

/* ---------- 新增 兑换码按钮 & 弹窗 (完全保留原有风格，仅增加此区域) ---------- */
.redeem-btn {
    background: #ffffff;
    border: 1.5px solid #2c3e50;
    font-size: 12px;
    color: #2c3e50;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.03);
    transition: all 0.15s;
}
.redeem-btn i {
    font-size: 12px;
}
.redeem-btn:hover {
    background: #f0f4f8;
}
#redeemModal .modal-content {
    width: 260px;
}
.redeem-input-area {
    padding: 12px 16px;
    text-align: center;
}
.redeem-input-area input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid rgba(0,0,0,0.2);
    border-radius: 12px;
    font-size: 10px;
    background: rgba(255,255,255,0.8);
    backdrop-filter: blur(4px);
    text-align: center;
    letter-spacing: 2px;
    font-weight: 600;
    color: #1e3a5f;
    outline: none;
}
.redeem-input-area input:focus {
    border-color: #2c3e50;
    box-shadow: 0 0 0 2px rgba(44,62,80,0.1);
}
.redeem-result {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
    font-size: 14px;
    font-weight: 700;
    color: #1e3a5f;
    transform: scale(0.8);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s;
}
.redeem-result.show {
    transform: scale(1);
    opacity: 1;
}
.redeem-result i {
    font-size: 22px;
    color: #f5b342;
    filter: drop-shadow(0 2px 4px rgba(255,215,0,0.4));
    animation: coinTwinkle 1s infinite alternate;
}
@keyframes coinTwinkle {
    0% { transform: scale(1); text-shadow: 0 0 2px gold; }
    100% { transform: scale(1.15); text-shadow: 0 0 8px #ffd966; }
}