/* ============================================
   聚保盆电子名片展示页 - 样式
   深色科技风 v8 风格
   ============================================ */

:root {
  --bg-dark: #0a0a1a;
  --bg-card: rgba(255, 255, 255, 0.04);
  --bg-card-hover: rgba(255, 255, 255, 0.06);
  --color-primary: #00d4ff;
  --color-secondary: #7b68ee;
  --color-accent: #00e676;
  --color-text: #e0e0e0;
  --color-text-muted: #6a6a7a;
  --color-text-bright: #ffffff;
  --color-border: rgba(255, 255, 255, 0.08);
  --gradient-primary: linear-gradient(135deg, #00d4ff, #7b68ee);
  --radius: 16px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background: var(--bg-dark);
  color: var(--color-text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* 背景动效 */
.card-page-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, #0a0a1a 0%, #0d0d2b 50%, #1a1a3e 100%);
  z-index: 0;
}

.card-page-bg::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(ellipse at 30% 20%, rgba(0, 212, 255, 0.06) 0%, transparent 50%),
              radial-gradient(ellipse at 70% 80%, rgba(123, 104, 238, 0.04) 0%, transparent 50%);
  animation: bgShift 20s ease infinite;
}

@keyframes bgShift {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-2%, -1%); }
}

/* 名片容器 */
.card-container {
  position: relative;
  z-index: 1;
  max-width: 420px;
  margin: 0 auto;
  padding: 20px 16px 100px;
  min-height: 100vh;
}

/* 头部 - 个人信息 */
.profile-section {
  text-align: center;
  padding: 40px 20px 30px;
  animation: fadeSlideUp 0.8s ease;
}

.avatar-wrapper {
  position: relative;
  display: inline-block;
  margin-bottom: 20px;
}

.avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 3px solid transparent;
  background-origin: border-box;
  background-clip: content-box, border-box;
  background-image: linear-gradient(#0a0a1a, #0a0a1a), var(--gradient-primary);
  object-fit: cover;
  display: block;
}

.avatar-placeholder {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.2), rgba(123, 104, 238, 0.2));
  border: 3px solid transparent;
  background-origin: border-box;
  background-clip: content-box, border-box;
  background-image: linear-gradient(rgba(0, 212, 255, 0.1), rgba(123, 104, 238, 0.1)), linear-gradient(135deg, #00d4ff, #7b68ee);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  color: var(--color-primary);
}

.profile-name {
  font-size: 26px;
  font-weight: 700;
  color: var(--color-text-bright);
  margin-bottom: 6px;
  letter-spacing: 1px;
}

.profile-title {
  font-size: 15px;
  color: var(--color-primary);
  margin-bottom: 4px;
  font-weight: 500;
}

.profile-company {
  font-size: 13px;
  color: var(--color-text-muted);
}

/* 个人简介 */
.intro-section {
  background: var(--bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 16px;
  animation: fadeSlideUp 0.8s ease 0.1s both;
}

.intro-text {
  font-size: 14px;
  line-height: 1.8;
  color: var(--color-text);
}

/* 服务标签 */
.services-section {
  margin-bottom: 16px;
  animation: fadeSlideUp 0.8s ease 0.2s both;
}

.services-label {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.services-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.service-tag {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  background: rgba(0, 212, 255, 0.08);
  border: 1px solid rgba(0, 212, 255, 0.15);
  color: var(--color-primary);
  transition: all 0.3s ease;
}

.service-tag:hover {
  background: rgba(0, 212, 255, 0.15);
  transform: translateY(-1px);
}

/* 联系信息 */
.contact-section {
  background: var(--bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 4px 0;
  margin-bottom: 16px;
  animation: fadeSlideUp 0.8s ease 0.3s both;
}

.contact-item {
  display: flex;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--color-border);
  transition: background 0.2s ease;
}

.contact-item:last-child {
  border-bottom: none;
}

.contact-item:hover {
  background: rgba(255, 255, 255, 0.02);
}

.contact-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin-right: 14px;
  flex-shrink: 0;
}

.contact-icon.phone-icon {
  background: rgba(0, 230, 118, 0.1);
}

.contact-icon.email-icon {
  background: rgba(0, 212, 255, 0.1);
}

.contact-icon.address-icon {
  background: rgba(123, 104, 238, 0.1);
}

.contact-icon.wechat-icon {
  background: rgba(0, 230, 118, 0.1);
}

.contact-info {
  flex: 1;
  min-width: 0;
}

.contact-label {
  font-size: 11px;
  color: var(--color-text-muted);
  margin-bottom: 2px;
}

.contact-value {
  font-size: 14px;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.contact-action {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  color: var(--color-text-muted);
}

.contact-action:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: rgba(0, 212, 255, 0.05);
}

/* 底部操作栏 */
.action-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(10, 10, 26, 0.95);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--color-border);
  padding: 12px 16px;
  display: flex;
  justify-content: center;
  gap: 12px;
  z-index: 100;
}

.action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 16px;
  border-radius: 12px;
  border: 1px solid var(--color-border);
  background: var(--bg-card);
  color: var(--color-text-muted);
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.action-btn .action-icon {
  font-size: 20px;
}

.action-btn:hover,
.action-btn:active {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: rgba(0, 212, 255, 0.05);
}

.action-btn.primary-action {
  background: var(--gradient-primary);
  border-color: transparent;
  color: white;
}

.action-btn.primary-action:hover {
  opacity: 0.9;
  box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
}

/* 企业信息底部 */
.company-footer {
  text-align: center;
  padding: 20px;
  font-size: 12px;
  color: var(--color-text-muted);
  animation: fadeSlideUp 0.8s ease 0.4s both;
}

.company-footer .powered {
  opacity: 0.5;
  margin-top: 8px;
}

/* 加载状态 */
.page-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  color: var(--color-text-muted);
}

.page-loading .loader {
  width: 50px;
  height: 50px;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 16px;
}

/* 错误状态 */
.page-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  color: var(--color-text-muted);
  text-align: center;
  padding: 20px;
}

.page-error .error-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

/* 动画 */
@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* 响应式 */
@media (max-width: 480px) {
  .card-container {
    padding: 12px 12px 90px;
  }
  
  .profile-section {
    padding: 30px 16px 24px;
  }
  
  .profile-name {
    font-size: 22px;
  }
  
  .action-btn {
    padding: 6px 12px;
  }
}
