/* 
 * 全局样式文件 - Fashion Showcase
 * 遵循极简主义、高级感视觉规范
 * 核心技术：CSS Variables, Flexbox, Grid, CSS Animations
 */

:root {
  /* 色彩系统 - 象牙白/浅灰/淡米色系 */
  --color-bg-body: #F9F9F7;
  --color-bg-secondary: #F0F0EE;
  --color-text-primary: #2C2C2C;
  --color-text-secondary: #595959;
  --color-text-light: #8C8C8C;
  --color-accent: #D1D1CD;
  --color-overlay: rgba(0, 0, 0, 0.4);
  
  /* 排版系统 - 细瘦非衬线体 */
  --font-family-base: "Noto Sans SC", "PingFang SC", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-weight-light: 300;
  --font-weight-regular: 400;
  
  /* 间距与尺寸 */
  --nav-height: 60px;
  --spacing-unit: 8px;
  --container-max-width: 1440px;
  
  /* 动效参数 - 缓入缓出 */
  --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* =========================================
   Reset & Base
   ========================================= */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-family-base);
  background-color: var(--color-bg-body);
  color: var(--color-text-primary);
  font-weight: var(--font-weight-light);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-base);
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
  object-fit: cover;
}

/* 页面过渡动画容器 */
main {
  flex: 1;
  width: 100%;
  position: relative;
  opacity: 0;
  animation: pageFadeIn 0.8s ease-out forwards;
}

/* 动态槽位预留 */
.slot-container {
  width: 100%;
  display: contents;
}

/* =========================================
   Navigation (Fixed Top)
   ========================================= */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 40px;
  z-index: 1000;
  background: rgba(249, 249, 247, 0.95);
  backdrop-filter: blur(5px);
  border-bottom: 1px solid rgba(0,0,0,0.02);
  transition: transform 0.3s ease;
}

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

.nav-item {
  font-size: 14px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--color-text-secondary);
  position: relative;
  padding-bottom: 2px;
}

.nav-item::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--color-text-primary);
  transition: var(--transition-base);
}

.nav-item:hover::after,
.nav-item.active::after {
  width: 100%;
}

.nav-item.active {
  color: var(--color-text-primary);
}

.menu-icon {
  width: 24px;
  height: 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
}

.menu-line {
  width: 100%;
  height: 1px;
  background-color: var(--color-text-primary);
  transition: var(--transition-base);
}

.menu-icon:hover .menu-line:first-child {
  transform: translateX(4px);
}

/* =========================================
   Home Page: Gaze (凝视)
   ========================================= */
.carousel-container {
  position: relative;
  height: 100vh;
  width: 100%;
  overflow: hidden;
}

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

.carousel-slide.active {
  opacity: 1;
  z-index: 2;
}

.carousel-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.carousel-caption {
  position: absolute;
  bottom: 15%;
  left: 10%;
  z-index: 3;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.caption-text {
  font-size: 2rem;
  letter-spacing: 4px;
  font-weight: 200;
  opacity: 0;
  transform: translateY(20px);
  transition: var(--transition-slow);
}

.carousel-slide.active .caption-text {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.5s;
}

.dynamic-slogan {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  font-size: 1.5rem;
  letter-spacing: 6px;
  color: white;
  text-align: center;
  pointer-events: none;
  mix-blend-mode: difference;
}

.carousel-controls {
  position: absolute;
  bottom: 40px;
  right: 40px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 20px;
  color: white;
}

.progress-bar {
  width: 100px;
  height: 1px;
  background: rgba(255,255,255,0.3);
  position: relative;
}

.progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: #fff;
  width: 0%;
  transition: width 0.1s linear;
}

/* =========================================
   Wardrobe Page: Closet (衣橱)
   ========================================= */
.wardrobe-layout {
  display: flex;
  min-height: 100vh;
  padding-top: var(--nav-height);
}

/* 侧边筛选栏 */
.filter-sidebar {
  width: 80px;
  height: calc(100vh - var(--nav-height));
  position: fixed;
  left: 0;
  top: var(--nav-height);
  background: var(--color-bg-body);
  border-right: 1px solid rgba(0,0,0,0.03);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 40px;
  gap: 40px;
  z-index: 90;
  transition: width 0.3s ease;
  overflow: hidden;
}

.filter-sidebar:hover {
  width: 200px;
  background: #fff;
  box-shadow: 2px 0 20px rgba(0,0,0,0.02);
}

.filter-icon-group {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 0 28px;
  cursor: pointer;
  white-space: nowrap;
}

.filter-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  border: 1px solid var(--color-text-primary);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 10px;
  margin-right: 20px;
}

.filter-label {
  opacity: 0;
  font-size: 12px;
  letter-spacing: 2px;
  transform: translateX(-10px);
  transition: var(--transition-base);
}

.filter-sidebar:hover .filter-label {
  opacity: 1;
  transform: translateX(0);
}

/* 瀑布流画廊 */
.gallery-container {
  flex: 1;
  margin-left: 80px; /* Offset for sidebar */
  padding: 40px;
  columns: 3 300px;
  column-gap: 20px;
}

.gallery-item {
  break-inside: avoid;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
  cursor: zoom-in;
}

.gallery-item img {
  width: 100%;
  height: auto;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--color-overlay);
  opacity: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: var(--transition-base);
  color: #fff;
}

.gallery-item:hover img {
  transform: scale(1.02);
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-text {
  font-size: 14px;
  letter-spacing: 2px;
  transform: translateY(10px);
  transition: var(--transition-base);
}

.gallery-item:hover .gallery-text {
  transform: translateY(0);
}

/* Fullscreen Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #fff;
  z-index: 2000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-img {
  max-height: 90vh;
  max-width: 90vw;
  object-fit: contain;
}

/* =========================================
   Story Page: Narrative (故事)
   ========================================= */
.story-container {
  padding-top: var(--nav-height);
  width: 100%;
}

.timeline-section {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.timeline-section.visible {
  opacity: 1;
  transform: translateY(0);
}

.story-image-full {
  width: 80%;
  height: 60vh;
  object-fit: cover;
  margin-bottom: 40px;
}

.story-poem {
  text-align: center;
  font-size: 1.25rem;
  letter-spacing: 3px;
  color: var(--color-text-secondary);
  max-width: 600px;
  line-height: 2;
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 1200px;
  margin: 100px auto;
  padding: 0 40px;
}

.detail-card {
  text-align: center;
}

.detail-img {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  margin-bottom: 20px;
  filter: grayscale(20%);
}

.detail-keyword {
  font-size: 14px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--color-text-light);
}

.end-screen {
  height: 80vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #fdfdfd;
  position: relative;
  overflow: hidden;
}

/* 简单的织物飘落模拟动画背景 */
.fabric-bg {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(240,240,238,1) 0%, rgba(255,255,255,0) 70%);
  animation: drift 20s infinite linear;
  opacity: 0.5;
  pointer-events: none;
}

@keyframes drift {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* =========================================
   Footer
   ========================================= */
.site-footer {
  width: 100%;
  padding: 40px 0;
  text-align: center;
  font-size: 12px;
  color: var(--color-text-light);
  letter-spacing: 2px;
  margin-top: auto;
  background: transparent;
}

/* =========================================
   Animations
   ========================================= */
@keyframes pageFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* =========================================
   Responsive
   ========================================= */
@media (max-width: 768px) {
  .nav-links {
    display: none; /* 简化移动端处理，实际应为汉堡菜单 */
  }
  
  .site-nav {
    justify-content: center;
  }
  
  .site-nav::before {
    content: 'HAISNAP'; /* Mobile Logo placeholder */
    font-size: 14px;
    letter-spacing: 2px;
  }

  .carousel-caption {
    left: 5%;
    bottom: 20%;
  }

  .caption-text {
    font-size: 1.5rem;
  }

  .gallery-container {
    margin-left: 0;
    padding: 20px;
    columns: 1;
  }
  
  .filter-sidebar {
    display: none; /* Mobile hide filter for simplicity or change to top bar */
  }

  .details-grid {
    grid-template-columns: 1fr;
  }
  
  .story-image-full {
    width: 100%;
    height: 40vh;
  }
}