/* Modern LinkPage Design with Brand Colors */
/* Clean and professional design system */

:root {
  /* Neutral palette */
  --color-stone-50: #fafaf9;
  --color-stone-100: #f5f5f4;
  --color-stone-200: #e7e5e4;
  --color-stone-300: #d6d3d1;
  --color-stone-400: #a8a29e;
  --color-stone-500: #78716c;
  --color-stone-600: #57534e;
  --color-stone-700: #44403c;
  --color-stone-800: #292524;
  --color-stone-900: #1c1917;
  --color-stone-950: #0c0a09;

  /* Accent colors */
  --color-blue-500: #3b82f6;
  --color-blue-600: #2563eb;
  --color-purple-500: #a855f7;
  --color-purple-600: #9333ea;

  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Spacing scale */
  --spacing-1: 0.25rem;
  --spacing-2: 0.5rem;
  --spacing-3: 0.75rem;
  --spacing-4: 1rem;
  --spacing-5: 1.25rem;
  --spacing-6: 1.5rem;
  --spacing-8: 2rem;
  --spacing-10: 2.5rem;
  --spacing-12: 3rem;
  --spacing-16: 4rem;

  /* Border radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

/* Base reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  line-height: 1.5;
  color: var(--color-stone-900);
}

/* LinkPage Layout */
.linkpage {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: var(--spacing-4) var(--spacing-4);
  padding-top: 2rem;
  position: relative;
  overflow-x: hidden;
}

.linkpage-content {
  width: 100%;
  max-width: 680px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-6);
  position: relative;
  z-index: 1;
  margin-top: 0;
  align-self: center;
}

/* Avatar - Beautiful profile border */
.linkpage-avatar {
  width: 120px;
  height: 120px;
  border-radius: var(--radius-full);
  object-fit: cover;
  box-shadow: var(--shadow-xl);
  border: 5px solid white;
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  outline: 2px solid rgba(0, 0, 0, 0.05);
  outline-offset: -2px;
}

.linkpage-avatar:hover {
  transform: scale(1.08);
  box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);
  border-color: rgba(255, 255, 255, 0.95);
}

/* Header */
.linkpage-header {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-3);
  max-width: 100%;
}

.linkpage-title {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.linkpage-description {
  font-size: 1rem;
  color: var(--color-stone-600);
  max-width: 32rem;
  line-height: 1.6;
}

/* Link boxes container */
.linkboxes {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-3);
}

/* Link box - Modern Base Styles */
.linkbox {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  padding: var(--spacing-5) var(--spacing-6);
  border-radius: var(--radius-lg);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  text-decoration: none;
  gap: var(--spacing-4);
  font-family: inherit;
  font-size: inherit;
  text-align: left;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  overflow: hidden;
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}

/* Auto-contrast colors for linkboxes */
.linkbox.linkbox-dark,
.linkbox.shape-square.linkbox-dark,
.linkbox.shape-rounded.linkbox-dark,
.linkbox.shape-circle.linkbox-dark {
  background: white !important;
  border: 2px solid black !important;
  color: black !important;
}

.linkbox.linkbox-light,
.linkbox.shape-square.linkbox-light,
.linkbox.shape-rounded.linkbox-light,
.linkbox.shape-circle.linkbox-light {
  background: black !important;
  border: 2px solid white !important;
  color: white !important;
}

.linkbox:not([data-brand]):hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

.linkbox.linkbox-dark:hover,
.linkbox.shape-square.linkbox-dark:hover,
.linkbox.shape-rounded.linkbox-dark:hover,
.linkbox.shape-circle.linkbox-dark:hover {
  background: black !important;
  border-color: black !important;
  color: white !important;
}

.linkbox.linkbox-light:hover,
.linkbox.shape-square.linkbox-light:hover,
.linkbox.shape-rounded.linkbox-light:hover,
.linkbox.shape-circle.linkbox-light:hover {
  background: white !important;
  border-color: white !important;
  color: black !important;
}

.linkbox[data-brand]:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

.linkbox:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}

/* Shape variants for linkboxes */
.linkbox.shape-square {
  border-radius: 0 !important;
}

.linkbox.shape-rounded {
  border-radius: var(--radius-lg) !important;
}

.linkbox.shape-circle {
  border-radius: 9999px !important;
}

/* Link box content */
.linkbox-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-1);
  min-width: 0;
}

.linkbox-title {
  font-size: 1rem;
  font-weight: 600;
  color: hsl(0 0% 9%);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: -0.0125em;
}

.linkbox-description {
  font-size: 0.8125rem;
  color: hsl(0 0% 45%);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.4;
}

/* Brand Icon - Small and clean */
.brand-icon {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  flex-shrink: 0;
  color: inherit;
  transition: transform 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

.brand-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-icon i {
  font-size: 1.5rem;
  line-height: 1;
}

.linkbox:hover .brand-icon {
  transform: scale(1.05);
}

@media (min-width: 640px) {
  .brand-icon {
    width: 1.75rem;
    height: 1.75rem;
  }

  .brand-icon i {
    font-size: 1.75rem;
  }
}

/* Social links */
.social-links {
  display: flex;
  justify-content: center;
  gap: var(--spacing-3);
  flex-wrap: wrap;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-xl);
  border: 2px solid rgba(128, 128, 128, 0.3);
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 1.25rem;
  box-shadow: var(--shadow-sm);
}

/* Auto-contrast colors based on background luminance */
.social-link-dark {
  background: white;
  border: 2px solid black;
  color: black;
}

.social-link-light {
  background: black;
  border: 2px solid white;
  color: white;
}

.social-link:hover {
  transform: translateY(-4px) rotate(5deg);
  box-shadow: var(--shadow-lg);
}

.social-link-dark:hover {
  background: black;
  border-color: black;
}

.social-link-dark:hover i {
  color: white;
}

.social-link-light:hover {
  background: white;
  border-color: white;
}

.social-link-light:hover i {
  color: black;
}

/* Shape variants for social links */
.social-link.shape-square {
  border-radius: 0 !important;
}

.social-link.shape-rounded {
  border-radius: var(--radius-lg) !important;
}

.social-link.shape-circle {
  border-radius: 50% !important;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade,
.animate-bounce,
.animate-slide,
.animate-scale,
.animate-rotate,
.animate-flip {
  animation: fadeIn 0.5s ease-out forwards;
  opacity: 0;
}

/* Stagger animations */
.linkbox:nth-child(1) { animation-delay: 0.1s; }
.linkbox:nth-child(2) { animation-delay: 0.15s; }
.linkbox:nth-child(3) { animation-delay: 0.2s; }
.linkbox:nth-child(4) { animation-delay: 0.25s; }
.linkbox:nth-child(5) { animation-delay: 0.3s; }
.linkbox:nth-child(6) { animation-delay: 0.35s; }
.linkbox:nth-child(7) { animation-delay: 0.4s; }
.linkbox:nth-child(8) { animation-delay: 0.45s; }
.linkbox:nth-child(9) { animation-delay: 0.5s; }
.linkbox:nth-child(10) { animation-delay: 0.55s; }

/* Responsive */
@media (min-width: 640px) {
  .linkpage {
    padding: var(--spacing-6) var(--spacing-6);
    padding-top: 3rem;
  }

  .linkpage-avatar {
    width: 140px;
    height: 140px;
  }

  .linkpage-title {
    font-size: 2.5rem;
  }

  .linkpage-description {
    font-size: 1.125rem;
  }

  .linkbox-title {
    font-size: 1.125rem;
  }

  .social-link {
    width: 52px;
    height: 52px;
    font-size: 1.375rem;
  }
}

/* Brand-specific button colors */
.linkbox[data-brand="instagram"] {
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  border-color: #E1306C;
  color: white;
}

.linkbox[data-brand="instagram"] .linkbox-title,
.linkbox[data-brand="instagram"] .linkbox-description,
.linkbox[data-brand="instagram"] .brand-icon {
  color: white;
}

.linkbox[data-brand="instagram"]:hover {
  background: linear-gradient(45deg, #e08423 0%, #d65832 25%, #cc1733 50%, #bc1356 75%, #ac0878 100%);
}

.linkbox[data-brand="tiktok"] {
  background: #000000;
  border-color: #00f2ea;
  color: white;
}

.linkbox[data-brand="tiktok"] .linkbox-title,
.linkbox[data-brand="tiktok"] .linkbox-description,
.linkbox[data-brand="tiktok"] .brand-icon {
  color: white;
}

.linkbox[data-brand="tiktok"]:hover {
  background: #00f2ea;
  border-color: #ff0050;
  color: #000000;
}

.linkbox[data-brand="tiktok"]:hover .linkbox-title,
.linkbox[data-brand="tiktok"]:hover .linkbox-description,
.linkbox[data-brand="tiktok"]:hover .brand-icon {
  color: #000000;
}

.linkbox[data-brand="youtube"] {
  background: #FF0000;
  border-color: #CC0000;
  color: white;
}

.linkbox[data-brand="youtube"] .linkbox-title,
.linkbox[data-brand="youtube"] .linkbox-description,
.linkbox[data-brand="youtube"] .brand-icon {
  color: white;
}

.linkbox[data-brand="youtube"]:hover {
  background: #CC0000;
}

.linkbox[data-brand="x"],
.linkbox[data-brand="twitter"] {
  background: #000000;
  border-color: #14171A;
  color: white;
}

.linkbox[data-brand="x"] .linkbox-title,
.linkbox[data-brand="x"] .linkbox-description,
.linkbox[data-brand="x"] .brand-icon,
.linkbox[data-brand="twitter"] .linkbox-title,
.linkbox[data-brand="twitter"] .linkbox-description,
.linkbox[data-brand="twitter"] .brand-icon {
  color: white;
}

.linkbox[data-brand="x"]:hover,
.linkbox[data-brand="twitter"]:hover {
  background: #1A1A1A;
}

.linkbox[data-brand="spotify"] {
  background: #1DB954;
  border-color: #1ed760;
  color: white;
}

.linkbox[data-brand="spotify"] .linkbox-title,
.linkbox[data-brand="spotify"] .linkbox-description,
.linkbox[data-brand="spotify"] .brand-icon {
  color: white;
}

.linkbox[data-brand="spotify"]:hover {
  background: #1ed760;
}

.linkbox[data-brand="discord"] {
  background: #5865F2;
  border-color: #4752C4;
  color: white;
}

.linkbox[data-brand="discord"] .linkbox-title,
.linkbox[data-brand="discord"] .linkbox-description,
.linkbox[data-brand="discord"] .brand-icon {
  color: white;
}

.linkbox[data-brand="discord"]:hover {
  background: #4752C4;
}

.linkbox[data-brand="linkedin"] {
  background: #0A66C2;
  border-color: #004182;
  color: white;
}

.linkbox[data-brand="linkedin"] .linkbox-title,
.linkbox[data-brand="linkedin"] .linkbox-description,
.linkbox[data-brand="linkedin"] .brand-icon {
  color: white;
}

.linkbox[data-brand="linkedin"]:hover {
  background: #004182;
}

.linkbox[data-brand="patreon"] {
  background: #FF424D;
  border-color: #E62B36;
  color: white;
}

.linkbox[data-brand="patreon"] .linkbox-title,
.linkbox[data-brand="patreon"] .linkbox-description,
.linkbox[data-brand="patreon"] .brand-icon {
  color: white;
}

.linkbox[data-brand="patreon"]:hover {
  background: #E62B36;
}

.linkbox[data-brand="onlyfans"] {
  background: linear-gradient(135deg, #00AFF0 0%, #0090C8 100%);
  border-color: #00AFF0;
  color: white;
}

.linkbox[data-brand="onlyfans"] .linkbox-title,
.linkbox[data-brand="onlyfans"] .linkbox-description,
.linkbox[data-brand="onlyfans"] .brand-icon {
  color: white;
}

.linkbox[data-brand="onlyfans"]:hover {
  background: linear-gradient(135deg, #0090C8 0%, #0078A8 100%);
}

.linkbox[data-brand="facebook"] {
  background: #1877F2;
  border-color: #0C63D4;
  color: white;
}

.linkbox[data-brand="facebook"] .linkbox-title,
.linkbox[data-brand="facebook"] .linkbox-description,
.linkbox[data-brand="facebook"] .brand-icon {
  color: white;
}

.linkbox[data-brand="facebook"]:hover {
  background: #0C63D4;
}

.linkbox[data-brand="twitch"] {
  background: #9146FF;
  border-color: #772CE8;
  color: white;
}

.linkbox[data-brand="twitch"] .linkbox-title,
.linkbox[data-brand="twitch"] .linkbox-description,
.linkbox[data-brand="twitch"] .brand-icon {
  color: white;
}

.linkbox[data-brand="twitch"]:hover {
  background: #772CE8;
}

.linkbox[data-brand="github"] {
  background: #181717;
  border-color: #24292e;
  color: white;
}

.linkbox[data-brand="github"] .linkbox-title,
.linkbox[data-brand="github"] .linkbox-description,
.linkbox[data-brand="github"] .brand-icon {
  color: white;
}

.linkbox[data-brand="github"]:hover {
  background: #24292e;
}

.linkbox[data-brand="reddit"] {
  background: #FF4500;
  border-color: #E63E00;
  color: white;
}

.linkbox[data-brand="reddit"] .linkbox-title,
.linkbox[data-brand="reddit"] .linkbox-description,
.linkbox[data-brand="reddit"] .brand-icon {
  color: white;
}

.linkbox[data-brand="reddit"]:hover {
  background: #E63E00;
}

.linkbox[data-brand="snapchat"] {
  background: #FFFC00;
  border-color: #F5EC00;
  color: #000000;
}

.linkbox[data-brand="snapchat"] .linkbox-title,
.linkbox[data-brand="snapchat"] .linkbox-description,
.linkbox[data-brand="snapchat"] .brand-icon {
  color: #000000;
}

.linkbox[data-brand="snapchat"]:hover {
  background: #F5EC00;
}

.linkbox[data-brand="pinterest"] {
  background: #E60023;
  border-color: #BD001E;
  color: white;
}

.linkbox[data-brand="pinterest"] .linkbox-title,
.linkbox[data-brand="pinterest"] .linkbox-description,
.linkbox[data-brand="pinterest"] .brand-icon {
  color: white;
}

.linkbox[data-brand="pinterest"]:hover {
  background: #BD001E;
}

.linkbox[data-brand="whatsapp"] {
  background: #25D366;
  border-color: #1EBE57;
  color: white;
}

.linkbox[data-brand="whatsapp"] .linkbox-title,
.linkbox[data-brand="whatsapp"] .linkbox-description,
.linkbox[data-brand="whatsapp"] .brand-icon {
  color: white;
}

.linkbox[data-brand="whatsapp"]:hover {
  background: #1EBE57;
}

.linkbox[data-brand="telegram"] {
  background: #26A5E4;
  border-color: #1A93D0;
  color: white;
}

.linkbox[data-brand="telegram"] .linkbox-title,
.linkbox[data-brand="telegram"] .linkbox-description,
.linkbox[data-brand="telegram"] .brand-icon {
  color: white;
}

.linkbox[data-brand="telegram"]:hover {
  background: #1A93D0;
}

/* Ensure good contrast on brand buttons */
.linkbox[data-brand="instagram"] .linkbox-title {
  color: white !important;
}

.linkbox[data-brand="instagram"] .linkbox-description {
  color: rgba(255, 255, 255, 0.9) !important;
}

.linkbox[data-brand="tiktok"] .linkbox-title {
  color: white !important;
}

.linkbox[data-brand="tiktok"] .linkbox-description {
  color: rgba(255, 255, 255, 0.9) !important;
}

.linkbox[data-brand="tiktok"]:hover .linkbox-title {
  color: #000000 !important;
}

.linkbox[data-brand="tiktok"]:hover .linkbox-description {
  color: rgba(0, 0, 0, 0.7) !important;
}

.linkbox[data-brand="youtube"] .linkbox-title {
  color: white !important;
}

.linkbox[data-brand="youtube"] .linkbox-description {
  color: rgba(255, 255, 255, 0.9) !important;
}

.linkbox[data-brand="x"] .linkbox-title,
.linkbox[data-brand="twitter"] .linkbox-title {
  color: white !important;
}

.linkbox[data-brand="x"] .linkbox-description,
.linkbox[data-brand="twitter"] .linkbox-description {
  color: rgba(255, 255, 255, 0.9) !important;
}

.linkbox[data-brand="spotify"] .linkbox-title {
  color: white !important;
}

.linkbox[data-brand="spotify"] .linkbox-description {
  color: rgba(255, 255, 255, 0.9) !important;
}

.linkbox[data-brand="discord"] .linkbox-title {
  color: white !important;
}

.linkbox[data-brand="discord"] .linkbox-description {
  color: rgba(255, 255, 255, 0.9) !important;
}

.linkbox[data-brand="linkedin"] .linkbox-title {
  color: white !important;
}

.linkbox[data-brand="linkedin"] .linkbox-description {
  color: rgba(255, 255, 255, 0.9) !important;
}

.linkbox[data-brand="patreon"] .linkbox-title {
  color: white !important;
}

.linkbox[data-brand="patreon"] .linkbox-description {
  color: rgba(255, 255, 255, 0.9) !important;
}

.linkbox[data-brand="onlyfans"] .linkbox-title {
  color: white !important;
}

.linkbox[data-brand="onlyfans"] .linkbox-description {
  color: rgba(255, 255, 255, 0.9) !important;
}

.linkbox[data-brand="facebook"] .linkbox-title {
  color: white !important;
}

.linkbox[data-brand="facebook"] .linkbox-description {
  color: rgba(255, 255, 255, 0.9) !important;
}

.linkbox[data-brand="twitch"] .linkbox-title {
  color: white !important;
}

.linkbox[data-brand="twitch"] .linkbox-description {
  color: rgba(255, 255, 255, 0.9) !important;
}

.linkbox[data-brand="github"] .linkbox-title {
  color: white !important;
}

.linkbox[data-brand="github"] .linkbox-description {
  color: rgba(255, 255, 255, 0.9) !important;
}

.linkbox[data-brand="reddit"] .linkbox-title {
  color: white !important;
}

.linkbox[data-brand="reddit"] .linkbox-description {
  color: rgba(255, 255, 255, 0.9) !important;
}

.linkbox[data-brand="snapchat"] .linkbox-title {
  color: #000000 !important;
}

.linkbox[data-brand="snapchat"] .linkbox-description {
  color: rgba(0, 0, 0, 0.7) !important;
}

.linkbox[data-brand="pinterest"] .linkbox-title {
  color: white !important;
}

.linkbox[data-brand="pinterest"] .linkbox-description {
  color: rgba(255, 255, 255, 0.9) !important;
}

.linkbox[data-brand="whatsapp"] .linkbox-title {
  color: white !important;
}

.linkbox[data-brand="whatsapp"] .linkbox-description {
  color: rgba(255, 255, 255, 0.9) !important;
}

.linkbox[data-brand="telegram"] .linkbox-title {
  color: white !important;
}

.linkbox[data-brand="telegram"] .linkbox-description {
  color: rgba(255, 255, 255, 0.9) !important;
}
