/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.7;
    color: #2c3e50;
    background-color: #f0f9f0;
    background-image: 
        radial-gradient(#4CAF50 1px, transparent 1px),
        radial-gradient(#4CAF50 1px, transparent 1px);
    background-size: 50px 50px;
    background-position: 0 0, 25px 25px;
    background-attachment: fixed;
}

/* 容器样式 */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
}

/* 导航栏样式 */
.navbar {
    background-color: #2e7d32;
    color: white;
    padding: 1.2rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 15px rgba(0,0,0,0.15);
    border-bottom: 3px solid #4CAF50;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 2rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    position: relative;
    padding-left: 30px;
}

.logo h1::before {
    content: '🌿';
    position: absolute;
    left: 0;
    top: 0;
    font-size: 1.8rem;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-size: 1rem;
    transition: all 0.3s;
    position: relative;
    padding: 5px 10px;
    border-radius: 4px;
}

.nav-links a:hover {
    background-color: rgba(255,255,255,0.1);
    transform: translateY(-2px);
}

/* 汉堡菜单样式 - 默认隐藏 */
.hamburger {
    display: none;
    cursor: pointer;
}

.hamburger .bar {
    display: block;
    width: 28px;
    height: 4px;
    margin: 6px auto;
    transition: all 0.3s ease;
    background-color: white;
    border-radius: 2px;
}

/* 英雄区域样式 */
.hero {
    text-align: center;
    padding: 4rem 0;
    background: linear-gradient(135deg, #2e7d32 0%, #4CAF50 100%);
    color: white;
    margin: 2rem 0;
    border-radius: 0;
    box-shadow: 0 8px 30px rgba(46, 125, 50, 0.3);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        repeating-linear-gradient(45deg, transparent, transparent 20px, rgba(255,255,255,0.05) 20px, rgba(255,255,255,0.05) 40px),
        repeating-linear-gradient(-45deg, transparent, transparent 20px, rgba(255,255,255,0.05) 20px, rgba(255,255,255,0.05) 40px);
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero h2 {
    font-size: 2.8rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    position: relative;
    display: inline-block;
    padding: 0 20px;
}

.hero h2::before, .hero h2::after {
    content: '🍃';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2rem;
}

.hero h2::before {
    left: 0;
}

.hero h2::after {
    right: 0;
}

.hero p {
    font-size: 1.3rem;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* 游戏分类样式 */
.game-categories {
    margin: 2rem 0;
}

.category {
    margin-bottom: 3.5rem;
    background-color: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border-left: 5px solid #4CAF50;
}

.category h3 {
    font-size: 2.1rem;
    margin-bottom: 1.5rem;
    color: #2e7d32;
    font-weight: 700;
    position: relative;
    padding-left: 35px;
    display: inline-block;
}

.category h3::before {
    content: '🎮';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.8rem;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(50%, 220px), 1fr));
    gap: 2rem;
}

/* 游戏卡片样式 */
.game-card {
    background-color: white;
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
    cursor: pointer;
    border: 2px solid #e8f5e9;
    position: relative;
}

.game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, #4CAF50, #8FBC8F);
}

.game-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 30px rgba(46, 125, 50, 0.2);
    border-color: #4CAF50;
}

.game-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.game-card:hover img {
    transform: scale(1.08);
}

.game-card-content {
    padding: 1rem;
    background-color: #f8fff8;
}

.game-card h4 {
    font-size: 1.3rem;
    color: #2e7d32;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.game-card p {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.5;
}

/* 页脚样式 */
.footer {
    background-color: #2e7d32;
    color: white;
    padding: 3rem 0;
    margin-top: 3rem;
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        repeating-linear-gradient(45deg, transparent, transparent 20px, rgba(255,255,255,0.05) 20px, rgba(255,255,255,0.05) 40px),
        repeating-linear-gradient(-45deg, transparent, transparent 20px, rgba(255,255,255,0.05) 20px, rgba(255,255,255,0.05) 40px);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    z-index: 1;
}

.footer p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.footer-links a {
    color: white;
    text-decoration: none;
    transition: all 0.3s;
    padding: 5px 15px;
    border-radius: 20px;
    background-color: rgba(255,255,255,0.1);
}

.footer-links a:hover {
    background-color: rgba(255,255,255,0.2);
    transform: translateY(-2px);
}

.footer-badge {
    background-color: #4CAF50;
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
    font-weight: bold;
    position: relative;
    overflow: hidden;
}

.footer-badge::before {
    content: '🌱';
    margin-right: 5px;
}

/* 详情页样式 */
.game-detail {
    display: flex;
    gap: 3rem;
    margin: 3rem 0;
    background-color: white;
    padding: 3rem;
    border-radius: 0;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-left: 8px solid #4CAF50;
    position: relative;
}

.game-detail::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23f1f8e9" opacity="0.5"><path d="M7 11l5-5 5 5z"/></svg>');
    background-repeat: no-repeat;
    background-position: center;
}

.game-detail-image {
    flex: 1;
    max-width: 450px;
    border: 3px solid #e8f5e9;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.game-detail-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
}

.game-detail-info {
    flex: 2;
}

.game-detail-info h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: #2e7d32;
    font-weight: 800;
    position: relative;
    display: inline-block;
}

.game-detail-info h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #4CAF50, transparent);
}

.game-detail-info p {
    font-size: 1.15rem;
    line-height: 1.7;
    color: #555;
    margin-bottom: 2.5rem;
    padding-top: 1rem;
}

.play-button {
    display: inline-block;
    background: linear-gradient(135deg, #4CAF50, #8FBC8F);
    color: white;
    padding: 1.3rem 2.5rem;
    text-decoration: none;
    border-radius: 0;
    font-size: 1.3rem;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.3);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.play-button::before {
    content: '▶';
    margin-right: 10px;
    font-size: 1.2rem;
}

.play-button:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(76, 175, 80, 0.4);
    background: linear-gradient(135deg, #388E3C, #4CAF50);
}

.back-button {
    display: inline-block;
    margin: 1.5rem 0;
    color: #2e7d32;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    font-size: 1.1rem;
    padding: 8px 15px;
    border: 2px solid #4CAF50;
    border-radius: 20px;
}

.back-button:hover {
    background-color: #4CAF50;
    color: white;
    transform: translateX(-5px);
}

/* 可能喜欢的游戏样式 */
.may-like {
    margin: 4rem 0;
    background-color: white;
    padding: 2rem;
    border-radius: 0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border-left: 5px solid #4CAF50;
}

.may-like h3 {
    font-size: 2.1rem;
    margin-bottom: 2rem;
    color: #2e7d32;
    font-weight: 700;
    position: relative;
    display: inline-block;
    padding-left: 35px;
}

.may-like h3::before {
    content: '❤️';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.8rem;
}

/* 辅助页面样式 */
.auxiliary-page {
    background-color: white;
    padding: 3rem;
    border-radius: 0;
    margin: 3rem 0;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-left: 8px solid #4CAF50;
    position: relative;
}

.auxiliary-page::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23f1f8e9" opacity="0.5"><path d="M7 11l5-5 5 5z"/></svg>');
    background-repeat: no-repeat;
    background-position: center;
}

.auxiliary-page h2 {
    font-size: 2.3rem;
    margin-bottom: 1.5rem;
    color: #2e7d32;
    font-weight: 800;
    position: relative;
    display: inline-block;
}

.auxiliary-page h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #4CAF50, transparent);
}

.auxiliary-page h3 {
    font-size: 1.7rem;
    margin: 2rem 0 1.5rem;
    color: #2e7d32;
    font-weight: 700;
    position: relative;
    display: inline-block;
    padding-left: 25px;
}

.auxiliary-page h3::before {
    content: '•';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2rem;
    color: #4CAF50;
}

.auxiliary-page p {
    margin-bottom: 1.2rem;
    line-height: 1.7;
    font-size: 1.05rem;
}

.auxiliary-page ul {
    margin-left: 2rem;
    margin-bottom: 1.5rem;
    padding-left: 1rem;
}

.auxiliary-page li {
    margin-bottom: 0.8rem;
    line-height: 1.6;
    position: relative;
    padding-left: 15px;
}

.auxiliary-page li::before {
    content: '🌱';
    position: absolute;
    left: -15px;
    top: 2px;
    font-size: 0.8rem;
}

/* 联系表单样式 */
.contact-form {
    margin-top: 2rem;
}

.form-group {
    margin-bottom: 2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.8rem;
    font-weight: bold;
    color: #2e7d32;
    font-size: 1.1rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e8f5e9;
    border-radius: 0;
    font-size: 1.05rem;
    transition: all 0.3s ease;
    background-color: #f8fff8;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
    background-color: white;
}

.form-group textarea {
    resize: vertical;
    min-height: 180px;
}

.submit-button {
    background: linear-gradient(135deg, #4CAF50, #8FBC8F);
    color: white;
    padding: 1rem 2.5rem;
    border: none;
    border-radius: 0;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.submit-button::before {
    content: '✓';
    margin-right: 10px;
    font-size: 1.2rem;
}

.submit-button:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(76, 175, 80, 0.4);
    background: linear-gradient(135deg, #388E3C, #4CAF50);
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(min(50%, 200px), 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    /* 汉堡菜单显示 */
    .hamburger {
        display: block;
    }
    
    /* 导航链接隐藏 */
    .nav-links {
        position: fixed;
        left: -100%;
        top: 70px;
        gap: 0;
        flex-direction: column;
        background-color: #2e7d32;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        padding: 1rem 0;
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    }
    
    .nav-links.active {
        left: 0;
    }
    
    .nav-links a {
        padding: 1.2rem 0;
        border-radius: 0;
    }
    
    /* 英雄区域 */
    .hero h2 {
        font-size: 2.2rem;
        padding: 0 15px;
    }
    
    .hero h2::before, .hero h2::after {
        font-size: 1.5rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    /* 游戏详情页 */
    .game-detail {
        flex-direction: column;
        padding: 2rem;
        gap: 2rem;
    }
    
    .game-detail-image {
        max-width: 100%;
    }
    
    .game-detail-info h2 {
        font-size: 2rem;
    }
    
    /* 游戏卡片 */
    .games-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .game-card img {
        height: 160px;
    }
    
    /* 可能喜欢的游戏 - 垂直排列 */
    .may-like .games-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        padding-bottom: 1rem;
    }
    
    .may-like .game-card {
        width: 100%;
    }
    
    /* 辅助页面 */
    .auxiliary-page {
        padding: 2rem;
    }
    
    .auxiliary-page h2 {
        font-size: 2rem;
    }
    
    .auxiliary-page h3 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .hero h2 {
        font-size: 1.8rem;
        padding: 0 10px;
    }
    
    .hero h2::before, .hero h2::after {
        font-size: 1.2rem;
    }
    
    .category h3, .may-like h3 {
        font-size: 1.7rem;
        padding-left: 30px;
    }
    
    .category h3::before, .may-like h3::before {
        font-size: 1.5rem;
    }
    
    .game-detail {
        padding: 1.5rem;
    }
    
    .game-detail-info h2 {
        font-size: 1.8rem;
    }
    
    .play-button {
        width: 100%;
        text-align: center;
        padding: 1rem 2rem;
    }
    
    .games-grid {
        grid-template-columns: 1fr;
    }
    
    .may-like .games-grid {
        grid-template-columns: 1fr;
    }
}