/* ===== 视频看房频道 样式（浅蓝主题 · 自包含） ===== */
:root{
  --bg:#e9f2fc; --bg2:#d7e8fb; --card:#ffffff; --line:#cfe0f4;
  --primary:#2f7be0; --primary-d:#1f5fc0; --primary-l:#e3effd;
  --ink:#16243a; --sub:#5d7390; --soft:#7c91ab;
  --price:#ff5a46; --gold:#f2a900; --ok:#1faf6b; --err:#e8553f;
  --shadow:0 10px 34px rgba(31,95,192,.16);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  background: linear-gradient(160deg, var(--bg) 0%, var(--bg2) 100%);
  color: var(--ink);
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  height: 100vh; overflow: hidden;
}
body.embed { background: var(--bg); }

/* ===== 顶部品牌栏 + 搜索栏 + 分类标签 ===== */
.ch-top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 30;
  background: rgba(255,255,255,.82); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.ch-bar { height: 48px; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; }
.ch-brand { font-size: 19px; font-weight: 800; color: var(--ink); letter-spacing: .5px; }
.ch-brand .dot {
  display: inline-block; width: 22px; height: 22px; line-height: 22px; text-align: center;
  background: linear-gradient(135deg, var(--primary), #5aa0f2); color: #fff;
  border-radius: 7px; font-size: 12px; margin-right: 8px; transform: translateY(2px);
}
.ch-sub { font-size: 12px; color: var(--sub); white-space: nowrap; }

/* 搜索栏（移植自 localhost/video.php 模版） */
.ch-search-wrap { padding: 0 14px 8px; }
.ch-search {
  display: flex; align-items: center; gap: 8px; max-width: 680px; margin: 0 auto;
  background: #fff; border: 2px solid var(--primary); border-radius: 28px; padding: 4px 4px 4px 16px;
  box-shadow: 0 4px 14px rgba(31,95,192,.12);
}
.ch-search-ico { font-size: 16px; }
.ch-search input {
  flex: 1; border: none; outline: none; background: transparent;
  font-size: 14px; color: var(--ink); padding: 8px 0;
}
.ch-search input::placeholder { color: var(--soft); }
.ch-search-btn {
  flex: 0 0 auto; border: none; cursor: pointer;
  background: linear-gradient(90deg, var(--primary), var(--primary-d));
  color: #fff; font-size: 14px; font-weight: 700;
  border-radius: 22px; padding: 9px 20px; white-space: nowrap;
  transition: transform .12s;
}
.ch-search-btn:active { transform: scale(.96); }

/* 快捷标签 */
.ch-quick-tags {
  display: flex; flex-wrap: wrap; gap: 8px; max-width: 680px; margin: 10px auto 0;
  justify-content: center;
}
.ch-quick-tags .qt {
  font-size: 12px; color: var(--primary-d); background: var(--primary-l);
  padding: 4px 14px; border-radius: 14px; text-decoration: none; font-weight: 600;
  transition: all .2s; white-space: nowrap;
}
.ch-quick-tags .qt:hover { background: var(--primary); color: #fff; }

.ch-tabs { display: flex; gap: 8px; padding: 0 14px 10px; overflow-x: auto; scrollbar-width: none; }
.ch-tabs::-webkit-scrollbar { display: none; }
.ch-tab {
  flex: 0 0 auto; border: 1px solid var(--line); background: #fff; color: var(--sub);
  padding: 6px 16px; border-radius: 20px; font-size: 13px; font-weight: 700; cursor: pointer;
  transition: all .2s; white-space: nowrap;
}
.ch-tab.on { background: linear-gradient(90deg, var(--primary), var(--primary-d)); color: #fff; border-color: transparent; box-shadow: 0 4px 12px rgba(31,95,192,.3); }

/* ===== 视频流（桌面居中专栏 + 浅蓝留白） ===== */
.feed {
  height: 100vh; overflow-y: auto; scroll-snap-type: y mandatory; -webkit-overflow-scrolling: touch;
  max-width: 480px; margin: 0 auto;
}
body:not(.embed) .feed { height: calc(100vh - 196px); margin-top: 196px; }
body.embed .feed { max-width: 100%; }
.feed-item {
  position: relative; height: 100vh; scroll-snap-align: start;
  display: flex; align-items: center; justify-content: center; background: #0b1a30;
}
body:not(.embed) .feed-item { height: calc(100vh - 196px); }
.feed-video { width: 100%; height: 100%; object-fit: cover; background: #0b1a30; }
.feed-mute {
  position: absolute; right: 14px; top: 14px; z-index: 12;
  width: 40px; height: 40px; border-radius: 50%; border: none;
  background: rgba(255,255,255,.85); color: var(--ink); font-size: 17px; cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,.18);
}
body:not(.embed) .feed-mute { top: 14px; }
.feed-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255,255,255,.25); z-index: 12; }
.feed-progress > i { display: block; height: 100%; width: 0; background: var(--primary); transition: width .15s linear; }

/* ===== 底部信息卡（浅色磨砂） ===== */
.feed-overlay {
  position: absolute; left: 12px; right: 12px; bottom: 14px; z-index: 10;
  background: rgba(255,255,255,.94); backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.6); border-radius: 18px; padding: 15px 16px 16px;
  box-shadow: var(--shadow); color: var(--ink); max-width: none;
}
.fo-tag {
  display: inline-block; font-size: 11px; color: var(--primary-d); background: var(--primary-l);
  padding: 2px 9px; border-radius: 10px; font-weight: 800; margin-bottom: 8px;
}
.fo-title { font-size: 18px; margin: 0 0 7px; line-height: 1.32; font-weight: 800; }
.fo-price { font-size: 25px; font-weight: 800; color: var(--price); }
.fo-unit { font-size: 12px; color: var(--soft); font-weight: 500; margin-left: 4px; }
.fo-meta { font-size: 14px; color: var(--ink); margin-top: 6px; font-weight: 600; }
.fo-meta2 { font-size: 13px; color: var(--sub); margin-top: 2px; }
.fo-tags { margin: 9px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.fo-tags span {
  font-size: 12px; color: var(--gold); border: 1px solid rgba(242,169,0,.45);
  background: #fff7e6; padding: 2px 9px; border-radius: 12px; font-weight: 600;
}
.fo-desc { font-size: 13px; color: var(--sub); margin: 9px 0 0; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fo-actions { display: flex; gap: 8px; margin-top: 13px; }
.fo-btn {
  flex: 1; border: none; border-radius: 24px; padding: 10px 4px; font-size: 14px; font-weight: 800;
  cursor: pointer; color: #fff; transition: transform .12s, box-shadow .12s;
}
.fo-btn:active { transform: scale(.97); }
.fo-btn.ghost { background: #fff; color: var(--primary-d); border: 1.5px solid var(--primary); }
.fo-btn.primary { background: linear-gradient(90deg, var(--primary), var(--primary-d)); box-shadow: 0 4px 14px rgba(31,95,192,.32); }
.fo-btn.book { background: linear-gradient(90deg, var(--gold), #ffc400); box-shadow: 0 4px 14px rgba(242,169,0,.32); color: #fff; }
.fo-agent { font-size: 12px; color: var(--sub); margin-top: 11px; display: flex; align-items: center; gap: 6px; }
.fo-agent::before { content: "🏠"; }

/* ===== 右侧视频进度导航点 ===== */
.feed-nav {
  position: fixed; right: 14px; top: 50%; transform: translateY(-50%); z-index: 25;
  display: flex; flex-direction: column; gap: 9px; align-items: center;
}
.feed-dot {
  width: 7px; height: 7px; border-radius: 50%; background: rgba(31,95,192,.3);
  border: none; padding: 0; cursor: pointer; transition: all .2s;
}
.feed-dot.on { background: var(--primary); height: 20px; border-radius: 4px; }

/* ===== 浮动聊天按钮 ===== */
.chat-fab {
  position: fixed; right: 16px; bottom: 22px; z-index: 40;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 56px; height: 56px; border-radius: 50%; border: none; cursor: pointer;
  background: linear-gradient(135deg, var(--primary), #5aa0f2); color: #fff; font-size: 22px;
  box-shadow: 0 8px 22px rgba(31,95,192,.42);
}
.chat-fab-label { font-size: 10px; margin-top: 1px; }

/* ===== 聊天面板（浅色） ===== */
.chat-panel {
  position: fixed; right: 12px; bottom: 90px; z-index: 50; width: min(360px, 92vw);
  height: 460px; max-height: 70vh; background: var(--card); border: 1px solid var(--line);
  border-radius: 16px; display: flex; flex-direction: column; overflow: hidden; box-shadow: var(--shadow);
}
.chat-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 15px; background: linear-gradient(90deg, var(--primary), var(--primary-d)); color: #fff; font-weight: 700;
}
.chat-close { background: none; border: none; color: #fff; font-size: 22px; cursor: pointer; line-height: 1; }
.chat-body { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px; background: #f4f8fe; }
.msg { max-width: 80%; padding: 9px 13px; border-radius: 14px; font-size: 14px; line-height: 1.45; word-break: break-word; }
.msg.user { align-self: flex-end; background: linear-gradient(135deg, var(--primary), var(--primary-d)); color: #fff; border-bottom-right-radius: 3px; }
.msg.agent { align-self: flex-start; background: #fff; color: var(--ink); border: 1px solid var(--line); border-bottom-left-radius: 3px; }
.msg.sys { align-self: center; background: rgba(31,95,192,.08); color: var(--sub); font-size: 12px; }
.chat-input { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); background: #fff; }
.chat-input input { flex: 1; border: 1px solid var(--line); background: #f4f8fe; color: var(--ink);
  border-radius: 20px; padding: 9px 14px; outline: none; font-size: 14px; }
.chat-input input:focus { border-color: var(--primary); }
.chat-input button { border: none; background: linear-gradient(90deg, var(--primary), var(--primary-d)); color: #fff; border-radius: 20px; padding: 0 18px; font-weight: 700; cursor: pointer; }

/* ===== 弹层 / 详情（浅色） ===== */
.modal { position: fixed; inset: 0; z-index: 60; background: rgba(20,40,70,.45);
  display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal-card { position: relative; width: min(520px, 96vw); max-height: 88vh; overflow-y: auto;
  background: var(--card); border-radius: 18px; padding: 22px; border: 1px solid var(--line); box-shadow: var(--shadow); }
.modal-close { position: absolute; right: 12px; top: 8px; background: none; border: none; color: var(--sub); font-size: 26px; cursor: pointer; }
.loading { color: var(--sub); text-align: center; padding: 30px 0; }

.detail-hero { width: 100%; border-radius: 12px; margin-bottom: 14px; max-height: 240px; object-fit: cover; background: #eaf2fd; }
.detail-title { font-size: 19px; font-weight: 800; margin: 0 0 8px; color: var(--ink); }
.detail-price { font-size: 24px; color: var(--price); font-weight: 800; margin-bottom: 10px; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; font-size: 14px; color: var(--ink); margin-bottom: 12px; }
.detail-grid b { color: var(--sub); font-weight: 500; margin-right: 4px; }
.detail-desc { font-size: 14px; color: var(--sub); line-height: 1.6; }
.detail-agent { margin-top: 14px; padding: 12px; border-radius: 12px; background: var(--primary-l);
  display: flex; align-items: center; gap: 12px; }
.detail-agent .ava { width: 46px; height: 46px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), #5aa0f2); display: flex; align-items: center; justify-content: center; font-size: 20px; color: #fff; }
.detail-agent .nm { font-weight: 800; color: var(--ink); }
.detail-agent .cp { font-size: 12px; color: var(--sub); }
.detail-gallery { display: flex; gap: 8px; overflow-x: auto; margin: 10px 0; }
.detail-gallery img { height: 90px; border-radius: 8px; }

/* ===== 约看房弹窗（移植自 localhost/video.php 模版） ===== */
.book-head { font-size: 18px; font-weight: 800; color: var(--ink); margin-bottom: 10px; }
.book-house-info { color: var(--sub); font-size: 13px; margin: -6px 0 14px; }
.book-form { display: flex; flex-direction: column; gap: 12px; }
.book-field { display: flex; flex-direction: column; gap: 4px; }
.book-field label { font-size: 13px; font-weight: 700; color: var(--ink); }
.book-field input, .book-field textarea {
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px;
  font-size: 14px; color: var(--ink); outline: none; background: #f4f8fe;
  font-family: inherit; resize: vertical;
}
.book-field input:focus, .book-field textarea:focus { border-color: var(--primary); }
.book-submit {
  border: none; cursor: pointer; border-radius: 24px; padding: 12px;
  font-size: 15px; font-weight: 800; color: #fff; margin-top: 4px;
  background: linear-gradient(90deg, var(--primary), var(--primary-d));
  box-shadow: 0 4px 14px rgba(31,95,192,.32); transition: transform .12s;
}
.book-submit:active { transform: scale(.97); }
.book-msg { margin: 8px 0 0; font-size: 13px; text-align: center; }

/* ===== 空状态 ===== */
.empty { color: var(--sub); text-align: center; padding: 60px 20px; }
.empty a { color: var(--primary); }

/* ===== 搜索无结果隐藏 ===== */
.feed-item.hidden { display: none !important; }

/* ===== 窄屏微调 ===== */
@media (max-width: 480px) {
  .feed { max-width: 100%; }
  .fo-title { font-size: 17px; }
  .fo-price { font-size: 23px; }
  .fo-btn { font-size: 13px; padding: 9px 2px; }
  .chat-panel { right: 8px; left: 8px; width: auto; }
  .feed-nav { right: 9px; }
  .ch-search-btn { padding: 9px 14px; font-size: 13px; }
  .ch-quick-tags .qt { font-size: 11px; padding: 3px 10px; }
}
