:root {
  --bg: #0b0a07;
  --bg-soft: #14120e;
  --gold: #e6c84a;
  --gold-border: #c9a84a;
  --gold-glow: rgba(230, 200, 74, 0.28);
  --text: #ffffff;
  --muted: #b8b4a8;
  --card: rgba(18, 16, 12, 0.72);
  --card-hover: rgba(32, 28, 20, 0.9);
  --radius-pill: 999px;
  --max: 580px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.page-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 80% 60% at 50% 100%, rgba(0, 0, 0, 0.55), transparent 70%),
    linear-gradient(180deg, #15130f 0%, #0b0a07 45%, #080706 100%);
}

.page-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.08;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  pointer-events: none;
}

.link-page {
  width: min(100%, var(--max));
  margin: 0 auto;
  padding: 2.25rem 1.15rem 2.5rem;
}

/* Profile */
.avatar-wrap {
  display: inline-block;
  margin-bottom: 0.85rem;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(145deg, var(--gold), #8a6e2a);
}

.avatar {
  display: block;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  background: #000;
  border: 3px solid #0b0a07;
}

.profile-name {
  margin: 0 0 0.4rem;
  font-size: clamp(1.65rem, 5vw, 1.9rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--gold);
}

.profile-bio {
  margin: 0 auto 1.15rem;
  max-width: 22rem;
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--text);
  font-weight: 400;
}

.social-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1.75rem;
}

.social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  color: #fff;
  font-size: 1.35rem;
  text-decoration: none;
  border-radius: 50%;
  transition: transform 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

.social-btn:hover,
.social-btn:focus-visible {
  color: var(--gold);
  transform: translateY(-2px);
  outline: none;
}

/* Link cards */
.links {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.link-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  min-height: 4.35rem;
  padding: 0.7rem 1rem 0.7rem 0.75rem;
  color: inherit;
  text-decoration: none;
  text-align: left;
  background: var(--card);
  border: 1.5px solid var(--gold-border);
  border-radius: var(--radius-pill);
  backdrop-filter: blur(8px);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.link-card:hover,
.link-card:focus-visible {
  background: var(--card-hover);
  border-color: var(--gold);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  outline: none;
  color: inherit;
}

.link-card--plain {
  justify-content: center;
  padding-left: 2.5rem;
  padding-right: 2.5rem;
  text-align: center;
}

.link-card--plain .link-body {
  flex: 0 1 auto;
}

.link-thumb {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  background: #111;
  border: 1px solid rgba(201, 168, 74, 0.35);
  aspect-ratio: 1 / 1;
}

.link-thumb img {
  width: 48px;
  height: 48px;
  max-width: none;
  object-fit: cover;
  object-position: center;
  display: block;
}

.link-thumb--contain {
  background: #000;
}

.link-thumb--contain img {
  object-fit: contain;
}

.link-body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.12rem;
  padding-right: 0.25rem;
}

.link-title {
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.25;
  color: #fff;
}

.link-card--plain .link-title {
  font-size: 0.95rem;
}

.link-sub {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.link-sub .bi {
  flex-shrink: 0;
  font-size: 0.72rem;
  opacity: 0.9;
}

.link-menu {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.1rem;
}

/* Footer */
.page-footer {
  margin-top: 1.75rem;
}

.cta-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: min(100%, 280px);
  padding: 0.85rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: #111;
  text-decoration: none;
  background: #fff;
  border-radius: var(--radius-pill);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.cta-pill:hover,
.cta-pill:focus-visible {
  color: #111;
  opacity: 0.92;
  transform: translateY(-1px);
  outline: none;
}

.footer-meta {
  margin: 1rem 0 0;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.55);
}

/* Modals */
.preview-modal .modal-dialog {
  max-width: 420px;
  margin: 1rem auto;
}

.preview-sheet {
  border: none;
  border-radius: 1.75rem;
  overflow: hidden;
  background: #fff;
  color: #111;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.preview-sheet--profile {
  min-height: 420px;
  display: flex;
  flex-direction: column;
}

.preview-header {
  padding: 1.25rem 1.25rem 0.75rem;
}

.preview-title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  color: #111;
}

.preview-sub {
  margin: 0.35rem 0 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  color: #757575;
}

.map-wrap {
  margin: 0.5rem 1rem 0;
  border-radius: 0.85rem;
  overflow: hidden;
  background: #e8e8e8;
  aspect-ratio: 4 / 3.2;
}

.map-wrap iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.profile-preview {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.5rem 1.35rem 0;
}

.profile-preview-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  background: #000;
}

.profile-preview-name {
  font-size: 1rem;
  font-weight: 600;
  color: #111;
}

.preview-spacer {
  flex: 1 1 auto;
  min-height: 8rem;
}

.preview-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.1rem 1.15rem;
}

.btn-directions {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  flex: 1 1 auto;
  padding: 0.75rem 1.1rem;
  font-weight: 600;
  font-size: 0.95rem;
}

.preview-icon-btns {
  display: flex;
  gap: 0.55rem;
  flex: 0 0 auto;
}

.icon-circle {
  width: 2.65rem;
  height: 2.65rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid #e0e0e0;
  background: #fff;
  color: #5f5f5f;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  transition: background 0.15s ease, color 0.15s ease;
}

.icon-circle:hover,
.icon-circle:focus-visible {
  background: #f5f5f5;
  color: #111;
  outline: none;
}

.toast-wrap {
  position: fixed;
  left: 50%;
  bottom: 1.25rem;
  transform: translateX(-50%);
  z-index: 1090;
}

@media (max-width: 420px) {
  .link-page {
    padding-inline: 0.9rem;
  }

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

  .link-sub {
    font-size: 0.7rem;
  }

  .preview-modal .modal-dialog {
    margin: 0.75rem;
  }
}
