/* ---- 顶栏 ---- */
.topbar {
  background: var(--topbar-bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.topbar-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand { font-size: 18px; font-weight: 700; color: var(--text); display: inline-flex; align-items: center; gap: 6px; }
.brand:hover { text-decoration: none; }
/* 前台 header logo：emoji 正常渲染，图片由 CSS 变量驱动 */
.brand-logo-icon { display: inline-flex; align-items: center; line-height: 1; }
.brand-logo-icon img {
  height: var(--logo-size-header, 28px);
  width: auto;
  max-width: calc(var(--logo-size-header, 28px) * 2);
  object-fit: contain;
  border-radius: var(--logo-radius, 8px);
  display: block;
}
.topnav { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.nav-link { color: var(--text); font-size: 14px; }
.user-badge {
  font-size: 13px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  padding: 4px 10px;
  border-radius: 999px;
}

/* ---- 容器 ---- */
.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 32px 20px 48px;
  width: 100%;
  flex: 1;
}
.container-inner { max-width: 760px; margin: 0 auto; }

/* ---- 搜索区 ---- */
.search-area { text-align: center; margin: 40px 0 44px; }

/* 首页当前时间：置于问候语上方，竖排两行，无边框（可用设置页自定义 CSS 覆盖） */
.current-time {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  margin: 0 0 14px;
  padding: 0;
  line-height: 1.5;
}
.current-time .ct-clock {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
  letter-spacing: 1px;
}
.current-time .ct-date-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}
.current-time .ct-sep { color: var(--border); user-select: none; }

.welcome-title { font-size: 26px; font-weight: 700; margin: 0 0 24px; }

/* 首页当地天气条（搜索框下方；默认隐藏，取到数据后显示） */
.weather-bar {
  display: none;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin: 16px auto 0;
  font-size: 13.5px;
  color: var(--text);
}
.weather-bar.show { display: flex; }
.weather-bar .wb-icon { font-size: 17px; line-height: 1; }
.weather-bar .wb-temp { font-size: 15px; font-weight: 700; }
.weather-bar .wb-desc,
.weather-bar .wb-hum,
.weather-bar .wb-wind,
.weather-bar .wb-city { color: var(--muted); }
.search-form { display: inline-block; width: 100%; max-width: 640px; }
.search-box {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: 40px;
  padding: 6px 6px 6px 8px;
  transition: border-color .2s, box-shadow .2s;
}
/* 搜索联想下拉 */
.search-suggest {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0; right: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,.12);
  padding: 6px;
  z-index: 50;
  max-height: 320px;
  overflow-y: auto;
  text-align: left;
}
.search-suggest.show { display: block; }
.search-suggest-item {
  padding: 8px 12px;
  border-radius: 9px;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.search-suggest-item:hover,
.search-suggest-item.active { background: var(--primary-soft); }
.search-suggest-item b { color: var(--primary-dark); font-weight: 700; }
.search-box:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}
/* 搜索框内嵌控件：去掉独立边框，融入胶囊 */
.search-box input {
  flex: 1;
  border: none;
  box-shadow: none;
  outline: none;
  font-size: 16px;
  padding: 8px 0;
  background: transparent;
}
.search-box input:focus { box-shadow: none; }
.search-btn {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 10px 26px;
  font-size: 15px;
}
.search-btn:hover { background: var(--primary-dark); }
/* 搜索引擎下拉：嵌入搜索框内左侧，与输入框以分隔线区分 */
.engine-select-inner {
  flex: 0 0 auto;
  width: auto !important;
  min-width: 0;
  border: none;
  border-right: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  padding: 7px 22px 7px 10px;
  font-size: 13px;
}
.engine-select-inner:focus {
  box-shadow: none;
  background: var(--surface-1);
}
@media (max-width: 480px) {
  .engine-select-inner { padding: 6px 20px 6px 8px; font-size: 12px; }
  .current-time .ct-clock { font-size: 21px; }
  .current-time .ct-date-line { font-size: 12px; }
}

/* ---- 导航区 ---- */
.section-title {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 20px;
  padding-left: 10px;
  border-left: 4px solid var(--primary);
}
.nav-section-block { margin-bottom: 36px; }
.nav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 16px;
}
.nav-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--text);
  transition: transform .15s, box-shadow .15s;
}
.nav-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,.08);
  text-decoration: none;
}
.nav-icon { font-size: 30px; line-height: 1; }
.nav-title { font-size: 14px; font-weight: 500; }
.empty-tip { color: var(--muted); font-size: 14px; }

