/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background: linear-gradient(135deg, #ffb6c1 0%, #ff69b4 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部样式 */
.header {
    text-align: center;
    margin-bottom: 30px;
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.header h1 {
    color: #ff1493;
    margin-bottom: 20px;
    font-size: 2.5em;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.nav {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.nav-btn {
    background: linear-gradient(45deg, #ff69b4, #ff1493);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1.1em;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 105, 180, 0.3);
}

.nav-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 105, 180, 0.4);
}

.nav-btn.active {
    background: linear-gradient(45deg, #ff1493, #ff69b4);
    box-shadow: 0 4px 15px rgba(255, 20, 147, 0.5);
}

/* 主要内容区域 */
.main-content {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.content-section {
    display: none;
}

.content-section.active {
    display: block;
}

.content-section h2 {
    color: #ff1493;
    margin-bottom: 25px;
    text-align: center;
    font-size: 2em;
}

/* 首页卡片样式 */
.card-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.card {
    background: linear-gradient(135deg, #ffb6c1, #ff69b4);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
    box-shadow: 0 6px 20px rgba(255, 105, 180, 0.3);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(255, 105, 180, 0.5);
}

.card h3 {
    margin-bottom: 15px;
    font-size: 1.5em;
}

.card p {
    font-size: 1.1em;
    opacity: 0.9;
}

/* 控制面板样式 */
.controls {
    background: rgba(255, 182, 193, 0.2);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.control-group label {
    font-weight: bold;
    color: #ff1493;
}

.control-group input[type="range"] {
    width: 100%;
    height: 6px;
    background: #ffb6c1;
    border-radius: 3px;
    outline: none;
}

.control-group input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    background: #ff1493;
    border-radius: 50%;
    cursor: pointer;
}

.control-group select {
    padding: 8px;
    border: 2px solid #ffb6c1;
    border-radius: 5px;
    background: white;
    color: #333;
}

/* 图表容器样式 */
#sin-cos-chart,
#box-office-chart,
#math-functions-chart,
#statistical-chart,
#financial-chart,
#3d-chart {
    height: 500px;
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* 3D图表特殊样式 */
#3d-chart {
    min-height: 600px;
}

/* 金融图表特殊样式 */
#financial-chart {
    min-height: 550px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .header h1 {
        font-size: 2em;
    }
    
    .nav {
        flex-direction: column;
        align-items: center;
    }
    
    .nav-btn {
        width: 100%;
        max-width: 300px;
    }
    
    .card-container {
        grid-template-columns: 1fr;
    }
    
    .controls {
        grid-template-columns: 1fr;
    }
    
    #sin-cos-chart,
    #box-office-chart,
    #math-functions-chart,
    #statistical-chart,
    #financial-chart,
    #3d-chart {
        height: 400px;
    }
    
    #3d-chart {
        min-height: 450px;
    }
    
    #financial-chart {
        min-height: 400px;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.5em;
    }
    
    .main-content {
        padding: 15px;
    }
    
    #sin-cos-chart,
    #box-office-chart,
    #math-functions-chart,
    #statistical-chart,
    #financial-chart,
    #3d-chart {
        height: 300px;
        padding: 10px;
    }
    
    #3d-chart {
        min-height: 350px;
    }
    
    #financial-chart {
        min-height: 320px;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.content-section.active {
    animation: fadeIn 0.5s ease;
}

.card {
    animation: fadeIn 0.6s ease;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #ffb6c1;
}

::-webkit-scrollbar-thumb {
    background: #ff1493;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #ff0066;
}