/* =========================================================
   临时身份生成器 —— 参考 haoweichi.com 页面布局
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Space+Grotesk:wght@500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --color-bg: #F8FAFC;
  --color-surface: rgba(255, 255, 255, 0.96);
  --color-surface-solid: #ffffff;
  --color-text: #1E293B;
  --color-text-muted: #64748B;
  --color-text-subtle: #94A3B8;
  --color-border: #E5E7EB;
  --color-primary: #3B82F6;
  --color-primary-hover: #2563EB;
  --color-primary-soft: #EFF6FF;
  --color-icon-bg: #F1F5F9;
  --color-navbar: #093355;
  --color-accent: #2563EB;
  --color-accent-2: #1D4ED8;
  --radius-panel: 1rem;
  --radius-nav: 0.5rem;
  --shadow-panel: 0 1px 2px rgba(15, 23, 42, 0.04), 0 4px 14px rgba(15, 23, 42, 0.06);
  --font-body: 'DM Sans', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-heading: 'Space Grotesk', 'DM Sans', system-ui, -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Space+Grotesk:wght@500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ---------- 背景极光 ---------- */
.page-bg {
  position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none;
}
.aurora-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(42rem 28rem at 8% -10%, rgba(59, 130, 246, 0.10), transparent 60%),
    radial-gradient(40rem 26rem at 92% 0%, rgba(59, 130, 246, 0.10), transparent 60%),
    radial-gradient(46rem 30rem at 50% 110%, rgba(16, 185, 129, 0.07), transparent 60%);
}
.aurora-blob { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .5; }
.aurora-blob-1 { width: 22rem; height: 22rem; top: -6rem; left: 12%; background: rgba(59, 130, 246, .14); animation: drift1 26s ease-in-out infinite alternate; }
.aurora-blob-2 { width: 18rem; height: 18rem; top: 4rem; right: 6%; background: rgba(96, 165, 250, .14); animation: drift2 32s ease-in-out infinite alternate; }
@keyframes drift1 { to { transform: translate(3rem, 2rem) scale(1.08); } }
@keyframes drift2 { to { transform: translate(-2.5rem, 3rem) scale(1.12); } }

.page-content { position: relative; z-index: 1; display: flex; flex-direction: column; min-height: 100vh; width: 100%; max-width: 100%; }

/* ---------- 导航栏 ---------- */
.navbar {
  background: var(--color-navbar);
  border-top: 2px solid var(--color-accent);
  box-shadow: 0 2px 12px rgba(9, 51, 85, .22);
  padding: 0.55rem 0;
}
.navbar > .container {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.navbar-title-wrap { justify-content: center !important; }
.navbar-title-wrap .navbar-brand { font-size: 1.3rem; letter-spacing: .5px; }
.navbar-start, .navbar-end { display: flex; align-items: center; flex-shrink: 0; }
.navbar-brand {
  display: inline-flex; align-items: center; gap: 0.2rem;
  font-family: var(--font-heading); font-size: 1.12rem; line-height: 1; color: #fff;
  text-decoration: none; white-space: nowrap;
}
.navbar-brand-text { display: inline-block; line-height: 1; transform: scale(1.04); transform-origin: left center; }
.navbar-brand i { color: var(--color-accent); }
.navbar-center { flex: 1 1 auto; display: flex; justify-content: center; min-width: 0; }
.navbar-nav-menu { display: flex; align-items: center; gap: 0.2rem; padding: 0 0.5rem; min-width: 0; }
.navbar-nav-menu-primary { display: flex; align-items: center; gap: 0.15rem; min-width: 0; }
.navbar-nav-link {
  display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.35rem 0.7rem;
  color: rgba(255, 255, 255, 0.82); font-size: 0.86rem; font-weight: 500;
  text-decoration: none; border-radius: 999px; border: 1px solid transparent;
  white-space: nowrap; transition: color .15s ease, background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.navbar-nav-link i { font-size: 0.82rem; line-height: 1; opacity: .9; }
.navbar-nav-link:hover, .navbar-nav-link:focus { color: #fff; background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.16); }
.navbar-nav-link.active { color: #fff; background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.28); box-shadow: 0 2px 8px rgba(0,0,0,.12); font-weight: 600; }
.navbar-nav-more { margin-left: 0.2rem; }
.navbar-nav-more-btn {
  display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.35rem 0.75rem 0.35rem 0.65rem;
  border: 1px solid rgba(255,255,255,.2); border-radius: 999px; background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.9); font-size: 0.78rem; font-weight: 600; line-height: 1; cursor: pointer; white-space: nowrap;
  transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease, color .18s ease;
}
.navbar-nav-more-btn::after { margin-left: 0.1rem; vertical-align: .12em; }
.navbar-nav-more-btn:hover, .navbar-nav-more-btn:focus, .navbar-nav-more-btn.show {
  color: #fff; background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.35); box-shadow: 0 4px 14px rgba(0,0,0,.18);
}
.navbar-nav-dropdown {
  --bs-dropdown-min-width: 13.5rem; padding: 0; overflow: hidden; border-radius: 0.75rem;
  border-color: rgba(15,23,42,.08); box-shadow: 0 16px 40px rgba(15,23,42,.16); margin-top: 0.45rem !important;
}
.navbar-nav-dropdown-scroll { max-height: min(70vh, 520px); overflow-y: auto; overscroll-behavior: contain; padding: 0.35rem; scrollbar-width: thin; }
.navbar-nav-dropdown-item {
  display: flex; align-items: center; gap: 0.55rem; padding: 0.45rem 0.6rem; border-radius: 0.5rem;
  color: var(--color-text); font-size: 0.84rem; font-weight: 500; text-decoration: none;
  transition: background-color .15s ease, color .15s ease;
}
.navbar-nav-dropdown-item i {
  display: inline-flex; align-items: center; justify-content: center; width: 1.5rem; height: 1.5rem;
  font-size: 0.8rem; color: var(--color-text-muted); background: var(--color-icon-bg); border-radius: 0.35rem; flex-shrink: 0;
}
.navbar-nav-dropdown-item:hover, .navbar-nav-dropdown-item:focus { background: var(--color-primary-soft); color: var(--color-primary-hover); }
.navbar-action {
  display: inline-flex; align-items: center; gap: 0.375rem; padding: 0.375rem 0.625rem;
  color: rgba(255,255,255,.85); font-size: 0.86rem; font-weight: 500; text-decoration: none;
  border-radius: 0.375rem; transition: color .15s ease, background-color .15s ease; white-space: nowrap;
}
.navbar-action:hover, .navbar-action:focus { color: #fff; background: rgba(255,255,255,.08); }

/* ---------- 布局 ---------- */
.layout-wrapper { flex: 1 1 auto; padding: 1rem; }
.layout-grid {
  display: grid; grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
  gap: 1rem; width: 100%; max-width: 1440px; margin: 0 auto; align-items: start;
}
.layout-grid > * { min-width: 0; }
.layout-content-group { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; min-width: 0; }

.layout-panel {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-panel); box-shadow: var(--shadow-panel);
  padding: 1rem 0.8rem; min-width: 0; max-width: 100%;
}

/* 左栏 */
.left-sidebar-stack { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.left-sidebar { font-size: 0.88rem; padding: 0.9rem 0.75rem; align-self: stretch; width: 100%; }
.nav-header {
  font-family: var(--font-heading); font-size: 0.6875rem; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-text-subtle);
  padding: 0 0.625rem; margin-bottom: 0.625rem;
}
.nav-countries { display: flex; flex-direction: column; flex-wrap: nowrap; overflow: visible; }
.nav-countries .nav-link {
  display: flex; align-items: center; gap: 0.45rem; padding: 0.35rem 0.55rem;
  color: var(--color-text-muted); font-weight: 500; border-radius: var(--radius-nav);
  text-decoration: none; transition: background-color .15s ease, color .15s ease;
  width: 100%; min-width: 0;
}
.nav-countries .nav-link i {
  display: inline-flex; align-items: center; justify-content: center; width: 1.45rem; height: 1.45rem;
  font-size: 0.72rem; color: var(--color-text-subtle); background: var(--color-icon-bg);
  border-radius: 0.3125rem; flex-shrink: 0; transition: background-color .15s ease, color .15s ease;
}
.nav-countries .nav-link span { line-height: 1.3; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-countries .nav-link:hover { background: var(--color-bg); color: var(--color-primary-hover); }
.nav-countries .nav-link:hover i { color: var(--color-primary); background: var(--color-primary-soft); }
.nav-countries .nav-link.is-active { background: var(--color-primary-soft); color: var(--color-primary-hover); font-weight: 600; }
.nav-countries .nav-link.is-active i { color: #fff; background: var(--color-primary); }

/* 主内容 */
.main-content { min-height: 60vh; padding: 1.25rem 1.1rem; overflow-x: clip; }

/* ---------- Hero 标题 ---------- */
.address-hero { margin-bottom: 0.25rem; }
.address-hero-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.address-hero h1 { font-family: var(--font-heading); font-weight: 700; }
.address-hero h1 a { color: var(--color-text); transition: color .15s ease; }
.address-hero h1 a:hover { color: var(--color-primary-hover); }
.section-heading {
  display: inline-flex; align-items: center; gap: 0.625rem;
  font-family: var(--font-heading); font-weight: 600; color: var(--color-text); line-height: 1.3;
}
.section-heading-icon {
  display: inline-flex; align-items: center; justify-content: center; width: 2rem; height: 2rem;
  font-size: 0.95rem; color: var(--color-primary); background: var(--color-primary-soft);
  border-radius: 0.5rem; flex-shrink: 0;
}
.section-heading-icon-lg { width: 2.25rem; height: 2.25rem; font-size: 1rem; }
.section-heading-icon-sm { width: 1.5rem; height: 1.5rem; font-size: 0.75rem; }

.address-refresh-btn {
  display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.375rem 0.8rem;
  border: 1px solid var(--color-border); border-radius: 0.5rem; background: var(--color-surface-solid);
  color: var(--color-text); font-size: 0.84rem; font-weight: 600; cursor: pointer;
  transition: color .15s ease, border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.address-refresh-btn:hover { color: var(--color-primary-hover); border-color: #BFDBFE; background: var(--color-primary-soft); box-shadow: 0 0 0 2px rgba(59,130,246,.1); }
.address-refresh-btn i { font-size: 0.9rem; }

.address-divider { margin: 1.25rem 0; border: 0; border-top: 1px solid var(--color-border); opacity: 1; }
.address-hero + .address-divider { margin-top: 0.75rem; }
.address-section { scroll-margin-top: 1rem; }

/* ---------- 筛选卡 ---------- */
.address-filter-card { border-color: #DBEAFE; background: linear-gradient(180deg, #FFFFFF 0%, #F8FAFF 100%); }
.address-filter-card .form-select:focus { border-color: var(--color-primary); box-shadow: 0 0 0 0.2rem rgba(59,130,246,.12); }
.address-filter-card .card-body { padding: 0.85rem 1rem; }
.form-select-sm { font-size: 0.84rem; }

/* ---------- 结果 hero 卡 ---------- */
.resume-hero-card {
  position: relative; background: var(--color-surface-solid); border: 1px solid var(--color-border);
  border-radius: var(--radius-panel); box-shadow: var(--shadow-panel); overflow: hidden;
}
.resume-hero-body {
  display: flex; align-items: stretch; gap: 0; padding: 0;
  background: linear-gradient(135deg, rgb(237 251 255 / 68%) 0%, rgba(255,250,245,.72) 100%);
}
.resume-hero-left {
  flex: 0 0 34%; max-width: 34%; display: flex; flex-direction: column; align-items: center;
  justify-content: flex-start; text-align: center; padding: 0.85rem 0.5rem;
}
.resume-avatar {
  width: 132px; height: 132px; border-radius: 50%; overflow: hidden; box-sizing: border-box;
  padding: 6px; border: 1px solid rgba(94,161,182,.68); background: #fff;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-bottom: 0.6rem;
}
.resume-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 50%; }
.resume-name-wrap { position: relative; display: flex; align-items: center; justify-content: center; width: 100%; padding-inline: 1.75rem; }
.resume-name { font-family: var(--font-heading); font-size: 1.18rem; font-weight: 700; color: #404856; line-height: 1.3; word-break: break-word; text-align: center; margin: 0; }
.resume-name-wrap .field-copy-btn { position: absolute; right: 0; top: 50%; transform: translateY(-50%); }
.resume-meta-list { display: grid; grid-template-columns: max-content minmax(0,1fr); column-gap: 0.55rem; row-gap: 0.55rem; align-items: center; width: 100%; margin-top: 1rem; padding-inline: 0.35rem; }
.resume-meta-row { display: contents; }
.resume-meta-label { font-size: 0.68rem; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: #94a3b8; line-height: 1.2; text-align: right; white-space: nowrap; }
.resume-meta-value-wrap { position: relative; display: flex; align-items: center; justify-content: center; width: 100%; min-width: 0; padding-inline: 1.5rem; }
.resume-meta-value { display: block; width: 100%; font-size: 0.9rem; font-weight: 600; color: #404856; line-height: 1.3; text-align: center; word-break: break-word; }
.resume-meta-value-wrap .field-copy-btn { position: absolute; right: 0; top: 50%; transform: translateY(-50%); }
.resume-hero-right { flex: 1 1 66%; min-width: 0; padding: 1rem 1.1rem 1rem 1.15rem; display: flex; align-items: stretch; }
.resume-fields-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; align-content: start; width: 100%; }
.resume-field-chip { background: var(--color-bg); border: 1px solid var(--color-border); border-radius: 0.5rem; padding: 0.45rem 0.7rem; min-width: 0; transition: border-color .15s, box-shadow .15s; }
.resume-field-chip.is-half { grid-column: span 1; }
.resume-field-chip.is-full { grid-column: 1 / -1; }
.resume-field-chip:hover { border-color: #BFDBFE; box-shadow: 0 0 0 2px var(--color-primary-soft); }
.resume-field-label { display: block; font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--color-text-subtle); margin-bottom: 0.15rem; white-space: nowrap; }
.resume-field-value-wrap { display: flex; align-items: center; gap: 0.35rem; flex-wrap: nowrap; min-width: 0; }
.resume-field-value { font-size: 0.9rem; font-weight: 700; color: #404856; word-break: break-word; flex: 1 1 auto; }

/* 字段复制按钮 */
.field-copy-btn {
  display: inline-flex; align-items: center; justify-content: center; padding: 0.15rem 0.3rem;
  border: none; background: transparent; color: #cbd5e1; font-size: 0.8rem; cursor: pointer;
  border-radius: 0.25rem; transition: color .15s ease, background-color .15s ease; flex-shrink: 0;
}
.field-copy-btn:hover { color: var(--color-primary); background: var(--color-primary-soft); }
.field-copy-btn.is-copied { color: #16a34a; }

/* ---------- 模块区块卡 ---------- */
.resume-section-card { background: transparent; border: none; border-radius: 0; overflow: visible; display: flex; flex-direction: column; margin-top: 1rem; }
.resume-section-header { display: flex; align-items: center; gap: 0.55rem; padding: 0.35rem 0 0.75rem; background: transparent; border-bottom: none; flex-shrink: 0; }
.resume-section-header-actions { display: inline-flex; align-items: center; gap: 0.35rem; margin-left: auto; }
.resume-section-icon { display: inline-flex; align-items: center; justify-content: center; width: 1.2rem; height: 1.2rem; color: #9ca3af; font-size: 0.95rem; flex-shrink: 0; }
.resume-section-title { font-family: var(--font-heading); font-size: 0.88rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #3e424c; }
.resume-section-body { display: flex; flex-direction: column; flex: 1; }
.resume-section-json-link, .resume-section-api-link {
  display: inline-flex; align-items: center; gap: 0.28rem; padding: 0.2rem 0.45rem;
  border: 1px solid #E5E7EB; border-radius: 0.35rem; background: #F9FAFB; color: #3e424c;
  font-size: 0.72rem; font-weight: 700; letter-spacing: .04em; line-height: 1; cursor: pointer;
  transition: color .15s ease, border-color .15s ease, background-color .15s ease;
}
.resume-section-json-link:hover, .resume-section-api-link:hover { color: var(--color-primary); border-color: #BFDBFE; background: #EFF6FF; }
.resume-section-json-link i, .resume-section-api-link i { font-size: 0.78rem; }

/* ---------- 左栏快捷操作 / 说明 ---------- */
.sidebar-actions { align-self: start; }
.sidebar-actions-body { padding-inline: 0.625rem; }
.sidebar-actions-body.d-grid { padding-inline: 0.625rem; }
.address-api-card { border-color: #DBEAFE; }
.address-api-card .card-body { font-size: 0.9rem; }

/* ---------- 代码块（JSON 弹窗） ---------- */
.code-block {
  background: #0f172a; color: #e2e8f0; border-radius: 0.6rem; padding: 0.9rem 1rem;
  font-family: var(--font-mono); font-size: 0.8rem; line-height: 1.55; overflow: auto;
  white-space: pre; max-height: 68vh;
}
.code-block::selection { background: rgba(59,130,246,.35); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--color-border); background: rgba(255,255,255,.6); backdrop-filter: blur(6px); }

/* ---------- 响应式 ---------- */
@media (max-width: 1199.98px) {
  .left-sidebar-stack { display: none !important; }
}
@media (max-width: 991.98px) {
  .layout-grid { grid-template-columns: minmax(0, 1fr); }
  .layout-content-group { grid-template-columns: minmax(0, 1fr); }
  .navbar-nav-menu-primary, .navbar-nav-more { display: none !important; }
}
@media (max-width: 767.98px) {
  .layout-wrapper { padding: 0.75rem; }
  .main-content { padding: 1rem 0.85rem; }
  .resume-hero-body { flex-direction: column; }
  .resume-hero-left { flex: none; max-width: none; width: 100%; border-bottom: 1px solid var(--color-border); padding: 1rem 1.15rem 0.9rem; background: linear-gradient(180deg, var(--color-primary-soft) 0%, rgba(239,246,255,0) 100%); }
  .resume-hero-right { flex: none; padding: 0.9rem 1rem; }
  .resume-fields-grid { grid-template-columns: 1fr; }
  .resume-field-chip.is-half, .resume-field-chip.is-full { grid-column: 1 / -1; }
  .navbar-action span { display: none; }
  .navbar-brand-text { font-size: 0.92rem; }
}
