/* 自定义CSS样式文件 - 补充Tailwind.css未覆盖的样式 */

/* 全局字体设置 */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500&display=swap');

:root {
  --primary-gray: #333333;
  --light-gray: #F5F5F5;
  --border-gray: #E8E8E8;
  --medium-gray: #A0A0A0;
  --accent-beige: #C9A87D;
  --footer-gray: #666666;
}

body {
  font-family: 'Noto Sans SC', 'Helvetica Neue', Arial, sans-serif;
  color: var(--primary-gray);
  background-color: #FFFFFF;
}

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

/* 导航栏样式 */
.nav-link {
  position: relative;
  transition: color 0.3s ease;
}

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

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

/* 轮播图样式 */
.carousel-container {
  position: relative;
  overflow: hidden;
}

.carousel-slide {
  transition: opacity 1s ease-in-out;
}

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

.carousel-slide:not(.active) {
  opacity: 0;
  position: absolute;
  top: 0;
  left: 0;
}

/* 编辑推荐悬停效果 */
.editor-item {
  overflow: hidden;
  position: relative;
}

.editor-item img {
  transition: transform 0.5s ease;
}

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

.editor-item .overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.editor-item:hover .overlay {
  opacity: 1;
}

/* 横向滚动容器 */
.horizontal-scroll {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.horizontal-scroll::-webkit-scrollbar {
  display: none;
}

.horizontal-scroll > * {
  scroll-snap-align: start;
  flex-shrink: 0;
}

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

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

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

/* 灵感集拼贴画样式 */
.collage-item {
  position: absolute;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.collage-item:hover {
  transform: scale(1.02);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  z-index: 10;
}

/* 灯箱效果 */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 9999;
  animation: fadeIn 0.3s ease;
}

.lightbox.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
}

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

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

/* 动画类 */
.animate-fade-in {
  animation: fadeIn 0.8s ease;
}

.animate-slide-up {
  animation: slideUp 0.6s ease;
}

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

@media (max-width: 768px) {
  .masonry-grid {
    column-count: 1;
  }
  
  .horizontal-scroll {
    gap: 1rem;
  }
  
  .collage-item {
    position: relative !important;
    width: 100% !important;
    height: auto !important;
    margin-bottom: 1rem;
  }
}

/* 按钮样式 */
.btn-primary {
  background: transparent;
  border: 1px solid var(--primary-gray);
  padding: 0.75rem 2rem;
  transition: all 0.3s ease;
  cursor: pointer;
}

.btn-primary:hover {
  background: var(--primary-gray);
  color: white;
}

/* 文章卡片样式 */
.article-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* 标签样式 */
.tag {
  background: var(--light-gray);
  padding: 0.25rem 0.75rem;
  font-size: 0.875rem;
  color: var(--medium-gray);
}