* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "PingFang SC", "Microsoft Yahei", sans-serif;
}
:root {
  --primary: #87bba2;
  --primary-light: #b8d8c8;
  --cream-bg: #fcf8f2;
  --text-main: #2c3e50;
  --text-gray: #718096;
  --shadow: 0 4px 20px rgba(135, 187, 162, 0.15);
  --shadow-hover: 0 8px 30px rgba(135, 187, 162, 0.25);
}
body {
  background-color: var(--cream-bg);
  background-image: url('背景.png');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
  color: var(--text-main);
  line-height: 1.7;
  overflow-x: hidden;
}
/* 柔光遮罩 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(252, 248, 242, 0.88);
  z-index: -1;
  pointer-events: none;
}
/* 导航栏 */
.nav {
  width: 100%;
  padding: 1.2rem 5%;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  position: fixed;
  top: 0;
  left: 0;
  z-index: 999;
  box-shadow: var(--shadow);
}
.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4rem;
}
.nav-logo {
  font-size: 1.45rem;
  font-weight: 700;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  color: var(--primary);
  text-decoration: none;
  letter-spacing: 2px;
}
.nav-menu {
  display: flex;
  align-items: center;
}
.nav-menu a {
  text-decoration: none;
  color: var(--text-main);
  margin-left: 2rem;
  font-weight: 500;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 1.05rem;
  letter-spacing: 1px;
  transition: 0.3s ease;
  position: relative;
  cursor: pointer;
}
.nav-menu a:hover {
  color: var(--primary);
}
.nav-menu a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: 0.3s ease;
}
.nav-menu a:hover::after {
  width: 100%;
}
.hamburger {
  display: none;
  font-size: 1.8rem;
  color: var(--primary);
  cursor: pointer;
}
/* 页面容器 */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 5%;
  padding-top: 100px;
  min-height: 100vh;
  text-align: center;
}
/* 标题：淡入上浮 + 渐变发光 */
.main-title {
  font-size: 2.8rem;
  font-weight: 600;
  margin: 0 auto 1rem auto;
  opacity: 0;
  transform: translateY(20px);
  background: linear-gradient(90deg, #68a890, #97cbb6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: fadeUpGlow 1.2s ease-out forwards;
}
@keyframes fadeUpGlow {
  to {
    opacity: 1;
    transform: translateY(0);
    filter: drop-shadow(0 0 8px rgba(135, 187, 162, 0.35));
  }
}
/* 卡片样式 */
/* 首页美化样式 */
.home-hero {
  padding: 3.5rem 0 2.5rem;
  text-align: center;
}

.home-title {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  background: linear-gradient(90deg, #68a890, #97cbb6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 10px rgba(135, 187, 162, 0.35));
}

.home-subtitle {
  color: var(--text-gray);
  font-size: 1.1rem;
  line-height: 1.8;
  max-width: 650px;
  margin: 0 auto;
}

.home-card-wrapper {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.8rem;
  max-width: 900px;
  margin: 0 auto;
}

.home-card {
  background: rgba(255, 255, 255, 0.78);
  border-radius: 20px;
  padding: 2.2rem 1.8rem;
  box-shadow: 0 8px 30px rgba(135, 187, 162, 0.12);
  border: 1px solid rgba(135, 187, 162, 0.15);
  transition: 0.4s ease;
  text-align: center;
  backdrop-filter: blur(8px);
}

.home-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 12px 35px rgba(135, 187, 162, 0.22);
}

.home-card-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.home-card h3 {
  color: var(--primary);
  margin-bottom: 0.8rem;
  font-size: 1.35rem;
}

.home-card p {
  color: var(--text-gray);
  line-height: 1.7;
  font-size: 0.95rem;
}

/* 移动端适配 */
@media (max-width: 768px) {
  .home-title {
    font-size: 2.2rem;
  }

  .home-subtitle {
    font-size: 1rem;
  }

  .home-card-wrapper {
    grid-template-columns: 1fr;
    padding: 0 0.5rem;
  }

  .home-card {
    padding: 1.8rem 1.4rem;
  }
}
/* 相册网格 */
./* 相册照片从四周飞来，最后分散排布 */
.album-container {
  position: relative;
  width: 100%;
  max-width: 1100px;
  height: 85vh;
  margin: 3rem auto 0;
  left: 0;
  right: 0;
}

.album-photo {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 260px;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
  cursor: pointer;
  opacity: 0;
  transform: translate(var(--startX), var(--startY)) rotate(var(--rotate)) scale(0.65);
  animation: photoFlyIn 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) var(--delay) forwards;
  transition: 0.35s ease;
}

.album-photo img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.album-photo:hover {
  transform: translate(var(--finalX), var(--finalY)) rotate(0deg) scale(1.05) !important;
  box-shadow: var(--shadow-hover);
  z-index: 10;
}

@keyframes photoFlyIn {
  0% {
    opacity: 0;
    transform: translate(var(--startX), var(--startY)) rotate(var(--rotate)) scale(0.65);
  }
  60% {
    opacity: 1;
    transform: translate(calc(var(--startX) * 0.45), calc(var(--startY) * 0.45 - 100px)) rotate(calc(var(--rotate) * 0.5)) scale(0.9);
  }
  100% {
    opacity: 1;
    transform: translate(var(--finalX), var(--finalY)) rotate(var(--rotate)) scale(1);
  }
}

/* 点击放大遮罩 */
.photo-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: 0.3s ease;
}

.photo-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.photo-modal img {
  max-width: 90%;
  max-height: 80vh;
  border-radius: 12px;
  transform: scale(0.9);
  transition: 0.3s ease;
}

.photo-modal.active img {
  transform: scale(1);
}

/* 移动端改为纵向排列 */
@media (max-width: 768px) {
  .album-container {
    height: auto;
  }

  .album-photo {
    position: static;
    width: 100%;
    max-width: 320px;
    margin: 1.5rem auto;
    opacity: 1;
    transform: none;
    animation: none;
  }

  .album-photo:hover {
    transform: translateY(-6px) scale(1.03) !important;
  }
}
/* 留言、登录输入框 */
.input-item {
  margin-bottom: 1.5rem;
}
.input-item input, .input-item textarea {
  width: 100%;
  padding: 1rem;
  border: 1px solid var(--primary-light);
  border-radius: 12px;
  outline: none;
  font-size: 1rem;
  background: #fff;
  transition: 0.3s ease;
}
.input-item input:focus, .input-item textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(135, 187, 162, 0.2);
}
.message-item {
  padding: 1.5rem;
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow);
  margin: 1.5rem auto;
  max-width: 700px;
  text-align: left;
}
.msg-name {
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.msg-time {
  font-size: 0.85rem;
  color: var(--text-gray);
  margin-bottom: 0.8rem;
}
.footer {
  text-align: center;
  padding: 2rem 0;
  color: var(--text-gray);
  font-size: 0.95rem;
  margin-top: 4rem;
}
/* 移动端适配 汉堡菜单 */
@media (max-width:768px){
  .hamburger {display:block}
  .nav-container{justify-content:space-between;gap:0}
  .nav-menu {
    position: fixed;
    top:70px;
    left:-100%;
    flex-direction: column;
    background:#fff;
    width:100%;
    height:calc(100vh - 70px);
    transition:0.4s ease;
    box-shadow:var(--shadow);
    justify-content:flex-start;
    padding-top:2rem;
  }
  .nav-menu.active {left:0}
  .nav-menu a {margin:1.2rem 0;font-size:1.1rem}
  .main-title {
    font-size: 2rem;
  }
  .container {
    padding-top:80px;
    padding-left:3%;
    padding-right:3%;
  }
}