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

body {
    font-family: 'Segoe UI', 'Roboto', sans-serif;
    line-height: 1.6;
    color: #2d3c39;
    background-color: #f8f9f5;
    background-image: 
        radial-gradient(#e6f0ed 1px, transparent 1px),
        radial-gradient(#e6f0ed 1px, transparent 1px);
    background-size: 50px 50px;
    background-position: 0 0, 25px 25px;
}

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

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

::-webkit-scrollbar-thumb {
    background: #64a764;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #4a834a;
}

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

/* 环保主题导航栏样式 */
.navbar {
    background: linear-gradient(135deg, #0d47a1 0%, #1a237e 50%, #004d40 100%);
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
}

.navbar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #00bcd4, #4caf50, #8bc34a, #cddc39, #00bcd4);
    background-size: 200% 100%;
    animation: ecoWave 3s ease-in-out infinite;
}

@keyframes ecoWave {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

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

.logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 1px;
}

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

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

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

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: #a5d6a7;
    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;
}

/* 环保主题英雄区域样式 */
.hero {
    text-align: center;
    padding: 4rem 0;
    background: linear-gradient(135deg, #006064 0%, #004d40 50%, #00251a 100%);
    color: white;
    margin: 2rem 0;
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(76, 175, 80, 0.2);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(0, 188, 212, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(76, 175, 80, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(139, 195, 74, 0.1) 0%, transparent 50%);
    animation: ecoFloat 8s ease-in-out infinite;
}

@keyframes ecoFloat {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-10px) rotate(1deg); }
    66% { transform: translateY(5px) rotate(-1deg); }
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(255, 255, 255, 0.05) 10px,
        rgba(255, 255, 255, 0.05) 20px
    );
    animation: moveBackground 60s linear infinite;
}

@keyframes moveBackground {
    0% { transform: translate(0, 0); }
    100% { transform: translate(100px, 100px); }
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.hero p {
    font-size: 1.2rem;
    position: relative;
    z-index: 1;
}

/* 环保主题文章分类样式 */
.article-categories {
    margin: 2rem 0;
}

.category {
    margin-bottom: 3rem;
    background: linear-gradient(135deg, #e0f2f1 0%, #b2dfdb 100%);
    padding: 1.5rem;
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 2px solid #004d40;
    position: relative;
    overflow: hidden;
}

.category::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, #00bcd4, #4caf50, #8bc34a, #cddc39, #ffeb3b, #00bcd4);
    background-size: 300% 100%;
    animation: ecoFlow 4s linear infinite;
}

@keyframes ecoFlow {
    0% { background-position: 0% 50%; }
    100% { background-position: 300% 50%; }
}

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

.category h3 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: #1b5e20;
    border-bottom: 2px solid #4caf50;
    padding-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(50%, 200px), 1fr));
    gap: 1.5rem;
}

/* 环保主题文章卡片样式 */
.game-card {
    background: linear-gradient(135deg, #ffffff 0%, #f1f8e9 100%);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0, 77, 64, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    border: 2px solid #b2dfdb;
    position: relative;
    overflow: hidden;
}

.game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, transparent, #00bcd4, #4caf50, #8bc34a, transparent);
    transition: left 0.5s ease;
}

.game-card:hover {
    transform: translateY(-10px) rotate(1deg);
    box-shadow: 0 20px 40px rgba(0, 77, 64, 0.25);
}

.game-card:hover::before {
    left: 100%;
}

.game-card img {
    width: 100%;
    height: 170px;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

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

.game-card-content {
    padding: 1rem;
    background: linear-gradient(180deg, white 0%, #f1f8e9 100%);
}

.game-card h4 {
    font-size: 1.1rem;
    color: #1b5e20;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 600;
}

.game-card p {
    font-size: 0.9rem;
    color: #558b2f;
    line-height: 1.4;
}

/* 环保主题页脚样式 */
.footer {
    background: linear-gradient(135deg, #006064 0%, #004d40 50%, #00251a 100%);
    color: white;
    padding: 2rem 0;
    margin-top: 3rem;
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, #00bcd4, #4caf50, #8bc34a, #cddc39, #ffeb3b, #00bcd4);
    background-size: 200% 100%;
    animation: ecoFooterFlow 4s linear infinite;
}

@keyframes ecoFooterFlow {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    z-index: 1;
}

.footer p {
    margin-bottom: 1rem;
    opacity: 0.9;
}

.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;
    padding: 0.3rem 0;
    position: relative;
}

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

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

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

/* 环保主题详情页样式 */
.game-detail {
    margin: 2rem 0;
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    padding: clamp(2rem, 6vw, 3rem);
    border-radius: 24px;
    box-shadow: 0 12px 36px rgba(0, 77, 64, 0.15);
    border: 3px solid #004d40;
    position: relative;
    overflow: hidden;
}

.game-detail::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, #00bcd4, #4caf50, #8bc34a, #cddc39, #ffeb3b, #00bcd4);
    background-size: 200% 100%;
    animation: ecoDetailFlow 3s linear infinite;
}

@keyframes ecoDetailFlow {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

.game-detail::after {
    content: '';
    position: absolute;
    top: 20px;
    right: 20px;
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, rgba(0, 188, 212, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    animation: ecoPulse 4s ease-in-out infinite;
}

@keyframes ecoPulse {
    0%, 100% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.2); opacity: 0.1; }
}

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

.game-detail-image {
    margin: 2rem auto;
    max-width: 650px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 77, 64, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 3px solid #4caf50;
}

.game-detail-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
    transition: transform 0.5s ease;
    border-radius: 13px;
}

.game-detail-image:hover {
    transform: scale(1.02);
    box-shadow: 0 12px 35px rgba(0, 77, 64, 0.3);
}

.game-detail-image:hover img {
    transform: scale(1.02);
}

.game-detail-info h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: #004d40;
    line-height: 1.3;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    display: inline-block;
}

.game-detail-info h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, #00bcd4, #4caf50, #8bc34a);
    border-radius: 2px;
}

.game-detail-info p {
    font-size: 1.2rem;
    line-height: 1.7;
    color: #006064;
    margin-bottom: 2rem;
    text-align: left;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

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

.play-button:hover {
    background: linear-gradient(135deg, #388e3c 0%, #2e7d32 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px 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: 1.5rem;
}

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

/* 环保主题相关文章样式 */
.may-like {
    margin: 4rem 0;
    background: linear-gradient(135deg, #e1f5fe 0%, #b3e5fc 100%);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 96, 100, 0.15);
    position: relative;
    overflow: hidden;
}

.may-like h3 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: #004d40;
    text-align: center;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.5rem 2rem;
    background: linear-gradient(135deg, #00bcd4, #4caf50);
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0, 188, 212, 0.3);
}

/* 环保主题辅助页面样式 */
.auxiliary-page {
    background: linear-gradient(135deg, #e0f7fa 0%, #b2ebf2 100%);
    padding: 2.5rem;
    border-radius: 20px;
    margin: 2rem 0;
    box-shadow: 0 10px 30px rgba(0, 96, 100, 0.15);
    position: relative;
    overflow: hidden;
    border: 2px solid #006064;
}

.auxiliary-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    height: 100%;
    background: linear-gradient(to bottom, #00bcd4, #4caf50, #8bc34a, #cddc39);
    animation: ecoGradient 4s ease-in-out infinite;
}

@keyframes ecoGradient {
    0%, 100% { background-position: 0% 0%; }
    50% { background-position: 0% 100%; }
}

.auxiliary-page h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: #1b5e20;
    border-bottom: 2px solid #e8f5e9;
    padding-bottom: 0.8rem;
    margin-left: 1rem;
}

.auxiliary-page h3 {
    font-size: 1.5rem;
    margin: 1.5rem 0 1rem;
    color: #2e7d32;
    margin-left: 1rem;
}

.auxiliary-page p {
    margin-bottom: 1rem;
    line-height: 1.8;
    color: #33691e;
    margin-left: 1rem;
}

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

.auxiliary-page li {
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 0.5rem;
    color: #33691e;
}

.auxiliary-page li::marker {
    color: #4caf50;
    font-size: 1.2em;
}

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

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

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

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

.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: 150px;
}

.submit-button {
    background: linear-gradient(135deg, #4caf50 0%, #388e3c 100%);
    color: white;
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.submit-button:hover {
    background: linear-gradient(135deg, #388e3c 0%, #2e7d32 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.submit-button:active {
    transform: translateY(0);
}

/* 响应式设计 */
@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, #1b5e20 0%, #2e7d32 100%);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        padding: 1rem 0;
        box-shadow: 0 10px 20px 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;
    }
    
    /* 文章详情页 */
    .game-detail {
        flex-direction: column;
        padding: 1.5rem;
        border-left: none;
        border-top: 5px solid #4caf50;
    }
    
    .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%;
    }
    
    /* 分类样式调整 */
    .category {
        padding: 1rem;
    }
    
    .category h3 {
        font-size: 1.5rem;
    }
}

@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;
    }
    
    /* 文章卡片单列显示 */
    .games-grid,
    .may-like .games-grid {
        grid-template-columns: 1fr;
    }
    
    /* 辅助页面调整 */
    .auxiliary-page h2 {
        font-size: 1.8rem;
    }
    
    .auxiliary-page h3 {
        font-size: 1.3rem;
    }
    
    /* 汉堡菜单动画 */
    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    
    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
}

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

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

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

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

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

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