/* 美国地址生成器 - style.css */
:root {
  --blue-600: #2563eb;
  --blue-700: #1d4ed8;
  --blue-500: #3b82f6;
  --blue-100: #dbeafe;
  --blue-50: #eff6ff;
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --line: #e5eaf1;
  --bg: #f4f7fb;
  --card: #ffffff;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px -12px rgba(15, 23, 42, .12);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Inter", "Segoe UI", "Microsoft YaHei", "PingFang SC", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; cursor: pointer; }
a { color: var(--blue-600); text-decoration: none; }
svg { fill: currentColor; }

/* ============ 导航 ============ */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 20px;
  height: 58px; display: flex; align-items: center; justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 700; }
.brand-logo {
  width: 32px; height: 32px; border-radius: 9px;
  background: linear-gradient(135deg, var(--blue-500), var(--blue-700));
  color: #fff; display: grid; place-items: center;
  box-shadow: 0 4px 10px -2px rgba(37, 99, 235, .5);
}
.brand-logo svg { width: 18px; height: 18px; }
.brand-name { font-size: 16.5px; letter-spacing: .2px; }
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links > a { color: var(--ink-2); font-size: 14px; }
.nav-links > a:hover { color: var(--blue-600); }
.lang-wrap { position: relative; }
.lang-btn {
  display: flex; align-items: center; gap: 6px;
  border: 0; background: none; color: var(--ink-2); font-size: 14px; padding: 6px 4px;
}
.lang-btn svg { width: 16px; height: 16px; }
.lang-btn .caret { width: 14px; height: 14px; color: var(--muted); }
.lang-menu {
  position: absolute; right: 0; top: calc(100% + 6px);
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: var(--shadow); min-width: 132px; overflow: hidden; padding: 4px;
}
.lang-menu button {
  display: block; width: 100%; text-align: left; padding: 8px 10px;
  border: 0; background: none; border-radius: 7px; font-size: 13.5px; color: var(--ink-2);
}
.lang-menu button:hover { background: var(--blue-50); color: var(--blue-700); }
.lang-menu button.active { color: var(--blue-600); font-weight: 600; }

/* ============ Hero ============ */
.hero {
  background:
    radial-gradient(900px 340px at 8% -10%, rgba(255, 255, 255, .16), transparent 60%),
    radial-gradient(700px 300px at 96% 0%, rgba(147, 197, 253, .25), transparent 55%),
    linear-gradient(120deg, #1e50c8 0%, #2563eb 45%, #3b82f6 100%);
  color: #fff;
}
.hero-inner {
  max-width: 1200px; margin: 0 auto; padding: 54px 20px 58px;
  display: grid; grid-template-columns: 1.2fr auto; gap: 44px; align-items: center;
}
.hero-right { display: flex; gap: 18px; align-items: stretch; flex-wrap: wrap; justify-content: flex-end; max-width: 760px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .22);
  padding: 7px 14px; border-radius: 999px; font-size: 12.5px; color: #dbeafe;
}
.hero-badge svg { width: 13px; height: 13px; }
.hero h1 {
  margin: 18px 0 10px; font-size: 44px; line-height: 1.15;
  letter-spacing: .5px; font-weight: 800;
}
.hero-sub { margin: 0 0 26px; color: #cfe0ff; font-size: 16.5px; }
.hero-feats { display: flex; flex-wrap: wrap; gap: 10px 26px; }
.feat { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #dbeafe; }
.feat svg { width: 15px; height: 15px; flex: none; }

.hero-card {
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 20px; padding: 20px;
  backdrop-filter: blur(6px);
  box-shadow: 0 24px 48px -24px rgba(2, 20, 80, .55);
  width: 340px; flex: none;
  display: flex; flex-direction: column;
}
.country-card { width: 300px; }
.hero-card-head { display: flex; align-items: center; gap: 12px; }
.hero-card-icon {
  width: 40px; height: 40px; border-radius: 12px; flex: none;
  background: rgba(255, 255, 255, .18); display: grid; place-items: center;
}
.hero-card-icon svg { width: 20px; height: 20px; }
.hero-card-title { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.hero-card-title .hint { font-size: 12px; color: #b9d0fb; }
.hero-card-title strong { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero-card-head .ok { width: 20px; height: 20px; color: #6ee7a0; flex: none; }
.hero-addr {
  margin-top: 14px; width: 100%; text-align: left;
  background: rgba(9, 30, 100, .35); border: 1px solid rgba(255, 255, 255, .14);
  color: #eaf2ff; font-size: 13.5px; line-height: 1.55;
  border-radius: 12px; padding: 13px 14px; min-height: 46px;
}
.hero-addr:hover { border-color: rgba(255, 255, 255, .4); }
.hero-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.stat {
  background: rgba(9, 30, 100, .3); border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 12px; padding: 12px 14px;
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
}
.stat strong { font-size: 22px; }
.stat span { font-size: 12px; color: #b9d0fb; }
.hero-stats.small { margin-top: auto; gap: 8px; }
.hero-stats.small .stat { padding: 9px 12px; }
.stat.ver { justify-content: center; }
.stat.ver span { font-size: 11px; color: #9fc0f7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat.updbtn {
  border: 1px solid rgba(255, 255, 255, .3); background: rgba(255, 255, 255, .14);
  color: #eaf2ff; font-size: 12.5px; font-weight: 600; font-family: inherit;
  cursor: pointer; justify-content: center; align-items: center; gap: 6px;
  transition: background .15s ease;
}
.stat.updbtn svg { width: 13px; height: 13px; }
.stat.updbtn:hover { background: rgba(255, 255, 255, .24); }

/* 国家选择卡片 */
.country-select {
  margin-top: 14px; width: 100%; height: 40px; padding: 0 10px;
  background: rgba(9, 30, 100, .35); color: #eaf2ff;
  border: 1px solid rgba(255, 255, 255, .22); border-radius: 11px;
  font-size: 13.5px; font-family: inherit; outline: none; cursor: pointer;
}
.country-select:focus { border-color: rgba(255, 255, 255, .55); }
.country-select option { color: #0f172a; background: #fff; }
.flag-chips { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-top: 12px; }
.flag-chip {
  height: 38px; border-radius: 10px; font-size: 19px; line-height: 1;
  background: rgba(9, 30, 100, .3); border: 1px solid rgba(255, 255, 255, .12);
  cursor: pointer; transition: all .15s ease; padding: 0;
}
.flag-chip:hover { background: rgba(255, 255, 255, .2); transform: translateY(-1px); }
.flag-chip.active { border-color: #93c5fd; background: rgba(147, 197, 253, .28); box-shadow: 0 0 0 2px rgba(147, 197, 253, .35); }
.country-foot { margin-top: 12px; }
.mini-btn {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 7px;
  height: 34px; border-radius: 10px; font-size: 12.5px; font-weight: 600; font-family: inherit;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .22);
  color: #dbeafe; cursor: pointer; transition: background .15s ease;
}
.mini-btn svg { width: 13px; height: 13px; }
.mini-btn:hover { background: rgba(255, 255, 255, .2); }

/* ============ 主体布局 ============ */
.main { max-width: 1200px; margin: 0 auto; padding: 34px 20px 20px; }
.grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr) 340px; gap: 20px; align-items: start; }
.col { display: flex; flex-direction: column; gap: 20px; min-width: 0; }

.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px 18px 8px;
}
.card h2 {
  display: flex; align-items: center; gap: 10px;
  margin: 0 0 6px; font-size: 15.5px; font-weight: 700; color: var(--ink);
}
.card h2 .hlink { margin-left: auto; font-size: 12.5px; }
.cicon {
  width: 30px; height: 30px; border-radius: 9px; flex: none;
  display: grid; place-items: center;
  background: var(--blue-50); color: var(--blue-600);
}
.cicon svg { width: 16px; height: 16px; }

.rows { display: flex; flex-direction: column; }
.row {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 4px; border-bottom: 1px solid #f0f3f8;
}
.row:last-child { border-bottom: 0; }
.lb { flex: none; width: 84px; color: var(--muted); font-size: 13px; }
.val { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 600; color: var(--ink-2); word-break: break-all; }
.cp {
  flex: none; width: 30px; height: 30px; border-radius: 8px; border: 0;
  background: transparent; color: #b3bdcc; display: grid; place-items: center;
  transition: all .15s ease;
}
.cp svg { width: 15px; height: 15px; }
.cp:hover { background: var(--blue-50); color: var(--blue-600); }
.cp.done { color: #16a34a; }

.hlink.asbtn { border: 0; background: none; padding: 0; font-size: 12.5px; }

/* 快速操作 */
.quick { display: flex; flex-direction: column; gap: 10px; padding: 8px 0 10px; }
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 11px; font-size: 13.5px; font-weight: 600;
  padding: 10.5px 12px; border: 1px solid transparent; transition: all .15s ease;
}
.btn svg { width: 15px; height: 15px; }
.btn.solid { background: var(--blue-600); color: #fff; box-shadow: 0 6px 14px -6px rgba(37, 99, 235, .6); }
.btn.solid:hover { background: var(--blue-700); }
.btn.soft { background: var(--blue-50); color: var(--blue-700); border-color: #dbe7fd; }
.btn.soft:hover { background: var(--blue-100); }
.btn.ghost { background: #fff; color: var(--ink-2); border-color: var(--line); }
.btn.ghost:hover { border-color: #c9d5e8; color: var(--blue-700); }
.btn.full { width: 100%; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn:disabled:hover { background: var(--blue-50); }

/* 筛选选项 */
.filters { display: flex; flex-direction: column; gap: 8px; padding: 8px 0 12px; }
.flb { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.filters select {
  width: 100%; height: 38px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: 10px;
  background: #fbfcfe; color: var(--ink-2); font-size: 13.5px; font-family: inherit;
  outline: none;
}
.filters select:focus { border-color: var(--blue-500); box-shadow: 0 0 0 3px rgba(59, 130, 246, .15); }
.chk { display: flex; gap: 9px; align-items: flex-start; margin: 8px 0 6px; cursor: pointer; }
.chk input { margin-top: 3px; accent-color: var(--blue-600); width: 15px; height: 15px; flex: none; }
.chk span { display: flex; flex-direction: column; gap: 3px; }
.chk b { font-size: 13px; color: var(--ink-2); font-weight: 600; }
.chk i { font-style: normal; font-size: 11.5px; color: var(--muted); line-height: 1.5; }

/* 热门城市 */
.hot-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; padding: 10px 0 12px; }
.hot-grid.collapsed { grid-auto-rows: 0; overflow: hidden; gap: 0; padding-bottom: 0; }
.hot-chip {
  display: flex; align-items: center; gap: 7px;
  padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px;
  background: #fbfcfe; color: var(--ink-2); font-size: 13px; justify-content: flex-start;
}
.hot-chip svg { width: 13px; height: 13px; color: var(--blue-500); flex: none; }
.hot-chip:hover { border-color: var(--blue-500); color: var(--blue-700); background: var(--blue-50); }
.hot-chip.collapsed-hide { display: none; }

/* 地图 */
.map-wrap { border-radius: 12px; overflow: hidden; border: 1px solid var(--line); margin: 8px 0 4px; }
.map-wrap iframe { display: block; width: 100%; height: 300px; border: 0; }
.map-src { font-size: 11.5px; color: var(--muted); margin: 0 0 10px; }

/* ============ 页脚 ============ */
.foot {
  max-width: 1200px; margin: 0 auto; padding: 10px 20px 40px;
  color: var(--muted); font-size: 12.5px; line-height: 1.7; text-align: center;
}
.foot .muted { color: #94a3b8; font-size: 12px; }

/* ============ 模态框 ============ */
.modal-mask[hidden] { display: none; }
.modal-mask {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(15, 23, 42, .45); backdrop-filter: blur(3px);
  display: grid; place-items: center; padding: 24px;
}
.modal {
  position: relative; width: min(720px, 100%); max-height: 82vh; overflow: auto;
  background: #fff; border-radius: 18px; padding: 28px 30px;
  box-shadow: 0 30px 80px -20px rgba(2, 20, 80, .45);
}
.modal-x {
  position: sticky; top: 0; float: right; margin: -10px -10px 0 0;
  width: 32px; height: 32px; border: 0; border-radius: 9px;
  background: #f1f5f9; color: var(--muted); display: grid; place-items: center;
}
.modal-x svg { width: 15px; height: 15px; }
.modal-x:hover { background: #e2e8f0; color: var(--ink); }
.modal-body h3 { margin: 4px 0 14px; font-size: 19px; color: var(--ink); }
.modal-body h4 { margin: 18px 0 6px; font-size: 14.5px; color: var(--ink-2); }
.modal-body p, .modal-body li { font-size: 13.5px; color: var(--muted); line-height: 1.75; }
.modal-body ul, .modal-body ol { padding-left: 20px; margin: 6px 0; }
.modal-body code {
  background: var(--blue-50); color: var(--blue-700);
  padding: 1.5px 6px; border-radius: 6px; font-size: 12.5px;
}
.modal-body pre {
  background: #0f172a; color: #dbeafe; padding: 14px 16px; border-radius: 12px;
  overflow-x: auto; font-size: 12.5px; line-height: 1.6;
}
.modal-body table { border-collapse: collapse; width: 100%; font-size: 13px; margin: 8px 0; }
.modal-body th, .modal-body td { border: 1px solid var(--line); padding: 7px 10px; text-align: left; color: var(--ink-2); }
.modal-body th { background: #f8fafc; }

/* ============ Toast ============ */
.toast {
  position: fixed; left: 50%; bottom: 34px; transform: translateX(-50%);
  background: #0f172a; color: #fff; font-size: 13px;
  padding: 10px 18px; border-radius: 999px; z-index: 200;
  box-shadow: 0 12px 30px -8px rgba(2, 20, 80, .5);
  animation: toast-in .18s ease;
}
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } }

/* ============ 响应式 ============ */
@media (max-width: 1080px) {
  .grid { grid-template-columns: 1fr 1fr; }
  .col.side { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
}
@media (max-width: 1280px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-right { justify-content: flex-start; }
}
@media (max-width: 880px) {
  .hero-inner { grid-template-columns: 1fr; gap: 30px; padding: 40px 20px 44px; }
  .hero h1 { font-size: 34px; }
  .grid { grid-template-columns: 1fr; }
  .hero-card, .country-card { width: 100%; }
}
@media (max-width: 560px) {
  .nav-links > a { display: none; }
  .brand-name { font-size: 15px; }
}
