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

body {
    font-family: 'Georgia', serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

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

/* 导航栏样式 - 园艺主题 */
.navbar {
    background: linear-gradient(135deg, #2d5016 0%, #4a7c59 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;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

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

.nav-links a {
    color: white;
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s;
    font-weight: 500;
}

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

/* 汉堡菜单样式 - 默认隐藏 */
.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, #6b8e23 0%, #8fbc8f 100%);
    color: white;
    margin: 2rem 0;
    border-radius: 15px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="40" r="1.5" fill="rgba(255,255,255,0.1)"/><circle cx="40" cy="80" r="1" fill="rgba(255,255,255,0.1)"/></svg>');
    animation: float 20s infinite linear;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

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

.hero p {
    font-size: 1.3rem;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* 文章分类样式 */
.category {
    margin-bottom: 3rem;
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    border-left: 5px solid #4a7c59;
}

.category h3 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: #2d5016;
    border-bottom: 2px solid #a8d5ba;
    padding-bottom: 0.5rem;
    font-weight: 600;
}

/* 首页分类预览样式 */
.category-preview {
    margin: 2rem 0;
    padding: 1.5rem;
    background-color: #fff;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    border-left: 5px solid #4a7c59;
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.category-header h3 {
    margin: 0;
    color: #2d5016;
    font-size: 1.8rem;
    font-weight: 600;
    border-bottom: 2px solid #a8d5ba;
    padding-bottom: 0.5rem;
}

.view-more {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: #4a7c59;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.view-more:hover {
    background-color: #2d5016;
    text-decoration: none;
}

/* 预览区域的网格布局 */
.plants-preview,
.design-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

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

/* 文章卡片样式 - 园艺主题 */
.game-card {
    background-color: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    border: 1px solid #e8f5e8;
}

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

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

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

.game-card-content {
    padding: 1.2rem;
}

.game-card h4 {
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
    color: #2d5016;
    font-weight: 600;
    line-height: 1.4;
}

.game-card p {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 季节性园艺提示样式 */
.seasonal-tips {
    margin: 2rem 0;
    padding: 1.5rem;
    background-color: #fff;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    border-left: 5px solid #6b8e23;
}

.section-header {
    margin-bottom: 1.5rem;
}

.section-header h3 {
    color: #2d5016;
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.section-header p {
    color: #666;
    font-size: 1rem;
}

.tips-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.tip-card {
    display: flex;
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid #e8f5e8;
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.tip-icon {
    font-size: 2.5rem;
    margin-right: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tip-text h4 {
    color: #2d5016;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
    font-weight: 600;
}

.tip-text p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* 专家园艺技巧样式 */
.expert-tips {
    margin: 2rem 0;
    padding: 1.5rem;
    background-color: #fff;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    border-left: 5px solid #4a7c59;
}

.expert-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.technique-card {
    background-color: #f0f7ed;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid #a8d5ba;
    transition: transform 0.3s;
}

.technique-card:hover {
    transform: translateY(-3px);
}

.technique-card h4 {
    color: #2d5016;
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.technique-card p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* 热门植物展示样式 */
.popular-plants {
    margin: 2rem 0;
    padding: 1.5rem;
    background-color: #fff;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    border-left: 5px solid #8fbc8f;
}

.plants-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.plant-card {
    background-color: #f5f9f2;
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    border: 1px solid #e8f5e8;
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.plant-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.plant-card h4 {
    color: #2d5016;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
    font-weight: 600;
}

.plant-card p {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* 园艺问答精选样式 */
.garden-faq {
    margin: 2rem 0;
    padding: 1.5rem;
    background-color: #fff;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    border-left: 5px solid #556b2f;
}

.faq-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.faq-item {
    background-color: #f9f7f0;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid #e8f5e8;
    transition: transform 0.3s;
}

.faq-item:hover {
    transform: translateY(-3px);
}

.faq-item h4 {
    color: #2d5016;
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.faq-item p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* 详情页样式 */
.game-detail {
    background-color: white;
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.game-detail-info h2 {
    color: #2d5016;
    margin-bottom: 1.5rem;
    font-size: 2.2rem;
    font-weight: 600;
}

.game-detail-image {
    margin-bottom: 2rem;
    text-align: center;
}

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

.game-detail-info p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #444;
    text-align: justify;
}

.back-button {
    display: inline-block;
    margin-bottom: 2rem;
    padding: 0.8rem 1.5rem;
    background: #4a7c59;
    color: white;
    text-decoration: none;
    border-radius: 25px;
    transition: background 0.3s;
    font-weight: 500;
}

.back-button:hover {
    background: #2d5016;
}

.may-like {
    margin-top: 3rem;
    padding: 2rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.may-like h3 {
    color: #2d5016;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-weight: 600;
}

/* 页脚样式 - 园艺主题 */
.footer {
    background: linear-gradient(135deg, #2d5016 0%, #1a3008 100%);
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    color: #a8d5ba;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.footer-section p {
    line-height: 1.6;
    color: #e8f5e8;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-links a {
    color: #e8f5e8;
    text-decoration: none;
    transition: color 0.3s;
}

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

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #4a7c59;
    color: #a8d5ba;
}

/* 联系页面样式 */
.contact-container {
    padding: 40px 0;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

@media (max-width: 768px) {
    .contact-content {
        grid-template-columns: 1fr;
    }
}

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

.contact-form h3 {
    color: #2d3b36;
    margin-bottom: 20px;
    font-size: 1.5rem;
    text-align: center;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #2d3b36;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

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

.submit-btn {
    background-color: #4a7c59;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.submit-btn:hover {
    background-color: #3e6b4c;
}

.contact-info {
    background-color: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 5px solid #4a7c59;
}

.contact-info h3 {
    color: #2d3b36;
    margin-bottom: 20px;
    font-size: 1.5rem;
    text-align: center;
}

.info-item {
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
}

.info-item i {
    color: #4a7c59;
    margin-right: 15px;
    font-size: 1.2rem;
    margin-top: 3px;
}

.info-item p {
    margin: 0;
    color: #555;
}

.social-links {
    margin-top: 30px;
    text-align: center;
}

.social-links a {
    color: #4a7c59;
    font-size: 1.5rem;
    margin: 0 10px;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: #3e6b4c;
}

/* 服务协议和隐私政策页面样式 */
.terms-container,
.privacy-container {
    padding: 40px 0;
}

.terms-content,
.privacy-content {
    max-width: 900px;
    margin: 0 auto;
}

.terms-content .card,
.privacy-content .card {
    background-color: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 5px solid #4a7c59;
}

.terms-content h3,
.privacy-content h3 {
    color: #2d3b36;
    margin-bottom: 25px;
    font-size: 1.8rem;
    text-align: center;
    text-decoration: underline;
    text-decoration-color: #4a7c59;
    text-decoration-thickness: 3px;
    padding-bottom: 10px;
}

.terms-section,
.privacy-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.terms-section:last-child,
.privacy-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.terms-section h4,
.privacy-section h4 {
    color: #4a7c59;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.terms-section p,
.privacy-section p {
    margin-bottom: 15px;
    line-height: 1.7;
    color: #555;
}

.terms-section ul,
.privacy-section ul {
    margin-bottom: 15px;
    padding-left: 20px;
}

.terms-section li,
.privacy-section li {
    margin-bottom: 10px;
    line-height: 1.7;
    color: #555;
}

.terms-section a,
.privacy-section a {
    color: #4a7c59;
    text-decoration: none;
}

.terms-section a:hover,
.privacy-section a:hover {
    text-decoration: underline;
}

/* 响应式设计 */
@media screen and (max-width: 768px) {
    .nav-links {
        position: fixed;
        left: -100%;
        top: 5rem;
        flex-direction: column;
        background-color: #2d5016;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
    }

    .nav-links.active {
        left: 0;
    }

    .nav-links a {
        font-size: 1.1rem;
        padding: 0.5rem 0;
    }

    .hamburger {
        display: block;
    }

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

    .hero h2 {
        font-size: 2.2rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    .category {
        padding: 1.5rem;
        margin-bottom: 2rem;
    }

    .category h3 {
        font-size: 1.5rem;
    }

    .games-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .game-card img {
        height: 180px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .game-detail {
        padding: 1.5rem;
    }

    .game-detail-info h2 {
        font-size: 1.8rem;
    }
    
    .category-preview {
        padding: 15px;
    }
    
    .terms-content .card,
    .privacy-content .card {
        padding: 20px;
    }
    
    .terms-content h3,
    .privacy-content h3 {
        font-size: 1.5rem;
    }
    
    .terms-section h4,
    .privacy-section h4 {
        font-size: 1.2rem;
    }
}

@media screen and (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .hero {
        padding: 3rem 0;
    }

    .hero h2 {
        font-size: 1.8rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .category {
        padding: 1rem;
    }

    .game-card-content {
        padding: 1rem;
    }

    .game-card h4 {
        font-size: 1.1rem;
    }

    .game-card p {
        font-size: 0.9rem;
    }
}

/* 标签样式 */
.game-card .tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-top: 0.8rem;
}

.game-card .tag {
    background: #e8f5e8;
    color: #2d5016;
    padding: 0.2rem 0.6rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* 加载动画 */
.loading {
    text-align: center;
    padding: 2rem;
    color: #4a7c59;
    font-size: 1.1rem;
}

.loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #e8f5e8;
    border-top: 3px solid #4a7c59;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}