/* 字体定义 */
@font-face {
    font-family: 'SHOWG';
    src: url('../fonts/SHOWG.TTF') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'ARLRDBD';
    src: url('../fonts/ARLRDBD.TTF') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'ARLRDBD', sans-serif;
}

:root {
    --primary-color: #00d4ff;
    --secondary-color: #5b9fff;
    --accent-color: #ff6b9d;
    --accent-color-2: #ffd93d;
    --text-primary: #1a1a2e;
    --text-secondary: #4a5568;
    --bg-light: #f8fafc;
    --bg-card: rgba(255, 255, 255, 0.9);
    --bg-card-hover: rgba(255, 255, 255, 1);
    --border-color: rgba(0, 212, 255, 0.2);
    --shadow: 0 10px 40px rgba(0, 212, 255, 0.15);
    --shadow-hover: 0 20px 60px rgba(0, 212, 255, 0.3);
    --gradient-1: linear-gradient(135deg, #00d4ff 0%, #5b9fff 50%, #ff6b9d 100%);
    --gradient-2: linear-gradient(135deg, #ff6b9d 0%, #ffd93d 100%);
    --gradient-3: linear-gradient(135deg, #5b9fff 0%, #00d4ff 100%);
}

body {
    font-family: 'ARLRDBD', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
    /* 使用静态背景，移除动画以提升滚动性能 */
    background: linear-gradient(135deg, #667eea 0%, #764ba2 25%, #f093fb 50%, #4facfe 75%, #00f2fe 100%);
    background-size: 100% 100%;
    background-attachment: fixed;
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
    position: relative;
    /* 性能优化 - 启用硬件加速滚动 */
    -webkit-overflow-scrolling: touch;
}

/* 确保所有文字元素使用ARLRDBD字体（除了logo） */
h1:not(.logo-text), h2, h3, h4, h5, h6,
p, span:not(.lang-icon), a, button, input, select, textarea, label,
li, td, th, div, section, article, aside, nav, header, footer,
.games-title, .games-count, .game-card-title, .game-card-rating,
.detail-title, .detail-description, .detail-category, .detail-rating,
.feature-item, .action-btn, .search-input, .lang-toggle, .lang-text, .lang-option,
.category-btn, .back-btn, .play-btn-large, .no-games-message, .error-message,
.loading-indicator, .back-to-top {
    font-family: 'ARLRDBD', sans-serif !important;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* 移除动画以提升性能 */
    background: 
        radial-gradient(circle at 20% 50%, rgba(120, 119, 198, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 119, 198, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(120, 219, 255, 0.2) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
    /* 移除动画 */
    /* animation: floatBackground 20s ease-in-out infinite; */
    /* 优化性能 */
    will-change: auto;
    transform: translateZ(0);
}

@keyframes floatBackground {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.5;
    }
    50% {
        transform: translate(30px, -30px) scale(1.1);
        opacity: 0.7;
    }
}

/* 酷炫字体类 */
.font-display {
    font-family: 'ARLRDBD', sans-serif;
    font-weight: normal;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.font-title {
    font-family: 'ARLRDBD', sans-serif;
    font-weight: normal;
    letter-spacing: 1px;
}

.font-body {
    font-family: 'ARLRDBD', sans-serif;
    font-weight: normal;
}

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

/* 背景动画 */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    opacity: 0.6;
}

.particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: var(--gradient-1);
    border-radius: 50%;
    animation: float 20s infinite ease-in-out;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.6);
    /* 性能优化 - 使用GPU加速 */
    will-change: transform;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.particle:nth-child(1) {
    left: 10%;
    animation-delay: 0s;
    animation-duration: 15s;
}

.particle:nth-child(2) {
    left: 30%;
    animation-delay: 2s;
    animation-duration: 20s;
}

.particle:nth-child(3) {
    left: 50%;
    animation-delay: 4s;
    animation-duration: 18s;
}

.particle:nth-child(4) {
    left: 70%;
    animation-delay: 6s;
    animation-duration: 22s;
}

.particle:nth-child(5) {
    left: 90%;
    animation-delay: 8s;
    animation-duration: 16s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(100vh) translateX(0) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) translateX(100px) scale(1);
        opacity: 0;
    }
}

/* 容器 */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
    position: relative;
    z-index: 1;
}

/* 头部导航 */
.header {
    background: rgba(255, 255, 255, 0.98);
    /* 减少backdrop-filter使用以提升性能 */
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    /* 性能优化 */
    will-change: transform;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.logo-section:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

.logo-section:active {
    transform: scale(0.98);
}

.logo-img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.1));
}

.logo-text {
    font-family: 'SHOWG', sans-serif !important;
    font-size: 1.5rem;
    font-weight: normal;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.5px;
    position: relative;
    line-height: 1.2;
    filter: drop-shadow(0 2px 4px rgba(102, 126, 234, 0.3));
}


.back-btn {
    background: rgba(0, 212, 255, 0.1);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: normal;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.1);
}

.back-btn:hover {
    background: rgba(0, 212, 255, 0.2);
    border-color: var(--primary-color);
    transform: translateX(-5px);
    box-shadow: 0 6px 20px rgba(0, 212, 255, 0.2);
}

/* 搜索区域 */
.search-section {
    display: flex;
    gap: 0.5rem;
    flex: 1;
    max-width: 500px;
}

.search-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #333;
    padding: 0.625rem 1rem;
    border-radius: 12px;
    font-size: 0.9rem;
    outline: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.search-input::placeholder {
    color: var(--text-secondary);
}

.search-input:focus {
    border-color: rgba(102, 126, 234, 0.5);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2), 0 4px 12px rgba(102, 126, 234, 0.15);
    background: rgba(255, 255, 255, 1);
}

.search-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    padding: 0.625rem 1rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.search-btn:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

/* 语言选择器 */
.lang-selector {
    position: relative;
}

/* 底部语言选择器 */
.lang-selector-bottom {
    position: fixed;
    bottom: 2rem;
    right: 1.5rem;
    z-index: 1000;
    display: none;
}

.lang-selector-bottom .lang-toggle {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

@media (min-width: 1401px) {
    .lang-selector-bottom {
        right: calc((100vw - 1400px) / 2 + 1.5rem);
    }
}

@media (max-width: 768px) {
    .lang-selector-bottom {
        right: 1rem;
    }
}

@media (max-width: 480px) {
    .lang-selector-bottom {
        right: 1rem;
        bottom: 1.5rem;
    }
}

.lang-toggle {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #333;
    padding: 0.625rem 1rem;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: normal;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    min-width: 100px;
    justify-content: space-between;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.lang-toggle:hover {
    background: rgba(255, 255, 255, 1);
    border-color: rgba(102, 126, 234, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.lang-icon {
    font-size: 1.2rem;
}

.lang-text {
    font-weight: normal;
    letter-spacing: 1px;
    flex: 1;
    text-align: left;
}

.lang-arrow {
    transition: transform 0.3s ease;
}

.lang-selector.active .lang-arrow {
    transform: rotate(180deg);
}

.lang-selector-bottom.active .lang-arrow {
    transform: rotate(0deg);
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    min-width: 160px;
    overflow: hidden;
    z-index: 1000;
    animation: slideDown 0.3s ease;
    border: 2px solid var(--border-color);
}

/* 上拉菜单样式 */
.lang-dropdown-up {
    top: auto;
    bottom: calc(100% + 8px);
    right: 0;
    left: auto;
    animation: slideUp 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.lang-option {
    width: 100%;
    padding: 0.75rem 1.25rem;
    border: none;
    background: transparent;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: normal;
    text-align: left;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.lang-option:hover {
    background: rgba(0, 212, 255, 0.1);
    color: var(--primary-color);
}

.lang-option.active {
    background: var(--gradient-3);
    color: white;
    font-weight: normal;
}

.lang-option.active::before {
    content: '✓';
    margin-right: 0.5rem;
}

/* 分类筛选 */
.categories-section {
    padding: 1.5rem 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.15) 25%, rgba(240, 147, 251, 0.15) 50%, rgba(79, 172, 254, 0.15) 75%, rgba(0, 242, 254, 0.15) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.15), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    /* 确保导航栏默认显示 */
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* 底部导航栏 - 只在滚动到底部时显示 */
.categories-section-bottom {
    position: relative;
    bottom: auto;
    left: 0;
    right: 0;
    top: auto;
    border-bottom: none;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 -4px 20px rgba(102, 126, 234, 0.15), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    z-index: 100;
    margin-top: 2rem;
    transition: opacity 0.3s ease, transform 0.3s ease;
    padding: 0;
}

/* 如果同时有categories-section和categories-section-bottom，且没有show类，则默认显示（顶部导航栏） */
.categories-section.categories-section-bottom:not(.show) {
    opacity: 1 !important;
    transform: translateY(0) !important;
    margin-top: 0;
    border-top: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.15), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    position: sticky;
    top: 0;
}

/* 底部导航栏 - 只在有show类时显示 */
.categories-section-bottom.show {
    opacity: 1;
    transform: translateY(0);
}

.categories-section-bottom .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem 1.5rem;
    width: 100%;
    box-sizing: border-box;
}

.categories-section-bottom.show {
    opacity: 1;
    transform: translateY(0);
}

/* 渐变遮罩层 */
.categories-gradient-overlay {
    position: absolute;
    top: -150px;
    left: 0;
    right: 0;
    height: 150px;
    background: linear-gradient(to bottom, 
        transparent 0%, 
        rgba(102, 126, 234, 0.05) 20%,
        rgba(118, 75, 162, 0.1) 40%,
        rgba(240, 147, 251, 0.15) 60%,
        rgba(79, 172, 254, 0.2) 80%,
        rgba(102, 126, 234, 0.25) 100%);
    pointer-events: none;
    z-index: -1;
}

.categories-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0.1) 100%);
    pointer-events: none;
    z-index: -1;
}

.categories-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1rem 0;
    justify-content: flex-start;
    align-items: center;
}

.category-btn {
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid rgba(255, 255, 255, 0.5);
    color: #666;
    padding: 0.75rem 1rem;
    border-radius: 16px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    font-size: 0.85rem;
    font-weight: normal;
    position: relative;
    overflow: hidden;
    min-width: 80px;
    min-height: 80px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.category-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.category-btn:hover {
    background: rgba(255, 255, 255, 1);
    border-color: rgba(102, 126, 234, 0.6);
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
}

.category-btn:hover::before {
    opacity: 1;
}

.category-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border: 2px solid rgba(255, 255, 255, 0.8) !important;
    border-radius: 16px !important;
    color: #ffffff !important;
    padding: 0.75rem 1rem !important;
    min-width: 80px !important;
    min-height: 80px !important;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.5), 0 0 0 2px rgba(255, 255, 255, 0.3) !important;
    transform: translateY(-4px) scale(1.05);
}

.category-btn.active::before {
    opacity: 0.3;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.1) 100%);
}

.category-btn.active * {
    position: relative;
    z-index: 1;
}

.category-icon {
    width: 36px;
    height: 36px;
    opacity: 0.8;
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    z-index: 1;
}

.category-btn:hover .category-icon {
    opacity: 1;
    transform: scale(1.1);
    filter: drop-shadow(0 4px 8px rgba(102, 126, 234, 0.3));
}

.category-btn.active .category-icon {
    opacity: 1;
    width: 40px;
    height: 40px;
    filter: brightness(0) invert(1) drop-shadow(0 2px 4px rgba(255, 255, 255, 0.3));
    transform: scale(1.15);
}

.category-btn span {
    font-size: 0.75rem;
    font-weight: 500;
    z-index: 1;
    text-align: center;
    line-height: 1.2;
}

.category-btn.active span {
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* 主内容区域 */
.main-content {
    padding: 2rem 0 1rem;
    position: relative;
    z-index: 1;
    margin-bottom: 0;
    /* 性能优化 - 启用硬件加速滚动 */
    -webkit-overflow-scrolling: touch;
}

/* 移动端默认底部间距更小 */
@media (max-width: 768px) {
    .main-content {
        padding-bottom: 0.5rem !important;
    }

    .games-grid {
        margin-bottom: 0.25rem !important;
    }
}

.games-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 0 0.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.games-title {
    font-size: 1.75rem;
    font-weight: normal;
    background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 8px rgba(255, 255, 255, 0.5);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.games-count {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    font-weight: normal;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* 游戏网格 - 瀑布流布局（类似Pinterest风格） */
.games-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    align-content: flex-start;
    /* 性能优化 - 启用硬件加速滚动 */
    -webkit-overflow-scrolling: touch;
}

/* 游戏卡片 */
.game-card {
    background: rgba(255, 255, 255, 0.98);
    /* 减少backdrop-filter使用以提升性能，改用半透明背景 */
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    width: calc((100% - 0.75rem * (var(--columns, 4) - 1)) / var(--columns, 4));
    min-width: 160px;
    max-width: 220px;
    flex-grow: 1;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    /* 性能优化 */
    /* 减少GPU使用 */
    will-change: auto;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    contain: layout style paint;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
    pointer-events: none;
}

.game-card:hover {
    transform: translateY(-8px) scale(1.02) translateZ(0);
    -webkit-transform: translateY(-8px) scale(1.02) translateZ(0);
    box-shadow: 0 12px 32px rgba(102, 126, 234, 0.3);
    border-color: rgba(102, 126, 234, 0.5);
}

.game-card:hover::before {
    opacity: 1;
}

.game-card-image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 100%; /* 保持正方形比例 */
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    z-index: 1;
}

.game-card-image-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.1) 100%);
    z-index: 1;
    pointer-events: none;
}

.game-card-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    z-index: 1;
    /* 性能优化 */
    will-change: transform;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.game-card-image.lazy-load {
    opacity: 0.3;
    filter: blur(5px);
}

.game-card-image:not(.lazy-load) {
    opacity: 1;
    filter: blur(0);
}

.game-card:hover .game-card-image {
    transform: scale(1.1) translateZ(0);
    -webkit-transform: scale(1.1) translateZ(0);
}

.game-card-overlay {
    display: none;
}

.play-btn {
    display: none;
}

.game-card-content {
    padding: 0.75rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 50px;
    position: relative;
    z-index: 2;
    background: rgba(255, 255, 255, 0.95);
}

.game-card-title {
    font-size: 0.875rem;
    font-weight: normal;
    margin-bottom: 0;
    background: linear-gradient(135deg, #333 0%, #667eea 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-align: center;
    transition: all 0.3s ease;
}

.game-card:hover .game-card-title {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.game-card-category {
    display: none;
}

.game-card-description {
    display: none;
}

.game-card-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 0.25rem;
    padding-top: 0;
    border-top: none;
}

.game-card-rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: #ffd700;
    font-size: 0.75rem;
    font-weight: normal;
    text-shadow: 0 1px 2px rgba(255, 215, 0, 0.3);
    filter: drop-shadow(0 1px 2px rgba(255, 215, 0, 0.2));
}

/* 加载指示器 */
.loading-indicator {
    text-align: center;
    padding: 4rem 0;
    color: var(--text-secondary);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(102, 126, 234, 0.2);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 无游戏消息 */
.no-games-message {
    text-align: center;
    padding: 4rem 0;
    color: var(--text-secondary);
}

.no-games-message svg {
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--gradient-1);
    border: none;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    z-index: 1000;
}

.back-to-top:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: var(--shadow-hover);
}

/* 游戏详情页 */
.detail-content {
    padding: 2rem 0 4rem;
    position: relative;
    z-index: 1;
}

.game-detail-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.detail-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    padding: 2rem;
}

.detail-image-wrapper {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 16/9;
    background: #f0f0f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.detail-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.detail-image-wrapper:hover .detail-overlay {
    opacity: 1;
}

.play-btn-large {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 1rem 2rem;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: normal;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.play-btn-large:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.detail-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.detail-title {
    font-size: 2rem;
    font-weight: normal;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 2px 4px rgba(102, 126, 234, 0.3));
}

.detail-meta {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.detail-category {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: normal;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.detail-rating {
    color: #ffd700;
    font-size: 1.1rem;
    font-weight: normal;
}

.detail-description {
    color: #666;
    font-size: 1rem;
    line-height: 1.6;
}

.detail-features {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #666;
    font-size: 0.9rem;
}

.feature-item svg {
    color: var(--primary-color);
}

.detail-actions {
    display: flex;
    gap: 1rem;
    padding: 2rem;
    border-top: 1px solid #e5e5e5;
    flex-wrap: wrap;
}

.action-btn {
    flex: 1;
    min-width: 200px;
    padding: 0.875rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: normal;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    border: none;
}

.action-btn.primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.4);
}

.action-btn.primary:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.action-btn.secondary {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #333;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.action-btn.secondary:hover {
    background: rgba(255, 255, 255, 1);
    border-color: rgba(102, 126, 234, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.error-message {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
    font-size: 1.2rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }

    .header .container {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .header-actions {
        flex-direction: column;
        width: 100%;
        gap: 0.75rem;
    }

    .logo-section {
        justify-content: center;
    }

    .logo-img {
        width: 70px;
        height: 70px;
    }

    .logo-text {
        font-family: 'SHOWG', sans-serif !important;
        font-size: 1.5rem;
    }

    .search-section {
        max-width: 100%;
        width: 100%;
    }

    .lang-selector {
        width: 100%;
    }

    .lang-toggle {
        width: 100%;
        justify-content: center;
    }

    .lang-dropdown {
        right: 0;
        left: 0;
        width: 100%;
    }

    .categories-wrapper {
        gap: 0.75rem;
        padding-bottom: 0.5rem;
    }

    .category-btn {
        padding: 0.6rem 0.8rem;
        font-size: 0.75rem;
        flex-shrink: 0;
        flex: 0 0 auto;
        min-width: 70px;
        min-height: 70px;
    }

    .category-icon {
        width: 32px;
        height: 32px;
    }
    
    .category-btn.active .category-icon {
        width: 36px;
        height: 36px;
    }

    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }

    .game-card-content {
        padding: 0.5rem;
        min-height: 50px;
    }

    .game-card-title {
        font-size: 0.875rem;
        text-align: center;
    }

    .detail-header {
        grid-template-columns: 1fr;
        padding: 1.5rem;
        gap: 1.5rem;
    }

    .detail-title {
        font-size: 1.8rem;
        line-height: 1.2;
    }

    .detail-description {
        font-size: 1rem;
    }

    .detail-features {
        flex-direction: column;
        gap: 0.75rem;
    }

    .detail-actions {
        flex-direction: column;
        padding: 1.5rem;
    }

    .action-btn {
        width: 100%;
        min-width: auto;
    }

    .back-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 45px;
        height: 45px;
    }

    .games-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .games-title {
        font-size: 1.5rem;
    }

    /* 移动端优化底部间距 */
    .main-content {
        padding-bottom: 0.5rem !important;
    }

    .games-grid {
        margin-bottom: 0.25rem !important;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 1rem 0;
    }

    .logo-img {
        width: 60px;
        height: 60px;
    }

    .logo-text {
        font-family: 'SHOWG', sans-serif !important;
        font-size: 1.3rem;
    }

    .search-input {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }

    .search-btn {
        padding: 0.6rem 1.2rem;
    }

    .lang-toggle {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }

    .categories-section {
        padding: 1rem 0;
    }

    .category-btn {
        padding: 0.5rem 0.6rem;
        font-size: 0.7rem;
        flex: 0 0 auto;
        min-width: 60px;
        min-height: 60px;
    }

    .category-icon {
        width: 28px;
        height: 28px;
    }
    
    .category-btn.active .category-icon {
        width: 32px;
        height: 32px;
    }

    .games-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .game-card-content {
        padding: 0.4rem;
        min-height: 45px;
    }
    
    .game-card-title {
        font-size: 0.8rem;
        text-align: center;
    }
    
    .game-card-rating {
        font-size: 0.7rem;
    }
    
    .game-card-image-wrapper {
        padding-top: 56.25%; /* 保持16:9比例 */
    }

    .game-card-content {
        padding: 0.75rem;
    }

    .game-card-title {
        font-size: 0.9rem;
        margin-bottom: 0.4rem;
    }

    .game-card-category {
        font-size: 0.75rem;
        padding: 0.2rem 0.6rem;
        margin-bottom: 0.5rem;
    }

    .game-card-description {
        font-size: 0.8rem;
        -webkit-line-clamp: 2;
        line-height: 1.4;
    }

    .game-card-rating {
        font-size: 0.8rem;
    }

    .detail-header {
        padding: 1rem;
        gap: 1rem;
    }

    .detail-title {
        font-size: 1.5rem;
    }

    .detail-description {
        font-size: 0.95rem;
    }

    .detail-features {
        flex-direction: column;
        gap: 0.75rem;
    }

    .feature-item {
        font-size: 0.85rem;
    }

    .detail-actions {
        padding: 1rem;
        gap: 0.75rem;
    }

    .action-btn {
        padding: 0.85rem 1.5rem;
        font-size: 1rem;
    }

    .back-to-top {
        bottom: 0.75rem;
        right: 0.75rem;
        width: 40px;
        height: 40px;
    }

    .games-title {
        font-size: 1.3rem;
    }

    .games-count {
        font-size: 0.9rem;
    }

    /* 小屏移动端进一步优化底部间距 */
    .main-content {
        padding-bottom: 0.5rem !important;
    }

    .games-grid {
        margin-bottom: 0.25rem !important;
    }
}

