* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

header {
    background-color: #2c3e50;
    color: white;
    text-align: center;
    padding: 1rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    padding-bottom: 6rem; /* 为底部导航栏留出空间 */
}

section {
    display: none;
    background-color: white;
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

section.active {
    display: block;
}

h2 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #3498db;
    padding-bottom: 0.5rem;
}

.map-container {
    width: 100%;
    height: auto;
    overflow: hidden;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
}

#main-map {
    width: 100%;
    height: auto;
    max-width: 100%;
    object-fit: contain;
}

.transport-container, .legends-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.transport-item, .legend-item {
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}

.transport-item:hover, .legend-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.transport-item h3, .legend-item h3 {
    color: #3498db;
    margin-bottom: 1rem;
}

.transport-info p {
    margin-bottom: 0.5rem;
}

.legend-link {
    text-decoration: none;
    color: inherit;
}

.legend-link:hover {
    text-decoration: none;
}

nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: white;
    display: flex;
    justify-content: center;
    padding: 1rem;
    box-shadow: 0 -2px 5px rgba(0,0,0,0.1);
    z-index: 1000;
}

.nav-btn {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    margin: 0 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.nav-btn:hover {
    background-color: #2980b9;
}

.nav-btn.active {
    background-color: #2c3e50;
}

@media (max-width: 768px) {
    main {
        padding: 1rem;
        padding-bottom: 6rem;
    }
    
    .map-container {
        height: auto;
    }
    
    .transport-container, .legends-container {
        grid-template-columns: 1fr;
    }
    
    nav {
        flex-direction: column;
        align-items: center;
    }
    
    .nav-btn {
        width: 100%;
        margin: 0.5rem 0;
    }
}

.about-section {
    background-color: #f5f5f5;
    padding: 0.3rem 1rem;
    margin: 0.2rem auto 8rem;
    text-align: center;
    font-size: 0.9rem;
    color: #666;
    border-radius: 4px;
    max-width: 800px;
    line-height: 1.3;
}

.about-section p {
    margin: 0.15rem 0;
}

/* 地图、交通和传说页面的特殊样式 */
#map-section .about-section,
#transport-section .about-section,
#legends-section .about-section {
    margin-top: 0;
    padding-top: 0.2rem;
    margin-bottom: 8rem;
} 