/* ===== 足迹相册样式 ===== */

/* 页面头部 */
.gallery-header {
  text-align: center;
  padding: var(--space-10) 0;
  margin-bottom: var(--space-8);
}

.gallery-header .page-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-2);
  letter-spacing: 8px;
}

.gallery-header .page-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  font-style: italic;
}

/* 相册容器 */
.gallery-container {
  max-width: 920px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

/* 相册网格 - 瀑布流布局 */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--space-8);
  padding-bottom: var(--space-10);
}

/* 相册项 */
.gallery-item {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--duration-normal) var(--ease-out);
  cursor: pointer;
}

.gallery-item:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

/* 图片包装器 */
.gallery-image-wrapper {
  position: relative;
  width: 100%;
  padding-top: 75%; /* 4:3 比例 */
  overflow: hidden;
  background: linear-gradient(135deg, var(--morandi-3) 0%, var(--morandi-4) 100%);
}

.gallery-image-wrapper img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-slow) var(--ease-out);
}

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

/* 图片信息 */
.gallery-info {
  padding: var(--space-5);
}

.gallery-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-1);
}

.gallery-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-4);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.gallery-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-tertiary);
}

.gallery-date::before {
  content: '📅 ';
}

.gallery-location::before {
  content: '📍 ';
}

/* 空状态 */
.gallery-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: var(--space-10);
  color: var(--text-secondary);
  font-size: 1.1rem;
}

/* ===== Lightbox 模态框 ===== */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all var(--duration-normal) var(--ease-out);
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox img {
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-caption {
  text-align: center;
  color: white;
  margin-top: var(--space-5);
  max-width: 600px;
}

.lightbox-caption h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: var(--space-2);
}

.lightbox-caption p {
  font-size: 1rem;
  line-height: 1.6;
  opacity: 0.9;
  margin-bottom: var(--space-2);
}

.lightbox-date {
  font-size: 0.9rem;
  opacity: 0.7;
}

/* Lightbox 控制按钮 */
.lightbox-close {
  position: absolute;
  top: -50px;
  right: 0;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(90deg);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lightbox-prev {
  left: -80px;
}

.lightbox-next {
  right: -80px;
}

/* ===== 响应式设计 ===== */
@media (max-width: 1024px) {
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-6);
  }
  
  .lightbox-prev {
    left: 20px;
  }
  
  .lightbox-next {
    right: 20px;
  }
}

@media (max-width: 768px) {
  .gallery-header .page-title {
    font-size: 2rem;
    letter-spacing: 4px;
  }
  
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: var(--space-4);
  }
  
  .gallery-info {
    padding: var(--space-4);
  }
  
  .lightbox-nav {
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
  }
  
  .lightbox-prev {
    left: 10px;
  }
  
  .lightbox-next {
    right: 10px;
  }
  
  .lightbox-caption h3 {
    font-size: 1.2rem;
  }
  
  .lightbox-caption p {
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }
  
  .gallery-header .page-title {
    font-size: 1.8rem;
  }
  
  .gallery-container {
    padding: 0 var(--space-4);
  }
}

/* ===== 上传提示样式 ===== */
.upload-hint {
  background: linear-gradient(135deg, rgba(139, 157, 195, 0.1) 0%, rgba(196, 164, 164, 0.1) 100%);
  border: 2px dashed var(--morandi-1);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  text-align: center;
  margin-bottom: var(--space-6);
}

.upload-hint h3 {
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}

.upload-hint p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: var(--space-4);
}

.upload-hint code {
  background: rgba(139, 157, 195, 0.1);
  padding: 2px 8px;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
  color: var(--morandi-blue);
}
