/* ============================================================
   Lynkova — Public Profile Page (profile.css)
   Mobile-first, themed, premium glass design
   ============================================================ */

/* ============================================================
   PROFILE PAGE BASE
   ============================================================ */
.profile-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 75px 20px 80px;
  position: relative;
  animation: fadeIn 0.4s var(--ease-out);
}

.profile-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  /* background-attachment: fixed; */
  background-size: cover;
  background-position: center;
}

.profile-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.15);
  z-index: 2;
}

.profile-bg-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

/* Hide native iOS/Safari/Chrome media control overlays on background videos */
.profile-bg-video::-webkit-media-controls {
  display: none !important;
}
.profile-bg-video::-webkit-media-controls-start-playback-button {
  display: none !important;
}
.profile-bg-video::-webkit-media-controls-enclosure {
  display: none !important;
}

/* ============================================================
   PROFILE CARD
   ============================================================ */
.profile-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: slideUp 0.5s var(--ease-out) 0.1s both;
}

/* Cover */
.profile-cover {
  width: 100%;
  height: 140px;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  object-fit: cover;
  display: block;
  margin-bottom: -50px;
}

/* Avatar */
.profile-avatar-wrap {
  position: relative;
  z-index: 2;
  margin-bottom: 16px;
  display: inline-block;
}

.profile-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--profile-card-bg, #16161A);
  background: rgba(124, 58, 237, 0.15);
  display: block;
  box-shadow: 0 0 0 2px var(--profile-accent, #7C3AED), 0 4px 20px rgba(0, 0, 0, 0.3);
  transition: transform 0.4s var(--ease-spring);
}

.profile-avatar:hover {
  transform: scale(1.05);
}

.profile-avatar.loading {
  opacity: 0;
}

/* Availability dot */
.availability-dot {
  position: absolute;
  bottom: 6px;
  right: 6px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--green);
  border: 3px solid var(--profile-card-bg, #16161A);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
  animation: pulse 2s ease-in-out infinite;
}

/* Name & Bio */
.profile-name {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
  color: var(--profile-text-primary, #fff);
}

.profile-bio {
  font-size: 0.9375rem;
  text-align: center;
  line-height: 1.65;
  max-width: 380px;
  margin: 0 auto 16px;
  color: var(--profile-text-secondary, rgba(255, 255, 255, 0.75));
}

/* Work status badge */
.work-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--r-pill);
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--green);
  margin-bottom: 20px;
}

/* ============================================================
   SOCIAL LINKS ROW
   ============================================================ */
.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 28px;
}

.social-link {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: all var(--duration-base) var(--ease-spring);
  text-decoration: none;
  border: 1.5px solid var(--profile-card-border, rgba(255, 255, 255, 0.12));
  background: var(--profile-card-bg, rgba(255, 255, 255, 0.06));
  color: var(--profile-text-primary, rgba(255, 255, 255, 0.8));
  backdrop-filter: blur(4px);
}

.social-link:hover {
  transform: scale(1.15) translateY(-2px);
  border-color: rgba(255, 255, 255, 0.3);
  color: white;
}

/* ============================================================
   ANNOUNCEMENT BANNER
   ============================================================ */
.announcement-banner {
  width: 100%;
  background: var(--profile-card-bg, rgba(255, 255, 255, 0.06));
  border: 1.5px solid var(--profile-accent, rgba(124, 58, 237, 0.25));
  border-radius: var(--r-md);
  padding: 12px 16px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--profile-text-primary, rgba(255, 255, 255, 0.9));
  text-decoration: none;
  transition: all var(--duration-base) var(--ease-out);
}

.announcement-banner:hover {
  background: var(--profile-card-bg, rgba(255, 255, 255, 0.08));
  border-color: var(--profile-accent);
  box-shadow: 0 0 12px rgba(124, 58, 237, 0.2);
}

.announcement-emoji {
  font-size: 1.25rem;
  flex-shrink: 0;
}

/* ============================================================
   LINKS LIST
   ============================================================ */
.profile-links {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ============================================================
   LINK BUTTON BASE
   ============================================================ */
.profile-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-radius: var(--r-md);
  text-decoration: none;
  transition: transform var(--duration-slow) var(--ease-out),
    box-shadow var(--duration-slow) var(--ease-out),
    background var(--duration-base);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  border: 1.5px solid var(--profile-card-border, rgba(255, 255, 255, 0.08));
  background: var(--profile-card-bg, rgba(255, 255, 255, 0.06));
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  width: 100%;
  text-align: left;
  min-height: 52px;
  /* min tap target */
}

.profile-link::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.05);
  opacity: 0;
  transition: opacity var(--duration-fast);
}

.profile-link:hover::before {
  opacity: 1;
}

.profile-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2),
    0 0 16px var(--profile-accent-glow, rgba(124, 58, 237, 0.2));
}

.profile-link:active {
  transform: scale(0.98);
}

/* Button style variants - Specificity raised to 0, 3, 0 to override all theme defaults */
.profile-links .profile-link.btn-style-rounded {
  border-radius: var(--r-md) !important;
}

.profile-links .profile-link.btn-style-square {
  border-radius: var(--r-xs) !important;
}

.profile-links .profile-link.btn-style-pill {
  border-radius: var(--r-pill) !important;
}

.profile-links .profile-link.btn-style-dashed {
  border-radius: var(--r-md) !important;
  border-style: dashed !important;
  border-width: 1.5px !important;
  border-color: var(--profile-accent, #7C3AED) !important;
  box-shadow: 0 0 14px rgba(124, 58, 237, 0.25) !important;
  background: rgba(255, 255, 255, 0.03) !important;
}

.profile-links .profile-link.btn-style-dashed:hover {
  box-shadow: 0 0 20px var(--profile-accent, #7C3AED) !important;
  background: rgba(255, 255, 255, 0.08) !important;
}

.profile-links .profile-link.btn-style-glass {
  border-radius: var(--r-md) !important;
  background: rgba(255, 255, 255, 0.08) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2) !important;
}

.profile-links .profile-link.btn-style-glass:hover {
  background: rgba(255, 255, 255, 0.14) !important;
  border-color: rgba(255, 255, 255, 0.3) !important;
}

.profile-links .profile-link.btn-style-outline {
  background: transparent !important;
  border-width: 2px !important;
  border-style: solid !important;
  border-color: var(--profile-accent, #7C3AED) !important;
}

.profile-links .profile-link.btn-style-soft {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15) !important;
  border-radius: var(--r-md) !important;
}

/* Link icon */
.plink-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--r-sm);
  background: var(--profile-card-border, rgba(255, 255, 255, 0.1));
  border: 1px solid var(--profile-card-border, rgba(255, 255, 255, 0.15));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
  overflow: hidden;
}

.plink-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

/* Link text */
.plink-text {
  flex: 1;
  min-width: 0;
}

.plink-title {
  font-size: 0.9375rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--profile-text-primary, #fff);
}

.plink-desc {
  font-size: 0.8rem;
  margin-top: 2px;
  opacity: 0.75;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--profile-text-secondary, rgba(255, 255, 255, 0.7));
}

/* Thumbnail */
.plink-thumbnail {
  width: 64px;
  height: 44px;
  border-radius: var(--r-sm);
  object-fit: cover;
  flex-shrink: 0;
}

/* Arrow */
.plink-arrow {
  font-size: 0.9rem;
  opacity: 0.4;
  flex-shrink: 0;
  transition: opacity var(--duration-fast), transform var(--duration-fast);
}

.profile-link:hover .plink-arrow {
  opacity: 0.8;
  transform: translate(2px, -2px);
}

/* Link share button and action alignment */
.profile-link-wrapper {
  position: relative;
  width: 100%;
}

.profile-link-wrapper .profile-link {
  padding-right: 48px;
}

.plink-actions-right {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-link-share-trigger {
  background: transparent;
  border: none;
  color: var(--profile-text-primary, #fff);
  opacity: 0.5;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity var(--duration-fast), background var(--duration-fast), color var(--duration-fast);
  padding: 0;
}

.profile-link-wrapper:hover .btn-link-share-trigger {
  opacity: 0.85;
}

.btn-link-share-trigger:hover {
  opacity: 1 !important;
  background: rgba(255, 255, 255, 0.1);
  color: var(--profile-accent, #7c3aed);
}

/* Link Share Dropdown Menu */
/* Link Share Dropdown Menu */
.link-share-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 12px;
  z-index: 1000;
  background: var(--profile-card-bg, rgba(18, 18, 24, 0.95));
  border: 1px solid var(--profile-card-border, rgba(255, 255, 255, 0.08));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 14px;
  padding: 6px;
  min-width: 180px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.25), 0 2px 8px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  opacity: 0;
  transform: translateY(8px) scale(0.96);
  transition: opacity 0.2s ease, transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}

.link-share-dropdown.show {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.link-share-dropdown.dropdown-up {
  top: auto;
  bottom: calc(100% + 6px);
  transform: translateY(-8px) scale(0.96);
}

.link-share-dropdown.dropdown-up.show {
  transform: translateY(0) scale(1);
}

.share-dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 9px 12px;
  background: none;
  border: none;
  border-radius: 10px;
  color: var(--profile-text-primary, rgba(255, 255, 255, 0.85)) !important;
  font-size: 0.85rem;
  font-weight: 600;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.18s, color 0.18s, transform 0.1s;
}

.share-dropdown-item:hover {
  background: rgba(120, 120, 120, 0.15);
  color: var(--profile-text-primary, #fff) !important;
}

.share-dropdown-item:active {
  transform: scale(0.98);
}

.share-dropdown-item i {
  width: 18px;
  text-align: center;
  font-size: 1rem;
  transition: transform 0.15s ease;
}

/* Social media icon specific brand colors for extremely premium look */
.share-dropdown-item i.fa-copy { color: var(--profile-accent, #7c3aed); }
.share-dropdown-item i.fa-whatsapp { color: #25D366; }
.share-dropdown-item i.fa-x-twitter { color: var(--profile-text-primary, #fff); }
.share-dropdown-item i.fa-telegram { color: #26A5E4; }
.share-dropdown-item i.fa-linkedin { color: #0A66C2; }
.share-dropdown-item i.fa-facebook { color: #1877F2; }
.share-dropdown-item i.fa-envelope { color: #EA4335; }
.share-dropdown-item i.fa-share-nodes { color: var(--profile-accent, #7c3aed); }

.share-dropdown-item:hover i {
  transform: scale(1.1);
}

/* Pinned badge */
.plink-pinned {
  position: absolute;
  top: -1px;
  left: 16px;
  background: var(--amber);
  color: #000;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 0 0 var(--r-sm) var(--r-sm);
  letter-spacing: 0.04em;
}

/* Header type */
.plink-header {
  background: none !important;
  border: none !important;
  backdrop-filter: none !important;
  padding: 8px 0 4px !important;
  cursor: default !important;
  pointer-events: none;
}

.plink-header .plink-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  opacity: 0.5;
}

.plink-header:hover {
  transform: none !important;
  box-shadow: none !important;
}

/* ============================================================
   YOUTUBE EMBED
   ============================================================ */
.plink-embed {
  flex-direction: column;
  align-items: stretch;
}

.plink-embed-frame {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: var(--r-sm);
  overflow: hidden;
  margin-top: 12px;
  pointer-events: auto;
}

.plink-embed-frame iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* ============================================================
   PASSWORD LOCK MODAL
   ============================================================ */
.lock-modal {
  position: fixed;
  inset: 0;
  z-index: 2100;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: none; /* Hidden by default; JS opens via inline style:flex */
  align-items: center;
  justify-content: center;
  padding: 20px;
  /* iOS Safari: prevent scroll behind modal */
  -webkit-overflow-scrolling: touch;
}

.lock-modal.is-open {
  display: flex;
}

.lock-modal-box {
  background: var(--profile-card-bg, #16161A);
  border: 1.5px solid var(--profile-card-border, rgba(255, 255, 255, 0.08));
  border-radius: 20px;
  padding: 28px 24px;
  width: 100%;
  max-width: 380px;
  text-align: center;
  color: var(--profile-text-primary, #fff);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
  animation: pop 0.3s var(--ease-spring);
}

.lock-modal-icon {
  font-size: 2.2rem;
  margin-bottom: 12px;
  color: var(--profile-accent, #7c3aed);
}

.lock-modal-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--profile-text-primary, #fff);
  margin-bottom: 8px;
}

.lock-modal-desc {
  color: var(--profile-text-secondary, rgba(255, 255, 255, 0.6));
  font-size: 0.85rem;
  line-height: 1.4;
  margin-bottom: 20px;
}

/* Theme adaptive styling for inputs inside modal boxes */
.lock-modal-box input[type="text"],
.lock-modal-box input[type="password"] {
  background: rgba(120, 120, 120, 0.08) !important;
  border: 1px solid rgba(120, 120, 120, 0.2) !important;
  color: var(--profile-text-primary, #fff) !important;
  border-radius: 10px !important;
  font-weight: 600 !important;
  transition: border-color 0.2s, background 0.2s;
}

.lock-modal-box input[type="text"]:focus,
.lock-modal-box input[type="password"]:focus {
  border-color: var(--profile-accent, #7c3aed) !important;
  background: rgba(120, 120, 120, 0.12) !important;
}

/* Modals secondary button style fix */
.lock-modal-box .btn-secondary {
  background: rgba(120, 120, 120, 0.08) !important;
  border: 1px solid rgba(120, 120, 120, 0.15) !important;
  color: var(--profile-text-primary, rgba(255, 255, 255, 0.85)) !important;
  border-radius: 10px !important;
  font-weight: 700 !important;
  font-size: 0.85rem !important;
  backdrop-filter: blur(8px);
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.lock-modal-box .btn-secondary:hover {
  background: rgba(120, 120, 120, 0.15) !important;
  border-color: rgba(120, 120, 120, 0.28) !important;
  color: var(--profile-text-primary, #fff) !important;
}


/* ============================================================
   PROFILE ACTIONS (share, QR)
   ============================================================ */
.profile-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.profile-action-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--r-pill);
  border: 1.5px solid var(--profile-card-border, rgba(255, 255, 255, 0.15));
  background: var(--profile-card-bg, rgba(255, 255, 255, 0.06));
  color: var(--profile-text-primary, rgba(255, 255, 255, 0.8));
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--duration-base) var(--ease-out);
  backdrop-filter: blur(4px);
}

.profile-action-btn:hover {
  border-color: var(--profile-accent, rgba(255, 255, 255, 0.3));
  color: var(--profile-accent, white);
  transform: translateY(-1px);
}

/* ============================================================
   CONTACT FORM (embedded)
   ============================================================ */
.profile-contact-form {
  width: 100%;
  background: var(--profile-card-bg, rgba(255, 255, 255, 0.05));
  border: 1px solid var(--profile-card-border, rgba(255, 255, 255, 0.1));
  border-radius: var(--r-xl);
  padding: 24px;
  margin-top: 24px;
  backdrop-filter: blur(8px);
}

.profile-contact-form h3 {
  margin-bottom: 20px;
  font-size: 1.1rem;
}

.profile-contact-form .form-control {
  background: rgba(0, 0, 0, 0.15);
  border: 1.5px solid var(--profile-card-border, rgba(255, 255, 255, 0.12));
  color: var(--profile-text-primary, rgba(255, 255, 255, 0.9));
}

.profile-contact-form .form-control:focus {
  border-color: var(--profile-accent, rgba(124, 58, 237, 0.6)) !important;
  background: rgba(0, 0, 0, 0.25);
}

/* ============================================================
   BRAND ICON (top-left)
   ============================================================ */
.profile-brand-icon {
  position: fixed;
  top: 32px;
  right: 16px;
  z-index: 200;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(7, 7, 10, 0.55);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.3s var(--ease-spring);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.profile-brand-icon:hover {
  transform: scale(1.12) rotate(-8deg);
  border-color: rgba(124, 58, 237, 0.5);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4), 0 0 0 3px var(--accent-subtle);
}

.profile-brand-img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  border-radius: 4px;
  display: block;
  filter: brightness(0.95) drop-shadow(0 0 6px rgba(124, 58, 237, 0.4));
}

/* Demo back button */
.demo-back-home {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 100;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--r-pill);
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  backdrop-filter: blur(8px);
  transition: all var(--duration-base) var(--ease-out);
}

.demo-back-home:hover {
  background: rgba(0, 0, 0, 0.6);
  color: white;
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateX(-3px);
}

/* ============================================================
   BRANDING FOOTER
   ============================================================ */
.profile-branding {
  margin-top: 40px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--profile-text-secondary, rgba(255, 255, 255, 0.35));
  position: relative;
  z-index: 1;
  opacity: 0.7;
}

.profile-branding a {
  color: var(--profile-text-primary, rgba(255, 255, 255, 0.5));
  font-weight: 600;
  text-decoration: none;
}

.profile-branding a:hover {
  color: var(--profile-accent, rgba(255, 255, 255, 0.8));
}

/* ============================================================
   LINK ANIMATIONS (applied via JS)
   ============================================================ */
.link-anim-fade .profile-link {
  opacity: 0;
  animation: fadeIn 0.5s ease forwards;
}

.link-anim-slide .profile-link {
  opacity: 0;
  animation: slideUp 0.5s ease forwards;
}

.link-anim-pop .profile-link {
  opacity: 0;
  animation: pop 0.4s var(--ease-spring) forwards;
}

.link-anim-fade .profile-link:nth-child(1) {
  animation-delay: 0.05s;
}

.link-anim-fade .profile-link:nth-child(2) {
  animation-delay: 0.10s;
}

.link-anim-fade .profile-link:nth-child(3) {
  animation-delay: 0.15s;
}

.link-anim-fade .profile-link:nth-child(4) {
  animation-delay: 0.20s;
}

.link-anim-fade .profile-link:nth-child(5) {
  animation-delay: 0.25s;
}

.link-anim-fade .profile-link:nth-child(n+6) {
  animation-delay: 0.30s;
}

.link-anim-slide .profile-link:nth-child(1) {
  animation-delay: 0.05s;
}

.link-anim-slide .profile-link:nth-child(2) {
  animation-delay: 0.12s;
}

.link-anim-slide .profile-link:nth-child(3) {
  animation-delay: 0.19s;
}

.link-anim-slide .profile-link:nth-child(4) {
  animation-delay: 0.26s;
}

.link-anim-slide .profile-link:nth-child(n+5) {
  animation-delay: 0.33s;
}

.link-anim-pop .profile-link:nth-child(1) {
  animation-delay: 0.05s;
}

.link-anim-pop .profile-link:nth-child(2) {
  animation-delay: 0.13s;
}

.link-anim-pop .profile-link:nth-child(3) {
  animation-delay: 0.21s;
}

.link-anim-pop .profile-link:nth-child(4) {
  animation-delay: 0.29s;
}

.link-anim-pop .profile-link:nth-child(n+5) {
  animation-delay: 0.37s;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .profile-avatar {
    width: 88px;
    height: 88px;
  }
}

@media (max-width: 480px) {
  .profile-page {
    padding: 65px 14px 60px;
  }

  .profile-card {
    max-width: 100%;
  }

  .profile-avatar {
    width: 80px;
    height: 80px;
  }

  .profile-name {
    font-size: 1.25rem;
  }

  .plink-title {
    font-size: 0.875rem;
  }

  .social-link {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }

  .lock-modal-box {
    padding: 20px 16px;
    max-width: 90%;
  }

  .demo-back-home {
    top: 12px;
    left: 12px;
  }

  .profile-brand-icon {
    top: 28px;
    right: 12px;
    bottom: auto;
    left: auto;
  }
}

/* ============================================================
   LIVE ANIMATED BACKGROUND THEMES
   ============================================================ */
.profile-bg.aurora {
  background: linear-gradient(135deg, #0d001a, #00121a, #031a00, #1a001a);
  background-size: 400% 400%;
  animation: auroraFlow 15s ease infinite;
}

@keyframes auroraFlow {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

.profile-bg.starry {
  background: radial-gradient(circle at center, #111116 0%, #070709 100%);
  position: fixed;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.star-animation {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
}

.star-animation .star {
  position: absolute;
  width: 5px;
  height: 5px;
  background: #ffffff;
  border-radius: 50%;
  opacity: 0.3;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
  animation: floatUp 8s infinite linear;
}

.star-animation .star:nth-child(1) {
  left: 10%;
  animation-delay: 0s;
  animation-duration: 9s;
}

.star-animation .star:nth-child(2) {
  left: 30%;
  animation-delay: 2s;
  animation-duration: 7s;
}

.star-animation .star:nth-child(3) {
  left: 50%;
  animation-delay: 4s;
  animation-duration: 11s;
}

.star-animation .star:nth-child(4) {
  left: 70%;
  animation-delay: 1s;
  animation-duration: 8s;
}

.star-animation .star:nth-child(5) {
  left: 90%;
  animation-delay: 3s;
  animation-duration: 10s;
}

@keyframes floatUp {
  0% {
    transform: translateY(110vh) scale(0.5);
    opacity: 0;
  }

  50% {
    opacity: 0.7;
  }

  100% {
    transform: translateY(-10vh) scale(1.2);
    opacity: 0;
  }
}

.profile-bg.cybergrid {
  background: #020204;
  position: fixed;
  width: 100%;
  height: 100%;
}

.cyber-grid-container {
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(rgba(124, 58, 237, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124, 58, 237, 0.08) 1px, transparent 1px);
  background-size: 50px 50px;
  background-position: center;
  transform: perspective(500px) rotateX(60deg) translateY(-30%);
  transform-origin: top center;
  animation: gridScan 12s linear infinite;
  opacity: 0.6;
}

.cyber-grid-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, #020204, transparent);
  pointer-events: none;
}

@keyframes gridScan {
  0% {
    background-position: 0 0;
  }

  100% {
    background-position: 0 50px;
  }
}

/* Sleeker QR & Contact buttons in modals */
.lock-modal-box .btn {
  padding: 10px 20px !important;
  font-size: 0.825rem !important;
  font-weight: 600 !important;
  border-radius: var(--r-pill) !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* Contact modal styling */
#contact-modal .lock-modal-box {
  text-align: left;
  max-width: 400px;
  padding: 24px;
}

#contact-modal .form-control {
  background: var(--profile-card-bg, rgba(255, 255, 255, 0.06));
  border: 1.5px solid var(--profile-card-border, rgba(255, 255, 255, 0.12));
  color: var(--profile-text-primary, rgba(255, 255, 255, 0.9));
  border-radius: var(--r-md);
  padding: 10px 14px;
  font-size: 0.875rem;
}

#contact-modal .form-control:focus {
  border-color: var(--profile-accent, rgba(124, 58, 237, 0.6));
  background: var(--profile-card-bg, rgba(124, 58, 237, 0.06));
}

/* Make Contact Modal extremely compact on mobile screens */
@media (max-width: 576px) {
  #contact-modal .lock-modal-box {
    padding: 16px 20px !important;
    max-width: 310px !important;
    border-radius: var(--r-lg) !important;
  }

  #contact-modal .lock-modal-icon {
    font-size: 1.6rem !important;
    margin-bottom: 8px !important;
  }

  #contact-modal .lock-modal-title {
    font-size: 0.95rem !important;
    margin-bottom: 2px !important;
  }

  #contact-modal .lock-modal-desc {
    font-size: 0.775rem !important;
    margin-bottom: 12px !important;
  }

  #contact-modal .form-group {
    margin-bottom: 10px !important;
  }

  #contact-modal .form-control {
    padding: 8px 12px !important;
    font-size: 0.8rem !important;
  }

  #contact-modal textarea.form-control {
    height: 70px !important;
    font-size: 0.8rem !important;
  }

  #contact-modal .btn {
    padding: 8px 14px !important;
    font-size: 0.775rem !important;
  }
}

/* ---------- Header Layouts ---------- */

/* Layout: Hero */
.profile-card.layout-hero {
  overflow: hidden;
  padding-top: 0 !important;
}
.profile-card.layout-hero .profile-avatar-wrap {
  width: 100%;
  margin-bottom: 20px;
  margin-left: 0;
  margin-right: 0;
}
.profile-card.layout-hero .profile-avatar {
  width: 100%;
  height: 220px;
  border-radius: 0;
  border: none !important;
  box-shadow: none !important;
  object-fit: contain !important;
  background: rgba(0, 0, 0, 0.2);
  -webkit-mask-image: linear-gradient(to bottom, black 85%, transparent 100%) !important;
  mask-image: linear-gradient(to bottom, black 85%, transparent 100%) !important;
  transform: none !important;
}
.profile-card.layout-hero .profile-avatar-wrap::before {
  display: none !important;
}
.profile-card.layout-hero .profile-cover {
  display: none !important;
}

/* Layout: Banner */
.profile-card.layout-banner {
  overflow: hidden;
  padding-top: 0 !important;
}
.profile-card.layout-banner .profile-cover {
  height: 140px;
  margin-bottom: -50px;
  border-radius: 0;
}
.profile-card.layout-banner .profile-avatar-wrap {
  display: flex;
  justify-content: center;
}
.profile-cover-placeholder {
  width: 100%;
  height: 140px;
  background: linear-gradient(135deg, var(--profile-accent, #7C3AED) 0%, rgba(20, 20, 20, 0.4) 100%);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  display: block;
  margin-bottom: -50px;
}

/* Layout: Cutout */
.profile-card.layout-cutout .profile-cover {
  display: none !important;
}
.profile-card.layout-cutout .profile-avatar-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
  position: relative;
  background: transparent !important;
}
.profile-card.layout-cutout .profile-avatar {
  width: 140px;
  height: 140px;
  border-radius: 0;
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
  object-fit: contain;
  -webkit-mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
  mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
}
.profile-card.layout-cutout .profile-avatar-wrap::before {
  display: none !important;
}

/* Layout: Shape */
.profile-card.layout-shape .profile-cover {
  display: none !important;
}
.profile-card.layout-shape .profile-avatar-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
  position: relative;
}
.profile-card.layout-shape .profile-avatar {
  border-radius: 60% 40% 60% 40% / 40% 60% 40% 60%;
  border: 3px solid var(--profile-accent, #7C3AED) !important;
  animation: shapeMorph 8s ease-in-out infinite;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2) !important;
}
.profile-card.layout-shape .profile-avatar-wrap::before {
  display: none !important;
}
@keyframes shapeMorph {
  0%   { border-radius: 60% 40% 60% 40% / 40% 60% 40% 60%; }
  50%  { border-radius: 40% 60% 40% 60% / 60% 40% 60% 40%; }
  100% { border-radius: 60% 40% 60% 40% / 40% 60% 40% 60%; }
}

/* ============================================================
   FEATURED LINK LAYOUT
   ============================================================ */
.profile-links .profile-link.plink-layout-featured {
  flex-direction: column !important;
  align-items: stretch !important;
  padding: 0 !important;
  gap: 0 !important;
  overflow: hidden !important;
  min-height: auto !important;
  border-radius: var(--r-md) !important;
}

.profile-links .profile-link.plink-layout-featured:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15), 0 0 20px var(--profile-accent-glow, rgba(124, 58, 237, 0.15)) !important;
}

.plink-featured-banner {
  width: 100%;
  height: 120px;
  position: relative;
  overflow: hidden;
}

.plink-featured-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.plink-featured-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

.plink-featured-large-icon {
  font-size: 3rem;
  color: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
}

.plink-featured-large-icon img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 50%;
}

.plink-featured-large-icon i {
  font-size: 3rem;
}

.plink-featured-large-icon svg {
  width: 48px;
  height: 48px;
  fill: currentColor;
  color: #fff;
  display: block;
}

.plink-featured-body {
  padding: 12px 48px 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.profile-link-wrapper.playout-featured .plink-actions-right {
  top: auto !important;
  bottom: 0 !important;
  height: 48px !important; /* height of plink-featured-body */
  display: flex !important;
  align-items: center !important;
  transform: none !important;
}

/* Premium Floating Lock Badge for Featured Cards */
.profile-link-wrapper.playout-featured {
  position: relative;
}

.plink-layout-featured .plink-arrow {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
  width: 32px;
  height: 32px;
  background: rgba(13, 13, 15, 0.7) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #fff !important;
  opacity: 1 !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
  transition: all 0.2s ease !important;
  transform: none !important;
}

.plink-layout-featured:hover .plink-arrow {
  transform: scale(1.1) !important;
  background: var(--profile-accent, #7c3aed) !important;
  border-color: rgba(255, 255, 255, 0.25) !important;
  box-shadow: 0 4px 16px var(--profile-accent-glow, rgba(124, 58, 237, 0.4)) !important;
}

/* Brand specific background gradients for featured links if no thumbnail image is provided */
.bg-gradient-instagram {
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%) !important;
}
.bg-gradient-youtube {
  background: linear-gradient(135deg, #ff0000 0%, #b30000 100%) !important;
}
.bg-gradient-whatsapp {
  background: linear-gradient(135deg, #25d366 0%, #128c7e 100%) !important;
}
.bg-gradient-facebook {
  background: linear-gradient(135deg, #1877f2 0%, #0c4cb4 100%) !important;
}
.bg-gradient-twitter {
  background: linear-gradient(135deg, #000000 0%, #222222 100%) !important;
}
.bg-gradient-github {
  background: linear-gradient(135deg, #24292e 0%, #040404 100%) !important;
}
.bg-gradient-linkedin {
  background: linear-gradient(135deg, #0077b5 0%, #004471 100%) !important;
}
.bg-gradient-telegram {
  background: linear-gradient(135deg, #0088cc 0%, #005580 100%) !important;
}
.bg-gradient-tiktok {
  background: linear-gradient(135deg, #010101 0%, #ee1d52 50%, #69c9d0 100%) !important;
}

/* ============================================================
   CUSTOM IMAGE THEME (GLASSMORPHIC WALLPAPER)
   ============================================================ */
.theme-custom-image .profile-bg {
  transition: background-image 0.5s ease;
}

.theme-custom-image .profile-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(10, 10, 15, 0.45) 0%, rgba(5, 5, 8, 0.8) 100%) !important;
  z-index: 2;
}

.theme-custom-image .profile-card {
  background: transparent !important;
  border: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border-radius: 24px !important;
  padding: 30px 24px !important;
  box-shadow: none !important;
}

/* Glassmorphic Profile Links */
.theme-custom-image .profile-link {
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  color: #ffffff !important;
}

.theme-custom-image .profile-link:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: var(--profile-accent, #a78bfa) !important;
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 8px 20px rgba(167, 139, 250, 0.2) !important;
}

/* Text primary & secondary overrides */
.theme-custom-image .profile-name {
  color: #ffffff !important;
  text-shadow: 0 2px 10px rgba(0,0,0,0.3) !important;
}

.theme-custom-image .profile-bio {
  color: rgba(255, 255, 255, 0.8) !important;
  text-shadow: 0 1px 4px rgba(0,0,0,0.3) !important;
}

/* Buttons style overrides */
.theme-custom-image .profile-action-btn {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  backdrop-filter: blur(6px) !important;
  -webkit-backdrop-filter: blur(6px) !important;
  color: #ffffff !important;
}

.theme-custom-image .profile-action-btn:hover {
  background: rgba(255, 255, 255, 0.12) !important;
  border-color: var(--profile-accent, #a78bfa) !important;
}

.theme-custom-image .social-link {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  backdrop-filter: blur(6px) !important;
  -webkit-backdrop-filter: blur(6px) !important;
  color: #ffffff !important;
}

.theme-custom-image .social-link:hover {
  background: rgba(255, 255, 255, 0.15) !important;
  border-color: var(--profile-accent, #a78bfa) !important;
  transform: translateY(-2px);
}

/* ============================================================
   FLOATING CONTACT DIRECTORY WIDGET
   ============================================================ */
.contacts-list-floating-btn {
  position: fixed;
  bottom: 30px;
  right: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--profile-accent, #a78bfa);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  cursor: pointer;
  z-index: 9998;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
}

.contacts-list-floating-btn.has-chatbot {
  bottom: 95px;
}

.contacts-list-floating-btn:hover {
  transform: translateY(-3px) scale(1.05);
  background: rgba(15, 23, 42, 0.85);
  border-color: var(--profile-accent, #a78bfa);
  box-shadow: 0 12px 40px rgba(167, 139, 250, 0.25);
}

.contacts-pulse {
  position: absolute;
  inset: -1px;
  border-radius: 50%;
  border: 1px solid var(--profile-accent, #a78bfa);
  opacity: 0.5;
  animation: contacts-pulse-anim 2.5s infinite;
}

@keyframes contacts-pulse-anim {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(1.45); opacity: 0; }
}

/* Contacts Directory Modal Content */
.contacts-list-modal-box {
  max-width: 380px !important;
  width: 90% !important;
  background: rgba(15, 23, 42, 0.85) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  backdrop-filter: blur(24px) !important;
  -webkit-backdrop-filter: blur(24px) !important;
  border-radius: 20px !important;
  padding: 24px !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55) !important;
}

.contacts-modal-header {
  text-align: center;
  margin-bottom: 20px;
}

.contacts-modal-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  background: rgba(167, 139, 250, 0.12);
  color: var(--profile-accent, #a78bfa);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin: 0 auto 12px;
}

.contacts-modal-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 4px;
}

.contacts-modal-desc {
  font-size: 0.8rem;
  color: #94a3b8;
  line-height: 1.4;
}

.contacts-directory-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 4px;
}

.contacts-directory-list::-webkit-scrollbar {
  width: 6px;
}
.contacts-directory-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
}
.contacts-directory-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 3px;
}

.contact-directory-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  text-decoration: none !important;
  color: inherit !important;
  transition: all 0.25s ease;
}

.contact-directory-item:hover {
  background: rgba(167, 139, 250, 0.08);
  border-color: var(--profile-accent, #a78bfa);
  transform: translateY(-2px);
}

.contact-dir-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
}

.contact-dir-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
}

.contact-dir-number {
  font-size: 0.78rem;
  color: #94a3b8;
}

.contact-dir-action {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(167, 139, 250, 0.1);
  color: var(--profile-accent, #a78bfa);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  transition: all 0.25s ease;
}

.contact-directory-item:hover .contact-dir-action {
  background: var(--profile-accent, #a78bfa);
  color: #0f172a;
}

.contacts-modal-close-btn {
  width: 100%;
  justify-content: center;
  padding: 12px !important;
  border-radius: 12px !important;
  font-weight: 700 !important;
  font-size: 0.85rem !important;
}

/* ============================================================
   SHARE DRAWER / BOTTOM SHEET (Mobile & Customizer Preview)
   ============================================================ */
.share-drawer-container {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  pointer-events: none;
}

.share-drawer-container.active {
  pointer-events: auto;
}

.share-drawer-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.28s ease;
}

.share-drawer-container.active .share-drawer-overlay {
  opacity: 1;
}

.share-drawer-sheet {
  position: relative;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  background: var(--profile-card-bg, #16161A);
  border: 1px solid var(--profile-card-border, rgba(255, 255, 255, 0.08));
  border-bottom: none;
  border-radius: 20px 20px 0 0;
  padding: 16px 20px 28px;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.32, 0.94, 0.6, 1);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.share-drawer-container.active .share-drawer-sheet {
  transform: translateY(0);
}

.share-drawer-handle {
  width: 40px;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  align-self: center;
  cursor: pointer;
  margin-bottom: 4px;
}

.share-drawer-header {
  text-align: center;
  padding-bottom: 4px;
}

.share-drawer-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--profile-text-primary, #FFF);
}

.share-drawer-content {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  max-height: 70vh;
  overflow-y: auto;
}

.share-drawer-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--profile-card-border, rgba(255, 255, 255, 0.06));
  border-radius: 12px;
  color: var(--profile-text-primary, #FFF) !important;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.share-drawer-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.share-drawer-item:active {
  transform: scale(0.97);
}

.share-drawer-item i {
  font-size: 1.15rem;
  width: 20px;
  text-align: center;
  color: var(--profile-accent, #7C3AED);
}