/* 自定义样式增强 - 不污染Tailwind */
:root {
  --primary-beige: #f5f5f0;
  --soft-gray: #e8e8e3;
  --warm-oat: #f0ede5;
  --text-dark: #2a2a2a;
  --text-light: #666;
}

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

/* 全局字体和背景 */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: var(--primary-beige);
  color: var(--text-dark);
  line-height: 1.6;
}

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

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

/* 图片悬停效果 */
.img-hover {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.img-hover:hover {
  transform: scale(1.02);
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* 灯箱样式 */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.9);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.lightbox.active {
  display: flex;
}

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

.lightbox-close {
  position: absolute;
  top: 30px;
  right: 40px;
  color: #fff;
  font-size: 40px;
  cursor: pointer;
  transition: opacity 0.3s ease;
}

.lightbox-close:hover {
  opacity: 0.7;
}

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

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

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

/* 卡片悬浮效果 */
.card-hover {
  transition: all 0.3s ease;
  background: white;
}

.card-hover:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0,0,0,0.08);
}

/* 响应式网格 */
.responsive-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* 英雄区全屏 */
.hero-fullscreen {
  min-height: 100vh;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 材质故事特殊布局 */
.material-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 3rem;
}

/* 系法步骤布局 */
.step-layout {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

@media (min-width: 768px) {
  .step-layout {
    flex-direction: row;
    align-items: center;
  }
  
  .step-layout:nth-child(even) {
    flex-direction: row-reverse;
  }
}

/* 页脚样式 */
.footer {
  background: var(--soft-gray);
  padding: 2rem 0;
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-light);
}

/* 加载动画 */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--soft-gray);
  border-radius: 50%;
  border-top-color: var(--text-dark);
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* 标题样式 */
.section-title {
  font-size: 2.5rem;
  font-weight: 300;
  letter-spacing: 2px;
  margin-bottom: 3rem;
  text-align: center;
}

@media (max-width: 768px) {
  .section-title {
    font-size: 1.8rem;
  }
}

/* 描述文字样式 */
.description-text {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-light);
  max-width: 800px;
  margin: 0 auto;
}