/* Modern Digital Business Card Styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 24px 12px;
  background-color: #0b0f17;
  color: #f1f5f9;
  -webkit-font-smoothing: antialiased;
}

/* Themes */
body.theme-dark-luxury {
  background: radial-gradient(circle at 50% 0%, #1e293b 0%, #0b0f17 100%);
  --card-bg: rgba(30, 41, 59, 0.7);
  --card-border: rgba(255, 255, 255, 0.08);
  --item-bg: rgba(255, 255, 255, 0.04);
  --item-hover: rgba(255, 255, 255, 0.08);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
}

body.theme-midnight-blue {
  background: radial-gradient(circle at 50% 0%, #0f274a 0%, #030a17 100%);
  --card-bg: rgba(15, 39, 74, 0.65);
  --card-border: rgba(96, 165, 250, 0.15);
  --item-bg: rgba(255, 255, 255, 0.05);
  --item-hover: rgba(96, 165, 250, 0.12);
  --text-main: #ffffff;
  --text-muted: #93c5fd;
}

body.theme-emerald-prestige {
  background: radial-gradient(circle at 50% 0%, #063928 0%, #02140d 100%);
  --card-bg: rgba(6, 57, 40, 0.65);
  --card-border: rgba(52, 211, 153, 0.2);
  --item-bg: rgba(255, 255, 255, 0.05);
  --item-hover: rgba(52, 211, 153, 0.12);
  --text-main: #f0fdf4;
  --text-muted: #86efac;
}

body.theme-sunset-gold {
  background: radial-gradient(circle at 50% 0%, #3d2406 0%, #170d02 100%);
  --card-bg: rgba(61, 36, 6, 0.65);
  --card-border: rgba(251, 191, 36, 0.2);
  --item-bg: rgba(255, 255, 255, 0.05);
  --item-hover: rgba(251, 191, 36, 0.12);
  --text-main: #fffbeb;
  --text-muted: #fde68a;
}

body.theme-clean-minimal {
  background: #f1f5f9;
  --card-bg: #ffffff;
  --card-border: #e2e8f0;
  --item-bg: #f8fafc;
  --item-hover: #eef2f6;
  --text-main: #0f172a;
  --text-muted: #64748b;
  color: #0f172a;
}

.card-wrapper {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
}

.card-container {
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--card-border);
  border-radius: 28px;
  padding: 24px 20px 28px;
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.4);
}

/* Top bar */
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.icon-btn {
  background: var(--item-bg);
  border: 1px solid var(--card-border);
  color: var(--text-muted);
  padding: 8px 14px;
  border-radius: 9999px;
  font-size: 0.82rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.icon-btn:hover {
  background: var(--item-hover);
  color: var(--text-main);
  transform: translateY(-1px);
}

/* Profile Header */
.profile-header {
  text-align: center;
  margin-bottom: 24px;
}

.avatar-container {
  position: relative;
  width: 110px;
  height: 110px;
  margin: 0 auto 16px;
}

.avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  background: #1e293b;
}

.verified-badge {
  position: absolute;
  bottom: 2px;
  right: 2px;
  color: #3b82f6;
  background: #ffffff;
  border-radius: 50%;
  font-size: 1.15rem;
  line-height: 1;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.profile-name {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.profile-title {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 8px;
}

.company-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--item-bg);
  border: 1px solid var(--card-border);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 8px;
}

.company-badge i {
  color: var(--accent);
}

.profile-location {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.profile-location i {
  color: #ef4444;
}

/* Primary Action - Save to Contacts */
.primary-action {
  margin-bottom: 22px;
}

.btn-save-contact {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 20px;
  background: linear-gradient(135deg, var(--accent) 0%, #2563eb 100%);
  color: #ffffff;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  border-radius: 16px;
  box-shadow: 0 8px 20px -4px rgba(37, 99, 235, 0.5);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-save-contact:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -4px rgba(37, 99, 235, 0.6);
}

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

/* Quick Connect 4-Grid */
.quick-connect-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}

.quick-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: var(--text-main);
  font-size: 0.78rem;
  font-weight: 500;
  transition: transform 0.2s ease;
}

.quick-btn:hover {
  transform: translateY(-3px);
}

.quick-btn-icon {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: #ffffff;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.call-bg { background: linear-gradient(135deg, #10b981 0%, #059669 100%); }
.whatsapp-bg { background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%); }
.email-bg { background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%); }
.web-bg { background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%); }

/* Section Card & Bio */
.section-card {
  background: var(--item-bg);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  padding: 16px 18px;
  margin-bottom: 22px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.section-title i {
  color: var(--accent);
}

.bio-text {
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text-main);
  white-space: pre-line;
}

/* Info Badges & Address */
.info-badges-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.info-badge-item {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--card-border);
  padding: 8px 12px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
}

.badge-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.badge-val {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
}

.badge-val.blood-val {
  color: #ef4444;
  font-weight: 800;
}

.badge-val.mono {
  font-family: monospace;
  font-size: 0.82rem;
}

.address-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 10px 12px;
  margin-top: 8px;
}

.addr-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 4px;
}

.addr-title i {
  color: var(--accent);
}

.addr-desc {
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--text-main);
}

/* Links Section */
.links-section {
  margin-bottom: 24px;
}

.links-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.link-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--item-bg);
  border: 1px solid var(--card-border);
  padding: 14px 16px;
  border-radius: 16px;
  text-decoration: none;
  color: var(--text-main);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.link-item:hover {
  background: var(--item-hover);
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.link-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.08);
  color: var(--accent);
}

/* Brand specific colors */
.link-icon.whatsapp { background: rgba(37, 211, 102, 0.15); color: #25d366; }
.link-icon.linkedin { background: rgba(10, 102, 194, 0.15); color: #0a66c2; }
.link-icon.facebook { background: rgba(24, 119, 242, 0.15); color: #1877f2; }
.link-icon.twitter, .link-icon.x { background: rgba(255, 255, 255, 0.1); color: #f8fafc; }
.link-icon.instagram { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%); color: #ffffff; }
.link-icon.youtube { background: rgba(255, 0, 0, 0.15); color: #ff0000; }
.link-icon.github { background: rgba(255, 255, 255, 0.1); color: #f8fafc; }
.link-icon.telegram { background: rgba(0, 136, 204, 0.15); color: #0088cc; }

.link-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.link-title {
  font-size: 0.95rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.link-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.link-arrow {
  color: var(--text-muted);
  font-size: 0.85rem;
  transition: transform 0.2s;
}

.link-item:hover .link-arrow {
  transform: translateX(3px);
  color: var(--accent);
}

/* Footer */
.card-footer {
  text-align: center;
  padding-top: 16px;
  border-top: 1px solid var(--card-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.copyright {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.admin-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  color: var(--text-muted);
  text-decoration: none;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.2s;
}

.admin-link:hover {
  color: var(--accent);
  background: var(--item-bg);
}

/* QR Code Modal */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
}

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

.modal-card {
  position: relative;
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  width: 100%;
  max-width: 360px;
  padding: 28px 24px;
  text-align: center;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
  color: #f8fafc;
  transform: scale(0.92);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-backdrop.active .modal-card {
  transform: scale(1);
}

.modal-close-btn {
  position: absolute;
  top: 16px;
  right: 18px;
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}

.modal-header i {
  font-size: 2rem;
  color: var(--accent);
  margin-bottom: 8px;
}

.modal-header h3 {
  font-size: 1.25rem;
  margin-bottom: 4px;
}

.modal-header p {
  font-size: 0.85rem;
  color: #94a3b8;
  margin-bottom: 20px;
}

.qr-preview-box {
  background: #ffffff;
  padding: 16px;
  border-radius: 16px;
  display: inline-block;
  margin-bottom: 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.qr-image {
  width: 190px;
  height: 190px;
  display: block;
}

.btn-download-qr {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 18px;
  background: var(--accent);
  color: #ffffff;
  text-decoration: none;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: opacity 0.2s;
}

.btn-download-qr:hover {
  opacity: 0.9;
}
