/* 惊喜时空 · Google 极简风 Web 端 */
:root {
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --ink: #202124;
  --sub: #5f6368;
  --muted: #9aa0a6;
  --border: #dfe1e5;
  --border-light: #ebedef;
  --blue: #1a73e8;
  --link: #1a0dab;
  --red: #ea4335;
  --yellow: #fbbc04;
  --green: #34a853;
  --indigo: #4f46e5;
  --radius-pill: 999px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea { font: inherit; color: inherit; background: none; border: none; outline: none; }
button { cursor: pointer; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* 四色品牌字 */
.c1 { color: #4285f4; }
.c2 { color: #ea4335; }
.c3 { color: #fbbc05; }
.c4 { color: #34a853; }

/* 顶部极简栏 */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  padding: 0 24px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
}
.topbar.bordered { border-bottom-color: var(--border-light); }
.tb-left {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}
.logo-dot { color: var(--blue); font-size: 18px; }
.logo-word { font-size: 20px; font-weight: 700; letter-spacing: 0.5px; }
.logo-word b { font-weight: 700; }

.tb-nav { display: flex; gap: 6px; }
.tb-link {
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  color: var(--sub);
  transition: background 0.15s, color 0.15s;
}
.tb-link:hover { background: var(--bg-soft); color: var(--ink); }
.tb-link.active { background: #e8f0fe; color: var(--blue); font-weight: 600; }

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px 96px;
}

.view { display: none; }
.view.active { display: block; }

/* ========== 1. Google 式首页 ========== */
.hero-google {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 36px 0 32px;
  text-align: center;
}

/* 顶部雷达胶囊条 */
.radar-strip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  background: var(--bg-soft);
  border: 1px solid var(--border-light);
  font-size: 13px;
  color: var(--sub);
  cursor: pointer;
  transition: box-shadow 0.18s, border-color 0.18s;
}
.radar-strip:hover {
  border-color: var(--border);
  box-shadow: 0 1px 6px rgba(32, 33, 36, 0.08);
}
.radar-pulse {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(52, 168, 83, 0.22);
}
.radar-grades { display: inline-flex; gap: 8px; font-weight: 600; color: var(--ink); }
.radar-toggle { color: var(--blue); font-weight: 500; }

/* 折叠雷达盘 */
.radar-drawer {
  display: none;
  margin-top: 16px;
  padding: 20px;
  border-radius: 20px;
  background: var(--bg-soft);
  border: 1px solid var(--border-light);
}
.radar-drawer.open { display: block; }
.radar-scope {
  position: relative;
  width: 240px;
  height: 240px;
  margin: 0 auto;
  border-radius: 50%;
  background: radial-gradient(circle, #ffffff 0%, #eef2ff 100%);
  border: 1.5px solid #c7d2fe;
  overflow: hidden;
}
.r-ring {
  position: absolute; border-radius: 50%;
  border: 1px dashed #cbd5e1;
}
.r-ring.r1 { inset: 18%; }
.r-ring.r2 { inset: 35%; }
.r-ring.r3 { inset: 48%; border-style: solid; }
.r-axis { position: absolute; background: #e2e8f0; }
.r-axis.a1 { left: 50%; top: 0; bottom: 0; width: 1px; }
.r-axis.a2 { top: 50%; left: 0; right: 0; height: 1px; }
@keyframes sweepSpin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.r-sweep {
  position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0deg, transparent 290deg, rgba(26, 115, 232, 0.22) 355deg, rgba(26, 115, 232, 0.6) 360deg);
  animation: sweepSpin 4s linear infinite;
  pointer-events: none;
}
.r-core {
  position: absolute; left: 50%; top: 50%;
  width: 8px; height: 8px; margin: -4px 0 0 -4px;
  border-radius: 50%; background: var(--blue);
}
.r-blip {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex; align-items: center; gap: 4px;
  font-size: 11px; color: var(--ink);
  cursor: pointer; z-index: 2;
  white-space: nowrap;
}
.r-blip-dot {
  width: 9px; height: 9px; border-radius: 50%;
  border: 1.5px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.r-blip.gold .r-blip-dot { background: #f59e0b; width: 11px; height: 11px; }
.r-blip.silver .r-blip-dot { background: #64748b; }
.r-blip.bronze .r-blip-dot { background: #ea580c; }
.r-blip.iron .r-blip-dot { background: #94a3b8; }
.r-blip-txt {
  background: rgba(255,255,255,0.9);
  padding: 1px 5px;
  border-radius: 4px;
  border: 1px solid var(--border-light);
  max-width: 96px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.radar-caption { font-size: 12px; color: var(--muted); margin-top: 10px; }

/* Google 大标题 */
.g-logo {
  margin-top: 26px;
  font-size: 64px;
  font-weight: 700;
  letter-spacing: -1px;
  line-height: 1.1;
  user-select: none;
}
.g-sub {
  margin-top: 10px;
  color: var(--sub);
  font-size: 14px;
}

/* Google 搜索框 */
.g-search {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 680px;
  height: 52px;
  margin-top: 26px;
  padding: 0 8px 0 18px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  transition: box-shadow 0.2s, border-color 0.2s;
}
.g-search:hover,
.g-search:focus-within {
  border-color: rgba(223, 225, 229, 0);
  box-shadow: 0 1px 6px rgba(32, 33, 36, 0.28);
}
.g-icon { color: var(--muted); flex-shrink: 0; margin-right: 12px; }
.g-input {
  flex: 1;
  min-width: 0;
  height: 100%;
  font-size: 16px;
  color: var(--ink);
}
.g-input::placeholder { color: var(--muted); }

/* 右侧方向切换（快乐 / 健康 / 名利） */
.g-dirs {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  background: #f1f3f4;
  border-radius: var(--radius-pill);
  flex-shrink: 0;
}
.g-dir {
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  color: var(--sub);
  font-weight: 500;
  transition: all 0.15s;
  white-space: nowrap;
}
.g-dir:hover { color: var(--ink); }
.g-dir.active {
  background: #fff;
  color: var(--ink);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

/* 搜索框下方双按钮 */
.g-actions {
  display: flex;
  gap: 12px;
  margin-top: 22px;
}
.g-btn {
  height: 38px;
  padding: 0 20px;
  border-radius: 6px;
  background: #f8f9fa;
  border: 1px solid #f8f9fa;
  font-size: 14px;
  color: #3c4043;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.g-btn:hover {
  border-color: #dadce0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}
.g-btn.primary {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
  font-weight: 500;
}
.g-btn.primary:hover { background: #1557b0; }

.g-samples {
  margin-top: 18px;
  font-size: 13px;
  color: var(--sub);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

/* 首页下方区块 */
.home-block {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border-light);
}
.block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.block-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}
.block-meta { font-size: 12px; color: var(--muted); }

@keyframes pulseDot { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
.live-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--red);
  display: inline-block;
  animation: pulseDot 1.4s infinite;
}

/* 导播台：极简卡片网格 */
.monitors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}
.mon-card {
  padding: 14px 16px;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.mon-card:hover {
  border-color: var(--border);
  box-shadow: 0 2px 8px rgba(32, 33, 36, 0.06);
}
.mon-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 6px;
}
.mon-live { color: var(--red); font-weight: 600; display: flex; align-items: center; gap: 5px; }
.mon-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.mon-title:hover { color: var(--blue); }
.mon-dir {
  font-size: 11px;
  font-weight: 500;
  padding: 1px 8px;
  border-radius: var(--radius-pill);
  background: var(--bg-soft);
  color: var(--sub);
}
.mon-list { display: flex; flex-direction: column; gap: 6px; }
.mon-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--sub);
  cursor: pointer;
  padding: 3px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mon-item:hover { color: var(--blue); }

/* 今日大家关注胶囊 */
.hot-pills { display: flex; flex-wrap: wrap; gap: 10px; }
.hot-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 15px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-light);
  background: var(--bg-soft);
  font-size: 13px;
  color: var(--ink);
  cursor: pointer;
  transition: all 0.15s;
}
.hot-pill:hover {
  border-color: var(--blue);
  color: var(--blue);
  background: #fff;
}
.hot-pill small { color: var(--muted); font-size: 12px; }

/* ========== 2. Google SERP 风格资源结果页 ========== */
.serp-header {
  padding-top: 12px;
  border-bottom: 1px solid var(--border-light);
}
.g-search.compact {
  margin-top: 0;
  max-width: 720px;
  height: 46px;
}
.g-dirs.compact .g-dir { padding: 4px 10px; font-size: 12px; }
.serp-go {
  margin-left: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: var(--blue);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
}

.serp-crumbs {
  margin-top: 12px;
  font-size: 13px;
  color: var(--sub);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.crumb-link { color: var(--sub); cursor: pointer; }
.crumb-link:hover { color: var(--blue); text-decoration: underline; }
.crumb-cur { color: var(--ink); font-weight: 600; }

/* 五大菜单（像 Google 的 全部/图片/新闻/视频 Tab） */
.serp-tabs {
  display: flex;
  gap: 24px;
  margin-top: 12px;
  overflow-x: auto;
}
.serp-tab {
  position: relative;
  padding: 10px 2px 12px;
  font-size: 14px;
  color: var(--sub);
  white-space: nowrap;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.serp-tab:hover { color: var(--ink); }
.serp-tab.active {
  color: var(--blue);
  font-weight: 600;
}
.serp-tab.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  background: var(--blue);
  border-radius: 3px 3px 0 0;
}
.serp-tab .cnt {
  font-size: 12px;
  color: var(--muted);
  font-weight: 400;
}

.serp-body { max-width: 720px; padding-top: 14px; }
.serp-stats { font-size: 13px; color: var(--sub); margin-bottom: 12px; display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }

.serp-progress {
  margin-bottom: 16px;
  padding: 12px 16px;
  border-radius: 10px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 13px;
}
.sp-bar { height: 6px; border-radius: 3px; background: rgba(79,70,229,0.15); margin-top: 8px; overflow: hidden; }
.sp-fill { height: 100%; background: var(--blue); transition: width 0.4s; }

/* 行业/领域/学科 芯片 */
.serp-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}
.cat-pill {
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-light);
  background: var(--bg-soft);
  font-size: 12px;
  color: var(--sub);
  cursor: pointer;
}
.cat-pill:hover { border-color: var(--border); color: var(--ink); }
.cat-pill.active { background: #e8f0fe; border-color: #d2e3fc; color: var(--blue); font-weight: 600; }

/* Google 搜索结果条目 */
.serp-results { display: flex; flex-direction: column; gap: 22px; }
.res-row {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
}
.res-row:last-child { border-bottom: none; }
.res-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--sub);
  margin-bottom: 4px;
}
.res-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.res-title {
  font-size: 18px;
  font-weight: 500;
  color: var(--link);
  line-height: 1.35;
}
.res-row:hover .res-title { text-decoration: underline; }
.res-desc {
  margin-top: 4px;
  font-size: 14px;
  color: #4d5156;
  line-height: 1.58;
}

/* 金银铜铁徽章 */
.g-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  flex-shrink: 0;
}
.g-badge.gold { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.g-badge.silver { background: #f1f5f9; color: #334155; border: 1px solid #cbd5e1; }
.g-badge.bronze { background: #ffedd5; color: #9a3412; border: 1px solid #fed7aa; }
.g-badge.iron { background: #f3f4f6; color: #6b7280; border: 1px solid #e5e7eb; }
.g-badge.radar { background: #e8f0fe; color: var(--blue); border: 1px solid #d2e3fc; font-weight: 600; }

/* 右下角关注按钮 */
.fab-follow {
  position: fixed;
  right: 28px;
  bottom: 84px;
  z-index: 30;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 46px;
  padding: 0 22px;
  border-radius: var(--radius-pill);
  background: var(--blue);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(26, 115, 232, 0.38);
  transition: transform 0.15s, background 0.15s;
}
.fab-follow:hover { transform: translateY(-2px); }
.fab-follow.following { background: var(--green); box-shadow: 0 4px 14px rgba(52, 168, 83, 0.35); }

/* ========== 子页面通用（连接 / 广场 / 我的） ========== */
.page-narrow { max-width: 720px; margin: 0 auto; padding-top: 24px; }
.subpage-head { margin-bottom: 18px; }
.subpage-head.row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.subpage-head h2 { font-size: 24px; font-weight: 600; color: var(--ink); }
.subpage-head p { font-size: 13px; color: var(--sub); margin-top: 2px; }

.stat-strip {
  display: flex;
  gap: 24px;
  padding: 14px 18px;
  border-radius: 12px;
  background: var(--bg-soft);
  border: 1px solid var(--border-light);
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--sub);
}
.stat-strip b { font-size: 18px; color: var(--ink); margin-right: 4px; }

.filter-bar, .me-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}
.f-chip {
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  font-size: 13px;
  color: var(--sub);
  background: #fff;
}
.f-chip:hover { background: var(--bg-soft); color: var(--ink); }
.f-chip.active {
  background: #e8f0fe;
  border-color: #d2e3fc;
  color: var(--blue);
  font-weight: 600;
}

.seg-box {
  display: inline-flex;
  padding: 3px;
  border-radius: var(--radius-pill);
  background: #f1f3f4;
}
.seg-btn {
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  color: var(--sub);
}
.seg-btn.active {
  background: #fff;
  color: var(--ink);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* 我的页面 */
.me-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--border-light);
  border-radius: 14px;
  margin-bottom: 20px;
}
.me-avatar {
  width: 56px; height: 56px; border-radius: 50%;
  background: #e8f0fe;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
}
.me-nick {
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  border-bottom: 1px dashed transparent;
  padding: 2px 0;
}
.me-nick:focus { border-bottom-color: var(--blue); }
.me-uid { font-size: 12px; color: var(--muted); margin-top: 2px; }
.me-body { padding-top: 4px; }

.fb-form { display: flex; flex-direction: column; gap: 12px; max-width: 520px; }
.fb-input, .fb-ta {
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
}
.fb-ta { min-height: 120px; resize: vertical; }

.empty-box {
  padding: 48px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

/* 移动端底部导航 */
.bottom-nav {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: 58px;
  background: rgba(255,255,255,0.96);
  border-top: 1px solid var(--border-light);
  display: none;
  z-index: 40;
}
.bn-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--sub);
  gap: 2px;
}
.bn-ic { font-size: 17px; }
.bn-item.active { color: var(--blue); font-weight: 600; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 84px;
  transform: translateX(-50%);
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  background: rgba(32, 33, 36, 0.9);
  color: #fff;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  z-index: 100;
}
.toast.show { opacity: 1; }

@media (max-width: 680px) {
  .tb-nav { display: none; }
  .bottom-nav { display: flex; }
  .g-logo { font-size: 46px; }
  .g-search { height: 48px; padding-left: 14px; }
  .g-dir { padding: 5px 9px; font-size: 12px; }
}
