/* Critical CSS for 房东先生直租 - Index Page Styles */

/* Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

:root {
  --primary-color: #3f51b5;
  --secondary-color: #4caf50;
  --text-color: #333;
  --light-text: #666;
  --border-color: rgba(0,0,0,0.05);
  --background-color: #f8f8f8;
  --card-bg: #fff;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
  --shadow-md: 0 2px 5px rgba(0,0,0,0.05);
  --radius-sm: 4px;
  --radius-md: 12px;
  --radius-lg: 20px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--text-color);
  background-color: var(--background-color);
  line-height: 1.5;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-top: 0;
  margin-top: 0;
}



/* Search Bar */
.city-search-wrapper {
  display: flex;
  padding: 8px 15px 12px 15px;
  background-color: var(--card-bg);
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  position: relative;
  box-shadow: var(--shadow-md);
}

.search-input {
  flex: 1;
  background-color: #f5f5f5;
  border-radius: var(--radius-lg);
  height: 40px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  border: none;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.08);
  margin-right: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.search-input:hover {
  box-shadow: 0 0 0 2px rgba(63, 81, 181, 0.1);
}

.search-input .search-label {
  color: var(--light-text);
  font-size: 16px;
  margin-right: 10px;
  font-weight: 500;
}

.search-input input {
  background-color: transparent;
  border: none;
  outline: none;
  height: 100%;
  width: 100%;
  font-size: 14px;
  color: var(--text-color);
}



.map-button, .refresh-button {
  display: flex;
  align-items: center;
  margin-left: 5px;
  font-size: 13px;
  color: var(--text-color);
  font-weight: 500;
  background-color: rgba(63, 81, 181, 0.08);
  padding: 8px 15px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.refresh-button {
  background-color: rgba(76, 175, 80, 0.08);
}

.map-button:hover, .refresh-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.refresh-button:active {
  transform: scale(0.95);
}

/* Content Area */
#home-page {
  padding-top: 0;
}

/* Banner Styles */
.banner-ad {
  margin: 15px 15px;
  border-radius: var(--radius-md);
  overflow: hidden;
  height: 140px;
  background-color: var(--secondary-color);
  position: relative;
  box-shadow: 0 3px 12px rgba(0,0,0,0.15);
}

.banner-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: white;
  font-size: 18px;
  font-weight: 500;
  background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
}

/* Tab Bar Styles */
.tab-bar {
  display: flex;
  align-items: center;
  justify-content: space-around;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 68px;
  background-color: var(--card-bg);
  border-top: 1px solid var(--border-color);
  z-index: 100;
}

.tab-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  text-align: center;
  padding: 6px 0;
  color: var(--light-text);
  font-size: 12px;
  border: none;
  background: transparent;
  cursor: pointer;
}

.tab-item.active {
  color: var(--primary-color);
}

.tab-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 4px;
}

/* Loading Indicator */
.loading-indicator {
  text-align: center;
  padding: 20px 0;
  color: var(--light-text);
  display: none;
}

.loading-indicator.active {
  display: block;
}

/* Toast Notification */
.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 14px;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.toast.show {
  opacity: 1;
  visibility: visible;
}

/* Offline Mode */
body.offline {
  filter: grayscale(20%);
}

body.offline::before {
  content: "离线模式";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: #ff9800;
  color: white;
  text-align: center;
  padding: 4px;
  font-size: 12px;
  z-index: 1001;
}

/* 分页加载指示器样式 */
.load-more-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  color: var(--light-text);
  background-color: var(--card-bg);
  margin: 10px 15px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.load-more-indicator .loading-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 8px;
}

.load-more-indicator .loading-text {
  font-size: 13px;
  color: var(--light-text);
}

.no-more-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  color: var(--light-text);
  background-color: var(--card-bg);
  margin: 10px 15px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.no-more-indicator .no-more-text {
  font-size: 14px;
  color: var(--text-color);
  margin-bottom: 4px;
}

.no-more-indicator .no-more-subtext {
  font-size: 12px;
  color: var(--light-text);
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

