
/* 全局变量与重置 */
:root {
    --primary-color: #2ecc71; /* 自然绿 */
    --secondary-color: #27ae60; /* 深绿 */
    --accent-color: #f1c40f; /* 蜜蜂黄 */
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --bg-white: #ffffff;
    --bg-dark: #1a1a1a;
    --font-main: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--bg-white);
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

/* 导航栏 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.logo span {
    color: var(--text-dark);
}

.navbar nav a {
    margin-left: 2rem;
    font-weight: 500;
    color: var(--text-dark);
}

.navbar nav a:hover {
    color: var(--primary-color);
}

.btn-explore {
    padding: 0.5rem 1.2rem;
    background: var(--text-dark);
    color: white;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.btn-explore:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
}

/* 英雄区域 */
.hero {
    height: 100vh;
    background: url('https://picsum.photos/1920/1080?grayscale') no-repeat center center/cover;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3), rgba(0,0,0,0.7));
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    padding: 0 20px;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    opacity: 0.9;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-bottom: 3rem;
}

.stat-box {
    display: flex;
    flex-direction: column;
}

.stat-box .num {
    font-size: 2rem;
    font-weight: bold;
    color: var(--accent-color);
}

.stat-box .label {
    font-size: 0.9rem;
    opacity: 0.8;
}

.btn-primary {
    display: inline-block;
    padding: 1rem 3rem;
    background: var(--primary-color);
    color: white;
    border-radius: 50px;
    font-weight: bold;
    font-size: 1.1rem;
    box-shadow: 0 10px 20px rgba(46, 204, 113, 0.3);
}

.btn-primary:hover {
    background: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: 0 15px 25px rgba(46, 204, 113, 0.4);
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
    font-size: 0.9rem;
    opacity: 0.8;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateX(-50%) translateY(0);}
    40% {transform: translateX(-50%) translateY(-10px);}
    60% {transform: translateX(-50%) translateY(-5px);}
}

/* 通用部分样式 */
.section-container {
    padding: 5rem 5%;
}

.bg-dark {
    background-color: var(--bg-dark);
    color: white;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
    color: inherit;
}

.section-header p {
    color: var(--text-light);
}

.bg-dark .section-header p {
    color: #bdc3c7;
}

/* 昆虫网格 */
.insect-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.insect-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #eee;
}

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

.card-image {
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.category-tag {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    color: white;
}

.category-tag.beetle { background: #e67e22; }
.category-tag.butterfly { background: #9b59b6; }
.category-tag.hymenoptera { background: #f1c40f; color: #333; }
.category-tag.odonata { background: #3498db; }

.card-details {
    padding: 1.5rem;
}

.card-details h3 {
    font-size: 1.3rem;
    margin-bottom: 0.2rem;
    color: var(--text-dark);
}

.scientific-name {
    font-style: italic;
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 0.8rem;
}

.description {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.traits {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.trait {
    font-size: 0.8rem;
    background: #f0f0f0;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    color: #555;
}

/* 冷知识布局 */
.facts-layout {
    max-width: 900px;
    margin: 0 auto;
}

.fact-block {
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
    background: rgba(255,255,255,0.05);
    padding: 1.5rem;
    border-radius: 12px;
}

.fact-block.left {
    flex-direction: row;
}

.fact-block.right {
    flex-direction: row-reverse;
}

.fact-icon {
    font-size: 3rem;
    margin: 0 1.5rem;
    flex-shrink: 0;
}

.fact-text h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--accent-color);
}

.fact-text p {
    color: #bdc3c7;
    font-size: 0.95rem;
}

/* 行动卡片 */
.action-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
}

.action-card {
    text-align: center;
    padding: 2rem;
    background: #f9f9f9;
    border-radius: 12px;
    transition: background 0.3s;
    border: 1px solid #eee;
}

.action-card:hover {
    background: #fff;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    border-color: var(--primary-color);
}

.action-card h3 {
    margin-bottom: 0.8rem;
    color: var(--text-dark);
}

.action-card p {
    font-size: 0.9rem;
    color: var(--text-light);
}

/* 页脚 */
footer {
    background: #2c3e50;
    color: white;
    padding: 4rem 5% 2rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 3rem;
}

.footer-col h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.footer-col h4 {
    margin-bottom: 1rem;
    color: #ecf0f1;
}

.footer-col ul li {
    margin-bottom: 0.5rem;
}

.footer-col ul li a {
    color: #bdc3c7;
    font-size: 0.9rem;
}

.footer-col ul li a:hover {
    color: white;
}

.copyright {
    text-align: center;
    border-top: 1px solid #34495e;
    padding-top: 2rem;
    color: #7f8c8d;
    font-size: 0.8rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hero h1 { font-size: 2.5rem; }
    .hero-stats { flex-direction: column; gap: 1rem; }
    .navbar nav { display: none; }
    .fact-block { flex-direction: column !important; text-align: center; }
    .fact-icon { margin: 0 0 1rem 0; }
}
