/* 全局样式 */
body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Segoe UI", sans-serif;
    background-color: #f9f9f9;
    color: #111;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    box-sizing: border-box;
}

/* 标题 */
header {
    text-align: center;
    padding-bottom: 40px;
}

header h1 {
    font-size: 2.8rem;
    font-weight: 600;
    margin: 0;
}

/* 轮播图容器 */
.slider-container {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    margin-bottom: 60px;
}

.slider {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    /* 响应式高宽比 */
    max-height: 400px;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 0.8s ease;
    z-index: 0;
}

.slide.active {
    opacity: 1;
    z-index: 1;
}

/* 覆盖标题文字 */
.title-overlay {
    position: absolute;
    bottom: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.6);
    color: #000;
    font-size: 1.4rem;
    font-weight: 500;
    text-align: center;
    padding: 20px;
    box-sizing: border-box;
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
}

/* 幻灯片指示点 */
.slider-controls {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.slider-dot {
    width: 10px;
    height: 10px;
    background: #ccc;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s;
}

.slider-dot.active {
    background: #333;
}

/* 推荐标题 */
.featured-title {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 20px;
    text-align: center;
}

/* 游戏网格，响应式自动列数 */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

/* 游戏卡片 */
.game-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: transform 0.3s ease;
    border: 1px solid #000000;
    border-radius: 12px;
}

.game-card:hover {
    transform: translateY(-6px);
}

.game-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    background-size: cover;
    background-position: center;
}

.game-title {
    padding: 16px 12px;
    font-size: 1.2rem;
    font-weight: 600;
    text-align: center;
    color: #111;
}

/* 占位符样式 */
.game-card.placeholder {
    display: flex;
    justify-content: center;
    align-items: center;
    font-style: italic;
    background: #f0f0f0;
    color: #999;
    border: 2px dashed #ccc;
}

/* 页脚 */
footer {
    text-align: center;
    padding: 30px 0;
    font-size: 0.9rem;
    color: #888;
}

/* 移动端调整 */
@media (max-width: 480px) {
    header h1 {
        font-size: 2rem;
    }

    .title-overlay {
        font-size: 1.1rem;
        padding: 14px;
    }

    .featured-title {
        font-size: 1.4rem;
    }

    .game-title {
        font-size: 1rem;
        padding: 12px 8px;
    }
}


.game-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: -120%;
    /* 从左边外部起始 */
    width: 30%;
    /* 更窄更锐利 */
    height: 100%;
    background: linear-gradient(90deg,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 1) 50%,
            /* 更亮 */
            rgba(255, 255, 255, 0) 100%);
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.8)) drop-shadow(0 0 15px rgba(0, 150, 255, 0.6));
    pointer-events: none;
    opacity: 0;
    transform: skewX(-45deg);
    /* 角度改成-45度 */
    transition: opacity 0.3s ease;
}

.game-card:hover::before {
    opacity: 1;
    animation: shine-bright 0.8s ease forwards;
}

@keyframes shine-bright {
    0% {
        left: -120%;
        opacity: 1;
    }

    100% {
        left: 130%;
        opacity: 0;
    }
}