:root {
  --primary-color: #1a365d;       /* 经典门户深蓝 */
  --primary-hover: #2b6cb0;
  --accent-red: #c53030;          /* 泰华风格点缀红 */
  --accent-orange: #dd6b20;       /* 商业高亮橙 */
  --bg-color: #f4f6f9;            /* 背景灰 */
  --card-bg: #ffffff;
  --text-main: #2d3748;
  --text-muted: #718096;
  --line-color: #e2e8f0;
  --tag-blue-bg: #ebf8ff;
  --tag-blue-text: #2b6cb0;
  --tag-green-bg: #f0fff4;
  --tag-green-text: #2f855a;
  --tag-orange-bg: #fffaf0;
  --tag-orange-text: #c05621;
  --tag-red-bg: #fff5f5;
  --tag-red-text: #c53030;
  --radius: 6px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.5;
  font-size: 14px;
}
a { text-decoration: none; color: inherit; transition: color 0.15s; }
a:hover { color: var(--accent-red); }

/* --- 1. 顶部小导航条 (Top Bar) --- */
.top-bar {
  background: #2d3748;
  color: #cbd5e0;
  font-size: 12px;
  height: 34px;
  line-height: 34px;
  border-bottom: 1px solid #1a202c;
}
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}
.top-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.top-bar-left span { margin-right: 18px; }
.top-bar-left b { color: #edf2f7; }
.top-bar-right a { color: #cbd5e0; margin-left: 12px; }
.top-bar-right a:hover { color: #fff; text-decoration: underline; }

/* --- 2. 主头部 (Header & Logo) --- */
.header {
  background: #fff;
  border-bottom: 2px solid var(--primary-color);
  padding: 16px 0;
}
.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.logo-area {
  display: flex;
  align-items: center;
  gap: 12px;
}
.logo-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-red));
  border-radius: 8px;
  color: #fff;
  font-size: 22px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}
.logo-text h1 {
  font-size: 22px;
  font-weight: 800;
  color: var(--primary-color);
  letter-spacing: -0.5px;
  line-height: 1.2;
}
.logo-text p {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}
.search-box {
  flex: 1;
  max-width: 460px;
  display: flex;
  border: 2px solid var(--primary-color);
  border-radius: var(--radius);
  overflow: hidden;
}
.search-box input {
  flex: 1;
  padding: 8px 12px;
  border: none;
  outline: none;
  font-size: 13px;
}
.search-box button {
  background: var(--primary-color);
  color: #fff;
  border: none;
  padding: 0 18px;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  transition: background 0.2s;
}
.search-box button:hover { background: var(--primary-hover); }

.header-user {
  display: flex;
  align-items: center;
  gap: 10px;
}
.btn-post {
  background: var(--accent-red);
  color: #fff !important;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.btn-post:hover { background: #9b2c2c; }

/* --- 3. 主导航栏 (Nav Bar) --- */
.main-nav {
  background: var(--primary-color);
  color: #fff;
}
.nav-list {
  display: flex;
  list-style: none;
}
.nav-item a {
  display: block;
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 600;
  color: #e2e8f0;
}
.nav-item.active a, .nav-item a:hover {
  background: rgba(0, 0, 0, 0.2);
  color: #fff;
}
.nav-item.highlight a {
  background: var(--accent-red);
  color: #fff;
}

/* --- 4. 二级金刚区快捷入口 (Quick Category Bar) --- */
.quick-categories {
  background: #fff;
  border: 1px solid var(--line-color);
  border-radius: var(--radius);
  margin-top: 15px;
  padding: 14px 18px;
  box-shadow: var(--shadow-sm);
}
.qc-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 10px;
  text-align: center;
}
.qc-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 8px 4px;
  border-radius: 6px;
  transition: background 0.15s, transform 0.15s;
}
.qc-item:hover {
  background: #edf2f7;
  transform: translateY(-2px);
}
.qc-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  background: #edf2f7;
  color: var(--primary-color);
}
.qc-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
}

/* --- 5. 头条滚动公告条 (Marquee Ticker) --- */
.ticker-bar {
  background: #fff;
  border: 1px solid var(--line-color);
  border-radius: var(--radius);
  margin-top: 12px;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  box-shadow: var(--shadow-sm);
}
.ticker-label {
  background: var(--accent-red);
  color: #fff;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: bold;
  white-space: nowrap;
}
.ticker-content {
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: #4a5568;
}
.ticker-content a { font-weight: 600; color: var(--text-main); }
.ticker-content a:hover { color: var(--accent-red); }

/* --- 6. 核心布局 (Layout Grid: 7 : 3) --- */
.main-content {
  display: grid;
  grid-template-columns: 1fr 330px;
  gap: 16px;
  margin-top: 15px;
  margin-bottom: 40px;
}

/* --- 左侧核心信息流 (Left Column) --- */
.left-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* 焦点轮播与置顶新闻区 */
.focus-news-box {
  background: #fff;
  border: 1px solid var(--line-color);
  border-radius: var(--radius);
  padding: 16px;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 16px;
  box-shadow: var(--shadow-sm);
}
.focus-slider {
  position: relative;
  background: #2d3748;
  border-radius: 6px;
  overflow: hidden;
  height: 200px;
}
.focus-slider img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.slider-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.85));
  color: #fff;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
}
.focus-top-stories h3 {
  font-size: 16px;
  color: var(--accent-red);
  margin-bottom: 8px;
  border-bottom: 1px dashed var(--line-color);
  padding-bottom: 6px;
}
.focus-top-stories ul {
  list-style: none;
}
.focus-top-stories li {
  padding: 5px 0;
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.focus-top-stories li a {
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}
.focus-top-stories li span {
  font-size: 11px;
  color: var(--text-muted);
}

/* 4-Tab 帖子综合聚合模块 (Discuz! 经典Tab) */
.portal-tabs-card {
  background: #fff;
  border: 1px solid var(--line-color);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.tab-header {
  display: flex;
  background: #edf2f7;
  border-bottom: 1px solid var(--line-color);
}
.tab-btn {
  padding: 12px 22px;
  font-weight: 700;
  font-size: 14px;
  color: var(--text-muted);
  cursor: pointer;
  border-right: 1px solid var(--line-color);
  background: #edf2f7;
  transition: all 0.2s;
}
.tab-btn.active {
  background: #fff;
  color: var(--primary-color);
  border-top: 3px solid var(--accent-red);
  margin-top: -1px;
}
.tab-btn:hover:not(.active) {
  background: #e2e8f0;
  color: var(--text-main);
}

/* 帖子流列表项 */
.thread-list {
  padding: 4px 16px;
}
.thread-row {
  display: grid;
  grid-template-columns: 1fr 90px 80px;
  padding: 12px 6px;
  border-bottom: 1px solid #f1f5f9;
  align-items: center;
}
.thread-row:last-child { border-bottom: none; }
.thread-row:hover { background: #fafbfc; }
.thread-main-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-right: 10px;
}
.thread-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}
.thread-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
}
.tag-house { background: var(--tag-blue-bg); color: var(--tag-blue-text); }
.tag-jobs { background: var(--tag-green-bg); color: var(--tag-green-text); }
.tag-second { background: var(--tag-orange-bg); color: var(--tag-orange-text); }
.tag-local { background: var(--tag-red-bg); color: var(--tag-red-text); }
.tag-tech { background: #f3e8ff; color: #7e22ce; }
.tag-sponsor { background: #fef08a; color: #854d0e; }

.thread-sub-meta {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  gap: 12px;
}
.thread-stat {
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
}
.thread-stat b {
  display: block;
  font-size: 13px;
  color: var(--text-main);
}

/* 赞助商原生信息流广告条目 */
.thread-row-sponsor {
  background: #fffdf5;
  border-left: 3px solid var(--accent-orange);
  padding-left: 8px;
}

/* 分类板块聚合网格 (休斯顿二手 / 房产 / 招聘展示区) */
.section-block {
  background: #fff;
  border: 1px solid var(--line-color);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}
.section-title-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 8px;
  margin-bottom: 12px;
}
.section-title-bar h2 {
  font-size: 16px;
  font-weight: 800;
  color: var(--primary-color);
  display: flex;
  align-items: center;
  gap: 6px;
}
.section-title-bar a.more-link {
  font-size: 12px;
  color: var(--text-muted);
}
.section-title-bar a.more-link:hover { color: var(--accent-red); }

.card-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.item-card {
  border: 1px solid var(--line-color);
  border-radius: 6px;
  overflow: hidden;
  background: #fafbfc;
  transition: transform 0.15s, box-shadow 0.15s;
}
.item-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: #cbd5e0;
}
.item-card-img {
  width: 100%;
  height: 110px;
  background: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: #a0aec0;
}
.item-card-body {
  padding: 10px;
}
.item-card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}
.item-card-price {
  font-size: 13px;
  font-weight: bold;
  color: var(--accent-red);
}
.item-card-sub {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
}

/* --- 右侧边栏 (Right Sidebar) --- */
.right-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.side-card {
  background: #fff;
  border: 1px solid var(--line-color);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
}
.side-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--primary-color);
  border-bottom: 1px solid var(--line-color);
  padding-bottom: 8px;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.side-title span.sub {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: normal;
}

/* 官方公告列表 */
.notice-list {
  list-style: none;
}
.notice-list li {
  font-size: 12px;
  padding: 6px 0;
  border-bottom: 1px dashed #f1f5f9;
  display: flex;
  align-items: center;
  gap: 6px;
}
.notice-list li:last-child { border-bottom: none; }
.notice-badge {
  font-size: 10px;
  background: #edf2f7;
  color: #4a5568;
  padding: 1px 4px;
  border-radius: 3px;
  white-space: nowrap;
}

/* 认证师傅/商家专栏 (好师傅休斯顿对接) */
.master-card-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--line-color);
}
.master-card-item:last-child { border-bottom: none; }
.master-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--tag-blue-bg);
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 14px;
}
.master-info { flex: 1; }
.master-name {
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
}
.master-tag {
  font-size: 10px;
  background: #c6f6d5;
  color: #22543d;
  padding: 1px 4px;
  border-radius: 3px;
}
.master-skills {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}
.master-btn {
  font-size: 11px;
  padding: 4px 8px;
  background: #edf2f7;
  color: var(--primary-color);
  border-radius: 4px;
  font-weight: 600;
}
.master-btn:hover { background: var(--primary-color); color: #fff; }

/* 会员榜单 (积分榜 / 发帖榜) */
.rank-tabs {
  display: flex;
  border-bottom: 1px solid var(--line-color);
  margin-bottom: 8px;
}
.rank-tab {
  flex: 1;
  text-align: center;
  padding: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-muted);
}
.rank-tab.active {
  color: var(--primary-color);
  border-bottom: 2px solid var(--primary-color);
}
.rank-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  padding: 5px 0;
}
.rank-num {
  width: 18px;
  height: 18px;
  background: #edf2f7;
  color: #4a5568;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 10px;
  font-weight: bold;
  margin-right: 6px;
}
.rank-num.top3 {
  background: var(--accent-red);
  color: #fff;
}

/* 微信客服与扫码入群挂件 */
.qr-box {
  text-align: center;
  padding: 10px 0;
}
.qr-placeholder {
  width: 130px;
  height: 130px;
  margin: 0 auto 8px;
  background: #edf2f7;
  border: 1px dashed #cbd5e0;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #718096;
  font-size: 11px;
  gap: 4px;
}
.qr-icon { font-size: 32px; color: #48bb78; }
.qr-desc { font-size: 12px; color: var(--text-muted); font-weight: 600; }

/* --- 7. 页脚 (Footer) --- */
.footer {
  background: #2d3748;
  color: #a0aec0;
  padding: 30px 0;
  font-size: 12px;
  line-height: 1.8;
  border-top: 3px solid var(--accent-red);
}
.footer-links {
  display: flex;
  gap: 16px;
  margin-bottom: 10px;
}
.footer-links a { color: #cbd5e0; }
.footer-links a:hover { color: #fff; }

/* --- 8. 手机移动端底部吸底条 (Mobile Bar) --- */
.mobile-bottom-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 52px;
  background: #fff;
  border-top: 1px solid var(--line-color);
  z-index: 1000;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.06);
}
.m-nav-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  height: 100%;
}
.m-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #718096;
  gap: 2px;
}
.m-nav-item.active { color: var(--primary-color); font-weight: bold; }
.m-nav-item.post-btn {
  color: var(--accent-red);
  font-weight: bold;
}
.m-nav-icon { font-size: 18px; }

/* --- 响应式适配 (Media Queries) --- */
@media (max-width: 992px) {
  .qc-grid { grid-template-columns: repeat(4, 1fr); }
  .main-content { grid-template-columns: 1fr; }
  .focus-news-box { grid-template-columns: 1fr; }
  .card-grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .top-bar { display: none; }
  .header-inner { flex-wrap: wrap; }
  .search-box { order: 3; max-width: 100%; width: 100%; }
  .main-nav { overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; }
  .main-nav::-webkit-scrollbar { display: none; }
  .mobile-bottom-bar { display: block; }
  body { padding-bottom: 60px; }
  .thread-row { grid-template-columns: 1fr 60px; }
  .thread-stat:last-child { display: none; }
}
