/* 按钮区排版：分组 + 等宽对齐 */
.sites-box { display: block !important; }
.sites-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; }
.sites-grid--1 { grid-template-columns: minmax(0, 1fr); }
.sites-grid .social-link { justify-content: center; padding: 0.4rem 0.75rem; white-space: nowrap; min-width: 0; }
.sites-divider { margin: 0.75rem 0; }
@media (min-width: 768px) {
  .sites-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; }
  .sites-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sites-grid--1 { grid-template-columns: minmax(0, 1fr); }
  .sites-grid .social-link { padding: 0.55rem 1rem; }
  .sites-divider { margin: 1rem 0; }
}

/* 手机端：小人物坐在卡片右上角，下半身被卡片的毛玻璃遮住。电脑端不显示（背景里已有人物）。 */
.mascot-anchor { display: none; }
@media (min-width: 360px) and (max-width: 767px) {
  .mascot-anchor { display: block; position: relative; z-index: 2; width: 100%; max-width: 42rem; height: 0; pointer-events: none; }
  .mascot { position: absolute; right: 2px; bottom: -92px; width: 112px; height: auto; opacity: 0; animation: mascot-in 0.8s ease-out 0.6s forwards; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.35)); -webkit-mask-image: linear-gradient(#000 82%, transparent 98%); mask-image: linear-gradient(#000 82%, transparent 98%); }
}
@keyframes mascot-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

/* 名字下面那行签名：流动渐变字 + 中间一颗发光小圆点 */
.tagline { display: inline-flex; align-items: center; gap: 0.7em; letter-spacing: 0.32em; font-weight: 400; }
.tagline-text {
  background: linear-gradient(90deg, #f9a8d4, #c4b5fd, #7dd3fc, #c4b5fd, #f9a8d4);
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: tagline-flow 6s linear infinite;
  filter: drop-shadow(0 0 10px rgba(196, 181, 253, 0.35));
  margin-right: -0.32em; /* 抵消最后一个字后面的字距，保持视觉居中 */
}
.tagline-dot {
  width: 0.34em; height: 0.34em; border-radius: 50%; flex: none;
  background: #fde68a; box-shadow: 0 0 8px 2px rgba(253, 230, 138, 0.7);
  animation: tagline-twinkle 2.4s ease-in-out infinite;
}
@keyframes tagline-flow { to { background-position: -200% 0; } }
@keyframes tagline-twinkle { 0%, 100% { opacity: 0.55; transform: scale(0.85); } 50% { opacity: 1; transform: scale(1.15); } }
@media (prefers-reduced-motion: reduce) { .tagline-text, .tagline-dot { animation: none; } }

/* 背景上的暗色遮罩：比原来（左 70% → 中 50% 黑）淡，让晚霞透出来，同时保住卡片文字的对比度 */
.bg-shade { background: linear-gradient(to right, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.2) 50%, transparent); }

/* 手机端：签名落在晚霞最亮处，改用更亮的渐变 + 深色描边阴影保证看得清 */
@media (max-width: 767px) {
  .tagline { font-weight: 500; }
  .tagline-text {
    background-image: linear-gradient(90deg, #ffffff, #fbcfe8, #e0f2fe, #fbcfe8, #ffffff);
    filter: drop-shadow(0 1px 1px rgba(30, 20, 60, 0.75)) drop-shadow(0 0 6px rgba(30, 20, 60, 0.55));
  }
  .tagline-dot { box-shadow: 0 0 0 1px rgba(30, 20, 60, 0.35), 0 0 8px 2px rgba(253, 230, 138, 0.8); }
}

/* 按钮悬停光晕颜色（sites.js 里的 color） */
.social-link[class*="glow-c-"]:hover { --tw-shadow: var(--tw-shadow-colored); }
.social-link.glow-c-orange:hover { --tw-shadow-color: rgb(251 146 60 / 0.55); }
.social-link.glow-c-amber:hover  { --tw-shadow-color: rgb(251 191 36 / 0.55); }
.social-link.glow-c-pink:hover   { --tw-shadow-color: rgb(244 114 182 / 0.55); }
.social-link.glow-c-rose:hover   { --tw-shadow-color: rgb(251 113 133 / 0.55); }
.social-link.glow-c-purple:hover { --tw-shadow-color: rgb(168 85 247 / 0.5); }
.social-link.glow-c-blue:hover   { --tw-shadow-color: rgb(59 130 246 / 0.5); }
.social-link.glow-c-cyan:hover   { --tw-shadow-color: rgb(6 182 212 / 0.5); }
.social-link.glow-c-green:hover  { --tw-shadow-color: rgb(34 197 94 / 0.5); }
.social-link.glow-c-white:hover  { --tw-shadow-color: rgb(255 255 255 / 0.5); }

/* 手机端：名字落在亮色晚霞上，加深色阴影衬出来 */
@media (max-width: 767px) {
  .typewriter-container { filter: drop-shadow(0 1px 1px rgba(30, 20, 60, 0.7)) drop-shadow(0 0 8px rgba(30, 20, 60, 0.45)); }
}

/* 精简模式（lite.js）：隐藏 3D、粒子、鼠标拖尾的画布 */
html.lite #three-container, html.lite #particles-container, html.lite #mouse-trail { display: none !important; }

/* 页脚：落在亮色草地上，提亮并加深色阴影 */
footer.fixed { color: rgba(255, 255, 255, 0.82); text-shadow: 0 1px 2px rgba(20, 12, 45, 0.9), 0 0 8px rgba(20, 12, 45, 0.7); }

/* 按钮名字后面的呼吸小亮点（sites.js 里写 dot: true） */
.site-dot { position: relative; z-index: 10; flex: none; width: 7px; height: 7px; margin-left: -2px; border-radius: 50%; background: #7dd3fc; box-shadow: 0 0 8px rgba(125, 211, 252, 0.9); animation: site-dot-pulse 2.4s ease-in-out infinite; }
@keyframes site-dot-pulse { 0%, 100% { opacity: 0.45; transform: scale(0.8); } 50% { opacity: 1; transform: scale(1.15); } }
@media (prefers-reduced-motion: reduce) { .site-dot { animation: none; } }

/* 最后一行不满时不留空位（每个按钮占几格由 sites-render.js 算好，写在 --span 里） */
@media (max-width: 767px) {
  .sites-grid--auto > :last-child:nth-child(odd) { grid-column: 1 / -1; }
}
@media (min-width: 768px) {
  .sites-grid--auto { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 0.6rem; }
  .sites-grid--auto > .social-link { grid-column: span var(--span, 4); padding: 0.55rem 0.5rem; gap: 0.5rem; }
}

/* 分组小标题：显示在分割线中间 */
.sites-title { display: flex; align-items: center; gap: 0.75rem; color: rgba(255, 255, 255, 0.6); font-size: 0.75rem; line-height: 1; letter-spacing: 0.35em; white-space: nowrap; }
.sites-title span { padding-left: 0.35em; }
.sites-title::before, .sites-title::after { content: ""; flex: 1; height: 1px; }
.sites-title::before { background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.3)); }
.sites-title::after { background: linear-gradient(to left, transparent, rgba(255, 255, 255, 0.3)); }

/* 手机端：网站变多后卡片会到底，给页脚留出位置，避免文字压在卡片上 */
@media (max-width: 767px) {
  main { padding-bottom: 3.25rem !important; }
}

/* 标签切换：两个或以上带小标题的组时启用，一次只显示一组。样式是一条玻璃胶囊，里面有会滑动的渐变滑块 */
.sites-tabs { display: flex; align-items: center; justify-content: center; }
.sites-tabs::before, .sites-tabs::after { content: ""; flex: 1; height: 1px; }
.sites-tabs::before { margin-right: 0.75rem; background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.3)); }
.sites-tabs::after { margin-left: 0.75rem; background: linear-gradient(to left, transparent, rgba(255, 255, 255, 0.3)); }
.sites-seg { position: relative; display: inline-flex; flex: none; padding: 4px; border-radius: 999px; background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2), 0 6px 20px rgba(20, 12, 45, 0.18); }
.sites-seg-thumb { position: absolute; top: 4px; bottom: 4px; left: 0; width: 0; border-radius: 999px; pointer-events: none;
  background: linear-gradient(120deg, rgba(249, 168, 212, 0.6), rgba(196, 181, 253, 0.6) 55%, rgba(125, 211, 252, 0.55));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5), 0 0 18px rgba(196, 181, 253, 0.5); }
.sites-seg.is-ready .sites-seg-thumb { transition: transform 0.45s cubic-bezier(0.34, 1.3, 0.5, 1), width 0.45s cubic-bezier(0.34, 1.3, 0.5, 1); }
.sites-tab { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 0.4rem; border: 0; background: none; cursor: pointer; border-radius: 999px;
  padding: 0.5rem 0.8rem 0.5rem 0.9rem; font-size: 0.82rem; line-height: 1; letter-spacing: 0.12em; white-space: nowrap; color: rgba(255, 255, 255, 0.72); transition: color 0.3s; }
.sites-tab svg { width: 0.95rem; height: 0.95rem; fill: currentColor; flex: none; }
.sites-tab:hover { color: #fff; }
.sites-tab.is-active { color: #fff; text-shadow: 0 1px 6px rgba(60, 30, 110, 0.55); }
.sites-tab:focus-visible { outline: 2px solid rgba(255, 255, 255, 0.8); outline-offset: 2px; }
.sites-tab-count { min-width: 1.2rem; padding: 0.16rem 0.32rem; border-radius: 999px; font-size: 0.66rem; letter-spacing: 0; line-height: 1; text-align: center; text-shadow: none;
  color: rgba(255, 255, 255, 0.85); background: rgba(255, 255, 255, 0.16); transition: color 0.3s, background-color 0.3s; }
.sites-tab.is-active .sites-tab-count { color: #4c2a7a; background: rgba(255, 255, 255, 0.9); }
/* 还没点过时，没选中的标签上的数字轻轻跳两下，提示这里还有内容 */
.sites-seg:not(.is-touched) .sites-tab:not(.is-active) .sites-tab-count { animation: sites-count-hint 1.4s ease-in-out 2.2s 3; }
@keyframes sites-count-hint {
  0%, 100% { transform: none; background: rgba(255, 255, 255, 0.16); box-shadow: none; }
  40% { transform: scale(1.3); background: rgba(249, 168, 212, 0.95); color: #4c2a7a; box-shadow: 0 0 12px rgba(249, 168, 212, 0.9); }
}
.sites-panels { display: grid; transition: height 0.4s cubic-bezier(0.4, 0, 0.2, 1); }
.sites-panel { grid-area: 1 / 1; align-content: start; align-self: start; opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(10px) scale(0.98);
  transition: opacity 0.3s ease, transform 0.4s ease, visibility 0s linear 0.3s; }
.sites-panel.is-active { opacity: 1; visibility: visible; pointer-events: auto; transform: none; transition-delay: 0.08s, 0.08s, 0s; }
@media (max-width: 767px) {
  .sites-tab { padding-top: 0.62rem; padding-bottom: 0.62rem; }
}

/* 每个标签有自己的颜色：第一个是晚霞暖色，第二个是夜空冷色，第三个是青绿。滑块滑过去时颜色跟着换 */
.sites-tint-0 { --tab-a: #fdba74; --tab-grad: linear-gradient(120deg, rgba(253, 186, 116, 0.78), rgba(249, 168, 212, 0.72)); --tab-glow: rgba(251, 146, 150, 0.6); --tab-ink: #9d3a52; }
.sites-tint-1 { --tab-a: #a5b4fc; --tab-grad: linear-gradient(120deg, rgba(167, 139, 250, 0.78), rgba(125, 211, 252, 0.72)); --tab-glow: rgba(129, 160, 255, 0.6); --tab-ink: #3b3a8f; }
.sites-tint-2 { --tab-a: #6ee7b7; --tab-grad: linear-gradient(120deg, rgba(110, 231, 183, 0.75), rgba(125, 211, 252, 0.72)); --tab-glow: rgba(94, 220, 200, 0.6); --tab-ink: #1f6257; }
.sites-seg-thumb { background: none; box-shadow: none; }
.sites-seg-thumb i { position: absolute; inset: 0; border-radius: inherit; opacity: 0; background: var(--tab-grad);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.55), 0 0 18px var(--tab-glow); transition: opacity 0.45s ease; }
.sites-seg-thumb i.is-active { opacity: 1; }
.sites-tab svg { color: var(--tab-a); filter: drop-shadow(0 0 5px var(--tab-glow)); transition: color 0.3s, filter 0.3s, transform 0.3s; }
.sites-tab:hover svg { transform: scale(1.12); }
.sites-tab.is-active svg { color: #fff; filter: none; }
.sites-tab.is-active .sites-tab-count { color: var(--tab-ink); }
@keyframes sites-count-hint {
  0%, 100% { transform: none; background: rgba(255, 255, 255, 0.16); box-shadow: none; }
  40% { transform: scale(1.3); background: var(--tab-a); color: var(--tab-ink); box-shadow: 0 0 12px var(--tab-glow); }
}

/* 超窄手机（宽度不到 360）：标签收紧一点，放得下 */
@media (max-width: 359px) {
  .sites-seg { padding: 3px; }
  .sites-seg-thumb { top: 3px; bottom: 3px; }
  .sites-tab { padding-left: 0.6rem; padding-right: 0.55rem; gap: 0.28rem; font-size: 0.76rem; letter-spacing: 0.04em; }
}

/* 浏览器禁用脚本时的备用链接列表（主要给搜索引擎看） */
.sites-noscript { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; list-style: none; margin: 0; padding: 0; }
.sites-noscript a { color: #e5e7eb; text-decoration: underline; }
