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

:root {
  --primary-color: #1a1a1a;
  --secondary-color: #4a4a4a;
  --accent-color: #2c5f7c;
  --accent-burgundy: #722f37;
  --accent-green: #3a5a40;
  --background-light: #fafafa;
  --background-dark: #f5f5f5;
  --text-primary: #1a1a1a;
  --text-secondary: #666666;
  --border-color: #e0e0e0;
  --transition-base: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: 'Noto Sans SC', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  color: var(--text-primary);
  background-color: var(--background-light);
  line-height: 1.6;
  overflow-x: hidden;
}

/* 平滑滚动 */
html {
  scroll-behavior: smooth;
}

/* 导航栏样式 */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  transition: var(--transition-base);
}

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

.nav-link {
  position: relative;
  transition: var(--transition-base);
}

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

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

/* 英雄区域 */
.hero-section {
  height: 100vh;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  transform: scale(1.1);
  transition: transform 10s ease;
}

.hero-section:hover .hero-bg {
  transform: scale(1.2);
}

/* 主题卡片横向滚动 */
.theme-scroll {
  display: flex;
  gap: 2rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: var(--accent-color) transparent;
  padding: 2rem 0;
}

.theme-scroll::-webkit-scrollbar {
  height: 6px;
}

.theme-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.theme-scroll::-webkit-scrollbar-thumb {
  background: var(--accent-color);
  border-radius: 3px;
}

.theme-card {
  flex: 0 0 400px;
  scroll-snap-align: start;
  transition: var(--transition-base);
  position: relative;
  overflow: hidden;
}

.theme-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

/* 型录网格 */
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  padding: 2rem 0;
}

.catalog-item {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  transition: var(--transition-base);
}

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

.catalog-item .overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  padding: 2rem 1rem 1rem;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.catalog-item:hover .overlay {
  transform: translateY(0);
}

/* 灵感卡片 */
.inspiration-card {
  transition: var(--transition-base);
  cursor: pointer;
}

.inspiration-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

/* 分类标签 */
.category-tabs {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.category-tab {
  padding: 0.5rem 1.5rem;
  border: 1px solid var(--border-color);
  border-radius: 25px;
  transition: var(--transition-base);
  cursor: pointer;
  background: white;
}

.category-tab:hover,
.category-tab.active {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

/* 按钮样式 */
.btn-primary {
  display: inline-block;
  padding: 1rem 2rem;
  background: var(--primary-color);
  color: white;
  text-decoration: none;
  border-radius: 4px;
  transition: var(--transition-base);
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--accent-color);
  transition: left 0.3s ease;
  z-index: -1;
}

.btn-primary:hover::before {
  left: 0;
}

/* 页脚 */
footer {
  text-align: center;
  padding: 2rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .theme-card {
    flex: 0 0 300px;
  }
  
  .catalog-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
  }
  
  .navbar {
    padding: 1rem;
  }
  
  .hero-section {
    height: 80vh;
  }
}

@media (max-width: 480px) {
  .theme-card {
    flex: 0 0 250px;
  }
  
  .catalog-grid {
    grid-template-columns: 1fr;
  }
}

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

.fade-in-up {
  animation: fadeInUp 0.8s ease-out;
}

/* 加载状态 */
.loading {
  position: relative;
  overflow: hidden;
}

.loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
  animation: loading 1.5s infinite;
}

@keyframes loading {
  to {
    left: 100%;
  }
}