/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: #0a0a0a;
  color: #fff;
  font-family: "Inter", sans-serif;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px 20px;
  transition: background 0.3s ease;
}

/* Card Profil */
.profile-card {
  max-width: 560px;
  width: 100%;
  background: var(--card-bg, #111);
  border-radius: 32px;
  padding: 40px 32px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  position: relative;
  transition: all 0.3s ease;
}

/* Avatar */
.profile-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 24px;
  border: 3px solid var(--accent-color, #fff);
  display: block;
  transition: border-radius 0.2s ease;
}

/* Nama */
.profile-name {
  font-family: var(--title-font, "Syne"), sans-serif;
  font-size: var(--title-size, 2.2rem);
  letter-spacing: var(--title-spacing, 0.05em);
  margin-bottom: 4px;
  color: #fff;
  transition:
    font-family 0.2s,
    font-size 0.2s;
}

/* Wrapper handle + badge */
.handle-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.profile-domain {
  text-align: center;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.85rem;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  margin: 0 auto 10px;
  max-width: fit-content;
}

.affiliate-card {
  text-align: center;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.85rem;
  color: rgba(255,255,255,0.95);
}

  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  background: transparent !important;
}
.user-badge-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Bio */
.profile-bio {
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 28px;
  line-height: 1.6;
  font-size: var(--bio-size, 1rem);
  transition: font-size 0.2s;
}

/* Social Icons (bulat) */
.social-icons {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin: 28px 0;
  flex-wrap: wrap;
}
.social-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--link-bg, rgba(255, 255, 255, 0.08));
  border: 1px solid var(--link-border, rgba(255, 255, 255, 0.12));
  border-radius: 50%;
  text-decoration: none;
  transition: all 0.3s;
}
.social-icon svg {
  width: 22px;
  height: 22px;
  color: currentColor;
}
.social-icon:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--accent-color, #fff);
  transform: translateY(-3px);
}

/* Links (pill) */
.profile-links {
  margin: 24px 0;
}
.profile-extra {
  margin: 20px 0;
  text-align: left;
}
.profile-text-block {
  margin: 8px 0;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.65;
}
.profile-image-block {
  width: 100%;
  max-height: 300px;
  object-fit: cover;
  border-radius: 20px;
  margin: 12px 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.profile-video-block a {
  display: inline-block;
  color: #fff;
  text-decoration: underline;
  margin: 8px 0;
}
.profile-divider-block {
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  margin: 18px 0;
}
.profile-link {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--link-bg, rgba(255, 255, 255, 0.08));
  border: 1px solid var(--link-border, rgba(255, 255, 255, 0.12));
  border-radius: var(--button-radius, 60px);
  padding: 14px 20px;
  margin-bottom: 12px;
  color: var(--text-color, #fff);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s;
  width: var(--link-width, 100%);
}
.profile-link:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--accent-color, #fff);
  transform: translateY(-2px);
}
.profile-link svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}
.profile-link span {
  flex: 1;
  text-align: left;
  font-size: var(--link-font-size, 0.9rem);
  font-weight: var(--link-font-weight, 400);
}

/* Password protected links */
.profile-link.password-protected {
  cursor: pointer;
  background: rgba(255, 165, 0, 0.1);
  border-color: rgba(255, 165, 0, 0.3);
}
.profile-link.password-protected:hover {
  background: rgba(255, 165, 0, 0.2);
  border-color: rgba(255, 165, 0, 0.5);
  transform: translateY(-2px);
}

/* Footer */
.profile-footer {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
}

/* Share Menu */
.share-menu-container {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 10;
}
.share-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 40px;
  padding: 8px 14px;
  color: #fff;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}
.share-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}
.share-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  background: #111;
  border-radius: 20px;
  padding: 12px;
  min-width: 200px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: none;
}
.share-dropdown.show {
  display: block;
  animation: fadeIn 0.2s ease;
}
.qr-code-preview {
  text-align: center;
}
.qr-code-preview img {
  width: 150px;
  height: 150px;
  background: #fff;
  border-radius: 12px;
  padding: 8px;
  margin: 8px 0;
}
.copy-url-btn {
  width: 100%;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  padding: 8px;
  border-radius: 40px;
  color: #fff;
  font-size: 12px;
  cursor: pointer;
  margin-top: 8px;
}
.copy-url-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Loading & Error */
.loading-state,
.error-state {
  text-align: center;
  padding: 60px 20px;
}
.loading-spinner {
  display: inline-block;
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 16px;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive */
@media (max-width: 600px) {
  .profile-card {
    padding: 28px 20px;
  }
  .profile-avatar {
    width: 90px;
    height: 90px;
  }
  .share-btn span {
    display: none;
  }
  .profile-handle {
    font-size: 0.9rem;
  }
  .user-badge-icon {
    width: 18px;
    height: 18px;
  }
  .social-icon {
    width: 40px;
    height: 40px;
  }
  .social-icon svg {
    width: 18px;
    height: 18px;
  }
}

/* ===== RICH CONTENT BLOCKS — Tier 1 ===== */

/* Spotify */
.rich-spotify-wrap {
  width: 100%;
  margin: 8px 0;
  border-radius: 12px;
  overflow: hidden;
}

/* YouTube */
.rich-youtube-wrap {
  width: 100%;
  margin: 8px 0;
  border-radius: 12px;
  overflow: hidden;
}
.rich-youtube-thumb {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 */
  background-size: cover;
  background-position: center;
  background-color: #000;
  cursor: pointer;
  border-radius: 12px;
  overflow: hidden;
}
.rich-youtube-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.3);
  transition: background 0.2s;
}
.rich-youtube-thumb:hover::after { background: rgba(0,0,0,0.15); }
.rich-youtube-play {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  background: rgba(0,0,0,0.7);
  border-radius: 50%;
  width: 64px; height: 64px;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.2s, background 0.2s;
}
.rich-youtube-thumb:hover .rich-youtube-play {
  transform: translate(-50%, -50%) scale(1.1);
  background: rgba(255,0,0,0.85);
}
.rich-youtube-label {
  position: absolute;
  bottom: 12px; left: 12px; right: 12px;
  z-index: 2;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  text-shadow: 0 1px 4px rgba(0,0,0,0.8);
}

/* Countdown */
.rich-countdown-wrap {
  width: 100%;
  margin: 8px 0;
  padding: 16px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px;
  text-align: center;
}
.rich-countdown-label {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
  margin-bottom: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.rich-countdown-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.rich-countdown-unit {
  display: flex; flex-direction: column; align-items: center;
  min-width: 52px;
}
.rich-countdown-num {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  color: var(--accent-color, #fff);
  font-variant-numeric: tabular-nums;
}
.rich-countdown-sub {
  font-size: 10px;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 4px;
}
.rich-countdown-sep {
  font-size: 1.5rem;
  font-weight: 700;
  color: rgba(255,255,255,0.3);
  padding-bottom: 14px;
}
.rich-countdown-done {
  font-size: 14px;
  color: var(--accent-color, #fff);
  font-weight: 600;
  padding: 8px 0;
}
.rich-embed-error {
  font-size: 12px;
  color: rgba(255,100,100,0.7);
  padding: 8px;
  text-align: center;
}

.profile-link-featured {
  box-shadow: 0 14px 34px rgba(109, 94, 252, 0.18);
  border-color: rgba(109, 94, 252, 0.28);
  transform: translateY(-1px);
}
.profile-link.primary-cta {
  min-height: 68px;
  width: min(100%, 420px) !important;
  margin: 16px auto;
  transform: rotate(-1deg);
  font-size: 1.05rem !important;
  font-weight: 800 !important;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.22) inset;
}

.profile-link.primary-cta.cta-pulse {
  animation: onelynkCtaPulse 1.9s ease-in-out infinite;
}

.profile-link.primary-cta.cta-float {
  animation: onelynkCtaFloat 3s ease-in-out infinite;
}

.onelynk-product-card {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin: 14px 0;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
  text-align: left;
}

.onelynk-product-card img {
  width: 86px;
  height: 86px;
  object-fit: cover;
  border-radius: 16px;
}

.onelynk-product-card h3 {
  margin: 4px 0;
  color: inherit;
}

.onelynk-product-card p {
  margin: 0;
  opacity: 0.78;
}

.onelynk-product-card button,
.checkout-wa-btn,
.onelynk-floating-wa {
  border: 0;
  border-radius: 999px;
  padding: 12px 16px;
  background: #25d366;
  color: #06140b;
  font-weight: 800;
  cursor: pointer;
}

.onelynk-product-card button {
  grid-column: 1 / -1;
}

.product-badge,
.checkout-kicker {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  padding: 4px 9px;
  background: rgba(255, 255, 255, 0.16);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.onelynk-checkout-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  place-items: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.72);
}

.onelynk-checkout-modal.is-open {
  display: grid;
}

.onelynk-checkout-card {
  position: relative;
  width: min(440px, 100%);
  max-height: 90vh;
  overflow: auto;
  padding: 22px;
  border-radius: 28px;
  background: #101322;
  color: #fff;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.46);
}

.onelynk-checkout-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
}

.checkout-price {
  font-size: 1.35rem;
  font-weight: 800;
}

.checkout-qris,
.checkout-empty-qris {
  width: 100%;
  border-radius: 18px;
  margin: 10px 0;
  background: #fff;
}

.checkout-empty-qris {
  padding: 32px 18px;
  color: #202437;
  text-align: center;
}

.checkout-copy {
  opacity: 0.76;
}

.checkout-label {
  display: block;
  margin: 10px 0 6px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.checkout-input {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  padding: 12px 13px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font: inherit;
}

.checkout-input option {
  color: #101322;
}

.checkout-status {
  min-height: 22px;
  margin: 10px 0 0;
  opacity: 0.78;
}

.checkout-wallets {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 12px 0;
}

.checkout-wallets a {
  border-radius: 999px;
  padding: 9px 12px;
  color: #fff;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.12);
}

.onelynk-floating-wa {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 60;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
}

@keyframes onelynkCtaPulse {
  0%, 100% { transform: rotate(-1deg) scale(1); }
  50% { transform: rotate(1deg) scale(1.035); }
}

@keyframes onelynkCtaFloat {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-7px) rotate(1deg); }
}

@media (max-width: 720px) {
  .profile-link.sticky-mobile-cta {
    position: fixed;
    left: 14px;
    right: 14px;
    bottom: 14px;
    z-index: 50;
    width: auto !important;
    margin: 0 !important;
  }

  body:has(.sticky-mobile-cta) {
    padding-bottom: 96px;
  }
}
