/* ==========================================================================
   走哪啦 (ZounaLa) - 个人名片 Web 端高级苹果风格样式表
   Apple Pro Aesthetic Design System
   ========================================================================== */

:root {
  /* 品牌与基底色彩 */
  --bg-primary: #050508;
  --bg-secondary: #0c0d14;
  --bg-card: rgba(18, 20, 29, 0.72);
  --bg-card-hover: rgba(26, 29, 42, 0.82);
  --bg-glass: rgba(14, 16, 24, 0.78);
  --bg-pill: rgba(255, 255, 255, 0.08);

  /* 动态强调色 (默认走哪啦春日绿，可随用户名片动态变色) */
  --accent-color: #30d158;
  --accent-glow: rgba(48, 209, 88, 0.35);

  /* 边框与分隔线 */
  --border-subtle: rgba(255, 255, 255, 0.09);
  --border-highlight: rgba(255, 255, 255, 0.18);
  --border-accent: rgba(48, 209, 88, 0.4);

  /* 文字配色体系 */
  --text-primary: #f5f5f7;
  --text-secondary: #8e8e93;
  --text-tertiary: #636366;

  /* 渐变体系 */
  --grad-card: linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.01) 100%);
  --grad-badge: linear-gradient(135deg, rgba(48, 209, 88, 0.2) 0%, rgba(6, 182, 212, 0.1) 100%);
  --grad-text: linear-gradient(180deg, #ffffff 0%, #a1a1a6 100%);

  /* 阴影与圆角 */
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-full: 9999px;

  --shadow-card: 0 24px 64px -12px rgba(0, 0, 0, 0.65), 0 0 1px 1px rgba(255, 255, 255, 0.1);
  --shadow-glow: 0 0 40px -10px var(--accent-glow);

  /* 字体族 */
  --font-stack: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: "SF Mono", "Menlo", "Consolas", monospace;
}

/* 基础重置 */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html, body {
  width: 100%;
  min-height: 100%;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-stack);
  overflow-x: hidden;
  user-select: none;
}

/* 页面深邃背景光晕 */
.bg-glow-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.35;
  will-change: transform;
}

.orb-primary {
  width: 500px;
  height: 500px;
  background: var(--accent-color);
  top: -100px;
  right: -50px;
  animation: floatOrb 16s ease-in-out infinite alternate;
}

.orb-secondary {
  width: 450px;
  height: 450px;
  background: #0071e3;
  bottom: -50px;
  left: -80px;
  opacity: 0.25;
  animation: floatOrb 20s ease-in-out infinite alternate-reverse;
}

@keyframes floatOrb {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-40px, 60px) scale(1.1); }
}

/* 网格纹理 */
.bg-grid {
  position: fixed;
  inset: 0;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

/* 页面根容器 */
.page-layout {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 24px 16px;
}

/* 顶栏控制栏 (品牌 + 语言切换) */
.top-bar {
  width: 100%;
  max-width: 480px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  margin-bottom: 24px;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.brand-icon {
  width: 22px;
  height: 22px;
  border-radius: 6px;
}

.brand-badge {
  font-size: 10px;
  padding: 2px 7px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-weight: 500;
}

/* 多语言按钮组 */
.lang-selector {
  display: flex;
  gap: 4px;
  background: rgba(0, 0, 0, 0.35);
  padding: 3px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.lang-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s ease;
}

.lang-btn:hover {
  color: var(--text-primary);
}

.lang-btn.active {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  font-weight: 600;
}

/* 主展示区域 */
.main-stage {
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: auto 0;
}

/* ==========================================================================
   名片核心主体与 3D 视差包裹器
   ========================================================================== */
.card-perspective-wrapper {
  width: 100%;
  perspective: 1200px;
  will-change: transform;
}

.personal-card {
  position: relative;
  width: 100%;
  background: var(--bg-card);
  backdrop-filter: blur(28px) saturate(190%);
  -webkit-backdrop-filter: blur(28px) saturate(190%);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 28px 24px;
  box-shadow: var(--shadow-card), var(--shadow-glow);
  transform-style: preserve-3d;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
}

.personal-card:hover {
  border-color: var(--border-highlight);
}

/* 3D 鼠标光影反射层 */
.card-shine-layer {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-xl);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 10;
}

/* 顶部微渐变细条装饰 */
.card-top-accent {
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
  opacity: 0.8;
}

/* 探索者身份区块 */
.card-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
}

/* 头像容器 */
.avatar-frame {
  position: relative;
  flex-shrink: 0;
}

.avatar-image {
  width: 76px;
  height: 76px;
  border-radius: 20px;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  background-color: var(--bg-secondary);
}

.avatar-ring {
  position: absolute;
  inset: -4px;
  border-radius: 24px;
  border: 1.5px dashed var(--accent-color);
  opacity: 0.5;
  pointer-events: none;
  animation: rotateRing 28s linear infinite;
}

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

/* 身份文字信息 */
.identity-info {
  flex: 1;
  min-width: 0;
}

.verified-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-color);
  background: var(--grad-badge);
  border: 1px solid var(--border-accent);
  padding: 3px 9px;
  border-radius: var(--radius-full);
  margin-bottom: 6px;
}

.verified-pill svg {
  width: 12px;
  height: 12px;
  fill: currentColor;
}

.display-name {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.25;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

/* 二级域名胶囊短地址 */
.domain-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: #2997ff;
  background: rgba(41, 151, 255, 0.1);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(41, 151, 255, 0.25);
  cursor: pointer;
  transition: all 0.2s ease;
}

.domain-pill:hover {
  background: rgba(41, 151, 255, 0.18);
  border-color: rgba(41, 151, 255, 0.45);
}

.domain-pill svg {
  width: 11px;
  height: 11px;
  fill: currentColor;
}

/* 个人简介气泡 */
.bio-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 20px;
}

.bio-text {
  font-size: 13.5px;
  line-height: 1.55;
  color: #d1d1d6;
  font-weight: 400;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 三联数据看板 (打卡 / 发呆 / 瞬间) */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.stat-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  padding: 12px 6px;
  text-align: center;
  transition: all 0.2s ease;
}

.stat-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
}

.stat-icon {
  font-size: 16px;
  margin-bottom: 4px;
}

.stat-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  margin-bottom: 2px;
}

.stat-label {
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 500;
}

/* 最后打卡行踪胶囊 (含脉冲雷达绿点) */
.last-location-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  margin-bottom: 24px;
}

.radar-pulse {
  position: relative;
  width: 10px;
  height: 10px;
  flex-shrink: 0;
}

.pulse-dot {
  width: 10px;
  height: 10px;
  background: var(--accent-color);
  border-radius: 50%;
}

.pulse-ring {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid var(--accent-color);
  opacity: 0.8;
  animation: radarWave 2s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
}

@keyframes radarWave {
  0% { transform: scale(0.6); opacity: 0.9; }
  100% { transform: scale(2.2); opacity: 0; }
}

.location-details {
  flex: 1;
  min-width: 0;
}

.location-prefix {
  font-size: 10.5px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 1px;
}

.location-name {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 操作操作栏 */
.card-actions-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.btn-action-primary {
  grid-column: span 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #e0e0e2 100%);
  color: #000000;
  font-size: 14px;
  font-weight: 600;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(255, 255, 255, 0.15);
  transition: all 0.2s ease;
}

.btn-action-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(255, 255, 255, 0.25);
}

.btn-action-primary svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.btn-action-secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  font-size: 12.5px;
  font-weight: 500;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-action-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--border-highlight);
}

.btn-action-secondary svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

/* 开发者 Mock 标牌 */
.dev-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 16px;
  font-size: 11px;
  color: #ffd60a;
  background: rgba(255, 214, 10, 0.08);
  border: 1px dashed rgba(255, 214, 10, 0.35);
  padding: 6px 12px;
  border-radius: var(--radius-full);
}

/* ==========================================================================
   404 未认领界面 (Not Found / Unclaimed)
   ========================================================================== */
.state-container {
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
}

.not-found-card {
  width: 100%;
  background: var(--bg-card);
  backdrop-filter: blur(28px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 36px 24px;
  box-shadow: var(--shadow-card);
}

.not-found-icon-box {
  width: 68px;
  height: 68px;
  margin: 0 auto 18px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-subtle);
}

.not-found-icon-box svg {
  width: 32px;
  height: 32px;
  fill: var(--text-secondary);
}

.not-found-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 6px;
}

.not-found-prefix-pill {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 13px;
  color: #ff9f0a;
  background: rgba(255, 159, 10, 0.1);
  border: 1px solid rgba(255, 159, 10, 0.25);
  padding: 3px 12px;
  border-radius: var(--radius-full);
  margin-bottom: 14px;
}

.not-found-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 12px;
}

.not-found-tip-box {
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-md);
  padding: 14px;
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 24px;
  text-align: left;
}

/* 骨架屏 Loading */
.skeleton-card {
  width: 100%;
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: 28px 24px;
  border: 1px solid var(--border-subtle);
}

.skeleton-pulse {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.03) 25%, rgba(255, 255, 255, 0.08) 50%, rgba(255, 255, 255, 0.03) 75%);
  background-size: 200% 100%;
  animation: skeletonLoading 1.5s infinite;
  border-radius: var(--radius-sm);
}

@keyframes skeletonLoading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ==========================================================================
   模态弹窗 (二维码与海报预览)
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
  padding: 20px;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  position: relative;
  background: var(--bg-secondary);
  border: 1px solid var(--border-highlight);
  border-radius: var(--radius-xl);
  padding: 28px 24px;
  max-width: 360px;
  width: 100%;
  text-align: center;
  transform: scale(0.92);
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.8);
}

.modal-overlay.active .modal-content {
  transform: scale(1);
}

.modal-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.modal-title {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 6px;
}

.modal-subtitle {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 18px;
}

.qr-code-box {
  background: #ffffff;
  padding: 16px;
  border-radius: 20px;
  display: inline-block;
  margin-bottom: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.qr-code-box canvas, .qr-code-box img {
  display: block;
  width: 200px;
  height: 200px;
}

.poster-preview-img {
  width: 100%;
  max-height: 440px;
  object-fit: contain;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  border: 1px solid var(--border-subtle);
}

/* 浮动 Toast */
.toast-pill {
  position: fixed;
  top: 36px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: rgba(20, 20, 25, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: #ffffff;
  font-size: 13px;
  font-weight: 500;
  padding: 9px 18px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  pointer-events: none;
}

.toast-pill.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  visibility: visible;
}

/* 页脚 */
.site-footer {
  width: 100%;
  text-align: center;
  font-size: 11px;
  color: var(--text-tertiary);
  padding: 16px 0 6px;
}

/* 响应式微调 */
@media (max-width: 480px) {
  .page-layout {
    padding: 16px 12px;
  }
  .personal-card {
    padding: 24px 18px;
  }
  .display-name {
    font-size: 20px;
  }
  .stat-value {
    font-size: 18px;
  }
}
