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

body {
    font-family: 'Segoe UI', 'Roboto', sans-serif;
    line-height: 1.6;
    color: #3a4a3a;
    background-color: #f8fff8;
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%23d8f3dc' fill-opacity='0.4' fill-rule='evenodd'/%3E%3C/svg%3E");
}

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

/* 导航栏样式 */
.navbar {
    background: linear-gradient(90deg, #4CAF50 0%, #2E7D32 100%);
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

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

.logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-size: 1rem;
    padding: 0.5rem 0;
    position: relative;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #e8f5e9;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #e8f5e9;
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

/* 汉堡菜单样式 - 默认隐藏 */
.hamburger {
    display: none;
    cursor: pointer;
}

.hamburger .bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    transition: all 0.3s ease;
    background-color: white;
    border-radius: 3px;
}

/* 英雄区域样式 */
.hero {
    text-align: center;
    padding: 4rem 0;
    background: linear-gradient(135deg, #8FBC8F 0%, #4CAF50 100%);
    color: white;
    margin: 2rem 0;
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero h2 {
    font-size: 2.8rem;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.8s ease;
}

.hero p {
    font-size: 1.3rem;
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    animation: fadeInUp 1s ease;
    font-weight: 300;
}

/* 文章分类样式 */
.article-categories {
    margin: 3rem 0;
}

.category {
    margin-bottom: 4rem;
    padding: 2rem;
    background-color: white;
    border-radius: 18px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    position: relative;
    overflow: hidden;
}

.category::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, #4CAF50 0%, #8FBC8F 50%, #4CAF50 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.category:hover::before {
    transform: scaleX(1);
}

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

.category h3 {
    font-size: 2.1rem;
    margin-bottom: 2rem;
    color: #2E7D32;
    border-bottom: 3px solid #8FBC8F;
    padding-bottom: 0.8rem;
    display: inline-block;
    animation: fadeInUp 0.6s ease;
    font-weight: 600;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(50%, 220px), 1fr));
    gap: 2rem;
    animation: fadeIn 0.8s ease;
}

/* 关于我们页面样式 */
.about-section {
    background-color: white;
    border-radius: 15px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.about-section h2 {
    font-size: 2rem;
    color: #2E7D32;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #8FBC8F;
    padding-bottom: 0.5rem;
    text-align: center;
}

.about-section h3 {
    font-size: 1.5rem;
    color: #4CAF50;
    margin: 1.5rem 0 1rem 0;
}

.about-section p {
    font-size: 1rem;
    line-height: 1.7;
    color: #555;
    margin-bottom: 1rem;
}

.about-section ul {
    margin: 1rem 0 1rem 2rem;
    font-size: 1rem;
}

.about-section li {
    margin-bottom: 0.5rem;
    color: #555;
    line-height: 1.6;
}

.about-section li::before {
    content: "✓";
    color: #4CAF50;
    font-weight: bold;
    margin-right: 0.5rem;
}

/* 文章卡片样式 */
.game-card {
    background-color: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
    cursor: pointer;
    border: 2px solid transparent;
    position: relative;
}

.game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.1) 0%, rgba(143, 188, 143, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

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

.game-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    border-color: #4CAF50;
}

.game-card img {
    width: 100%;
    height: 190px;
    object-fit: cover;
    display: block;
    border-radius: 14px 14px 0 0;
    transition: transform 0.6s ease;
}

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

.game-card-content {
    padding: 1.2rem;
    background: linear-gradient(to bottom, transparent, rgba(76, 175, 80, 0.05));
    position: relative;
    z-index: 1;
}

.game-card h4 {
    font-size: 1.2rem;
    color: #2E7D32;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.4s ease, transform 0.4s ease;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.game-card:hover h4 {
    color: #4CAF50;
    transform: translateX(5px);
}

.game-card p {
    font-size: 0.95rem;
    color: #556B2F;
    line-height: 1.6;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 页脚样式 */
.footer {
    background: linear-gradient(90deg, #4CAF50 0%, #2E7D32 100%);
    color: white;
    padding: 2rem 0;
    margin-top: 3rem;
    border-top: 3px solid #8FBC8F;
}

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

.footer p {
    margin-bottom: 1rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.footer-links {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-links a {
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.3rem 0;
}

.footer-links a:hover {
    color: #e8f5e9;
}

.footer-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: #e8f5e9;
    transition: width 0.3s ease, left 0.3s ease;
}

.footer-links a:hover::after {
    width: 100%;
    left: 0;
}

/* 详情页样式 */
.game-detail {
    margin: 2rem 0;
    background-color: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    animation: fadeInUp 0.8s ease;
}

.game-detail-info {
    text-align: center;
}

.game-detail-image {
    margin: 1.5rem auto;
    max-width: 600px;
}

.game-detail-image img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.game-detail-info h2 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    color: #2E7D32;
    line-height: 1.3;
}

.game-detail-info p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #3a4a3a;
    margin-bottom: 2rem;
}

.play-button {
    display: inline-block;
    background: linear-gradient(45deg, #4CAF50, #8FBC8F);
    color: white;
    padding: 1rem 2rem;
    text-decoration: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(76, 175, 80, 0.3);
}

.play-button:hover {
    background: linear-gradient(45deg, #2E7D32, #4CAF50);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(76, 175, 80, 0.4);
}

.back-button {
    display: inline-block;
    margin: 1rem 0;
    color: #4CAF50;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    position: relative;
    padding-left: 20px;
}

.back-button::before {
    content: '←';
    position: absolute;
    left: 0;
    transition: transform 0.3s ease;
}

.back-button:hover {
    color: #2E7D32;
}

.back-button:hover::before {
    transform: translateX(-3px);
}

/* 详情页样式 */
.game-detail {
    margin: 2rem 0;
    padding: 2rem;
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    animation: fadeInUp 0.8s ease;
}

.detail-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid #8FBC8F;
    background: linear-gradient(45deg, #f8fff8, #ffffff);
}

.detail-header h2 {
    font-size: 2.2rem;
    color: #2E7D32;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.05);
}

.detail-image-container {
    position: relative;
    margin: 2rem auto;
    max-width: 600px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.detail-image-wrapper {
    position: relative;
    padding-top: 125%; /* 4:5 比例 */
    overflow: hidden;
}

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

.detail-image-container:hover .detail-image-wrapper img {
    transform: scale(1.05);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.2));
    pointer-events: none;
}

.detail-content {
    margin-top: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8fff8, #ffffff);
    border-radius: 10px;
    border-left: 4px solid #4CAF50;
}

.content-section p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #556B2F;
    margin: 0;
    padding: 0.5rem 0;
}

.content-section p:first-child {
    font-weight: bold;
    font-size: 1.15rem;
    color: #3a4a3a;
}

.content-section p:last-child {
    margin-bottom: 0;
}
}

/* 可能喜欢的文章样式 */
.may-like {
    margin: 3rem 0;
    padding: 1.5rem;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.may-like h3 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: #2E7D32;
    border-bottom: 2px solid #8FBC8F;
    padding-bottom: 0.5rem;
    display: inline-block;
}

/* 辅助页面样式 */
.auxiliary-page {
    background-color: white;
    padding: 2rem;
    border-radius: 15px;
    margin: 2rem 0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    animation: fadeInUp 0.8s ease;
}

.auxiliary-page h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: #2E7D32;
    border-bottom: 2px solid #8FBC8F;
    padding-bottom: 0.5rem;
}

.auxiliary-page h3 {
    font-size: 1.5rem;
    margin: 1.5rem 0 1rem;
    color: #3a4a3a;
}

.auxiliary-page p {
    margin-bottom: 1rem;
    line-height: 1.7;
    color: #556B2F;
}

.auxiliary-page ul {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.auxiliary-page li {
    margin-bottom: 0.5rem;
}

/* 联系表单样式 */
.contact-form {
    margin-top: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: #2E7D32;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.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);
}

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

.submit-button {
    background: linear-gradient(45deg, #4CAF50, #8FBC8F);
    color: white;
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(76, 175, 80, 0.3);
}

.submit-button:hover {
    background: linear-gradient(45deg, #2E7D32, #4CAF50);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(76, 175, 80, 0.4);
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(min(50%, 180px), 1fr));
    }
}

@media (max-width: 768px) {
    /* 汉堡菜单显示 */
    .hamburger {
        display: block;
    }
    
    /* 导航链接隐藏 */
    .nav-links {
        position: fixed;
        left: -100%;
        top: 70px;
        gap: 0;
        flex-direction: column;
        background: linear-gradient(180deg, #4CAF50 0%, #2E7D32 100%);
        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: 1rem 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .nav-links a:last-child {
        border-bottom: none;
    }
    
    /* 英雄区域 */
    .hero h2 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
        padding: 0 1rem;
    }
    
    /* 文章详情页 */
    .game-detail {
        flex-direction: column;
        padding: 1.5rem;
    }
    
    .game-detail-image {
        max-width: 100%;
    }
    
    .game-detail-info h2 {
        font-size: 1.8rem;
    }
    
    /* 文章卡片 */
    .games-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .game-card img {
        height: 150px;
    }
    
    /* 可能喜欢的文章 - 垂直排列 */
    .may-like .games-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        padding-bottom: 1rem;
    }
    
    .may-like .game-card {
        width: 100%;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 全局a标签样式 */
a {
    color: #4CAF50;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #2E7D32;
    text-decoration: underline;
}

@media (max-width: 480px) {
    .hero h2 {
        font-size: 1.6rem;
    }
    
    .category h3,
    .may-like h3 {
        font-size: 1.5rem;
    }
    
    .game-detail {
        padding: 1rem;
    }
    
    .game-detail-info h2 {
        font-size: 1.5rem;
    }
    
    .play-button {
        width: 100%;
        text-align: center;
    }
}