/* ============================================================
   91SM v11 · tags.css (v2)
   全部标签页 · 焦点云 + TOP20 三栏榜
   ============================================================ */

/* ---------- Version switcher (shared with v1) ---------- */

.version-switcher {
  max-width: 1760px;
  margin: 14px auto 0;
  padding: 0 28px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.vs-label {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  color: var(--text-3);
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.vs-label::before {
  content: '';
  display: inline-block;
  width: 16px;
  height: 1px;
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent);
}

.vs-pills {
  display: inline-flex;
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  padding: 3px;
  gap: 2px;
}

.vs-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  background: transparent;
  color: var(--text-2);
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.18s;
}

.vs-pill:hover { color: var(--text); background: rgba(255,255,255,0.04); }

.vs-pill.active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 14px rgba(255, 46, 126, 0.45);
}

.vs-pill .vs-num {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.18em;
  opacity: 0.65;
  font-weight: 700;
}

.vs-pill.active .vs-num { opacity: 1; }

/* ---------- Page-specific nav highlight ---------- */

.nav-current { color: var(--accent) !important; }

.nav-current::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) scaleX(1) !important;
  width: 60%;
  height: 1.5px;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

.nav-soon { opacity: 0.55; }

.mobile-cat-current .cat-name { color: var(--accent); }

/* ---------- Hero ---------- */

.tags-hero {
  max-width: 1760px;
  margin: 0 auto;
  padding: 26px 28px 20px;
}

.tags-hero-title {
  font-family: var(--display);
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--text);
  margin: 0;
}

.tags-hero-title em {
  font-style: normal;
  color: var(--accent);
  text-shadow: 0 0 18px rgba(255, 46, 126, 0.4), 0 0 40px rgba(255, 46, 126, 0.15);
}

.tags-hero-sub {
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--text-3);
  letter-spacing: 0.04em;
}

/* ---------- 大家都在搜 ---------- */

.trending-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.trending-label {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-right: 4px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.trending-label::before {
  content: '';
  display: inline-block;
  width: 16px;
  height: 1px;
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent);
}

.trending-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-bg);
  border: 1px solid var(--accent-subtle);
  color: var(--accent);
  padding: 4px 12px;
  font-size: 12px;
  font-family: var(--sans);
  letter-spacing: 0.02em;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.18s ease;
  position: relative;
}

.trending-chip:hover {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 14px rgba(255, 46, 126, 0.45);
}

.trending-chip .trend-up {
  font-family: var(--mono);
  font-size: 10px;
  opacity: 0.7;
  letter-spacing: 0;
}

.trending-chip:hover .trend-up { opacity: 1; }

/* ============================================================
   FOCUS CLOUD (the visual hook)
   ============================================================ */

.focus-cloud-wrap {
  max-width: 1760px;
  margin: 24px auto 0;
  padding: 0 28px;
}

.focus-cloud {
  position: relative;
  height: 200px;
  background:
    radial-gradient(ellipse 50% 80% at 25% 50%, rgba(157, 78, 221, 0.12) 0%, transparent 70%),
    radial-gradient(ellipse 50% 80% at 75% 50%, rgba(255, 46, 126, 0.12) 0%, transparent 70%),
    linear-gradient(180deg, var(--bg-card) 0%, var(--bg-2) 100%);
  border: 1px solid var(--border-2);
  overflow: hidden;
}

/* tech-corner ornaments */

.focus-cloud::before,
.focus-cloud::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border-color: var(--accent);
  border-style: solid;
  opacity: 0.6;
  z-index: 2;
}

.focus-cloud::before {
  top: 10px; left: 10px;
  border-width: 1px 0 0 1px;
  box-shadow: -1px -1px 8px rgba(255, 46, 126, 0.3);
}

.focus-cloud::after {
  bottom: 10px; right: 10px;
  border-width: 0 1px 1px 0;
  box-shadow: 1px 1px 8px rgba(255, 46, 126, 0.3);
}

/* grid overlay for cyber vibe */

.focus-cloud > .focus-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(157, 78, 221, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(157, 78, 221, 0.05) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}

/* horizontal scanline that sweeps */

.focus-cloud > .focus-scan {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, transparent 48%, rgba(255, 46, 126, 0.12) 50%, transparent 52%, transparent 100%);
  pointer-events: none;
  animation: focusScan 8s linear infinite;
}

@keyframes focusScan {
  0%   { transform: translateY(-100%); }
  100% { transform: translateY(100%); }
}

.focus-tags {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 24px;
  padding: 0 40px;
}

.focus-tag {
  text-decoration: none;
  font-family: var(--display);
  letter-spacing: -0.02em;
  line-height: 1.1;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), text-shadow 0.3s;
  position: relative;
  z-index: 1;
}

.focus-tag:hover { transform: translateY(-4px) scale(1.05); }

/* 7 tiers of focus tags */

.focus-tag.f1 {
  font-size: 56px;
  font-weight: 800;
  color: #ffd14a;
  text-shadow: 0 0 22px rgba(255, 209, 74, 0.55), 0 0 60px rgba(255, 209, 74, 0.25);
  animation: focusPulse1 4s ease-in-out infinite;
}

.focus-tag.f2 {
  font-size: 44px;
  font-weight: 700;
  color: #b8e2f9;
  text-shadow: 0 0 18px rgba(184, 226, 249, 0.5);
}

.focus-tag.f3 {
  /* 探花合集 equivalent — biggest, accent magenta */
  font-size: 64px;
  font-weight: 800;
  color: var(--accent);
  text-shadow: 0 0 28px rgba(255, 46, 126, 0.65), 0 0 72px rgba(255, 46, 126, 0.3);
  animation: focusPulse3 4s ease-in-out infinite;
  align-self: flex-start;
  margin-top: 32px;
}

.focus-tag.f4 {
  font-size: 36px;
  font-weight: 600;
  color: #b58df0;
  text-shadow: 0 0 12px rgba(157, 78, 221, 0.45);
  align-self: flex-end;
  margin-bottom: 28px;
}

.focus-tag.f5 {
  font-size: 38px;
  font-weight: 600;
  color: #d486e6;
  text-shadow: 0 0 14px rgba(212, 134, 230, 0.5);
}

.focus-tag.f6 {
  font-size: 32px;
  font-weight: 600;
  color: #ff8eb8;
  text-shadow: 0 0 16px rgba(255, 142, 184, 0.5);
  align-self: flex-end;
  margin-bottom: 18px;
}

.focus-tag.f7 {
  font-size: 50px;
  font-weight: 800;
  color: #ff4d4d;
  text-shadow: 0 0 22px rgba(255, 77, 77, 0.6), 0 0 56px rgba(255, 77, 77, 0.25);
}

@keyframes focusPulse1 {
  0%, 100% { text-shadow: 0 0 22px rgba(255, 209, 74, 0.5), 0 0 60px rgba(255, 209, 74, 0.22); }
  50%      { text-shadow: 0 0 32px rgba(255, 209, 74, 0.8), 0 0 80px rgba(255, 209, 74, 0.35); }
}

@keyframes focusPulse3 {
  0%, 100% { text-shadow: 0 0 28px rgba(255, 46, 126, 0.6), 0 0 72px rgba(255, 46, 126, 0.28); }
  50%      { text-shadow: 0 0 38px rgba(255, 46, 126, 0.9), 0 0 96px rgba(255, 46, 126, 0.4); }
}

/* ============================================================
   TIME TABS
   ============================================================ */

.time-tabs-wrap {
  max-width: 1760px;
  margin: 24px auto 0;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.time-tabs {
  display: inline-flex;
  align-items: center;
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  padding: 4px;
  gap: 2px;
}

.time-tab {
  background: transparent;
  border: none;
  color: var(--text-2);
  padding: 8px 18px;
  font-family: var(--sans);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all 0.18s;
  position: relative;
}

.time-tab:hover { color: var(--text); }

.time-tab.active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 14px rgba(255, 46, 126, 0.45);
}

.refresh-meta {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--text-3);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.refresh-meta .live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-3);
  box-shadow: 0 0 8px var(--accent-3);
  animation: livePulse 1.8s ease-in-out infinite;
}

@keyframes livePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.7); }
}

/* ============================================================
   TOP20 BOARDS
   ============================================================ */

.board-wrap {
  max-width: 1760px;
  margin: 18px auto 0;
  padding: 0 28px;
}

.board-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 14px;
}

.board {
  background: linear-gradient(170deg, var(--bg-card) 0%, var(--bg-2) 100%);
  border: 1px solid var(--border-2);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.board::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 60%;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
  box-shadow: 0 0 8px var(--accent);
}

.board::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 100% 0%, rgba(255, 46, 126, 0.05) 0%, transparent 50%);
  pointer-events: none;
}

.board-head {
  padding: 16px 18px 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: baseline;
  gap: 10px;
  position: relative;
  z-index: 1;
}

.board-title {
  font-family: var(--display);
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

.board-suffix {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 700;
  text-shadow: 0 0 10px rgba(255, 46, 126, 0.4);
}

.board-en {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-3);
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.board-list {
  display: flex;
  flex-direction: column;
  padding: 4px 0 8px;
  position: relative;
  z-index: 1;
}

.board-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  transition: background 0.18s;
  position: relative;
}

.board-row:hover { background: rgba(255, 46, 126, 0.05); }

.board-row:hover .board-name { color: var(--accent); }

.board-row:hover .board-rank { color: var(--accent); }

.board-rank {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-3);
  letter-spacing: 0;
  transition: color 0.18s;
}

.board-row[data-rank="1"] .board-rank,
.board-row[data-rank="2"] .board-rank,
.board-row[data-rank="3"] .board-rank {
  color: #fff;
  border-radius: 50%;
  font-weight: 800;
  font-size: 13px;
  position: relative;
  font-family: var(--display);
}

.board-row[data-rank="1"] .board-rank {
  background: linear-gradient(135deg, #ff2e7e 0%, #ff8eb8 100%);
  box-shadow: 0 0 14px rgba(255, 46, 126, 0.7), inset 0 0 8px rgba(255, 255, 255, 0.18);
}

.board-row[data-rank="2"] .board-rank {
  background: linear-gradient(135deg, #9d4edd 0%, #c084fc 100%);
  box-shadow: 0 0 12px rgba(157, 78, 221, 0.55), inset 0 0 6px rgba(255, 255, 255, 0.15);
}

.board-row[data-rank="3"] .board-rank {
  background: linear-gradient(135deg, #00d4ff 0%, #7eebff 100%);
  color: var(--bg);
  box-shadow: 0 0 12px rgba(0, 212, 255, 0.55), inset 0 0 6px rgba(255, 255, 255, 0.2);
}

.board-name {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.02em;
  transition: color 0.2s;
}

.board-row[data-rank="1"] .board-name,
.board-row[data-rank="2"] .board-name,
.board-row[data-rank="3"] .board-name {
  font-weight: 600;
}

.board-heat {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-2);
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.board-heat .flame {
  width: 12px;
  height: 14px;
  display: inline-flex;
  flex-shrink: 0;
}

.board-heat .flame svg {
  width: 100%;
  height: 100%;
  fill: var(--accent);
  filter: drop-shadow(0 0 4px rgba(255, 46, 126, 0.7));
}

.board-row[data-rank="1"] .board-heat,
.board-row[data-rank="2"] .board-heat,
.board-row[data-rank="3"] .board-heat {
  color: var(--accent);
  font-weight: 600;
}

/* dim flames for lower ranks for a more layered feel */

.board-row[data-tier="cool"] .board-heat .flame svg {
  fill: var(--text-3);
  filter: none;
}

.board-row[data-tier="cool"] .board-heat { color: var(--text-3); }

/* trend arrow chip */

.board-trend {
  margin-left: 8px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  padding: 1px 5px;
  border: 1px solid currentColor;
  border-radius: 2px;
  flex-shrink: 0;
}

.board-trend.up { color: var(--accent); }

.board-trend.down { color: var(--text-3); }

.board-trend.new { color: var(--accent-3); border-color: var(--accent-3); }

/* board footer */

.board-foot {
  padding: 12px 18px 14px;
  border-top: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 1;
}

.board-foot a {
  color: var(--accent);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.board-foot a:hover { letter-spacing: 0.24em; }

/* ============================================================
   H5 TAB + DROPDOWN (移动端专属)
   ============================================================ */

.m-board-bar, .m-board-wrap { display: none; }

/* ---------- Responsive ---------- */

@media (max-width: 1280px) {
  .focus-tag.f1 { font-size: 48px; }
  .focus-tag.f2 { font-size: 36px; }
  .focus-tag.f3 { font-size: 54px; }
  .focus-tag.f4 { font-size: 28px; }
  .focus-tag.f5 { font-size: 30px; }
  .focus-tag.f6 { font-size: 26px; }
  .focus-tag.f7 { font-size: 42px; }
  .focus-cloud { height: 180px; }
}

@media (max-width: 980px) {
  .tags-hero { padding: 22px 16px 18px; }
  .tags-hero-title { font-size: 22px; }
  .focus-cloud-wrap, .time-tabs-wrap, .board-wrap { padding-left: 16px; padding-right: 16px; }
  .time-tabs-wrap { flex-direction: column; align-items: flex-start; }
  .focus-cloud { height: auto; padding: 22px 12px; }
  .focus-tags { position: static; flex-wrap: wrap; gap: 12px 20px; padding: 0; }
  .focus-tag.f1, .focus-tag.f3, .focus-tag.f7 { font-size: 34px; align-self: auto; margin: 0; }
  .focus-tag.f2, .focus-tag.f5 { font-size: 26px; align-self: auto; margin: 0; }
  .focus-tag.f4, .focus-tag.f6 { font-size: 22px; align-self: auto; margin: 0; }
  .board-grid { grid-template-columns: 1fr; gap: 14px; }
}

@media (max-width: 640px) {
  .focus-tag.f1, .focus-tag.f3, .focus-tag.f7 { font-size: 26px; }
  .focus-tag.f2, .focus-tag.f5 { font-size: 22px; }
  .focus-tag.f4, .focus-tag.f6 { font-size: 18px; }
  .trending-row .trending-label { width: 100%; margin-bottom: 4px; }
}

/* ============================================================
   H5: ≤768px — Tab 化 + 时间下拉
   桌面元素隐藏，移动端元素显示
   ============================================================ */

@media (max-width: 768px) {
  .time-tabs-wrap { display: none; }
  .board-wrap { display: none; }
  .m-board-bar, .m-board-wrap { display: block; }

  /* ---- Tab bar + 时间下拉同行 ---- */
  .m-board-bar {
    max-width: 1760px;
    margin: 16px auto 0;
    padding: 0 16px;
    display: flex;
    align-items: center;
    gap: 0;
    position: relative;
    z-index: 10;
  }
  .m-dim-tabs {
    display: flex;
    gap: 2px;
    flex-shrink: 0;
  }
  .m-dim-tab {
    padding: 7px 14px;
    font-size: 13px;
    font-family: var(--sans);
    font-weight: 500;
    color: var(--text-3);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: color 0.18s, background 0.18s;
    border-radius: 4px;
    white-space: nowrap;
  }
  .m-dim-tab:hover { color: var(--text); }
  .m-dim-tab.is-active {
    background: var(--accent);
    color: #fff;
  }

  /* ---- 时间下拉 ---- */
  .m-time-dd {
    margin-left: auto;
    position: relative;
    flex-shrink: 0;
    z-index: 100;
  }
  .m-time-trigger {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    font-size: 11px;
    font-family: var(--mono);
    letter-spacing: 0.04em;
    color: var(--text-2);
    background: var(--bg-2);
    border: 1px solid var(--border-2);
    border-radius: 4px;
    cursor: pointer;
    white-space: nowrap;
    transition: border-color 0.15s;
  }
  .m-time-trigger:hover { border-color: var(--accent); color: var(--text); }
  .m-dd-caret { font-size: 10px; color: var(--text-3); transition: transform 0.2s; }
  .m-time-dd.is-open .m-dd-caret { transform: rotate(180deg); }

  .m-time-menu {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    min-width: 120px;
    background: var(--bg-2);
    border: 1px solid var(--border-2);
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
    padding: 4px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity 0.18s, transform 0.18s, visibility 0s 0.18s;
    z-index: 100;
  }
  .m-time-dd.is-open .m-time-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition: opacity 0.18s, transform 0.18s, visibility 0s;
  }
  .m-time-opt {
    display: block;
    width: 100%;
    padding: 8px 14px;
    font-size: 12px;
    font-family: var(--sans);
    color: var(--text-2);
    background: transparent;
    border: none;
    text-align: left;
    cursor: pointer;
    transition: background 0.12s, color 0.12s;
  }
  .m-time-opt:hover { background: rgba(255,46,126,0.06); color: var(--text); }
  .m-time-opt.is-active { color: var(--accent); font-weight: 600; }

  /* ---- 单维度榜单容器 ---- */
  .m-board-wrap {
    max-width: 1760px;
    margin: 0 auto;
    padding: 8px 16px 32px;
  }
  .m-board-list {
    background: linear-gradient(170deg, var(--bg-card) 0%, var(--bg-2) 100%);
    border: 1px solid var(--border-2);
    border-radius: 8px;
    overflow: hidden;
  }
}
