:root {
    --primary-color: #FF6B6B;
    --secondary-color: #4ECDC4;
    --accent-color: #FFE66D;
    --background-color: #f7f1ff;
    --text-color: #2C3E50;
    --card-background: #ffffff;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --gradient-start: #FF6B6B;
    --gradient-end: #4ECDC4;
}

/* 导入字体和基础样式 */
@import url('https://fonts.googleapis.com/css2?family=Fredoka+One&family=Nunito:wght@400;600;700&display=swap');
@import 'home.css';

/* 导航栏样式 */
.main-nav {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

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

.logo {
    font-family: 'Fredoka One', cursive;
    font-size: 1.8em;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo::before {
    content: '🎮';
    font-size: 0.8em;
    animation: bounce 1s ease-in-out infinite alternate;
}

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

.nav-links li {
    position: relative;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-family: 'Nunito', sans-serif;
    font-weight: 600;
    font-size: 1.1em;
    padding: 8px 15px;
    border-radius: 20px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.nav-links a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.nav-links a:hover::before {
    transform: translateX(0);
}

.nav-links a.active {
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.nav-links a:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 汉堡菜单按钮 */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 10;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: white;
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* 响应式导航栏 */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .nav-container {
        padding: 15px 20px;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
        padding: 20px;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
        opacity: 0;
        transform: translateY(-10px);
        transition: all 0.3s ease;
    }

    .nav-links.active {
        display: flex;
        flex-direction: column;
        opacity: 1;
        transform: translateY(0);
    }

    .nav-links li {
        width: 100%;
        margin: 10px 0;
    }

    .nav-links a {
        display: block;
        width: 100%;
        text-align: center;
        padding: 12px;
        border-radius: 8px;
        background: rgba(255, 255, 255, 0.1);
    }

    .nav-links a:hover {
        background: rgba(255, 255, 255, 0.2);
    }

    /* 汉堡菜单动画 */
    .menu-toggle.active span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }

    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }
}

/* 页面基础样式 */
.games-page {
    background-color: var(--background-color);
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(255, 107, 107, 0.05) 0%, transparent 20%),
        radial-gradient(circle at 90% 50%, rgba(78, 205, 196, 0.05) 0%, transparent 20%),
        radial-gradient(circle at 30% 80%, rgba(255, 230, 109, 0.05) 0%, transparent 20%);
    padding: 20px;
    min-height: 100vh;
}

/* 页面头部样式 */
.page-header {
    max-width: 1200px;
    margin: 40px auto;
    padding: 40px 20px;
    text-align: center;
}

.page-header h1 {
    font-family: 'Fredoka One', cursive;
    font-size: 2.5em;
    background: linear-gradient(45deg, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
    text-shadow: none;
}

.page-header h1::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 3px;
    background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end));
    border-radius: 2px;
}

.header-intro {
    font-family: 'Nunito', sans-serif;
    font-size: 1.2em;
    color: var(--text-color);
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}

/* 游戏目录样式 */
.games-catalog {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.catalog-intro {
    text-align: center;
    margin-bottom: 40px;
}

.catalog-intro h2 {
    font-family: 'Fredoka One', cursive;
    font-size: 2em;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.catalog-intro p {
    font-family: 'Nunito', sans-serif;
    font-size: 1.1em;
    color: var(--text-color);
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}

/* 游戏分类样式 */
.games-categories {
    max-width: 1200px;
    margin: 60px auto;
    padding: 0 20px;
}

.games-categories h2 {
    font-family: 'Fredoka One', cursive;
    font-size: 2em;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 40px;
}

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

.category-card {
    background: var(--card-background);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    border: 2px solid var(--primary-color);
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end));
}

.category-card:hover {
    transform: translateY(-5px);
}

.category-card h3 {
    font-family: 'Fredoka One', cursive;
    font-size: 1.5em;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.category-card p {
    font-family: 'Nunito', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
}

/* 游戏特性样式 */
.game-features {
    max-width: 1200px;
    margin: 60px auto;
    padding: 0 20px;
}

.game-features h2 {
    font-family: 'Fredoka One', cursive;
    font-size: 2em;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 40px;
}

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

.feature-item {
    background: var(--card-background);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.feature-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end));
}

.feature-item:hover {
    transform: translateY(-5px);
}

.feature-item h3 {
    font-family: 'Fredoka One', cursive;
    font-size: 1.3em;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.feature-item p {
    font-family: 'Nunito', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
}

/* 游戏列表样式 */
.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    padding: 20px;
}

.game-card {
    background: var(--card-background);
    border-radius: 15px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    height: 100%;
}

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

.game-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

.game-image {
    position: relative;
    width: 100%;
    padding-top: 75%; /* 4:3 aspect ratio */
    overflow: hidden;
    background: #f0f0f0;
}

.game-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.game-info {
    padding: 15px;
}

.game-info h3 {
    font-family: 'Fredoka One', cursive;
    font-size: 1.2em;
    margin: 0 0 8px 0;
    color: var(--text-color);
}

.game-info p {
    font-size: 0.9em;
    color: var(--text-color);
    margin: 0 0 12px 0;
    opacity: 0.8;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.game-stats {
    display: flex;
    gap: 15px;
    font-size: 0.85em;
    color: var(--text-color);
    opacity: 0.7;
}

.game-stats span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* 响应式布局 */
@media (max-width: 768px) {
    .game-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 15px;
        padding: 15px;
    }

    .game-info {
        padding: 12px;
    }

    .game-info h3 {
        font-size: 1.1em;
        margin-bottom: 6px;
    }

    .game-info p {
        font-size: 0.85em;
        margin-bottom: 8px;
        -webkit-line-clamp: 2;
    }

    .game-stats {
        font-size: 0.8em;
        gap: 10px;
    }
}

/* 大屏幕布局 */
@media (min-width: 1200px) {
    .game-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

/* 游戏推荐区域 */
.game-recommendations {
    position: relative;
    max-width: 1200px;
    margin: 60px auto;
    padding: 40px 20px;
    background: var(--background-color);
    border-radius: 20px;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.05);
}

.game-recommendations::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 0;
    right: 0;
    height: 40px;
    background: var(--background-color);
    border-radius: 20px 20px 0 0;
}

.game-recommendations h2 {
    font-family: 'Fredoka One', cursive;
    font-size: 2em;
    text-align: center;
    margin-bottom: 30px;
    color: var(--text-color);
    position: relative;
}

/* 游戏框架容器 */
.featured-game {
    max-width: 1200px;
    margin: 0 auto 60px;
    padding: 0 20px;
}

.game-frame-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    background: var(--card-background);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    z-index: 1;
}

#game-frame {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    background: #f0f0f0;
}

@media (max-width: 768px) {
    .game-frame-container {
        padding-bottom: 75%; /* 4:3 aspect ratio for mobile */
    }

    .featured-game {
        margin-bottom: 40px;
        padding: 0 15px;
    }
}

.game-recommendations {
    position: relative;
    max-width: 1200px;
    margin: 60px auto;
    padding: 40px 20px;
    background: var(--background-color);
    border-radius: 20px;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.05);
}

.game-recommendations::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 0;
    right: 0;
    height: 40px;
    background: var(--background-color);
    border-radius: 20px 20px 0 0;
}

.game-recommendations h2 {
    font-family: 'Fredoka One', cursive;
    font-size: 2em;
    text-align: center;
    margin-bottom: 30px;
    color: var(--text-color);
    position: relative;
}

@media (max-width: 768px) {
    .game-recommendations {
        margin: 40px auto;
        padding: 30px 15px;
    }

    .game-recommendations h2 {
        font-size: 1.6em;
        margin-bottom: 20px;
    }
}

/* 即将推出区域样式 */
.coming-soon {
    max-width: 1200px;
    margin: 60px auto;
    padding: 40px 20px;
    text-align: center;
    background: var(--card-background);
    border-radius: 20px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.coming-soon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end));
}

.coming-soon h2 {
    font-family: 'Fredoka One', cursive;
    font-size: 2em;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.coming-soon p {
    font-family: 'Nunito', sans-serif;
    font-size: 1.1em;
    color: var(--text-color);
    max-width: 800px;
    margin: 0 auto 30px;
    line-height: 1.6;
}

.newsletter-signup {
    background: rgba(255, 255, 255, 0.5);
    padding: 30px;
    border-radius: 15px;
    max-width: 600px;
    margin: 0 auto;
}

.newsletter-signup h3 {
    font-family: 'Fredoka One', cursive;
    font-size: 1.5em;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.newsletter-signup p {
    margin-bottom: 0;
}

/* 页脚样式 */
footer {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
    padding: 30px 0;
    margin-top: 60px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-nav {
    display: flex;
    gap: 20px;
}

.footer-nav a {
    color: white;
    text-decoration: none;
    font-family: 'Nunito', sans-serif;
    transition: opacity 0.3s ease;
}

.footer-nav a:hover {
    opacity: 0.8;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .page-header {
        padding: 20px;
    }

    .page-header h1 {
        font-size: 2em;
    }

    .category-grid {
        grid-template-columns: 1fr;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-nav {
        justify-content: center;
    }

    .nav-container {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .nav-links {
        flex-direction: column;
        gap: 10px;
    }

    .nav-links a {
        display: block;
        padding: 10px 20px;
    }

    .page-header h1 {
        font-size: 2em;
    }

    .header-intro {
        font-size: 1.1em;
        padding: 0 20px;
    }
}
