/* ─── SYSTEM CONFIGURATION ─── */
:root {
  /* Colors */
  --bg-dark: #0A0B0B; /* Deep rich street charcoal */
  --bg-card: rgba(253, 251, 247, 0.04);
  --bg-card-hover: rgba(253, 251, 247, 0.08);
  
  --accent-orange: #FF6B00; /* Legendários Orange */
  --accent-orange-rgb: 255, 107, 0;
  --accent-gold: #FFD700;
  --accent-gold-rgb: 255, 215, 0;
  --accent-blue: #004B87;
  --accent-red: #C45A3C;
  --text-light: #FDFBF7;
  --text-smoke: rgba(253, 251, 247, 0.65);
  
  /* Fonts */
  --font-heading: 'Outfit', sans-serif;
  --font-sans: 'Plus Jakarta Sans', sans-serif;
}

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

body {
  background-color: var(--bg-dark);
  color: var(--text-light);
  font-family: var(--font-sans);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 20px 16px;
  -webkit-font-smoothing: antialiased;
}

/* Background Gradients */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 10% 20%, rgba(255, 107, 0, 0.1) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(196, 90, 60, 0.08) 0%, transparent 40%);
  z-index: -2;
  pointer-events: none;
}

/* Texture Overlay (Grain) */
.texture-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.035'/%3E%3C/svg%3E");
  z-index: -1;
  pointer-events: none;
}

/* Spray Particle Canvas */
#spray-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
}

/* ─── CONTAINER ─── */
.container {
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 10;
}

/* ─── LANGUAGE BAR ─── */
.lang-bar-container {
  width: 100%;
  display: flex;
  justify-content: flex-end;
  margin-bottom: 24px;
}

.lang-bar {
  background: rgba(253, 251, 247, 0.03);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(253, 251, 247, 0.1);
  padding: 4px;
  border-radius: 20px;
  display: flex;
  gap: 2px;
}

.lang-btn {
  background: transparent;
  border: none;
  color: var(--text-smoke);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.5px;
  padding: 6px 12px;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.lang-btn.active {
  background: var(--text-light);
  color: var(--bg-dark);
}

.lang-btn:hover:not(.active) {
  color: var(--text-light);
  background: rgba(253, 251, 247, 0.05);
}

/* ─── PROFILE HEADER ─── */
.profile-header {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 32px;
  width: 100%;
}

.header-stars {
  width: 120px;
  height: 25px;
  margin-bottom: 16px;
}

.stars-svg {
  width: 100%;
  height: 100%;
}

/* Profile Photo */
.avatar-wrapper {
  position: relative;
  width: 104px;
  height: 104px;
  margin-bottom: 16px;
}

.avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-cover: cover;
  border: 2px solid var(--text-light);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}
.logo-badge {
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  pointer-events: none;
}

.artist-logo-badge {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0px 2px 5px rgba(0, 0, 0, 0.8));
}

.artist-name {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.5px;
  color: var(--text-light);
  margin-bottom: 4px;
  text-transform: uppercase;
}

.artist-underline {
  width: 120px;
  height: 8px;
  margin-bottom: 16px;
}

.artist-underline svg {
  width: 100%;
  height: 100%;
}

.artist-underline path {
  stroke-dasharray: 300;
  stroke-dashoffset: 300;
  animation: drawUnderline 1.5s forwards ease-in-out 0.2s;
}

@keyframes drawUnderline {
  to {
    stroke-dashoffset: 0;
  }
}

.artist-bio {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-smoke);
  max-width: 300px;
  text-align: center;
}

/* ─── LINKS LIST ─── */
.links-list {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 40px;
}

.link-card {
  position: relative;
  width: 100%;
  text-decoration: none;
  color: var(--text-light);
  background: var(--bg-card);
  border-radius: 16px;
  display: block;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(253, 251, 247, 0.08);
}

/* Hand Drawn Border Overlay */
.sketchy-border {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.3;
  transition: opacity 0.3s ease;
}

.sketchy-border path {
  stroke-dasharray: 400;
  stroke-dashoffset: 400;
  transition: stroke-dashoffset 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Card Content Flex */
.link-content {
  display: flex;
  align-items: center;
  padding: 16px;
  gap: 16px;
  position: relative;
  z-index: 2;
}

/* Icons styling */
.link-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.3s ease;
  color: var(--text-light);
  border: 1px solid rgba(253, 251, 247, 0.1);
}

.bg-gold-light { background: rgba(255, 215, 0, 0.1); color: var(--accent-gold); border-color: rgba(255, 215, 0, 0.2); }
.bg-orange-light { background: rgba(255, 107, 0, 0.15); color: var(--accent-orange); border-color: rgba(255, 107, 0, 0.25); }
.bg-blue-light { background: rgba(0, 75, 135, 0.2); color: #4DA6FF; border-color: rgba(0, 75, 135, 0.3); }
.bg-green-light { background: rgba(0, 166, 81, 0.15); color: #2EE575; border-color: rgba(0, 166, 81, 0.25); }
.bg-red-light { background: rgba(196, 90, 60, 0.15); color: #FFA38A; border-color: rgba(196, 90, 60, 0.25); }
.bg-youtube-red { background: rgba(229, 9, 20, 0.15); color: #FF4D4D; border-color: rgba(229, 9, 20, 0.25); }

.link-icon svg {
  width: 22px;
  height: 22px;
  transition: transform 0.3s ease;
}

/* Link Typography */
.link-text {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0; /* allows text truncation */
}

.link-badge {
  align-self: flex-start;
  font-family: var(--font-heading);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  background: var(--accent-orange);
  color: var(--text-light);
  padding: 2.5px 8px;
  border-radius: 20px;
  margin-bottom: 2px;
  box-shadow: 0 2px 8px rgba(var(--accent-orange-rgb), 0.3);
}

.link-title {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  color: var(--text-light);
  letter-spacing: -0.2px;
  transition: color 0.3s ease;
}

.link-desc {
  font-size: 11px;
  color: var(--text-smoke);
  line-height: 1.4;
  white-space: normal;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* Arrow indicator */
.link-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-smoke);
  opacity: 0;
  transform: translateX(-8px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}

.link-arrow svg {
  width: 18px;
  height: 18px;
}

/* Hover States */
.link-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(253, 251, 247, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
}

.link-card:hover .sketchy-border {
  opacity: 1;
}

.link-card:hover .sketchy-border path {
  stroke-dashoffset: 0;
}

.link-card:hover .link-title {
  color: var(--accent-gold);
}

.link-card:hover .link-arrow {
  opacity: 1;
  transform: translateX(0);
  color: var(--accent-gold);
}

.link-card:hover .link-icon svg {
  transform: scale(1.1);
}

/* Featured / Lançamento Card */
.link-card.featured {
  background: linear-gradient(135deg, rgba(var(--accent-gold-rgb), 0.06) 0%, rgba(3, 29, 15, 0.45) 100%);
  border: 1px solid rgba(var(--accent-gold-rgb), 0.25);
  animation: borderGlow 3s infinite alternate;
}

.link-card.featured .sketchy-border {
  opacity: 0.6;
}

.link-card.featured .link-title {
  color: var(--accent-gold);
  font-size: 16px;
  font-weight: 800;
}

.link-card.featured:hover {
  background: linear-gradient(135deg, rgba(var(--accent-gold-rgb), 0.12) 0%, rgba(3, 29, 15, 0.55) 100%);
}

.link-card.featured:hover .link-title {
  color: var(--accent-gold);
}

.link-card.featured:hover .link-arrow {
  color: var(--accent-gold);
}

@keyframes borderGlow {
  0% {
    box-shadow: 0 4px 15px rgba(var(--accent-gold-rgb), 0.05);
    border-color: rgba(var(--accent-gold-rgb), 0.2);
  }
  100% {
    box-shadow: 0 4px 20px rgba(var(--accent-gold-rgb), 0.2);
    border-color: rgba(var(--accent-gold-rgb), 0.5);
  }
}

/* ─── FOOTER ─── */
.footer {
  text-align: center;
  margin-top: 12px;
  padding: 16px 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  border-top: 1px solid rgba(253, 251, 247, 0.05);
}

.footer-stars {
  width: 80px;
  height: 15px;
}

.mini-stars-svg {
  width: 100%;
  height: 100%;
}

.footer-text {
  font-size: 11px;
  color: var(--text-smoke);
}

.footer-credits {
  font-size: 10px;
  color: rgba(253, 251, 247, 0.4);
}

.credit-link {
  color: var(--accent-gold);
  text-decoration: none;
  font-weight: 700;
  transition: text-shadow 0.3s ease;
}

.credit-link:hover {
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
}

/* Wobbly stroke animation for borders on hover */
@keyframes borderWobble {
  0% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.01) rotate(0.1deg); }
  100% { transform: scale(0.99) rotate(-0.1deg); }
}

.link-card:hover .sketchy-border {
  animation: borderWobble 0.8s infinite alternate ease-in-out;
}

@media (max-width: 420px) {
  body {
    padding: 16px 10px;
  }

  .lang-bar-container {
    margin-bottom: 18px;
  }

  .profile-header {
    margin-bottom: 24px;
  }

  .artist-name {
    font-size: 24px;
    letter-spacing: 0;
  }

  .artist-bio {
    max-width: 100%;
    padding: 0 4px;
  }

  .links-list {
    gap: 12px;
  }

  .link-content {
    padding: 14px 12px;
    gap: 12px;
  }

  .link-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
  }

  .link-icon svg {
    width: 20px;
    height: 20px;
  }

  .link-badge {
    max-width: 100%;
    white-space: normal;
    line-height: 1.2;
  }

  .link-title,
  .link-card.featured .link-title {
    font-size: 14px;
    line-height: 1.2;
    letter-spacing: 0;
    overflow-wrap: anywhere;
  }

  .link-desc {
    font-size: 11px;
    -webkit-line-clamp: 3;
    overflow-wrap: anywhere;
  }

  .link-arrow {
    display: none;
  }
}

@media (max-width: 340px) {
  .link-content {
    align-items: flex-start;
  }

  .link-icon {
    width: 38px;
    height: 38px;
  }
}
