/* 色彩系统变量 */
:root {
  --primary-cream: #FAF7F2;
  --primary-gray: #F5F5F5;
  --primary-oat: #E8E0D5;
  --accent-pink: #D4A5A5;
  --accent-blue: #A8B2C1;
  --text-dark: #333333;
  --text-light: #666666;
  --text-lighter: #999999;
}

/* 字体设置 */
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@300;400;500;600&family=Playfair+Display:ital,wght@0,400;0,500;1,400&display=swap');

body {
  font-family: 'Noto Serif SC', 'Playfair Display', serif;
  background-color: var(--primary-cream);
  color: var(--text-dark);
  line-height: 1.6;
}

/* 图片悬停效果 */
.image-hover {
  overflow: hidden;
  transition: all 0.3s ease;
}

.image-hover img {
  transition: transform 0.5s ease;
}

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

/* 淡入动画 */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  animation: fadeIn 0.8s ease forwards;
}

/* 延迟淡入 */
.fade-in-delay-1 { animation-delay: 0.2s; opacity: 0; }
.fade-in-delay-2 { animation-delay: 0.4s; opacity: 0; }
.fade-in-delay-3 { animation-delay: 0.6s; opacity: 0; }

/* 滚动触发淡入 */
.scroll-fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.scroll-fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* 导航栏样式 */
.navbar {
  background-color: rgba(250, 247, 242, 0.95);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.navbar.scrolled {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* 链接悬停效果 */
.link-hover {
  position: relative;
  transition: color 0.3s ease;
}

.link-hover::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--accent-pink);
  transition: width 0.3s ease;
}

.link-hover:hover::after {
  width: 100%;
}

/* 按钮样式 */
.btn-primary {
  background-color: var(--primary-oat);
  color: var(--text-dark);
  padding: 12px 32px;
  border: none;
  transition: all 0.3s ease;
  cursor: pointer;
}

.btn-primary:hover {
  background-color: var(--accent-pink);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(212, 165, 165, 0.3);
}

/* 卡片样式 */
.card {
  background-color: white;
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  transform: translateY(-4px);
}

/* 标签样式 */
.tag {
  display: inline-block;
  padding: 4px 12px;
  background-color: var(--primary-gray);
  color: var(--text-light);
  border-radius: 16px;
  font-size: 14px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.tag:hover,
.tag.active {
  background-color: var(--accent-pink);
  color: white;
}

/* 页脚样式 */
footer {
  background-color: var(--primary-gray);
  color: var(--text-lighter);
  font-size: 12px;
  text-align: center;
  padding: 20px;
}

/* 响应式字体大小 */
@media (max-width: 768px) {
  body {
    font-size: 14px;
  }
  
  h1 { font-size: 28px; }
  h2 { font-size: 24px; }
  h3 { font-size: 20px; }
}

/* 瀑布流布局 */
.masonry {
  column-count: 4;
  column-gap: 20px;
}

@media (max-width: 1200px) {
  .masonry { column-count: 3; }
}

@media (max-width: 768px) {
  .masonry { column-count: 2; }
}

@media (max-width: 480px) {
  .masonry { column-count: 1; }
}

.masonry-item {
  break-inside: avoid;
  margin-bottom: 20px;
}

/* 轮播图样式 */
.carousel-container {
  position: relative;
  overflow: hidden;
  height: 100vh;
}

.carousel-slide {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.carousel-slide.active {
  opacity: 1;
}

/* 详情页图片切换器 */
.image-gallery {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.thumbnail {
  width: 80px;
  height: 80px;
  object-fit: cover;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.3s ease;
}

.thumbnail:hover,
.thumbnail.active {
  border-color: var(--accent-pink);
}

/* 系法步骤 */
.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background-color: var(--accent-pink);
  color: white;
  border-radius: 50%;
  font-size: 12px;
  margin-right: 8px;
}

/* 搭配卡片 */
.style-card {
  position: relative;
  overflow: hidden;
}

.style-card::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60%;
  background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.style-card:hover::before {
  opacity: 1;
}

.style-card .caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px;
  color: white;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.style-card:hover .caption {
  transform: translateY(0);
}

/* 加载动画 */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--primary-gray);
  border-top-color: var(--accent-pink);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* 自定义滚动条 */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--primary-gray);
}

::-webkit-scrollbar-thumb {
  background: var(--primary-oat);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-pink);
}