/* home.css - 首页特定样式 */

/* Hero Section */
.hero-section {
    position: relative;
    height: 100vh; /* 全屏高度 */
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-align: center;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.hero-background video,
.hero-background img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 确保视频/图片覆盖整个区域 */
    filter: brightness(0.7); /* 降低亮度，使文字更清晰 */
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    padding: 20px;
}

.hero-content h1 {
    font-size: 4em;
    margin-bottom: 20px;
    color: #fff;
    text-shadow: 0 3px 10px rgba(0, 0, 0, 0.4);
}

.hero-content p {
    font-size: 1.5em;
    margin-bottom: 40px;
    color: #eee;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

/* Featured Games Section */
.featured-games-section {
    padding: 80px 0;
    text-align: center;
    background-color: #fff;
}

.featured-games-section h2 {
    margin-bottom: 50px;
    color: #6a8e7a;
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.game-card {
    background-color: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: left;
}

.game-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.game-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.game-card h3 {
    margin: 20px 20px 10px;
    color: #333;
}

.game-card p {
    margin: 0 20px 20px;
    color: #666;
    font-size: 0.95em;
}

.game-card .btn-secondary {
    margin: 0 20px 20px;
    padding: 8px 18px;
    font-size: 0.9em;
}

/* About Preview Section */
.about-preview-section {
    background-color: #eef5f0; /* 浅绿色背景 */
    padding: 80px 0;
}

.about-preview-section .container {
    display: flex;
    align-items: center;
    gap: 50px;
}

.about-content {
    flex: 1;
}

.about-content h2 {
    color: #6a8e7a;
    margin-bottom: 20px;
}

.about-content p {
    font-size: 1.1em;
    color: #555;
    margin-bottom: 30px;
}

.about-image {
    flex: 1;
    text-align: center;
}

.about-image img {
    max-width: 100%;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* News Preview Section */
.news-preview-section {
    padding: 80px 0;
    text-align: center;
}

.news-preview-section h2 {
    margin-bottom: 50px;
    color: #6a8e7a;
}

.news-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.news-item {
    background-color: #fff;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    text-align: left;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.news-item h3 {
    margin-bottom: 10px;
}

.news-item h3 a {
    color: #333;
    font-size: 1.3em;
}

.news-item h3 a:hover {
    color: #6a8e7a;
}

.news-item .news-date {
    font-size: 0.9em;
    color: #999;
    margin-bottom: 15px;
}

.news-item p {
    color: #666;
    font-size: 1em;
    line-height: 1.7;
}

/* Responsive adjustments for home page */
@media (max-width: 992px) {
    .hero-content h1 {
        font-size: 3em;
    }
    .hero-content p {
        font-size: 1.2em;
    }
    .about-preview-section .container {
        flex-direction: column;
        text-align: center;
    }
    .about-image {
        margin-top: 30px;
    }
}

@media (max-width: 768px) {
    .hero-section {
        height: 70vh;
    }
    .hero-content h1 {
        font-size: 2.5em;
    }
    .hero-content p {
        font-size: 1em;
    }
    .featured-games-section,
    .about-preview-section,
    .news-preview-section {
        padding: 60px 0;
    }
    .game-grid, .news-list {
        grid-template-columns: 1fr; /* 单列布局 */
    }
    .game-card, .news-item {
        margin: 0 auto;
        max-width: 400px;
    }
}

@media (max-width: 480px) {
    .hero-section {
        height: 60vh;
    }
    .hero-content h1 {
        font-size: 2em;
    }
    .hero-content p {
        font-size: 0.9em;
    }
    .featured-games-section h2,
    .about-content h2,
    .news-preview-section h2 {
        font-size: 1.8em;
    }
}