:root {
    --primary-color: #007aff;
    --text-color: #333;
    --bg-blur: rgba(255, 255, 255, 0.7);
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --radius: 12px;
}
*:focus {
    outline: none;
}
a{ -webkit-tap-highlight-color:rgba(255,0,0,0);}
body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    overflow: hidden;
}

#map {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

.blur-effect {
    background: var(--bg-blur);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.top-container {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    align-items: center; /* 改为居中，防止拉伸 */
    gap: 12px;
    transition: opacity 0.2s;
}

.top-container.hidden {
    opacity: 0;
    pointer-events: none;
}

.title-box {
    padding: 0 24px; /* 改为水平padding */
    height: 48px;    /* 固定高度 */
    border-radius: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
    box-sizing: border-box;
}

.title-box h1 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-color);
    font-weight: 600;
    white-space: nowrap;
}

.search-btn {
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
    transition: all 0.2s ease;
    padding: 0;
    width: 48px;  /* 固定宽度 */
    height: 48px; /* 固定高度 */
    border-radius: 50%; /* 正圆 */
    box-shadow: var(--shadow);
    flex-shrink: 0; /* 防止被挤压 */
    background: var(--bg-blur); /* 确保背景一致 */
}

.search-btn:hover {
    background: white;
    transform: scale(1.05);
}

.search-panel {
    position: absolute;
    top: 20px; /* 与 top-container 一致 */
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 400px;
    max-height: 60vh;
    z-index: 20;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 15px;
    display: flex;
    flex-direction: column;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.search-panel.hidden {
    opacity: 0;
    transform: translate(-50%, -20px);
    pointer-events: none;
}

.search-header {
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding-bottom: 10px;
    margin-bottom: 10px;
}

#search-input {
    flex: 1;
    border: none;
    background: rgba(0, 0, 0, 0.05);
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
}

#search-input:focus {
    background: rgba(0, 0, 0, 0.08);
}

.close-btn-small {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: #666;
    margin-left: 10px;
    cursor: pointer;
    line-height: 1;
}

.search-results {
    flex: 1;
    overflow-y: auto;
    min-height: 50px;
}

.search-item {
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid rgba(0,0,0,0.03);
}

.search-item:last-child {
    border-bottom: none;
}

.search-item:hover {
    background: rgba(0,0,0,0.05);
}

.search-item-name {
    font-weight: 500;
    font-size: 1rem;
    color: var(--text-color);
}

.search-item-address {
    font-size: 0.8rem;
    color: #666;
    margin-top: 4px;
}

.info-panel {
    position: absolute;
    top: auto;
    bottom: 30px;
    right: 20px;
    z-index: 10;
    width: 320px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

.hidden {
    transform: translateX(20px);
    opacity: 0;
    pointer-events: none;
}

.info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding-bottom: 10px;
}

.info-header h2 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-color);
}

.close-btn {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    line-height: 1;
}

.info-item {
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
}

.info-item .label {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 4px;
}

.info-item .value {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-color);
}

.info-item.highlight .value {
    color: var(--primary-color);
    font-size: 1.2rem;
    font-weight: 700;
}

/* 移除旧的媒体查询干扰 */
@media (max-width: 600px) {
    .title-box {
        padding: 10px 16px;
    }
    .title-box h1 {
        font-size: 0.95rem;
    }
    .top-container {
        width: 85%;
        justify-content: center;
    }
    
    .info-panel {
        top: auto;
        bottom: 20px;
        left: 20px;
        right: 20px;
    }
}

    /* 弹窗样式 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4); /* 半透明遮罩 */
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    transition: opacity 0.3s ease;
}

.modal-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.modal-content {
    background: rgba(255, 255, 255, 0.85); /* 稍微不透明一点 */
    width: 90%;
    max-width: 450px;
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transform: scale(1);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.hidden .modal-content {
    transform: scale(0.9);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(0,0,0,0.08);
    padding-bottom: 10px;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--text-color);
}

.modal-body {
    font-size: 0.95rem;
    color: #444;
    line-height: 1.6;
}

.modal-body ul {
    padding-left: 20px;
    margin: 10px 0;
}

.modal-body .footer {
    font-size: 0.8rem;
    color: #888;
    text-align: center;
    margin-top: 20px;
    border-top: 1px solid rgba(0,0,0,0.05);
    padding-top: 10px;
}



