/* 首页特定样式 */

.hero-section {
    height: 80vh;
    min-height: 690px;
    max-height: 900px;
}

.hero-bg-img {
    object-position: center bottom;
}

.card-hover-effect {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-hover-effect:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.25);
}

/* 游戏海报图片 hover 效果 - 修复抖动问题 */
.game-poster-card:hover .game-poster-img {
    transform: scale(1.05);
    /* 使用 transform-origin 确保从中心缩放，避免位置偏移 */
    transform-origin: center center;
    /* 添加 will-change 优化性能，减少重排 */
    will-change: transform;
}

/* 确保图片容器在 hover 时不会影响布局 */
.game-poster-image-container {
    /* 确保容器有 overflow，防止图片放大时溢出 */
    overflow: hidden;
    /* 创建新的层叠上下文，隔离变换效果 */
    isolation: isolate;
}

.platform-card {
    transition: all 0.3s ease;
}

.platform-card:hover {
    transform: translateY(-6px);
    background-color: #4b5563;
}

/* 游戏滑动轮播样式 */
.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* 游戏卡片样式 */
#games-slider .game-poster-card {
    width: 200px;
    min-width: 200px;
    /* 确保卡片尺寸固定，防止 hover 时布局变化 */
    position: relative;
    /* 防止 hover 时影响其他元素 */
    isolation: isolate;
}

/* 图片容器 - 统一高度 */
#games-slider .game-poster-image-container {
    width: 100%;
    height: 240px; /* 固定高度，确保所有图片高度一致 */
    position: relative;
    /* 确保图片放大时不会溢出影响布局 */
    overflow: hidden;
    /* 创建新的层叠上下文，防止影响其他元素 */
    contain: layout;
}

/* 响应式高度调整 */
@media (min-width: 640px) {
    #games-slider .game-poster-image-container {
        height: 260px;
    }
}

@media (min-width: 1024px) {
    #games-slider .game-poster-image-container {
        height: 280px;
    }
}

/* 图片填充容器 */
#games-slider .game-poster-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

