/* Link3 全局样式 · 明亮清爽 */
:root {
  --bg: #f3f6f9;
  --bg-elevated: #eef2f6;
  --surface: #ffffff;
  --surface-2: #e8eef4;
  --line: rgba(15, 35, 55, .08);
  --line-strong: rgba(15, 35, 55, .14);
  --text: #152033;
  --text-soft: #3d4f66;
  --muted: #7a8ba0;
  --accent: #0d9488;
  --accent-dim: rgba(13, 148, 136, .12);
  --accent-2: #e85d4c;
  --danger: #e11d48;
  --warning: #d97706;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 12px 40px rgba(21, 40, 70, .08);
  --shadow-lg: 0 24px 60px rgba(21, 40, 70, .12);
  --font: 'Outfit', 'Noto Sans SC', system-ui, sans-serif;
  --font-display: 'Syne', 'Outfit', 'Noto Sans SC', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; color: inherit; }
ul { list-style: none; }

.page-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 70% 50% at 10% -10%, rgba(13, 148, 136, .14), transparent 55%),
    radial-gradient(ellipse 55% 40% at 95% 0%, rgba(232, 93, 76, .10), transparent 50%),
    radial-gradient(ellipse 50% 40% at 50% 100%, rgba(56, 189, 248, .08), transparent 55%),
    linear-gradient(180deg, #f7fafc 0%, #eef3f8 100%);
  pointer-events: none;
}

.container {
  width: min(1120px, calc(100% - 32px));
  margin-inline: auto;
}

/* 导航 */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  background: rgba(255, 255, 255, .78);
  border-bottom: 1px solid var(--line);
}

.site-nav .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 16px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -.03em;
}

.logo .mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, #0d9488, #14b8a6);
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(13, 148, 136, .35);
}

.logo .word {
  color: var(--text);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-links a {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  color: var(--text-soft);
  transition: .2s;
}

.nav-links a:hover { color: var(--text); background: rgba(13, 148, 136, .08); }
.nav-links a.on { color: var(--accent); background: var(--accent-dim); }

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: transform .15s, box-shadow .2s, background .2s, border-color .2s;
  white-space: nowrap;
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: linear-gradient(135deg, #0d9488, #0f766e);
  color: #fff;
  box-shadow: 0 8px 22px rgba(13, 148, 136, .28);
}

.btn-primary:hover { box-shadow: 0 12px 28px rgba(13, 148, 136, .38); }

.btn-ghost {
  background: #fff;
  border-color: var(--line-strong);
  color: var(--text);
}

.btn-ghost:hover { background: #f8fafc; border-color: var(--accent); color: var(--accent); }

.btn-soft {
  background: var(--accent-dim);
  color: var(--accent);
  border-color: rgba(13, 148, 136, .2);
}

.btn-danger {
  background: rgba(225, 29, 72, .08);
  color: var(--danger);
  border-color: rgba(225, 29, 72, .2);
}

.btn-sm { padding: 7px 14px; font-size: 13px; border-radius: 10px; }
.btn-block { width: 100%; }

/* Hero */
.hero {
  padding: 72px 0 48px;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .8);
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 24px;
  box-shadow: 0 4px 16px rgba(21, 40, 70, .04);
  animation: fadeUp .6s ease both;
}

.hero-badge i {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(13, 148, 136, .18);
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 700;
  letter-spacing: -.04em;
  line-height: 1.1;
  margin-bottom: 18px;
  color: var(--text);
  animation: fadeUp .6s .08s ease both;
}

.hero h1 em {
  font-style: normal;
  background: linear-gradient(135deg, #0d9488, #e85d4c);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p {
  max-width: 540px;
  margin: 0 auto 36px;
  color: var(--muted);
  font-size: 17px;
  animation: fadeUp .6s .16s ease both;
}

/* 搜索框 */
.search-box {
  max-width: 620px;
  margin: 0 auto;
  position: relative;
  animation: fadeUp .6s .24s ease both;
}

.search-box form {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  transition: border-color .2s, box-shadow .2s;
}

.search-box form:focus-within {
  border-color: rgba(13, 148, 136, .45);
  box-shadow: 0 0 0 4px rgba(13, 148, 136, .12), var(--shadow-lg);
}

.search-box input {
  flex: 1;
  background: transparent;
  border: 0;
  outline: none;
  padding: 12px 16px;
  font-size: 16px;
}

.search-box input::placeholder { color: var(--muted); }

.search-results {
  position: absolute;
  left: 0; right: 0; top: calc(100% + 10px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  display: none;
  z-index: 20;
  text-align: left;
}

.search-results.show { display: block; animation: fadeUp .25s ease; }

.search-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  transition: background .15s;
}

.search-item:last-child { border: 0; }
.search-item:hover { background: #f5faf9; }

.search-item img, .search-item .avatar-fallback {
  width: 44px; height: 44px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
}

.avatar-fallback {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #0d9488, #14b8a6);
  color: #fff;
  font-weight: 700;
}

.search-item .meta { flex: 1; min-width: 0; }
.search-item .meta strong { display: block; font-size: 15px; }
.search-item .meta span { color: var(--muted); font-size: 13px; }
.search-item .cid {
  font-size: 12px;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 4px 8px;
  border-radius: 6px;
  font-family: ui-monospace, monospace;
}

.search-empty {
  padding: 28px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

/* 区块 */
.section { padding: 48px 0 72px; }

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 16px;
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: -.03em;
}

.section-head p { color: var(--muted); font-size: 14px; margin-top: 4px; }

/* 名片网格 */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}

.profile-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  transition: transform .25s, border-color .25s, box-shadow .25s;
  box-shadow: 0 4px 18px rgba(21, 40, 70, .04);
}

.profile-card:hover {
  transform: translateY(-4px);
  border-color: rgba(13, 148, 136, .3);
  box-shadow: var(--shadow-lg);
}

.profile-card .cover {
  height: 88px;
  background:
    linear-gradient(135deg, rgba(13, 148, 136, .35), rgba(232, 93, 76, .22)),
    var(--surface-2);
  background-size: cover;
  background-position: center;
}

.profile-card .body { padding: 0 18px 18px; }

.profile-card .avatar {
  width: 64px; height: 64px;
  border-radius: 16px;
  border: 3px solid #fff;
  margin-top: -32px;
  object-fit: cover;
  background: var(--surface-2);
  box-shadow: 0 4px 12px rgba(21, 40, 70, .1);
}

.profile-card .avatar.fallback {
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 22px;
  color: #fff;
  background: linear-gradient(135deg, #0d9488, #14b8a6);
}

.profile-card h3 {
  margin-top: 12px;
  font-size: 17px;
  font-weight: 600;
}

.profile-card .title {
  color: var(--muted);
  font-size: 13px;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-card .bio {
  margin-top: 10px;
  color: var(--text-soft);
  font-size: 13px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.6em;
}

.profile-card .foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.profile-card .cid {
  font-size: 12px;
  font-family: ui-monospace, monospace;
  color: var(--accent);
}

.profile-card .views {
  font-size: 12px;
  color: var(--muted);
}

/* 表单 */
.auth-page {
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 36px 32px;
  box-shadow: var(--shadow-lg);
}

.auth-card h1 {
  font-family: var(--font-display);
  font-size: 26px;
  letter-spacing: -.03em;
  margin-bottom: 6px;
}

.auth-card .sub { color: var(--muted); font-size: 14px; margin-bottom: 28px; }

.form-group { margin-bottom: 16px; }

.form-group label {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: #f8fafc;
  outline: none;
  font-size: 16px;
  transition: border-color .2s, box-shadow .2s, background .2s;
}

.form-control:focus {
  border-color: rgba(13, 148, 136, .55);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, .12);
  background: #fff;
}

textarea.form-control { min-height: 110px; resize: vertical; }

.form-hint { font-size: 12px; color: var(--muted); margin-top: 6px; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.auth-foot {
  margin-top: 20px;
  text-align: center;
  font-size: 14px;
  color: var(--muted);
}

.auth-foot a { color: var(--accent); font-weight: 500; }

/* Flash */
.flash {
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 13px;
  margin-bottom: 18px;
}

.flash.success { background: rgba(13, 148, 136, .1); color: #0f766e; border: 1px solid rgba(13, 148, 136, .22); }
.flash.error { background: rgba(225, 29, 72, .08); color: var(--danger); border: 1px solid rgba(225, 29, 72, .2); }
.flash.info { background: rgba(217, 119, 6, .1); color: var(--warning); border: 1px solid rgba(217, 119, 6, .22); }

/* 仪表盘 */
.dash-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 24px;
  padding: 28px 0 60px;
  min-height: calc(100vh - 64px);
}

.dash-side {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 20px 14px;
  height: fit-content;
  position: sticky;
  top: 88px;
  box-shadow: 0 4px 18px rgba(21, 40, 70, .04);
}

.dash-side .user-brief {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 8px 18px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 12px;
}

.dash-side .user-brief img,
.dash-side .user-brief .af {
  width: 42px; height: 42px; border-radius: 12px; object-fit: cover;
}

.dash-side .user-brief .af {
  display: grid; place-items: center;
  background: linear-gradient(135deg, #0d9488, #14b8a6);
  color: #fff; font-weight: 700;
}

.dash-side .user-brief strong { display: block; font-size: 14px; }
.dash-side .user-brief span { font-size: 12px; color: var(--accent); font-family: ui-monospace, monospace; }

.dash-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 12px;
  font-size: 14px;
  color: var(--text-soft);
  margin-bottom: 2px;
  transition: .15s;
}

.dash-nav a:hover, .dash-nav a.active {
  background: var(--accent-dim);
  color: var(--accent);
}

.dash-main .panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 28px;
  margin-bottom: 20px;
  box-shadow: 0 4px 18px rgba(21, 40, 70, .04);
}

.dash-main .panel h2 {
  font-family: var(--font-display);
  font-size: 20px;
  margin-bottom: 6px;
}

.dash-main .panel .desc {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 22px;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

.stat-box {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 4px 14px rgba(21, 40, 70, .04);
}

.stat-box .label { font-size: 12px; color: var(--muted); }
.stat-box .value { font-size: 28px; font-weight: 700; font-family: var(--font-display); margin-top: 4px; letter-spacing: -.03em; }
.stat-box .value.accent { color: var(--accent); }

.tags-input {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: #f8fafc;
  min-height: 48px;
  cursor: text;
}

.tags-input .tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 13px;
}

.tags-input .tag button {
  border: 0; background: transparent; color: inherit; cursor: pointer; font-size: 14px; line-height: 1;
}

.tags-input input {
  border: 0; outline: none; background: transparent; flex: 1; min-width: 100px; padding: 4px;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 10px;
}

.photo-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.photo-item img { width: 100%; height: 100%; object-fit: cover; }

.photo-item .del {
  position: absolute;
  top: 6px; right: 6px;
  width: 24px; height: 24px;
  border-radius: 50%;
  border: 0;
  background: rgba(0,0,0,.55);
  color: #fff;
  cursor: pointer;
  font-size: 12px;
}

.photo-add {
  aspect-ratio: 1;
  border-radius: 12px;
  border: 1px dashed var(--line-strong);
  display: grid;
  place-items: center;
  color: var(--muted);
  cursor: pointer;
  transition: .2s;
  font-size: 13px;
  text-align: center;
  padding: 8px;
  background: #f8fafc;
}

.photo-add:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }

.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px 0;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  background: rgba(255,255,255,.5);
}

.password-panel { max-width: 480px; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(15, 25, 40, .88);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  cursor: zoom-out;
  -webkit-tap-highlight-color: transparent;
}

.lightbox.show { display: flex; }

.lightbox img {
  max-width: min(960px, 100%);
  max-height: 90vh;
  border-radius: 12px;
  object-fit: contain;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .35);
}

.detail-imgs a[data-lightbox] {
  cursor: zoom-in;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}

.empty-mini {
  text-align: center;
  padding: 40px 16px;
  color: var(--muted);
  background: #f7fafb;
  border-radius: 14px;
}

.empty-state .icon {
  font-size: 40px;
  margin-bottom: 12px;
  opacity: .45;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@media (max-width: 860px) {
  .dash-layout { grid-template-columns: 1fr; }
  .dash-side { position: static; }
  .dash-nav {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .dash-nav a {
    flex: 0 0 auto;
    white-space: nowrap;
    justify-content: center;
  }
  .stats-row { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .nav-links .hide-sm { display: none; }
}

@media (max-width: 560px) {
  .hero { padding: 48px 0 36px; }
  .auth-card { padding: 28px 20px; }
  .dash-main .panel { padding: 20px 16px; }
}
