/* 全局重置与基础设置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* 浅色主题 - 首页/图集 */
  --bg-light: #faf9f6;
  --text-primary: #333;
  --text-secondary: #666;
  --accent: #c9b0a1;
  --card-bg: #fff;
  --border-color: #eaeaea;

  /* 深色主题 - 设计赏析 */
  --bg-dark: #1a1f25;
  --text-light: #f0f0f0;
  --card-dark: #252a30;

  /* 布局 */
  --container-padding: 2rem;
  --gap-md: 1.5rem;
  --gap-lg: 2.5rem;
  --border-radius: 8px;
  --transition: all 0.3s ease;
}

body {
  font-family: "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-light);
  transition: var(--transition);
}

/* 通用容器 */
.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

/* 导航栏 */
.nav {
  display: flex;
  justify-content: center;
  gap: 2rem;
  padding: 1.5rem 0;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav a {
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius);
  transition: var(--transition);
}

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

/* 页脚 */
.footer {
  text-align: center;
  padding: 2rem 0;
  color: #999;
  font-size: 14px;
  margin-top: 3rem;
}

/* 首页样式 */
.hero {
  position: relative;
  height: 100vh;
  overflow: hidden;
}

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

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

.hero-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: white;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  max-width: 800px;
  padding: 0 1rem;
}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  font-weight: 300;
}

.hero p {
  font-size: 1.2rem;
  opacity: 0.9;
}

.intro {
  padding: 4rem 0;
  text-align: center;
}

.intro h2 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  font-weight: 300;
}

.intro p {
  max-width: 700px;
  margin: 0 auto 2rem;
  color: var(--text-secondary);
  font-size: 1.1rem;
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--gap-lg);
  padding: 2rem 0 4rem;
}

.feature-card {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: var(--transition);
}

.feature-card:hover {
  transform: translateY(-5px);
}

.feature-img {
  width: 100%;
  height: 300px;
  object-fit: cover;
}

.feature-title {
  padding: 1.5rem;
  font-size: 1.3rem;
  text-align: center;
  color: var(--text-primary);
}

/* 设计赏析页面 */
.page-dark {
  background-color: var(--bg-dark);
  color: var(--text-light);
}

.design-header {
  padding: 4rem 0 2rem;
  text-align: center;
}

.design-header h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  font-weight: 300;
}

.design-header p {
  max-width: 700px;
  margin: 0 auto;
  opacity: 0.8;
}

.design-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--gap-md);
  padding: 2rem 0 4rem;
}

.design-item {
  background: var(--card-dark);
  border-radius: var(--border-radius);
  overflow: hidden;
  transition: var(--transition);
}

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

.design-img {
  width: 100%;
  height: 250px;
  object-fit: cover;
}

.design-content {
  padding: 1.5rem;
}

.design-title {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.design-desc {
  font-size: 0.95rem;
  opacity: 0.8;
}

/* 风格图集页面 */
.gallery-header {
  padding: 4rem 0 2rem;
  text-align: center;
}

.gallery-header h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  font-weight: 300;
}

.gallery-header p {
  max-width: 700px;
  margin: 0 auto;
  color: var(--text-secondary);
}

.filter-nav {
  display: flex;
  justify-content: center;
  gap: 1rem;
  padding: 1rem 0 2rem;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 0.5rem 1.5rem;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.95rem;
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.gallery {
  column-count: 3;
  column-gap: 1.5rem;
  padding: 2rem 0 4rem;
}

.gallery-item {
  break-inside: avoid;
  margin-bottom: 1.5rem;
  position: relative;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.gallery-img {
  width: 100%;
  display: block;
  transition: var(--transition);
}

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

.gallery-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 1rem;
  transform: translateY(100%);
  transition: var(--transition);
}

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

/* 响应式设计 */
@media (max-width: 1024px) {
  .hero h1 {
    font-size: 2.8rem;
  }
  
  .gallery {
    column-count: 2;
  }
}

@media (max-width: 768px) {
  :root {
    --container-padding: 1.5rem;
  }
  
  .nav {
    gap: 1rem;
    padding: 1rem 0;
  }
  
  .hero h1 {
    font-size: 2.2rem;
  }
  
  .hero p {
    font-size: 1rem;
  }
  
  .intro h2 {
    font-size: 2rem;
  }
  
  .gallery {
    column-count: 1;
  }
  
  .filter-nav {
    gap: 0.5rem;
  }
  
  .filter-btn {
    padding: 0.4rem 1rem;
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  :root {
    --container-padding: 1rem;
  }
  
  .hero h1 {
    font-size: 1.8rem;
  }
  
  .intro h2 {
    font-size: 1.8rem;
  }
  
  .features {
    grid-template-columns: 1fr;
  }
}