/* 自定义样式 - 补充Tailwind CSS */
:root {
  --morandi-pink: #E8B4B8;
  --morandi-blue: #A8B2C1;
  --morandi-green: #B5C99A;
  --cream-white: #FAF7F0;
  --oatmeal: #E6E2D3;
  --light-gray: #F5F5F5;
}

/* 全局样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", "Source Han Sans SC", "Helvetica Neue Light", Helvetica, Arial, sans-serif;
  font-weight: 300;
  line-height: 1.6;
  color: #333;
  background-color: var(--cream-white);
}

/* 字体样式 */
.font-serif-title {
  font-family: "Songti SC", "Times New Roman", serif;
  font-weight: 400;
}

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

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

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

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

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

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

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

/* 模态框样式 */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  animation: fadeIn 0.3s ease;
}

.modal.active {
  display: flex;
}

.modal-content {
  max-width: 90%;
  max-height: 90%;
  position: relative;
  animation: slideUp 0.3s ease;
}

.modal-content img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
}

.modal-close {
  position: absolute;
  top: -40px;
  right: 0;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  transition: opacity 0.3s ease;
}

.modal-close:hover {
  opacity: 0.7;
}

/* 导航栏样式 */
.nav-link {
  position: relative;
  transition: color 0.3s ease;
}

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

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

/* 动画效果 */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

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

/* 风格页面布局 */
.style-section {
  display: flex;
  align-items: center;
  gap: 4rem;
  margin-bottom: 8rem;
}

.style-section:nth-child(even) {
  flex-direction: row-reverse;
}

.style-image {
  flex: 1;
  overflow: hidden;
}

.style-content {
  flex: 1;
  padding: 2rem;
}

/* 故事页面背景 */
.story-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
}

.story-background::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(250, 247, 240, 0.8), rgba(230, 226, 211, 0.8));
  z-index: 1;
}

.story-background img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: float 6s ease-in-out infinite;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .style-section {
    flex-direction: column;
    gap: 2rem;
  }
  
  .style-section:nth-child(even) {
    flex-direction: column;
  }
  
  .modal-content {
    max-width: 95%;
    max-height: 95%;
  }
}

/* 页脚样式 */
.footer {
  text-align: center;
  padding: 2rem 0;
  color: #666;
  font-size: 0.875rem;
  letter-spacing: 0.05em;
}

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

::-webkit-scrollbar-track {
  background: var(--cream-white);
}

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

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