/* ========================================
   Links Hub — Cyber Glassmorphism Theme
   @zahidoverflow Profile Hub
   ======================================== */

.links-page-wrapper {
  min-height: 100vh;
  max-width: 680px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
  position: relative;
  z-index: 1;
}

/* ========================================
   Top Navigation
   ======================================== */
.links-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  padding: 0.5rem 0.25rem;
}

.back-home-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-decoration: none;
  background: hsla(220, 20%, 10%, 0.7);
  border: 1px solid hsla(220, 15%, 22%, 0.8);
  padding: 0.45rem 0.95rem;
  border-radius: 20px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.25s ease;
}

.back-home-link:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: hsla(160, 100%, 50%, 0.08);
  transform: translateX(-3px);
}

.share-profile-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-primary);
  background: hsla(220, 20%, 10%, 0.7);
  border: 1px solid hsla(220, 15%, 22%, 0.8);
  padding: 0.45rem 0.95rem;
  border-radius: 20px;
  cursor: pointer;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.25s ease;
}

.share-profile-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: hsla(160, 100%, 50%, 0.1);
  box-shadow: 0 0 15px hsla(160, 100%, 50%, 0.2);
}

/* ========================================
   Hero Profile Card
   ======================================== */
@keyframes pulse-ring {
  0% {
    box-shadow: 0 0 0 0 hsla(160, 100%, 50%, 0.7);
  }
  70% {
    box-shadow: 0 0 0 8px hsla(160, 100%, 50%, 0);
  }
  100% {
    box-shadow: 0 0 0 0 hsla(160, 100%, 50%, 0);
  }
}
.profile-hero {
  text-align: center;
  background: linear-gradient(145deg, hsla(220, 20%, 9%, 0.85), hsla(220, 20%, 6%, 0.9));
  border: 1px solid hsla(220, 15%, 20%, 0.9);
  border-radius: 20px;
  padding: 2.25rem 1.5rem 1.75rem;
  margin-bottom: 2rem;
  box-shadow: 0 10px 30px hsla(220, 20%, 2%, 0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  position: relative;
  overflow: hidden;
}

.profile-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--accent), hsla(190, 100%, 50%, 0.8), transparent);
}

.avatar-container {
  position: relative;
  width: 100px;
  height: 100px;
  margin: 0 auto 1.25rem;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(135deg, hsla(160, 100%, 50%, 0.6), hsla(190, 100%, 50%, 0.3), hsla(220, 20%, 20%, 0.8));
  box-shadow: 0 0 25px hsla(160, 100%, 50%, 0.25), 0 8px 16px hsla(0, 0%, 0%, 0.4);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.avatar-container:hover {
  transform: scale(1.05);
  box-shadow: 0 0 35px hsla(160, 100%, 50%, 0.4), 0 10px 20px hsla(0, 0%, 0%, 0.5);
}

.avatar-image {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  background: hsl(220, 20%, 8%);
}

.avatar-badge-online {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid hsl(220, 20%, 8%);
  box-shadow: 0 0 8px var(--accent);
  animation: pulse-ring 2.5s infinite;
}

.profile-name {
  font-size: clamp(1.5rem, 4vw, 1.85rem);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.verified-icon {
  color: var(--accent);
  font-size: 1.1rem;
}

.handle-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--accent);
  background: hsla(160, 100%, 50%, 0.08);
  border: 1px solid hsla(160, 100%, 50%, 0.25);
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  cursor: pointer;
  margin-bottom: 0.85rem;
  transition: all 0.25s ease;
}

.handle-copy-btn:hover {
  background: hsla(160, 100%, 50%, 0.16);
  border-color: var(--accent);
  box-shadow: 0 0 12px hsla(160, 100%, 50%, 0.25);
  transform: translateY(-1px);
}

.profile-tagline {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.5;
  max-width: 500px;
  margin: 0 auto 1.25rem;
}

.profile-quick-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding-top: 0.75rem;
  border-top: 1px solid hsla(220, 15%, 18%, 0.6);
}

.quick-action-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-primary);
  background: hsla(220, 15%, 14%, 0.8);
  border: 1px solid hsla(220, 15%, 24%, 0.7);
  padding: 0.4rem 0.85rem;
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.quick-action-pill:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: hsla(160, 100%, 50%, 0.08);
  transform: translateY(-2px);
}

.quick-action-pill.wa:hover {
  color: #25d366;
  border-color: #25d366;
  background: hsla(142, 70%, 49%, 0.1);
}

.quick-action-pill.email:hover {
  color: #ea4335;
  border-color: #ea4335;
  background: hsla(5, 80%, 56%, 0.1);
}

/* ========================================
   Search & Filter Controls
   ======================================== */
.links-controls {
  margin-bottom: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.search-box-wrapper {
  position: relative;
  width: 100%;
}

.search-icon-left {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.9rem;
  pointer-events: none;
}

.search-input {
  width: 100%;
  background: hsla(220, 20%, 9%, 0.85);
  border: 1px solid hsla(220, 15%, 22%, 0.8);
  border-radius: 14px;
  padding: 0.75rem 2.5rem 0.75rem 2.6rem;
  font-family: var(--font-sans);
  font-size: 0.92rem;
  color: var(--text-primary);
  outline: none;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.25s ease;
}

.search-input::placeholder {
  color: var(--text-muted);
}

.search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 16px hsla(160, 100%, 50%, 0.2);
  background: hsla(220, 20%, 11%, 0.95);
}

.search-clear-btn {
  position: absolute;
  right: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem 0.4rem;
  font-size: 0.85rem;
  border-radius: 6px;
  display: none;
}

.search-clear-btn:hover {
  color: var(--text-primary);
}

.category-filter-chips {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.35rem;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.category-filter-chips::-webkit-scrollbar {
  display: none;
}

.filter-chip {
  flex-shrink: 0;
  background: hsla(220, 20%, 10%, 0.7);
  border: 1px solid hsla(220, 15%, 22%, 0.8);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 0.4rem 0.85rem;
  border-radius: 20px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.filter-chip:hover {
  color: var(--text-primary);
  border-color: hsla(160, 100%, 50%, 0.4);
}

.filter-chip.active {
  background: hsla(160, 100%, 50%, 0.15);
  color: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 10px hsla(160, 100%, 50%, 0.2);
}

/* ========================================
   Section & Link Cards
   ======================================== */
.links-section {
  margin-bottom: 2rem;
  transition: opacity 0.3s ease;
}

.section-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
  padding: 0 0.25rem;
}

.section-label-text {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-badge-count {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  background: hsla(220, 15%, 15%, 0.8);
  padding: 0.15rem 0.5rem;
  border-radius: 10px;
}

.cards-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Standard Link Card */
.link-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: linear-gradient(145deg, hsla(220, 20%, 9%, 0.85), hsla(220, 20%, 7%, 0.9));
  border: 1px solid hsla(220, 15%, 20%, 0.85);
  border-radius: 16px;
  padding: 1rem 1.15rem;
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.link-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  padding: 1px;
  background: linear-gradient(135deg, transparent, transparent);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  transition: background 0.3s ease;
}

.link-card:hover {
  transform: translateY(-2.5px);
  border-color: var(--card-brand, var(--accent));
  box-shadow: 0 8px 24px var(--card-glow, hsla(160, 100%, 50%, 0.15));
  background: linear-gradient(145deg, hsla(220, 20%, 11%, 0.95), hsla(220, 20%, 8%, 0.95));
}

.link-card:active {
  transform: translateY(-1px);
}

/* Card Brand Colors & Specific Accents */
.link-card.brand-htb {
  --card-brand: #9fef00;
  --card-glow: hsla(82, 100%, 47%, 0.18);
}
.link-card.brand-thm {
  --card-brand: #ff2449;
  --card-glow: hsla(349, 100%, 57%, 0.18);
}
.link-card.brand-credly {
  --card-brand: #ff6b00;
  --card-glow: hsla(25, 100%, 50%, 0.18);
}
.link-card.brand-github {
  --card-brand: #f0f6fc;
  --card-glow: hsla(210, 15%, 85%, 0.15);
}
.link-card.brand-google {
  --card-brand: #4285f4;
  --card-glow: hsla(217, 89%, 61%, 0.18);
}
.link-card.brand-blog {
  --card-brand: #00ffc8;
  --card-glow: hsla(160, 100%, 50%, 0.2);
}
.link-card.brand-portfolio {
  --card-brand: #00d4aa;
  --card-glow: hsla(160, 100%, 45%, 0.2);
}
.link-card.brand-linkedin {
  --card-brand: #0a66c2;
  --card-glow: hsla(210, 90%, 45%, 0.2);
}
.link-card.brand-x {
  --card-brand: #ffffff;
  --card-glow: hsla(0, 0%, 100%, 0.15);
}
.link-card.brand-bluesky {
  --card-brand: #0285ff;
  --card-glow: hsla(211, 100%, 50%, 0.2);
}
.link-card.brand-play {
  --card-brand: #01875f;
  --card-glow: hsla(162, 99%, 27%, 0.2);
}
.link-card.brand-youtube {
  --card-brand: #ff0000;
  --card-glow: hsla(0, 100%, 50%, 0.18);
}
.link-card.brand-gravatar {
  --card-brand: #1e8cbe;
  --card-glow: hsla(199, 73%, 43%, 0.18);
}
.link-card.brand-whatsapp {
  --card-brand: #25d366;
  --card-glow: hsla(142, 70%, 49%, 0.2);
}
.link-card.brand-email {
  --card-brand: #ea4335;
  --card-glow: hsla(5, 80%, 56%, 0.18);
}
.link-card.brand-phone {
  --card-brand: #00ffc8;
  --card-glow: hsla(160, 100%, 50%, 0.2);
}

/* Card Icon Box */
.card-icon-box {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: hsla(220, 20%, 13%, 0.9);
  border: 1px solid hsla(220, 15%, 24%, 0.8);
  color: var(--card-brand, var(--accent));
  font-size: 1.25rem;
  flex-shrink: 0;
  transition: all 0.25s ease;
}

.link-card:hover .card-icon-box {
  background: var(--card-brand, var(--accent));
  color: hsl(220, 20%, 4%);
  box-shadow: 0 0 15px var(--card-brand, var(--accent));
  transform: scale(1.05);
}

.card-icon-svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

/* Card Info */
.card-content {
  flex: 1;
  min-width: 0;
}

.card-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.2rem;
}

.card-title {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-badge {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--card-brand, var(--accent));
  background: hsla(220, 20%, 14%, 0.9);
  border: 1px solid hsla(220, 15%, 26%, 0.7);
  padding: 0.15rem 0.5rem;
  border-radius: 8px;
  white-space: nowrap;
}

.card-handle {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  margin-bottom: 0.2rem;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Card Actions (Right Side) */
.card-action-icon {
  color: var(--text-muted);
  font-size: 0.85rem;
  flex-shrink: 0;
  transition: all 0.25s ease;
  padding: 0.4rem;
  border-radius: 8px;
}

.link-card:hover .card-action-icon {
  color: var(--card-brand, var(--accent));
  transform: translate(2px, -2px);
}

.card-copy-btn {
  background: hsla(220, 15%, 15%, 0.8);
  border: 1px solid hsla(220, 15%, 26%, 0.8);
  color: var(--text-secondary);
  font-size: 0.8rem;
  padding: 0.4rem 0.6rem;
  border-radius: 8px;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.card-copy-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: hsla(160, 100%, 50%, 0.12);
  transform: scale(1.08);
}

/* Empty Search State */
.empty-search-state {
  display: none;
  text-align: center;
  padding: 3rem 1.5rem;
  background: hsla(220, 20%, 9%, 0.7);
  border: 1px dashed hsla(220, 15%, 22%, 0.8);
  border-radius: 16px;
  margin: 1.5rem 0;
}

.empty-search-icon {
  font-size: 2.2rem;
  color: var(--text-muted);
  margin-bottom: 0.85rem;
}

.empty-search-title {
  font-size: 1.1rem;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
}

.empty-search-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
}

.empty-search-reset-btn {
  background: hsla(160, 100%, 50%, 0.1);
  border: 1px solid var(--accent);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  padding: 0.45rem 1rem;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.empty-search-reset-btn:hover {
  background: var(--accent);
  color: hsl(220, 20%, 4%);
}

/* ========================================
   Toast Notification
   ======================================== */
.links-toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: hsla(220, 25%, 12%, 0.95);
  border: 1px solid var(--accent);
  box-shadow: 0 10px 30px hsla(0, 0%, 0%, 0.7), 0 0 20px hsla(160, 100%, 50%, 0.25);
  color: var(--text-primary);
  padding: 0.65rem 1.25rem;
  border-radius: 30px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  z-index: 1000;
  pointer-events: none;
  opacity: 0;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.links-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast-icon {
  color: var(--accent);
}

/* ========================================
   Links Footer
   ======================================== */
.links-footer {
  text-align: center;
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid hsla(220, 15%, 18%, 0.6);
  font-size: 0.82rem;
  color: var(--text-muted);
}

.links-footer-brand {
  font-family: var(--font-mono);
  color: var(--text-secondary);
  margin-bottom: 0.45rem;
}

.links-footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}

.links-footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.links-footer-links a:hover {
  color: var(--accent);
}

/* ========================================
   Responsive Breakpoints
   ======================================== */
@media (max-width: 600px) {
  .links-page-wrapper {
    padding: 1.25rem 0.85rem 3rem;
  }

  .profile-hero {
    padding: 1.75rem 1rem 1.25rem;
  }

  .avatar-container {
    width: 88px;
    height: 88px;
    margin-bottom: 1rem;
  }

  .link-card {
    padding: 0.85rem 1rem;
    gap: 0.85rem;
  }

  .card-icon-box {
    width: 42px;
    height: 42px;
    font-size: 1.15rem;
  }

  .card-desc {
    display: none;
  }

  .card-title {
    font-size: 0.92rem;
  }

  .card-handle {
    font-size: 0.78rem;
  }
}
