/* ============================================================
   SEEKDEEP 摄影作品集 — 深色极简主题
   ============================================================ */
:root {
  --bg: #0e0f12;
  --bg-soft: #16181d;
  --bg-card: #1b1e24;
  --border: #262a32;
  --text: #e9eaee;
  --text-dim: #9aa0ab;
  --accent: #d4af6a;
  --accent-soft: rgba(212, 175, 106, 0.14);
  --danger: #e06c6c;
  --radius: 8px;
  --maxw: 1280px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Segoe UI", sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; }

/* ---------------- 顶部导航 ---------------- */
#site-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 28px;
  background: rgba(14, 15, 18, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.brand {
  font-size: 20px; font-weight: 700; letter-spacing: 2px; color: var(--text);
}
.brand:hover { text-decoration: none; color: var(--accent); }
.brand-dot { color: var(--accent); }
#site-nav { display: flex; align-items: center; gap: 18px; font-size: 14px; }
#site-nav a { color: var(--text-dim); }
#site-nav a:hover { color: var(--accent); text-decoration: none; }
#site-nav a.active { color: var(--text); }
#site-nav .nav-btn {
  background: transparent; border: 1px solid var(--border); color: var(--text-dim);
  padding: 6px 16px; border-radius: 999px; font-size: 13px;
}
#site-nav .nav-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ---------------- 通用布局 ---------------- */
main { flex: 1; width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 24px 28px 64px; }

.page-title { font-size: 26px; font-weight: 600; margin-bottom: 4px; }
.page-sub { color: var(--text-dim); font-size: 14px; margin-bottom: 24px; }

/* ---------------- 首页 Hero ---------------- */
.hero { padding: 90px 0 48px; text-align: center; }
.hero h1 {
  font-family: "Songti SC", "STSong", Georgia, serif;
  font-size: 54px; font-weight: 500; letter-spacing: 6px; margin-bottom: 14px;
}
.hero p { color: var(--text-dim); font-size: 16px; letter-spacing: 2px; }

/* ---------------- 作品集卡片（首页） ---------------- */
.portfolio-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 28px; margin-top: 8px; }
.portfolio-card {
  display: block; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; color: var(--text);
  transition: transform .18s ease, border-color .18s ease;
}
.portfolio-card:hover { text-decoration: none; transform: translateY(-4px); border-color: var(--accent); }
.portfolio-cover { width: 100%; aspect-ratio: 3/2; object-fit: cover; background: var(--bg-soft); }
.portfolio-meta { padding: 16px 18px 18px; }
.portfolio-meta h3 { font-size: 17px; font-weight: 600; margin-bottom: 4px; }
.portfolio-meta p { color: var(--text-dim); font-size: 13px; }
.portfolio-meta .count { margin-top: 10px; font-size: 12px; color: var(--text-dim); letter-spacing: 1px; }

/* ---------------- 照片墙（公开作品集 / 管理员预览） ---------------- */
.layout-masonry { columns: 3; column-gap: 14px; }
.layout-grid2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.layout-grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }

.gallery-photo {
  break-inside: avoid; margin-bottom: 14px; position: relative;
  border-radius: var(--radius); overflow: hidden; cursor: zoom-in;
  background: var(--bg-soft);
}
.gallery-photo img { width: 100%; transition: transform .25s ease; }
.gallery-photo:hover img { transform: scale(1.03); }
.gallery-photo .photo-overlay {
  position: absolute; inset: 0; display: flex; align-items: flex-end;
  background: linear-gradient(transparent 60%, rgba(0,0,0,.55));
  opacity: 0; transition: opacity .2s ease; padding: 12px;
  font-size: 13px;
}
.gallery-photo:hover .photo-overlay { opacity: 1; }

/* ---------------- 表单 ---------------- */
.auth-wrap { max-width: 380px; margin: 60px auto 0; }
.auth-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; }
.auth-card h2 { font-size: 20px; margin-bottom: 20px; font-weight: 600; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; color: var(--text-dim); margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: 6px; color: var(--text); padding: 10px 12px; font-size: 14px; outline: none;
}
.form-group input:focus, .form-group textarea:focus { border-color: var(--accent); }
.form-group textarea { resize: vertical; min-height: 72px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--accent); color: #14161a; border: none; border-radius: 6px;
  padding: 10px 22px; font-size: 14px; font-weight: 600;
}
.btn:hover { filter: brightness(1.08); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-ghost {
  background: transparent; border: 1px solid var(--border); color: var(--text-dim);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); filter: none; }
.btn-danger { background: transparent; border: 1px solid rgba(224,108,108,.5); color: var(--danger); }
.btn-danger:hover { background: rgba(224,108,108,.1); filter: none; }
.btn-sm { padding: 5px 12px; font-size: 12.5px; border-radius: 5px; }
.auth-switch { margin-top: 16px; font-size: 13px; color: var(--text-dim); text-align: center; }

/* ---------------- 管理后台 ---------------- */
.admin-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; gap: 12px; flex-wrap: wrap; }
.admin-toolbar .hint { color: var(--text-dim); font-size: 13px; }

.portfolio-row {
  display: flex; align-items: center; gap: 16px; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 12px;
}
.portfolio-row .thumb { width: 88px; height: 60px; object-fit: cover; border-radius: 5px; background: var(--bg-soft); flex-shrink: 0; }
.portfolio-row .info { flex: 1; min-width: 0; }
.portfolio-row .info h3 { font-size: 15px; font-weight: 600; }
.portfolio-row .info .meta-line { font-size: 12.5px; color: var(--text-dim); margin-top: 2px; }
.portfolio-row .ops { display: flex; gap: 8px; flex-shrink: 0; flex-wrap: wrap; }
.badge { display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--border); color: var(--text-dim); }
.badge.public { color: var(--accent); border-color: var(--accent); }

/* ---------------- 编辑器 ---------------- */
.editor-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.editor-head h2 { font-size: 20px; font-weight: 600; }

.dropzone {
  border: 2px dashed var(--border); border-radius: var(--radius);
  padding: 40px 20px; text-align: center; color: var(--text-dim);
  margin-bottom: 24px; transition: border-color .2s ease, background .2s ease; font-size: 14px;
}
.dropzone.dragover { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }

.progressbar { height: 5px; background: var(--bg-soft); border-radius: 999px; overflow: hidden; margin: 10px 0 24px; }
.progressbar > div { height: 100%; background: var(--accent); width: 0; transition: width .2s ease; }

.editor-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }

/* ---------------- 上传队列 ---------------- */
.upload-queue { display: flex; flex-direction: column; gap: 6px; margin: -14px 0 4px; }
.uq-item {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 8px; padding: 6px 10px 6px 6px;
}
.uq-thumb { width: 42px; height: 42px; object-fit: cover; border-radius: 5px; background: var(--bg-soft); flex: none; }
.uq-info { flex: 1; min-width: 0; }
.uq-name { font-size: 13px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.uq-size { font-size: 11px; color: var(--text-dim); }
.uq-status { font-size: 12px; flex: none; color: var(--text-dim); white-space: nowrap; }
.uq-status.busy { color: var(--accent); }
.uq-status.ok { color: #5fbf7f; }
.uq-status.err { color: var(--danger); }
.uq-retry { flex: none; }
.photo-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
}
.photo-card.dragging { opacity: .4; }
.photo-card.drag-over { border-color: var(--accent); }
.photo-card img { width: 100%; aspect-ratio: 4/3; object-fit: cover; cursor: grab; }
.photo-card .body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 6px; }
.photo-card input, .photo-card textarea {
  width: 100%; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 5px;
  color: var(--text); padding: 6px 9px; font-size: 13px; outline: none;
}
.photo-card textarea { resize: vertical; min-height: 44px; }
.photo-card .ops { display: flex; justify-content: space-between; align-items: center; }
.photo-card .ops .order-badge { font-size: 11px; color: var(--text-dim); }

/* ---------------- 灯箱 ---------------- */
#lightbox {
  position: fixed; inset: 0; z-index: 200; background: rgba(8, 9, 11, 0.96);
  display: flex; align-items: center; justify-content: center;
}
#lightbox[hidden] { display: none; }
.lb-figure { max-width: min(1400px, 92vw); max-height: 88vh; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.lb-figure img { max-width: 92vw; max-height: 78vh; object-fit: contain; border-radius: 4px; cursor: zoom-in; }
.lb-figure figcaption { text-align: center; font-size: 13.5px; color: var(--text-dim); max-width: 80vw; }
.lb-figure .lb-title { font-size: 16px; color: var(--text); margin-bottom: 4px; }
.lb-figure .lb-exif { font-size: 12.5px; letter-spacing: .5px; }
.lb-figure .lb-hint { font-size: 11.5px; opacity: .55; margin-top: 2px; }
.lb-download { display: inline-block; margin-top: 8px; font-size: 12.5px; }
.lb-close, .lb-prev, .lb-next {
  position: fixed; background: rgba(255,255,255,.06); border: none; color: var(--text);
  width: 46px; height: 46px; border-radius: 50%; font-size: 22px; line-height: 1;
}
.lb-close:hover, .lb-prev:hover, .lb-next:hover { background: rgba(255,255,255,.14); }
.lb-close { top: 20px; right: 24px; }
.lb-prev { left: 24px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 24px; top: 50%; transform: translateY(-50%); }

/* 灯箱全屏放大模式：图片撑满屏幕（保持完整比例），隐藏文字，点击图片恢复 */
#lightbox.lb-full { overflow: hidden; }
#lightbox.lb-full .lb-figure {
  max-width: none; max-height: none; width: 100vw; height: 100vh;
  margin: 0; justify-content: center; gap: 0;
}
#lightbox.lb-full .lb-figure img { max-width: 100vw; max-height: 100vh; border-radius: 0; cursor: zoom-out; }
#lightbox.lb-full figcaption { display: none; }

/* ---------------- 提示条 ---------------- */
.toast {
  position: fixed; bottom: 32px; left: 50%; transform: translateX(-50%); z-index: 300;
  background: var(--bg-card); border: 1px solid var(--border); color: var(--text);
  padding: 11px 22px; border-radius: 999px; font-size: 14px;
  box-shadow: 0 8px 30px rgba(0,0,0,.5); max-width: 86vw;
}
.toast.error { border-color: var(--danger); color: var(--danger); }
.toast.success { border-color: var(--accent); color: var(--accent); }

/* ---------------- 空状态 ---------------- */
.empty { text-align: center; color: var(--text-dim); padding: 70px 0; font-size: 14px; }

/* ---------------- 加载态 ---------------- */
.loading { text-align: center; color: var(--text-dim); padding: 70px 0; font-size: 14px; letter-spacing: 2px; }

/* ---------------- 响应式（768 断点） ---------------- */
@media (max-width: 768px) {
  main { padding: 16px 16px 48px; }
  #site-header { padding: 12px 16px; }
  .hero { padding: 56px 0 32px; }
  .hero h1 { font-size: 36px; letter-spacing: 4px; }
  .layout-masonry { columns: 2; column-gap: 10px; }
  .layout-grid2, .layout-grid3 { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .portfolio-row { flex-wrap: wrap; }
  .editor-photos { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .lb-prev { left: 10px; }
  .lb-next { right: 10px; }
}
