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

body {
  margin: 0;
  font-family: 'Poppins', sans-serif;
}

.card-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
  padding: 1.5rem;
}

.business-card {
  width: 100%;
  max-width: 400px;
  padding: 1.5rem;
  border-radius: 1rem;
  text-align: center;
  color: #fff;
  background-color: #0a0a0a;
  background-image:
    linear-gradient(180deg, rgba(10, 10, 10, 0.35) 0%, rgba(10, 10, 10, 0.85) 55%, rgba(10, 10, 10, 0.95) 100%),
    radial-gradient(circle at 50% 100%, rgba(125, 92, 64, 0.45) 0%, transparent 55%);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.25);
}

.brand {
  font-size: 0.875rem;
  letter-spacing: 0.2em;
  font-weight: 300;
  margin-bottom: 1.5rem;
}

.avatar-wrap {
  position: relative;
  width: 6rem;
  height: 6rem;
  margin: 0 auto 1.5rem;
}

.avatar-ring {
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  border: 1px solid #7d5c40;
}

.avatar {
  width: 6rem;
  height: 6rem;
  border-radius: 9999px;
  object-fit: cover;
  display: block;
}

.avatar-fallback {
  width: 6rem;
  height: 6rem;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #3d2914 0%, #7d5c40 100%);
  color: #fff;
  font-size: 1.5rem;
  font-weight: 500;
}

.name {
  font-size: 1.5rem;
  font-weight: 500;
  margin: 0 0 0.25rem;
}

.title {
  color: #9ca3af;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 2rem;
}

.contact-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  text-align: left;
}

.contact-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  min-width: 0;
}

.contact-item span {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}

.contact-item svg {
  width: 1.25rem;
  height: 1.25rem;
  color: #9ca3af;
  flex-shrink: 0;
}

.contact-item button {
  margin-left: auto;
  padding: 0.25rem;
  border: 0;
  background: transparent;
  color: #fff;
  border-radius: 9999px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s ease, background 0.15s ease;
}

.contact-item:hover button {
  opacity: 1;
}

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

.contact-item button svg {
  width: 1rem;
  height: 1rem;
  color: currentColor;
}

.qr-wrap {
  display: flex;
  align-items: center;
}

.qr-box {
  padding: 0.25rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0.5rem;
  background: #fff;
}

.qr-box img {
  display: block;
  width: 75px;
  height: 75px;
}

.actions {
  display: flex;
  gap: 0.5rem;
}

.actions button {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  border-radius: 0.25rem;
  border: 1px solid #282828;
  background: #1a1a1a;
  color: rgba(255, 255, 255, 0.8);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
}

.actions button svg {
  width: 1rem;
  height: 1rem;
}

@media (max-width: 639px) {
  .card-page {
    padding: 0;
    background: #0a0a0a;
  }

  .business-card {
    min-height: 100vh;
    max-width: none;
    border-radius: 0;
    box-shadow: none;
    padding: 1.25rem 1rem;
    padding-bottom: max(1.25rem, env(safe-area-inset-bottom));
    overflow-x: hidden;
  }

  .contact-row {
    flex-direction: column;
    align-items: stretch;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
  }

  .contact-list {
    width: 100%;
  }

  .contact-item {
    font-size: 0.8125rem;
  }

  .contact-item button {
    opacity: 1;
    flex-shrink: 0;
  }

  .qr-wrap {
    justify-content: center;
  }
}
