@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;700&display=swap');

@layer base {
  * {
    box-sizing: border-box;
  }

  html {
    scroll-behavior: smooth;
  }

  body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 400;
    line-height: 1.6;
    color: #1a1a1a;
    background-color: #fafafa;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }

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

  ::-webkit-scrollbar-track {
    background: #f1f1f1;
  }

  ::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
  }

  ::-webkit-scrollbar-thumb:hover {
    background: #555;
  }
}

@layer components {
  /* 导航栏样式 */
  .nav-fixed {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  }

  /* 英雄区域 */
  .hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background-color: #f5f5f5;
  }

  .hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
  }

  .hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.5) 100%);
    z-index: 2;
  }

  .hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    color: white;
    padding: 2rem;
  }

  /* 品牌标语 */
  .brand-tagline {
    font-size: 3rem;
    font-weight: 300;
    letter-spacing: 0.1em;
    margin: 2rem 0;
    animation: fadeInUp 1s ease-out;
  }

  /* 精选系列卡片 */
  .collection-card {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
  }

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

  .collection-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
  }

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

  /* 分类筛选标签 */
  .filter-tag {
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    border: 1px solid #d1d5db;
    background-color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
  }

  .filter-tag:hover,
  .filter-tag.active {
    background-color: #1a1a1a;
    color: white;
    border-color: #1a1a1a;
  }

  /* 瀑布流容器 */
  .masonry-grid {
    column-count: 3;
    column-gap: 1.5rem;
  }

  .masonry-item {
    break-inside: avoid;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    overflow: hidden;
    background: white;
    transition: transform 0.3s ease;
  }

  .masonry-item:hover {
    transform: translateY(-5px);
  }

  .masonry-item img {
    width: 100%;
    height: auto;
    display: block;
  }

  /* 故事专题卡片 */
  .story-card {
    border-radius: 12px;
    overflow: hidden;
    background: white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
  }

  .story-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  }

  /* 细节特写 */
  .detail-image {
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    cursor: zoom-in;
  }

  .detail-image img {
    width: 100%;
    height: auto;
    transition: transform 0.3s ease;
  }

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

  /* 工艺步骤 */
  .process-step {
    text-align: center;
    padding: 2rem;
  }

  .process-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
  }

  /* 空间环境图 */
  .space-image {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  }

  /* 页脚 */
  .footer {
    background-color: #1a1a1a;
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
  }

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

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

  .fade-in {
    animation: fadeIn 0.6s ease-out;
  }

  /* 响应式设计 */
  @media (max-width: 1024px) {
    .masonry-grid {
      column-count: 2;
    }
  }

  @media (max-width: 768px) {
    .brand-tagline {
      font-size: 2rem;
    }

    .masonry-grid {
      column-count: 1;
    }

    .hero-content {
      padding: 1rem;
    }
  }
}