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

body {
  font-family: 'Inter', sans-serif;
  background: #ffffff;
  color: #333;
  overflow-x: hidden;
}

/* Justified Gallery 容器 */
#gallery {
  width: 100%;
  margin: 0 auto;
  padding: 40px 0 120px;
}

/* 图片链接样式 */
#gallery a {
  cursor: pointer;
  transition: opacity 0.3s ease;

  display: block;
  padding: 0 10px 20px;
  box-sizing: border-box;
}

#gallery a:hover {
  opacity: 0.85;
}

/* 翻页按钮 */
.pagination {
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.pagination.show {
  opacity: 1;
  pointer-events: auto;
}

.page-btn {
  background: transparent;
  border: none;
  color: #ccc;
  font-size: 2rem;
  cursor: pointer;
  padding: 10px 20px;
  transition: all 0.2s;
  font-family: Arial, sans-serif;
}

.page-btn:hover:not(:disabled) {
  color: #666;
  transform: scale(1.1);
}

.page-btn:disabled {
  opacity: 0.2;
  cursor: not-allowed;
}

/* 版权信息 */
.copyright {
  position: fixed;
  bottom: 20px;
  right: 30px;
  z-index: 101;
  font-size: 0.75rem;
  font-weight: 300;
}

.copyright a {
  color: #999;
  text-decoration: none;
  transition: color 0.2s;
}

.copyright a:hover {
  color: #666;
}

/* 加载动画 */
.loading {
  display: none;
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 102;
}

.loading.show {
  display: block;
}

.spinner {
  border: 2px solid rgba(0, 0, 0, 0.1);
  border-top: 2px solid #333;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  animation: spin 1s linear infinite;
}

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

/* ============ 详情页样式 ============ */

.detail-page {
  background: #fff;
}

.detail-layout {
  display: flex;
  min-height: 100vh;
  background: #fff;
}

.detail-images {
  width: 70%;
  overflow-y: auto;
  padding: 60px;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.detail-images img {
  width: 100%;
  max-width: 100%;
  max-height: 80vh;
  height: auto;
  display: block;
  object-fit: contain;
}

.detail-info {
  width: 30%;
  padding: 60px 50px;
  position: relative;
  overflow-y: auto;
  background: #fff;
}

.close-btn {
  position: absolute;
  top: 30px;
  right: 30px;
  background: transparent;
  border: none;
  font-size: 1.5rem;
  color: #ccc;
  cursor: pointer;
  padding: 5px 10px;
  transition: color 0.2s;
}

.close-btn:hover {
  color: #666;
}

.detail-date {
  font-size: 1.1rem;
  font-weight: 500;
  color: #000;
  margin-bottom: 25px;
  letter-spacing: 0.02em;
}

.detail-description {
  font-size: 0.9rem;
  font-weight: 300;
  color: #666;
  line-height: 1.8;
  white-space: pre-wrap;
}

/* 响应式 */
@media (max-width: 768px) {
  #gallery {
    padding: 20px 10px 100px;
  }
  
  /* 手机端详情页 */
  body.detail-page {
    overflow-y: auto;
    height: auto;
  }
  
  .detail-layout {
    flex-direction: column;
    height: auto;
    min-height: 100vh;
  }
  
  .detail-images {
    width: 100%;
    height: auto;
    padding: 70px 15px 30px;
    overflow-y: visible;
    position: relative;
  }
  
  .detail-images img {
    margin-bottom: 30px;
  }
  
  .detail-info {
    width: 100%;
    height: auto;
    padding: 20px 15px 80px;
    overflow-y: visible;
    position: relative;
  }
  
  .close-btn {
    position: fixed;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
  }
}