/* Proteções CSS */
* {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

/* Permitir seleção apenas em textos específicos se necessário */
.bio, .footer-text {
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
}

/* Bloquear print screen */
@media print {
  body { display: none !important; }
}

/* Proteção contra extensões de screenshot */
body {
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -o-user-select: none;
  user-select: none;
}

:root {
  --bg: linear-gradient(135deg, #fdf2f8 0%, #fce7f3 50%, #fbcfe8 100%);     /* será substituído dinamicamente */
  --panel: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #f3e8ff;
  --accent: #0f172a;           /* azul muito escuro (quase preto) */
  --accent-2: #0c1629;        /* azul super escuro */
  --accent-3: #1e293b;        /* azul escuro médio */
  --button-bg: linear-gradient(145deg, #1e293b, #0f172a);  /* gradiente muito escuro */
  --shadow: rgba(15, 23, 42, 0.35);
  --radius: 16px;
}

/* Otimizações de performance */
* { box-sizing: border-box; }
html, body { height: 100%; }
body { 
  margin: 0; 
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; 
  color: var(--text); 
  background: var(--bg);
  background-attachment: fixed; 
  overflow-x: hidden; 
  -webkit-font-smoothing: antialiased; 
  -moz-osx-font-smoothing: grayscale; 
  position: relative;
}

/* Fundo adaptável com blur forte */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('imagens/avatar.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  filter: blur(80px) brightness(0.6) saturate(1.3);
  z-index: -2;
  opacity: 0.7;
  transform: scale(1.1);
}

/* Overlay para melhor contraste */
body::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, 
    rgba(255, 255, 255, 0.1) 0%, 
    rgba(255, 255, 255, 0.05) 50%, 
    rgba(0, 0, 0, 0.1) 100%);
  z-index: -1;
  backdrop-filter: blur(10px);
}

/* Reduzir will-change e melhorar performance */
.link, .social { will-change: transform; }

.wrap { 
  max-width: 760px; 
  margin: 0 auto; 
  padding: 60px 20px 40px; 
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.cards-container { 
  display: flex; 
  flex-direction: column; 
  gap: 20px; 
  width: 100%;
  animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
  from { 
    opacity: 0; 
    transform: translateY(30px); 
  }
  to { 
    opacity: 1; 
    transform: translateY(0); 
  }
}

.card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: calc(var(--radius) + 12px);
  padding: 32px;
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.15), 
    0 8px 25px rgba(0, 0, 0, 0.1), 
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateY(0);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 
    0 25px 80px rgba(0, 0, 0, 0.2), 
    0 10px 30px rgba(0, 0, 0, 0.15), 
    inset 0 1px 0 rgba(255, 255, 255, 1);
  border-color: rgba(255, 255, 255, 0.3);
}

.hero { display:flex; flex-direction:column; align-items:center; gap: 16px; text-align: center; padding: 32px 24px; }
.avatar { 
  width: 140px; 
  height: 140px; 
  border-radius: 999px; 
  background-size: var(--avatar-zoom, 120%); 
  background-position: var(--avatar-x, center) var(--avatar-y, 40%); 
  background-repeat: no-repeat;
  border: 6px solid #fff; 
  box-shadow: 0 15px 40px rgba(17, 24, 39, .2), 0 5px 15px rgba(0, 0, 0, .1); 
  transition: transform 0.3s ease;
  position: relative;
  overflow: hidden;
}

.avatar:hover {
  transform: scale(1.05);
}
.title { display:flex; align-items:center; gap: 10px; }
.title h1 { font-family: Outfit, Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; font-size: 28px; font-weight: 700; margin: 6px 0; }
.verified { display:inline-flex; align-items:center; gap: 6px; font-weight: 600; color: var(--accent); background: #f3e8ff; border: 1px solid #e9d5ff; padding: 4px 10px; border-radius: 999px; }
.verified .ico { width: 16px; height: 16px; }
.bio { color: var(--muted); margin: 0; }
.status { margin: 6px 0; }
.online { display: inline-flex; align-items: center; gap: 4px; background: #10b981; color: white; padding: 4px 10px; border-radius: 12px; font-size: 13px; font-weight: 600; animation: blink 2s ease-in-out infinite; }
@keyframes blink { 0%, 50% { opacity: 1; } 25%, 75% { opacity: .7; } }
.socials { display:flex; gap: 10px; margin-top: 6px; }
.social { position:relative; display:grid; place-items:center; width: 40px; height: 40px; border-radius: 12px; border: 1px solid rgba(0,0,0,.05); color: var(--text); background: linear-gradient(145deg, #ffffff, #f8f9fa); box-shadow: 0 4px 12px rgba(0,0,0,.1), inset 0 1px 0 rgba(255,255,255,.7); transition: .18s ease; overflow: hidden; }
.social:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(0,0,0,.14), inset 0 1px 0 rgba(255,255,255,.8); }
.social::after { content:""; position:absolute; width: 200%; aspect-ratio: 1/1; border-radius: 50%; background: radial-gradient(circle, rgba(167,139,250,.25) 0%, transparent 60%); transform: translate(-50%, -50%) scale(0); opacity:0; transition: transform .35s ease, opacity .35s ease; left: var(--mx, 50%); top: var(--my, 50%); }
.social:hover::after { transform: translate(-50%, -50%) scale(1); opacity: 1; }
.social svg { width: 20px; height: 20px; }

.links { display:flex; flex-direction:column; gap: 14px; margin: 18px 0; }
.links-card { padding: 18px; }
.link { 
  position: relative; 
  display: flex; 
  align-items: center; 
  gap: 12px; 
  padding: 18px 24px; 
  background: var(--button-bg); 
  border: 1px solid var(--accent-2); 
  border-radius: 50px; 
  text-decoration: none; 
  color: white; 
  box-shadow: 
    0 8px 24px var(--shadow),
    0 2px 8px rgba(30, 64, 175, 0.15), 
    inset 0 1px 0 rgba(255, 255, 255, 0.2); 
  transition: all 0.18s ease; 
  transform-style: preserve-3d; 
  overflow: hidden; 
  font-weight: 500;
}
.link:hover { 
  transform: translateY(-2px); 
  background: linear-gradient(145deg, #0f172a, #0c1629);
  border-color: var(--accent-3);
  box-shadow: 
    0 12px 32px var(--shadow), 
    0 4px 12px rgba(15, 23, 42, 0.3), 
    inset 0 1px 0 rgba(255, 255, 255, 0.3); 
}
.link:active { 
  transform: translateY(0px); 
  box-shadow: 
    0 4px 16px var(--shadow), 
    inset 0 2px 4px rgba(12, 22, 41, 0.2); 
}
.link::after { 
  content: ""; 
  position: absolute; 
  inset: -1px; 
  border-radius: inherit; 
  pointer-events: none; 
  background: radial-gradient(220px 48px at var(--mx, 10%) var(--my, 10%), rgba(255, 255, 255, 0.15), transparent 52%); 
  transition: opacity 0.2s; 
  opacity: 0; 
}
.link:hover::after { opacity: 1; }
.link .icon { 
  position: relative; 
  width: 44px; 
  height: 44px; 
  border-radius: 999px; 
  display: grid; 
  place-items: center; 
  border: 1px solid rgba(255, 255, 255, 0.2); 
  background: rgba(255, 255, 255, 0.1); 
  box-shadow: 
    inset 0 1px 2px rgba(255, 255, 255, 0.3), 
    inset 0 -1px 2px rgba(0, 0, 0, 0.1); 
  flex-shrink: 0; 
  backdrop-filter: blur(10px);
}
.link .icon-img { 
  position: absolute; 
  inset: 2px; 
  width: calc(100% - 4px); 
  height: calc(100% - 4px); 
  border-radius: 50%; 
  object-fit: cover; 
  z-index: 2; 
  opacity: 1; 
  transition: opacity 0.2s ease; 
}
.link .icon-img[src=""]:not([src]):not([src*="."]) { opacity: 0; }
.link .icon svg { 
  position: relative; 
  z-index: 1; 
  transition: opacity 0.2s ease; 
  opacity: 0;
}
.link .icon-img:not([src]):not([src*="."]) + svg,
.link .icon-img[src=""]:not([src*="."]) + svg { opacity: 1; }
.link .icon svg { width: 18px; height: 18px; color: white; }
.link .text { flex:1; display:flex; flex-direction:column; line-height: 1.3; }
.link small { color: rgba(255, 255, 255, 0.8); }

/* Footer sem card - mais bonito e menor */
.footer-text { 
  text-align: center; 
  color: rgba(255, 255, 255, 0.9); 
  margin-top: 40px; 
  padding: 24px 20px; 
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.footer-copyright {
  margin-bottom: 12px;
}

.footer-copyright p {
  font-size: 0.85rem;
  font-weight: 500;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  margin: 0;
}

.footer-copyright strong {
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
}

.footer-disclaimer {
  opacity: 0.75;
  line-height: 1.4;
}

.footer-disclaimer p {
  font-size: 0.75rem;
  margin: 4px 0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.footer-disclaimer em {
  font-style: italic;
  opacity: 0.8;
  font-size: 0.7rem;
}

.footer { text-align:center; color: var(--muted); margin-top: 18px; }

@media (max-width: 600px) {
  .wrap { padding: 20px 12px; }
  .cards-container { gap: 12px; }
  .card { padding: 18px; }
  .hero { gap: 10px; }
  .title { flex-direction: column; gap: 6px; text-align: center; }
  .title h1 { font-size: 24px; }
  .verified { font-size: 11px; padding: 3px 8px; }
  .avatar { width: 120px; height: 120px; border-width: 4px; }
  .bio { font-size: 14px; }
  .socials { gap: 8px; }
  .social { width: 36px; height: 36px; }
  .social svg { width: 18px; height: 18px; }
  .links-card { padding: 12px; }
  .links { gap: 10px; margin: 0; }
  .link { padding: 14px 16px; gap: 10px; min-height: 44px; }
  .link .icon { width: 38px; height: 38px; flex-shrink: 0; }
  .link .icon svg { width: 16px; height: 16px; }
  .link .text { line-height: 1.2; }
  .link .text b { font-size: 15px; }
  .link .text small { font-size: 12px; }
  .footer { padding: 12px; text-align: center; }
  .footer small { font-size: 11px; }
  .online { font-size: 12px; padding: 3px 8px; }
}

/* Ripple genérico para interações */
.ripple { 
  position: absolute; 
  width: 200px; 
  height: 200px; 
  border-radius: 50%; 
  left: 0; 
  top: 0; 
  background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 60%); 
  transform: translate(-50%, -50%) scale(0); 
  pointer-events: none; 
  animation: ripple 0.6s ease-out forwards; 
}
@keyframes ripple { to { transform: translate(-50%, -50%) scale(1); opacity: 0; } }

/* Animação do primeiro botão (DESKTOP E MOBILE) */
.link.is-primary { 
  position: relative; 
  background: linear-gradient(145deg, #0f172a, #0c1629);
  border-color: var(--accent-3);
  animation: primaryPulse 2.5s ease-in-out infinite;
}
.link.is-primary::before { 
  content: ""; 
  position: absolute; 
  inset: -3px; 
  border-radius: inherit; 
  background: linear-gradient(45deg, var(--accent), var(--accent-2), var(--accent-3)); 
  filter: blur(12px); 
  opacity: 0.6; 
  z-index: -1; 
  animation: primaryGlow 2.5s ease-in-out infinite; 
  will-change: transform, opacity; 
}

@keyframes primaryPulse { 
  0%, 100% { transform: scale(1); box-shadow: 0 8px 24px var(--shadow), 0 2px 8px rgba(15, 23, 42, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.2); } 
  50% { transform: scale(1.02); box-shadow: 0 12px 32px var(--shadow), 0 6px 16px rgba(15, 23, 42, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3); } 
}
@keyframes primaryGlow { 
  0%, 100% { transform: scale(1); opacity: 0.4; } 
  50% { transform: scale(1.05); opacity: 0.8; } 
}

/* Otimizações específicas para mobile */
@media (pointer: coarse) and (max-width: 768px) {
  .wrap { 
    padding: 40px 16px 20px; 
    min-height: 100vh;
    justify-content: flex-start;
    padding-top: 80px;
  }
  .cards-container { 
    gap: 24px; 
    animation-delay: 0.2s;
  }
  .card { 
    padding: 28px 24px; 
    border-radius: calc(var(--radius) + 16px);
    backdrop-filter: blur(25px);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 
      0 25px 70px rgba(0, 0, 0, 0.18), 
      0 10px 30px rgba(0, 0, 0, 0.12), 
      inset 0 1px 0 rgba(255, 255, 255, 1);
  }
  .card:active {
    transform: translateY(-2px) scale(0.98);
    transition-duration: 0.1s;
  }
  .link { 
    min-height: 60px; 
    padding: 16px 24px;
    border-radius: 35px;
    font-size: 16px;
  }
  .link:active { 
    transform: translateY(-1px) scale(0.98); 
    box-shadow: 0 8px 20px var(--shadow), 0 3px 8px rgba(15, 23, 42, 0.2); 
  }
  .social { 
    min-height: 52px; 
    min-width: 52px; 
    border-radius: 20px;
  }
  .avatar { width: 130px; height: 130px; border-width: 5px; }
  .title h1 { font-size: 1.8rem; }
  .bio { font-size: 1rem; line-height: 1.6; }
  
  .footer-text {
    margin-top: 32px;
    padding: 20px 16px;
  }
  
  .footer-copyright p {
    font-size: 0.8rem;
  }
  
  .footer-disclaimer p {
    font-size: 0.72rem;
  }
  
  .footer-disclaimer em {
    font-size: 0.68rem;
  }
}

/* Melhorias para telas muito pequenas */
@media (max-width: 360px) {
  .wrap { 
    padding: 30px 12px 15px; 
    padding-top: 60px;
  }
  .card { 
    padding: 24px 20px; 
    border-radius: calc(var(--radius) + 12px);
  }
  .link { 
    padding: 14px 20px; 
    min-height: 56px; 
    border-radius: 32px; 
    font-size: 15px;
  }
  .title h1 { font-size: 1.6rem; }
  .avatar { width: 110px; height: 110px; }
  .cards-container { gap: 20px; }
  
  .footer-text {
    margin-top: 24px;
    padding: 16px 12px;
  }
  
  .footer-copyright p {
    font-size: 0.75rem;
  }
  
  .footer-disclaimer p {
    font-size: 0.68rem;
  }
  
  .footer-disclaimer em {
    font-size: 0.65rem;
  }
}

/* Animações */
@keyframes ripple { 
  to { transform: translate(-50%, -50%) scale(2); opacity: 0; } 
}
