/* 主界面专用样式 - 花朵自动检测系统 */

/* CSS变量定义 */
:root {
    --primary-color: #2d5a27;
    --secondary-color: #4a7c59;
    --accent-color: #7fb069;
    --light-green: #a7c957;
    --very-light-green: #f2f7f0;
    --text-dark: #2c3e50;
    --text-light: #6c757d;
    --white: #ffffff;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--very-light-green);
    overflow-x: hidden;
}

/* 导航栏样式 */
.navbar {
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.95) !important;
    transition: var(--transition);
    padding: 1rem 0;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color) !important;
    transition: var(--transition);
}

.navbar-brand:hover {
    transform: translateY(-2px);
}

.nav-link {
    font-weight: 500;
    color: var(--text-dark) !important;
    margin: 0 0.5rem;
    padding: 0.5rem 1rem !important;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    background-color: var(--light-green);
    color: var(--white) !important;
    transform: translateY(-2px);
}

/* 英雄区域样式 */
.hero-section {
    background: linear-gradient(135deg, var(--very-light-green) 0%, rgba(167, 201, 87, 0.1) 100%);
    padding-top: 100px;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(167, 201, 87, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(127, 176, 105, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    animation: fadeInUp 1s ease-out;
}

.hero-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1.2;
    margin-bottom: 2rem;
}

.hero-description {
    font-size: 1.2rem;
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 2rem;
}

.hero-stats {
    margin: 2rem 0;
}

.stat-item {
    text-align: center;
    padding: 1rem;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-actions {
    margin-top: 2rem;
}

.hero-image {
    position: relative;
    animation: fadeInRight 1s ease-out 0.3s both;
}

.hero-image img {
    transition: var(--transition);
}

.hero-image:hover img {
    transform: scale(1.05);
}

/* 按钮样式 */
.btn {
    border-radius: var(--border-radius);
    font-weight: 600;
    padding: 0.75rem 2rem;
    transition: var(--transition);
    border: none;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    color: var(--white);
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

/* 区域样式 */
.section-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1rem;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-color), var(--light-green));
    border-radius: 2px;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

/* 功能特色区域 */
.features-section {
    background: var(--white);
    position: relative;
}

.feature-card {
    background: var(--white);
    padding: 2.5rem 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
    height: 100%;
    border: 1px solid rgba(167, 201, 87, 0.2);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--light-green);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--light-green), var(--accent-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    transition: var(--transition);
}

.feature-icon i {
    font-size: 2rem;
    color: var(--white);
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
}

.feature-card h4 {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.feature-card p {
    color: var(--text-light);
    line-height: 1.7;
}

/* 生物学知识区域 */
.biology-section {
    background: linear-gradient(135deg, var(--very-light-green) 0%, rgba(167, 201, 87, 0.05) 100%);
}

.biology-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    height: 100%;
}

.biology-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.biology-image {
    height: 250px;
    overflow: hidden;
}

.biology-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.biology-content {
    padding: 2rem;
}

.biology-content h4 {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.biology-content p {
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.biology-content ul {
    list-style: none;
    padding: 0;
}

.biology-content li {
    padding: 0.5rem 0;
    color: var(--text-light);
    position: relative;
    padding-left: 1.5rem;
}

.biology-content li::before {
    content: '🌸';
    position: absolute;
    left: 0;
    top: 0.5rem;
}

/* 图片展示区域 */
.gallery-section {
    background: var(--white);
}

.gallery-item {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    height: 300px;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: var(--white);
    padding: 2rem 1.5rem 1.5rem;
    transform: translateY(100%);
    transition: var(--transition);
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay h5 {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.gallery-overlay p {
    font-size: 0.9rem;
    opacity: 0.9;
    margin: 0;
}

/* 行动号召区域 */
.cta-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    position: relative;
    overflow: hidden;
}

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

.cta-content {
    position: relative;
    z-index: 2;
}

.cta-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.cta-description {
    font-size: 1.1rem;
    line-height: 1.8;
    max-width: 800px;
    margin: 0 auto 2rem;
    opacity: 0.9;
}

.cta-section .btn-primary {
    background: var(--white);
    color: var(--primary-color);
    font-weight: 700;
}

.cta-section .btn-primary:hover {
    background: var(--light-green);
    color: var(--white);
}

/* 页脚样式 */
.footer {
    background: var(--text-dark);
    color: var(--white);
}

.footer-brand {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--light-green);
}

.footer-description {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    line-height: 1.6;
}

.footer-links {
    margin-bottom: 1rem;
}

.footer-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    margin: 0 1rem;
    font-size: 0.9rem;
    transition: var(--transition);
}

.footer-link:hover {
    color: var(--light-green);
}

.footer-copyright {
    color: rgba(255, 255, 255, 0.6);
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .feature-card,
    .biology-content {
        padding: 1.5rem;
    }
    
    .btn {
        padding: 0.6rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .hero-actions .btn {
        display: block;
        margin: 0.5rem 0;
        width: 100%;
    }
    
    .cta-title {
        font-size: 2rem;
    }
    
    .footer-link {
        display: block;
        margin: 0.5rem 0;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .stat-item {
        padding: 0.5rem;
    }
    
    .gallery-item {
        height: 250px;
    }
}

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
}

/* 选择文本样式 */
::selection {
    background: var(--light-green);
    color: var(--white);
}

::-moz-selection {
    background: var(--light-green);
    color: var(--white);
}

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

::-webkit-scrollbar-track {
    background: var(--very-light-green);
}

::-webkit-scrollbar-thumb {
    background: var(--light-green);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}