/**
 * Cute Business Card Stylesheet
 * A modern, professional design with playful elements
 */

/* CSS Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  /* Ensure dark background extends to viewport edges on iOS */
  background: #0a0a0a;
  min-height: 100vh;
  min-height: -webkit-fill-available;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  font-weight: 400;
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 40%, #252525 50%, #1a1a1a 60%, #0a0a0a 100%);
  background-attachment: fixed;
  min-height: 100vh;
  /* Support iOS safe areas (notch/dynamic island) */
  min-height: 100vh;
  min-height: -webkit-fill-available;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Respect safe area insets while maintaining minimum 20px padding */
  padding: max(20px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
  color: #2d3748;
}

/* Business Card Container */
.business-card {
  background: #FDFBF9;
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  max-width: 428px;
  width: 100%;
  padding: 40px;
  position: relative;
  overflow: hidden;
  animation: fadeInUp 0.6s ease;
}


/* Header Section */
.card-header {
  text-align: center;
  margin-bottom: 30px;
  position: relative;
}

/* Company Logo */
.company-logo {
  width: 95%;
  max-height: 80px;
  margin-bottom: 20px;
  display: block;
  margin-left: auto;
  margin-right: auto;
  animation: fadeIn 0.4s ease;
  transition: transform 0.3s ease;
}

.company-logo:hover {
  transform: scale(1.05);
}

/* Avatar */
.avatar {
  width: 84%;
  max-width: 394px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  object-fit: cover;
  margin: 20px auto;
  display: block;
  padding: 8px;
  background: white;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  animation: fadeIn 0.5s ease;
}

.card-name {
  font-family: 'Bitter', serif;
  font-size: 2.25rem;
  font-weight: 700;
  color: #2B2B2B;
  margin-bottom: 8px;
  animation: slideInDown 0.5s ease;
}

.card-title {
  font-size: 1.125rem;
  font-weight: 500;
  color: #404040;
  margin-bottom: 20px;
  animation: slideInDown 0.6s ease;
}

/* Divider */
.divider {
  width: 60px;
  height: 3px;
  background: #B35407;
  margin: 0 auto 25px;
  border-radius: 3px;
  animation: expandWidth 0.8s ease;
}

/* Info Section */
.card-info {
  margin-bottom: 30px;
  text-align: center;
}

.info-item {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 0;
  border-bottom: 1px solid #E8E5E0;
  transition: background 0.6s ease;
  animation: fadeIn 0.7s ease;
}

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

.info-item:hover {
  background: linear-gradient(to right, transparent, #F5F3F0 20%, #F5F3F0 80%, transparent);
}

.info-label {
  display: none;
}

.info-value {
  color: #404040;
  font-size: 1.0625rem;
  word-break: break-word;
}

.info-value i {
  margin-right: 8px;
  color: #2B2B2B;
}

.info-value a {
  color: #B35407;
  text-decoration: none;
  transition: color 0.3s ease;
}

.info-value a:hover {
  color: #8B4106;
  text-decoration: underline;
}

/* QR Code Section */
.qr-section {
  text-align: center;
  padding-top: 20px;
  border-top: 2px solid #E8E5E0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.qr-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #404040;
  margin-bottom: 15px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.qr-code {
  display: inline-block;
  padding: 15px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  animation: fadeIn 0.8s ease;
}

.qr-code:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.3);
}

.qr-code img {
  width: 150px;
  height: 150px;
  display: block;
  border-radius: 8px;
  transition: opacity 0.3s ease;
}

/* QR Toggle Buttons */
.qr-toggle-buttons {
  display: inline-flex;
  gap: 0;
  margin-top: 12px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.qr-toggle-btn {
  padding: 6px 12px;
  border: none;
  background: white;
  color: #404040;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-toggle-btn:first-child {
  border-right: 1px solid #E8E5E0;
}

.qr-toggle-btn i {
  font-size: 0.85rem;
}

.qr-toggle-btn:hover {
  background: #F5F3F0;
}

.qr-toggle-btn.active {
  background: #E8E5E0;
  color: #2B2B2B;
}

.qr-toggle-btn.active:hover {
  background: #E8E5E0;
}

/* Action Buttons Section */
.action-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 25px;
  animation: fadeIn 0.9s ease;
}

.action-btn {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 12px 16px;
  background: white;
  border: 1px solid #E8E5E0;
  border-radius: 8px;
  color: #404040;
  text-decoration: none;
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.action-btn i {
  color: #B35407;
  font-size: 1rem;
}

.action-btn:hover {
  background: #F5F3F0;
  border-color: #E8E5E0;
  color: #2B2B2B;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.action-btn:active {
  transform: translateY(0);
}

/* Footer */
.card-logo {
  text-align: center;
  margin-top: 20px;
  padding: 0;
}

.card-logo .company-logo {
  max-width: 80px;
  max-height: 80px;
  width: auto;
  height: auto;
  transition: transform 0.3s ease;
}

.card-logo .company-logo:hover {
  transform: scale(1.02);
}

.card-footer {
  text-align: center;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #E8E5E0;
}

.footer-text {
  font-size: 0.75rem;
  color: #404040;
  font-weight: 400;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes expandWidth {
  from {
    width: 0;
  }
  to {
    width: 60px;
  }
}

/* Responsive Design */
@media (max-width: 600px) {
  .business-card {
    padding: 30px 20px;
  }

  .card-name {
    font-size: 1.5rem;
  }

  .card-title {
    font-size: 0.9rem;
  }

  .info-label {
    min-width: 70px;
    font-size: 0.85rem;
  }

  .info-value {
    font-size: 0.9rem;
  }

  .qr-code img {
    width: 120px;
    height: 120px;
  }

  .qr-toggle-btn {
    padding: 5px 10px;
  }

  .qr-toggle-btn i {
    font-size: 0.8rem;
  }

  .action-buttons {
    gap: 8px;
  }

  .action-btn {
    padding: 10px 12px;
    font-size: 0.8rem;
  }

  .action-btn i {
    font-size: 0.9rem;
  }
}

/* Print Styles */
@media print {
  body {
    background: white;
    padding: 0;
  }

  .business-card {
    box-shadow: none;
    animation: none;
  }

  .business-card:hover {
    transform: none;
  }

  .qr-code:hover {
    transform: none;
  }
}
