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

:root {
  --color-bg-primary: #f5f5f0;
  --color-bg-secondary: #faf9f6;
  --color-bg-sand: #e8e4dc;
  --color-text-primary: #2c2c2c;
  --color-text-secondary: #666;
  --color-accent: #3a3a3a;
  --font-primary: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  background-color: var(--color-bg-primary);
  color: var(--color-text-primary);
  line-height: 1.8;
  overflow-x: hidden;
}

/* 导航栏样式 */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(250, 249, 246, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(232, 228, 220, 0.5);
  transition: var(--transition-smooth);
}

nav .nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-accent);
  letter-spacing: 2px;
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 3rem;
  list-style: none;
}

.nav-links a {
  color: var(--color-text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  letter-spacing: 1px;
  transition: var(--transition-smooth);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-accent);
  transition: var(--transition-smooth);
}

.nav-links a:hover {
  color: var(--color-accent);
}

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

/* 汉堡菜单 */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 10px;
}

.hamburger span {
  width: 25px;
  height: 2px;
  background: var(--color-accent);
  transition: var(--transition-smooth);
}

/* 主内容区 */
main {
  margin-top: 80px;
}

/* 轮播容器 */
.hero-slider {
  position: relative;
  width: 100%;
  height: 90vh;
  overflow: hidden;
}

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

.slide.active {
  opacity: 1;
}

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

.slide-text {
  position: absolute;
  bottom: 10%;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  font-size: 2rem;
  font-weight: 300;
  letter-spacing: 3px;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
  text-align: center;
  width: 90%;
}

/* 网格展示区 */
.gallery-grid {
  max-width: 1400px;
  margin: 4rem auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.gallery-item {
  position: relative;
  aspect-ratio: 3/4;
  overflow: hidden;
  cursor: pointer;
  background: var(--color-bg-secondary);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-smooth);
}

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

.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0);
  transition: var(--transition-smooth);
}

.gallery-item:hover::after {
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

/* 风格系列页面 */
.page-title {
  text-align: center;
  font-size: 2.5rem;
  font-weight: 300;
  letter-spacing: 4px;
  color: var(--color-accent);
  margin: 4rem 0 3rem;
}

.style-section {
  max-width: 1400px;
  margin: 0 auto 6rem;
  padding: 0 2rem;
  display: flex;
  gap: 3rem;
  align-items: center;
}

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

.style-image {
  flex: 0 0 70%;
  aspect-ratio: 4/5;
  overflow: hidden;
}

.style-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.style-content h2 {
  font-size: 2rem;
  font-weight: 400;
  letter-spacing: 2px;
  margin-bottom: 1.5rem;
  color: var(--color-accent);
}

.style-content p {
  font-size: 1rem;
  line-height: 2;
  color: var(--color-text-secondary);
  margin-bottom: 1rem;
}

.style-thumbnails {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 3rem;
}

.style-thumbnails img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  transition: var(--transition-smooth);
}

.style-thumbnails img:hover {
  transform: scale(1.03);
}

/* 细节之美页面 */
.details-container {
  max-width: 1400px;
  margin: 2rem auto;
  padding: 0 2rem;
  display: flex;
  gap: 2rem;
  min-height: 70vh;
}

.details-nav {
  flex: 0 0 200px;
  position: sticky;
  top: 100px;
  height: fit-content;
}

.details-nav ul {
  list-style: none;
}

.details-nav li {
  margin-bottom: 1.5rem;
}

.details-nav button {
  background: none;
  border: none;
  font-family: var(--font-primary);
  font-size: 1.1rem;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: var(--transition-smooth);
  letter-spacing: 1px;
}

.details-nav button:hover,
.details-nav button.active {
  color: var(--color-accent);
}

.details-content {
  flex: 1;
}

.detail-section {
  display: none;
}

.detail-section.active {
  display: block;
  animation: fadeIn 0.5s ease-in-out;
}

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

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-top: 2rem;
}

.detail-item {
  background: var(--color-bg-secondary);
  padding: 1.5rem;
}

.detail-item img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  margin-bottom: 1rem;
}

.detail-item h3 {
  font-size: 1.2rem;
  font-weight: 400;
  letter-spacing: 1px;
  margin-bottom: 0.8rem;
  color: var(--color-accent);
}

.detail-item p {
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--color-text-secondary);
}

/* 页脚 */
footer {
  text-align: center;
  padding: 3rem 2rem;
  background: var(--color-bg-sand);
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  letter-spacing: 1px;
  margin-top: 6rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 80px;
    left: -100%;
    flex-direction: column;
    background: var(--color-bg-secondary);
    width: 100%;
    padding: 2rem;
    gap: 1.5rem;
    transition: var(--transition-smooth);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  }

  .nav-links.active {
    left: 0;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .style-section,
  .style-section:nth-child(even) {
    flex-direction: column;
  }

  .style-image {
    flex: 1;
    width: 100%;
  }

  .details-container {
    flex-direction: column;
  }

  .details-nav {
    position: static;
    flex: none;
  }

  .details-nav ul {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .slide-text {
    font-size: 1.3rem;
  }

  .page-title {
    font-size: 1.8rem;
  }
}