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

body {
    font-family: 'Microsoft YaHei', 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #f8fffe 0%, #e8f7ff 100%);
}

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

/* 导航栏样式 */
.navbar {
    background: linear-gradient(135deg, #00FF7F 0%, #87CEEB 100%);
    box-shadow: 0 2px 10px rgba(0, 255, 127, 0.3);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

.nav-logo {
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 25px;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.2);
    color: #fff;
}

/* 首页英雄区域 */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(45deg, #e8f7ff 0%, #f8fffe 50%, #e8f7ff 100%);
    margin-top: 80px;
    padding: 2rem 0;
}

.hero-content {
    max-width: 800px;
}

.hero-title {
    font-size: 3rem;
    color: #00FF7F;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(135, 206, 235, 0.3);
}

.hero-subtitle {
    font-size: 1.2rem;
    color: #87CEEB;
    margin-bottom: 2rem;
}

.color-gradient {
    width: 200px;
    height: 200px;
    margin: 0 auto;
    border-radius: 50%;
    background: linear-gradient(135deg, #00FF7F 0%, #87CEEB 100%);
    box-shadow: 0 10px 30px rgba(0, 255, 127, 0.4);
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 10px 30px rgba(0, 255, 127, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 15px 40px rgba(0, 255, 127, 0.6);
    }
}

/* 图表区域 */
.charts-section {
    padding: 4rem 0;
    background: white;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    color: #00FF7F;
    margin-bottom: 3rem;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, #00FF7F, #87CEEB);
}

/* 控制面板 */
.control-panel {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.chart-controls {
    display: flex;
    gap: 1rem;
}

.control-btn {
    padding: 0.8rem 1.5rem;
    border: 2px solid #00FF7F;
    background: white;
    color: #00FF7F;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.control-btn:hover,
.control-btn.active {
    background: linear-gradient(135deg, #00FF7F, #87CEEB);
    color: white;
    border-color: transparent;
}

.data-select {
    padding: 0.8rem 1rem;
    border: 2px solid #87CEEB;
    border-radius: 25px;
    background: white;
    color: #333;
    cursor: pointer;
    outline: none;
}

/* 图表容器 */
.chart-container {
    background: linear-gradient(135deg, #f8fffe 0%, #e8f7ff 100%);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(135, 206, 235, 0.2);
    margin-bottom: 2rem;
    min-height: 400px;
}

#main-chart {
    width: 100% !important;
    height: 400px !important;
}

.chart-description {
    background: white;
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 255, 127, 0.1);
    border-left: 4px solid #00FF7F;
}

.chart-description h4 {
    color: #87CEEB;
    margin-bottom: 1rem;
}

.chart-description p {
    color: #666;
    line-height: 1.8;
}

/* 颜色展示区域 */
.colors-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, #e8f7ff 0%, #f8fffe 100%);
}

.color-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.color-item {
    text-align: center;
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(135, 206, 235, 0.2);
    transition: transform 0.3s ease;
}

.color-item:hover {
    transform: translateY(-5px);
}

.color-box {
    width: 100px;
    height: 100px;
    margin: 0 auto 1rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.color-item span {
    color: #333;
    font-weight: 500;
}

/* 关于区域 */
.about-section {
    padding: 4rem 0;
    background: white;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-content p {
    margin-bottom: 1.5rem;
    color: #666;
    font-size: 1.1rem;
    line-height: 1.8;
}

/* 页脚 */
.footer {
    background: linear-gradient(135deg, #00FF7F 0%, #87CEEB 100%);
    color: white;
    text-align: center;
    padding: 2rem 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        padding: 1rem;
    }

    .nav-menu {
        margin-top: 1rem;
        gap: 1rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .control-panel {
        flex-direction: column;
        align-items: stretch;
    }

    .chart-controls {
        justify-content: center;
        flex-wrap: wrap;
    }

    .color-grid {
        grid-template-columns: 1fr;
    }

    .color-gradient {
        width: 150px;
        height: 150px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.5rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .control-btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }

    .chart-container {
        padding: 1rem;
    }
}

/* 滚动动画 */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 加载动画 */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 400px;
}

.loading::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 4px solid #87CEEB;
    border-top: 4px solid #00FF7F;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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