/* ===== 全局 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }

body {
  background: #fff;
  font-family: "Helvetica Neue", Helvetica, Arial, "Microsoft YaHei", sans-serif;
  color: #333;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a { color: #e74c3c; }
a:hover, a:focus { color: #c0392b; text-decoration: none; }

/* ===== 红白渐变顶栏 ===== */
.navbar-custom {
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 50%, #e74c3c 100%);
  border: none;
  border-radius: 0;
  margin-bottom: 0;
  box-shadow: 0 2px 8px rgba(231, 76, 60, 0.3);
}
.navbar-custom .navbar-brand,
.navbar-custom .navbar-nav > li > a {
  color: #fff !important;
  font-weight: 500;
  transition: opacity 0.2s;
}
.navbar-custom .navbar-brand:hover,
.navbar-custom .navbar-nav > li > a:hover {
  opacity: 0.85;
  color: #fff !important;
}
.navbar-custom .navbar-nav > .active > a,
.navbar-custom .navbar-nav > .active > a:hover {
  background: rgba(255,255,255,0.2);
  color: #fff !important;
}
.navbar-custom .navbar-toggle { border-color: rgba(255,255,255,0.4); }
.navbar-custom .navbar-toggle .icon-bar { background: #fff; }

/* ===== 主内容区 ===== */
.main-content {
  flex: 1;
  padding-bottom: 40px;
}

/* ===== 上传区域 ===== */
.upload-hero {
  padding: 50px 0 30px;
  text-align: center;
}
.upload-hero h2 {
  font-weight: 300;
  color: #555;
  margin-bottom: 10px;
}
.upload-hero p {
  color: #999;
  font-size: 14px;
}

.drop-zone {
  max-width: 600px;
  margin: 20px auto;
  border: 2px dashed #e0e0e0;
  border-radius: 12px;
  padding: 50px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background: #fafafa;
  position: relative;
}
.drop-zone:hover,
.drop-zone.drag-over {
  border-color: #e74c3c;
  background: #fff5f5;
}
.drop-zone i {
  color: #d0d0d0;
  transition: color 0.3s;
}
.drop-zone:hover i,
.drop-zone.drag-over i {
  color: #e74c3c;
}
.drop-zone .fa-cloud-upload { font-size: 64px; display: block; margin-bottom: 15px; }
.drop-zone h4 { color: #888; font-weight: 400; margin-bottom: 5px; }
.drop-zone p { color: #bbb; font-size: 13px; margin: 0; }
.drop-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

/* 预览区 */
.preview-area {
  max-width: 600px;
  margin: 20px auto;
  display: none;
}
.preview-area .preview-card {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.preview-area img {
  max-width: 100%;
  max-height: 300px;
  border-radius: 6px;
  object-fit: contain;
}
.preview-area .info {
  margin-top: 12px;
  color: #888;
  font-size: 13px;
}
.preview-area .info span { margin: 0 8px; }

/* 上传按钮 */
.btn-upload {
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
  color: #fff;
  border: none;
  padding: 10px 36px;
  border-radius: 25px;
  font-size: 15px;
  transition: all 0.3s;
  box-shadow: 0 3px 10px rgba(231, 76, 60, 0.35);
}
.btn-upload:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 18px rgba(231, 76, 60, 0.45);
  color: #fff;
}
.btn-upload:active { transform: translateY(0); }
.btn-upload:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-outline-red {
  color: #e74c3c;
  border: 1px solid #e74c3c;
  background: transparent;
  border-radius: 25px;
  padding: 8px 24px;
  transition: all 0.3s;
}
.btn-outline-red:hover {
  background: #e74c3c;
  color: #fff;
}

/* 进度条 */
.progress-wrap {
  max-width: 600px;
  margin: 15px auto;
  display: none;
}
.progress {
  height: 6px;
  border-radius: 3px;
  background: #f0f0f0;
  box-shadow: none;
}
.progress-bar {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  transition: width 0.3s;
}

/* 结果区 */
.result-area {
  max-width: 600px;
  margin: 20px auto;
  display: none;
}
.result-card {
  background: #f9fdf9;
  border: 1px solid #d4edda;
  border-radius: 10px;
  padding: 20px;
  text-align: center;
}
.result-card .fa-check-circle { color: #27ae60; font-size: 40px; margin-bottom: 10px; }
.result-card .url-box {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 6px;
  padding: 10px 15px;
  margin: 10px 0;
  word-break: break-all;
  font-size: 13px;
  color: #666;
  text-align: left;
}
.result-card .kv-key {
  font-family: monospace;
  color: #e74c3c;
  font-size: 16px;
  font-weight: 600;
}

/* ===== 相册瀑布流 ===== */
.album-header {
  padding: 30px 0 15px;
  text-align: center;
}
.album-header h3 {
  font-weight: 300;
  color: #555;
}

.masonry {
  column-count: 5;
  column-gap: 14px;
  padding: 0 16px 20px;
}
.masonry-item {
  break-inside: avoid;
  margin-bottom: 14px;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 1px 6px rgba(0,0,0,0.08);
  transition: transform 0.3s, box-shadow 0.3s;
  cursor: pointer;
}
.masonry-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.13);
}
.masonry-item img {
  width: 100%;
  display: block;
}

/* 加载更多 */
.load-more-wrap {
  text-align: center;
  padding: 20px 0 30px;
}
.loading-text {
  color: #aaa;
  padding: 20px;
  display: none;
}
.no-more-text {
  color: #bbb;
  padding: 20px;
  display: none;
}

/* 空状态 */
.empty-state {
  text-align: center;
  padding: 80px 20px;
}
.empty-state .fa-image { font-size: 80px; color: #e0e0e0; margin-bottom: 20px; }
.empty-state h4 { color: #aaa; font-weight: 300; }

/* ===== 图片模态框 ===== */
.modal-img-wrap { text-align: center; }
.modal-img-wrap img { max-width: 100%; max-height: 80vh; border-radius: 4px; }

/* ===== 页脚 ===== */
.footer {
  background: #fafafa;
  border-top: 1px solid #eee;
  padding: 16px 0;
  text-align: center;
  color: #bbb;
  font-size: 12px;
  flex-shrink: 0;
}
.footer a { color: #bbb; }

/* ===== 响应式 ===== */
@media (max-width: 1200px) { .masonry { column-count: 4; } }
@media (max-width: 992px)  { .masonry { column-count: 3; } }
@media (max-width: 768px)  {
  .masonry { column-count: 3; column-gap: 8px; }
  .upload-hero { padding: 30px 0 15px; }
}
@media (max-width: 480px)  {
  .masonry { column-count: 2; column-gap: 6px; }
  .drop-zone { padding: 30px 15px; margin: 15px; }
  .drop-zone .fa-cloud-upload { font-size: 48px; }
}
