/* 时尚意境展示馆 - 全局样式文件 */

/* 设计令牌 */
:root {
  --primary-color: #f5f5f0;
  --secondary-color: #e8e8e3;
  --accent-sage: #7a8a7a;
  --accent-navy: #3d4a5d;
  --accent-rose: #d9b5b5;
  --text-dark: #2a2a2a;
  --text-light: #666;
  --border-radius: 8px;
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--primary-color);
}

/* 导航栏样式 */
header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
}

nav ul {
  display: flex;
  justify-content: center;
  align-items: center;
  list-style: none;
  padding: 1.5rem 2rem;
  gap: 3rem;
}

nav a {
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 300;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  transition: var(--transition-smooth);
  position: relative;
}

nav a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent-sage);
  transition: width 0.3s ease;
}

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

/* 主内容区域 */
main {
  margin-top: 80px;
  min-height: calc(100vh - 120px);
}

/* 轮播图样式 */
.hero {
  position: relative;
  height: 85vh;
  overflow: hidden;
  margin-bottom: 4rem;
}

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

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

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

/* 卡片样式 */
.card {
  background: white;
  border-radius: var(--border-radius);
  overflow: hidden;
  transition: var(--transition-smooth);
  cursor: pointer;
}

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

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

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

/* 精选风格卡片 */
.style-card {
  background: white;
  border-radius: var(--border-radius);
  padding: 2rem;
  text-align: center;
  transition: var(--transition-smooth);
  cursor: pointer;
  border: 1px solid var(--secondary-color);
}

.style-card:hover {
  border-color: var(--accent-sage);
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(122, 138, 122, 0.1);
}

.style-card h3 {
  color: var(--text-dark);
  font-weight: 400;
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
}

.style-card p {
  color: var(--text-light);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* 网格布局 */
.grid {
  display: grid;
  gap: 1.5rem;
  padding: 0 2rem;
}

.grid-cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-cols-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* 瀑布流布局 */
.masonry {
  column-count: 4;
  column-gap: 1.5rem;
  padding: 0 2rem;
}

.masonry-item {
  break-inside: avoid;
  margin-bottom: 1.5rem;
}

/* 模态框样式 */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 2000;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal.active {
  display: flex;
  opacity: 1;
}

.modal-content {
  background: white;
  border-radius: var(--border-radius);
  max-width: 800px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2rem;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-light);
  transition: color 0.3s ease;
}

.modal-close:hover {
  color: var(--text-dark);
}

/* 文章列表样式 */
.article-card {
  background: white;
  border-radius: var(--border-radius);
  overflow: hidden;
  transition: var(--transition-smooth);
  cursor: pointer;
  margin-bottom: 2rem;
}

.article-card:hover {
  transform: translateX(10px);
  box-shadow: -10px 10px 30px rgba(0, 0, 0, 0.1);
}

.article-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.article-content {
  padding: 1.5rem;
}

.article-content h3 {
  color: var(--text-dark);
  font-weight: 400;
  margin-bottom: 0.75rem;
  font-size: 1.1rem;
}

.article-content p {
  color: var(--text-light);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.read-more {
  color: var(--accent-sage);
  text-decoration: none;
  font-size: 0.9rem;
  display: inline-block;
  transition: color 0.3s ease;
}

.read-more:hover {
  color: var(--accent-navy);
}

/* 按钮样式 */
.btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  background: var(--accent-sage);
  color: white;
  text-decoration: none;
  border-radius: var(--border-radius);
  transition: var(--transition-smooth);
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
}

.btn:hover {
  background: var(--accent-navy);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(61, 74, 93, 0.2);
}

/* 标签样式 */
.tag {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  background: var(--secondary-color);
  color: var(--text-dark);
  border-radius: 20px;
  font-size: 0.8rem;
  margin: 0.25rem;
  transition: var(--transition-smooth);
  cursor: pointer;
}

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

/* 页脚样式 */
footer {
  text-align: center;
  padding: 2rem;
  background: white;
  border-top: 1px solid var(--secondary-color);
  margin-top: 4rem;
}

footer p {
  color: var(--text-light);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
}

/* 响应式设计 */
@media (max-width: 1024px) {
  .masonry {
    column-count: 3;
  }
  
  .grid-cols-4 {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  nav ul {
    gap: 1.5rem;
    padding: 1rem;
  }
  
  nav a {
    font-size: 0.85rem;
  }
  
  .hero {
    height: 60vh;
  }
  
  .masonry {
    column-count: 2;
    padding: 0 1rem;
  }
  
  .grid {
    padding: 0 1rem;
  }
  
  .grid-cols-3,
  .grid-cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .modal-content {
    padding: 1.5rem;
  }
}

@media (max-width: 480px) {
  nav ul {
    gap: 1rem;
    padding: 0.75rem;
  }
  
  nav a {
    font-size: 0.8rem;
  }
  
  .hero {
    height: 50vh;
  }
  
  .masonry {
    column-count: 1;
  }
  
  .grid-cols-2,
  .grid-cols-3,
  .grid-cols-4 {
    grid-template-columns: 1fr;
  }
  
  .style-card {
    padding: 1.5rem;
  }
  
  .article-content {
    padding: 1rem;
  }
}

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

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

/* 懒加载动画 */
.lazy-load {
  opacity: 0;
  transition: opacity 0.5s ease;
}

.lazy-load.loaded {
  opacity: 1;
}

/* 滚动条样式 */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--secondary-color);
}

::-webkit-scrollbar-thumb {
  background: var(--accent-sage);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-navy);
}