/* ===== 仙里仙气 · 顶部导航 ===== */
.top-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 0;
  padding: 10px 16px;
  background: linear-gradient(180deg, rgba(7,7,13,.96), rgba(13,13,13,.82), transparent);
}
/* ===== 乾卦汉堡按钮 — 仙侠 logo 级黑金风格 ===== */
.top-nav .hamburger-btn {
  background: rgba(7,7,13,.82); border: 1.5px solid rgba(212,168,67,.3); color: #e0d8f0;
  padding: 4px 6px; flex-shrink: 0; cursor: pointer; order: -1; margin-right: 6px;
  border-radius: 12px; transition: all .4s cubic-bezier(.4,0,.2,1); position: relative;
  box-shadow: 0 0 12px rgba(212,168,67,.1), 0 0 28px rgba(212,168,67,.04);
  animation: hmBtnBreathe 3.5s ease-in-out infinite;
}
.top-nav .hamburger-btn:hover {
  border-color: rgba(240,192,96,.7);
  box-shadow: 0 0 22px rgba(240,192,96,.28), 0 0 48px rgba(212,168,67,.14), 0 0 72px rgba(240,192,96,.06);
  transform: scale(1.08);
}
.top-nav .hamburger-btn:active { transform: scale(.93); }
/* 乾卦光晕 — 常驻呼吸 */
.top-nav .hamburger-btn::before {
  content: '';
  position: absolute; inset: -5px; border-radius: 14px;
  background: radial-gradient(circle, rgba(240,192,96,.2) 0%, rgba(212,168,67,.08) 35%, transparent 68%);
  opacity: .45; pointer-events: none;
  animation: hmBtnGlowPulse 3s ease-in-out infinite;
}
@keyframes hmBtnGlowPulse {
  0%,100% { opacity: .25; transform: scale(.94); }
  50% { opacity: .85; transform: scale(1.1); }
}
@keyframes hmBtnBreathe {
  0%,100% { box-shadow: 0 0 10px rgba(212,168,67,.06), 0 0 20px rgba(212,168,67,.02); }
  50% { box-shadow: 0 0 20px rgba(212,168,67,.22), 0 0 36px rgba(240,192,96,.1), 0 0 56px rgba(240,192,96,.04); }
}
/* 乾卦SVG — 金色主调 + 灵珠辉光 */
.top-nav .hamburger-btn svg { display: block; position: relative; z-index: 1; }
/* 辉光底 circle hover 增亮 */
.top-nav .hamburger-btn:hover svg circle:first-of-type { opacity: 1 !important; }
/* 外环 hover 增亮 */
.top-nav .hamburger-btn:hover svg circle:nth-of-type(2) { opacity: 1; stroke: rgba(240,192,96,.95); }
/* 虚线装饰环 hover */
.top-nav .hamburger-btn:hover svg circle:nth-of-type(3) { stroke: rgba(240,192,96,.22); }
/* 三条乾卦横线 hover 辉光增强 */
.top-nav .hamburger-btn svg rect { transition: filter .4s, opacity .4s; }
.top-nav .hamburger-btn:hover svg rect { filter: drop-shadow(0 0 8px rgba(240,192,96,.65)); }
/* 灵珠装饰点 hover */
.top-nav .hamburger-btn svg circle:nth-of-type(n+4) { transition: opacity .4s, r .4s; }
.top-nav .hamburger-btn:hover svg circle:nth-of-type(n+4) { opacity: 1; }
/* 乾卦缓旋 — 已取消，改为静态展示 */
.top-nav .hamburger-btn svg {
  transform-origin: 28px 28px;
}
.top-nav .tabs {
  display: flex; gap: 0; flex: 1; overflow-x: auto;
  -webkit-overflow-scrolling: touch; white-space: nowrap; scrollbar-width: none;
}
.top-nav .tabs::-webkit-scrollbar { display: none; }
.top-nav .tab {
  padding: 6px 14px; font-size: 15px; font-weight: 500; color: #9b8ec4;
  background: none; border: none; cursor: pointer; position: relative;
  transition: color .2s; white-space: nowrap; flex-shrink: 0;
}
.top-nav .tab:hover { color: #e0d8f0; }
.top-nav .tab.active {
  color: #f0c060; font-size: 16px; font-weight: 700;
}
.top-nav .tab.active::after {
  content: ''; position: absolute; bottom: -2px; left: 50%;
  transform: translateX(-50%); width: 18px; height: 3px; border-radius: 2px;
  background: linear-gradient(90deg, #d4a843, #f0c060, #d4a843);
  box-shadow: 0 0 8px rgba(240,192,96,.4);
}
.top-nav .search-btn {
  color: #c4b5fd; font-size: 20px; background: none; border: none;
  cursor: pointer; padding: 6px 12px; text-decoration: none; flex-shrink: 0;
  transition: color .2s, transform .2s; display: flex; align-items: center;
  justify-content: center; position: relative;
}
.top-nav .search-btn:hover { color: #f0c060; transform: scale(1.1); }
.top-nav .search-btn::before {
  content: ''; position: absolute; inset: 0;
  background: conic-gradient(#d4a843, #9b59b6, #00d2ff, #d4a843);
  opacity: 0; border-radius: 50%; transition: opacity .3s; filter: blur(8px);
}
.top-nav .search-btn:hover::before { opacity: .2; animation: searchAura 2s linear infinite; }
@keyframes searchAura { to { transform: rotate(360deg); } }
.top-nav .search-btn svg { width: 22px; height: 22px; position: relative; z-index: 1; }
/* 搜索图标SVG黑色主色+金边 */
.top-nav .search-btn svg circle { stroke: #1a1a2e; transition: stroke .3s, filter .3s; }
.top-nav .search-btn svg line { stroke: #1a1a2e; transition: stroke .3s, filter .3s; }
.top-nav .search-btn:hover svg circle,
.top-nav .search-btn:hover svg line {
  stroke: #2a2a3e;
  filter: drop-shadow(0 0 4px rgba(200,160,40,.4));
}
/* Tab内联SVG图标黑色主色 */
.top-nav .tab svg { stroke: #1a1a2e; transition: stroke .3s, filter .3s; }
.top-nav .tab:hover svg { stroke: #2a2a3e; filter: drop-shadow(0 0 3px rgba(200,160,40,.3)); }
.top-nav .tab.active svg { stroke: #C5A028; filter: drop-shadow(0 0 5px rgba(240,192,96,.4)); }

/* ===== 星缘八卦图按钮 ===== */
/* 右侧搜索按钮 */
.top-search-right {
  color: #c4b5fd; font-size: 22px; background: none; border: none;
  cursor: pointer; padding: 6px 10px; text-decoration: none; flex-shrink: 0;
  transition: color .2s, transform .2s; display: flex; align-items: center;
  justify-content: center; position: relative;
}
.top-search-right:hover { color: #f0c060; transform: scale(1.1); }
/* 右侧搜索按钮仙气环绕 */
.top-search-right::before {
  content: '';
  position: absolute; inset: -4px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200,160,40,.08) 0%, transparent 70%);
  opacity: 0; transition: opacity .3s;
}
.top-search-right:hover::before { opacity: 1; }
.top-search-right svg { width: 22px; height: 22px; position: relative; z-index: 1; }
.top-search-right svg circle { stroke: #1a1a2e; }
.top-search-right svg line { stroke: #1a1a2e; }
.top-search-right:hover svg circle,
.top-search-right:hover svg line {
  stroke: #2a2a3e;
  filter: drop-shadow(0 0 4px rgba(200,160,40,.4));
}
.star-match-btn {
  background: none; border: none; cursor: pointer; padding: 4px 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: transform .3s; position: relative;
}
.star-match-btn:hover { transform: scale(1.1); }
.star-match-btn .bagua {
  width: 32px; height: 32px; position: relative;
  animation: baguaIdleSpin 20s linear infinite;
}
.star-match-btn .bagua svg {
  width: 100%; height: 100%; display: block;
}
/* 八卦旋转动画 */
.star-match-btn.spinning .bagua svg {
  animation: baguaSpin 1.2s cubic-bezier(.4,0,.2,1);
}
@keyframes baguaIdleSpin {
  to { transform: rotate(-360deg); }
}
.star-match-btn .bagua-glow {
  position: absolute; inset: -4px; border-radius: 50%;
  background: conic-gradient(from 0deg, #d4a843, #9b59b6, #00d2ff, #f0c060, #d4a843);
  opacity: 0; transition: opacity .3s; filter: blur(8px); z-index: 0;
}
.star-match-btn:hover .bagua-glow {
  opacity: .25;
  animation: baguaGlowPulse 2s ease-in-out infinite;
}
@keyframes baguaGlowPulse {
  0%,100% { opacity: .15; filter: blur(8px); }
  50% { opacity: .35; filter: blur(14px); }
}
.star-match-btn.spinning .bagua-glow {
  opacity: .4;
  animation: baguaGlow 1.2s cubic-bezier(.4,0,.2,1);
}
@keyframes baguaSpin {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(720deg); }
}
@keyframes baguaGlow {
  0%   { opacity: .4; filter: blur(8px); }
  50%  { opacity: .7; filter: blur(16px); }
  100% { opacity: .4; filter: blur(8px); }
}

/* ===== 星缘结果弹窗 ===== */
.star-match-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(7,7,13,.88); display: flex; align-items: center; justify-content: center;
  animation: starFadeIn .4s ease;
}
.star-match-overlay.closing { animation: starFadeOut .35s ease forwards; }
@keyframes starFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes starFadeOut { from { opacity: 1; } to { opacity: 0; } }

.star-match-card {
  background: linear-gradient(160deg, rgba(20,15,40,.96), rgba(10,8,25,.98));
  border: 1px solid rgba(180,140,80,.2);
  border-radius: 20px; padding: 36px 28px 28px;
  max-width: 340px; width: 90%; text-align: center;
  box-shadow: 0 0 60px rgba(180,140,80,.08), 0 20px 60px rgba(0,0,0,.5);
  animation: cardPopIn .5s cubic-bezier(.34,1.56,.64,1);
  position: relative; overflow: hidden;
}
.star-match-card::before {
  content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
  background: conic-gradient(from 0deg, transparent, rgba(212,168,67,.06), transparent, rgba(155,89,182,.06), transparent);
  animation: cardOrbit 8s linear infinite; pointer-events: none;
}
@keyframes cardPopIn { from { transform: scale(.7); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes cardOrbit { to { transform: rotate(360deg); } }

.star-match-card .star-title {
  font-size: 20px; color: #f0c060; font-weight: 700; margin-bottom: 4px;
  letter-spacing: 2px; position: relative; z-index: 1;
}
.star-match-card .star-subtitle {
  font-size: 12px; color: #9b8ec4; margin-bottom: 24px;
  letter-spacing: 1px; position: relative; z-index: 1;
}
.star-match-card .star-avatar {
  width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 12px;
  border: 2px solid rgba(240,192,96,.4);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 700; color: #f0c060;
  background: linear-gradient(135deg, rgba(212,168,67,.15), rgba(155,89,182,.15));
  position: relative; z-index: 1; overflow: hidden;
}
.star-match-card .star-avatar img {
  width: 100%; height: 100%; object-fit: cover; border-radius: 50%;
}
.star-match-card .star-nickname {
  font-size: 18px; color: #e0d8f0; font-weight: 600; margin-bottom: 16px;
  position: relative; z-index: 1;
}
.star-match-card .star-content-label {
  font-size: 12px; color: #9b8ec4; margin-bottom: 8px;
  position: relative; z-index: 1;
}
.star-match-card .star-content {
  font-size: 15px; color: #c4b5fd; padding: 12px 18px;
  background: rgba(212,168,67,.06); border-radius: 12px;
  line-height: 1.6; margin-bottom: 12px; word-break: break-all;
  position: relative; z-index: 1;
  border: 1px solid rgba(180,140,80,.1);
}
.star-match-card .star-time {
  font-size: 11px; color: #6b5e9e; margin-bottom: 20px;
  position: relative; z-index: 1;
}
.star-match-card .star-actions {
  display: flex; gap: 10px; justify-content: center; position: relative; z-index: 1;
}
.star-match-card .star-btn {
  padding: 10px 22px; border-radius: 20px; font-size: 14px;
  cursor: pointer; border: none; font-weight: 600;
  transition: all .25s; letter-spacing: 1px;
}
.star-match-card .star-btn-primary {
  background: linear-gradient(135deg, #d4a843, #f0c060); color: #0d0d0d;
  box-shadow: 0 4px 16px rgba(240,192,96,.25);
}
.star-match-card .star-btn-primary:hover {
  box-shadow: 0 6px 24px rgba(240,192,96,.4); transform: translateY(-1px);
}
.star-match-card .star-btn-secondary {
  background: transparent; color: #9b8ec4;
  border: 1px solid rgba(180,140,80,.25);
}
.star-match-card .star-btn-secondary:hover {
  color: #f0c060; border-color: rgba(240,192,96,.4);
}
.star-match-card .star-close {
  position: absolute; top: 14px; right: 18px; background: none; border: none;
  color: #6b5e9e; font-size: 18px; cursor: pointer; z-index: 2;
  transition: color .2s;
}
.star-match-card .star-close:hover { color: #f0c060; }

/* 加载状态 — 八卦旋转 */
.star-loading {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 40px 0;
}
.star-loading .bagua-big {
  width: 80px; height: 80px; margin-bottom: 20px;
}
.star-loading .bagua-big svg {
  width: 100%; height: 100%; animation: baguaLoading 1s linear infinite;
}
.star-loading .star-loading-text {
  font-size: 14px; color: #9b8ec4; letter-spacing: 2px;
}
@keyframes baguaLoading {
  to { transform: rotate(360deg); }
}
.top-nav .search-btn {
  color: #c4b5fd; font-size: 20px; background: none; border: none;
  cursor: pointer; padding: 6px 12px; text-decoration: none; flex-shrink: 0;
  transition: color .2s, transform .2s; display: flex; align-items: center;
  justify-content: center; position: relative;
}
.top-nav .search-btn:hover { color: #f0c060; transform: scale(1.1); }
.top-nav .search-btn::before {
  content: '';
  position: absolute; inset: 0;
  background: conic-gradient(#d4a843, #9b59b6, #00d2ff, #d4a843);
  opacity: 0; border-radius: 50%; transition: opacity .3s; filter: blur(8px);
}
.top-nav .search-btn:hover::before { opacity: .2; animation: searchAura 2s linear infinite; }
@keyframes searchAura { to { transform: rotate(360deg); } }
.top-nav .search-btn svg { width: 22px; height: 22px; position: relative; z-index: 1; }
/* 搜索图标SVG黑色主色+金边 */
.top-nav .search-btn svg circle { stroke: #1a1a2e; transition: stroke .3s, filter .3s; }
.top-nav .search-btn svg line { stroke: #1a1a2e; transition: stroke .3s, filter .3s; }
.top-nav .search-btn:hover svg circle,
.top-nav .search-btn:hover svg line {
  stroke: #2a2a3e;
  filter: drop-shadow(0 0 4px rgba(200,160,40,.4));
}
/* Tab内联SVG图标黑色主色 */
.top-nav .tab svg { stroke: #1a1a2e; transition: stroke .3s, filter .3s; }
.top-nav .tab:hover svg { stroke: #2a2a3e; filter: drop-shadow(0 0 3px rgba(200,160,40,.3)); }
.top-nav .tab.active svg { stroke: #C5A028; filter: drop-shadow(0 0 5px rgba(240,192,96,.4)); }
