/* ============================================================
   清水坊去水印 — 双主题(浅色默认 / 深色可切换) + 玻璃拟态动效
   ============================================================ */

/* ---------- 主题变量:浅色(默认) ---------- */
:root {
  color-scheme: light;
  --bg: #eef2f9;
  --glow-opacity: 0.30;
  --card: rgba(255, 255, 255, 0.72);
  --card-border: rgba(15, 23, 42, 0.08);
  --text: #1c2437;
  --muted: #67718a;
  --accent-1: #6d5cff;
  --accent-2: #0ea5e9;
  --ok: #059669;
  --bad: #dc2626;
  --shadow: 0 18px 44px rgba(31, 41, 72, 0.10);
  --shadow-hover: 0 24px 60px rgba(31, 41, 72, 0.16);
  --input-bg: rgba(255, 255, 255, 0.88);
  --placeholder: #9aa4ba;
  --pill-text: #5a6478;
  --tag-text: #4b5568;
  --tips-strong: #33405c;
  --toast-bg: rgba(255, 255, 255, 0.95);
  --toast-text: #2a3450;
  --fail-text: #b42323;
  --fail-input: #8a93a8;
  --cover-1: #dfe6f3;
  --cover-2: #c9d5ea;
  --focus-ring: rgba(109, 92, 255, 0.16);
  --btn-shadow: 0 8px 24px rgba(109, 92, 255, 0.32);
  --btn-shadow-hover: 0 12px 30px rgba(109, 92, 255, 0.42);
  --ripple-light: rgba(255, 255, 255, 0.5);
  --ripple-ghost: rgba(90, 100, 140, 0.28);
  --glass-blur: blur(14px);
}

/* ---------- 主题变量:深色 ---------- */
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b1020;
  --glow-opacity: 0.5;
  --card: rgba(255, 255, 255, 0.055);
  --card-border: rgba(255, 255, 255, 0.10);
  --text: #e8ecf5;
  --muted: #8b93a7;
  --accent-1: #7c6cff;
  --accent-2: #38bdf8;
  --ok: #34d399;
  --bad: #f87171;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  --shadow-hover: 0 16px 40px rgba(0, 0, 0, 0.4);
  --input-bg: rgba(0, 0, 0, 0.30);
  --placeholder: #5b6274;
  --pill-text: #c3cadd;
  --tag-text: #c3cadd;
  --tips-strong: #cfd6e6;
  --toast-bg: rgba(20, 26, 48, 0.92);
  --toast-text: #e8ecf5;
  --fail-text: #f3b4b4;
  --fail-input: #8b93a7;
  --cover-1: #1a2140;
  --cover-2: #10162e;
  --focus-ring: rgba(124, 108, 255, 0.14);
  --btn-shadow: 0 8px 24px rgba(124, 108, 255, 0.35);
  --btn-shadow-hover: 0 12px 30px rgba(124, 108, 255, 0.45);
  --ripple-light: rgba(255, 255, 255, 0.45);
  --ripple-ghost: rgba(255, 255, 255, 0.18);
}

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

/* hidden 属性必须始终生效：防止组件样式里的 display 规则
   （如 .modal-mask 的 flex）覆盖 UA 默认的 display:none，
   导致透明遮罩盖住全页、页面无法点击 */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color 0.35s ease, color 0.35s ease;
}

/* ---------- 背景光斑 ---------- */
.bg-glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(109, 92, 255, 0.14), transparent),
    var(--bg);
  transition: background-color 0.35s ease;
}
.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: var(--glow-opacity);
  transition: opacity 0.35s ease;
  animation: drift 18s ease-in-out infinite alternate;
}
.glow-1 { width: 480px; height: 480px; background: #7c6cff; top: -160px; left: -120px; }
.glow-2 { width: 420px; height: 420px; background: #2563eb; top: 10%; right: -140px; animation-delay: -6s; }
.glow-3 { width: 380px; height: 380px; background: #0ea5e9; bottom: -160px; left: 35%; animation-delay: -12s; }
@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(60px, 40px, 0) scale(1.15); }
}

/* ---------- 顶栏 ---------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  max-width: 1080px;
  margin: 0 auto;
  padding: 22px 24px 0;
  animation: rise 0.5s ease both;
}
.logo {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.logo-icon {
  filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.8));
  display: inline-block;
  animation: float 3.2s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-4px); }
}
.header-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.header-badges { display: flex; gap: 8px; flex-wrap: wrap; }
.badge-pill {
  font-size: 12px;
  color: var(--pill-text);
  border: 1px solid var(--card-border);
  border-radius: 999px;
  padding: 3px 12px;
  background: var(--card);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background-color 0.35s ease, border-color 0.35s ease;
}

/* 主题切换按钮 */
.theme-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--card-border);
  background: var(--card);
  color: var(--text);
  font-size: 17px;
  display: grid;
  place-items: center;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform 0.25s ease, border-color 0.2s ease, background-color 0.35s ease;
  position: relative;
  overflow: hidden;
}
.theme-btn:hover { transform: rotate(18deg) scale(1.1); border-color: rgba(124, 108, 255, 0.55); }
.theme-btn:active { transform: scale(0.9); }
.theme-btn .icon { display: inline-block; }
.theme-btn .icon.spin { animation: icon-spin 0.5s cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes icon-spin {
  from { transform: rotate(-140deg) scale(0.4); opacity: 0; }
  to   { transform: rotate(0deg) scale(1); opacity: 1; }
}

/* ---------- 布局 ---------- */
.container { max-width: 1080px; margin: 0 auto; padding: 0 24px 60px; }

/* ---------- Hero(入场 stagger 动画) ---------- */
.hero { text-align: center; padding: 64px 0 36px; }
.hero-title {
  font-size: clamp(34px, 6vw, 56px);
  font-weight: 800;
  letter-spacing: 1px;
  animation: rise 0.55s ease 0.05s both;
}
.hero-title em {
  font-style: normal;
  background: linear-gradient(120deg, var(--accent-1), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub { color: var(--muted); margin-top: 12px; font-size: 15px; animation: rise 0.55s ease 0.15s both; transition: color 0.35s ease; }

.platforms {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 22px;
}
.marquee-row {
  position: relative;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.marquee-track {
  display: flex;
  width: max-content;
  align-items: center;
  padding-block: 8px;                  /* 为悬停微浮留出空间，避免被裁切 */
  animation: marquee-scroll 28s linear infinite;
  will-change: transform;
}
.marquee-track:hover {
  animation-play-state: paused;        /* 悬停整行暂停，便于看清楚 */
}
.platform-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  padding: 4px 13px;
  margin-right: 8px;                   /* 徽章间距（用 margin 保证无缝循环衔接） */
  border-radius: 999px;
  border: 1px solid var(--card-border);
  border-color: color-mix(in srgb, var(--brand, #6d5cff) 32%, transparent);
  background: var(--card);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--tag-text);
  cursor: default;
  white-space: nowrap;
  transition: border-color 0.2s, color 0.2s, background-color 0.35s ease,
              box-shadow 0.25s, transform 0.2s;
}
.platform-tag:hover {
  border-color: var(--brand, #6d5cff);
  color: var(--text);
  background: color-mix(in srgb, var(--brand, #6d5cff) 9%, var(--card));
  box-shadow: 0 4px 14px color-mix(in srgb, var(--brand, #6d5cff) 28%, transparent);
  transform: translateY(-1px);
}
@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ---------- 玻璃卡片 ---------- */
.glass {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  transition: background-color 0.35s ease, border-color 0.35s ease;
}

/* ---------- 输入卡片 ---------- */
.input-card {
  padding: 20px 22px;
  box-shadow: var(--shadow);
  animation: rise 0.55s ease 0.28s both;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease,
              background-color 0.35s ease;
}
.input-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(124, 108, 255, 0.35);
}
.input-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 14px;
}
.muted { color: var(--muted); font-weight: 400; transition: color 0.35s ease; }

#urls {
  width: 100%;
  min-height: 140px;
  resize: vertical;
  background: var(--input-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  padding: 14px 16px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.35s ease, color 0.35s ease;
}
#urls::placeholder { color: var(--placeholder); }
#urls:focus {
  border-color: rgba(124, 108, 255, 0.65);
  box-shadow: 0 0 0 4px var(--focus-ring);
}

.input-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  font-size: 13px;
}
.line-count { transition: color 0.2s; }
.line-count.bump { animation: bump 0.3s ease; }
@keyframes bump {
  50% { transform: scale(1.12); }
}

/* ---------- 按钮 ---------- */
button { font-family: inherit; cursor: pointer; border: none; }

.btn-primary {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(120deg, var(--accent-1), var(--accent-2));
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  padding: 10px 26px;
  border-radius: 12px;
  transition: transform 0.15s, box-shadow 0.2s, opacity 0.2s;
  box-shadow: var(--btn-shadow);
}
/* hover 扫光 */
.btn-primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: -85%;
  width: 45%;
  height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.38), transparent);
  transform: skewX(-20deg);
  transition: left 0.55s ease;
  pointer-events: none;
}
.btn-primary:hover:not(:disabled)::after { left: 135%; }
.btn-primary:hover:not(:disabled) { transform: translateY(-2px); box-shadow: var(--btn-shadow-hover); }
.btn-primary:active:not(:disabled) { transform: translateY(0) scale(0.98); }
.btn-primary:disabled { opacity: 0.55; cursor: not-allowed; }

.btn-ghost {
  position: relative;
  overflow: hidden;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 8px 16px;
  transition: color 0.2s, border-color 0.2s, transform 0.15s, background-color 0.35s ease;
}
.btn-ghost:hover { color: var(--text); border-color: rgba(124, 108, 255, 0.5); transform: translateY(-1px); }
.btn-ghost:active { transform: scale(0.97); }
.btn-ghost.copied { color: var(--ok); border-color: var(--ok); }

/* ripple 波纹(JS 注入) */
.ripple {
  position: absolute;
  border-radius: 50%;
  background: var(--ripple-light);
  transform: scale(0);
  animation: ripple 0.6s ease-out forwards;
  pointer-events: none;
}
.btn-ghost .ripple, .theme-btn .ripple { background: var(--ripple-ghost); }
@keyframes ripple {
  to { transform: scale(2.8); opacity: 0; }
}

.btn-sm { font-size: 13px; padding: 7px 16px; }

.spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 结果区(滚动淡入) ---------- */
.result-area { margin-top: 28px; }
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible { opacity: 1; transform: none; }

.result-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 18px;
  margin-bottom: 18px;
}
.result-stats { display: flex; gap: 16px; font-size: 14px; }
.stat b { font-size: 16px; margin-left: 2px; display: inline-block; }
.stat.ok { color: var(--ok); transition: color 0.35s ease; }
.stat.bad { color: var(--bad); transition: color 0.35s ease; }
.stat b.tick { animation: bump 0.35s ease; }
.result-actions { display: flex; gap: 10px; }

/* ---------- 卡片网格 ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
}

.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  overflow: hidden;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  animation: rise 0.4s ease both; /* delay 由 JS 按 index 设置(stagger) */
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s, background-color 0.35s ease;
  display: flex;
  flex-direction: column;
}
.card:hover {
  transform: translateY(-4px);
  border-color: rgba(124, 108, 255, 0.45);
  box-shadow: var(--shadow-hover);
}
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.card-cover {
  position: relative;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, var(--cover-1), var(--cover-2));
  overflow: hidden;
  transition: background 0.35s ease;
}
.card-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #0d1120;
  display: block;
}
.video-dead-tip {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 14px;
  font-size: 12.5px;
  line-height: 1.6;
  color: #ffd9d9;
  background: rgba(10, 12, 24, 0.74);
  z-index: 2;
  pointer-events: none;
}
.card-cover.video-dead .video-dead-tip { display: flex; }
.card-cover.video-dead .card-video { visibility: hidden; }
.card-iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #0d1120;
  display: block;
}
.card-cover .cover-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  opacity: 0.35;
}
.card-platform {
  position: absolute;
  top: 10px; left: 10px;
  font-size: 12px;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(6px);
  color: #fff;
}
.card-index {
  position: absolute;
  top: 10px; right: 10px;
  font-size: 12px;
  min-width: 24px;
  text-align: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
}

.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 42px;
}
.card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--muted);
}
.card-meta .avatar {
  width: 22px; height: 22px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--cover-2);
}
.card-meta .author { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-actions { display: flex; gap: 8px; margin-top: auto; }
.card-actions .btn-primary { flex: 1; justify-content: center; font-size: 13.5px; padding: 9px 10px; }

/* 失败卡片 */
.card.failed { border-color: rgba(220, 38, 38, 0.35); }
.card-fail-body { padding: 22px 18px; font-size: 13.5px; color: var(--fail-text); }
.card-fail-body .input-line {
  display: block;
  margin-top: 6px;
  color: var(--fail-input);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- 使用说明(滚动淡入) ---------- */
.tips { margin-top: 40px; padding: 20px 24px; }
.tips h3 { font-size: 15px; margin-bottom: 10px; }
.tips ul { padding-left: 20px; color: var(--muted); font-size: 13.5px; display: grid; gap: 6px; transition: color 0.35s ease; }
.tips b { color: var(--tips-strong); transition: color 0.35s ease; }

/* ---------- 页脚 ---------- */
.site-footer {
  text-align: center;
  color: var(--muted);
  font-size: 12.5px;
  padding: 24px 16px 34px;
  opacity: 0.75;
  transition: color 0.35s ease;
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 99;
  max-width: 320px;
  background: var(--toast-bg);
  color: var(--toast-text);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 12px 18px;
  font-size: 13.5px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: toast-in 0.28s cubic-bezier(0.34, 1.4, 0.64, 1) both;
  transition: background-color 0.35s ease, color 0.35s ease, border-color 0.35s ease;
}
.toast.err { border-color: rgba(220, 38, 38, 0.5); }
.toast.hide { animation: toast-out 0.25s ease both; }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(14px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes toast-out {
  to { opacity: 0; transform: translateY(10px) scale(0.97); }
}

/* ---------- 卡密弹窗 ---------- */
.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(10, 14, 30, 0.42);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.18s ease;
}
.modal-mask.show { opacity: 1; }

.modal {
  position: relative;
  width: 100%;
  max-width: 520px;
  padding: 26px 26px 22px;
  border-radius: 18px;
  box-shadow: var(--shadow-hover);
  transform: translateY(14px) scale(0.97);
  transition: transform 0.2s cubic-bezier(0.34, 1.4, 0.64, 1),
              background-color 0.35s ease, border-color 0.35s ease;
}
.modal-mask.show .modal { transform: translateY(0) scale(1); }

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  line-height: 1;
  transition: color 0.2s, background-color 0.2s, transform 0.2s;
}
.modal-close:hover { color: var(--text); background: var(--focus-ring); transform: rotate(90deg); }

.modal-title {
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}
.modal-title-icon { display: inline-block; animation: float 3.2s ease-in-out infinite; }
.modal-desc { font-size: 13px; margin-top: 8px; }
.modal-desc b { color: var(--text); }

#keys-input {
  width: 100%;
  min-height: 96px;
  margin-top: 14px;
  resize: vertical;
  background: var(--input-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  padding: 12px 14px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.35s ease, color 0.35s ease;
}
#keys-input::placeholder { color: var(--placeholder); }
#keys-input:focus {
  border-color: rgba(124, 108, 255, 0.65);
  box-shadow: 0 0 0 4px var(--focus-ring);
}

.modal-error {
  margin-top: 10px;
  font-size: 13px;
  color: var(--bad);
  background: rgba(220, 38, 38, 0.08);
  border: 1px solid rgba(220, 38, 38, 0.25);
  border-radius: 10px;
  padding: 8px 12px;
  animation: bump 0.3s ease;
}

.modal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
  font-size: 12.5px;
}
.modal-actions { display: flex; gap: 10px; margin-left: auto; }
.modal-actions .btn-primary { font-size: 14px; padding: 9px 22px; }
.modal-actions .btn-ghost { font-size: 13.5px; padding: 8px 16px; }

/* ---------- 官方客服联系卡片 ---------- */
.contact {
  margin-top: 40px;
  padding: 28px 24px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
/* 顶部流光渐变线 */
.contact::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  width: 46%; height: 2px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, var(--accent-1), var(--accent-2), transparent);
  border-radius: 999px;
}
.contact-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}
.contact-head h3 {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 6px;
  background: linear-gradient(120deg, var(--accent-1), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.contact-line {
  height: 1px;
  width: 72px;
  background: linear-gradient(90deg, transparent, rgba(124, 108, 255, 0.55));
}
.contact-line.line-r { background: linear-gradient(90deg, rgba(14, 165, 233, 0.55), transparent); }
.contact-sub { font-size: 12.5px; margin-top: 8px; }

.contact-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 20px;
}
.contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-radius: 14px;
  cursor: pointer;
  background: var(--input-bg);
  border: 1px solid var(--card-border);
  color: var(--text);
  box-shadow: var(--shadow);
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.25s,
              background-color 0.35s ease, color 0.35s ease;
}
.contact-item:hover {
  transform: translateY(-3px);
  border-color: rgba(124, 108, 255, 0.55);
  box-shadow: var(--shadow-hover);
}
.contact-item:active { transform: translateY(-1px) scale(0.98); }
.contact-icon {
  font-size: 21px;
  display: grid;
  place-items: center;
}
.contact-img {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  display: block;
  /* 3D 立体凸起：顶部弧形高光 + 底部内阴影 + 落下投影 */
  box-shadow:
    inset 0 1px 2px rgba(255, 255, 255, 0.55),
    inset 0 -2px 3px rgba(0, 0, 0, 0.28),
    0 3px 5px rgba(0, 0, 0, 0.22),
    0 1px 1px rgba(0, 0, 0, 0.12);
  transition: transform 0.2s, box-shadow 0.25s;
}
.contact-item:hover .contact-img {
  transform: translateY(-1px) scale(1.07);
  box-shadow:
    inset 0 1px 2px rgba(255, 255, 255, 0.6),
    inset 0 -2px 3px rgba(0, 0, 0, 0.28),
    0 6px 10px rgba(0, 0, 0, 0.24),
    0 2px 3px rgba(0, 0, 0, 0.15);
}
.contact-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.35;
  text-align: left;
}
.contact-body b {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 1.5px;
  color: var(--muted);
  transition: color 0.35s ease;
}
.contact-body code {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.contact-copy {
  font-size: 11px;
  color: var(--muted);
  border: 1px solid var(--card-border);
  border-radius: 999px;
  padding: 3px 10px;
  white-space: nowrap;
  transition: color 0.2s, background-color 0.25s, border-color 0.25s;
}
.contact-item:hover .contact-copy {
  color: #fff;
  background: linear-gradient(120deg, var(--accent-1), var(--accent-2));
  border-color: transparent;
}
.contact-item.copied .contact-copy {
  color: var(--ok);
  border-color: var(--ok);
  background: transparent;
}

/* ---------- 响应式 ---------- */
@media (max-width: 640px) {
  .hero { padding: 40px 0 26px; }
  .cards { grid-template-columns: 1fr; }
  .input-card { padding: 16px; }
  .toast { left: 22px; right: 22px; max-width: none; }
  .modal { padding: 22px 18px 18px; }
  .contact-list { flex-direction: column; align-items: center; }
  .contact-item { width: 100%; max-width: 320px; }
  .modal-foot { flex-direction: column; align-items: stretch; }
  .modal-actions { margin-left: 0; }
  .modal-actions .btn-primary { flex: 1; justify-content: center; }
}

/* ---------- 减少动态偏好 ---------- */
@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; }
}
