:root {
  --brand: #e8590c;
  --brand-dark: #d9480f;
  --brand-light: #fff4e6;
  --ink: #212529;
}

body {
  background: #f8f9fa;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

.navbar-brand {
  font-size: 1.15rem;
  letter-spacing: 0.5px;
}

/* ============ 头部（顶栏 + 菜单栏） ============ */
.site-header {
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 1030;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}
.topbar {
  background: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
  padding: 0.35rem 0;
}
.brand-name {
  font-size: 1.1rem;
  letter-spacing: 0.5px;
  color: var(--ink);
}
.brand-name:hover { color: var(--brand); }
.brand-slogan {
  font-size: 0.75rem;
  color: #868e96;
}
.top-link {
  color: #495057;
  font-size: 0.85rem;
  margin-left: 1.1rem;
  text-decoration: none;
}
.top-link:hover { color: var(--brand); }
.menubar {
  background: #fff;
  border-bottom: 1px solid #e9ecef;
}
.menu-nav {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  overflow-x: auto;
  padding: 0.5rem 0;
  scrollbar-width: none;
}
.menu-nav::-webkit-scrollbar { display: none; }
.menu-link {
  color: #343a40;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  white-space: nowrap;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
}
.menu-link:hover { color: var(--brand); }
.menu-link.active {
  color: var(--brand);
  font-weight: 600;
  border-bottom-color: var(--brand);
}
@media (max-width: 575.98px) {
  .search-form { width: 100%; }
  .search-form .form-control { flex: 1; }
}
.search-form .form-control {
  height: 30px;
  padding-top: 0.15rem;
  padding-bottom: 0.15rem;
}
.search-form .btn {
  height: 30px;
  line-height: 1.2;
  padding-top: 0;
  padding-bottom: 0;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* 图片流（行加载网格）：图片按行排列，一行行往下加载 */
.masonry {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
@media (max-width: 1199.98px) { .masonry { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 991.98px) { .masonry { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 575.98px) { .masonry { grid-template-columns: 1fr; } }

.masonry-item {
  margin: 0;
  width: 100%;
}

.image-card {
  position: relative;
  display: block;
  border-radius: 0.75rem;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.image-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
}
.image-card img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  background: #eceef1;
}
/* 列表图固定像素高宽（CSS 兜底；HTML 内联样式为实际生效项） */
.image-card .thumb-wrap {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: #eceef1;
}
.image-card .thumb-wrap img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
  background: none;
}
.image-card .card-body {
  padding: 0.75rem 0.9rem;
}
.image-card .card-title {
  font-size: 0.95rem;
  margin-bottom: 0.35rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.image-card .card-meta {
  font-size: 0.8rem;
  color: #868e96;
  display: flex;
  justify-content: space-between;
}

/* 详情页 */
.detail-image {
  border-radius: 0.75rem;
  max-width: 100%;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

.side-card {
  background: #fff;
  border-radius: 0.75rem;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  padding: 1rem;
  margin-bottom: 1rem;
}

.avatar-lg {
  width: 48px;
  height: 48px;
  object-fit: cover;
}
.avatar-sm {
  width: 32px;
  height: 32px;
  object-fit: cover;
}

/* 评论 */
.comment-avatar {
  width: 36px;
  height: 36px;
  object-fit: cover;
}

/* 状态徽章 */
.badge-pending { background: #ffd43b; color: #664d03; }
.badge-approved { background: #37b24d; color: #fff; }
.badge-rejected { background: #fa5252; color: #fff; }

/* 上传区 */
.drop-zone {
  border: 2px dashed #dee2e6;
  border-radius: 0.75rem;
  background: #fff;
  padding: 2.5rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}
.drop-zone:hover, .drop-zone.dragover {
  border-color: var(--brand);
  background: var(--brand-light);
}

/* 页脚链接 */
footer a { color: inherit; }

.pagination .page-link {
  color: var(--brand);
}
.pagination .active .page-link {
  background: var(--brand);
  border-color: var(--brand);
}

.btn-brand {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.btn-brand:hover {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
  color: #fff;
}
.btn-outline-brand {
  color: var(--brand);
  border-color: var(--brand);
}
.btn-outline-brand:hover {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.text-brand { color: var(--brand) !important; }
.bg-brand-soft { background: var(--brand-light); }
