/* 全局样式 */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f9;
}

/* 页头样式 */
header {
    background-color: #333;
    color: white;
    padding: 10px 0;
    text-align: center;
}

header nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

header nav ul li {
    margin: 0 15px;
}

header nav ul li a {
    color: white;
    text-decoration: none;
}

/* 地图容器样式 */
#map-container {
    margin: 20px auto;
    text-align: center;
    width: 90%; /* 调整为屏幕宽度的 90% */
    max-width: 1200px; /* 设置最大宽度 */
}

#map {
    width: 100%; /* 地图宽度占满容器 */
    height: 500px; /* 设置固定高度 */
    border: 1px solid #ccc;
    border-radius: 8px;
}

/* 位置信息样式 */
#location-info {
    margin-top: 10px;
    font-size: 16px;
    color: #333;
}

/* 按钮样式 */
#footer-buttons {
    text-align: center;
    margin: 20px 0;
}

.button {
    display: inline-block;
    padding: 10px 20px;
    background-color: #333;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    margin: 5px;
    transition: background-color 0.3s ease;
}

.button:hover {
    background-color: #555;
}

/* 页脚样式 */
footer {
    text-align: center;
    background-color: #333;
    color: white;
    padding: 10px 0;
    margin-top: 20px;
    font-size: 14px;
}

/* --- 响应式设计 --- */

/* 针对平板和小屏设备（宽度小于 768px） */
@media (max-width: 768px) {
    #map {
        height: 350px; /* 调整地图高度 */
    }

    #footer-buttons {
        flex-direction: column; /* 按钮垂直排列 */
    }

    .button {
        width: 80%; /* 按钮宽度调整为 80% */
        margin: 10px auto;
    }
}

/* 针对手机设备（宽度小于 480px） */
@media (max-width: 480px) {
    #map {
        height: 300px; /* 更小屏幕上的地图高度 */
    }

    header {
        font-size: 18px; /* 页头字体缩小 */
    }

    header nav ul li {
        margin: 5px 10px;
    }

    #location-info {
        font-size: 14px; /* 信息字体大小调整 */
    }
}

footer p a {
    color: #007bff; /* 蓝色链接 */
    text-decoration: none; /* 去掉默认下划线 */
    margin-left: 5px;
}

footer p a:hover {
    text-decoration: underline; /* 鼠标悬停时显示下划线 */
}
/* 设置页面整体布局，确保 footer 固定在底部 */
html, body {
    height: 100%; /* 确保页面高度为 100% */
    margin: 0;
    display: flex;
    flex-direction: column; /* 设置为列布局 */
}

/* 内容区域（主体部分） */
#map-container {
    flex: 1; /* 主体内容填充剩余空间 */
    margin: 20px auto;
    text-align: center;
    width: 90%; /* 调整为屏幕宽度的 90% */
    max-width: 1200px; /* 设置最大宽度 */
}

/* 地图样式 */
#map {
    width: 100%; /* 地图宽度占满容器 */
    height: 500px; /* 设置固定高度 */
    border: 1px solid #ccc;
    border-radius: 8px;
}

/* 页脚固定在底部 */
footer {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 10px 0;
    font-size: 14px;
    margin-top: auto; /* 将 footer 推到页面底部 */
    width: 100%; /* 确保页脚宽度占满屏幕 */
}
