/* ========================================
 * 保留旧的#game-score样式（向后兼容）
 * 新游戏请使用.hud-container系统
 * ======================================== */
        /* 覆盖theme-ui.css中可能导致冲突的body样式 */
        html {
            background: radial-gradient(ellipse at center, #1a1a1a 0%, #0a0a0a 50%, #000000 100%);
            background-attachment: fixed;
            min-height: 100vh;
            overflow-x: hidden;
            width: 100%;
        }

        body {
            background: transparent !important;
            padding-top: 100px;
            overflow-y: auto !important;
        }

        /* ---------------- 内容区域切换动画 ---------------- */
        .content-section {
            display: flex;
            gap: 20px;
            flex-wrap: wrap;
            justify-content: center;
            padding: 0 16px 40px 16px;
            opacity: 1;
            transform: translateY(0);
            transition: opacity 0.4s var(--ease-liquid), transform 0.4s var(--ease-liquid);
            width: 100%;
            max-width: 1600px;
            box-sizing: border-box;
            margin: 0 auto;
            min-height: 80vh; /* Reserve vertical space to prevent CLS shift during async load */
        }

        /* 初始加载时允许显示内容容器（以显示骨架屏） */
        .content-section.loading {
            opacity: 1;
            visibility: visible;
        }

        /* 动画曲线 */
        @keyframes skeleton-shimmer {
            0% { opacity: 0.6; }
            50% { opacity: 0.3; }
            100% { opacity: 0.6; }
        }

        .game-card.skeleton {
            animation: skeleton-shimmer 1.5s ease-in-out infinite;
            pointer-events: none;
            background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%);
            border-color: rgba(255, 255, 255, 0.1);
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
        }

        .game-card.skeleton .icon-placeholder {
            width: 56px;
            height: 56px;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.15);
            margin-bottom: 16px;
        }

        .game-card.skeleton .title-placeholder {
            width: 100px;
            height: 18px;
            background: rgba(255, 255, 255, 0.15);
            border-radius: 4px;
            margin-bottom: 12px;
        }

        .game-card.skeleton .desc-placeholder {
            width: 130px;
            height: 13px;
            background: rgba(255, 255, 255, 0.08);
            border-radius: 4px;
            margin-bottom: 20px;
        }

        .game-card.skeleton .btn-placeholder {
            width: 70px;
            height: 28px;
            background: rgba(255, 255, 255, 0.12);
            border-radius: 14px;
        }

        .content-section.hidden {
            display: none !important;
            opacity: 0;
            transform: translateY(20px);
        }

        .content-section.fade-out {
            opacity: 0;
            transform: translateY(-20px);
        }

        /* ---------------- 搜索区域样式 ---------------- */
        #search-section {
            flex-direction: column;
            align-items: center;
            gap: 24px;
            max-width: 800px;
            padding: 250px 20px 40px 20px;
            min-height: auto;
        }

        .game-card {
            width: 200px;
            height: 324px;
            background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.05) 100%);
            backdrop-filter: blur(25px) saturate(180%);
            -webkit-backdrop-filter: blur(25px) saturate(180%);
            will-change: transform;
            transform: translateZ(0);
            border: 1px solid rgba(255, 255, 255, 0.2);
            border-radius: 30px;
            position: relative;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease, border-color 0.3s ease, background 0.3s ease;
            cursor: pointer;
            text-decoration: none;
            color: var(--text-primary);
            overflow: hidden;
            padding: 24px 16px;
            box-sizing: border-box;
            box-shadow: var(--shadow-medium), inset 0 1px 1px rgba(255, 255, 255, 0.6), inset 0 -1px 1px rgba(255, 255, 255, 0.2);
        }

        .game-card::before {
            content: '';
            position: absolute;
            top: -50%;
            left: -50%;
            width: 200%;
            height: 200%;
            background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 60%);
            opacity: 0;
            transition: opacity 0.5s ease;
            pointer-events: none;
        }

        .game-card > *:not(.game-vote-container) {
            flex-shrink: 0;
            z-index: 1;
        }

        .game-card:hover {
            border-color: rgba(255, 255, 255, 0.4);
            background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.08) 100%);
            transform: translateY(-4px) scale(1.02) translateZ(0);
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 20px rgba(var(--primary-color-rgb), 0.2), inset 0 1px 2px rgba(255, 255, 255, 0.8), inset 0 -1px 1px rgba(255, 255, 255, 0.3);
        }

        .game-card:hover::before {
            opacity: 1;
            transform: rotate(45deg);
        }

        .game-card:active {
            transform: scale(0.98) translateZ(0);
            transition-duration: 0.1s;
        }

        .game-card .icon {
            font-size: 56px;
            margin-bottom: 16px;
            transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.3s ease;
            filter: drop-shadow(0 10px 10px rgba(0,0,0,0.4));
        }

        .game-card:hover .icon {
            transform: scale(1.15) translateY(-5px);
            filter: drop-shadow(0 15px 15px rgba(var(--primary-color-rgb), 0.5));
        }

        .game-card h2 {
            font-size: clamp(1rem, 1.2vw + 0.6rem, 1.125rem);
            font-weight: 700;
            margin: 10px 0 8px 0;
            letter-spacing: 0.5px;
            background: linear-gradient(90deg, #ffffff, #aaaaaa);
            -webkit-background-clip: text;
            background-clip: text;
            -webkit-text-fill-color: transparent;
            transition: background 0.3s ease;
            text-align: center;
        }

        .game-card:hover h2 {
            background: linear-gradient(90deg, #00f2ff, #0088ff);
            -webkit-background-clip: text;
            background-clip: text;
            -webkit-text-fill-color: transparent;
        }

        .game-card p {
            color: #888888;
            font-size: clamp(0.75rem, 0.8vw + 0.5rem, 0.8125rem);
            text-align: center;
            line-height: 1.4;
            margin: 0 0 15px 0;
            opacity: 0.8;
            transition: opacity 0.3s ease;
        }

        .game-card:hover p {
            opacity: 1;
            color: #dddddd;
        }

        .badge-new {
            position: absolute;
            top: 0;
            left: 0;
            background: linear-gradient(135deg, var(--secondary-color) 0%, #ff0055 100%);
            color: white;
            font-size: 11px;
            font-weight: 700;
            padding: 4px 10px;
            border-radius: 30px 0 16px 0;
            z-index: 10;
            box-shadow: 2px 2px 8px rgba(255, 0, 85, 0.3);
            display: flex;
            align-items: center;
            gap: 4px;
            letter-spacing: 0.5px;
            pointer-events: none;
        }

        .badge-new::before {
            content: '🆕';
            font-size: 10px;
            line-height: 1;
        }

        /* 新内容 (✨ 新内容) 专属样式 */
        .badge-new.update {
            background: linear-gradient(135deg, var(--primary-color) 0%, #0088ff 100%);
            box-shadow: 2px 2px 8px rgba(0, 242, 255, 0.3);
        }

        .badge-new.update::before {
            content: '✨';
        }

        /* 规则 (📜 规则) 专属样式 */
        .badge-new.rule {
            background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.05) 100%);
            box-shadow: var(--shadow-soft), inset 0 1px 1px rgba(255, 255, 255, 0.3), inset 0 -1px 1px rgba(255, 255, 255, 0.1);
            color: var(--text-secondary);
            border: 1px solid rgba(255, 255, 255, 0.15);
            pointer-events: auto;
            cursor: pointer;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }

        .badge-new.rule:hover {
            color: var(--primary-color);
            background: linear-gradient(135deg, rgba(255, 255, 255, 0.25) 0%, rgba(255, 255, 255, 0.1) 100%);
            border-color: rgba(255, 255, 255, 0.3);
        }

        .badge-new.rule::before {
            content: '📜';
        }


        /* 游戏内实时分数显示 */
        /* 游戏卡片投票区域 */
        .game-vote-container {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 4px;
            background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.05) 100%);
            will-change: transform;
            transform: translateZ(0);
            border: 1px solid rgba(255, 255, 255, 0.2);
            border-radius: 20px;
            padding: 3px 8px;
            color: var(--text-secondary);
            font-size: 13px;
            user-select: none;
            margin-top: auto;
            margin-bottom: 0;
            z-index: 2;
            box-shadow: var(--shadow-soft), inset 0 1px 1px rgba(255, 255, 255, 0.6), inset 0 -1px 1px rgba(255, 255, 255, 0.2);
            transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s ease;
        }

        .game-vote-container:hover {
            border-color: rgba(255, 255, 255, 0.3);
            transform: translateY(-1px);
        }

        .game-vote-btn {
            background: none;
            border: none;
            color: inherit;
            font-size: 13px;
            cursor: pointer;
            padding: 2px 6px;
            border-radius: 6px;
            transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), background 0.2s ease, color 0.2s ease, filter 0.2s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            will-change: transform;
        }

        .game-vote-btn:hover {
            background: rgba(255, 255, 255, 0.15);
            transform: scale(1.15);
        }

        .game-vote-btn:active {
            transform: scale(0.9);
        }

        .game-vote-btn.vote-up.active {
            color: #10b981; /* emerald green */
            filter: drop-shadow(0 0 5px rgba(16, 185, 129, 0.6));
            transform: scale(1.1);
        }

        .game-vote-btn.vote-down.active {
            color: #ef4444; /* rose red */
            filter: drop-shadow(0 0 5px rgba(239, 68, 68, 0.6));
            transform: scale(1.1);
        }

        .game-vote-container .vote-count {
            font-weight: 700;
            min-width: 14px;
            text-align: center;
            color: var(--text-primary);
        }

        .coming-soon {
            opacity: 0.5;
            cursor: default;
        }

        .coming-soon:hover {
            transform: none;
            box-shadow: none;
            border-color: var(--glass-border);
        }@media (max-width: 768px) {

            body {
                padding-top: 80px;
            }

            .game-card {
                width: 160px;
                height: 259px;
                border-radius: 24px;
                padding: 16px;
            }

            .game-card .badge-new {
                border-radius: 24px 0 12px 0;
                font-size: 10px;
                padding: 3px 8px;
            }

            .game-card .icon {
                font-size: 44px;
                margin-bottom: 12px;
            }

            #search-section {
                padding: 150px 16px 40px 16px;
                width: calc(100% - 32px);
            }


}@media (max-width: 480px) {

            body {
                padding-top: 80px;
            }

            .game-card {
                width: 140px;
                height: 226px;
                border-radius: 20px;
                padding: 12px;
            }

            .game-card .badge-new {
                border-radius: 20px 0 10px 0;
                font-size: 10px;
                padding: 2px 6px;
            }

            .game-card .icon {
                font-size: 36px;
                margin-bottom: 8px;
            }

            .game-card h2 {
                font-size: 15px;
                margin: 6px 0;
            }

            .game-card p {
                font-size: 12px;
                margin: 0 0 10px 0;
            }

            #search-section {
                padding: 150px 16px 40px 16px;
                width: calc(100% - 32px);
            }


}


        /* 游戏内实时分数显示 */
        #game-toast {
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            background: rgba(0, 0, 0, 0.8);
            color: #fff;
            padding: 12px 24px;
            border-radius: 8px;
            font-size: 14px;
            z-index: 10000;
            opacity: 0;
            transition: opacity 0.3s ease;
            pointer-events: none;
            text-align: center;
            white-space: nowrap;
        }

        #game-toast.show {
            opacity: 1;
        }

/* 愿望清单悬浮球 (FAB) */
.fab-wishlist {
    position: fixed;
    bottom: 40px;
    right: 40px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.05) 100%);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    will-change: transform, backdrop-filter;
    transform: translateZ(0);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 20px;
    min-width: 100px;
    box-shadow: var(--shadow-soft), inset 0 1px 1px rgba(255, 255, 255, 0.6), inset 0 -1px 1px rgba(255, 255, 255, 0.2), 0 0 15px rgba(var(--primary-color-rgb), 0.2);
    color: var(--text-primary);
    text-decoration: none;
    z-index: 999;
    transition: all 0.4s var(--ease-liquid);
    box-sizing: border-box;
}

.fab-wishlist:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.08) 100%);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: var(--shadow-medium), inset 0 1px 2px rgba(255, 255, 255, 0.8), inset 0 -1px 1px rgba(255, 255, 255, 0.3), 0 0 25px rgba(var(--primary-color-rgb), 0.45);
    transform: translateY(-5px);
}

.fab-icon {
    position: relative;
    font-size: 24px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin: 0 4px;
    animation: star-float 4s infinite linear;
}

@keyframes star-float {
    0% {
        transform: translateY(0) scale(1) rotate(0deg);
        opacity: 0;
    }
    10% {
        transform: translateY(0) scale(1) rotate(0deg);
        opacity: 1;
    }
    40% {
        transform: translateY(-30px) scale(0.9) rotate(15deg);
        opacity: 0.8;
    }
    100% {
        transform: translateY(-80px) scale(0.5) rotate(40deg);
        opacity: 0;
    }
}

.fab-text {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-color);
    white-space: nowrap;
    opacity: 1;
    width: auto;
}

/* 背景模糊 */
@keyframes fab-pulse {
    0% { box-shadow: var(--shadow-soft), inset 0 1px 1px rgba(255, 255, 255, 0.6), inset 0 -1px 1px rgba(255, 255, 255, 0.2), 0 0 10px rgba(var(--primary-color-rgb), 0.15); }
    50% { box-shadow: var(--shadow-soft), inset 0 1px 1px rgba(255, 255, 255, 0.6), inset 0 -1px 1px rgba(255, 255, 255, 0.2), 0 0 20px rgba(var(--primary-color-rgb), 0.35); }
    100% { box-shadow: var(--shadow-soft), inset 0 1px 1px rgba(255, 255, 255, 0.6), inset 0 -1px 1px rgba(255, 255, 255, 0.2), 0 0 10px rgba(var(--primary-color-rgb), 0.15); }
}

.fab-wishlist:not(:hover) {
    animation: fab-pulse 3s infinite;
}@media (max-width: 768px) {

    .fab-wishlist {
        display: none !important;
    }
}



/* 骨架屏加载占位效果 */
.skeleton-loading {
    animation: skeleton-glow 1.5s ease-in-out infinite alternate;
    background-color: rgba(200, 200, 200, 0.1);
    border-radius: 8px;
}
@keyframes skeleton-glow {
    0% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* 修复 <main> 标签加入后导致的 Flex 容器宽度坍塌及移动端溢出问题 */
main {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}@media (max-width: 768px) {

    .tool-card, .game-card {
        width: 100% !important;
        height: auto !important;
        min-height: 90px;
        border-radius: 20px;
        padding: 16px 20px !important;
        display: grid !important;
        grid-template-columns: auto 1fr auto;
        grid-template-rows: auto auto;
        grid-template-areas: 
            "icon title like"
            "icon desc like";
        align-items: center;
        text-align: left;
        gap: 6px 16px;
    }

    /* 移动端隐藏玻璃反光伪元素，避免长条卡片上大面积渐变造成 GPU 卡顿 */
    .tool-card::before, .game-card::before {
        display: none !important;
    }

    .tool-card .icon, .game-card .icon {
        grid-area: icon;
        font-size: 42px !important;
        margin: 0 !important;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .tool-card h2, .game-card h2 {
        grid-area: title;
        font-size: 16px !important;
        margin: 0 !important;
        text-align: left !important;
        align-self: end;
    }

    .tool-card p, .game-card p {
        grid-area: desc;
        font-size: 13px !important;
        margin: 0 !important;
        padding: 0 !important;
        text-align: left !important;
        align-self: start;
        display: -webkit-box !important;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .tool-card .tool-vote-container, .game-card .game-vote-container {
        grid-area: like;
        margin: 0 !important;
        padding: 4px 8px;
        align-self: center;
    }
}
