html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

/* Header style */
#header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #f3722c;
    color: white;
    text-align: center;
    padding: 20px 0;
    font-size: 24px;
    font-family: "Comic Sans MS", "Bradley Hand", cursive;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

/* Map container */
#map {
    width: 100%;
    height: 100vh;
}

/* Category buttons container */
#category-buttons {
    position: absolute;
    top: 80px;
    left: 10px;
    width: 200px;
    max-height: calc(100% - 100px);
    overflow-y: auto;
    background-color: white;
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 10px;
    z-index: 1000;
}

/* Restaurant list container */
#restaurant-list {
    position: absolute;
    top: 80px;
    left: 235px;
    width: 350px;
    max-height: calc(100% - 100px);
    overflow-y: auto;
    background-color: white;
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 10px;
    z-index: 1000;
    display: none;
}

/* Category button style */
.category-button {
    display: block;
    margin: 5px 0;
    padding: 5px;
    background-color: #f3722c;
    color: white;
    text-align: center;
    text-decoration: none;
    border-radius: 5px;
    cursor: pointer;
    font-family: "Comic Sans MS", "Bradley Hand", cursive;
}

/* Category button hover style */
.category-button:hover {
    background-color: #0056b3;
}

/* Active category button style */
.active {
    background-color: #007bff;
}

/* 
   为"Show All"和"Show Favorites"按钮覆盖背景色为红色 (#FF0000)
*/
#show-all-button.category-button,
#show-favorites-button.category-button {
    background-color: #FF0000; /* 红色 */
}
#show-all-button.category-button:hover,
#show-favorites-button.category-button:hover {
    background-color: #0056b3; /* 深蓝色 hover */
}
#show-all-button.category-button.active,
#show-favorites-button.category-button.active {
    background-color: #007bff;
}
#show-all-button.category-button.active:hover,
#show-favorites-button.category-button.active:hover {
    background-color: #0056b3;
}

/* 单个餐厅列表项 */
.restaurant-item {
    margin: 10px 0;
    padding: 5px;
    display: flex;
    align-items: center;
    font-family: "Comic Sans MS", "Bradley Hand", cursive;
    cursor: pointer;
}

/* 餐厅列表项 hover 效果 */
.restaurant-item:hover {
    background-color: #f0f0f0;
}

/* 评分条容器 */
.rating-bar {
    height: 20px;
    margin-left: 10px;
    flex-grow: 1;
    position: relative;
    background-color: #f0f0f0;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-right: 5px;
}

/* 评分条的填充部分 */
.rating-fill {
    height: 100%;
    border-radius: 3px;
    width: 0;
    transition: width 0.3s;
}

/* 评分条文字 */
.rating-text {
    color: black;
    font-size: 14px;
    margin-left: 5px;
    z-index: 2;
}

/* Popup style */
.leaflet-popup-content {
    font-family: "Comic Sans MS", "Bradley Hand", cursive;
    font-size: 14px;
    color: black;
}
.leaflet-popup-content-wrapper {
    background-color: white;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}
.leaflet-popup-tip {
    background-color: white;
}

/* Leaflet layers control style */
.leaflet-control-layers {
    font-family: "Comic Sans MS", "Bradley Hand", cursive;
    font-size: 14px;
    color: black;
    bottom: 10px;
    right: 0px;
    width: auto;
    height: auto;
}

/* 定位按钮样式 */
#locate-button {
    position: absolute;
    bottom: 165px;
    right: 10px;
    z-index: 1000;
    width: 30px;
    height: 30px;
    background: #fff;
    border: 2px solid rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    background-image: url("locate.png");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 20px 20px;
    cursor: pointer;
}
#locate-button:hover {
    background-color: #0056b3;
}

/* 搜索框容器（右上角） */
#search-container {
    position: absolute;
    top: 80px;
    right: 10px;
    z-index: 1500;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 5px 10px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    gap: 5px; /* 输入框与按钮间隔 */
}
#search-input {
    width: 150px;
    padding: 5px;
    font-family: "Comic Sans MS", "Bradley Hand", cursive;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 3px;
}

/* 自动补全下拉列表 */
#autocomplete-list {
    position: absolute;
    top: 45px; /* 根据实际输入框高度微调 */
    right: 80;
    width: 225px;
    list-style-type: none;
    margin: 0;
    padding: 0;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 3px;
    z-index: 2000;
    max-height: 200px;
    overflow-y: auto;
}
#autocomplete-list li {
    padding: 5px;
    cursor: pointer;
    font-family: "Comic Sans MS", cursive;
}
#autocomplete-list li:hover {
    background-color: #f0f0f0;
}

/* 搜索按钮样式 */
#search-button {
    font-family: "Comic Sans MS", "Bradley Hand", cursive;
    font-size: 16px;
    color: #333;
    padding: 3px 5px; /* 按钮内边距 */
    border: 1px solid #ccc; /* 边框 */
    border-radius: 3px; /* 圆角 */
}
#search-button:hover {
    background-color: #ddd;
}

/* 默认图标样式（应用于Leaflet默认marker） */
.leaflet-marker-icon {
    cursor: url('custom-cursor.png'), auto; /* 自定义鼠标指针 */
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* 动画过渡 */
}

/* 鼠标悬停在marker上的放大效果 */
.leaflet-marker-icon:hover {
    cursor: url('fork.png'), auto;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.3);
    z-index: 1000;
}

/* 自动补全条目 hover 和高亮 */
#autocomplete-list li {
    padding: 10px;
    cursor: pointer;
    list-style: none;
}
#autocomplete-list li:hover,
#autocomplete-list li.autocomplete-active {
    background-color: #f3722c;
    color: white;
}

