body {
    background-color: #1a1a1a; /* 深灰色背景 */
    color: #f4e04d; /* 黄色文字 */
    font-family: 'Press Start 2P', cursive;
    margin: 0;
    padding: 0;
}

/* 通用标题样式 */
.page-title {
    text-align: center;
    padding: 2rem;
    background-color: #1a1a1a; /* 深色背景 */
    color: #f4e04d; /* 黄色文字 */
    font-family: 'Press Start 2P', cursive;
}

.page-title h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.page-title p {
    font-size: 1rem;
}


/* 导航栏样式 */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background-color: #1a1a1a; /* 深色背景 */
    color: #f4e04d; /* 黄色文字 */
    font-family: 'Press Start 2P', cursive;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5); /* 阴影效果 */
}

.nav-links {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-links li {
    margin-right: 1.5rem;
}

.nav-links a {
    text-decoration: none;
    color: #f4e04d; /* 黄色文字 */
    font-size: 0.9rem;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #ff6f61; /* 橙色悬停效果 */
}

.nav-links .active {
    color: #ff6f61; /* 当前页面高亮 */
}

/* 下拉菜单样式 */
.dropdown {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #1a1a1a; /* 深色背景 */
    padding: 0.5rem 0;
    list-style: none;
    border: 1px solid #f4e04d; /* 黄色边框 */
    z-index: 1000;
}

.dropdown-menu li {
    margin: 0;
}

.dropdown-menu a {
    display: block;
    padding: 0.5rem 1rem;
    color: #f4e04d;
    text-decoration: none;
    font-size: 0.8rem;
}

.dropdown-menu a:hover {
    background-color: #ff6f61; /* 橙色悬停背景 */
    color: #ffffff; /* 白色文字 */
}

/* 显示下拉菜单 */
.dropdown:hover .dropdown-menu {
    display: block;
}



/* 通用卡片布局 */
.card-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 2rem;
    text-align: center;
}

.card {
    background-color: #1a1a1a; /* 深色背景 */
    color: #f4e04d; /* 黄色文字 */
    padding: 1rem;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5); /* 阴影效果 */
    transition: transform 0.3s, box-shadow 0.3s;
}

.card img {
    width: 100%;
    border-radius: 10px;
    margin-bottom: 1rem;
}

.card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.card p {
    font-size: 0.9rem;
    margin: 0.5rem 0;
}

.card:hover {
    transform: translateY(-5px); /* 鼠标悬停时上移 */
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.7); /* 鼠标悬停时阴影增强 */
}

/* 热门游戏标题 */
.hot-games h1 {
    text-align: center;
    font-family: 'Press Start 2P', cursive;
    font-size: 2rem;
    color: #f4e04d; /* 黄色文字 */
    margin-bottom: 2rem;
}

/* 卡片容器样式 */
.game-cards {
    display: grid;
    grid-template-columns: repeat(5, 1fr); /* 一行 5 个卡片 */
    gap: 1.5rem; /* 卡片之间的间距 */
    padding: 0; /* 移除上下留白 */
}

/* 单个卡片样式 */
.game-card {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s, box-shadow 0.3s;
    background-color: #1a1a1a; /* 确保卡片有背景色 */
    width: 100%; /* 保证卡片宽度适应容器 */
    height: 250px; /* 固定卡片高度 */
}

/* 图片样式 */
.game-card img {
    width: 100%;
    height: 100%; /* 图片高度填充卡片 */
    object-fit: cover; /* 确保图片适配卡片大小 */
    border-radius: 10px;
    transition: transform 0.3s;
}

/* 鼠标悬停时图片放大 */
.game-card:hover img {
    transform: scale(1.1);
}

/* 游戏信息容器 */
.game-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.7); /* 半透明背景 */
    color: #f4e04d; /* 黄色文字 */
    font-family: 'Press Start 2P', cursive;
    padding: 1rem;
    text-align: center;
    opacity: 0;
    transform: translateY(100%);
    transition: opacity 0.3s, transform 0.3s;
}

/* 鼠标悬停时显示文字 */
.game-card:hover .game-info {
    opacity: 1;
    transform: translateY(0);
}

/* 游戏名称样式 */
.game-info h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

/* 游戏描述样式 */
.game-info p {
    font-size: 0.9rem;
    margin: 0;
}

/* 游戏 iframe 样式 */
.game-play {
    text-align: center;
    margin: 2rem 0;
    color: #f4e04d; /* 黄色文字 */
    font-family: 'Press Start 2P', cursive;
}

.game-play h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.game-play iframe {
    border: 3px solid #f4e04d; /* 黄色边框 */
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5); /* 阴影效果 */
    width: 100%;
    max-width: 1200px; /* 限制最大宽度 */
    height: 600px;
}

/* iframe 容器样式 */
.iframe-container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

/* 全屏按钮样式 */
.fullscreen-button {
    position: absolute;
    bottom: 10px;
    right: 10px;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.9rem;
    color: #1a1a1a;
    background-color: #f4e04d;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    z-index: 10;
}

.fullscreen-button:hover {
    background-color: #ff6f61;
    transform: scale(1.1);
}

/* 游戏详情样式 */
.game-details {
    padding: 2rem;
    text-align: center;
    color: #f4e04d; /* 黄色文字 */
    font-family: 'Press Start 2P', cursive;
}

.game-details h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.game-info {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 2rem;
}

.game-info img {
    max-width: 600px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.game-details-info {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 2rem;
}

.game-details-info img {
    max-width: 600px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.game-description {
    max-width: 500px;
    text-align: left;
    color: #f4e04d; /* 确保文字颜色与背景有对比 */
    font-family: 'Press Start 2P', cursive;
    display: block; /* 确保显示 */
    opacity: 1; /* 确保可见 */
}

.game-description p {
    font-size: 1rem;
    margin: 0.5rem 0;
}

.game-description ul {
    list-style: none;
    padding: 0;
}

.game-description ul li {
    margin: 0.5rem 0;
    font-size: 1rem;
}

.cta-button {
    font-family: 'Press Start 2P', cursive;
    font-size: 1rem;
    color: #1a1a1a;
    background-color: #f4e04d;
    padding: 1rem 2rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
}

.cta-button:hover {
    background-color: #ff6f61;
    transform: scale(1.1);
}

/* 游戏操作指南样式 */
.game-controls {
    padding: 2rem;
    text-align: center;
    background-color: #1a1a1a; /* 深色背景 */
    color: #f4e04d; /* 黄色文字 */
    font-family: 'Press Start 2P', cursive;
    margin-top: 2rem;
    border-top: none; /* 移除分隔线 */
}

.game-controls h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.game-controls ul {
    list-style: none;
    padding: 0;
    margin: 0 auto;
    max-width: 600px;
    text-align: left;
}

.game-controls ul li {
    font-size: 1rem;
    margin: 0.5rem 0;
    padding-left: 1.5rem;
    text-indent: -1.5rem;
}

/* 页脚样式 */
.footer {
    text-align: center;
    padding: 1rem;
    background-color: #1a1a1a; /* 深色背景 */
    color: #f4e04d; /* 黄色文字 */
    font-family: 'Press Start 2P', cursive;
    font-size: 0.8rem;
    margin-top: 2rem;
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.5); /* 顶部阴影 */
}

/* 分享按钮容器 */
.share-buttons {
    margin-top: 1rem;
    text-align: center;
}

.share-buttons p {
    font-family: 'Press Start 2P', cursive; /* 像素字体 */
    font-size: 0.9rem;
    color: #f4e04d; /* 黄色文字 */
    margin-bottom: 0.5rem;
}

/* 分享按钮样式 */
.share-button {
    display: inline-block;
    margin: 0 0.5rem;
    padding: 0.5rem 1rem;
    font-family: 'Press Start 2P', cursive; /* 像素字体 */
    font-size: 0.8rem;
    color: #ffffff; /* 白色文字 */
    background-color: #ff6f61; /* 橙色背景 */
    text-decoration: none;
    border: none;
    border-radius: 8px; /* 添加圆角 */
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3); /* 添加轻微阴影 */
    transition: transform 0.2s, box-shadow 0.2s;
}

/* 鼠标悬停效果 */
.share-button:hover {
    transform: translateY(-2px); /* 悬停时按钮稍微上移 */
    box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.4); /* 悬停时阴影更明显 */
}

.share-button.twitter {
    background-color: #1da1f2; /* Twitter 蓝色 */
    color: #ffffff;
}

.share-button.facebook {
    background-color: #1877f2; /* Facebook 蓝色 */
    color: #ffffff;
}

.share-button.linkedin {
    background-color: #0077b5; /* LinkedIn 蓝色 */
    color: #ffffff;
}

/* 响应式支持 */
@media (max-width: 1024px) {
    .game-cards {
        grid-template-columns: repeat(3, 1fr); /* 一行 3 个卡片 */
    }

    .navbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .nav-links {
        flex-direction: column;
        align-items: flex-start;
    }

    .nav-links li {
        margin-bottom: 1rem;
    }
}

@media (max-width: 768px) {
    .game-cards {
        grid-template-columns: repeat(2, 1fr); /* 一行 2 个卡片 */
    }
}

@media (max-width: 480px) {
    .game-cards {
        grid-template-columns: 1fr; /* 一行 1 个卡片 */
    }
}

/* 通用容器样式，控制两侧留白 */
.container {
    max-width: 1200px; /* 设置最大宽度 */
    margin: 0 auto; /* 居中对齐 */
    padding: 0 1rem; /* 两侧留白 */
}