/* 城市选择器样式 */
/* 防止水平滚动 */
body {
    overflow-x: hidden;
    max-width: 100vw;
}

html {
    overflow-x: hidden;
    max-width: 100vw;
}
.city-selector-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    align-items: flex-end;
}

.city-selector {
    width: 100%;
    max-width: 100vw;
    max-height: 90vh;
    background: white;
    border-radius: 12px 12px 0 0;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    position: relative;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

.city-header {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #eee;
    position: relative;
}

.city-back {
    background: none;
    border: none;
    font-size: 24px;
    color: #333;
    cursor: pointer;
    padding: 5px;
    margin-right: 15px;
}

.city-tabs {
    display: flex;
    flex: 1;
    justify-content: center;
}

.city-tab {
    background: none;
    border: none;
    padding: 8px 20px;
    font-size: 16px;
    color: #666;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
}

.city-tab.active {
    color: #4285f4;
    border-bottom-color: #4285f4;
    font-weight: 500;
}

.city-search {
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.city-search input {
    width: 100%;
    height: 40px;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 0 15px;
    font-size: 14px;
    outline: none;
    background: #f8f9fa;
}

.city-search input:focus {
    border-color: #4285f4;
    background: white;
}

.city-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0 15px 15px;
    max-width: 100%;
    box-sizing: border-box;
}

.city-section {
    margin-bottom: 20px;
}

.city-section-title {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
    font-weight: 500;
}

.city-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.city-item {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.city-item:hover {
    background: #e3f2fd;
    border-color: #4285f4;
    color: #4285f4;
}

.recent-cities .city-item {
    background: #e8f5e8;
    border-color: #4caf50;
    color: #2e7d32;
}

.recent-cities .city-item:hover {
    background: #c8e6c9;
}

.hot-cities .city-item {
    background: #fff3e0;
    border-color: #ff9800;
    color: #e65100;
}

.hot-cities .city-item:hover {
    background: #ffe0b2;
}

.city-index {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 2px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    padding: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.index-item {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #666;
    text-decoration: none;
    border-radius: 50%;
    transition: all 0.2s;
}

.index-item:hover {
    background: #4285f4;
    color: white;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .city-selector {
        max-height: 95vh;
    }
    
    .city-list {
        gap: 6px;
    }
    
    .city-item {
        padding: 6px 10px;
        font-size: 13px;
    }
    
    .city-index {
        right: 2px;
    }
    
    .index-item {
        width: 18px;
        height: 18px;
        font-size: 11px;
    }
}
