/* ===== 全局风格 ===== */
body {
  margin: 0;
  font-family: 'Microsoft YaHei', sans-serif;
  background: linear-gradient(135deg, #ffd5ec, #ffe9f3);
  color: #333;
  text-align: center;
  overflow-x: hidden;
  animation: fadeIn 1s ease-in-out;
}

/* ===== 导航 ===== */
nav {
  background-color: #fff;
  padding: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  position: sticky;
  top: 0;
  z-index: 10;
}

.nav-links {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 25px;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  color: #555;
  font-weight: 600;
  transition: all 0.3s;
}

.nav-links a.active,
.nav-links a:hover {
  color: #ff6fa9;
  transform: scale(1.1);
}

/* ===== 按钮 ===== */
.btn, button {
  background: #ff6fa9;
  color: white;
  padding: 10px 20px;
  border-radius: 10px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn:hover, button:hover {
  background: #ff4b8b;
  transform: scale(1.05);
}

/* ===== 内容区域 ===== */
section {
  padding: 40px 20px;
  animation: fadeIn 0.8s ease;
}

textarea, input {
  width: 80%;
  padding: 10px;
  margin: 10px 0;
  border-radius: 8px;
  border: 1px solid #ddd;
  font-size: 15px;
}

#diaryList, #messageList {
  margin-top: 30px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  text-align: left;
}

.diary-item, .message-item {
  background: #fff;
  padding: 15px;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  margin-bottom: 15px;
  transition: transform 0.2s;
}

.diary-item:hover, .message-item:hover {
  transform: scale(1.02);
}

/* ===== 相册 ===== */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  padding: 20px;
}

.photo-grid img {
  width: 100%;
  border-radius: 14px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.1);
  transition: transform 0.3s;
}

.photo-grid img:hover {
  transform: scale(1.05);
}

/* ===== 动画效果 ===== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== 心形漂浮 ===== */
.hearts {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  z-index: -1;
}

.heart {
  position: absolute;
  bottom: -10px;
  font-size: 20px;
  animation: floatUp linear;
  opacity: 0.8;
}

@keyframes floatUp {
  0% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
  100% {
    transform: translateY(-100vh) scale(1.5);
    opacity: 0;
  }
}
