/* ============================================
   木鱼图床 · 主样式
   深色科技风：近黑背景 + 青绿点缀
   ============================================ */

:root {
  --bg:        #0e1116;
  --bg-soft:   #151a21;
  --bg-card:   #1a2028;
  --line:      #232b36;
  --line-soft: #1d2430;
  --text:      #e6ebf2;
  --text-dim:  #8b96a5;
  --accent:    #2dd4bf;
  --accent-2:  #14b8a6;
  --danger:    #f87171;
  --radius:    14px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }

/* ---- 顶部导航 ---- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 26px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #11161d, #0e1116);
}

.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark { color: var(--accent); display: inline-flex; }
.brand-name { font-size: 17px; font-weight: 700; letter-spacing: .5px; }

.stats {
  display: flex;
  gap: 18px;
  font-size: 13px;
  color: var(--text-dim);
}
.stats b { color: var(--accent); font-weight: 700; }
.stats .admin-link {
  color: var(--text-dim);
  font-size: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 2px 10px;
  margin-left: 4px;
  transition: color .15s, border-color .15s;
}
.stats .admin-link:hover { color: var(--accent); border-color: var(--accent); }

/* ---- 语言切换器 ---- */
.lang-switch { display: inline-flex; align-items: center; gap: 2px; margin-left: 2px; }
.lang-switch a {
  color: var(--text-dim);
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 5px;
  border: 1px solid transparent;
  text-decoration: none;
  transition: color .15s, border-color .15s;
}
.lang-switch a:hover { color: var(--accent); border-color: var(--line); }
.lang-switch a.cur { color: var(--accent); border-color: var(--accent); }

/* ---- 主容器 ---- */
.container { max-width: 860px; margin: 0 auto; padding: 40px 18px 24px; }

/* ---- 上传区 ---- */
.dropzone {
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  background: var(--bg-soft);
  padding: 52px 20px 40px;
  text-align: center;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease;
}
.dropzone:hover, .dropzone.dragover {
  border-color: var(--accent);
  background: #161d26;
}
.dz-icon { color: var(--accent); opacity: .9; margin-bottom: 14px; }
.dropzone h1 { margin: 0 0 8px; font-size: 22px; font-weight: 700; }
.dropzone p { margin: 0 0 6px; color: var(--text-dim); font-size: 14px; }
.dropzone kbd {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 7px;
  font-size: 12px;
  color: var(--text);
}
.dz-tip { font-size: 12px !important; opacity: .8; }

.btn {
  margin-top: 18px;
  padding: 10px 30px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #06120f;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity .15s ease, transform .1s ease;
}
.btn:hover { opacity: .9; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* ---- 上传结果卡片 ---- */
.uploads { margin-top: 26px; display: flex; flex-direction: column; gap: 14px; }

.card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.card-thumb {
  width: 74px; height: 74px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--bg-soft);
  border: 1px solid var(--line-soft);
  flex-shrink: 0;
}
.card-body { flex: 1; min-width: 0; }
.card-url {
  display: block;
  font-size: 14px;
  color: var(--accent);
  word-break: break-all;
  margin-bottom: 4px;
}
.card-meta { font-size: 12px; color: var(--text-dim); }
.card-actions { display: flex; gap: 8px; flex-shrink: 0; }

.btn-sm {
  padding: 7px 14px;
  font-size: 13px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: border-color .15s, color .15s;
}
.btn-sm:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm.danger:hover { border-color: var(--danger); color: var(--danger); }
.btn-sm.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #06120f;
  font-weight: 700;
}
.btn-sm.primary:hover { opacity: .9; color: #06120f; }

.card.uploading { opacity: .7; }
.progress-track {
  height: 4px;
  border-radius: 2px;
  background: var(--bg-soft);
  overflow: hidden;
  margin-top: 8px;
}
.progress-bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width .2s ease;
}

/* ---- 最近上传 ---- */
.recent { margin-top: 40px; }
.recent h2 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-dim);
  margin: 0 0 14px;
  letter-spacing: 1px;
}
.recent-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(116px, 1fr));
  gap: 12px;
}
.recent-item {
  position: relative;
  display: block;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  background: var(--bg-card);
  aspect-ratio: 1 / 1;
}
.recent-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.recent-code {
  position: absolute;
  left: 6px; bottom: 6px;
  font-size: 11px;
  color: #fff;
  background: rgba(0,0,0,.55);
  padding: 2px 7px;
  border-radius: 5px;
  backdrop-filter: blur(2px);
}
.recent-empty { color: var(--text-dim); font-size: 13px; }

/* ---- 页脚 ---- */
.pagefoot {
  margin-top: 44px;
  padding: 18px 0 26px;
  text-align: center;
  font-size: 12px;
  color: var(--text-dim);
  border-top: 1px solid var(--line-soft);
}

/* ---- 通知气泡 ---- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%);
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 20px;
  font-size: 13px;
  z-index: 99;
  box-shadow: 0 8px 30px rgba(0,0,0,.4);
  opacity: 0;
  transition: opacity .2s ease, transform .2s ease;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(-4px); }
.toast.ok { border-color: var(--accent); color: var(--accent); }
.toast.err { border-color: var(--danger); color: var(--danger); }

/* ---- 移动端 ---- */
@media (max-width: 640px) {
  .stats { gap: 10px; font-size: 12px; }
  .dropzone { padding: 34px 14px 28px; }
  .dropzone h1 { font-size: 18px; }
  .card { flex-wrap: wrap; }
  .card-actions { width: 100%; justify-content: flex-end; }
}
