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

html, body {
  height: 100%;
  width: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  color: #5e5e5e;
  overflow-x: hidden;
}

#app {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.page-wrapper {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.page-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 0;
}

.page-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  padding: 80px 24px 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* 顶部工具栏 */
.toolbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  padding: 16px 20px;
  z-index: 10;
}

.toolbar-btn {
  width: 36px;
  height: 36px;
  border: none;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  transition: background 0.2s;
}

.toolbar-btn:hover {
  background: rgba(255, 255, 255, 0.85);
}

.toolbar-btn svg {
  width: 18px;
  height: 18px;
  fill: #666;
}

.toolbar-right {
  display: flex;
  gap: 10px;
}

/* 头像区域 */
.profile-section {
  text-align: center;
  margin-bottom: 24px;
  width: 100%;
}

.avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 16px;
  display: block;
  border: 3px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  background: #fff;
}

.profile-title {
  font-size: 22px;
  font-weight: 700;
  color: #333;
  margin-bottom: 12px;
}

.profile-bio {
  font-size: 14px;
  line-height: 1.8;
  color: #666;
  margin-bottom: 12px;
}

.bio-highlight {
  color: #ff5722;
  font-weight: 600;
}

.bio-bold {
  font-weight: 700;
  color: #444;
}

.bio-gold {
  color: #d4a017;
  font-weight: 700;
}

.profile-slug {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #888;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background 0.2s;
}

.profile-slug:hover {
  background: rgba(0, 0, 0, 0.05);
}

.profile-slug svg {
  width: 14px;
  height: 14px;
  fill: #888;
}

/* 链接列表 */
.links-section {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 8px;
}

.link-item {
  display: flex;
  align-items: center;
  padding: 7px 12px 7px 8px;
  min-height: 56px;
  border: 1px solid rgb(157, 157, 157);
  border-radius: 30px;
  background-color: rgba(0, 0, 0, 0);
  color: rgb(94, 94, 94);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}

.link-item:hover {
  background-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.link-icon-box {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 10px;
  border-radius: 50%;
  overflow: hidden;
  background: #fff;
}

.link-icon-box img,
.link-icon {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: contain;
  object-position: center;
}

.link-text {
  flex: 1;
  min-width: 0;
  font-size: 15px;
  line-height: 1.4;
  text-align: center;
  padding: 0 8px;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.link-arrow {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-right: 8px;
  opacity: 0.5;
}

.link-arrow svg {
  width: 100%;
  height: 100%;
  fill: #999;
}

/* 底部 */
.footer {
  margin-top: 40px;
  text-align: center;
  font-size: 12px;
  color: #aaa;
}

/* 加载动画 */
.loading {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  z-index: 100;
}

.load-spinner {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: #7C3AED;
  animation: loadBox 1.7s infinite ease, round 1.7s infinite ease;
}

@keyframes loadBox {
  0% { box-shadow: 0 -0.83em 0 -0.4em, 0 -0.83em 0 -0.42em, 0 -0.83em 0 -0.44em, 0 -0.83em 0 -0.46em, 0 -0.83em 0 -0.477em; }
  5%, 95% { box-shadow: 0 -0.83em 0 -0.4em, 0 -0.83em 0 -0.42em, 0 -0.83em 0 -0.44em, 0 -0.83em 0 -0.46em, 0 -0.83em 0 -0.477em; }
  10%, 59% { box-shadow: 0 -0.83em 0 -0.4em, -0.087em -0.825em 0 -0.42em, -0.173em -0.812em 0 -0.44em, -0.256em -0.789em 0 -0.46em, -0.297em -0.775em 0 -0.477em; }
  20% { box-shadow: 0 -0.83em 0 -0.4em, -0.338em -0.758em 0 -0.42em, -0.555em -0.617em 0 -0.44em, -0.671em -0.488em 0 -0.46em, -0.749em -0.34em 0 -0.477em; }
  38% { box-shadow: 0 -0.83em 0 -0.4em, -0.377em -0.74em 0 -0.42em, -0.645em -0.522em 0 -0.44em, -0.775em -0.297em 0 -0.46em, -0.82em -0.09em 0 -0.477em; }
  100% { box-shadow: 0 -0.83em 0 -0.4em, 0 -0.83em 0 -0.42em, 0 -0.83em 0 -0.44em, 0 -0.83em 0 -0.46em, 0 -0.83em 0 -0.477em; }
}

@keyframes round {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* 二维码侧边栏 (桌面端) */
.qr-sidebar {
  position: fixed;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  text-align: center;
  z-index: 10;
  display: none;
}

.qr-sidebar canvas {
  display: block;
  margin: 0 auto 10px;
}

.qr-sidebar p {
  font-size: 12px;
  color: #999;
  line-height: 1.6;
}

@media (min-width: 900px) {
  .qr-sidebar {
    display: block;
  }
}

@media (max-width: 480px) {
  #app {
    justify-content: flex-start;
  }
  .page-content {
    padding: 70px 16px 60px;
  }
  .avatar {
    width: 80px;
    height: 80px;
  }
  .profile-title {
    font-size: 20px;
  }
  .link-text {
    font-size: 14px;
  }
  .link-icon-box {
    width: 36px;
    height: 36px;
    margin-right: 8px;
  }
}

.hidden {
  display: none !important;
}
