/* 全局样式 */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 8px;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  background: #f8f9fa;
  color: #333;
  overflow-x: hidden;
  line-height: 1.6;
  padding-bottom: 30px;
}

/* 顶部栏 */
.floating-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.9);
  padding: 15px 25px;
  z-index: 1000;
  transition: transform 0.4s ease;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.floating-header.hidden {
  transform: translateY(-100%);
}

.category-info {
  font-size: 0.95rem;
  color: #7f8c8d;
  text-align: center;
}

.toggle-wrap {
  position: absolute;
  right: 25px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* 基础布局 */
#image-container {
  margin-top: 80px;
}

#image-container img {
  max-width: 100%;
  margin: 0 4px 0 0;
}

/* 瀑布流布局 */
.waterfall-mode #image-container {
  column-count: 5;
  column-gap: 8px;
  width: 100%;
  margin-top: 80px;
}

@media (max-width: 1600px) {
  .waterfall-mode #image-container {
    column-count: 4;
  }
}

@media (max-width: 1200px) {
  .waterfall-mode #image-container {
    column-count: 3;
  }
}

@media (max-width: 800px) {
  .waterfall-mode #image-container {
    column-count: 2;
  }
}

@media (max-width: 500px) {
  .waterfall-mode #image-container {
    column-count: 1;
  }
}

.waterfall-mode #image-container img {
  width: 100% !important;
  max-width: none !important;
  display: block;
  break-inside: avoid;
  margin-bottom: 8px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  background: #fff;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.waterfall-mode #image-container img:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

/* 进度条 */
.progress {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: rgba(0, 0, 0, 0.1);
  z-index: 1000;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #4facfe, #00f2fe);
  transition: width 0.4s ease;
}

/* 组别 */
.group-indicator {
  position: fixed;
  bottom: 15px;
  right: 15px;
  background: rgba(255, 255, 255, 0.9);
  padding: 8px 15px;
  border-radius: 20px;
  font-size: 0.9rem;
  color: #2c3e50;
  z-index: 1000;
  backdrop-filter: blur(5px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

/* 提示 */
.hint {
  position: fixed;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.9);
  padding: 8px 15px;
  border-radius: 20px;
  font-size: 0.9rem;
  color: #2c3e50;
  z-index: 1000;
  backdrop-filter: blur(5px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  opacity: 0.9;
  transition: opacity 3s ease;
}

.hint.fade {
  opacity: 0;
}