@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700&display=swap');

:root {
  --bg-primary: #FFFFFF;
  --bg-secondary: #F8F7F4;
  --text-primary: #000000;
  --text-secondary: #333333;
  --text-tertiary: #666666;
  --text-muted: #999999;
  --border-color: #E5E5E5;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-secondary);
  line-height: 1.6;
  overflow-x: hidden;
}

/* 自定义滚动条 */
::-webkit-scrollbar {
  width: 8px;
}

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

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

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

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-30px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

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

.animate-slide-in {
  animation: slideInLeft 0.6s ease-out;
}

/* 导航栏 */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  transition: all 0.3s ease;
}

.navbar.scrolled {
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

/* 轮播图 */
.carousel-container {
  position: relative;
  height: 100vh;
  overflow: hidden;
}

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

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

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

@media (max-width: 768px) {
  .masonry-grid {
    column-count: 2;
  }
}

@media (max-width: 480px) {
  .masonry-grid {
    column-count: 1;
  }
}

.masonry-item {
  break-inside: avoid;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  cursor: pointer;
}

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

.lightbox.active {
  display: flex;
}

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

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

.lightbox-close:hover {
  transform: rotate(90deg);
}

/* 卡片悬停效果 */
.card {
  transition: all 0.3s ease;
  cursor: pointer;
}

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

.card-image {
  position: relative;
  overflow: hidden;
}

.card-image img {
  transition: transform 0.5s ease;
}

.card:hover .card-image img {
  transform: scale(1.1);
}

.card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.7));
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  align-items: flex-end;
  padding: 20px;
}

.card:hover .card-overlay {
  opacity: 1;
}

/* 筛选标签 */
.filter-tag {
  padding: 8px 20px;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  background: white;
}

.filter-tag:hover,
.filter-tag.active {
  background: var(--text-primary);
  color: white;
  border-color: var(--text-primary);
}

/* 风格语录 */
.quote-section {
  background: var(--bg-secondary);
  padding: 80px 20px;
  text-align: center;
}

.quote-text {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-style: italic;
  color: var(--text-primary);
  max-width: 800px;
  margin: 0 auto;
}

/* 响应式文字大小 */
@media (max-width: 768px) {
  .quote-text {
    font-size: 1.5rem;
  }
}

/* 加载动画 */
.loading {
  display: inline-block;
  width: 30px;
  height: 30px;
  border: 3px solid var(--border-color);
  border-radius: 50%;
  border-top-color: var(--text-primary);
  animation: spin 1s linear infinite;
}

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

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

/* 标题样式 */
h1, h2, h3 {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
}

/* 链接样式 */
a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  opacity: 0.8;
}

/* 按钮样式 */
.btn {
  display: inline-block;
  padding: 12px 30px;
  background: var(--text-primary);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 14px;
  letter-spacing: 1px;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* 页脚 */
footer {
  padding: 30px 0;
  text-align: center;
  background: var(--bg-secondary);
  color: var(--text-muted);
  font-size: 14px;
}

/* 图片懒加载 */
img.lazy {
  opacity: 0;
  transition: opacity 0.5s ease;
}

img.lazy.loaded {
  opacity: 1;
}

/* 核心原则图标 */
.principle-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 15px;
  opacity: 0.8;
}

/* 响应式容器 */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

@media (max-width: 768px) {
  .container {
    padding: 0 15px;
  }
}