/* ============================================================
   PHP 图库 · 深色主题样式
   ============================================================ */

:root {
  --bg: #0a0c10;
  --bg-soft: #10141c;
  --card: #131722;
  --input-bg: #0d1017;
  --border: #232a38;
  --text: #e8eaf0;
  --muted: #8b93a7;
  --accent: #6a7bff;
  --accent-2: #a26bff;
  --accent-soft: rgba(106, 123, 255, 0.16);
  --danger: #ff6b6b;
  --success: #3ecf8e;
  --warning: #f5b83d;
  --radius: 14px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  background:
    radial-gradient(1000px 500px at 85% -10%, rgba(106, 123, 255, 0.08), transparent 60%),
    radial-gradient(800px 420px at 0% 0%, rgba(162, 107, 255, 0.06), transparent 55%),
    var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 15px;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: #9aa9ff; }
img { max-width: 100%; }
h1, h2, h3 { line-height: 1.35; }

.container { width: min(1240px, 100% - 32px); margin-inline: auto; }

.icon { flex: none; vertical-align: -2px; }

/* ---------- 顶部导航 ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 12, 16, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 60px;
  padding-block: 8px;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
  letter-spacing: 0.5px;
  white-space: nowrap;
}
.brand:hover { color: #fff; }

.brand-dot {
  width: 13px;
  height: 13px;
  border-radius: 4px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 14px rgba(122, 120, 255, 0.75);
}

.brand-tag {
  font-size: 11px;
  font-weight: 600;
  color: #c3cbff;
  background: var(--accent-soft);
  border: 1px solid rgba(106, 123, 255, 0.35);
  border-radius: 999px;
  padding: 1px 8px;
}

.site-nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }

.site-nav a, .site-nav .link-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 9px;
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}
.site-nav a:hover, .site-nav .link-btn:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }

.link-btn {
  background: none;
  border: 0;
  cursor: pointer;
  font: inherit;
  color: var(--muted);
}
.inline-form { display: inline; margin: 0; }

/* ---------- 提示条 ---------- */

.flash {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 16px 0 0;
  padding: 11px 16px;
  border-radius: 12px;
  font-size: 14px;
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.flash-success { background: rgba(62, 207, 142, 0.1); border: 1px solid rgba(62, 207, 142, 0.35); color: #7fe0b2; }
.flash-error   { background: rgba(255, 107, 107, 0.09); border: 1px solid rgba(255, 107, 107, 0.35); color: #ff9d9d; }
.flash-info    { background: rgba(106, 123, 255, 0.1); border: 1px solid rgba(106, 123, 255, 0.35); color: #a9b4ff; }
.flash-out { opacity: 0; transform: translateY(-6px); }
.flash-close {
  background: none;
  border: 0;
  color: inherit;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.7;
  padding: 0 2px;
}
.flash-close:hover { opacity: 1; }

/* ---------- 首页 Hero 与相册卡片 ---------- */

.hero { padding: 52px 0 26px; text-align: center; }
.hero h1 {
  font-size: clamp(28px, 4vw, 42px);
  margin: 0 0 10px;
  letter-spacing: 1px;
  background: linear-gradient(120deg, #ffffff 10%, #a9b4ff 55%, #c9a4ff 95%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p { color: var(--muted); margin: 0; font-size: 14.5px; }

.album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
  padding: 24px 0 60px;
}

.album-card {
  position: relative;
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--border);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.album-card:hover {
  transform: translateY(-4px);
  border-color: rgba(106, 123, 255, 0.55);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
}

.admin-card { display: flex; flex-direction: column; }

.album-cover { position: relative; display: block; aspect-ratio: 4 / 3; background: var(--bg-soft); }
.album-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }

.cover-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13.5px;
}

.album-overlay {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 30px 14px 12px;
  background: linear-gradient(transparent, rgba(5, 6, 10, 0.9));
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.album-overlay h3 {
  margin: 0;
  font-size: 15.5px;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.album-meta { font-size: 12.5px; color: #b9c0d4; }

.album-badges {
  position: absolute;
  top: 10px; left: 10px;
  display: flex;
  gap: 6px;
  z-index: 2;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(8, 10, 14, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #dfe3ee;
  backdrop-filter: blur(4px);
  white-space: nowrap;
}
.badge-private { color: #ffd08a; border-color: rgba(245, 184, 61, 0.4); }

.fav-flag {
  position: absolute;
  top: 8px; right: 10px;
  color: var(--warning);
  z-index: 2;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.6));
  display: inline-flex;
}
.fav-inline { color: var(--warning); display: inline-flex; vertical-align: -3px; margin-left: 2px; }
.fav-flag .icon, .fav-inline .icon, .is-fav .icon { fill: var(--warning); stroke: var(--warning); }
.is-fav { color: var(--warning) !important; border-color: rgba(245, 184, 61, 0.45) !important; }

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px;
  border-top: 1px solid var(--border);
}

.rename-panel { padding: 10px; border-top: 1px solid var(--border); }
.rename-panel .row-form { gap: 8px; }
.rename-panel input[type="text"] { flex: 1; min-width: 130px; }

/* ---------- 瀑布流 ---------- */

.masonry {
  columns: 4 230px;
  column-gap: 14px;
  padding: 8px 0 70px;
}

.masonry-item {
  margin: 0 0 14px;
  break-inside: avoid;
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  cursor: zoom-in;
  transition: border-color 0.18s ease, transform 0.18s ease;
}
.masonry-item:hover { border-color: rgba(106, 123, 255, 0.55); transform: translateY(-2px); }

.masonry-link { display: block; }

.lazy-img { display: block; width: 100%; }
.js .lazy-img {
  opacity: 0;
  transition: opacity 0.4s ease;
  background:
    linear-gradient(110deg, #12151d 30%, #1b2130 45%, #12151d 60%),
    linear-gradient(#12151d, #12151d);
  background-size: 200% 100%, 100% 100%;
  animation: shimmer 1.6s linear infinite;
  min-height: 60px;
}
.js .lazy-img.is-loaded { opacity: 1; animation: none; background: none; }
@keyframes shimmer { from { background-position: 120% 0, 0 0; } to { background-position: -80% 0, 0 0; } }

.masonry-item.img-error { min-height: 110px; display: flex; align-items: center; justify-content: center; }
.masonry-item.img-error .lazy-img { display: none; }
.masonry-item.img-error::after {
  content: "图片加载失败 · 点击查看原图";
  color: var(--muted);
  font-size: 12.5px;
  padding: 12px;
  text-align: center;
}

.masonry-overlay {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  margin: 0;
  padding: 24px 10px 8px;
  background: linear-gradient(transparent, rgba(5, 6, 10, 0.88));
  color: #fff;
  font-size: 12.5px;
  display: flex;
  align-items: center;
  gap: 6px;
  opacity: 0;
  transition: opacity 0.18s ease;
  pointer-events: none;
}
.masonry-item:hover .masonry-overlay { opacity: 1; }
.masonry-overlay span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }

/* ---------- 相册页头部 ---------- */

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13.5px;
  margin-top: 22px;
}
.back-link:hover { color: var(--text); }

.album-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 0 6px;
  flex-wrap: wrap;
}
.album-head h1 {
  margin: 0;
  font-size: 26px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* ---------- 灯箱 ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(6, 7, 11, 0.97);
  display: flex;
  flex-direction: column;
}
.lightbox[hidden] { display: none; }

body.lb-open { overflow: hidden; }

.lb-top {
  position: absolute;
  top: 0; left: 0; right: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  z-index: 5;
  background: linear-gradient(rgba(6, 7, 11, 0.85), transparent);
}

.lb-counter {
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  font-size: 13.5px;
  white-space: nowrap;
}
.lb-title {
  flex: 1;
  color: #dfe3ee;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
  min-width: 0;
}

.lb-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px 76px 92px;
  min-height: 0;
  touch-action: pan-y;
  position: relative;
}
.lb-stage img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 8px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.6);
  transition: opacity 0.2s ease;
  object-fit: contain;
  user-select: none;
  cursor: pointer;
}
.lb-stage.loading img { opacity: 0; }

.lb-spinner {
  position: absolute;
  top: 50%; left: 50%;
  width: 38px; height: 38px;
  margin: -19px 0 0 -19px;
  border: 3px solid rgba(255, 255, 255, 0.14);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: none;
  z-index: 1;
}
.lb-stage.loading .lb-spinner { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

.lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 6;
  width: 46px; height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #e8eaf0;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.lb-nav:hover { background: rgba(106, 123, 255, 0.35); border-color: var(--accent); }
.lb-prev { left: 16px; }
.lb-next { right: 16px; }

.lb-toolbar {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px;
  border-radius: 14px;
  background: rgba(15, 18, 26, 0.92);
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
}

.lb-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 13px;
  border-radius: 10px;
  border: 0;
  background: transparent;
  color: #dfe3ee;
  font-size: 13.5px;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
}
.lb-btn:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.lb-btn.active { color: #fff; background: rgba(106, 123, 255, 0.4); }
a.lb-btn:hover { color: #fff; text-decoration: none; }

.lb-progress {
  position: absolute;
  left: 12px; right: 12px;
  bottom: -10px;
  height: 3px;
  border-radius: 3px;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.lb-progress.active { opacity: 1; }
.lb-progress i {
  display: block;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform-origin: left;
}
.lb-progress.active i { animation: lbprogress 4s linear forwards; }
@keyframes lbprogress { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ---------- 通用组件 ---------- */

.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 26px 0 18px;
}
.page-head h1 { margin: 0; font-size: 24px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 15px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, filter 0.15s ease;
  white-space: nowrap;
}
.btn:hover { border-color: var(--accent); color: #fff; }

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: transparent;
  color: #fff;
  font-weight: 600;
}
.btn-primary:hover { filter: brightness(1.12); color: #fff; }

.btn-danger { color: var(--danger); border-color: rgba(255, 107, 107, 0.35); background: rgba(255, 107, 107, 0.06); }
.btn-danger:hover { background: rgba(255, 107, 107, 0.16); border-color: var(--danger); color: #ffb3b3; }

.btn-sm { padding: 6px 10px; font-size: 13px; border-radius: 8px; }
.btn-lg { padding: 12px 24px; font-size: 15px; }
.btn-block { width: 100%; }

.panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
}

.panel-title {
  margin: 0 0 14px;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.hidden { display: none !important; }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 14px;
  margin: 26px 0 14px;
  flex-wrap: wrap;
}
.section-head h2 { margin: 0; font-size: 18px; }

.stat-chips { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.stat-chip {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 16px;
  font-size: 13.5px;
  color: var(--muted);
}
.stat-chip b {
  color: var(--text);
  font-size: 17px;
  margin-right: 6px;
  font-variant-numeric: tabular-nums;
}

/* ---------- 表单 ---------- */

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 13px; color: var(--muted); font-weight: 600; }
.field .hint b { color: var(--accent); }

input[type="text"], input[type="password"], input[type="url"],
textarea, select {
  width: 100%;
  background: var(--input-bg);
  border: 1px solid #252c3c;
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--text);
  font: inherit;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(106, 123, 255, 0.18);
}
textarea {
  resize: vertical;
  min-height: 120px;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Courier New", monospace;
  font-size: 13.5px;
  line-height: 1.7;
}
::placeholder { color: #5b6377; }

input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); width: 16px; height: 16px; cursor: pointer; }
.checkbox { display: inline-flex; align-items: center; gap: 8px; color: var(--text); font-size: 14px; cursor: pointer; white-space: nowrap; }

.hint { color: var(--muted); font-size: 12.5px; }

.row-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row-form > input[type="text"] { flex: 1; min-width: 180px; }

.form-actions { display: flex; gap: 10px; margin-top: 6px; }
.import-actions { padding-bottom: 40px; }

/* ---------- 后台图片管理 ---------- */

.bulk-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.img-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
  padding-bottom: 60px;
}

.img-card {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.15s ease;
}
.img-card:hover { border-color: #303a52; }

.img-thumb { position: relative; display: block; aspect-ratio: 4 / 3; background: var(--input-bg); cursor: pointer; }
.img-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.img-check {
  position: absolute;
  top: 8px; left: 8px;
  z-index: 2;
  width: 18px; height: 18px;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.7));
}

.img-body { padding: 10px 12px 4px; display: flex; flex-direction: column; gap: 3px; }
.img-title {
  font-size: 13.5px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.img-url {
  color: var(--muted);
  font-size: 11.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.img-actions { display: flex; gap: 6px; padding: 8px 10px 10px; align-items: center; }
.flex-spacer { flex: 1; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px; height: 30px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.icon-btn:hover { color: var(--text); border-color: var(--accent); }
.icon-btn.danger:hover { color: var(--danger); border-color: var(--danger); }

[data-copy] { position: relative; }
.copy-tip {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: #1d2330;
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 12px;
  padding: 3px 9px;
  border-radius: 7px;
  white-space: nowrap;
  z-index: 60;
  pointer-events: none;
  animation: tipin 0.15s ease;
}
@keyframes tipin { from { opacity: 0; transform: translate(-50%, 3px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ---------- 导入页 ---------- */

.target-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.target-option {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  background: var(--bg-soft);
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.target-option.selected { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(106, 123, 255, 0.16); }
.target-option .radio-row { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.target-option b { font-size: 14px; }
.target-option select, .target-option input[type="text"] { width: 100%; }
.target-option .hint { cursor: default; }

.tips { margin: 0; padding-left: 18px; color: var(--muted); font-size: 13.5px; display: grid; gap: 8px; }
.tips code {
  background: var(--input-bg);
  border: 1px solid var(--border);
  padding: 1px 6px;
  border-radius: 6px;
  font-size: 12.5px;
}
.tips-panel { margin-bottom: 50px; }

/* ---------- API 设置页 ---------- */

.api-status-row { margin-top: 12px; }
.text-success { color: var(--success) !important; }
.text-muted-strong { color: var(--muted) !important; }

.settings-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.settings-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent-soft);
  border: 1px solid rgba(106, 123, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #a9b4ff;
  flex: none;
}
.settings-info { flex: 1; min-width: 220px; }
.settings-info h2 { margin: 0 0 4px; font-size: 15.5px; }
.settings-info p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.settings-info code, .hint code {
  background: var(--input-bg);
  border: 1px solid var(--border);
  padding: 1px 6px;
  border-radius: 6px;
  font-size: 12px;
}

.token-field { margin-top: 16px; margin-bottom: 16px; }

.endpoint-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.endpoint-table td { padding: 9px 10px; border-top: 1px solid var(--border); }
.endpoint-table tr:first-child td { border-top: 0; }
.endpoint-table code {
  background: var(--input-bg);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 12.5px;
  color: #c3cbff;
  white-space: nowrap;
}
.endpoint-table .ep-desc { color: var(--muted); }

.method-badge {
  display: inline-block;
  width: 56px;
  text-align: center;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Courier New", monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 2px 0;
  border-radius: 6px;
}
.method-get { background: rgba(62, 207, 142, 0.14); color: #7fe0b2; border: 1px solid rgba(62, 207, 142, 0.35); }
.method-post { background: rgba(106, 123, 255, 0.14); color: #a9b4ff; border: 1px solid rgba(106, 123, 255, 0.35); }
.method-patch { background: rgba(245, 184, 61, 0.12); color: #ffd08a; border: 1px solid rgba(245, 184, 61, 0.35); }
.method-delete { background: rgba(255, 107, 107, 0.12); color: #ff9d9d; border: 1px solid rgba(255, 107, 107, 0.35); }

.token-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--input-bg);
  border: 1px solid #252c3c;
  border-radius: 10px;
  padding: 10px 12px;
  flex-wrap: wrap;
}
.token-box code {
  flex: 1;
  min-width: 200px;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Courier New", monospace;
  font-size: 13px;
  color: #c3cbff;
  word-break: break-all;
}

.code-block {
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  margin: 0 0 12px;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Courier New", monospace;
  font-size: 12.5px;
  line-height: 1.8;
  color: #c9d1e3;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

/* ---------- 认证页 / 空状态 / 错误页 ---------- */

.auth-wrap {
  min-height: calc(100vh - 220px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 0 60px;
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 30px;
}
.auth-card h1 { margin: 0 0 6px; font-size: 22px; text-align: center; }
.auth-card .sub { color: var(--muted); text-align: center; margin: 0 0 22px; font-size: 13.5px; line-height: 1.7; }

.empty {
  border: 1.5px dashed #2a3142;
  border-radius: var(--radius);
  padding: 48px 20px;
  text-align: center;
  color: var(--muted);
  margin: 20px 0 60px;
}
.empty-icon { opacity: 0.55; margin-bottom: 10px; }
.empty p { margin: 4px 0 14px; }
.empty .btn { margin-top: 4px; }

.error-page { padding: 70px 20px 90px; }
.error-code {
  font-size: 68px;
  margin: 0;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.error-page h2 { margin: 8px 0 6px; font-size: 20px; color: var(--text); }

/* ---------- 页脚 ---------- */

.site-main { min-height: calc(100vh - 200px); }
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 30px;
  padding: 22px 0 30px;
  color: var(--muted);
  font-size: 12.5px;
  text-align: center;
}
.site-footer p { margin: 0; }

/* ---------- 滚动条 ---------- */

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #262e40; border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: #33405c; }

/* ---------- 响应式 ---------- */

@media (max-width: 720px) {
  .header-inner { padding-block: 10px; }
  .site-nav a, .site-nav .link-btn { padding: 6px 9px; font-size: 13px; }
  .hero { padding: 36px 0 20px; }
  .album-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
  .album-head h1 { font-size: 21px; }
  .page-head h1 { font-size: 20px; }
  .target-grid { grid-template-columns: 1fr; }

  /* 灯箱：移动端隐藏左右箭头（手势滑动），工具栏只留图标 */
  .lb-nav { display: none; }
  .lb-stage { padding: 52px 8px 86px; }
  .lb-btn span { display: none; }
  .lb-btn { padding: 9px 11px; }
  .lb-title { display: none; }
}

@media (max-width: 480px) {
  .album-grid { grid-template-columns: 1fr 1fr; }
  .img-grid { grid-template-columns: 1fr 1fr; }
}
