:root {
  --cream: #FFF8F2;
  --cream-2: #FDEEE3;
  --pink: #F49AAC;
  --pink-soft: #FBD3DA;
  --peach: #FFD9C0;
  --coral: #E8896B;
  --mint: #B8E0D2;
  --gold: #F6C453;
  --ink: #6B5750;
  --ink-soft: #9A857C;
  --white: #FFFFFF;
  --shadow: 0 10px 30px rgba(216, 160, 140, 0.18);
  --shadow-sm: 0 4px 14px rgba(216, 160, 140, 0.14);
  --radius: 24px;
  --font-cute: 'ZCOOL KuaiLe', 'Baloo 2', sans-serif;
  --font-body: 'Quicksand', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: linear-gradient(160deg, var(--cream) 0%, var(--cream-2) 100%);
  background-attachment: fixed;
  line-height: 1.7;
  overflow-x: hidden;
}

/* 漂浮装饰 */
.floaties {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.floaty {
  position: absolute;
  font-size: 28px;
  opacity: 0.55;
  animation: float 9s ease-in-out infinite;
}

.f1 { top: 12%; left: 6%; animation-delay: 0s; }
.f2 { top: 22%; right: 8%; animation-delay: 1.5s; font-size: 22px; }
.f3 { top: 58%; left: 4%; animation-delay: 3s; }
.f4 { top: 70%; right: 6%; animation-delay: 2s; font-size: 34px; }
.f5 { top: 40%; left: 50%; animation-delay: 4s; font-size: 20px; }

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50% { transform: translateY(-22px) rotate(4deg); }
}

/* 导航 */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  background: rgba(255, 248, 242, 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(244, 154, 172, 0.18);
}

.nav-logo {
  font-family: var(--font-cute);
  font-size: 22px;
  color: var(--coral);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 22px;
}

.nav-links a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  padding: 6px 12px;
  border-radius: 14px;
  transition: all 0.18s;
}

.nav-links a:hover {
  background: var(--pink-soft);
  color: var(--coral);
}

/* 首页 */
.hero {
  position: relative;
  z-index: 1;
  min-height: 86vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.hero-card {
  text-align: center;
  background: var(--white);
  border-radius: 40px;
  padding: 50px 44px 44px;
  box-shadow: var(--shadow);
  max-width: 520px;
  width: 100%;
  position: relative;
  border: 3px solid var(--pink-soft);
}

.hero-avatar {
  position: relative;
  width: 150px;
  height: 150px;
  margin: 0 auto 22px;
}

.hero-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 5px solid var(--peach);
  box-shadow: var(--shadow-sm);
}

.hero-avatar-badge {
  position: absolute;
  bottom: 4px;
  right: 4px;
  background: var(--white);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: var(--shadow-sm);
}

.hero-name {
  font-family: var(--font-cute);
  font-size: 46px;
  color: var(--coral);
  margin-bottom: 6px;
  letter-spacing: 2px;
}

.hero-subtitle {
  color: var(--ink-soft);
  font-size: 16px;
  margin-bottom: 28px;
}

.hero-stats {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.stat {
  background: linear-gradient(150deg, var(--cream) 0%, var(--pink-soft) 100%);
  border-radius: 20px;
  padding: 14px 20px;
  min-width: 92px;
}

.stat-num {
  font-family: var(--font-cute);
  font-size: 28px;
  color: var(--coral);
  line-height: 1.1;
}

.stat-label {
  font-size: 12px;
  color: var(--ink-soft);
  font-weight: 600;
}

/* 通用区块 */
.section {
  position: relative;
  z-index: 1;
  padding: 70px 24px;
  max-width: 1080px;
  margin: 0 auto;
}

.section-alt {
  max-width: none;
  background: rgba(255, 255, 255, 0.5);
}

.section-alt > * {
  max-width: 1080px;
  margin-left: auto;
  margin-right: auto;
}

.section-head {
  text-align: center;
  margin-bottom: 44px;
}

.section-title {
  font-family: var(--font-cute);
  font-size: 32px;
  color: var(--coral);
  margin-bottom: 6px;
}

.section-desc {
  color: var(--ink-soft);
  font-size: 15px;
}

/* 里程碑时间线 */
.timeline {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
  padding-left: 36px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  background: linear-gradient(var(--pink), var(--peach));
  border-radius: 3px;
}

.milestone {
  position: relative;
  background: var(--white);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s;
}

.milestone:hover {
  transform: translateX(6px);
}

.milestone::before {
  content: attr(data-icon);
  position: absolute;
  left: -44px;
  top: 16px;
  width: 34px;
  height: 34px;
  background: var(--white);
  border: 3px solid var(--pink);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.milestone-date {
  font-size: 12px;
  color: var(--pink);
  font-weight: 700;
  letter-spacing: 0.5px;
}

.milestone-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  margin: 2px 0 4px;
}

.milestone-text {
  font-size: 14px;
  color: var(--ink-soft);
}

/* 画廊 */
.gallery-filters {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.filter-btn {
  border: 2px solid var(--pink-soft);
  background: var(--white);
  color: var(--ink);
  padding: 7px 18px;
  border-radius: 20px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.18s;
}

.filter-btn:hover {
  border-color: var(--pink);
}

.filter-btn.active {
  background: var(--pink);
  border-color: var(--pink);
  color: var(--white);
}

/* 3D Coverflow 轮播 */
.coverflow {
  position: relative;
  perspective: 1500px;
  height: 440px;
  margin: 0 auto;
  overflow: hidden;
}

.cf-stage {
  position: relative;
  width: 100%;
  height: 400px;
  transform-style: preserve-3d;
}

.cf-item {
  position: absolute;
  top: 0;
  left: 50%;
  width: 300px;
  height: 400px;
  margin-left: -150px;
  border-radius: 24px;
  overflow: hidden;
  background: var(--white);
  box-shadow: var(--shadow);
  border: 4px solid var(--white);
  cursor: pointer;
  will-change: transform, opacity;
  transition: transform 0.55s cubic-bezier(0.2, 0.7, 0.25, 1), opacity 0.45s ease;
}

.cf-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.cf-item.active {
  border-color: var(--pink-soft);
  box-shadow: 0 24px 50px rgba(216, 140, 140, 0.4);
}

.cf-item.active::after {
  content: '🔍';
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  opacity: 0;
  transition: opacity 0.2s;
}

.cf-item.active:hover::after {
  opacity: 1;
}

.cf-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 200;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: var(--white);
  color: var(--coral);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all 0.16s;
}

.cf-prev { left: 8px; }
.cf-next { right: 8px; }

.cf-nav:hover {
  background: var(--pink);
  color: var(--white);
  transform: translateY(-50%) scale(1.1);
}

.cf-caption-bar {
  text-align: center;
  font-family: var(--font-cute);
  font-size: 20px;
  color: var(--coral);
  margin-top: 18px;
  min-height: 28px;
  transition: opacity 0.3s;
}

.cf-dots {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 14px;
  flex-wrap: wrap;
}

.cf-dot {
  width: 9px;
  height: 9px;
  border: none;
  border-radius: 50%;
  background: var(--pink-soft);
  cursor: pointer;
  padding: 0;
  transition: all 0.2s;
}

.cf-dot.active {
  background: var(--pink);
  transform: scale(1.4);
}

.cf-hint {
  text-align: center;
  font-size: 12px;
  color: var(--ink-soft);
  margin-top: 14px;
}

/* 日记 */
.diary-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 22px;
}

.diary-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s;
  border: 2px solid transparent;
}

.diary-card:hover {
  transform: translateY(-5px);
  border-color: var(--pink-soft);
}

.diary-cover {
  height: 160px;
  width: 100%;
  object-fit: cover;
  display: block;
}

.diary-body {
  padding: 18px 20px 22px;
}

.diary-date {
  font-size: 12px;
  color: var(--pink);
  font-weight: 700;
}

.diary-title {
  font-size: 18px;
  font-weight: 700;
  margin: 4px 0 8px;
  color: var(--ink);
}

.diary-text {
  font-size: 14px;
  color: var(--ink-soft);
}

/* 页脚 */
.footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 56px 20px 44px;
  color: var(--ink-soft);
}

.footer-heart {
  font-size: 36px;
  animation: beat 1.6s ease-in-out infinite;
}

@keyframes beat {
  0%, 100% { transform: scale(1); }
  25% { transform: scale(1.15); }
  50% { transform: scale(0.95); }
}

.footer p:nth-child(2) {
  font-family: var(--font-cute);
  font-size: 20px;
  color: var(--coral);
  margin: 8px 0;
}

.footer-sub {
  font-size: 13px;
}

/* 灯箱 */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(107, 87, 80, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 30px;
}

.lightbox.open {
  display: flex;
  animation: fadeIn 0.2s;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.lightbox-content {
  max-width: 90vw;
  max-height: 86vh;
  text-align: center;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 78vh;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.lightbox-content figcaption {
  color: var(--white);
  margin-top: 14px;
  font-size: 15px;
  font-weight: 600;
}

.lightbox-close,
.lightbox-nav {
  position: absolute;
  background: rgba(255, 255, 255, 0.92);
  border: none;
  color: var(--ink);
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.16s;
}

.lightbox-close {
  top: 22px;
  right: 22px;
  width: 44px;
  height: 44px;
  font-size: 18px;
}

.lightbox-nav {
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  font-size: 30px;
  line-height: 1;
}

.lightbox-prev { left: 22px; }
.lightbox-next { right: 22px; }

.lightbox-close:hover,
.lightbox-nav:hover {
  background: var(--pink);
  color: var(--white);
  transform: scale(1.08);
}

.lightbox-nav:hover {
  transform: translateY(-50%) scale(1.08);
}

/* 响应式 */
@media (max-width: 820px) {
  .nav-links { gap: 12px; }
  .nav-links a { padding: 6px 8px; font-size: 13px; }
}

@media (max-width: 540px) {
  .hero-name { font-size: 38px; }
  .section-title { font-size: 26px; }
  .nav { padding: 12px 16px; }
  .nav-logo { font-size: 18px; }
  .hero-card { padding: 40px 24px 32px; }
  .lightbox-nav { width: 42px; height: 42px; font-size: 24px; }
  .coverflow { height: 380px; }
  .cf-stage { height: 340px; }
  .cf-item { width: 220px; height: 300px; margin-left: -110px; }
}
