/* link-grid 样式：2x2的可爱按钮网格 */
.link-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, auto);
    gap: 10px;
    list-style: none;
    padding: 15px;
    background: rgba(255, 255, 255, 0.15);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    width: fit-content;
}

/* 每个格子（li）垂直居中 */
.link-grid li {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 50px; /* 你也可以改成 60px、40px 看更好看 */
}

/* 按钮链接样式 */
.link-grid li a {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    padding: 8px 12px;
    border-radius: 8px;
    transition: background-color 0.3s;
}

/* hover 效果：轻盈透明渐变 */
.link-grid li a:hover {
    background-color: rgba(255, 255, 255, 0.3);
}
.social-icons a {
    font-size: 1.2rem;
    color: #fdcbf1;
    margin: 0 10px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-icons a:hover {
    transform: scale(1.2);
    color: #fdcbf1;
}
/* 夜光 GRID 发光 */
.glow-grid li a {
  position: relative;
  z-index: 1;
  transition: color 0.3s ease;
}
.glow-grid li a::before {
  content: "";
  position: absolute;
  top: -4px; left: -4px; right: -4px; bottom: -4px;
  background: rgba(253,203,241,0.35);
  filter: blur(8px);
  border-radius: 8px;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}
.glow-grid li a:hover::before {
  opacity: 1;
}
@font-face {
  font-family: 'HFStickyNotes';
  src: url('/assets/fonts/HFStickyNotes-2.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'LoveIsFree';
  src: url('/assets/fonts/Love-is-free-2.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'SJNarrowLight';
  src: url('/assets/fonts/SJ-Narrow-Light-2.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

.hfsticky {
  font-family: 'HFStickyNotes', sans-serif;
  font-size: 3rem;
  background: linear-gradient(90deg, #ee9ca7, #ffdde1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;

  line-height: 1.3;
  padding-top: 0.2em;
}

.love {
  font-family: 'LoveIsFree', cursive, sans-serif;
  font-size: 1.2rem;
  color: #ff6f91; /* 白红色系甜甜的 */
  margin-right: 8px;
}

.snow {
  font-family: 'SJNarrowLight', sans-serif;
  font-size: 1.2rem;
  color: #c2e9fb; /* 冰蓝色，像雪一样冷冽 */
  margin-right: 8px;
}

.sakura {
  font-family: 'SJNarrowLight', sans-serif;
  font-size: 1.2rem;
  color: #fadada; /* 浅樱花粉色，柔柔的 */
  margin-right: 8px;
}


/* ============================================================
 * 光标渐变线条拖尾 canvas
 * ============================================================ */
#trail {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  pointer-events: none;
  z-index: 9995;
}

/* ============================================================
 * 樱花 WebGL 花瓣层（透明背景，叠在壁纸上）
 * ============================================================ */
#sakura {
  z-index: 2;
  position: fixed;
  left: 0;
  top: 0;
  height: 100vh;
  width: 100vw;
  pointer-events: none;
}

/* ============================================================
 * Custom cursor (pink dot + soft trailing glow)
 * ============================================================ */
.has-custom-cursor,
.has-custom-cursor * {
  cursor: none !important;
}

#cursor {
  position: fixed;
  left: 0; top: 0;
  width: 14px; height: 14px;
  margin: -7px 0 0 -7px;
  border-radius: 50%;
  background: #ffd3e0;
  box-shadow: 0 0 8px rgba(255, 182, 193, 0.9), 0 0 16px rgba(255, 182, 193, 0.5);
  pointer-events: none;
  z-index: 10001;
}

#cursor-glow {
  position: fixed;
  left: 0; top: 0;
  width: 46px; height: 46px;
  margin: -23px 0 0 -23px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(253, 203, 241, 0.55), transparent 70%);
  pointer-events: none;
  z-index: 10000;
}

/* 光标空闲 8 秒 / 移出窗口时隐藏 */
.cursor-idle #cursor,
.cursor-idle #cursor-glow,
.cursor-idle #trail {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
}

p {
  white-space: nowrap;
}

/* ============================================================
 * Random "Your Name." movie wallpaper background
 * ============================================================ */
#bg-wallpaper {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background-color: #1a1020; /* 图片加载失败时的兜底底色 */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 0;
}
#bg-wallpaper::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(20, 10, 25, 0.35); /* 深色半透明，保证文字可读 */
}

/* ============================================================
 * Page loading overlay
 * Fades out once the page + sakura scene are ready
 * ============================================================ */
#loading {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1rem;
  background: #1a1020;
  color: #fadada;
  font-family: 'SJNarrowLight', 'Segoe UI', sans-serif;
  font-size: 1.1rem;
  letter-spacing: 0.1em;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
#loading::before {
  content: "";
  width: 40px;
  height: 40px;
  border: 3px solid rgba(250, 218, 218, 0.25);
  border-top-color: #fadada;
  border-radius: 50%;
  animation: loading-spin 0.9s linear infinite;
}
#loading.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
@keyframes loading-spin {
  to { transform: rotate(360deg); }
}

/* ============================================================
 * 通用：防止 100vw 固定层引发横向滚动 / 偏移
 * ============================================================ */
html, body {
  overflow-x: hidden;
}

/* ============================================================
 * 手机 / 竖屏适配：让按钮网格居中、不溢出
 * ============================================================ */
@media screen and (max-width: 736px) {
  #header nav {
    width: 100%;
    padding: 0 1.25rem;
  }
  #header nav .link-grid {
    width: 100%;
    max-width: 340px;
    margin: 0 auto;
    padding: 12px;
    grid-template-columns: repeat(2, 1fr);
  }
  #header nav .link-grid li {
    border-top: 0; /* 覆盖 main.css 移动端的分隔线 */
    height: 48px;
  }
  #header nav .link-grid li a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    white-space: nowrap;
    padding: 10px 8px;
  }
}
