:root {
  --primary: #00798C;
  --primary-dark: #005f6e;
  --primary-light: #e0f4f7;
}

/* Override Bootstrap primary */
.btn-primary { background-color: var(--primary); border-color: var(--primary); }
.btn-primary:hover, .btn-primary:focus { background-color: var(--primary-dark); border-color: var(--primary-dark); }
.btn-outline-primary { color: var(--primary); border-color: var(--primary); }
.btn-outline-primary:hover { background-color: var(--primary); border-color: var(--primary); }
.text-primary { color: var(--primary) !important; }
.bg-primary { background-color: var(--primary) !important; }
.border-primary { border-color: var(--primary) !important; }
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 .2rem rgba(0,121,140,.2); }
.form-check-input:checked { background-color: var(--primary); border-color: var(--primary); }
.badge.bg-primary { background-color: var(--primary) !important; }
.badge.text-bg-primary { background-color: var(--primary) !important; }

/* Fonts */
body { 
  font-family: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif; 
  background: #f8f9fa;
  font-size: 18px; /* 基础字体 16px → 18px */
}

/* Brand logo */
.brand-logo {
  width: 36px; height: 36px;
  background: var(--primary);
  color: white;
  font-weight: 700; font-size: 18px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
}

/* Ad card */
.ad-card { transition: transform .15s, box-shadow .15s; }
.ad-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,.1) !important; }
.ad-thumb { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }

/* Bottom Nav */
.bottom-nav { padding-bottom: env(safe-area-inset-bottom); z-index: 1030; }
.bottom-nav-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 8px 4px; text-decoration: none; color: #6c757d; font-size: 14px; gap: 3px;
  transition: color .2s;
}
.bottom-nav-item i { font-size: 26px; }
.bottom-nav-item.active, .bottom-nav-item:hover { color: var(--primary); }
.upload-circle {
  width: 52px; height: 52px;
  background: var(--primary); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 28px;
  box-shadow: 0 4px 12px rgba(0,121,140,.4);
  margin-bottom: 0;
}
.bottom-nav-item.upload-btn { padding-top: 0; margin-top: -18px; }

/* Page padding for bottom nav on mobile */
@media (max-width: 991.98px) {
  body { padding-bottom: 70px; }
}

/* Spinner */
.spinner-hcb {
  width: 40px; height: 40px;
  border: 4px solid rgba(0,121,140,.2);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .8s linear infinite;
  margin: 40px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Banner carousel */
.banner-img { width: 100%; height: 180px; object-fit: cover; border-radius: 12px; }
@media (min-width: 768px) { .banner-img { height: 280px; } }

/* Category pill */
.cat-pill {
  white-space: nowrap; padding: 10px 20px;
  border: 2px solid #e0e0e0; border-radius: 999px;
  font-size: 18px; font-weight: 600; color: #333;
  cursor: pointer; background: white; transition: all .15s;
  text-decoration: none;
  display: inline-block;
}
.cat-pill:hover, .cat-pill.active { 
  background: var(--primary); 
  border-color: var(--primary); 
  color: white !important; 
}
.cat-pill:focus {
  box-shadow: none;
  outline: none;
}

/* 城市选择弹窗样式 */
#cityModal .modal-body {
  padding: 20px;
}
#cityModal .btn-outline-primary {
  border-width: 2px;
  font-weight: 600;
}
#cityModal .btn-outline-primary:hover {
  background: var(--primary);
  color: white;
  transform: translateX(5px);
}

/* 字母导航 */
#letter-nav {
  width: 30px;
  position: fixed;
  right: 20px;
  top: 80px;
  max-height: calc(100vh - 160px);
  overflow-y: auto;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 15px;
  padding: 10px 5px !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  z-index: 10;
}
#letter-nav .letter-link {
  transition: all 0.2s;
  line-height: 1.3;
  font-size: 18px !important;
  display: block;
  text-align: center;
  padding: 3px 0 !important;
}
#letter-nav .letter-link:hover {
  color: var(--primary-dark) !important;
  font-size: 20px !important;
  font-weight: 700 !important;
}
#letter-nav::-webkit-scrollbar {
  width: 0;
  display: none;
}
.letter-header {
  border-bottom: 1px solid #e0e0e0;
  margin-bottom: 5px;
}

/* Chat bubble */
.chat-bubble { max-width: 72%; padding: 10px 14px; border-radius: 18px; font-size: 14px; line-height: 1.5; }
.chat-bubble.mine { background: var(--primary); color: white; border-bottom-right-radius: 4px; }
.chat-bubble.theirs { background: white; color: #222; border-bottom-left-radius: 4px; box-shadow: 0 1px 4px rgba(0,0,0,.08); }

/* Auth pages */
.auth-card { max-width: 420px; margin: 40px auto; background: white; border-radius: 20px; padding: 36px 32px; box-shadow: 0 4px 32px rgba(0,0,0,.08); }
@media (max-width: 576px) { .auth-card { margin: 16px; padding: 28px 20px; border-radius: 16px; } }

/* Star rating */
.star-rating .star { font-size: 28px; cursor: pointer; color: #ddd; transition: color .1s; }
.star-rating .star.active, .star-rating .star:hover { color: #f5a623; }

/* Image gallery thumbnails */
.thumb-img { width: 70px; height: 70px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid transparent; transition: border-color .15s; }
.thumb-img.active { border-color: var(--primary); }

/* Full-screen lightbox */
#lightbox { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.92); z-index: 9999; justify-content: center; align-items: center; }
#lightbox.show { display: flex; }
#lightbox img { max-width: 95vw; max-height: 90vh; object-fit: contain; border-radius: 8px; }

/* OTP inputs */
.otp-input { width: 56px; height: 64px; font-size: 28px; text-align: center; border: 2px solid #dee2e6; border-radius: 12px; }
.otp-input:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px rgba(0,121,140,.15); }
@media (max-width: 400px) { .otp-input { width: 48px; height: 56px; font-size: 22px; } }

/* Upload ad steps */
.step-dot { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; }
.step-dot.done { background: var(--primary); color: white; }
.step-dot.active { background: var(--primary); color: white; box-shadow: 0 0 0 4px rgba(0,121,140,.25); }
.step-dot.pending { background: #e9ecef; color: #aaa; }
.step-line { flex: 1; height: 2px; background: #e9ecef; }
.step-line.done { background: var(--primary); }

/* Photo upload grid */
.photo-slot { aspect-ratio: 1; border: 2px dashed #ddd; border-radius: 10px; display: flex; align-items: center; justify-content: center; cursor: pointer; overflow: hidden; position: relative; }
.photo-slot img { width: 100%; height: 100%; object-fit: cover; }
.photo-slot .remove-photo { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; background: rgba(220,53,69,.85); border-radius: 50%; color: white; font-size: 12px; display: flex; align-items: center; justify-content: center; cursor: pointer; }

/* Page header back btn */
.page-header { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.back-btn { 
  width: 44px; height: 44px; 
  border-radius: 50%; border: none; 
  background: white; 
  box-shadow: 0 1px 4px rgba(0,0,0,.12); 
  display: flex; align-items: center; justify-content: center; 
  cursor: pointer; flex-shrink: 0;
  font-size: 20px;
}
.back-btn:hover {
  background: #f8f9fa;
}

/* Section card */
.section-card { background: white; border-radius: 16px; padding: 16px; box-shadow: 0 1px 6px rgba(0,0,0,.06); margin-bottom: 16px; }

/* Responsive grid for ads */
.ads-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 576px) { .ads-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 768px) { .ads-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1200px) { .ads-grid { grid-template-columns: repeat(5, 1fr); } }

/* 分页按钮 - 适合中老年用户 */
.pagination .page-link { 
  font-size: 18px; 
  padding: 12px 18px; 
  min-width: 48px;
  font-weight: 600;
}
.pagination .page-item.active .page-link {
  background-color: var(--primary);
  border-color: var(--primary);
}

/* 导航栏搜索框和按钮 - 增大字体 */
.navbar .form-control {
  font-size: 18px;
  padding: 12px 20px;
}
.navbar .btn {
  font-size: 18px;
  padding: 12px 20px;
}
.navbar-brand {
  font-size: 22px;
}

/* 隐藏滚动条 */
.hide-scrollbar::-webkit-scrollbar { display: none; }
.hide-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
