/* ========== 全局重置 ========== */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --primary: #0061B1;
  --primary-dark: #004A8A;
  --primary-light: #E8F3FB;
  --primary-hover: #3072C6;
  --accent: #FF6B35;
  --accent-light: #FFF4F0;
  --text-primary: #222;
  --text-secondary: #666;
  --text-tertiary: #999;
  --bg-page: #F5F5F6;
  --bg-white: #FFFFFF;
  --border: #E5E5E5;
  --border-light: #F0F0F0;
  --shadow: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-hover: 0 4px 16px rgba(0,97,177,0.12);
  --radius: 8px;
  --radius-lg: 12px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  color: var(--text-primary);
  background: var(--bg-page);
  line-height: 1.6;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); }
img { display: block; max-width: 100%; }
ul, ol { list-style: none; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ========== 顶部导航 ========== */
.navbar {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.navbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 22px;
  font-weight: 700;
  color: var(--primary);
  cursor: pointer;
}
.logo-icon {
  width: 36px;
  height: 36px;
  background: var(--primary);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 20px;
}
.nav-menu {
  display: flex;
  gap: 32px;
  align-items: center;
}
.nav-menu a {
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-menu a:hover, .nav-menu a.active {
  color: var(--primary);
}
.nav-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  white-space: nowrap;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover {
  background: var(--primary-dark);
  color: #fff;
}
.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
}
.btn-outline:hover {
  background: var(--primary-light);
}
.btn-lg {
  padding: 12px 32px;
  font-size: 16px;
}
.btn-block {
  width: 100%;
}

/* ========== 搜索栏 ========== */
.search-section {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  padding: 60px 0;
  text-align: center;
}
.search-section h1 {
  color: #fff;
  font-size: 32px;
  margin-bottom: 8px;
  font-weight: 600;
}
.search-section p {
  color: rgba(255,255,255,0.85);
  font-size: 16px;
  margin-bottom: 32px;
}
.search-bar {
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}
.search-bar select {
  border: none;
  padding: 14px 16px;
  font-size: 14px;
  color: var(--text-secondary);
  background: var(--bg-white);
  border-right: 1px solid var(--border);
  outline: none;
  cursor: pointer;
}
.search-bar input {
  flex: 1;
  border: none;
  padding: 14px 16px;
  font-size: 14px;
  outline: none;
}
.search-bar .btn {
  border-radius: 0;
  padding: 14px 32px;
}
.search-tags {
  max-width: 700px;
  margin: 16px auto 0;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.search-tags span {
  color: rgba(255,255,255,0.8);
  font-size: 13px;
}
.search-tags a {
  color: rgba(255,255,255,0.9);
  font-size: 13px;
  padding: 2px 10px;
  background: rgba(255,255,255,0.15);
  border-radius: 4px;
}

/* ========== 通用区块 ========== */
.section {
  padding: 40px 0;
}
.section-white {
  background: var(--bg-white);
}
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.section-title {
  font-size: 22px;
  font-weight: 600;
  color: var(--text-primary);
}
.section-more {
  font-size: 14px;
  color: var(--text-secondary);
}

/* ========== 房源卡片 ========== */
.house-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.house-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: var(--shadow);
}
.house-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}
.house-img {
  width: 100%;
  height: 200px;
  background: #E8E8E8;
  position: relative;
  overflow: hidden;
}
.house-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.house-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 4px;
}
.house-info {
  padding: 12px 14px;
}
.house-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.house-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.house-tags {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.house-tags span {
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 3px;
  background: var(--primary-light);
  color: var(--primary);
}
.house-price {
  font-size: 13px;
  color: var(--text-tertiary);
}
.house-price strong {
  font-size: 20px;
  color: var(--accent);
  font-weight: 700;
}
.house-price .unit {
  font-size: 12px;
  color: var(--text-tertiary);
}

/* ========== 分类入口 ========== */
.category-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}
.category-item {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: var(--shadow);
}
.category-item:hover {
  background: var(--primary-light);
}
.category-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  font-size: 22px;
}
.category-name {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.category-count {
  font-size: 12px;
  color: var(--text-tertiary);
}

/* ========== 公司简介 ========== */
.intro-section {
  display: flex;
  gap: 40px;
  align-items: center;
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow);
}
.intro-text {
  flex: 1;
}
.intro-text h2 {
  font-size: 24px;
  margin-bottom: 16px;
  color: var(--text-primary);
}
.intro-text p {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 12px;
}
.intro-stats {
  display: flex;
  gap: 40px;
  margin-top: 20px;
}
.intro-stat strong {
  display: block;
  font-size: 28px;
  color: var(--primary);
  font-weight: 700;
}
.intro-stat span {
  font-size: 13px;
  color: var(--text-tertiary);
}

/* ========== 底部信息栏 ========== */
.footer {
  background: #1A1A1A;
  color: #999;
  padding: 40px 0 20px;
  margin-top: 40px;
}
.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid #333;
}
.footer-brand h3 {
  color: #fff;
  font-size: 20px;
  margin-bottom: 12px;
}
.footer-brand p {
  font-size: 13px;
  line-height: 1.8;
  color: #888;
}
.footer-col h4 {
  color: #ccc;
  font-size: 14px;
  margin-bottom: 12px;
}
.footer-col a {
  display: block;
  color: #888;
  font-size: 13px;
  margin-bottom: 8px;
  transition: color 0.2s;
}
.footer-col a:hover {
  color: #fff;
}
.footer-bottom {
  padding-top: 20px;
  text-align: center;
  font-size: 12px;
  color: #666;
  line-height: 2;
}
.footer-bottom a {
  color: #888;
  margin: 0 6px;
}
.footer-bottom a:hover {
  color: #ccc;
}
.icp-info {
  margin-top: 8px;
}
.icp-info a {
  display: inline;
}

/* ========== 合规页面 ========== */
.legal-content {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow);
  max-width: 900px;
  margin: 0 auto;
}
.legal-content h1 {
  font-size: 26px;
  text-align: center;
  margin-bottom: 8px;
  color: var(--text-primary);
}
.legal-content .update-date {
  text-align: center;
  color: var(--text-tertiary);
  font-size: 13px;
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-light);
}
.legal-content h2 {
  font-size: 18px;
  margin: 24px 0 12px;
  color: var(--text-primary);
}
.legal-content h3 {
  font-size: 15px;
  margin: 16px 0 8px;
  color: var(--text-primary);
}
.legal-content p {
  margin-bottom: 12px;
  color: var(--text-secondary);
  line-height: 1.8;
}
.legal-content ul, .legal-content ol {
  margin: 8px 0 16px 20px;
}
.legal-content li {
  margin-bottom: 6px;
  color: var(--text-secondary);
  line-height: 1.8;
}
.legal-content ol li {
  list-style: decimal;
}
.legal-content ul li {
  list-style: disc;
}

/* ========== 页面banner ========== */
.page-banner {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  padding: 40px 0;
  text-align: center;
}
.page-banner h1 {
  color: #fff;
  font-size: 28px;
  margin-bottom: 8px;
}
.page-banner p {
  color: rgba(255,255,255,0.85);
  font-size: 15px;
}

/* ========== 面包屑 ========== */
.breadcrumb {
  padding: 16px 0;
  font-size: 13px;
  color: var(--text-tertiary);
}
.breadcrumb a {
  color: var(--text-secondary);
}
.breadcrumb span {
  margin: 0 8px;
}

/* ========== 筛选栏 ========== */
.filter-bar {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}
.filter-row {
  display: flex;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-light);
}
.filter-row:last-child {
  border-bottom: none;
}
.filter-label {
  width: 80px;
  font-size: 14px;
  color: var(--text-secondary);
  flex-shrink: 0;
}
.filter-options {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.filter-options a {
  font-size: 13px;
  color: var(--text-secondary);
  padding: 4px 10px;
  border-radius: 4px;
  transition: all 0.2s;
}
.filter-options a:hover, .filter-options a.active {
  background: var(--primary);
  color: #fff;
}

/* ========== 房源详情 ========== */
.detail-gallery {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}
.detail-main-img {
  width: 100%;
  height: 400px;
  background: #E8E8E8;
  overflow: hidden;
}
.detail-main-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.detail-thumbs {
  display: flex;
  gap: 8px;
  padding: 12px;
  overflow-x: auto;
}
.detail-thumb {
  width: 100px;
  height: 75px;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  flex-shrink: 0;
  border: 2px solid transparent;
}
.detail-thumb.active {
  border-color: var(--primary);
}
.detail-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.detail-body {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 20px;
}
.detail-info {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
}
.detail-info h2 {
  font-size: 22px;
  margin-bottom: 12px;
}
.detail-price-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 16px;
  background: var(--accent-light);
  border-radius: var(--radius);
  margin-bottom: 20px;
}
.detail-price-row strong {
  font-size: 32px;
  color: var(--accent);
  font-weight: 700;
}
.detail-price-row span {
  font-size: 14px;
  color: var(--text-secondary);
}
.detail-attrs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.detail-attr {
  padding: 12px 16px;
  background: var(--bg-page);
  border-radius: var(--radius);
}
.detail-attr label {
  display: block;
  font-size: 12px;
  color: var(--text-tertiary);
  margin-bottom: 4px;
}
.detail-attr span {
  font-size: 15px;
  color: var(--text-primary);
  font-weight: 500;
}
.detail-desc {
  line-height: 1.8;
  color: var(--text-secondary);
}
.detail-desc h3 {
  font-size: 16px;
  color: var(--text-primary);
  margin: 20px 0 10px;
}
.detail-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.contact-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
  text-align: center;
}
.contact-card h3 {
  font-size: 18px;
  margin-bottom: 16px;
}
.contact-card .avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  font-size: 28px;
}
.contact-card .name {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 4px;
}
.contact-card .role {
  font-size: 13px;
  color: var(--text-tertiary);
  margin-bottom: 16px;
}

/* ========== 登录注册 ========== */
.auth-page {
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
}
.auth-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 40px;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow);
}
.auth-tabs {
  display: flex;
  margin-bottom: 32px;
  border-bottom: 2px solid var(--border-light);
}
.auth-tab {
  flex: 1;
  text-align: center;
  padding: 12px;
  font-size: 16px;
  font-weight: 500;
  color: var(--text-tertiary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s;
}
.auth-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}
.form-group {
  margin-bottom: 20px;
}
.form-group label {
  display: block;
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.form-group input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  outline: none;
  transition: border 0.2s;
}
.form-group input:focus {
  border-color: var(--primary);
}
.form-group .input-group {
  display: flex;
  gap: 8px;
}
.form-group .input-group input {
  flex: 1;
}
.form-group .input-group button {
  white-space: nowrap;
  padding: 12px 16px;
  font-size: 13px;
  background: var(--bg-page);
  color: var(--primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
}
.form-group .input-group button:hover {
  background: var(--primary-light);
}
.auth-footer {
  text-align: center;
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-tertiary);
}

/* ========== 个人中心 ========== */
.profile-page {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 20px;
  padding: 20px 0;
}
.profile-sidebar {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 24px 16px;
  box-shadow: var(--shadow);
  height: fit-content;
}
.profile-avatar {
  text-align: center;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-light);
}
.profile-avatar .avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 8px;
  font-size: 28px;
}
.profile-avatar .name {
  font-size: 16px;
  font-weight: 500;
}
.profile-menu a {
  display: block;
  padding: 10px 12px;
  font-size: 14px;
  color: var(--text-secondary);
  border-radius: var(--radius);
  margin-bottom: 4px;
  transition: all 0.2s;
}
.profile-menu a:hover, .profile-menu a.active {
  background: var(--primary-light);
  color: var(--primary);
}
.profile-content {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
}
.profile-content h2 {
  font-size: 18px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
}
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-tertiary);
}
.empty-state .icon {
  font-size: 48px;
  margin-bottom: 12px;
}
.empty-state p {
  font-size: 14px;
  margin-bottom: 16px;
}

/* ========== 关于我们 ========== */
.about-section {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}
.about-section h2 {
  font-size: 20px;
  margin-bottom: 16px;
  color: var(--text-primary);
}
.about-section p {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 12px;
}
.about-contact {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 20px;
}
.about-contact-item {
  padding: 16px 20px;
  background: var(--bg-page);
  border-radius: var(--radius);
}
.about-contact-item label {
  display: block;
  font-size: 12px;
  color: var(--text-tertiary);
  margin-bottom: 4px;
}
.about-contact-item span {
  font-size: 15px;
  color: var(--text-primary);
  font-weight: 500;
}

/* ========== 响应式 ========== */
@media (max-width: 1024px) {
  .house-grid { grid-template-columns: repeat(3, 1fr); }
  .category-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .house-grid { grid-template-columns: repeat(2, 1fr); }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .detail-body { grid-template-columns: 1fr; }
  .detail-attrs { grid-template-columns: 1fr 1fr; }
  .footer-top { grid-template-columns: 1fr; }
  .intro-section { flex-direction: column; padding: 24px; }
  .profile-page { grid-template-columns: 1fr; }
  .nav-menu { display: none; }
  .search-section h1 { font-size: 24px; }
  .about-contact { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .house-grid { grid-template-columns: 1fr; }
  .category-grid { grid-template-columns: 1fr; }
  .detail-attrs { grid-template-columns: 1fr; }
}
