
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', 'Segoe UI', 'Microsoft YaHei', sans-serif;
}

body {
    background-color: #f2f6ff;
    color: #1e2b3f;
    font-size: 9px;
    line-height: 1.2;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    position: relative;
}

/* 动态线条背景 */
#dynamicLines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    display: block;
    pointer-events: none;
    opacity: 1;
    background: #eaf0fd;
}

.bg-layers {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 30% 40%, rgba(255,255,255,0.4) 0%, rgba(235, 242, 255, 0.2) 90%);
    z-index: 1;
    pointer-events: none;
}

/* ----- 顶栏：全宽固定，保留毛玻璃磨砂透明效果，改为贴顶设计 ----- */
.navbar {
    position: fixed;
    top: 0;            /* 完全贴顶，不留间隙 */
    left: 0;
    right: 0;
    width: 100%;
    height: 40px;       /* 稍微增高使视觉更舒适 */
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(16px) saturate(200%);
    -webkit-backdrop-filter: blur(16px) saturate(200%);
    border-bottom: 1px solid rgba(180, 200, 230, 0.7);
    box-shadow: 0 8px 22px -10px rgba(0, 20, 50, 0.2);
    display: flex;
    align-items: center;
    padding: 0 10px;
    z-index: 100;
}

.navbar-title {
    font-size: 11px;
    font-weight: 610;
    color: #1f344b;
    letter-spacing: -0.2px;
    display: flex;
    align-items: center;
    gap: 3px;
    margin-right: 3px;
    flex-shrink: 0;
}

.navbar-title i {
    font-size: 12px !important;
    color: #3b5f9e;
}

.games-count {
    background: rgba(210, 225, 250, 0.9);
    border-radius: 20px;
    padding: 1px 6px;
    font-size: 8px;
    font-weight: 600;
    color: #1f3a6b;
    border: 1px solid rgba(110, 150, 220, 0.5);
    backdrop-filter: blur(4px);
    line-height: 1.1;
}

/* 按钮容器 */
.nav-buttons {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-right: 4px;
    flex-shrink: 0;
}

.nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    background: rgba(230, 240, 255, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(150, 180, 230, 0.7);
    border-radius: 20px;
    padding: 3px 8px;
    font-size: 9px;
    font-weight: 580;
    color: #1e3c72;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(0, 30, 70, 0.08);
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
    line-height: 1;
}

.nav-btn i {
    font-size: 10px;
    color: #2f5496;
}

.nav-btn:hover {
    background: rgba(240, 246, 255, 0.95);
    border-color: #7ca2e0;
    box-shadow: 0 4px 12px rgba(60, 110, 180, 0.2);
    transform: scale(1.02);
}

/* 搜索包装器 */
.search-wrapper {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    position: relative;
    min-width: 30px;
}

.search-box {
    position: relative;
    width: 140px;
    transition: width 0.25s ease;
    max-width: 100%;
}

.search-box:focus-within {
    width: 170px;
}

.search-input {
    width: 100%;
    height: 26px;
    padding: 0 8px 0 26px;
    font-size: 9px;
    background: rgba(245, 250, 255, 0.9);
    border: 1.5px solid #d0dded;
    border-radius: 22px;
    color: #1f2e4a;
    outline: none;
    transition: all 0.2s;
}

.search-input::placeholder {
    color: #8699bb;
    font-size: 8.5px;
}

.search-input:focus {
    border-color: #7ca2e0;
    background: #ffffff;
    box-shadow: 0 4px 14px rgba(100, 150, 240, 0.15);
}

.search-icon {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    color: #6783b3;
    font-size: 10px;
    z-index: 2;
}

.search-voice {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    color: #8fa3cd;
    font-size: 10px;
    opacity: 0.7;
    cursor: pointer;
    z-index: 2;
}

/* ===== 全宽PNG轮播图容器 ===== */
.fullwidth-png-banner {
    position: relative;
    width: 100vw;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    background-color: transparent;
    z-index: 15;
    margin-top: 4px;      /* 与顶栏的缝隙 */
    margin-bottom: 6px;    /* 与下方字公告的缝隙 */
}

.banner-image-wrapper {
    width: 100%;
    background-color: transparent;
    border: 1px solid rgba(150, 180, 220, 0.7);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px -6px rgba(30, 60, 130, 0.25);
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f5f9ff;
}

.fullwidth-png-banner img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
    background-color: transparent;
    image-rendering: crisp-edges;
    border: none;
    outline: none;
    pointer-events: none;
}

/* ===== 滚动字体公告栏 (特别扁的长方形) ===== */
.ticker-news {
    width: 100vw;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    position: relative;
    background: rgba(240, 248, 255, 0.75);
    backdrop-filter: blur(8px) saturate(180%);
    -webkit-backdrop-filter: blur(8px) saturate(180%);
    border-top: 1px solid rgba(160, 190, 230, 0.7);
    border-bottom: 1px solid rgba(160, 190, 230, 0.7);
    padding: 4px 0;
    margin-bottom: 8px;         /* 与下方游戏卡片的缝隙 */
    box-shadow: 0 4px 12px -8px rgba(0,30,70,0.2);
    z-index: 14;
    overflow: hidden;
    height: 26px;
    display: flex;
    align-items: center;
}

.ticker-content {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    animation: tickerMove 22s linear infinite;
    padding-left: 10px;
    gap: 30px;
}

.ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 9px;
    color: #1e3f6e;
    background: rgba(210, 230, 255, 0.5);
    padding: 2px 12px 2px 8px;
    border-radius: 30px;
    border: 0.5px solid rgba(120, 160, 220, 0.8);
    backdrop-filter: blur(2px);
    box-shadow: 0 2px 6px rgba(0,20,50,0.1);
}

.ticker-item i {
    color: #3f6ab3;
    font-size: 8px;
}

.ticker-item.important i {
    color: #c54b4b;
}

.ticker-item.important {
    background: rgba(255, 235, 230, 0.7);
    border-color: #f0b0b0;
}

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

/* ===== 可滚动的内容区域 ===== */
.scroll-area {
    position: fixed;
    top: 40px;               /* 等于顶栏高度 */
    bottom: 0;
    left: 0;
    right: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    z-index: 10;
    padding: 0;               /* 内部不再有全局内边距，由内部元素自己控制 */
    background: transparent;
}

/* 下拉刷新区域 */
.pull-refresh-container {
    width: 100%;
    margin-top: 0;
    margin-bottom: 0;
    z-index: 15;
    pointer-events: none;
    display: flex;
    justify-content: center;
}

.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.5);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: 44px;
    padding: 5px 20px;
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: 0 15px 30px -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: 24px;
    height: 24px;
    border: 2px solid rgba(255, 255, 255, 0.9);
    border-top-color: #2e5aaf;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 3px;
    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;
    font-weight: 600;
    color: #1e3b6b;
    letter-spacing: 0.3px;
    text-shadow: 0 1px 4px rgba(255,255,255,0.8);
}

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

/* 游戏卡片容器 */
.games-container {
    position: relative;
    z-index: 10;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 8px 10px 8px;
}

/* 响应式网格：手机3列，平板及以上4列 */
.games-grid {
    display: grid;
    gap: 6px;
    grid-template-columns: repeat(3, 1fr);
}

@media (min-width: 600px) {
    .games-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }
}

@media (min-width: 1000px) {
    .games-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
    }
}

.game-card {
    background: #ffffff;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid #d0ddf0;
    transition: transform 0.18s ease, box-shadow 0.25s;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
    box-shadow: 0 4px 10px -6px rgba(0, 25, 60, 0.2);
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.22s cubic-bezier(0.2, 0.9, 0.3, 1), transform 0.28s cubic-bezier(0.2, 0.9, 0.3, 1);
    width: 100%;
}

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

.game-card:hover {
    transform: translateY(-2px);
    border-color: #a5c0f0;
    box-shadow: 0 12px 20px -12px rgba(40, 80, 160, 0.25);
}

.game-icon {
    width: 100%;
    height: 0;
    padding-bottom: 72%;
    background-color: #eef2fa;
    background-size: cover;
    background-position: center;
    position: relative;
    border-bottom: 1px solid #d0ddf0;
}

.game-info {
    padding: 3px 2px 2px 2px;
    background: #ffffff;
}

.game-title {
    font-size: 9px;
    font-weight: 630;
    color: #14273e;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.game-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5px;
    flex: 1;
}

.game-tag {
    background: #e0e9fa;
    color: #2f4a7a;
    font-size: 4.8px;
    padding: 1px 2.5px;
    border-radius: 2px;
    border: 0.5px solid #9cb2d6;
    font-weight: 500;
    line-height: 1.1;
    text-transform: uppercase;
}

.game-developer {
    display: flex;
    align-items: center;
    gap: 1px;
    font-size: 5px;
    color: #4e6b96;
    background: #f2f7ff;
    padding: 1px 4px;
    border-radius: 14px;
    border: 0.5px solid #b0c8f0;
    white-space: nowrap;
    margin-left: 2px;
    flex-shrink: 0;
    font-weight: 420;
}

.game-developer i {
    font-size: 4px;
    color: #7f9ad5;
}

.no-results {
    text-align: center;
    padding: 28px 14px;
    color: #5b739b;
    font-size: 11px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(14px);
    border-radius: 32px;
    border: 1px solid #dae3f5;
    margin-top: 30px;
}