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

/* 全局样式 */
body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    background-image: linear-gradient(to bottom, #f5f5f5, #e0e0e0);
    padding-top: 70px;
}
a{
    text-decoration: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 导航栏样式 */
.navbar {
    background-color: #3498db;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.navbar-brand a {
    color: #fff;
    font-size: 24px;
    font-weight: bold;
    text-decoration: none;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.navbar-menu {
    display: flex;
    gap: 20px;
}

.navbar-menu a {
    color: #fff;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: color 0.3s ease, transform 0.3s ease;
}

.navbar-menu a:hover {
    color: #f39c12;
    transform: translateY(-2px);
}

/* 汉堡菜单样式 */
.navbar-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.navbar-toggle span {
    width: 25px;
    height: 3px;
    background-color: #fff;
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* 移动菜单样式 */
.mobile-menu {
    display: none;
    /*
      详情页里 mobile-menu 不在 .navbar 内，absolute + top:100% 会被定位到视口下方。
      用 fixed 统一定位到导航栏下方，兼容所有页面结构。
    */
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background-color: #3498db;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    padding: 15px 0;
    z-index: 1001;
}

.mobile-menu.active {
    display: block;
}

.mobile-menu a {
    display: block;
    color: #fff;
    text-decoration: none;
    padding: 10px 20px;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

.mobile-menu a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #f39c12;
}

/* 游戏分类区域样式 */
main {
    padding: 40px 0;
}

.game-category {
    margin-bottom: 60px;
}

.game-category h2 {
    font-size: 28px;
    margin-bottom: 20px;
    color: #3498db;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
}

.game-category h2::after {
    content: '';
    display: block;
    width: 80px;
    height: 3px;
    background-color: #3498db;
    margin: 10px auto 0;
    border-radius: 3px;
}

/* 游戏网格样式 */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

/* 游戏卡片样式 */
.game-card {
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border 0.3s ease;
    border: 2px solid transparent;
}

.game-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2), 0 0 20px rgba(52, 152, 219, 0.3);
    border: 2px solid #3498db;
}

.game-card a {
    display: block;
    text-decoration: none;
    color: inherit;
}

.game-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-bottom: 3px solid #3498db;
}

.game-card-content {
    padding: 15px;
}

.game-card h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #3498db;
    text-align: center;
}

/* 页脚样式 */
.footer {
    background-color: #3498db;
    color: #fff;
    padding: 30px 0;
    margin-top: 60px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-copyright {
    font-size: 14px;
}

.footer-menu {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-menu a {
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.footer-menu a:hover {
    color: #f39c12;
}

/* 详情页样式 */
.game-details {
    display: flex;
    gap: 40px;
    margin-bottom: 60px;
    flex-wrap: wrap;
}

.game-details-image {
    flex: 1;
    min-width: 300px;
}

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

.game-details-info {
    flex: 1;
    min-width: 300px;
}

.game-details-info h1 {
    font-size: 32px;
    margin-bottom: 20px;
    color: #3498db;
}

.game-details-info p {
    font-size: 16px;
    margin-bottom: 30px;
    line-height: 1.8;
    color: #555;
}

.btn {
    display: inline-block;
    background-color: #3498db;
    color: #fff;
    padding: 12px 24px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: background-color 0.3s ease, transform 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
}

.back-link {
    display: inline-block;
    margin-bottom: 30px;
    color: #3498db;
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s ease;
}

.back-link:hover {
    color: #2980b9;
}

/* 相关游戏样式 */
.related-games {
    margin-top: 60px;
}

.related-games h2 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #3498db;
    text-align: center;
}

.related-games .games-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

/* 联系表单样式 */
.contact-section {
    max-width: 800px;
    margin: 0 auto;
}

.contact-section h1 {
    font-size: 32px;
    margin-bottom: 20px;
    color: #3498db;
    text-align: center;
}

.contact-section p {
    margin-bottom: 30px;
    text-align: center;
    color: #555;
}

.contact-form {
    background-color: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #3498db;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

/* 政策页面样式 */
.policy-section {
    max-width: 800px;
    margin: 0 auto;
    background-color: #fff;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.policy-section h1 {
    font-size: 32px;
    margin-bottom: 20px;
    color: #3498db;
    text-align: center;
}

.policy-section p {
    margin-bottom: 20px;
    line-height: 1.8;
}

.policy-section h2 {
    font-size: 24px;
    margin-top: 30px;
    margin-bottom: 15px;
    color: #3498db;
}

.policy-section ul {
    margin-bottom: 20px;
    padding-left: 20px;
}

.policy-section li {
    margin-bottom: 8px;
    line-height: 1.6;
}

/* 响应式设计 */
@media (max-width: 768px) {
    /* 导航栏响应式 */
    .navbar-menu {
        display: none;
    }
    
    .navbar-toggle {
        display: flex;
    }
    
    /* 游戏网格响应式 */
    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    /* 游戏卡片响应式 */
    .game-card img {
        height: 140px;
    }
    
    .game-card h3 {
        font-size: 16px;
    }
    
    /* 页脚响应式 */
    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    /* 详情页响应式 */
    .game-details {
        flex-direction: column;
        align-items: center;
    }
    
    .game-details-image,
    .game-details-info {
        width: 100%;
    }
    
    /* 相关游戏响应式 */
    .related-games .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    /* 联系表单响应式 */
    .contact-form {
        padding: 20px;
    }
    
    /* 政策页面响应式 */
    .policy-section {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    /* 导航栏响应式 */
    .navbar-brand a {
        font-size: 20px;
    }
    
    /* 游戏分类标题响应式 */
    .game-category h2 {
        font-size: 24px;
    }
    
    /* 游戏网格响应式 */
    .games-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    /* 游戏卡片响应式 */
    .game-card img {
        height: 120px;
    }
    
    /* 详情页响应式 */
    .game-details-info h1 {
        font-size: 28px;
    }
    
    /* 联系表单响应式 */
    .contact-section h1 {
        font-size: 28px;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.game-category {
    animation: fadeIn 0.6s ease forwards;
}

.game-category:nth-child(1) {
    animation-delay: 0.1s;
}

.game-category:nth-child(2) {
    animation-delay: 0.2s;
}

.game-category:nth-child(3) {
    animation-delay: 0.3s;
}

.game-category:nth-child(4) {
    animation-delay: 0.4s;
}

.game-category:nth-child(5) {
    animation-delay: 0.5s;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #3498db;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #2980b9;
}

.category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.category-header h2 {
    margin-bottom: 0;
}

.view-all {
    color: #3498db;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
}

.view-all:hover {
    color: #2980b9;
}

.toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 0 24px;
    flex-wrap: wrap;
}

.toolbar-input, .toolbar-select {
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

@media (max-width: 768px) {
    .category-header {
        flex-direction: column;
        gap: 8px;
    }
}
