/* ===== 建瓯掌上招商 H5 前端代码包 ===== */
/* 设计规范：主色 #1a4a9c，辅助金色 #d4af37，背景 #f5f7fa */

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { width: 100%; height: 100%; font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; background: #0f172a; color: #333; }

#desktop-hint { display: none; text-align: center; padding: 40px 20px; color: #fff; font-size: 14px; background: #0f172a; }
@media (min-width: 769px) {
  #desktop-hint { display: block; }
  body { display: flex; align-items: center; justify-content: center; }
}

#app { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; gap: 24px; padding: 16px; }

/* ===== 手机外框 ===== */
.phone-frame {
  width: 375px; height: 812px; background: #fff; border-radius: 44px;
  box-shadow: 0 25px 70px rgba(0,0,0,0.35); position: relative; overflow: hidden;
  display: flex; flex-direction: column; flex-shrink: 0;
}

/* ===== 状态栏 ===== */
.status-bar {
  height: 44px; background: #1a4a9c; color: #fff; display: flex;
  align-items: flex-end; justify-content: space-between; padding: 0 20px 8px;
  font-size: 14px; font-weight: 600; z-index: 100; position: relative;
}
.status-icons { display: flex; align-items: center; gap: 4px; }

/* ===== 导航栏 ===== */
.nav-bar {
  height: 48px; background: linear-gradient(135deg, #1a4a9c 0%, #0f3460 100%);
  color: #fff; display: flex; align-items: center; justify-content: space-between;
  padding: 0 12px; position: relative; z-index: 99; flex-shrink: 0;
}
.nav-bar.hidden { display: none; }
.nav-back { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.nav-title { flex: 1; text-align: center; font-size: 17px; font-weight: 600; }
.nav-right { width: 40px; }

/* ===== 屏幕内容区 ===== */
.screen { flex: 1; position: relative; overflow: hidden; background: #f5f7fa; }
#page-content { width: 100%; height: 100%; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; padding-bottom: 80px; }
#page-content::-webkit-scrollbar { width: 0; }

/* ===== 底部 Tab ===== */
.tab-bar {
  height: 56px; background: #fff; border-top: 1px solid #e5e7eb;
  display: flex; align-items: center; justify-content: space-around; padding-bottom: 4px;
  position: absolute; bottom: 0; left: 0; width: 100%; z-index: 100; flex-shrink: 0;
}
.tab-bar.hidden { display: none; }
.tab-item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; cursor: pointer; color: #999; }
.tab-item .tab-icon { width: 24px; height: 24px; }
.tab-item span { font-size: 11px; }
.tab-item.active { color: #1a4a9c; }

/* ===== 页面通用 ===== */
.page { width: 100%; min-height: 100%; }
.page.has-tabbar { padding-bottom: 56px; }

/* 顶部大图区 */
.hero { width: 100%; background: linear-gradient(180deg, #1a4a9c 0%, #0f3460 100%); color: #fff; position: relative; overflow: hidden; }
.hero::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 60px;
  background: linear-gradient(180deg, transparent 0%, #f5f7fa 100%);
}
.hero-title { font-size: 24px; font-weight: 700; text-align: center; padding-top: 16px; letter-spacing: 1px; }
.hero-sub { font-size: 13px; text-align: center; opacity: 0.9; margin-top: 6px; padding: 0 20px; }
.hero-city {
  position: absolute; right: 0; bottom: 40px; width: 160px; height: 120px; opacity: 0.18;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 80'%3E%3Cpath fill='%23ffffff' d='M10 80 L10 55 L18 50 L18 80z M22 80 L22 45 L34 40 L34 80z M40 80 L40 35 L55 28 L55 80z M60 80 L60 40 L75 32 L75 80z M78 80 L78 50 L90 45 L90 80z'/%3E%3C/svg%3E") no-repeat center/contain;
}

/* Banner 轮播 */
.banner { width: 92%; margin: 16px auto 0; border-radius: 12px; overflow: hidden; position: relative; height: 170px; }
.banner img { width: 100%; height: 100%; object-fit: cover; display: block; }
.banner-play {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 48px; height: 48px; border-radius: 50%; background: rgba(0,0,0,0.45);
  border: 2px solid rgba(255,255,255,0.8); display: flex; align-items: center; justify-content: center;
}
.banner-play::after { content: ''; border-left: 16px solid #fff; border-top: 10px solid transparent; border-bottom: 10px solid transparent; margin-left: 4px; }
.banner-dots { position: absolute; bottom: 8px; left: 0; right: 0; display: flex; justify-content: center; gap: 6px; }
.banner-dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,0.5); }
.banner-dot.active { background: #fff; width: 14px; }

/* 卡片 */
.card { background: #fff; border-radius: 12px; margin: 12px; padding: 16px; box-shadow: 0 2px 8px rgba(0,0,0,0.04); }
.card-title { font-size: 17px; font-weight: 700; color: #1a4a9c; margin-bottom: 12px; display: flex; align-items: center; gap: 6px; }
.card-title .dot { width: 5px; height: 18px; background: #d4af37; border-radius: 3px; }
.card-more { font-size: 13px; color: #999; margin-left: auto; }

/* 宫格 */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.grid-5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }

.grid-item {
  background: #fff; border-radius: 12px; padding: 14px 10px; display: flex; align-items: center; gap: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05); cursor: pointer; transition: transform 0.15s;
}
.grid-item:active { transform: scale(0.97); }
.grid-item .icon {
  width: 44px; height: 44px; border-radius: 10px; background: linear-gradient(135deg, #1a4a9c 0%, #3b82f6 100%);
  display: flex; align-items: center; justify-content: center; color: #fff; flex-shrink: 0;
}
.grid-item .icon svg { width: 26px; height: 26px; }
.grid-item .text { flex: 1; }
.grid-item .text .name { font-size: 15px; font-weight: 700; color: #111; }
.grid-item .text .desc { font-size: 12px; color: #888; margin-top: 2px; }

/* 列表 */
.list-item {
  display: flex; align-items: center; padding: 12px 0; border-bottom: 1px solid #f0f0f0;
  cursor: pointer; gap: 10px;
}
.list-item:last-child { border-bottom: none; }
.list-dot { width: 5px; height: 5px; border-radius: 50%; background: #1a4a9c; flex-shrink: 0; }
.list-title { flex: 1 1 0; min-width: 0; font-size: 14px; color: #333; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-date { flex: 0 0 70px; display: block; font-size: 12px; color: #999; text-align: right; }

/* 标签云 */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { padding: 6px 12px; border-radius: 16px; font-size: 12px; background: #eff6ff; color: #1a4a9c; border: 1px solid #dbeafe; }
.tag.gold { background: #fff8e6; color: #8a6d0b; border-color: #f3e2a5; }
.tag.blue { background: #1a4a9c; color: #fff; border-color: #1a4a9c; }

/* 数据展示 */
.data-row { display: flex; justify-content: space-around; padding: 16px 0; }
.data-item { text-align: center; }
.data-num { font-size: 22px; font-weight: 700; color: #1a4a9c; }
.data-label { font-size: 12px; color: #888; margin-top: 4px; }

/* 表格 */
.table-wrap { overflow-x: auto; margin: 0 -16px; padding: 0 16px; }
.data-table { width: 100%; border-collapse: collapse; font-size: 12px; min-width: 340px; }
.data-table th, .data-table td { border: 1px solid #e5e7eb; padding: 8px 6px; text-align: center; }
.data-table th { background: #eff6ff; color: #1a4a9c; font-weight: 600; }
.data-table td { color: #555; }

/* 按钮 */
.btn { width: 92%; margin: 16px auto; padding: 14px; border-radius: 24px; border: none;
  background: linear-gradient(135deg, #d4af37 0%, #c49b2e 100%); color: #fff;
  font-size: 16px; font-weight: 600; text-align: center; cursor: pointer; display: block;
}
.btn:active { opacity: 0.9; }
.btn-blue { background: linear-gradient(135deg, #1a4a9c 0%, #0f3460 100%); }

/* 表单 */
.form-group { margin-bottom: 14px; }
.form-label { font-size: 14px; color: #333; margin-bottom: 6px; display: block; }
.form-label .required { color: #e74c3c; }
.form-input, .form-select, .form-textarea {
  width: 100%; padding: 12px; border: 1px solid #e5e7eb; border-radius: 8px;
  font-size: 14px; background: #fff; font-family: inherit;
}
.form-input:focus, .form-select:focus, .form-textarea:focus { outline: none; border-color: #1a4a9c; }
.form-textarea { min-height: 100px; resize: none; }
.form-hint { text-align: center; font-size: 12px; color: #999; margin-top: 12px; }

/* 资源卡片 */
.resource-card { display: flex; gap: 12px; padding: 14px; background: #fff; border-radius: 12px; margin-bottom: 12px; cursor: pointer; box-shadow: 0 2px 6px rgba(0,0,0,0.03); }
.resource-img { width: 100px; height: 80px; border-radius: 8px; background: #e5e7eb; flex-shrink: 0; overflow: hidden; }
.resource-img img { width: 100%; height: 100%; object-fit: cover; }
.resource-info { flex: 1; display: flex; flex-direction: column; justify-content: space-between; }
.resource-title { font-size: 15px; font-weight: 700; color: #111; }
.resource-tag { display: inline-block; font-size: 11px; padding: 2px 6px; border-radius: 4px; background: #eff6ff; color: #1a4a9c; margin-top: 4px; }
.resource-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; font-size: 12px; color: #666; margin-top: 6px; }
.resource-price { color: #d4af37; font-weight: 700; font-size: 14px; }
.resource-status { color: #1a4a9c; background: #eff6ff; padding: 2px 8px; border-radius: 8px; font-size: 11px; align-self: flex-start; margin-top: 4px; }

/* 地图页 */
.map-container { width: 100%; height: 100%; background: #0b1d3a; position: relative; display: flex; flex-direction: column; overflow: hidden; }
.map-search { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; gap: 8px; z-index: 20; }
.map-search input { flex: 1; border: none; border-radius: 20px; padding: 10px 16px; font-size: 13px; box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.map-btns { display: flex; gap: 6px; }
.map-btn { background: #fff; border-radius: 10px; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; font-size: 10px; flex-direction: column; color: #1a4a9c; box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.map-btn svg { margin-bottom: 1px; }
.map-svg { flex: 1; width: 100%; min-height: 0; display: block; }
.map-legend { position: absolute; left: 12px; bottom: 150px; background: rgba(0,0,0,0.5); color: #fff; border-radius: 10px; padding: 10px 12px; font-size: 12px; z-index: 20; backdrop-filter: blur(4px); }
.map-legend-item { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.map-legend-item:last-child { margin-bottom: 0; }
.map-pin { position: absolute; width: 22px; height: 22px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); }
.map-pin::after { content: ''; position: absolute; width: 8px; height: 8px; background: #fff; border-radius: 50%; top: 5px; left: 5px; }
.map-pin.blue { background: #3b82f6; }
.map-pin.gold { background: #d4af37; }
.map-pin.green { background: #10b981; }
.map-marker { cursor: pointer; }

.map-card { position: absolute; bottom: 66px; left: 12px; right: 12px; background: #fff; border-radius: 14px; padding: 14px; box-shadow: 0 -4px 20px rgba(0,0,0,0.25); z-index: 20; }

/* 个人中心 */
.mine-header {
  background: linear-gradient(135deg, #1a4a9c 0%, #0f3460 100%); color: #fff;
  padding: 30px 16px 50px; position: relative;
}
.mine-user { display: flex; align-items: center; gap: 14px; }
.mine-avatar { width: 60px; height: 60px; border-radius: 50%; background: #fff; overflow: hidden; }
.mine-avatar img { width: 100%; height: 100%; object-fit: cover; }
.mine-name { font-size: 18px; font-weight: 700; }
.mine-phone { font-size: 13px; opacity: 0.85; margin-top: 4px; }
.mine-stats { display: flex; background: #fff; border-radius: 12px; margin: 10px 16px 16px; padding: 16px 0; box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.stat { flex: 1; text-align: center; border-right: 1px solid #f0f0f0; }
.stat:last-child { border-right: none; }
.stat-num { font-size: 22px; font-weight: 700; color: #1a4a9c; }
.stat-label { font-size: 12px; color: #888; margin-top: 4px; }

.menu-item { display: flex; align-items: center; padding: 14px 16px; background: #fff; margin-bottom: 1px; cursor: pointer; }
.menu-icon { width: 32px; height: 32px; border-radius: 8px; background: #eff6ff; color: #1a4a9c; display: flex; align-items: center; justify-content: center; margin-right: 12px; }
.menu-icon svg { width: 18px; height: 18px; }
.menu-text { flex: 1; }
.menu-title { font-size: 15px; color: #111; }
.menu-desc { font-size: 12px; color: #999; margin-top: 2px; }
.menu-arrow { color: #ccc; }

/* 详情页 */
.detail-cover { width: 100%; height: 180px; background: #e5e7eb; }
.detail-cover img { width: 100%; height: 100%; object-fit: cover; }
.detail-body { padding: 16px; }
.detail-title { font-size: 20px; font-weight: 700; color: #111; }
.detail-sub { font-size: 13px; color: #666; margin-top: 6px; }
.detail-section { margin-top: 20px; }
.detail-section h3 { font-size: 16px; font-weight: 700; color: #1a4a9c; margin-bottom: 10px; padding-left: 8px; border-left: 3px solid #d4af37; }
.detail-section p { font-size: 14px; color: #555; line-height: 1.8; margin-bottom: 10px; }
.detail-section ul { padding-left: 18px; }
.detail-section li { font-size: 14px; color: #555; line-height: 1.8; }

/* 产业卡片 */
.industry-card { background: #fff; border-radius: 12px; padding: 14px; margin-bottom: 12px; box-shadow: 0 2px 8px rgba(0,0,0,0.04); cursor: pointer; }
.industry-header { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.industry-img { width: 80px; height: 60px; border-radius: 8px; background: #e5e7eb; flex-shrink: 0; overflow: hidden; }
.industry-img img { width: 100%; height: 100%; object-fit: cover; }
.industry-name { font-size: 16px; font-weight: 700; color: #111; }
.industry-tag { font-size: 11px; padding: 2px 8px; border-radius: 8px; background: #fff8e6; color: #8a6d0b; display: inline-block; margin-top: 4px; }
.industry-desc { font-size: 13px; color: #555; line-height: 1.6; }

/* 横向滚动企业/产业 */
.scroll-row { display: flex; gap: 10px; overflow-x: auto; padding: 4px 0; }
.scroll-row::-webkit-scrollbar { height: 0; }
.scroll-item { flex-shrink: 0; width: 110px; background: #fff; border-radius: 10px; padding: 12px; text-align: center; box-shadow: 0 2px 6px rgba(0,0,0,0.04); }
.scroll-item .icon { width: 40px; height: 40px; margin: 0 auto 8px; border-radius: 50%; background: #eff6ff; display: flex; align-items: center; justify-content: center; color: #1a4a9c; }
.scroll-item .name { font-size: 13px; font-weight: 600; }

/* 企业 Logo 卡片 */
.enterprise-card { background: #fff; border-radius: 10px; padding: 12px; display: flex; align-items: center; gap: 10px; flex-shrink: 0; width: 140px; box-shadow: 0 2px 6px rgba(0,0,0,0.04); }
.enterprise-logo { width: 36px; height: 36px; border-radius: 50%; background: #eff6ff; display: flex; align-items: center; justify-content: center; color: #1a4a9c; font-weight: 700; font-size: 14px; }
.enterprise-name { font-size: 13px; font-weight: 600; color: #111; }

/* 站点地图 */
.sitemap { width: 260px; height: 812px; background: #fff; border-radius: 16px; padding: 20px; overflow-y: auto; box-shadow: 0 10px 40px rgba(0,0,0,0.2); }
.sitemap-title { font-size: 18px; font-weight: 700; color: #1a4a9c; margin-bottom: 16px; }
.sitemap-list { display: flex; flex-direction: column; gap: 8px; }
.sitemap-item { padding: 10px 12px; border-radius: 8px; cursor: pointer; font-size: 14px; color: #333; background: #f8fafc; transition: all 0.15s; }
.sitemap-item:hover { background: #eff6ff; color: #1a4a9c; }
.sitemap-item.active { background: #1a4a9c; color: #fff; }
.sitemap-group { font-size: 12px; color: #999; margin-top: 8px; margin-bottom: 6px; text-transform: uppercase; }

@media (max-width: 768px) {
  #app { flex-direction: column; align-items: stretch; padding: 0; }
  .phone-frame { width: 100%; height: 100vh; border-radius: 0; box-shadow: none; }
  .sitemap { display: none; }
  #desktop-hint { display: none; }
}

/* Toast */
.toast { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); background: rgba(0,0,0,0.78); color: #fff; padding: 14px 24px; border-radius: 8px; font-size: 14px; z-index: 1000; opacity: 0; pointer-events: none; transition: opacity 0.3s; }
.toast.show { opacity: 1; }

/* 搜索栏 */
.search-bar { display: flex; align-items: center; background: #eff6ff; border-radius: 20px; padding: 8px 14px; margin: 12px 16px; }
.search-bar svg { color: #999; margin-right: 8px; flex-shrink: 0; }
.search-bar input { flex: 1; border: none; background: transparent; font-size: 13px; outline: none; }

/* Tab 筛选 */
.filter-tabs { display: flex; gap: 10px; padding: 10px 16px; border-bottom: 1px solid #f0f0f0; }
.filter-tab { font-size: 14px; color: #666; padding: 6px 0; position: relative; }
.filter-tab.active { color: #1a4a9c; font-weight: 700; }
.filter-tab.active::after { content: ''; position: absolute; bottom: -4px; left: 0; right: 0; height: 3px; background: #d4af37; border-radius: 3px; }
