/* ============================================
   Nash Hong Dreamland · 粉紫星空主题
   所有页面共享此样式，改配色只需改下方 :root
   ============================================ */

:root {
  /* 背景 */
  --bg-1: #1B1B2F;             /* 深邃星空蓝紫 */
  --bg-2: #252140;             /* 神秘暗紫 */

  /* 导航 */
  --nav-bg: rgba(27, 27, 47, 0.5);
  --line: rgba(255, 182, 193, 0.2);

  /* 文字层级 */
  --text-bright: #FFEFF5;      /* 主标题 / 冰粉白 */
  --text-sub: #9C8CBB;         /* 副标题 / 灰紫 */
  --text-body: #CDC2E0;        /* 正文 / 浅雾紫灰 */
  --text-faint: #5C5480;       /* 版权 / 极暗深紫 */

  /* 卡片 */
  --card-bg: rgba(255, 182, 193, 0.08);
  --card-border: rgba(255, 192, 203, 0.3);
  --card-shadow: 0 10px 30px rgba(255, 192, 203, 0.15);

  /* 图标 / 链接 */
  --icon-pink: #F4A7B9;        /* 樱花粉 */
  --icon-purple: #A88BEB;      /* 糖果紫 */
  --icon-cyan: #7DE3F4;        /* 亮青 */
  --icon-white: #FFFFFF;

  --font-serif: "Noto Serif SC", "Songti SC", "STSong", Georgia, serif;
  --font-sans: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  --radius: 16px;
  --max-w: 1080px;
}

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

html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  color: var(--text-body);
  background: linear-gradient(160deg, var(--bg-1) 0%, var(--bg-2) 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

/* ---------- 背景层 ---------- */
#stars {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.noise {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.glow {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 60% 50% at 15% 0%, rgba(255, 182, 193, 0.08), transparent 60%),
    radial-gradient(ellipse 50% 40% at 85% 100%, rgba(138, 43, 226, 0.10), transparent 60%),
    radial-gradient(ellipse 40% 30% at 90% 10%, rgba(125, 227, 244, 0.05), transparent 60%);
}

/* ---------- 布局容器 ---------- */
.container {
  position: relative;
  z-index: 2;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- 导航栏 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--nav-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 66px;
  gap: 20px;
}

.brand {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--text-bright);
  white-space: nowrap;
  transition: color 0.2s;
}
.brand:hover { color: var(--icon-cyan); }

.nav-links {
  display: flex;
  gap: 24px;
  list-style: none;
}

.nav-links a {
  color: var(--text-body);
  font-size: 15px;
  white-space: nowrap;
  transition: color 0.2s, text-shadow 0.2s;
}
.nav-links a:hover {
  color: var(--icon-cyan);
  text-shadow: 0 0 8px var(--icon-cyan);
}
.nav-links a.active {
  color: var(--icon-cyan);
  text-shadow: 0 0 8px var(--icon-cyan);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-bright);
  border-radius: 2px;
  transition: 0.25s;
}

/* ---------- Hero ---------- */
.hero {
  padding: 110px 0 80px;
  text-align: center;
}

.hero-kicker {
  color: var(--icon-cyan);
  font-size: 13px;
  letter-spacing: 5px;
  text-transform: uppercase;
  margin-bottom: 22px;
  text-shadow: 0 0 12px rgba(125, 227, 244, 0.5);
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(24px, 6vw, 62px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 1px;
  color: var(--text-bright);
  white-space: nowrap;
  text-shadow: 0 0 30px rgba(255, 182, 193, 0.25);
}

.hero p {
  max-width: 560px;
  margin: 24px auto 0;
  color: var(--text-body);
  font-size: 17px;
}

/* ---------- 板块标题 ---------- */
.section-title {
  font-family: var(--font-serif);
  font-size: 22px;
  color: var(--text-bright);
  margin-bottom: 28px;
  letter-spacing: 1px;
}

/* ---------- 卡片网格 ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
  padding-bottom: 96px;
}

.card {
  display: block;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  padding: 30px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}

.card:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 192, 203, 0.55);
  box-shadow: 0 16px 40px rgba(255, 192, 203, 0.25);
}

.card-icon {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 21px;
  color: var(--icon-white);
  margin-bottom: 18px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}
.card-icon.pink     { background: var(--icon-pink); }
.card-icon.purple   { background: var(--icon-purple); }
.card-icon.cyan     { background: var(--icon-cyan); color: #1B1B2F; }
.card-icon.mixed    { background: linear-gradient(135deg, var(--icon-pink), var(--icon-purple)); }
.card-icon.cypurple { background: linear-gradient(135deg, var(--icon-cyan), var(--icon-purple)); color: #1B1B2F; }

.card .en {
  color: var(--text-sub);
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.card h3 {
  font-family: var(--font-serif);
  font-size: 20px;
  color: var(--text-bright);
  margin-bottom: 8px;
}

.card p {
  color: var(--text-body);
  font-size: 15px;
}

.card .count {
  display: inline-block;
  margin-top: 16px;
  font-size: 13px;
  color: var(--icon-cyan);
  transition: text-shadow 0.2s;
}
.card:hover .count { text-shadow: 0 0 8px var(--icon-cyan); }

/* ---------- 列表页通用（子页） ---------- */
.page-head {
  padding: 64px 0 40px;
}

.page-head h1 {
  font-family: var(--font-serif);
  font-size: clamp(28px, 5vw, 40px);
  letter-spacing: 2px;
  color: var(--text-bright);
  white-space: nowrap;
}

.page-head p {
  color: var(--text-body);
  margin-top: 12px;
  max-width: 560px;
}

.entry-list {
  list-style: none;
  padding-bottom: 80px;
}

.entry {
  padding: 26px 4px;
  border-bottom: 1px solid var(--line);
}
.entry:first-child { border-top: 1px solid var(--line); }
.entry a { display: block; }

.entry time {
  color: var(--text-faint);
  font-size: 13px;
  letter-spacing: 0.5px;
}

.entry h2 {
  font-family: var(--font-serif);
  font-size: 20px;
  margin: 6px 0;
  color: var(--text-bright);
  transition: color 0.2s;
}
.entry:hover h2 { color: var(--icon-cyan); }

.entry p {
  color: var(--text-body);
  font-size: 15px;
}

.entry-link {
  display: flex;
  gap: 20px;
  align-items: center;
}

.entry-thumb {
  width: 200px;
  height: 130px;
  object-fit: cover;
  border-radius: 12px;
  flex-shrink: 0;
  border: 1px solid var(--line);
  background: var(--card-bg);
  transition: transform 0.3s, border-color 0.3s;
}
.entry:hover .entry-thumb {
  border-color: rgba(255, 192, 203, 0.55);
  transform: scale(1.02);
}

.entry-body {
  flex: 1;
  min-width: 0;
}

/* ---------- 作品页外链（github / steam 等） ---------- */
.entry-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

/* 默认 a{color:inherit;text-decoration:none} 会吃掉链接样式，这里显式覆盖 */
.entry-links .ext-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 5px 14px;
  border: 1px solid rgba(125, 227, 244, 0.35);
  border-radius: 999px;
  background: rgba(125, 227, 244, 0.1);
  color: #9FECF8;
  font-size: 13px;
  line-height: 1.6;
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: color 0.2s, background 0.2s, border-color 0.2s,
              box-shadow 0.2s, transform 0.2s;
}

.entry-links .ext-link::after {
  content: '↗';
  font-size: 11px;
  opacity: 0.75;
  flex-shrink: 0;
}

.entry-links .ext-link:hover,
.entry-links .ext-link:focus-visible {
  color: var(--text-bright);
  background: rgba(125, 227, 244, 0.22);
  border-color: rgba(125, 227, 244, 0.75);
  box-shadow: 0 0 14px rgba(125, 227, 244, 0.35);
  transform: translateY(-1px);
}

.entry-links .ext-link:focus-visible {
  outline: 2px solid var(--icon-cyan);
  outline-offset: 2px;
}

.empty {
  color: var(--text-faint);
  font-size: 15px;
  padding: 16px 4px;
}

/* ---------- 关于页 ---------- */
.about-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  padding: 40px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  margin-bottom: 96px;
}

.about-head {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 28px;
}

.avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  object-fit: cover;
  font-family: var(--font-serif);
  font-size: 34px;
  font-weight: 700;
  color: var(--icon-white);
  background: linear-gradient(135deg, var(--icon-pink), var(--icon-purple));
  box-shadow: 0 8px 24px rgba(255, 192, 203, 0.35);
}

.about-name {
  font-family: var(--font-serif);
  font-size: 26px;
  color: var(--text-bright);
}

.about-role {
  color: var(--text-sub);
  font-size: 14px;
  letter-spacing: 1px;
}

.about-card p {
  color: var(--text-body);
  margin-bottom: 20px;
}

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

.tag {
  font-size: 13px;
  color: var(--icon-cyan);
  border: 1px solid rgba(125, 227, 244, 0.3);
  border-radius: 999px;
  padding: 4px 14px;
  transition: 0.2s;
}
.tag:hover {
  text-shadow: 0 0 8px var(--icon-cyan);
  border-color: rgba(125, 227, 244, 0.6);
}

/* ---------- 关于页社交图标 ---------- */
.about-links {
  display: flex;
  gap: 18px;
  margin-top: 26px;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: transparent;
  border: 1px solid rgba(255, 192, 203, 0.28);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.social-link img {
  max-width: 70%;
  max-height: 70%;
  object-fit: contain;
}

/* bili 是横向小电视，默认 70% 在方框里留白太多，单独放大 */
.social-link .bili-icon {
  max-width: 96%;
  max-height: 96%;
}

.social-link:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 192, 203, 0.7);
  box-shadow: 0 8px 20px rgba(255, 192, 203, 0.35);
}

/* ---------- 关于页友链（正方形图 + 下方文字） ---------- */
.friend-section {
  padding-bottom: 96px;
}

.friend-section .page-head {
  padding: 0 0 32px;
}

.friend-grid {
  display: flex;
  flex-wrap: wrap;
  /* 方块按内容宽度排列，不留网格拉伸出来的空白；窄屏自动换行 */
  gap: 20px 14px;
  list-style: none;
}

.friend-item {
  min-width: 0;
  flex: 0 0 240px;
}

/* 卡片本身做成方块比例：方图占 1/2，文字在下方居中 */
.friend-card {
  display: grid;
  grid-template-rows: 1fr auto auto;
  justify-items: center;
  align-content: stretch;
  gap: 6px 0;
  aspect-ratio: 1 / 1;
  padding: 14px 12px;
  text-align: center;
  border-radius: var(--radius);
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s,
              background 0.25s;
}

.friend-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 0;
}

/* 正方形logo，按可用高度自适应，任意比例的图都不会变形 */
.friend-logo img {
  width: auto;
  height: 100%;
  max-width: 90%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(27, 27, 47, 0.4);
}

.friend-name {
  font-size: 15px;
  line-height: 1.4;
  color: var(--text-bright);
  overflow-wrap: anywhere;
  transition: color 0.2s;
}

.friend-desc {
  font-size: 12px;
  line-height: 1.4;
  color: var(--text-sub);
  overflow-wrap: anywhere;
}

.friend-card:hover {
  transform: translateY(-4px);
  background: rgba(255, 182, 193, 0.13);
  border-color: rgba(255, 192, 203, 0.7);
  box-shadow: 0 14px 34px rgba(255, 192, 203, 0.28);
}

.friend-card:hover .friend-name {
  color: var(--icon-cyan);
}

/* 窄屏降级：方块按可用宽度与 240px 取小值，横向不溢出 */
@media (max-width: 1024px) {
  .friend-item { flex: 0 1 240px; }
}

@media (max-width: 880px) {
  .friend-item { flex: 0 1 200px; }
}

@media (max-width: 640px) {
  .friend-section .page-head {
    padding-bottom: 24px;
  }

  .friend-grid {
    gap: 14px;
  }

  .friend-item { flex: 1 1 138px; }

  .friend-card {
    padding: 14px 10px;
    gap: 4px 0;
  }

  .friend-name {
    font-size: 14px;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
  }

  .friend-desc {
    line-height: 1.3;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
  }
}

/* ---------- 通用图片查看器（灯箱） ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.66);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  cursor: zoom-out;
}
.lightbox.open {
  display: flex;
}
.lightbox img {
  max-width: min(92vw, 1080px);
  max-height: 84vh;
  border-radius: 14px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
}

/* ---------- 日常页图片网格 ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  padding-bottom: 96px;
}
.gallery-item {
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  cursor: zoom-in;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}
.gallery-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}
.gallery-caption {
  padding: 10px 14px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-body);
  text-align: center;
  background: rgba(27, 27, 47, 0.55);
  border-top: 1px solid var(--line);
}
.gallery-item:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 192, 203, 0.55);
  box-shadow: 0 14px 36px rgba(255, 192, 203, 0.22);
}

/* 所有可点开放大的元素：悬停提示放大 */
[data-lightbox] {
  cursor: zoom-in;
}

/* ---------- 音乐页 ---------- */
.track-list {
  list-style: none;
  padding-bottom: 96px;
}

.track {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 20px 4px;
  border-bottom: 1px solid var(--line);
}
.track:first-child { border-top: 1px solid var(--line); }

.track-index {
  width: 32px;
  color: var(--text-faint);
  font-size: 14px;
  text-align: center;
}

.track-play {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--icon-white);
  background: linear-gradient(135deg, var(--icon-cyan), var(--icon-purple));
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: transform 0.2s, box-shadow 0.2s;
}
.track-play:hover {
  transform: scale(1.12);
  box-shadow: 0 6px 16px rgba(125, 227, 244, 0.45);
}

.track-info h3 {
  font-family: var(--font-serif);
  font-size: 17px;
  color: var(--text-bright);
}

.track-info span {
  color: var(--text-sub);
  font-size: 14px;
}

/* ---------- 页脚 ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 32px 0 44px;
  text-align: center;
  color: var(--text-faint);
  font-size: 14px;
}

/* ---------- 响应式 ---------- */
@media (max-width: 720px) {
  .grid { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr; }

  .nav-links {
    position: absolute;
    top: 66px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(27, 27, 47, 0.95);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    display: none;
    padding: 12px 24px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 0; }
  .nav-toggle { display: flex; }

  .hero { padding: 72px 0 56px; }
  .hero h1 { font-size: 22px; }

  .about-head { flex-direction: column; text-align: center; }

  .entry-link { flex-direction: column; align-items: stretch; gap: 14px; }
  .entry-thumb { width: 100%; height: auto; }
}

/* ---------- APlayer 播放器（左下角 + 主题半透明暗色）----------
   只改颜色与背景，不碰定位/显示/transform 等布局属性 */
.aplayer {
  color: var(--text-body) !important;
  background: rgba(27, 27, 47, 0.88) !important;
  box-shadow: 0 8px 30px rgba(255, 182, 193, 0.18) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* fixed 模式里真正带白底的是内层 body，这里一起覆盖 */
.aplayer .aplayer-body {
  background: rgba(27, 27, 47, 0.88) !important;
}

.aplayer .aplayer-info {
  background: transparent !important;
  border-top-color: rgba(255, 182, 193, 0.2) !important;
  border-bottom-color: rgba(255, 182, 193, 0.2) !important;
}

/* 歌名 / 歌手 */
.aplayer .aplayer-info .aplayer-music .aplayer-title {
  color: var(--text-bright) !important;
}
.aplayer .aplayer-info .aplayer-music .aplayer-author {
  color: var(--text-sub) !important;
}

/* 时间 */
.aplayer .aplayer-time {
  color: var(--text-sub) !important;
}

/* 进度条底色与已缓冲 */
.aplayer .aplayer-bar {
  background: rgba(255, 255, 255, 0.15) !important;
}
.aplayer .aplayer-loaded {
  background: rgba(255, 255, 255, 0.25) !important;
}

/* 音量条 */
.aplayer .aplayer-volume-bar {
  background: rgba(255, 255, 255, 0.15) !important;
}

/* 图标（时间区、迷你切换钮里默认是深灰 #666，暗底上看不清，改亮） */
.aplayer .aplayer-time .aplayer-icon path {
  fill: var(--text-sub) !important;
}
.aplayer .aplayer-time .aplayer-icon:hover path {
  fill: var(--icon-cyan) !important;
}
.aplayer .aplayer-miniswitcher {
  background: rgba(255, 182, 193, 0.15) !important;
}
.aplayer .aplayer-miniswitcher .aplayer-icon path {
  fill: var(--text-sub) !important;
}
.aplayer .aplayer-miniswitcher .aplayer-icon:hover path {
  fill: var(--icon-cyan) !important;
}

/* 歌单列表 */
.aplayer .aplayer-list {
  border: none !important;
}
.aplayer .aplayer-list ol {
  background: rgba(27, 27, 47, 0.96) !important;
}
.aplayer .aplayer-list ol li {
  background: transparent !important;
  border-top: 1px solid rgba(255, 182, 193, 0.15) !important;
}
.aplayer .aplayer-list ol li:hover {
  background: rgba(255, 182, 193, 0.1) !important;
}
.aplayer .aplayer-list ol li.aplayer-list-light {
  background: rgba(255, 182, 193, 0.14) !important;
}
.aplayer .aplayer-list ol li .aplayer-list-title {
  color: var(--text-body) !important;
}
.aplayer .aplayer-list ol li .aplayer-list-author {
  color: var(--text-sub) !important;
}
.aplayer .aplayer-list ol li .aplayer-list-index {
  color: var(--text-faint) !important;
}
.aplayer .aplayer-list ol li.aplayer-list-light .aplayer-list-title {
  color: var(--icon-cyan) !important;
}

/* ===== 粉色星星光标 ===== */
body.custom-cursor,
body.custom-cursor * {
  cursor: none !important;
}

#cursorCanvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 99999;
}
