/* ===== Vexel · 浅色，参考 teafo.ink ===== */
:root {
  --bg: #f7fcff;
  --card: #ffffff;
  --text: #1a1a1a;
  --text-2: #666;
  --text-3: #999;
  --border: #e3e8ee;
  --primary: #0077ff;
  --primary-hover: #0066dd;
  --danger: #d93026;
  --chip: #eef5ff;
  --chip-text: #0066dd;
  --shadow: 0 1px 3px rgba(20, 60, 120, 0.06);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Roboto, Arial, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
}
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); }
img { display: block; max-width: 100%; }

/* ---- 顶栏 ---- */
.topbar {
  background: var(--primary);
  color: #fff;
  padding: 0 18px;
  height: 52px;
  display: flex;
  align-items: center;
  gap: 18px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}
.topbar .brand {
  color: #fff;
  font-weight: 700;
  font-size: 19px;
  letter-spacing: 0.5px;
}
.topbar .brand:hover { text-decoration: underline; }
.topbar .nav { display: flex; gap: 14px; }
.topbar .nav a { color: rgba(255,255,255,0.92); font-size: 15px; }
.topbar .nav a:hover { color: #fff; }
.menu-btn {
  background: transparent;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
}
.menu-btn:hover { opacity: 0.8; }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.nav-right .uname { color: #fff; font-size: 14px; }

/* ---- 侧滑抽屉 ---- */
.drawer {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: 260px;
  background: #fff;
  z-index: 200;
  transform: translateX(-100%);
  transition: transform 0.22s ease;
  box-shadow: 2px 0 16px rgba(0,0,0,0.12);
  display: flex;
  flex-direction: column;
}
.drawer.open { transform: translateX(0); }
.drawer-mask {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.35);
  z-index: 150;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}
.drawer-mask.show { opacity: 1; pointer-events: auto; }
.drawer-head {
  padding: 20px 18px;
  background: var(--primary);
  color: #fff;
}
.drawer-user { font-size: 18px; font-weight: 700; }
.drawer-sub { font-size: 13px; opacity: 0.85; margin-top: 2px; }
.drawer-nav { display: flex; flex-direction: column; padding: 8px 0; }
.drawer-nav a {
  color: var(--text);
  padding: 12px 20px;
  font-size: 15px;
  border-bottom: 1px solid var(--border-light);
}
.drawer-nav a:hover { background: #f2f8ff; color: var(--primary); text-decoration: none; }

/* ---- 按钮 ---- */
.btn {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 14px;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn-primary { background: #fff; color: var(--primary); font-weight: 600; }
.btn-primary:hover { background: #eef5ff; text-decoration: none; }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,0.55); }
.btn-ghost:hover { background: rgba(255,255,255,0.12); text-decoration: none; }
.btn-solid { background: var(--primary); color: #fff; }
.btn-solid:hover { background: var(--primary-hover); text-decoration: none; }
.btn-danger { background: #fff; color: var(--danger); border-color: #f0c6c2; }
.btn-danger:hover { background: #fdecea; text-decoration: none; }

/* ---- 布局 ---- */
.container { max-width: 1200px; margin: 22px auto; padding: 0 16px; }
.page-head { margin-bottom: 18px; }
.page-head h1 { font-size: 22px; font-weight: 600; }
.page-head .sub { color: var(--text-3); font-size: 14px; margin-top: 2px; }

/* ---- 瀑布流画廊 ---- */
.masonry { column-count: 4; column-gap: 16px; }
@media (max-width: 1000px) { .masonry { column-count: 3; } }
@media (max-width: 720px)  { .masonry { column-count: 2; } }
@media (max-width: 480px)  { .masonry { column-count: 1; } }

.card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 16px;
  break-inside: avoid;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.card-del { position: absolute; top: 8px; right: 8px; z-index: 5; }
.card-del button {
  width: 26px; height: 26px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}
.card-del button:hover { background: rgba(217,48,38,0.9); }
.card .thumb { width: 100%; background: #eef2f7; }
.card .thumb img { width: 100%; }
.card .body { padding: 10px 12px 12px; }
.card .title { font-size: 15px; font-weight: 600; line-height: 1.4; }
.card .title a { color: var(--text); }
.card .title a:hover { color: var(--primary); }
.card .meta { margin-top: 6px; font-size: 13px; color: var(--text-3); display: flex; justify-content: space-between; }

/* ---- 标签 chip ---- */
.chips { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-block;
  background: var(--chip);
  color: var(--chip-text);
  font-size: 12.5px;
  padding: 2px 9px;
  border-radius: 999px;
}
a.chip:hover { background: #ddeaff; text-decoration: none; }

/* ---- 表单 ---- */
.form-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 22px;
  max-width: 640px;
  margin: 0 auto;
  box-shadow: var(--shadow);
}
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.field .hint { font-weight: 400; color: var(--text-3); font-size: 12.5px; margin-left: 6px; }
.field input[type=text], .field input[type=file], .field textarea {
  width: 100%;
  border: 1px solid #d8dde3;
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
}
.field textarea { min-height: 90px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: 2px solid #bcd8ff; border-color: var(--primary); }

/* ---- 详情页 ---- */
.detail { display: grid; grid-template-columns: minmax(0,1.6fr) minmax(0,1fr); gap: 22px; }
@media (max-width: 900px) { .detail { grid-template-columns: 1fr; } }
.detail .imgbox { background: var(--card); border: 1px solid var(--border); border-radius: 8px; padding: 10px; box-shadow: var(--shadow); }
.detail .imgbox img { width: 100%; border-radius: 4px; }
.detail .side { background: var(--card); border: 1px solid var(--border); border-radius: 8px; padding: 18px; box-shadow: var(--shadow); height: fit-content; }
.detail .side h1 { font-size: 20px; margin-bottom: 6px; }
.detail .by { color: var(--text-2); font-size: 14px; margin-bottom: 12px; }
.detail .by a { font-weight: 600; }
.detail .desc { font-size: 14.5px; color: var(--text-2); white-space: pre-wrap; margin: 12px 0; }
.like-row { display: flex; align-items: center; gap: 10px; margin-top: 16px; }
.like-btn {
  border: 1px solid #d8dde3;
  background: #fff;
  border-radius: 6px;
  padding: 6px 14px;
  font-size: 14px;
  cursor: pointer;
}
.like-btn.on { background: #fff0f0; border-color: #f0c6c2; color: var(--danger); }
.owner-actions { margin-top: 18px; border-top: 1px solid var(--border); padding-top: 14px; }

/* ---- 提示 ---- */
.alert { padding: 10px 14px; border-radius: 6px; font-size: 14px; margin-bottom: 14px; border: 1px solid; }
.alert-success { background: #e9f9ef; color: #137333; border-color: #bce4c9; }
.alert-error { background: #fdecea; color: #c5221f; border-color: #f0c6c2; }
.empty { text-align: center; color: var(--text-3); padding: 60px 0; font-size: 15px; }

/* ---- 登录页 ---- */
.login-box { max-width: 420px; margin: 70px auto; text-align: center; }
.login-box .form-card { text-align: left; }
.login-logo { font-size: 30px; font-weight: 700; color: var(--primary); margin-bottom: 6px; }
.login-sub { color: var(--text-3); font-size: 14px; margin-bottom: 20px; }

.footer { text-align: center; color: var(--text-3); font-size: 13px; padding: 30px 0 40px; }
