/* 禁用移动端蓝色高亮和选择指示 */
* {
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
body, html {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: 'Noto Sans', 'Microsoft YaHei', Arial, sans-serif;
  background: #ffd6e6;
  overflow: hidden;
  transition: background .4s,color .3s;
}

/* 黑白模式 */
body.dark {
  background: #18191c;
  color: #fafafa;
}
body.dark .wallpaper { filter: blur(2px) brightness(0.45) grayscale(0.65); }
body.dark main h1, body.dark #typed-row,
body.dark .card-title, body.dark .card-desc,
body.dark .app-title { color: #fafafa; }
body.dark footer,
body.dark .card { background: #2a2a2e; color: #fafafa;}
body.dark .card-title { color: #f778bb; }
body.dark .card { box-shadow: 0 6px 32px #630e30c0; border: 1px solid #62596a; }
body.dark .page2 {background: linear-gradient(180deg,#222 90%, #73053c 100%);}
body.dark .footer-content { color: #fafafa; }

.wallpaper {
  position: absolute; inset: 0;
  width: 100vw; height: 100vh;
  background: url('https://s21.ax1x.com/2025/11/23/pZkagjf.jpg') center/cover no-repeat;
  filter: blur(2px) brightness(0.85); z-index: 1;
}
header {
  width: 100vw;
  position: fixed;
  top: 0; left: 0;
  height: 58px;
  background: rgba(255,255,255,0.9);
  box-shadow: 0 3px 32px #fafbff40;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 30px 0 24px;
  letter-spacing: 3px;
  font-size: 1.2rem;
}
body.dark header {
  background: #222232e0;
  box-shadow: 0 6px 24px #22263a80;
}
.app-title {
  font-weight: 700;
  font-size: 1.3rem;
  color: #f16da3;
  letter-spacing: 5px;
  text-shadow: 0 3px 12px #fa97c2a0;
}
body.dark .app-title { text-shadow: 0 3px 18px #ebadcd; }
#mode-toggle {
  background: transparent;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  color: #17181b;
}
body.dark #mode-toggle { color: #fabef3; }
.page {
  position: absolute;
  inset: 0;
  width: 100vw; height: 100vh;
  transition: opacity 0.6s;
}

.page1 {
  z-index: 10; opacity: 1; pointer-events: auto;
}

.page2 {
  z-index: 9; opacity: 0; pointer-events: none;
  background: linear-gradient(180deg,#fff 90%, #ffd6e6 100%);
  display: flex; flex-direction: column;
}

main {
  position: relative; z-index: 2;
  height: 100vh; display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

h1 {
  font-size: 4rem;
  color: #fff;
  margin-bottom: 2rem;
  text-shadow: 0 6px 25px rgba(255,120,180,.4);
  font-weight: bold; letter-spacing: 6px;
}

.typed {
  font-size: 1.1rem;
  color: #eee;
  letter-spacing: 4px;
  margin-bottom: 5rem;
  height: 3rem; width: 340px;
  /* 居中单行显示 */
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: 'Courier New', monospace;
}

#typed-row {
  font-size: 1.5rem;
  background: linear-gradient(90deg,#fff, #f8cce2 80%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 500;
  letter-spacing: 4px;
  min-height: 1.5em;
}

#to-next, #to-prev {
  width: 48px; height: 48px;
  border: none;
  border-radius: 50%;
  font-size: 2rem;
  background: rgba(255,200,230,0.8);
  color: #f16da3;
  cursor: pointer;
  box-shadow: 0 3px 18px #fa97c2cc;
  margin-top: 5rem;
  transition: background .25s;
  position: relative;
}
#to-next:hover, #to-prev:hover { background: #fbd2ef; }
/*#to-prev { position: fixed; left:calc(50% - 24px); bottom:84px; margin-top:0; z-index:98; }
body.dark #to-next, body.dark #to-prev { background: #3e233f;color:#f16da3; }
*/
/*更改为右下*/
#to-prev {
  position: fixed;
  right: 36px;
  bottom: 120px;
  margin-top: 0;
  z-index: 98;
  width: 48px;
  height: 48px;
  border-radius: 50%;
}
.page2 {
  overflow-y: auto; opacity: 0;
  pointer-events: none; padding-bottom: 100px;
}
.page2.active {
  opacity: 1; pointer-events: auto; z-index: 20;
}

/*.waterfall {
  width: 100%; max-width: 1300px;
  margin: 0 auto;
  column-count: 3; column-gap: 2rem; padding-top: 94px;
}
@media (max-width: 1000px) {
  .waterfall { column-count: 2; column-gap: 1rem; }
}
@media (max-width: 600px) {
  .waterfall { column-count: 1; column-gap: 0.5rem; }
}*/
/*添加移动端适配瀑布流*/
.waterfall {
  width: 100%;
  max-width: 1300px;
  margin: 0 auto;
  column-count: 3;
  column-gap: 2rem;
  padding-top: 94px;
  padding-bottom: 180px; /* 新增，保证底部空间 */
}
@media (max-width: 1000px) {
  .waterfall { column-count: 2; column-gap: 1rem; }
}
@media (max-width: 600px) {
  .waterfall { column-count: 1; column-gap: 0.5rem; }
}

.card {
  break-inside: avoid;
  background: #fff;
  border-radius: 1.6rem;
  box-shadow: 0 6px 32px #f7b3da50;
  margin-bottom: 2rem; padding: 1.2rem;
  transition: transform 0.18s;
  cursor: pointer; min-height: 260px;
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 1px solid #f8d1e6;
}
.card:hover { transform: translateY(-3px) scale(1.03);}
.card img {
  width: 100%; max-width: 320px;
  border-radius: 1.1rem;
}
.card-title {
  margin-top: 1.1rem; font-size: 1.35rem;
  color: #f455a1; font-weight: bold;
  text-shadow: 0 2px 8px #fa83c050; letter-spacing: 3px;
}
.card-desc {
  margin-top: 0.7rem; font-size: 1.1rem;
  color: #333; text-align: center; font-weight: 500;
}

footer {
  width: 100vw;
  background: linear-gradient(90deg,#ffa9db 15%,#ffd6e6 85%);
  color: #fff;
  position: fixed;
  bottom: 0; left: 0; z-index: 50;
  box-shadow: 0 -4px 36px #f891c3aa;
  padding: 32px 0 36px;
  border-radius: 30px 30px 0 0;
  text-align: center;
  font-size: 1.2rem;
  letter-spacing: 3px;
}

.footer-content { font-weight: 500; }

/* 粉色音符动画 */
.note {
  position: fixed;
  font-size: 2.2rem;
  color: #f455a1;
  pointer-events: none;
  animation: floatNote 1.2s ease-out forwards;
  user-select: none;
  z-index: 999999999; /* 让符号始终显示于最顶层 */
}
@keyframes floatNote {
  0% { opacity: 1; transform: translateY(0) scale(1) rotate(-13deg);}
  70% { opacity:0.8; transform: translateY(-130px) scale(1.2) rotate(12deg);}
  100% { opacity: 0; transform: translateY(-180px) scale(1.3) rotate(-25deg);}
}