/* ===== 白底黑字 · 黑体系 ===== */
:root {
  --bg: #f5f5f5;
  --bg-pattern: #ebebeb;
  --surface: #ffffff;
  --text: #0d0d0d;
  --text-secondary: #333333;
  --text-muted: #5c5c5c;
  --border: #d9d9d9;
  --border-strong: #1a1a1a;
  --accent: #111111;
  --accent-hover: #000000;
  --success: #0d5c2f;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 8px 24px rgba(0, 0, 0, 0.06);
  --shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.1), 0 16px 40px rgba(0, 0, 0, 0.08);
  --radius: 14px;
  --radius-sm: 10px;
  --font-hei: "Microsoft YaHei", "Microsoft YaHei UI", "PingFang SC", SimHei,
    "STHeiti", "Heiti SC", sans-serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 0px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-hei);
  font-weight: 600;
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  padding-bottom: max(2rem, env(safe-area-inset-bottom));
  overflow-x: hidden;
}

/* 整页首屏渐入 */
body:not(.is-ready) .page,
body:not(.is-ready) .page-bg {
  opacity: 0;
}

body.is-ready .page {
  animation: pageEnter 0.7s var(--ease-out) forwards;
}

body.is-ready .page-bg {
  animation: bgEnter 1s var(--ease-out) forwards;
}

@keyframes pageEnter {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bgEnter {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* 背景层：浮动光斑 + 网格（由 page-bg 承载，便于视差） */
.page-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
  will-change: transform;
}

.page-bg__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(90deg, var(--bg-pattern) 1px, transparent 1px),
    linear-gradient(var(--bg-pattern) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.85;
}

.page-bg__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.35;
  animation: orbFloat 18s ease-in-out infinite;
}

.page-bg__orb--1 {
  width: min(420px, 90vw);
  height: min(420px, 90vw);
  background: radial-gradient(circle, #d4d4d4 0%, transparent 70%);
  top: -8%;
  left: -10%;
  animation-delay: 0s;
}

.page-bg__orb--2 {
  width: min(360px, 80vw);
  height: min(360px, 80vw);
  background: radial-gradient(circle, #c8c8c8 0%, transparent 70%);
  top: 35%;
  right: -12%;
  animation-delay: -6s;
}

.page-bg__orb--3 {
  width: min(300px, 70vw);
  height: min(300px, 70vw);
  background: radial-gradient(circle, #e0e0e0 0%, transparent 70%);
  bottom: -5%;
  left: 25%;
  animation-delay: -12s;
}

@keyframes orbFloat {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(18px, -14px) scale(1.05);
  }
  66% {
    transform: translate(-12px, 10px) scale(0.96);
  }
}

/* 顶部动态条 */
.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 100;
  background: linear-gradient(
    90deg,
    #1a1a1a,
    #404040,
    #1a1a1a,
    #000000
  );
  background-size: 200% 100%;
  animation: topShine 4s linear infinite;
}

@keyframes topShine {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 200% 50%;
  }
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link:focus {
  position: fixed;
  left: 12px;
  top: 12px;
  width: auto;
  height: auto;
  padding: 10px 14px;
  background: var(--surface);
  border: 2px solid var(--border-strong);
  border-radius: var(--radius-sm);
  z-index: 200;
}

.page {
  position: relative;
  z-index: 0;
  max-width: min(100%, 44rem);
  margin: 0 auto;
  padding: 2.25rem 1.25rem 3rem;
}

@media (min-width: 640px) {
  .page {
    padding: 2.75rem 1.75rem 3.5rem;
  }
}

@media (min-width: 900px) {
  .page {
    max-width: 56rem;
    padding: 3rem 2rem 4rem;
  }
}

/* 区块入场（滚动） */
.js-reveal-section {
  opacity: 0;
  transform: translateY(28px) scale(0.98);
  filter: blur(4px);
  transition:
    opacity 0.65s var(--ease-out),
    transform 0.65s var(--ease-out),
    filter 0.55s var(--ease-out);
}

.js-reveal-section.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}

.js-reveal {
  opacity: 0;
  transform: translateY(20px) scale(0.99);
  transition:
    opacity 0.5s var(--ease-out),
    transform 0.5s var(--ease-out);
}

.js-reveal.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* 头部 */
.hero {
  text-align: center;
  margin-bottom: 2rem;
}

@media (min-width: 900px) {
  .hero {
    margin-bottom: 2.5rem;
  }
}

.hero__badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  animation: badgePulse 3s ease-in-out infinite;
  box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.06);
}

@keyframes badgePulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.04);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(0, 0, 0, 0.03);
  }
}

.hero__title {
  margin: 0;
  font-size: clamp(1.2rem, 4.2vw, 1.85rem);
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: -0.02em;
  color: var(--text);
  background: linear-gradient(105deg, #000 0%, #2a2a2a 40%, #000 80%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: titleShine 8s ease-in-out infinite;
}

@keyframes titleShine {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

.hero__subtitle {
  margin: 0.85rem 0 0;
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  font-weight: 700;
  color: var(--text-secondary);
  animation: fadeUp 0.8s var(--ease-out) 0.15s both;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero__desc {
  margin: 1rem auto 0;
  max-width: 36rem;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.75;
  color: var(--text-muted);
  animation: fadeUp 0.85s var(--ease-out) 0.28s both;
}

@media (min-width: 640px) {
  .hero__desc {
    font-size: 0.95rem;
  }
}

/* 卡片通用 */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem 1.15rem;
  transition:
    box-shadow 0.3s var(--ease-out),
    border-color 0.25s ease,
    transform 0.3s var(--ease-out);
}

@media (min-width: 640px) {
  .card {
    padding: 1.5rem 1.4rem;
  }
}

@media (hover: hover) {
  .card:hover {
    box-shadow: var(--shadow-hover);
    border-color: #c4c4c4;
  }
}

.card + .card {
  margin-top: 1.25rem;
}

@media (min-width: 900px) {
  .card + .card {
    margin-top: 1.5rem;
  }
}

.card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.card__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.card__title-icon {
  font-size: 1.1em;
  line-height: 1;
}

/* 主域名区 */
.domain-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 0.5rem;
}

.domain-row {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

@media (min-width: 768px) {
  .domain-row {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
  }
}

.domain-link {
  font-size: clamp(1rem, 2.4vw, 1.2rem);
  font-weight: 800;
  color: var(--accent);
  text-decoration: none;
  word-break: break-all;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}

@media (hover: hover) {
  .domain-link:hover {
    color: var(--accent-hover);
    border-bottom-color: var(--text);
  }
}

.domain-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .domain-actions {
    flex-wrap: nowrap;
  }
}

/* 按钮（水波纹 + 光泽 + 微动效） */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 48px;
  padding: 0 1.15rem;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 800;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border-strong);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  isolation: isolate;
  transition:
    transform 0.2s var(--ease-out),
    background 0.25s ease,
    box-shadow 0.3s var(--ease-out),
    border-color 0.2s ease;
}

.btn:active {
  transform: scale(0.97);
}

.btn--primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.btn--primary::after {
  content: "";
  position: absolute;
  inset: 0;
  left: -100%;
  background: linear-gradient(
    105deg,
    transparent 0%,
    rgba(255, 255, 255, 0.22) 45%,
    transparent 70%
  );
  transition: left 0.5s ease;
  z-index: 0;
  pointer-events: none;
}

@media (hover: hover) {
  .btn--primary:hover {
    background: var(--accent-hover);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  }

  .btn--primary:hover::after {
    left: 100%;
    transition: left 0.65s var(--ease-out);
  }
}

.btn--ghost::after {
  content: "";
  position: absolute;
  inset: 0;
  left: -100%;
  background: linear-gradient(
    105deg,
    transparent 0%,
    rgba(0, 0, 0, 0.06) 50%,
    transparent 70%
  );
  transition: left 0.5s ease;
  z-index: 0;
  pointer-events: none;
}

@media (hover: hover) {
  .btn--ghost:hover {
    background: #f0f0f0;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
  }

  .btn--ghost:hover::after {
    left: 100%;
  }
}

.btn .btn__icon,
.btn .copy-label {
  position: relative;
  z-index: 1;
}

.btn__icon {
  width: 1.15rem;
  height: 1.15rem;
  flex-shrink: 0;
}

/* 点击水波纹 */
.btn-ripple {
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  animation: btnRipple 0.65s ease-out forwards;
  pointer-events: none;
  z-index: 2;
  background: rgba(255, 255, 255, 0.45);
}

.btn--ghost .btn-ripple {
  background: rgba(0, 0, 0, 0.12);
}

@keyframes btnRipple {
  to {
    transform: scale(1);
    opacity: 0;
  }
}

/* 刷新按钮旋转 */
#refresh-btn .btn__icon-spin {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  display: block;
}

#refresh-btn.is-spinning .btn__icon-spin {
  animation: spin 0.65s linear infinite;
  transform-origin: 50% 50%;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.btn--sm {
  min-height: 44px;
  padding: 0 0.85rem;
  font-size: 0.85rem;
}

/* 地址列表 */
.links-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}

@media (min-width: 1024px) {
  .links-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
}

.link-item {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1rem 1rem;
  background: #fafafa;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition:
    border-color 0.25s ease,
    background 0.25s ease,
    transform 0.25s var(--ease-out);
}

@media (min-width: 640px) {
  .link-item {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 1.1rem 1.15rem;
  }
}

@media (hover: hover) {
  .link-item:hover {
    border-color: #999;
    background: #fff;
  }
}

.link-item__body {
  min-width: 0;
  flex: 1;
}

.link-item__meta {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 0.25rem;
}

.link-item__url {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--accent);
  text-decoration: none;
  word-break: break-all;
  line-height: 1.4;
}

@media (hover: hover) {
  .link-item__url:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
  }
}

.link-item__label {
  margin: 0.35rem 0 0;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.link-item__actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
  width: 100%;
}

@media (min-width: 640px) {
  .link-item__actions {
    width: auto;
  }
}

.link-item__actions .btn {
  flex: 1;
}

@media (min-width: 640px) {
  .link-item__actions .btn {
    flex: 0 0 auto;
  }
}

.hint {
  margin: 0.85rem 0 0;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  line-height: 1.5;
}

/* 温馨提示 */
.tips-list {
  margin: 0;
  padding-left: 1.15rem;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.7;
  color: var(--text-secondary);
}

.tips-list li {
  margin-bottom: 0.5rem;
}

.tips-list strong {
  font-weight: 800;
  color: var(--text);
}

.tips-list kbd {
  font-family: inherit;
  font-size: 0.78em;
  font-weight: 700;
  padding: 0.15rem 0.4rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #f3f3f3;
}

.card__footer-meta {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* 页脚 */
.site-footer {
  margin-top: 2.5rem;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  line-height: 1.6;
}

@media (min-width: 640px) {
  .site-footer {
    font-size: 0.78rem;
  }
}

/* 刷新按钮 */
#refresh-btn {
  font-family: inherit;
}

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: max(1.5rem, env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(120px);
  z-index: 300;
  padding: 0.65rem 1.25rem;
  font-size: 0.85rem;
  font-weight: 800;
  color: #fff;
  background: var(--accent);
  border-radius: 999px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.22);
  opacity: 0;
  pointer-events: none;
  transition:
    transform 0.4s var(--ease-out),
    opacity 0.35s ease;
}

.toast.is-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
  animation: toastPop 0.45s var(--ease-out);
}

@keyframes toastPop {
  0% {
    transform: translateX(-50%) translateY(12px) scale(0.92);
  }
  70% {
    transform: translateX(-50%) translateY(-4px) scale(1.02);
  }
  100% {
    transform: translateX(-50%) translateY(0) scale(1);
  }
}

/* 减少动画（系统设置） */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }

  body:not(.is-ready) .page,
  body:not(.is-ready) .page-bg {
    opacity: 1;
  }

  .js-reveal,
  .js-reveal-section {
    opacity: 1;
    transform: none;
    filter: none;
  }

  .hero__title {
    background: none;
    -webkit-background-clip: unset;
    background-clip: unset;
    color: var(--text);
  }

  .page-bg__orb {
    animation: none;
  }
}
