/* 颜色变量 - 使用您提供的颜色代码 */
:root {
    --primary-green: #bbf201;  /* 植物绿色 */
    --dark-green: #8bc34a;
    --light-green: #dcedc8;
    --zombie-gray: #91928a;    /* 僵尸灰色 */
    --zombie-dark: #616161;
    --sun-yellow: #ffd740;
    --blood-red: #d32f2f;
    --light-bg: #f9fbe7;
    --card-bg: #ffffff;
    --text-color: #333;
    --header-bg: #8bc34a;
    --footer-bg: #616161;
}

/* 暗色模式变量 */
.dark-mode {
    --primary-green: #bbf201;
    --dark-green: #689f38;
    --light-green: #2e3b23;
    --zombie-gray: #91928a;
    --zombie-dark: #424242;
    --sun-yellow: #ffd740;
    --blood-red: #d32f2f;
    --light-bg: #121212;
    --card-bg: #1e1e1e;
    --text-color: #e0e0e0;
    --header-bg: #2e3b23;
    --footer-bg: #424242;
}

/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--light-bg);
    color: var(--text-color);
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 游戏图标 */
.game-icon {
    width: 32px;
    height: 32px;
    margin-right: 10px;
    border-radius: 5px;
}

/* 暗色模式切换按钮 */
.theme-toggle {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1001;
}

.theme-btn {
    display: flex;
    align-items: center;
    background-color: var(--card-bg);
    color: var(--text-color);
    border: 2px solid var(--primary-green);
    padding: 8px 16px;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.theme-btn:hover {
    background-color: var(--primary-green);
    color: #333;
}

.theme-btn i {
    margin-right: 8px;
}

/* 语言切换器 */
.language-switcher {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1001;
    display: flex;
    background-color: var(--card-bg);
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.lang-btn {
    padding: 8px 16px;
    background: none;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    color: var(--text-color);
}

.lang-btn.active {
    background-color: var(--primary-green);
    color: #333;
}

.lang-btn:hover:not(.active) {
    background-color: rgba(187, 242, 1, 0.2);
}

/* 导航栏样式 */
header {
    background-color: var(--header-bg);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    display: flex;
    align-items: center;
    color: white;
    font-size: 24px;
    font-weight: bold;
}

.logo i {
    margin-right: 10px;
    color: var(--sun-yellow);
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 30px;
    position: relative;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 18px;
    transition: color 0.3s;
    position: relative;
    padding: 5px 0;
}

.nav-links a:hover {
    color: var(--sun-yellow);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background-color: var(--sun-yellow);
    transition: width 0.3s;
}

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

.nav-links a.active {
    color: var(--sun-yellow);
}

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

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

/* 主要区域样式 */
main {
    margin-top: 80px;
}

section {
    padding: 80px 0;
}

h1 {
    font-size: 48px;
    margin-bottom: 20px;
    color: var(--dark-green);
}

h2 {
    font-size: 36px;
    margin-bottom: 30px;
    color: var(--dark-green);
    text-align: center;
    position: relative;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--primary-green);
}

h3 {
    font-size: 24px;
    margin-bottom: 15px;
    color: var(--dark-green);
}

p {
    font-size: 18px;
    margin-bottom: 20px;
}

/* 英雄区域 */
.hero {
    background: linear-gradient(rgba(187, 242, 1, 0.8), rgba(139, 195, 74, 0.8)), url('images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    color: white;
    text-align: center;
    padding: 120px 0;
    border-radius: 0 0 20px 20px;
}

.hero h1 {
    color: white;
    font-size: 56px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero p {
    font-size: 22px;
    max-width: 800px;
    margin: 0 auto 30px;
}

.btn {
    display: inline-block;
    background-color: var(--sun-yellow);
    color: #333;
    padding: 14px 32px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    font-size: 18px;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn:hover {
    background-color: #ffc107;
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.25);
}

/* 简介和特性区域 */
.intro-content, .features-content {
    display: flex;
    align-items: center;
    gap: 50px;
    margin-top: 40px;
}

.intro-text, .features-text {
    flex: 1;
}

.intro-image, .features-image {
    flex: 1;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.intro-image img, .features-image img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
}

.features-list {
    padding-left: 20px;
    margin-bottom: 20px;
}

.features-list li {
    margin-bottom: 10px;
    font-size: 18px;
}

.section-features {
    background-color: #f5fbf2;
}

.dark-mode .section-features {
    background-color: #1a1a1a;
}

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

.feature-card {
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    border-top: 5px solid var(--primary-green);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.feature-card i {
    font-size: 40px;
    color: var(--primary-green);
    margin-bottom: 20px;
}

/* 图鉴区域 - 重新设计为水平滚动 */
.pedia-section {
    background-color: #f0f7ed;
    border-radius: 20px;
    padding: 60px 40px;
}

.dark-mode .pedia-section {
    background-color: #1a1a1a;
}

.section-zombies {
    background-color: #f8f8f8;
}

.dark-mode .section-zombies {
    background-color: #222222;
}

.pedia-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.pedia-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.filter-btn {
    background-color: var(--card-bg);
    border: 2px solid var(--primary-green);
    color: var(--dark-green);
    padding: 10px 20px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.filter-btn.active, .filter-btn:hover {
    background-color: var(--primary-green);
    color: #333;
}

.pedia-instruction {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: rgba(187, 242, 1, 0.1);
    padding: 10px 15px;
    border-radius: 10px;
    font-size: 14px;
    color: var(--dark-green);
}

.pedia-instruction i {
    color: var(--primary-green);
}

/* 水平滚动容器 */
.pedia-scroll-container {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 20px 0;
    scroll-behavior: smooth;
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

/* 隐藏滚动条但保持功能 */
.pedia-scroll-container::-webkit-scrollbar {
    display: none; /* Chrome, Safari and Opera */
}

.pedia-scroll-content {
    display: flex;
    gap: 30px;
    padding: 10px;
    width: max-content;
}

/* 水平滚动卡片 */
.pedia-card {
    background-color: var(--card-bg);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s;
    min-width: 280px;
    max-width: 280px;
    flex-shrink: 0;
}

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

.pedia-img {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 20px;
}

.pedia-img img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* 改为contain以保持SVG完整显示 */
    transition: transform 0.5s;
}

/* SVG图片特殊样式 */
.pedia-img svg, .pedia-img img[src$=".svg"] {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
}

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

.plant-img {
    background-color: var(--light-green);
}

.zombie-img {
    background-color: #f0f0f0;
}

.dark-mode .zombie-img {
    background-color: #2a2a2a;
}

.pedia-info {
    padding: 25px;
}

.pedia-name {
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 10px;
    color: var(--dark-green);
}

.pedia-name-en {
    font-size: 16px;
    color: #666;
    font-style: italic;
    margin-bottom: 8px;
}

.dark-mode .pedia-name-en {
    color: #aaa;
}

.pedia-type {
    display: inline-block;
    background-color: var(--light-green);
    color: var(--dark-green);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 14px;
    margin-bottom: 15px;
    font-weight: 500;
}

.zombie-type {
    background-color: #e0e0e0;
    color: var(--zombie-dark);
}

.dark-mode .zombie-type {
    background-color: #3a3a3a;
    color: #ccc;
}

.pedia-desc {
    font-size: 16px;
    color: #555;
}

.dark-mode .pedia-desc {
    color: #ccc;
}

/* 滚动控制 */
.scroll-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
}

.scroll-btn {
    background-color: var(--card-bg);
    border: 2px solid var(--primary-green);
    color: var(--primary-green);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    transition: all 0.3s;
}

.scroll-btn:hover {
    background-color: var(--primary-green);
    color: #333;
}

.scroll-position {
    background-color: var(--card-bg);
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 600;
    color: var(--dark-green);
    min-width: 80px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* 作者网站链接 */
.author-link {
    margin: 20px 0;
}

.author-btn {
    display: inline-flex;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    padding: 10px 20px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.author-btn:hover {
    background-color: var(--sun-yellow);
    color: #333;
    transform: translateY(-3px);
}

.author-btn i {
    margin-right: 8px;
}

/* 页脚 */
footer {
    background-color: var(--footer-bg);
    color: white;
    padding: 60px 0 30px;
    text-align: center;
    transition: background-color 0.3s;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.footer-section {
    flex: 1;
    min-width: 250px;
    margin-bottom: 30px;
    padding: 0 20px;
}

.footer-section h3 {
    color: white;
    margin-bottom: 25px;
    font-size: 22px;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
    position: relative;
}

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

.footer-links a:hover {
    color: var(--sun-yellow);
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    font-size: 20px;
    transition: all 0.3s;
}

.social-icons a:hover {
    background-color: var(--sun-yellow);
    color: #333;
    transform: translateY(-5px);
}

.copyright {
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 16px;
    color: #aaaaaa;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .intro-content, .features-content {
        flex-direction: column;
    }
    
    .hero h1 {
        font-size: 42px;
    }
    
    h1 {
        font-size: 36px;
    }
    
    h2 {
        font-size: 30px;
    }
    
    .pedia-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 768px) {
    .theme-toggle {
        top: 15px;
        left: 15px;
    }
    
    .language-switcher {
        top: 15px;
        right: 15px;
    }
    
    .nav-links {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background-color: var(--header-bg);
        flex-direction: column;
        align-items: center;
        padding: 20px 0;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s;
        box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
        z-index: 999;
    }
    
    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav-links li {
        margin: 15px 0;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .hero {
        padding: 80px 0;
    }
    
    .hero h1 {
        font-size: 32px;
    }
    
    .hero p {
        font-size: 18px;
    }
    
    section {
        padding: 60px 0;
    }
    
    .pedia-card {
        min-width: 250px;
        max-width: 250px;
    }
    
    .pedia-img {
        padding: 15px;
    }
}

@media (max-width: 576px) {
    .pedia-card {
        min-width: 220px;
        max-width: 220px;
    }
    
    .filter-buttons {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .filter-btn {
        width: 100%;
    }
    
    h1 {
        font-size: 30px;
    }
    
    h2 {
        font-size: 26px;
    }
    
    .intro-image img, .features-image img {
        height: 200px;
    }
    
    .theme-toggle, .language-switcher {
        display: none;
    }
    
    .theme-toggle.mobile, .language-switcher.mobile {
        display: flex;
        position: static;
        margin-bottom: 15px;
    }
    
    .mobile-controls {
        display: flex;
        justify-content: space-between;
        padding: 10px 20px;
        background-color: var(--card-bg);
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    }
    
    .pedia-img {
        height: 180px;
    }
}