:root {
  /* 高端配色方案 */
  --bg-from: #e9fcff;
  --bg-mid: #bdf6ff;
  --bg-to: #67eeff;
  --accent: #0891b2;
  --accent-light: #22d3ee;
  --accent-dark: #0e7490;
  --text: #0e1220;
  --text-secondary: #1e293b;
  --muted: #64748b;
  --panel: #ffffff;
  --card: #ffffff;
  --radius: 24px;
  --radius-sm: 16px;
  --radius-lg: 32px;
  --ring: rgba(34, 211, 238, 0.2);
  --border: #e2e8f0;
  --border-light: rgba(226, 232, 240, 0.6);

  /* 精致阴影系统 */
  --shadow-xs: 0 1px 2px rgba(8, 145, 178, .04);
  --shadow-sm: 0 2px 8px rgba(8, 145, 178, .06);
  --shadow: 0 4px 16px rgba(8, 145, 178, .08), 0 2px 4px rgba(8, 145, 178, .04);
  --shadow-md: 0 8px 24px rgba(8, 145, 178, .12), 0 4px 8px rgba(8, 145, 178, .06);
  --shadow-lg: 0 16px 48px rgba(8, 145, 178, .16), 0 8px 16px rgba(8, 145, 178, .08);
  --shadow-xl: 0 24px 64px rgba(8, 145, 178, .20), 0 12px 24px rgba(8, 145, 178, .12);

  /* 玻璃态效果 */
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.8);
  --glass-shadow: 0 8px 32px rgba(8, 145, 178, .1);

  /* 动画曲线 */
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out-back: cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0
}

html {
  height: 100%;
  background-color: #bff3ff;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-y: auto;
}

body {
  margin: 0;
  min-height: 100%;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, "Microsoft YaHei", sans-serif;
  color: var(--text);
  line-height: 1.6;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  background: transparent;
  overflow-x: hidden;
}

/* === 背景终极版 (GPU加速) === */
body::before {
  content: "";
  position: fixed;
  inset: -20vmax;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60vmax 60vmax at 12% -22%, rgba(122, 239, 255, .50), rgba(122, 239, 255, 0) 60%),
    radial-gradient(52vmax 52vmax at 108% -12%, rgba(122, 239, 255, .40), rgba(122, 239, 255, 0) 65%),
    linear-gradient(180deg, #7AEFFF 0%, #9AF4FF 22%, #C9F8FF 48%, #EEFcff 75%, #FFFFFF 100%);
  background-repeat: no-repeat;
  will-change: transform;
  transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

@media (max-width: 768px) {
  body::before {
    background:
      radial-gradient(90vw 90vw at 50% -25%, rgba(122, 239, 255, .45), rgba(122, 239, 255, 0) 70%),
      linear-gradient(180deg, #7AEFFF 0%, #a8f5ff 50%, #ffffff 100%);
  }
}

/* Stop shimmer once the icon image is loaded */
.icon.loaded::before {
  animation: none;
  opacity: 0;
  transform: translateX(0);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* === 全局选区颜色 (品牌化细节) === */
::selection {
  background: rgba(34, 211, 238, 0.3);
  color: #0e1220;
}

.wrap {
  max-width: 1200px;
  margin: 48px auto 100px;
  padding: 0 32px;
}

@media (max-width: 768px) {
  .wrap {
    padding: 0 20px;
    margin: 32px auto 80px;
  }
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 32px;
  flex-wrap: nowrap;
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  padding: 14px 24px;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  contain: layout style;
  will-change: transform;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
  position: relative;
  overflow: hidden;
}

.navbar::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.3), rgba(8, 145, 178, 0.1));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity var(--transition-base);
  pointer-events: none;
}

.navbar:hover::before {
  opacity: 1;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px
}

.brand img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.8), var(--shadow-md);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.brand:hover img {
  transform: scale(1.05);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.9), var(--shadow-lg);
}

.brand .title {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: .5px;
  background: linear-gradient(135deg, #0284c7 0%, #22d3ee 50%, #67e8f9 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  background-size: 200% auto;
  animation: gradient-shift 3s ease infinite;
}

@keyframes gradient-shift {

  0%,
  100% {
    background-position: 0% center;
  }

  50% {
    background-position: 100% center;
  }
}

.controls {
  display: flex;
  gap: 10px;
  flex-wrap: wrap
}

.select {
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--text);
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  outline: none;
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  transition: all var(--transition-base);
  cursor: pointer;
}

.select:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.9);
}

.select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, .15), var(--shadow-md);
}

.hero {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 28px;
  background: var(--glass-bg);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-xl), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  position: relative;
  contain: layout style paint;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(34, 211, 238, 0.4), transparent);
  opacity: 0.6;
}

.avatar {
  width: 140px;
  height: 140px;
  border-radius: 28px;
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-lg), 0 0 0 4px rgba(255, 255, 255, 0.8);
  background: #fff;
  border: 1px solid var(--border-light);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.hero:hover .avatar {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl), 0 0 0 4px rgba(255, 255, 255, 0.9);
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover
}

.hero h1 {
  margin: 6px 0 8px;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text);
  background: linear-gradient(135deg, var(--text) 0%, var(--text-secondary) 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.hero .tagline {
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
  margin: 0 0 20px;
  letter-spacing: 0.2px;
}

.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap
}

.pill {
  border-radius: 999px;
  border: 1.5px solid var(--border);
  padding: 12px 20px;
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: all var(--transition-base) var(--ease-out-expo);
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  display: inline-flex;
  align-items: center;
  will-change: transform;
  position: relative;
  overflow: hidden;
}

.pill::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.1), rgba(8, 145, 178, 0.05));
  opacity: 0;
  transition: opacity var(--transition-base);
}

.pill:hover {
  border-color: var(--accent);
  transform: translateY(-3px) scale(1.02);
  color: var(--accent);
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.pill:hover::before {
  opacity: 1;
}

.pill:active {
  transform: translateY(-1px) scale(1);
}

.pill:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 999px;
}

.hero .donate-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin-left: 4px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: var(--text);
  transition: .2s ease;
  cursor: pointer;
}

.hero .donate-cta:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}

.donate-inner {
  font-size: 20px;
  line-height: 1;
}

section {
  margin-top: 48px
}

h2 {
  font-size: 22px;
  font-weight: 800;
  margin: 0 0 24px;
  color: var(--text);
  letter-spacing: -0.3px;
  padding-left: 6px;
  position: relative;
  display: inline-block;
}

h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 20px;
  background: linear-gradient(180deg, var(--accent-light), var(--accent));
  border-radius: 2px;
  opacity: 0.8;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  contain: layout;

  content-visibility: auto;
  contain-intrinsic-size: 1000px 800px;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card {
  position: relative;
  isolation: isolate;
  background: var(--glass-bg);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 20px 18px;
  transition: all var(--transition-base) var(--ease-out-expo);
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  animation: fadeUp 0.6s var(--ease-out-expo) backwards;
  contain: layout style paint;
  will-change: transform;
  overflow: hidden;

  content-visibility: auto;
  contain-intrinsic-size: 320px 220px;
}

/* === 移动端按压回弹 (Tap Feedback) === */
.card:active {
  transform: translateY(-2px) scale(0.99);
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.4), rgba(8, 145, 178, 0.3));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity var(--transition-base);
  pointer-events: none;
}

.card::before {
  content: "";
  position: absolute;
  inset: -12px;
  border-radius: inherit;
  background: radial-gradient(60% 60% at 50% 20%, rgba(34, 211, 238, .4), rgba(2, 132, 199, 0) 70%);
  filter: blur(20px);
  opacity: 0;
  transition: opacity var(--transition-base);
  pointer-events: none;
  z-index: -1;
}

.card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: var(--shadow-xl), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  border-color: rgba(34, 211, 238, 0.3);
}

.card:hover:active {
  transform: translateY(-4px) scale(1);
}

.card:hover::after,
.card:hover::before {
  opacity: 1;
}

.card a {
  color: var(--text);
  text-decoration: none;
  display: block
}

.card .row {
  display: flex;
  gap: 14px;
  align-items: center
}

/* === 图标 & 骨架屏流光 (Skeleton Shimmer) === */
.icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(248, 250, 252, 0.9));
  display: grid;
  place-items: center;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  transition: all var(--transition-base) var(--ease-out-expo);
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  contain: layout style paint;
}

/* 闪光动画 */
.icon::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
  transform: translateX(-100%);
  animation: shimmer 1.5s infinite;
  z-index: 0;
  will-change: transform;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(100%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .icon::before {
    animation: none;
  }
}

.card:hover .icon {
  border-color: rgba(34, 211, 238, .5);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, .12), var(--shadow-md);
  transform: scale(1.05);
  background: linear-gradient(135deg, rgba(255, 255, 255, 1), rgba(248, 250, 252, 1));
}

/* 图片覆盖在骨架屏之上 */
.icon img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.4s ease-out;
  position: relative;
  z-index: 1;
}

.title {
  font-weight: 700;
  font-size: 16px;
  margin: 0 0 6px;
  color: var(--text);
  letter-spacing: -0.2px;
}

.desc {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
  line-height: 1.6;
  font-weight: 400;
}

footer {
  margin-top: 64px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  opacity: 0.8;
  font-weight: 500;
  letter-spacing: 0.3px;
}

.headerline {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(34, 211, 238, .4), transparent);
  margin: 24px 0;
  border: none;
}

.searchbar {
  position: relative;
}

.search {
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--text);
  padding: 12px 16px 12px 40px;
  font-size: 14px;
  outline: none;
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  min-width: 260px;
  transition: all var(--transition-base);
  width: 100%;
  font-weight: 500;
}

.search:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, .15), var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.9);
}

.search:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 999px;
}

.searchbar::before {
  content: "🔎";
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  opacity: .5;
  pointer-events: none;
}

.empty-state {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  color: var(--muted);
}

.empty-state.show {
  display: flex;
  animation: fadeUp 0.4s ease;
}

.empty-emoji {
  font-size: 48px;
  margin-bottom: 10px;
  opacity: 0.8;
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(6, 24, 38, .55);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  z-index: 1000;
  contain: strict;
}

.modal.open {
  display: flex;
  animation: fadeUp 0.3s var(--ease-out-expo);
}

.modal-box {
  width: min(1200px, 96vw);
  height: min(780px, 92vh);
  background: var(--glass-bg);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  contain: layout style paint;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-light);
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.modal-iframe {
  flex: 1;
  width: 100%;
  border: 0;
  background: #fff
}

.donate-box {
  width: clamp(320px, 92vw, 800px);
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: var(--radius);
}

.donate-body {
  padding: 20px;
  overflow-y: auto;
}

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

.donate-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: linear-gradient(180deg, #f0faff, #fff);
  padding: 16px;
}

.addr-code {
  background: rgba(0, 0, 0, 0.03);
  border-radius: 8px;
  padding: 8px;
  font-family: monospace;
  font-size: 13px;
  color: #333;
}

.tool-loader {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.85), rgba(255,255,255,0.95));
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 20;
  backdrop-filter: blur(6px) saturate(160%);
}

.tool-loader.show {
  display: flex;
}

.tool-loader-box {
  width: min(420px, 90vw);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  box-shadow: var(--shadow-xl), inset 0 1px 0 rgba(255,255,255,0.9);
  padding: 26px 22px;
  text-align: center;
  backdrop-filter: blur(16px) saturate(180%);
}

.tool-loader-title {
  font-weight: 700;
  font-size: 16px;
  color: var(--text);
}

.tool-loader-hint {
  color: var(--muted);
  font-size: 13px;
  margin: 10px 0 14px;
  line-height: 1.5;
}

.tool-loader-bar {
  height: 8px;
  border-radius: 99px;
  overflow: hidden;
  background: #e9f4fb;
  margin: 18px 0 14px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
}

.tool-loader-fill {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #06b6d4, #0ea5e9, #22d3ee);
  transition: width .35s ease;
  background-size: 200% 100%;
  animation: loader-stripe 2.2s linear infinite;
}

@keyframes loader-stripe {
  0% { background-position: 0% 0; }
  100% { background-position: -200% 0; }
}

.modal-close,
.tool-open-newtab {
  appearance: none;
  border: 1.4px solid var(--border);
  background: #fff;
  color: var(--text);
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255,255,255,0.85);
}

.modal-close:hover,
.tool-open-newtab:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255,255,255,0.9);
  transform: translateY(-1px);
}

.modal-close:active,
.tool-open-newtab:active {
  transform: translateY(0);
}

@media (max-width: 840px) {
  .navbar {
    margin: 0 0 24px;
    border-radius: 20px;
    flex-wrap: wrap;
    justify-content: center;
    padding: 12px 20px;
  }

  .controls {
    width: 100%;
    justify-content: center;
  }

  .search {
    width: 100%;
    min-width: auto;
  }

  .hero {
    grid-template-columns: 100px 1fr;
    gap: 20px;
    padding: 24px;
    border-radius: var(--radius);
  }

  .avatar {
    width: 100px;
    height: 100px;
    border-radius: 20px;
  }

  .hero h1 {
    font-size: 26px;
  }
}

@media (max-width: 520px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 24px 20px;
  }

  .avatar {
    margin: 0 auto;
    width: 100px;
    height: 100px;
  }

  .actions {
    justify-content: center;
    gap: 10px;
  }

  .pill {
    padding: 10px 16px;
    font-size: 13px;
  }

  h2 {
    font-size: 20px;
  }
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(189, 246, 255, 0.3);
}

::-webkit-scrollbar-thumb {
  background: rgba(8, 145, 178, 0.4);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(8, 145, 178, 0.7);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.card a:focus-visible {
  outline: none;
}

.card a:focus-visible .icon {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, .3);
  transform: scale(1.05);
}

.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 48px;
  height: 48px;
  background: var(--glass-bg);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1.5px solid var(--border-light);
  border-radius: 50%;
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  color: var(--accent);
  font-size: 22px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px) scale(0.9);
  transition: all var(--transition-base) var(--ease-out-expo);
  z-index: 90;
  will-change: transform, opacity;
}

.back-to-top.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.back-to-top:hover {
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  color: #fff;
  border-color: transparent;
  transform: translateY(-4px) scale(1.05);
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.back-to-top:active {
  transform: translateY(-2px) scale(1.02);
}

.back-to-top:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* 错误页面样式 */
#crash-screen h2 {
  color: #0e1220;
  margin: 0 0 10px;
}

#crash-screen p {
  color: #5c6b82;
  font-size: 14px;
}

/* Prevent background scroll when modal open */
html.modal-open,
body.modal-open {
  overflow: hidden;
}