/* =============================================
   BASE RESETS
============================================= */
.scrollbar-hide::-webkit-scrollbar {
  display: none;
}
.scrollbar-hide {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.scroll-smooth {
  scroll-behavior: smooth;
}
.snap-x {
  scroll-snap-type: x mandatory;
}
.snap-center {
  scroll-snap-align: center;
}

@keyframes pulse-custom {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}
.animate-custom-pulse {
  animation: pulse-custom 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* ─── Light / White parent ─── */
.light-bg .shareButton {
  background-color: rgba(0, 0, 0, 0.3); /* dark frosted */
  color: #ffffff; /* SVG stroke → white */
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
}

.light-bg .shareButton:hover {
  background-color: rgba(0, 0, 0, 0.55);
}

/* ─── Dark / Black parent ─── */
.dark-bg .shareButton {
  background-color: rgba(255, 255, 255, 0.3); /* light frosted */
  color: #000000; /* SVG stroke → black */
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
}

.dark-bg .shareButton:hover {
  background-color: rgba(255, 255, 255, 0.55);
}

.glasss-effect {
  /* Fill: D9D9D9 @ 20% */
  background: rgba(217, 217, 217, 0.8);

  /* Frost: 51 → stronger blur */
  backdrop-filter: blur(13px) saturate(180%);
  -webkit-backdrop-filter: blur(13px) saturate(180%);

  /* Dispersion: 42 → iridescent/colorful border */
  border: 1px solid transparent;
  background-clip: padding-box;

  /* Light: 115°, 80% + Splay: 72 → wide directional highlight */
  box-shadow:
    inset 2px 3px 8px rgba(255, 255, 255, 0.15),
    /* top-left highlight @ 115° */ inset -1px -2px 4px
      rgba(255, 255, 255, 0.15),
    /* subtle bottom bounce */ 0 4px 10px rgba(0, 0, 0, 0.18),
    /* Depth: 7 → outer shadow */ 0 1px 3px rgba(0, 0, 0, 0.1);

  /* Dispersion — prismatic border using outline trick */
  outline: 1px solid rgba(255, 255, 255, 0.45);
  outline-offset: -1px;

  /* Refraction: 40 → slight brightness shift */
  filter: brightness(1.05);
}

body {
  margin: 0;
  padding: 0;
  position: relative;
  overflow-x: hidden;
  overflow-y: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
body::-webkit-scrollbar {
  display: none;
}

html {
  overflow: -moz-scrollbars-none;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
html::-webkit-scrollbar {
  width: 0 !important;
  display: none;
}

#background-video,
#background-image {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
}
#background-image {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* =============================================
   LOADING SPINNER
============================================= */
.spinner {
  border: 3px solid rgba(59, 130, 246, 0.3);
  border-top: 3px solid #3b82f6;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* =============================================
   SCROLL ARROWS & PROFILE FADE-IN
============================================= */
.scroll-arrow {
  opacity: 0;
  transition: opacity 0.3s;
}
.scroll-arrow.visible {
  opacity: 1;
}

.profile-content {
  opacity: 0;
  transition: opacity 0.3s;
}
.profile-content.loaded {
  opacity: 1;
}

/* =============================================
   CSS VARIABLES — DYNAMIC APPEARANCE
============================================= */
:root {
  --title-font: "Inter", sans-serif;
  --title-color: #000000;
  --title-style: normal;

  --bio-font-family: "Inter", sans-serif;
  --bio-text-color: #000000;
  --bg-color: #ffffff;

  --social-icon-color: #000000;

  --button-font-family: "Inter", sans-serif;
  --button-font-weight: 400;
  --button-bg-color: #000000;
  --button-text-color: #ffffff;
  --button-roundness: 12px;
  --button-min-width: 220px;
  --button-width: auto;
  --button-font-size: 0.9rem;
  --button-padding-y: 0.75rem;
  --button-padding-x: 1.5rem;

  --profile-image-border-color: #000000;
}

/* =============================================
   PROFILE NAME
============================================= */
#profile-name {
  font-family: var(--title-font) !important;
  color: var(--title-color) !important;
  font-style: var(--title-font-style, normal);
  font-weight: var(--title-font-weight, 600);
  text-decoration: var(--title-text-decoration, none);
  font-size: 1.1rem;
  text-transform: capitalize;
  margin-top: 0.75rem;
}

/* =============================================
   PROFILE BIO
============================================= */
#profile-bio {
  font-family: var(--bio-font-family) !important;
  color: var(--bio-text-color) !important;
  font-size: 0.875rem;
  font-weight: 500;
}

/* =============================================
   HEADER TEXT
============================================= */
#header-text {
  font-family: var(--bio-font-family) !important;
  color: var(--bio-text-color) !important;
  font-weight: 600;
  text-transform: capitalize;
  text-align: center;
}

/* =============================================
   PROFILE IMAGE BORDER
============================================= */
#profile-image {
  border: 2px solid transparent;
  transition: border-color 0.2s;
}
#profile-image.show-border {
  border: 3px solid var(--profile-image-border-color);
}

/* =============================================
   LINK BUTTONS
============================================= */
.profile-link-btn {
  font-family: var(--button-font-family) !important;
  font-weight: var(--button-font-weight) !important;
  font-size: var(--button-font-size);
  background-color: var(--button-bg-color);
  color: var(--button-text-color) !important;
  border-radius: var(--button-roundness);
  min-width: var(--button-min-width);
  width: var(--button-width);
  padding: var(--button-padding-y) var(--button-padding-x);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition:
    opacity 0.18s,
    transform 0.18s;
  border: var(--button-border, none);
  box-shadow: var(--button-shadow, none);
  outline: none;
  box-sizing: border-box;
}
.profile-link-btn:hover {
  opacity: 0.85;
  transform: scale(1.02);
}

.profile-link-btn.btn-outline {
  background-color: transparent !important;
  border: 2px solid var(--button-bg-color) !important;
  color: var(--button-bg-color) !important;
}
.profile-link-btn.btn-outline:hover {
  background-color: var(--button-bg-color) !important;
  color: var(--button-text-color) !important;
}

.profile-link-btn.btn-glass {
  background: rgba(255, 255, 255, 0.15) !important;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.4) !important;
  color: var(--button-text-color) !important;
  box-shadow: inset 0 2px 8px rgba(255, 255, 255, 0.2);
}
.profile-link-btn.btn-glass:hover {
  background: rgba(255, 255, 255, 0.25) !important;
}

.profile-link-btn.btn-shadow:hover {
  box-shadow: 2px 2px 0px var(--button-bg-color);
  transform: translate(2px, 2px) !important;
}

.profile-link-btn.width-none {
  --button-min-width: unset;
  width: auto;
}
.profile-link-btn.width-thin {
  --button-min-width: unset;
  width: calc(100%) !important;
  max-width: 420px !important;
}
.profile-link-btn.width-thick {
  --button-min-width: 100%;
  --button-width: 100%;
}

.profile-link-btn.size-large {
  --button-padding-y: 1rem;
  --button-padding-x: 2rem;
  --button-font-size: 1rem;
  --button-min-width: 18rem;
}

/* =============================================
   BUTTON IMAGE ICONS
============================================= */
.btn-icon-square,
.btn-icon-round {
  width: 2.5rem;
  height: 2.5rem;
  object-fit: cover;
  position: absolute;
  left: 0.25rem;
  flex-shrink: 0;
}
.btn-icon-square {
  border-radius: 4px;
}
.btn-icon-round {
  border-radius: 50%;
}

/* =============================================
   SOCIAL ICON COLOR
============================================= */
#social-links-container .social-icon {
  color: var(--social-icon-color) !important;
}

/* =============================================
   HEADER LAYOUT
============================================= */
#profile-header.layout-stacked {
  flex-direction: column;
  align-items: center;
  text-align: center;
}

#profile-header.layout-left-aligned {
  flex-direction: row;
  align-items: center;
  gap: 1rem;
  text-align: left;
  padding: 0;
}
#profile-header.layout-left-aligned #profile-image {
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  margin-bottom: -12px;
}
#profile-header.layout-left-aligned .header-text-col {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

/* Hide standalone social wrapper when left-aligned */
#profile-header.layout-left-aligned ~ #social-links-wrapper {
  display: none !important;
}

/* Inline social icons inside header for left-aligned */
#inline-social-links {
  display: none;
}
#profile-header.layout-left-aligned #inline-social-links {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  margin-top: 0.3rem;
  flex-wrap: wrap;
}

/* =============================================
   BACKGROUND TYPES
============================================= */
body.bg-gradient {
  background: var(--bg-gradient, linear-gradient(135deg, #f5f7fa, #c3cfe2));
}
body.bg-bar::before {
  content: "";
  display: block;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 220px;
  background-color: var(--bg-color);
  z-index: -1;
}
body.bg-bar {
  background-color: #f5f5f5;
}

/* =============================================
   WATERMARK
============================================= */
#watermark {
  opacity: 0.5;
}

/* =============================================
   SHARE BOTTOM SHEET — BACKDROP
============================================= */
#share-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
#share-backdrop.open {
  opacity: 1;
  pointer-events: all;
}

/* =============================================
   SHARE BOTTOM SHEET — SHEET
============================================= */
#share-sheet {
  position: fixed;
  bottom: 0;
  left: 4px;
  right: 4px;
  background: #fff;
  border-radius: 20px 20px 0 0;
  z-index: 201;
  padding: 0 0 36px;
  transform: translateY(100%);
  transition: transform 0.38s cubic-bezier(0.32, 0.72, 0, 1);
  max-height: 92vh;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
#share-sheet::-webkit-scrollbar {
  display: none;
}
#share-sheet.open {
  transform: translateY(0);
}

@media (min-width: 600px) {
  #share-sheet {
    left: 50%;
    right: auto;
    width: 550px;
    transform: translateX(-50%) translateY(100%);
    border-radius: 20px 20px 0 0;
  }
  #share-sheet.open {
    transform: translateX(-50%) translateY(0);
  }
}

.sheet-handle {
  width: 40px;
  height: 4px;
  background: #e0e0e0;
  border-radius: 4px;
  margin: 12px auto 0;
}

.sheet-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f2f2f2;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #555;
  font-size: 14px;
  transition: background 0.2s;
  z-index: 10;
}
.sheet-close:hover {
  background: #e0e0e0;
}

.sheet-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 20px 0;
  gap: 8px;
}
.sheet-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #eee;
}
.sheet-title {
  font-size: 16px;
  font-weight: 700;
  color: #111;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* =============================================
   SHARE SHEET — URL BAR
============================================= */
.url-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 16px 0;
  padding: 8px 8px 8px 12px;
  border: 1.5px solid #e8e8e8;
  border-radius: 14px;
  background: #fafafa;
}
.url-bar-thumb {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}
.url-bar-text {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.sheet-copy-btn {
  padding: 9px 16px;
  background: #1a6ef5;
  color: #fff;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition:
    background 0.2s,
    transform 0.1s;
  flex-shrink: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.sheet-copy-btn:hover {
  background: #1558d0;
}
.sheet-copy-btn:active {
  transform: scale(0.96);
}
.sheet-copy-btn.copied {
  background: #22c55e;
}

.sheet-divider {
  height: 1px;
  background: #f0f0f0;
  margin: 18px 0 0;
}

/* =============================================
   SHARE SHEET — SHARE ICONS
============================================= */
.sheet-section {
  padding: 16px 16px 0;
}
.sheet-section-title {
  font-size: 14px;
  font-weight: 600;
  color: #111;
  margin-bottom: 14px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.sheet-share-icons {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 4px;
}
.sheet-share-icons::-webkit-scrollbar {
  display: none;
}

.sheet-icon-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  cursor: pointer;
}
.sheet-icon-circle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  transition:
    transform 0.2s,
    background 0.2s;
  color: #333;
}
.sheet-icon-item:hover .sheet-icon-circle {
  transform: scale(1.1);
  background: #e4e4e4;
}
.sheet-icon-label {
  font-size: 11px;
  color: #555;
  font-weight: 500;
  text-align: center;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Platform colors */
.sheet-icon-item.si-whatsapp .sheet-icon-circle {
  background: #dcfce7;
  color: #16a34a;
}
.sheet-icon-item.si-twitter .sheet-icon-circle {
  background: #e0f2fe;
  color: #0284c7;
}
.sheet-icon-item.si-facebook .sheet-icon-circle {
  background: #dbeafe;
  color: #1d4ed8;
}
.sheet-icon-item.si-linkedin .sheet-icon-circle {
  background: #dbeafe;
  color: #0a66c2;
}
.sheet-icon-item.si-telegram .sheet-icon-circle {
  background: #e0f2fe;
  color: #229ed9;
}
.sheet-icon-item.si-email .sheet-icon-circle {
  background: #fef3c7;
  color: #d97706;
}
.sheet-icon-item.si-more .sheet-icon-circle {
  background: #f3f4f6;
  color: #4b5563;
}

/* =============================================
   SHARE SHEET — QR CODE
============================================= */
.qr-section {
  padding: 18px 16px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.qr-wrapper {
  position: relative;
  display: inline-block;
  border-radius: 16px;
  padding: 16px;
  background: #fff;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
  border: 1px solid #f0f0f0;
  cursor: pointer;
}
#sheet-qr-container {
  display: block;
  line-height: 0;
}
#sheet-qr-container canvas,
#sheet-qr-container img {
  display: block;
  border-radius: 8px;
}

.qr-center-avatar {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  pointer-events: none;
  z-index: 2;
}
.qr-download-overlay {
  position: absolute;
  inset: 0;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.52);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.22s;
  z-index: 3;
}
.qr-wrapper:hover .qr-download-overlay {
  opacity: 1;
}

.qr-download-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 20px;
  background: #fff;
  color: #111;
  border-radius: 30px;
  font-size: 13px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition:
    background 0.15s,
    transform 0.1s;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.qr-download-btn:hover {
  background: #f0f0f0;
  transform: scale(1.04);
}

/* =============================================
   SHARE SHEET — CTA FOOTER
============================================= */
.sheet-cta-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 16px 0;
  padding: 14px 16px;
  background: #f8f8f8;
  border-radius: 14px;
}
.cta-logo-badge {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #c8ff3e;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  font-weight: 900;
  color: #111;
  flex-shrink: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.cta-text-block {
  flex: 1;
}
.cta-text-block h4 {
  font-size: 13px;
  font-weight: 700;
  color: #111;
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.cta-text-block p {
  font-size: 11px;
  color: #888;
  margin: 2px 0 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.sheet-cta-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 10px 16px 0;
}

.cta-primary-btn {
  padding: 13px;
  background: #111;
  color: #fff;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  text-align: center;
  transition: background 0.2s;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.cta-primary-btn:hover {
  background: #333;
}

.cta-secondary-btn {
  padding: 13px;
  background: transparent;
  color: #111;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  border: 1.5px solid #ddd;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.2s;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.cta-secondary-btn:hover {
  border-color: #aaa;
}

/* =============================================
   COLLECTION GROUPS
============================================= */

/* Wrapper for each collection section */
.collection-group {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

/* Collection title header row */
.collection-header {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  width: 100%;
  max-width: 420px;
  padding: 0 0.25rem;
}

/* Optional emoji / icon before the collection name */
.collection-icon {
  font-size: 1rem;
  line-height: 1;
  flex-shrink: 0;
}

/* Collection name text */
.collection-name {
  font-family: var(--bio-font-family, "Inter", sans-serif);
  color: var(--bio-text-color, #000000);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  text-align: left;
  letter-spacing: 0.08em;
  opacity: 0.8;
}

/* Links inside a collection */
.collection-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
}
