* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
       background: #f5f6f8; color: #333; }

.topbar { display: flex; align-items: center; justify-content: space-between;
  gap: 20px; padding: 14px 5%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.08);
  flex-wrap: wrap; }
.logo a { font-size: 22px; font-weight: bold; color: #333; text-decoration: none; }
.logo span { color: #ff6a00; }
.user-area { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.user-area a { color: #4e6ef2; text-decoration: none; }
.user-area a:hover { text-decoration: underline; }
.tools-link { margin-right: 6px; }

.search-wrap { flex: 1; max-width: 560px; }
.search-wrap input { width: calc(100% - 90px); padding: 9px 12px;
  border: 2px solid #4e6ef2; border-radius: 6px 0 0 6px; outline: none; font-size: 14px; }
.search-wrap button { padding: 9px 20px; background: #4e6ef2; color: #fff;
  border: none; border-radius: 0 6px 6px 0; cursor: pointer; font-size: 14px; }
.engine-tabs { margin-top: 8px; display: flex; gap: 6px; }
.engine-tabs button { border: none; background: #eef1f6; color: #666; font-size: 12px;
  padding: 4px 12px; border-radius: 4px; cursor: pointer; }
.engine-tabs button.active { background: #4e6ef2; color: #fff; }

.weather-widget { max-width: 1180px; margin: 14px auto 0; padding: 12px 20px;
  background: linear-gradient(135deg, #4A90E2, #6BB5F0); color: #fff;
  border-radius: 8px; display: flex; justify-content: space-between;
  align-items: center; flex-wrap: wrap; gap: 10px; }
.w-now { display: flex; align-items: center; gap: 10px; }
.w-icon { font-size: 28px; } .w-temp { font-size: 24px; font-weight: bold; }
.w-city { cursor: pointer; text-decoration: underline dotted; }
.w-detail { font-size: 12px; opacity: .9; }
.w-days { display: flex; gap: 18px; }
.w-day { display: flex; flex-direction: column; align-items: center; font-size: 12px; }
.w-err { font-size: 13px; }

.container { max-width: 1180px; margin: 20px auto; padding: 0 5%; }
.block { background: #fff; border-radius: 8px; padding: 20px; margin-bottom: 16px; }
.block h2 { font-size: 17px; margin-bottom: 16px;
  border-left: 4px solid #ff6a00; padding-left: 10px; }

.announcement { max-width: 1180px; margin: 14px auto 0; padding: 10px 20px;
  background: #fff8e6; border: 1px solid #ffe4a3; border-radius: 8px;
  font-size: 13px; color: #8a6d3b; }

.site-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 14px; }
.site-card { position: relative; display: flex; flex-direction: column; align-items: center;
  padding: 12px 6px; border-radius: 8px; text-decoration: none; color: inherit;
  transition: all .2s; }
.site-card:hover { background: #f0f4ff; transform: translateY(-2px); }
.site-card.recommend { background: #fff7f0; }
.site-logo { width: 44px; height: 44px; border-radius: 10px; display: flex;
  align-items: center; justify-content: center; color: #fff; font-size: 20px;
  font-weight: bold; margin-bottom: 8px; }
.site-name { font-size: 13px; }
.site-desc { font-size: 11px; color: #999; margin-top: 3px; }
.fav-btn { position: absolute; top: 4px; right: 6px; border: none; background: none;
  cursor: pointer; font-size: 14px; color: #ccc; }
.fav-btn:hover { color: #ff9800; }

.hot ol { list-style: none; display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.hot li { display: flex; justify-content: space-between; font-size: 13px;
  padding: 6px 10px; background: #fafafa; border-radius: 4px; }
.hot li a { color: #333; text-decoration: none; }
.hot li a:hover { color: #ff6a00; }
.hot li span { color: #999; font-size: 12px; }

footer { text-align: center; padding: 30px; color: #999; font-size: 12px; }
footer a { color: #999; text-decoration: none; }

.tool-row { display: flex; gap: 10px; }
.tool-row input { flex: 1; padding: 8px 12px; border: 1px solid #ddd;
  border-radius: 6px; outline: none; }
.tool-row input:focus { border-color: #4e6ef2; }
.tool-row button { padding: 8px 20px; background: #4e6ef2; color: #fff;
  border: none; border-radius: 6px; cursor: pointer; }
.tool-result { margin-top: 12px; font-size: 14px; min-height: 20px; }
.tool-result.selectable { user-select: all; word-break: break-all;
  font-family: monospace; font-size: 16px; }
.trace { display: flex; gap: 14px; padding: 4px 0;
  border-bottom: 1px dashed #eee; font-size: 13px; }
.trace span:first-child { color: #999; white-space: nowrap; }
.hot-tools { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: #666; }

.sitemap { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; }
.sitemap-col h3 { font-size: 14px; margin-bottom: 10px; color: #4e6ef2; }
.sitemap ul { list-style: none; }
.sitemap li { padding: 4px 0; font-size: 13px; }
.sitemap a { color: #333; text-decoration: none; }
.sitemap a:hover { color: #ff6a00; }
.about-content { line-height: 1.8; font-size: 14px; }
.about-content h3, .about-content h4 { margin: 14px 0 8px; }
.about-content ul { padding-left: 20px; }
.about-updated { margin-top: 20px; font-size: 12px; color: #999; }

.auth-box { max-width: 380px; margin: 80px auto; background: #fff;
  border-radius: 10px; padding: 36px; box-shadow: 0 2px 12px rgba(0,0,0,.08); }
.auth-box h1 { font-size: 20px; text-align: center; margin-bottom: 22px; }
.auth-box input { width: 100%; padding: 11px 12px; margin-bottom: 14px;
  border: 1px solid #ddd; border-radius: 6px; outline: none; font-size: 14px; }
.auth-box input:focus { border-color: #4e6ef2; }
.auth-box button { width: 100%; padding: 11px; background: #4e6ef2; color: #fff;
  border: none; border-radius: 6px; cursor: pointer; font-size: 15px; }
.auth-error { color: #e1251b; font-size: 13px; margin-bottom: 12px; }
.auth-tip { text-align: center; margin-top: 16px; font-size: 13px; color: #999; }
.auth-tip a { color: #4e6ef2; }

.settings-form, .about-form { background: #fff; border-radius: 8px; padding: 24px;
  display: flex; flex-direction: column; gap: 16px; max-width: 720px; }
.settings-form label, .about-form label { display: flex; flex-direction: column;
  gap: 6px; font-size: 13px; color: #666; }
.settings-form input, .settings-form textarea, .about-form input, .about-form textarea {
  padding: 9px 10px; border: 1px solid #ddd; border-radius: 5px; font-size: 14px; }
.about-form textarea { font-family: Consolas, monospace; font-size: 13px; }
.settings-form button, .about-form button { align-self: flex-start; }
.form-actions { display: flex; gap: 10px; }
.form-actions .btn { padding: 9px 22px; font-size: 14px; }

@media (max-width: 640px) {
  .topbar { justify-content: center; }
  .w-days { display: none; }
}
.datetime-lunar {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 14px;
  color: inherit;
}
#clock-time {
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 1px;
}
#date-lunar {
  opacity: 0.75;
  font-size: 13px;
}
.weather-bar {
  justify-content: space-between;  /* 天气推到左，时间推到右 */
}
