/* ===== 全局基础样式 ===== */
body {
  font-family: 'Patrick Hand', cursive; /* 替换原来的 Comic Sans MS */
  text-align: center;
  background: linear-gradient(to bottom, #fff0f5, #ffe6f0);
  color: #444;
  margin: 0;
  padding: 0;
}

/* ===== Header 和导航 ===== */
header {
  background: linear-gradient(90deg, #ffb6c1, #ff69b4);
  padding: 15px 0;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

header h1 {
  font-family: 'Gloria Hallelujah', cursive; /* 可爱手写风格标题 */
  margin: 0;
  font-size: 2em;
  color: #fff;
  text-shadow: 1px 1px 2px #ff69b4;
  animation: fadeIn 1.5s ease-in;
}

nav {
  margin-top: 10px;
}

nav a {
  font-family: 'Patrick Hand', cursive; /* 导航手写风格 */
  margin: 0 15px;
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  padding: 5px 10px;
  border-radius: 8px;
  transition: background-color 0.3s, transform 0.2s;
}

nav a:hover {
  background-color: #ff69b4;
  transform: scale(1.15);
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

/* ===== Main 标题和段落 ===== */
main h2, main h3 {
  color: #ff69b4;
  margin-top: 20px;
  border-bottom: 3px dashed #ffcce0;
  display: inline-block;
  padding-bottom: 5px;
}

main h3::after {
  content: " ✨";
}

main p {
  max-width: 600px;
  margin: 10px auto 20px auto;
  line-height: 1.6;
}

/* ===== 角色竖向列 ===== */
.gallery-vertical {
  display: flex;
  justify-content: center;
  gap: 30px;          /* 列间距 */
  margin: 20px 0;
  align-items: flex-start; /* 顶部对齐 */
}

.character-column {
  display: flex;
  flex-direction: column; /* 上下排列 */
  gap: 10px;             /* 图片和 info 间距 */
  align-items: center;    /* 居中 */
  width: 150px;           /* 保证列宽一致 */
}

.character-column img {
  width: 150px;
  height: auto;
  border-radius: 15px;
  border: 2px solid #ffcce0;
  transition: transform 0.2s, box-shadow 0.2s;
}

.character-column img:hover {
  transform: scale(1.05) rotate(-2deg);
  box-shadow: 0 8px 15px rgba(0,0,0,0.2);
}

/* ===== 角色信息卡片 ===== */
.character-info {
  background-color: #ffe6f0;
  padding: 8px;
  border-radius: 12px;
  font-size: 0.85em;
  box-shadow: 0 3px 6px rgba(0,0,0,0.1);
  text-align: center;
}

.character-info h4 {
  margin-bottom: 5px;
  color: #ff3399;
}

/* ===== Group Photos ===== */
.gallery {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 20px 0;
}

.gallery img {
  width: 350px;
  height: auto;
  border-radius: 15px;
  border: 2px solid #ffcce0;
  transition: transform 0.2s;
}

.gallery img:hover {
  transform: scale(1.05);
}

/* ===== Footer ===== */
footer {
  margin-top: 30px;
  padding: 15px;
  background: linear-gradient(90deg, #ff69b4, #ffb6c1);
  color: white;
  font-weight: bold;
  box-shadow: 0 -3px 8px rgba(0,0,0,0.1);
}
/* ===== Characters 页面横排 ===== */
.characters {
  display: flex;            /* 横向排列所有角色 */
  justify-content: center;  /* 居中整排 */
  flex-wrap: wrap;          /* 超出宽度换行 */
  gap: 20px;                /* 角色间距 */
  margin: 20px 0;
}

.character {
  display: flex;
  flex-direction: column;   /* 图片在上，文字在下 */
  align-items: center;
  background-color: #ffe6f0;
  padding: 15px;
  border-radius: 15px;
  width: 180px;             /* 每个角色宽度固定 */
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  transition: transform 0.2s, box-shadow 0.2s;
}

.character:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 8px 15px rgba(0,0,0,0.2);
}

.character img {
  width: 150px;
  height: auto;
  border-radius: 15px;
  border: 2px solid #ffcce0;
  margin-bottom: 10px;
}

.character h4 {
  margin: 5px 0;
  color: #ff3399;
}

.character p {
  font-size: 0.85em;
  margin: 2px 0;
  text-align: center;
}
/* ===== About 页面（更新版） ===== */
.about-container {
  max-width: 700px;
  margin: 30px auto;
  padding: 25px;
  background-color: #ffe6f0;
  border-radius: 20px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  text-align: center;
  position: relative;
}

.about-img {
  width: 220px;
  height: auto;
  border-radius: 50%;
  border: 4px solid #ffcce0;
  margin-bottom: 20px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.decorative-border {
  height: 12px;
  width: 85%;
  margin: 20px auto;
  border-top: 3px dashed #ff69b4;
  border-radius: 5px;
}

.about-container p {
  font-size: 1em;
  color: #555;
  line-height: 1.6;
  max-width: 600px;
  margin: 10px auto;
}
/* ===== About 页面（蝴蝶结花边 + 动画版） ===== */
.about-container {
  max-width: 700px;
  margin: 30px auto;
  padding: 25px;
  background-color: #ffe6f0;
  border-radius: 20px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  text-align: center;
  position: relative;
  animation: fadeIn 1s ease-in-out;
}

/* 图片轻轻浮动 */
.about-img {
  width: 220px;
  height: auto;
  border-radius: 50%;
  border: 4px solid #ffcce0;
  margin-bottom: 20px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  animation: float 3s ease-in-out infinite;
}

/* 花边加蝴蝶结 */
.decorative-border {
  position: relative;
  height: 12px;
  width: 85%;
  margin: 25px auto;
  border-top: 3px dashed #ff69b4;
  border-radius: 5px;
  animation: borderGlow 4s ease-in-out infinite;
}

/* 左右蝴蝶结 */
.decorative-border::before,
.decorative-border::after {
  content: "";
  position: absolute;
  top: -18px; /* 调整蝴蝶结位置 */
  width: 40px;
  height: 40px;
  background-image: url('images/bow.png');
  background-size: cover;
  background-repeat: no-repeat;
  animation: float 3s ease-in-out infinite;
}

.decorative-border::before {
  left: -45px;
}

.decorative-border::after {
  right: -45px;
  transform: scaleX(-1); /* 让右边蝴蝶结水平翻转 */
}

.about-container p {
  font-size: 1em;
  color: #555;
  line-height: 1.6;
  max-width: 600px;
  margin: 10px auto;
}

/* ===== 动画关键帧 ===== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@keyframes borderGlow {
  0%, 100% { border-color: #ff69b4; }
  50% { border-color: #ff99cc; }
}
/* ===== Added Enhancements ===== */

/* About 页面花边与头像动画 */
.about-container {
  position: relative;
  overflow: hidden;
}

.about-img {
  animation: float 3s ease-in-out infinite;
}

.decorative-border::before,
.decorative-border::after {
  content: "";
  position: absolute;
  top: -10px;
  width: 40px;
  height: 40px;
  background: url("images/bow.png") no-repeat center/contain;
}

.decorative-border::before {
  left: 20px;
  animation: borderGlow 3s infinite alternate;
}

.decorative-border::after {
  right: 20px;
  animation: borderGlow 3s infinite alternate-reverse;
}

/* 图片放大 Lightbox 动画 */
@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

@keyframes borderGlow {
  from { filter: drop-shadow(0 0 3px #ff99cc); }
  to { filter: drop-shadow(0 0 10px #ff66b2); }
}

/* 返回顶部按钮 */
#topBtn {
  position: fixed;
  bottom: 25px;
  right: 25px;
  background-color: #ff69b4;
  color: white;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  transition: transform 0.3s;
  display: none;
}

#topBtn:hover {
  transform: scale(1.1);
}

/* 响应式布局：让图片和角色在小屏下自动换行 */
@media (max-width: 820px) {
  .gallery {
    grid-template-columns: repeat(3, 120px);
  }

  .character {
    width: 140px;
    margin: 10px;
  }

  .about-img {
    width: 160px;
  }
}
/* ===== Home Page Enhancements ===== */

/* 标题淡入 */
header h1 {
  animation: fadeIn 1.5s ease-in;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-15px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 角色图片 hover 微旋转和放大 */
.gallery img {
  transition: transform 0.3s, box-shadow 0.3s;
}

.gallery img:hover {
  transform: scale(1.05) rotate(-3deg);
  box-shadow: 0 8px 15px rgba(255,182,193,0.6);
}

/* 分割线 + 引导文字 */
main p:last-of-type {
  border-top: 2px dashed #ff69b4;
  padding-top: 15px;
  margin-top: 25px;
  animation: slideIn 1s ease-out;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Gallery 图片轻微上下漂浮 */
@keyframes floatGallery {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.gallery img {
  animation: floatGallery 4s ease-in-out infinite;
}

.character-info {
  display: none; /* 默认隐藏详细信息 */
  text-align: center;
  margin-top: 5px;
}

.character-info.show {
  display: block; /* 点击名字显示 */
}
/* ===== Home 页面简介框设计 ===== */
.intro-box {
  max-width: 750px;
  margin: 30px auto;
  background: linear-gradient(180deg, #fff0f6, #ffe6f0);
  border: 3px dashed #ff99cc;
  border-radius: 20px;
  padding: 25px 35px;
  font-family: "Quicksand", "Comic Sans MS", sans-serif;
  font-size: 1.05em;
  color: #555;
  line-height: 1.7;
  text-align: center;
  box-shadow: 0 6px 12px rgba(255,182,193,0.3);
  position: relative;
  animation: fadeInIntro 1.2s ease-in-out;
}

/* 花边蝴蝶结（上+下） */
.intro-box::before,
.intro-box::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 50px;
  background: url("images/bow.png") no-repeat center/contain;
  animation: float 3s ease-in-out infinite;
}

.intro-box::before {
  top: -25px;
}

.intro-box::after {
  bottom: -25px;
  transform: translateX(-50%) scaleX(-1);
}

/* 动画 */
@keyframes fadeInIntro {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
/* ===== 首页简介框（可爱风装饰） ===== */
.intro-box {
  background: linear-gradient(180deg, #fff0f8, #ffe6ef);
  border: 3px dashed #ffb6c1;
  border-radius: 20px;
  max-width: 650px;
  margin: 25px auto;
  padding: 25px 20px 35px 20px;
  text-align: center;
  position: relative;
  box-shadow: 0 6px 12px rgba(255, 182, 193, 0.3);
  animation: fadeIn 1.2s ease-in-out;
}

/* 上方漂浮小装饰图（如Hello Kitty头像） */
.intro-deco {
  width: 100px;
  position: absolute;
  top: -42px;
  left: calc(50% - 50px);
  animation: float 3s ease-in-out infinite;
}

/* 标题字体和效果 */
.intro-box h3 {
  color: #ff69b4;
  font-family: "Comic Sans MS", "Arial Rounded MT Bold", sans-serif;
  text-shadow: 1px 1px 2px #ffd1dc;
  margin-bottom: 10px;
}

/* 内文字体 */
.intro-box p {
  color: #555;
  line-height: 1.7;
  font-size: 1em;
  max-width: 580px;
  margin: 0 auto;
}

/* ===== 动画关键帧 ===== */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}