/* ============================================================
   简历库 · 访问口令层 + 顶栏适配
   ============================================================ */

html.gate-passed .gate { display: none; }
html.gate-passed body.gate-locked { overflow: auto; }
body.gate-locked { overflow: hidden; }

/* 内容较少时让页脚贴底 */
body { min-height: 100vh; display: flex; flex-direction: column; }
body > .sitebar, body > .topbar { flex: 0 0 auto; }
.view { flex: 1 0 auto; width: 100%; }
.resume-foot { flex: 0 0 auto; width: 100%; }

/* 站点顶栏已有吸顶，简历库顶栏改为静态避免叠层 */
.topbar { position: static; }

.topbar-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.lock-btn {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  border-radius: 999px;
  padding: 6px 13px;
  font-size: 12px;
  cursor: pointer;
  transition: color .18s, border-color .18s;
}

.lock-btn:hover { color: var(--ink); border-color: var(--line-strong); }

/* ---------------- 口令层 ---------------- */
.gate {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: grid;
  place-items: center;
  padding: 24px;
  overflow: auto;
  background:
    radial-gradient(900px 520px at 82% -12%, #2a5482 0%, transparent 62%),
    linear-gradient(160deg, #122c47 0%, #18395c 58%, #1a3a5c 100%);
}

.gate::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 52px 52px;
  -webkit-mask-image: radial-gradient(620px 400px at 50% 32%, #000 8%, transparent 74%);
  mask-image: radial-gradient(620px 400px at 50% 32%, #000 8%, transparent 74%);
  pointer-events: none;
}

.gate-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 430px;
  background: #fff;
  border-radius: 20px;
  padding: 34px 32px 28px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .42);
}

.gate-badge {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 2px;
  color: #9a7410;
  background: #fbf3dc;
  border: 1px solid #f0e2b6;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 16px;
}

.gate-card h1 {
  margin: 0 0 8px;
  font-size: 24px;
  color: #1a3a5c;
  letter-spacing: .5px;
}

.gate-desc {
  margin: 0 0 22px;
  font-size: 13.5px;
  color: #6b7785;
  line-height: 1.7;
}

.gate-label {
  display: block;
  font-size: 12px;
  color: #6b7785;
  margin-bottom: 7px;
  font-weight: 600;
  letter-spacing: .3px;
}

.gate-field {
  position: relative;
  display: flex;
  align-items: center;
}

.gate-field input {
  width: 100%;
  padding: 12px 60px 12px 14px;
  border: 1px solid #dbe1e9;
  border-radius: 10px;
  font-size: 14px;
  color: #1b2430;
  background: #fbfcfe;
  outline: none;
  transition: border-color .18s, box-shadow .18s, background .18s;
}

.gate-field input:focus {
  border-color: #2e5a8a;
  box-shadow: 0 0 0 3px rgba(46, 90, 138, .12);
  background: #fff;
}

.gate-eye {
  position: absolute;
  right: 6px;
  border: 0;
  background: transparent;
  color: #8a95a3;
  font-size: 12px;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 6px;
}

.gate-eye:hover { color: #1a3a5c; background: #f1f4f8; }

.gate-error {
  min-height: 20px;
  margin: 8px 0 4px;
  font-size: 12.5px;
  color: #c0392b;
}

.gate-submit {
  width: 100%;
  border: 0;
  border-radius: 10px;
  padding: 12px 16px;
  background: linear-gradient(135deg, #2e5a8a, #1a3a5c);
  color: #fff;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: 1px;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(26, 58, 92, .24);
  transition: transform .18s, box-shadow .18s;
}

.gate-submit:hover { transform: translateY(-1px); box-shadow: 0 12px 26px rgba(26, 58, 92, .3); }
.gate-submit:disabled { opacity: .7; cursor: default; transform: none; }

.gate-foot {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #edf0f4;
  font-size: 12px;
  color: #98a1ad;
  text-align: center;
}

.gate-back { display: inline-block; margin-top: 8px; color: #2e5a8a; border-bottom: 1px solid rgba(46, 90, 138, .25); }
.gate-back:hover { border-bottom-color: #2e5a8a; }

.gate-card.shake { animation: gate-shake .38s; }

@keyframes gate-shake {
  10%, 90% { transform: translateX(-1px); }
  20%, 80% { transform: translateX(2px); }
  30%, 50%, 70% { transform: translateX(-4px); }
  40%, 60% { transform: translateX(4px); }
}

.gate-noscript {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: #c0392b;
  color: #fff;
  padding: 12px;
  text-align: center;
  z-index: 10000;
}

/* 简历库页脚（与 app.css 的 .foot 区分，避免被门户页脚样式覆盖） */
.resume-foot {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px 40px;
  color: var(--muted);
  font-size: 12px;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.resume-foot b { color: var(--ink); }
.resume-foot-link { color: var(--muted); border-bottom: 1px solid transparent; transition: color .18s, border-color .18s; }
.resume-foot-link:hover { color: var(--accent); border-bottom-color: var(--accent); }

@media (max-width: 520px) {
  .gate-card { padding: 28px 22px 24px; border-radius: 16px; }
  .gate-card h1 { font-size: 21px; }
}
