/* 全局样式 */
* { margin:0; padding:0; box-sizing:border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, sans-serif; background:#1a1a1a; color:#fff; overflow-x:hidden; }

/* 欢迎页 */
#welcome { position:fixed; inset:0; z-index:9999; background:#1a1a1a; display:flex; flex-direction:column; align-items:center; justify-content:center; }
#welcome.hidden { display:none; }
.bird-wrap { width:120px; height:100px; animation:floaty 2.2s ease-in-out infinite; }
@keyframes floaty { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-14px)} }
.tap-hint { margin-top:28px; font-size:0.95rem; color:#888; animation:blink 1.6s infinite; }
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0.35} }
.hand-wrap { position:absolute; right:10%; bottom:26%; width:80px; height:80px; transform:rotate(-45deg); animation:handPulse 2s infinite; }
@keyframes handPulse { 0%,100%{transform:rotate(-45deg) scale(1);opacity:0.5} 50%{transform:rotate(-45deg) scale(1.08);opacity:0.9} }
.brand { position:absolute; bottom:48px; }
.brand h1 { font-size:2.6rem; font-weight:800; color:#3CBAA8; }

/* 语言下拉 */
.header { padding:16px; display:flex; justify-content:flex-end; }
.lang-wrap { position:relative; }
.lang-selector { position:relative; display:flex; align-items:center; gap:4px; padding:6px 12px; background:transparent; border:1px solid #3CBAA8; border-radius:20px; cursor:pointer; color:#3CBAA8; font-size:0.85rem; }
.lang-btn { padding:8px 16px; border:1px solid #444; border-radius:20px; background:transparent; color:#3CBAA8; font-size:0.85rem; cursor:pointer; }
.lang-menu { position:absolute; right:0; top:100%; margin-top:6px; min-width:140px; background:#222; border:1px solid #333; border-radius:10px; display:none; z-index:100; }
.lang-menu.show { display:block; }
.lang-item { padding:12px 16px; font-size:0.85rem; color:#ccc; cursor:pointer; }
.lang-item:hover { background:#333; }
.lang-item:first-child { border-radius:10px 10px 0 0; }
.lang-item:last-child { border-radius:0 0 10px 10px; }

/* 页面 */
.page { display:none; padding:0 16px 20px; }
.page.active { display:block; }
#districtSelect { background:#fff; min-height:100vh; }

/* 城市选择 */
.city-title { text-align:center; margin:20px 0; }
.city-title h2 { font-size:1.6rem; }
.city-title p { margin-top:6px; color:#999; font-size:0.9rem; }
.city-card { position:relative; width:100%; aspect-ratio:16/9; border-radius:16px; overflow:hidden; margin-bottom:12px; cursor:pointer; }
.city-card img { width:100%; height:100%; object-fit:cover; }
.city-name { position:absolute; left:16px; bottom:16px; font-size:1.3rem; font-weight:700; }
.current-loc { display:flex; align-items:center; gap:8px; color:#3CBAA8; font-size:0.85rem; margin-bottom:12px; }

/* 片区选择 - 新设计风格（白色主题） */
.back-btn { padding:8px 0; color:#666; cursor:pointer; font-size:0.9rem; }

/* Wheatie 提示泡 */
.wheatie-bubble {
  background: #ffe4e1;
  border-radius: 16px;
  padding: 14px 18px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
  color: #333;
  line-height: 1.4;
}
.wheatie-avatar {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}
.wheatie-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff6b6b;
  display: inline-block;
}

/* 搜索框 */
.search-box { margin-bottom: 24px; }
.search-input-wrap {
  position: relative;
  width: 100%;
}
.search-input-wrap input {
  width: 100%;
  padding: 14px 16px 14px 44px;
  border-radius: 12px;
  border: 1px solid #e0e0e0;
  background: #f5f5f5;
  color: #333;
  font-size: 0.9rem;
  outline: none;
}
.search-input-wrap input::placeholder { color: #999; }
.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #999;
  font-size: 0.9rem;
}

/* 片区卡片 */
.district-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 16px;
  border: 1px solid #f0f0f0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.district-card .card-image-wrap {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
}
.district-card .card-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.district-card .desc {
  padding: 16px 20px 20px;
  text-align: center;
}
.district-card .title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 4px;
}
.district-card .subtitle {
  font-size: 0.85rem;
  color: #999;
  margin-bottom: 16px;
}
.explore-btn {
  width: 100%;
  padding: 14px;
  border-radius: 24px;
  border: none;
  background: #5CB8B2;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.5px;
}
.explore-btn:hover { background: #4AA89F; }

/* Featured 标签 */
.featured-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: #5CB8B2;
  color: #fff;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* 位置提示 */
.location-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #5CB8B2;
  font-size: 0.85rem;
  margin: -8px 0 16px 4px;
}
.loc-icon { font-size: 1rem; }

/* 底部文字 */
.district-footer {
  text-align: center;
  color: #999;
  font-size: 0.8rem;
  margin-top: 8px;
  padding-bottom: 20px;
}

/* 登录/注册弹窗 - 白色主题 */
.modal { position:fixed; inset:0; z-index:9998; background:rgba(0,0,0,0.5); display:none; align-items:center; justify-content:center; padding:20px; }
.modal.show { display:flex; }
.modal-content { width:100%; max-width:380px; background:#fff; border-radius:20px; overflow:hidden; box-shadow:0 8px 32px rgba(0,0,0,0.15); }
.modal-header { padding:28px 24px 0; text-align:center; }
.modal-header h3 { font-size:1.4rem; font-weight:700; color:#1a1a1a; margin-bottom:6px; }
.modal-subtitle { font-size:0.9rem; color:#888; }
.modal-body { padding:24px; }
.form-group { margin-bottom:18px; }
.form-group label { display:block; font-size:0.85rem; color:#666; margin-bottom:8px; font-weight:500; }
.form-group input, .form-group select { width:100%; padding:14px 16px; border-radius:12px; border:1px solid #e0e0e0; background:#f8f8f8; color:#333; font-size:0.95rem; outline:none; transition:border-color 0.2s; }
.form-group input:focus, .form-group select:focus { border-color:#5CB8B2; background:#fff; }
.form-group input::placeholder { color:#aaa; }
.modal .btn-primary { width:100%; padding:15px; background:#5CB8B2; border:none; border-radius:25px; color:#fff; font-size:1rem; font-weight:600; cursor:pointer; margin-top:8px; transition:background 0.2s; }
.modal .btn-primary:hover { background:#4AA89F; }
.modal .btn-row { display:flex; justify-content:center; gap:16px; margin-top:20px; }
.modal .btn-link { background:none; border:none; color:#5CB8B2; font-size:0.9rem; cursor:pointer; padding:8px 16px; }
.modal .btn-cancel { padding:12px 24px; background:transparent; border:1px solid #ddd; border-radius:20px; color:#888; font-size:0.9rem; cursor:pointer; }
.modal .btn-save { padding:12px 24px; background:#5CB8B2; border:none; border-radius:20px; color:#fff; font-size:0.9rem; font-weight:600; cursor:pointer; }

/* 注册弹窗 - 可滚动 */
.modal-scroll-wrap { width:100%; max-width:400px; max-height:90vh; background:#fff; border-radius:20px; overflow:hidden; box-shadow:0 8px 32px rgba(0,0,0,0.15); display:flex; flex-direction:column; }
.reg-content { padding:24px 24px 16px; overflow-y:auto; text-align:center; }
.reg-content::-webkit-scrollbar { width:4px; }
.reg-content::-webkit-scrollbar-thumb { background:#ddd; border-radius:2px; }
.reg-logo { margin-bottom:8px; }
.reg-title { font-size:1.3rem; font-weight:700; color:#1a1a1a; margin-bottom:4px; }
.reg-subtitle { font-size:0.85rem; color:#888; margin-bottom:20px; }

.reg-form { text-align:left; }
.reg-field { margin-bottom:16px; }
.reg-field label { display:block; font-size:0.8rem; color:#555; margin-bottom:6px; font-weight:500; }
.reg-field input, .reg-field select { width:100%; padding:12px 14px; border-radius:10px; border:1px solid #e8e8e8; background:#fafafa; color:#333; font-size:0.9rem; outline:none; }
.reg-field input:focus, .reg-field select:focus { border-color:#5CB8B2; background:#fff; }
.reg-field input::placeholder { color:#bbb; }
.char-hint { font-size:0.7rem; color:#aaa; text-align:right; margin-top:2px; }

/* 头像选择 */
.avatar-list { display:flex; gap:10px; align-items:center; }
.avatar-add { width:48px; height:48px; border:2px dashed #ddd; border-radius:12px; display:flex; align-items:center; justify-content:center; cursor:pointer; color:#aaa; font-size:1.4rem; transition:border-color 0.2s; }
.avatar-add:hover { border-color:#5CB8B2; color:#5CB8B2; }
.avatar-item { width:52px; height:52px; border-radius:12px; overflow:hidden; cursor:pointer; border:2px solid transparent; transition:border-color 0.2s; display:flex; align-items:center; justify-content:center; background:#f5f5f5; }
.avatar-item:hover { border-color:#ddd; }
.avatar-item.active { border-color:#5CB8B2; }

/* 语言标签 */
.lang-tags { display:flex; gap:8px; flex-wrap:wrap; }
.lang-tag { padding:8px 16px; border-radius:20px; border:1px solid #e0e0e0; background:#fff; color:#666; font-size:0.8rem; cursor:pointer; transition:all 0.2s; }
.lang-tag:hover { border-color:#5CB8B2; color:#5CB8B2; }
.lang-tag.active { background:#5CB8B2; border-color:#5CB8B2; color:#fff; }

/* 性别标签 */
.gender-select { display:flex; gap:8px; flex-wrap:wrap; }
.gender-tag { padding:8px 16px; border-radius:20px; border:1px solid #e0e0e0; background:#fff; color:#666; font-size:0.8rem; cursor:pointer; transition:all 0.2s; }
.gender-tag:hover { border-color:#5CB8B2; color:#5CB8B2; }
.gender-tag.active { background:#5CB8B2; border-color:#5CB8B2; color:#fff; }

/* 注册提交按钮 */
.reg-submit { width:100%; padding:14px; border-radius:25px; border:none; background:#5CB8B2; color:#fff; font-size:1rem; font-weight:600; cursor:pointer; margin-top:8px; transition:background 0.2s; }
.reg-submit:hover { background:#4AA89F; }
.reg-skip { text-align:center; padding:12px; color:#aaa; font-size:0.85rem; cursor:pointer; margin-top:4px; }
.reg-terms { text-align:center; font-size:0.7rem; color:#aaa; margin-top:8px; }
.reg-terms a { color:#5CB8B2; text-decoration:none; }

/* Toast 提示模态框 */
.toast-modal { position:fixed; top:0; left:0; width:100%; height:100%; background:rgba(0,0,0,0.5); display:none; align-items:center; justify-content:center; z-index:9999; }
.toast-modal.show { display:flex; }
.toast-content { background:#fff; border-radius:16px; padding:24px 32px; max-width:280px; width:80%; text-align:center; box-shadow:0 4px 20px rgba(0,0,0,0.15); }
.toast-icon { font-size:40px; margin-bottom:12px; }
.toast-message { font-size:15px; color:#333; line-height:1.5; }

/* 主界面 */
#mainApp { display:none; height:100vh; background:#F7F3EE; color:#333; }
.tab-bar { position:fixed; bottom:0; left:0; right:0; height:56px; background:#fff; display:flex; justify-content:space-around; align-items:center; border-top:1px solid #eee; }
.tab-bar a { color:#666; font-size:0.75rem; text-decoration:none; }
.tab-bar a.active { color:#C45C26; }
.map-area { height:calc(100vh - 56px); background:#e5e5e5; display:flex; align-items:center; justify-content:center; color:#999; }

/* ==========================================
   响应式适配 - 平板/PC
   ========================================== */
@media (min-width: 768px) {
  #districtSelect > * {
    max-width: 768px;
    margin-left: auto;
    margin-right: auto;
  }
  #districtSelect {
    padding-left: 0;
    padding-right: 0;
  }
  #districtSelect .page {
    padding-left: 16px;
    padding-right: 16px;
  }
}

@media (min-width: 1024px) {
  body {
    background: #d0d0d0;
  }
  #districtSelect > * {
    max-width: 500px;
  }
  #districtSelect {
    max-width: 100%;
  }
  .city-card {
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
  }
  .district-card {
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
  }
  .modal {
    align-items: center;
  }
  .modal .modal-content {
    max-width: 500px;
  }
}
