/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* 导航栏样式 */
.navbar {
    background-color: #e67312;
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem;
}

.nav-logo {
    display: flex; /* 使用flexbox布局 */
    align-items: center; /* 垂直居中对齐子项 */
    font-size: 24px; /* 设置字体大小 */
    font-weight: bold; /* 加粗字体 */
    color: #333; /* 设置字体颜色 */
    text-decoration: none; /* 移除下划线 */
}

.nav-logo img {
    width: 40px; /* 调整宽度 */
    height: 40px; /* 设置高度与宽度相同 */
    border-radius: 50%; /* 圆形logo */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); /* 添加阴影效果 */
    object-fit: cover; /* 确保图片比例正确 */
}

.site-name {
    font-family: 'Arial', sans-serif; /* 更改字体 */
    color: #ffffff; /* 更改名称的颜色 */
    letter-spacing: 1px; /* 增加字母间距 */
    /*text-transform: uppercase; !* 将文本转换为大写 *!*/
    margin-left: 5px; /* 关键：添加5px左边距实现间隔 */
}
.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-link {
    padding: 0.5rem 1rem;
    transition: color 0.3s;
}

.nav-link:hover, .nav-link.active {
    color: #000000;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: white;
    margin: 3px 0;
    transition: 0.3s;
}

/* 主内容区域 */
.main-content {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

/* 轮播图区域 */
.banner-section {
    position: relative;
    margin-bottom: 2rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.banner-slider {
    position: relative;
    height: 400px;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.slide.active {
    opacity: 1;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.slide-overlay h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.slide-overlay p {
    margin-bottom: 1rem;
}

.play-btn {
    background-color: #e74c3c;
    color: white;
    padding: 0.8rem 2rem;
    border-radius: 4px;
    font-weight: bold;
    transition: background-color 0.3s;
}

.play-btn:hover {
    background-color: #c0392b;
}

.slider-controls {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    padding: 0 1rem;
}

.slider-controls button {
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    transition: background-color 0.3s;
}

.slider-controls button:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.slider-dots {
    position: absolute;
    bottom: 1rem;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
}

.dot.active {
    background-color: white;
}

/* 推荐游戏区域 */
.recommended-section {
    margin-top: 3rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.section-header h2 {
    font-size: 1.8rem;
    color: #2c3e50;
}

.view-all {
    color: #e67312;
    font-weight: bold;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.game-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.game-banner {
    position: relative;
    height: 150px;
    overflow: hidden;
}

.game-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.game-card:hover .game-banner img {
    transform: scale(1.05);
}

.game-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s;
}

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

.game-overlay .play-btn {
    padding: 0.5rem 1.5rem;
}

.game-info {
    padding: 1rem;
}

.game-title {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.game-meta {
    display: flex;
    justify-content: space-between;
    color: #7f8c8d;
    font-size: 0.9rem;
}

.game-rating::before {
    content: "★";
    color: #f1c40f;
    margin-right: 0.3rem;
}

/* 页脚样式 */
.footer {
    background-color: #e67312;
    color: white;
    padding: 2rem 0 0;
    margin-top: 3rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    padding: 0 1rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a:hover {
    color: #3498db;
}

.social-icons {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-icon {
    display: inline-block;
    width: 36px;
    height: 36px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    text-align: center;
    line-height: 36px;
    transition: background-color 0.3s;
}

.social-icon:hover {
    background-color: #3498db;
}

.footer-bottom {
    text-align: center;
    padding: 1.5rem 0;
    margin-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}