:root {
  --text-main: #ffffff;
  --text-sub: #ffead0;
  --glass-bg: rgba(255, 255, 255, 0.1); 
  --glass-border: rgba(255, 255, 255, 0.2);
  --glass-shadow: 0 8px 32px 0 rgba(31, 15, 0, 0.25);
}

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

body {
  font-family: 'Noto Sans SC', sans-serif;
  color: var(--text-main);
  background-color: #e65100;
  overflow: hidden; 
}

/* === 新增：开场动画遮罩 === */
#intro-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #d5785c;
  z-index: 999;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: transform 1.2s cubic-bezier(0.8, 0, 0.2, 1);
}

.intro-logo {
  font-family: 'Playfair Display', serif;
  font-size: 3rem;
  color: #fff;
  letter-spacing: 8px;
  opacity: 0;
  animation: logoReveal 2.5s ease-in-out forwards;
}

@keyframes logoReveal {
  0% {
    opacity: 0;
    letter-spacing: 20px;
    filter: blur(10px);
  }
  40% {
    opacity: 1;
    letter-spacing: 8px;
    filter: blur(0px);
  }
  80% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

.overlay-hide {
  transform: translateY(-100%);
}

/* === 核心滚动容器 === */
main {
  height: 100vh;
  overflow-y: scroll;
  scroll-snap-type: y mandatory; 
  scrollbar-width: none; 
  -ms-overflow-style: none;
}

main::-webkit-scrollbar {
  display: none;
}

/* === 背景层 === */
.oil-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  background-image: url('assets/images/1.png');
  background-size: cover;
  background-position: center;
  filter: saturate(1.1) contrast(1.05);
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: linear-gradient(
    180deg, 
    rgba(60, 20, 0, 0.3) 0%, 
    rgba(100, 40, 0, 0.1) 50%, 
    rgba(60, 20, 0, 0.4) 100%
  );
  backdrop-filter: blur(10px);
}

/* === 分页样式 === */
section {
  height: 100vh;
  width: 100%;
  scroll-snap-align: start; 
  scroll-snap-stop: always; 
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 24px;
  position: relative;
}

.page-logo {
  position: absolute;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: 160px;
  height: auto;
  z-index: 5;
  pointer-events: none;
  filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.25));
}

h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

p {
  color: var(--text-sub);
  line-height: 1.8;
  font-size: 1.1rem;
}

/* === 导航箭头样式 === */
.scroll-down-btn,
.scroll-up-btn {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  z-index: 10;
  transition: all 0.3s ease;
  animation: pulse 2s infinite;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
}

.scroll-down-btn {
  bottom: 30px;
}

.scroll-up-btn {
  top: 30px;
}

.scroll-down-btn:hover,
.scroll-up-btn:hover {
  color: #fff;
  transform: translateX(-50%) translateY(3px);
}

/* === 第一屏 === */
.hero-content {
  text-align: center;
  max-width: 600px;
  animation: fadeInUp 1s ease-out 2.8s both; /* 延迟播放，等待开场结束 */
}

.brand-title {
  font-family: 'Playfair Display', serif;
  font-size: 4.5rem;
  letter-spacing: 2px;
  margin-bottom: 1rem;
  background: linear-gradient(to right, #fff, #ffdcb0); 
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.brand-slogan {
  font-size: 1.25rem;
  margin-bottom: 3rem;
  font-weight: 300;
}

.cta-btn {
  display: inline-block;
  padding: 16px 48px;
  border-radius: 50px;
  background: rgba(255, 255, 255, 0.9);
  color: #bf360c;
  font-weight: 600;
  font-size: 1.1rem;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.cta-btn:hover {
  transform: translateY(-2px);
  background: #ffffff;
  box-shadow: 0 6px 20px rgba(255, 138, 61, 0.4);
}

/* === 第二屏 === */
.process-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  max-width: 1000px;
  width: 100%;
}

.glass-card {
  flex: 1;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 24px;
  padding: 40px 30px;
  box-shadow: var(--glass-shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: transform 0.3s ease;
  will-change: transform;
}

.glass-card:hover {
  transform: translateY(-5px);
  background: rgba(255,255,255,0.15);
}

.card-icon {
  font-size: 3rem;
  margin-bottom: 20px;
  opacity: 0.9;
}

.card-icon img {
  width: 56px;
  height: 56px;
  display: block;
}

.process-arrow {
  font-size: 2rem;
  color: rgba(255,255,255,0.6);
  animation: pulse 2s infinite;
}

/* === 第三屏 === */
.gallery-wrapper {
  position: relative;
  width: 100%;
  height: 70%;
  max-width: 1100px;
  perspective: 1000px;
}

.art-placeholder {
  position: absolute;
  background: linear-gradient(135deg, rgba(255,255,255,0.2), rgba(255,255,255,0.05));
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 12px;
  box-shadow: 0 15px 35px rgba(0,0,0,0.2);
  backdrop-filter: blur(5px);
  display: flex;
  justify-content: center;
  align-items: center;
  color: rgba(255,255,255,0.3);
  font-size: 0.9rem;
  letter-spacing: 1px;
  transition: all 0.4s ease;
  cursor: default;
}

.p1 {
  width: 30%;
  height: 40%;
  top: 10%;
  left: 5%;
  animation: float 6s ease-in-out infinite;
}

.p2 {
  width: 25%;
  height: 30%;
  top: 50%;
  left: 15%;
  animation: float 7s ease-in-out infinite 1s;
  z-index: 2;
}

.p3 {
  width: 35%;
  height: 50%;
  top: 20%;
  left: 40%;
  animation: float 8s ease-in-out infinite 0.5s;
  z-index: 3;
  background: rgba(255,255,255,0.15);
}

.p4 {
  width: 20%;
  height: 25%;
  top: 15%;
  right: 5%;
  animation: float 6.5s ease-in-out infinite 2s;
}

.p5 {
  width: 28%;
  height: 35%;
  top: 60%;
  right: 10%;
  animation: float 7.5s ease-in-out infinite 1.5s;
  z-index: 2;
}

/* === 画廊散布布局 === */
.scatter-gallery {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  isolation: isolate;
  z-index: 1;
}

#gallery {
  justify-content: flex-start;
  padding-top: 100px;
}

#gallery h2 {
  position: relative;
  z-index: 10;
  pointer-events: none; /* 防止遮挡画廊点击 */
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.memory-card {
  position: absolute;
  /* width 由 JS 随机控制 */
  max-width: 45vw;
  transition: transform 0.25s ease, opacity 0.25s ease;
  will-change: transform, opacity;
  backface-visibility: hidden;
  transform: translateZ(0);
}

.photo-frame {
  position: relative;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(0,0,0,0.25);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  aspect-ratio: 3 / 4;
}

.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.photo-frame .tag {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(0,0,0,0.4);
  padding: 4px 8px;
  border-radius: 10px;
  font-size: 0.75rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.memory-details {
  position: relative;
  z-index: 4;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transform: translateY(-6px);
  transition: all 0.3s ease;
  text-align: center;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.85);
}

.memory-card:hover {
  z-index: 6;
}

.memory-card:hover .photo-frame {
  transform: scale(1.06);
  box-shadow: 0 16px 40px rgba(0,0,0,0.3);
}

.memory-card:hover .tag {
  opacity: 1;
}

.memory-card:hover .memory-details {
  opacity: 1;
  max-height: 160px;
  margin-top: 12px;
  transform: translateY(0);
}

.scatter-gallery.gallery-focus .memory-card {
  opacity: 0.35;
  transform: scale(0.9);
}

.scatter-gallery.gallery-focus .memory-card.is-active {
  opacity: 1;
  transform: scale(1);
  z-index: 7;
}

/* === 情绪日历总结 === */
.summary-container {
  width: 100%;
  max-width: 960px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  transition: opacity 1.2s ease;
}

.summary-container.is-fading {
  opacity: 0;
}

.summary-subtitle {
  opacity: 0.8;
  text-align: center;
  margin-bottom: 8px;
}

.calendar-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 20px;
  backdrop-filter: blur(12px);
}

.calendar-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  font-size: 0.85rem;
  opacity: 0.75;
  text-align: center;
  margin-bottom: 10px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}

.calendar-cell {
  height: 38px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.86);
}

.calendar-cell.warm {
  background: rgba(120, 55, 10, 0.55);
}

.calendar-cell.calm {
  background: rgba(20, 60, 110, 0.55);
}

.summary-note {
  font-size: 0.95rem;
  opacity: 0.85;
  text-align: center;
}

.event-list {
  display: grid;
  gap: 12px;
}

.event-item {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 16px 18px;
  font-size: 0.95rem;
  opacity: 0.92;
}

/* === 第四屏 === */
.contact-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  padding: 64px 56px;
  border-radius: 30px;
  backdrop-filter: blur(20px);
  text-align: center;
  max-width: 620px;
  width: 90%;
}

.contact-logo {
  width: 180px;
  height: auto;
  margin: 0 auto 20px;
  display: block;
  filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.25));
}

.contact-link {
  display: block;
  margin-top: 24px;
  font-size: 1.2rem;
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,0.5);
  padding-bottom: 4px;
  width: fit-content;
  margin: 0 auto;
}

footer {
  position: absolute;
  bottom: 20px;
  width: 100%;
  text-align: center;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
}

.footer-links {
  margin-bottom: 8px;
  display: flex;
  gap: 16px;
  justify-content: center;
  font-size: 0.85rem;
}

.footer-links a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.4);
  padding-bottom: 2px;
}

/* === 动画定义 === */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0% {
    opacity: 0.4;
    transform: scale(1) translateX(-50%);
  }
  50% {
    opacity: 1;
    transform: scale(1.1) translateX(-50%);
  }
  100% {
    opacity: 0.4;
    transform: scale(1) translateX(-50%);
  }
}

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

/* === 移动端适配 === */
@media (max-width: 768px) {
  .brand-title {
    font-size: 3rem;
  }
  .process-container {
    flex-direction: column;
    gap: 24px;
  }
  .memory-card {
    width: 72vw;
    max-width: 72vw;
  }
  .scroll-down-btn {
    bottom: 20px;
  }
  .scroll-up-btn {
    top: 20px;
  }
}
