/* ===== 设计令牌 ===== */
:root {
  --bg-0: #060818;
  --bg-1: #0a0e27;
  --bg-2: #1a1442;
  --cyan: #00d4ff;
  --cyan-soft: rgba(0, 212, 255, 0.6);
  --gold: #ffb347;
  --ink: #e8edff;
  --ink-dim: #9aa3c7;
  --line: rgba(0, 212, 255, 0.18);
  --glass: rgba(255, 255, 255, 0.04);
  --glass-border: rgba(255, 255, 255, 0.12);
  --radius: 20px;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "HarmonyOS Sans SC", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg-0);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ===== 背景层 ===== */
#starfield {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.atmosphere {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse at top, var(--bg-2) 0%, var(--bg-1) 45%, var(--bg-0) 100%);
  overflow: hidden;
}

.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.55;
  mix-blend-mode: screen;
}
.glow-1 {
  width: 45vmax; height: 45vmax;
  top: -10vmax; left: -10vmax;
  background: radial-gradient(circle, var(--cyan) 0%, transparent 70%);
  animation: drift1 18s ease-in-out infinite alternate;
}
.glow-2 {
  width: 40vmax; height: 40vmax;
  bottom: -8vmax; right: -8vmax;
  background: radial-gradient(circle, #7c3aed 0%, transparent 70%);
  opacity: 0.4;
  animation: drift2 22s ease-in-out infinite alternate;
}
.glow-3 {
  width: 30vmax; height: 30vmax;
  top: 40%; left: 55%;
  background: radial-gradient(circle, var(--gold) 0%, transparent 70%);
  opacity: 0.18;
  animation: drift1 26s ease-in-out infinite alternate-reverse;
}

@keyframes drift1 {
  from { transform: translate(0, 0); }
  to   { transform: translate(6vmax, 4vmax); }
}
@keyframes drift2 {
  from { transform: translate(0, 0); }
  to   { transform: translate(-5vmax, -3vmax); }
}

/* 网格纹理叠加 */
.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
  opacity: 0.35;
}

/* ===== 页面容器 ===== */
.page {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(2.5rem, 7vw, 6rem) clamp(1.25rem, 4vw, 3rem) 2rem;
}

/* ===== 品牌头部 ===== */
.hero {
  text-align: center;
  margin-bottom: clamp(2.5rem, 6vw, 4.5rem);
  position: relative;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: "Orbitron", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.32em;
  color: var(--cyan);
  padding: 0.4rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(0, 212, 255, 0.06);
  margin-bottom: 1.5rem;
  text-transform: uppercase;
}
.hero-tag .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
  animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.7); }
}

.hero-title {
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 1rem;
  perspective: 800px;
}
.title-main {
  font-size: clamp(2.4rem, 8vw, 5.2rem);
  letter-spacing: 0.04em;
  background: linear-gradient(180deg, #ffffff 0%, #b9d4ff 60%, #6f8cff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 18px rgba(0, 212, 255, 0.55));
  animation: neonBreath 4s ease-in-out infinite;
}
@keyframes neonBreath {
  0%, 100% { filter: drop-shadow(0 0 10px rgba(0, 212, 255, 0.35)) drop-shadow(0 4px 24px rgba(0, 212, 255, 0.2)); }
  50%      { filter: drop-shadow(0 0 22px rgba(0, 212, 255, 0.75)) drop-shadow(0 4px 36px rgba(0, 212, 255, 0.45)); }
}
.title-main .accent {
  position: relative;
  display: inline-block;
  font-family: "Rajdhani", "Segoe UI", sans-serif;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin: 0 0.18em;
  /* 扁平纯色字 + 单层辉光；必须显式覆盖父级继承的transparent与background-clip:text，否则微信浏览器不显示 */
  color: var(--cyan);
  -webkit-text-fill-color: var(--cyan);
  -webkit-background-clip: border-box;
  background-clip: border-box;
  background: transparent;
  filter: drop-shadow(0 0 14px rgba(0, 212, 255, 0.85));
}
/* 信号涟漪环1 */
.title-main .accent::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 110%;
  aspect-ratio: 1 / 1;
  border: 2px solid var(--cyan);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0.6);
  opacity: 0;
  pointer-events: none;
  box-sizing: border-box;
  animation: ripple 3s ease-out infinite;
}
/* 信号涟漪环2（错开延迟） */
.title-main .accent::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 110%;
  aspect-ratio: 1 / 1;
  border: 2px solid var(--cyan);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0.6);
  opacity: 0;
  pointer-events: none;
  box-sizing: border-box;
  animation: ripple 3s ease-out infinite 1.5s;
}
@keyframes ripple {
  0%   { transform: translate(-50%, -50%) scale(0.6); opacity: 0.85; border-width: 2px; }
  70%  { opacity: 0.25; }
  100% { transform: translate(-50%, -50%) scale(2.6); opacity: 0; border-width: 1px; }
}

.hero-subtitle {
  color: var(--ink-dim);
  font-size: clamp(0.9rem, 2.5vw, 1.1rem);
  letter-spacing: 0.18em;
}

/* 扫描线 */
.scan-line {
  width: min(420px, 80%);
  height: 2px;
  margin: 0.7rem auto 0;
  background: linear-gradient(90deg, transparent, var(--cyan-soft), transparent);
  position: relative;
  overflow: hidden;
}
.scan-line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, #fff, transparent);
  width: 40%;
  animation: scan 3.5s linear infinite;
}
@keyframes scan {
  from { transform: translateX(-120%); }
  to   { transform: translateX(360%); }
}

/* ===== 作品卡片网格 ===== */
.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);   /* 默认移动端两列 */
  gap: clamp(0.8rem, 2.5vw, 1.5rem);
  margin-bottom: clamp(2.5rem, 7vw, 4.5rem);
}
@media (min-width: 641px) and (max-width: 960px) {
  .gallery { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 961px) {
  .gallery { grid-template-columns: repeat(5, 1fr); } /* PC端五列 */
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  border-radius: var(--radius);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1),
              box-shadow 0.45s ease,
              border-color 0.45s ease;
  opacity: 0;
  transform: translateY(28px);
  animation: rise 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}
.card:nth-child(1) { animation-delay: 0.08s; }
.card:nth-child(2) { animation-delay: 0.18s; }
.card:nth-child(3) { animation-delay: 0.28s; }
.card:nth-child(4) { animation-delay: 0.38s; }
.card:nth-child(5) { animation-delay: 0.48s; }
.card:nth-child(6) { animation-delay: 0.58s; }
.card:nth-child(7) { animation-delay: 0.68s; }
.card:nth-child(8) { animation-delay: 0.78s; }

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

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  padding: 1px;
  background: linear-gradient(135deg, var(--cyan-soft), transparent 40%, transparent 60%, var(--gold));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.45s ease;
  pointer-events: none;
}

.card:hover,
.card:focus-visible {
  transform: translateY(-10px);
  border-color: transparent;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.55),
              0 0 40px rgba(0, 212, 255, 0.25);
}
.card:hover::before,
.card:focus-visible::before { opacity: 1; }

.card-cover {
  position: relative;
  aspect-ratio: 1 / 1;   /* 正方形封面，适配正方形原图 */
  overflow: hidden;
}
.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.card:hover .card-cover img { transform: scale(1.08); }

.cover-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(6, 8, 24, 0.9) 100%);
  pointer-events: none;
}

.card-body {
  position: relative;
  padding: 0.9rem 0.95rem 1.1rem;
}
.card-no {
  font-family: "Orbitron", sans-serif;
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  color: var(--cyan);
  opacity: 0.8;
}
.card-name {
  font-size: clamp(0.85rem, 2.4vw, 1.05rem);
  font-weight: 700;
  margin: 0.3rem 0 0.55rem;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  line-height: 1.25;
}
.tag-badge {
  font-size: 0.55rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 0.12rem 0.4rem;
  border-radius: 5px;
  background: linear-gradient(135deg, var(--cyan), #6f8cff);
  color: #04122b;
}
.card-cta {
  font-size: 0.72rem;
  color: var(--ink-dim);
  letter-spacing: 0.04em;
  transition: color 0.3s ease, transform 0.3s ease;
  display: inline-block;
}
.card:hover .card-cta {
  color: var(--cyan);
  transform: translateX(4px);
}

/* ===== 底部信息栏 ===== */
.footer {
  position: relative;
  border-top: 1px solid var(--line);
  padding-top: 1.8rem;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  align-items: center;
  text-align: center;
}
.footer-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem 2rem;
}
.footer-item {
  color: var(--ink-dim);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  opacity: 0.55;
  transition: opacity 0.3s ease;
}
.footer-item:hover { opacity: 1; }
.footer-item a { color: inherit; text-decoration: none; transition: color 0.3s; }
.footer-item a:hover { color: var(--cyan); }
.ico { color: var(--cyan); }
.beian { transition: color 0.3s; }
.beian:hover { color: var(--cyan); }

/* ===== 响应式 ===== */
@media (max-width: 640px) {
  .footer-row { flex-direction: column; gap: 0.5rem; }
  .footer-item { font-size: 0.8rem; }
}

@media (max-width: 380px) {
  .hero-tag { font-size: 0.62rem; letter-spacing: 0.22em; }
  .gallery { gap: 0.7rem; }
}

/* 减少动效偏好 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* ===== 背景音乐控制按钮 ===== */
.music-btn {
  position: fixed;
  bottom: max(1rem, env(safe-area-inset-bottom));
  right: max(1rem, env(safe-area-inset-right));
  z-index: 100;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  background: rgba(10, 14, 39, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--cyan);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}
.music-btn:hover {
  transform: scale(1.08);
  border-color: var(--cyan);
  box-shadow: 0 4px 24px rgba(0, 212, 255, 0.4);
}
.music-btn .music-ico {
  position: absolute;
  line-height: 1;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.music-btn .music-off { opacity: 0; transform: scale(0.5); }
.music-btn.is-off .music-on { opacity: 0; transform: scale(0.5); }
.music-btn.is-off .music-off { opacity: 1; transform: scale(1); color: var(--ink-dim); }
.music-btn.is-off { color: var(--ink-dim); }
/* 待播放提示（自动播放被拦截时，脉冲提示用户点击） */
.music-btn.is-ready { color: var(--cyan); }
.music-btn.is-ready::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid var(--cyan);
  opacity: 0;
  animation: musicRipple 1.8s ease-out infinite;
}
/* 播放中波纹动效 */
.music-btn.is-playing::before {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid var(--cyan);
  opacity: 0;
  animation: musicRipple 1.8s ease-out infinite;
}
@keyframes musicRipple {
  0%   { transform: scale(1); opacity: 0.7; }
  100% { transform: scale(1.6); opacity: 0; }
}
