/* �✨ Purue Cosmic Color Palette - Unique Space Theme */
:root {
  /* Primary Cosmic Palette */
  --nebula-purple: #b794f6;     /* Vibrant nebula purple */
  --galaxy-blue: #6eb5ff;       /* Bright galaxy blue */
  --cosmic-cyan: #4dd4e8;       /* Electric cosmic cyan */
  --stellar-violet: #9d7ff5;    /* Deep stellar violet */
  --aurora-teal: #5ce1e6;       /* Aurora teal glow */
  --stardust-gold: #ffb86c;     /* Warm stardust gold */
  --supernova-pink: #ff79c6;    /* Supernova pink burst */
  
  /* Deep Space Tones */
  --deep-space: #1a0b2e;        /* Deep space black-purple */
  --void-purple: #2d1b4e;       /* Void purple depth */
  --dark-matter: #16213e;       /* Dark matter blue-black */
  --cosmic-indigo: #4a148c;     /* Cosmic indigo */
  --space-navy: #0f0e27;        /* Space navy */
  
  /* Transparency Layers */
  --white-frost: rgba(255, 255, 255, 0.12);
  --white-border: rgba(255, 255, 255, 0.3);
  --cosmic-glow: rgba(110, 181, 255, 0.15);
  --nebula-mist: rgba(183, 148, 246, 0.2);
  
  /* Scrollbar - Cosmic */
  --scrollbar-thumb: var(--nebula-purple);
  --scrollbar-track: rgba(183, 148, 246, 0.12);
  
  /* Transition Timing */
  --transition-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
  --transition-elastic: cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* 🌌 Body Background - Pure Cosmic Gradient */
body {
  background: 
    radial-gradient(
      ellipse at top left,
      var(--nebula-purple) 0%,
      transparent 50%
    ),
    radial-gradient(
      ellipse at top right,
      var(--galaxy-blue) 0%,
      transparent 50%
    ),
    radial-gradient(
      ellipse at bottom,
      var(--cosmic-cyan) 0%,
      transparent 60%
    ),
    linear-gradient(
      135deg,
      var(--deep-space) 0%,
      var(--void-purple) 50%,
      var(--dark-matter) 100%
    );
  font-family: 'Poppins', sans-serif;
  color: #ffffff;
  line-height: 1.6;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  transition: background 0.8s var(--transition-smooth);
  text-align: center;
  
  /* Performance optimizations */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* � Carrd - Cosmic Glass Effect */
.glass-card {
  width: 30rem;
  max-width: 95%;
  background: linear-gradient(135deg, 
    rgba(183, 148, 246, 0.25), 
    rgba(110, 181, 255, 0.22), 
    rgba(77, 212, 232, 0.18)
  );
  border-radius: 1.5rem;
  border: 1px solid var(--white-border);
  box-shadow: 
    0 10px 40px rgba(26, 11, 46, 0.4),
    0 0 0 1px rgba(110, 181, 255, 0.15) inset,
    0 0 30px rgba(110, 181, 255, 0.1);
  transition: 
    transform 0.5s var(--transition-elastic),
    box-shadow 0.5s var(--transition-smooth),
    backdrop-filter 0.5s var(--transition-smooth),
    border-color 0.5s var(--transition-smooth);
  margin: 2rem auto;
  padding: 2rem;
  backdrop-filter: blur(18px) saturate(1.3);
  animation: float 6s ease-in-out infinite;
  will-change: transform;
  text-align: center;
}

.card-body {
  text-align: center;
}

.list-group {
  text-align: left;
}

.glass-card:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow: 
    0 20px 60px rgba(26, 11, 46, 0.6),
    0 0 0 1px rgba(110, 181, 255, 0.3) inset,
    0 0 50px rgba(110, 181, 255, 0.3),
    0 0 80px rgba(77, 212, 232, 0.2);
  backdrop-filter: blur(22px) saturate(1.5);
  border-color: rgba(110, 181, 255, 0.5);
}

/* 🌟 Title */
.card-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.9rem;
  font-weight: 600;
  color: #ffffff;
  text-align: center;
  margin-bottom: 0.5rem;
  line-height: 1.3;
  letter-spacing: 0.5px;
}

/* ✧ Subtitle */
.subtitle {
  font-size: 1rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  text-align: center;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

/* 🔍 Search Box */
.search-container {
  position: relative;
}

#linkSearch {
  background: linear-gradient(120deg, 
    rgba(183, 148, 246, 0.22), 
    rgba(110, 181, 255, 0.2), 
    rgba(77, 212, 232, 0.18)
  );
  border: 1px solid var(--white-border);
  border-radius: 50px;
  padding: 0.75rem 1.5rem 0.75rem 3rem;
  color: white;
  font-size: 1rem;
  width: 100%;
  backdrop-filter: blur(16px) saturate(1.3);
  transition: 
    all 0.4s var(--transition-elastic),
    box-shadow 0.4s var(--transition-smooth);
  box-shadow: 
    0 4px 20px rgba(26, 11, 46, 0.3),
    0 0 0 1px rgba(110, 181, 255, 0.15) inset,
    0 0 15px rgba(110, 181, 255, 0.1);
  will-change: transform, box-shadow;
}

#linkSearch::placeholder {
  color: rgba(255, 255, 255, 0.65);
  transition: color 0.3s var(--transition-smooth);
}

#linkSearch:focus {
  outline: none;
  border-color: var(--galaxy-blue);
  box-shadow: 
    0 0 0 4px rgba(110, 181, 255, 0.4), 
    0 8px 30px rgba(110, 181, 255, 0.4),
    0 0 0 1px rgba(110, 181, 255, 0.25) inset,
    0 0 40px rgba(77, 212, 232, 0.3);
  background: linear-gradient(120deg, 
    rgba(183, 148, 246, 0.3), 
    rgba(110, 181, 255, 0.28), 
    rgba(77, 212, 232, 0.25)
  );
  transform: translateY(-3px) scale(1.01);
}

#linkSearch:focus::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.search-container::before {
  content: "\f002";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  left: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--galaxy-blue);
  text-shadow: 0 0 12px rgba(110, 181, 255, 0.8);
  transition: all 0.4s var(--transition-elastic);
}

.search-container:focus-within::before {
  color: var(--cosmic-cyan);
  text-shadow: 0 0 20px rgba(77, 212, 232, 1);
  transform: translateY(-50%) scale(1.15);
}

/* 🔗 List - Ultra Smooth Transitions */
.list-group-item {
  background: transparent;
  border: none;
  font-weight: 500;
  padding: 0.9rem 0.5rem;
  transition: 
    all 0.4s var(--transition-elastic),
    background 0.3s var(--transition-smooth);
  position: relative;
  border-radius: 10px;
  text-align: left;
}

.list-group-item:hover {
  background: linear-gradient(110deg, 
    rgba(183, 148, 246, 0.2), 
    rgba(110, 181, 255, 0.18), 
    rgba(77, 212, 232, 0.15)
  );
  padding-left: 1rem;
  box-shadow: 
    0 4px 20px rgba(26, 11, 46, 0.3),
    0 0 25px rgba(110, 181, 255, 0.2);
  transform: translateX(2px);
}

.list-group-item a {
  color: #ffffff;
  text-decoration: none;
  font-size: 1.05rem;
  font-weight: 600;
  position: relative;
  transition: 
    all 0.4s var(--transition-elastic),
    color 0.3s var(--transition-smooth);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
  will-change: transform;
}

/* Link underline - Cosmic gradient animation */
.list-group-item a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 0;
  height: 2.5px;
  background: linear-gradient(90deg, 
    var(--nebula-purple), 
    var(--galaxy-blue), 
    var(--cosmic-cyan),
    var(--aurora-teal),
    var(--stardust-gold)
  );
  background-size: 200% 100%;
  transition: 
    width 0.5s var(--transition-elastic),
    background-position 0.8s var(--transition-smooth);
  border-radius: 2px;
  box-shadow: 0 0 15px rgba(110, 181, 255, 0.6);
}

/* Star icon - Cosmic smooth animation */
.list-group-item a i {
  color: var(--stellar-violet);
  transition: 
    all 0.4s var(--transition-elastic),
    color 0.3s var(--transition-smooth);
  text-shadow: 0 0 12px rgba(157, 127, 245, 0.8);
  animation: starPulse 3s infinite ease-in-out;
  will-change: transform;
  flex-shrink: 0;
  margin-right: 0.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.2rem;
}

.list-group-item a:hover {
  color: #ffffff;
  text-shadow: 0 0 15px rgba(255, 255, 255, 0.9);
  transform: translateX(10px);
}

.list-group-item a:hover i {
  color: var(--cosmic-cyan);
  text-shadow: 
    0 0 25px rgba(77, 212, 232, 1),
    0 0 40px rgba(77, 212, 232, 0.7),
    0 0 55px rgba(110, 181, 255, 0.5);
  transform: scale(1.4) rotate(15deg);
  animation: starGlow 0.6s ease infinite;
}

.list-group-item a:hover::after {
  width: 100%;
  background-position: 100% 0;
}

/* Hidden class for filtering */
.hidden {
  display: none;
  opacity: 0;
  transform: scale(0.95);
  transition: all 0.3s var(--transition-smooth);
}

/* 🔍 Search Highlight Styles */
.search-highlight {
  background: linear-gradient(120deg, 
    var(--cosmic-cyan), 
    var(--galaxy-blue)
  );
  color: #ffffff;
  padding: 0.15rem 0.4rem;
  border-radius: 6px;
  font-weight: 700;
  box-shadow: 
    0 0 15px rgba(77, 212, 232, 0.6),
    0 0 25px rgba(110, 181, 255, 0.4),
    0 2px 8px rgba(26, 11, 46, 0.3);
  animation: highlightPulse 1.5s ease-in-out infinite;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
  display: inline;
  vertical-align: baseline;
  transform: scale(1);
  transition: all 0.3s var(--transition-elastic);
}

.search-highlight:hover {
  transform: scale(1.05);
  box-shadow: 
    0 0 20px rgba(77, 212, 232, 0.8),
    0 0 35px rgba(110, 181, 255, 0.6);
}

@keyframes highlightPulse {
  0%, 100% {
    box-shadow: 
      0 0 15px rgba(77, 212, 232, 0.6),
      0 0 25px rgba(110, 181, 255, 0.4),
      0 2px 8px rgba(26, 11, 46, 0.3);
  }
  50% {
    box-shadow: 
      0 0 25px rgba(77, 212, 232, 0.8),
      0 0 40px rgba(110, 181, 255, 0.6),
      0 2px 12px rgba(26, 11, 46, 0.4);
  }
}

/* Search Match Item Enhancement */
.list-group-item.search-match {
  background: linear-gradient(110deg, 
    rgba(183, 148, 246, 0.25), 
    rgba(110, 181, 255, 0.22), 
    rgba(77, 212, 232, 0.18)
  );
  border-left: 3px solid var(--cosmic-cyan);
  padding-left: 1.2rem;
  box-shadow: 
    0 4px 20px rgba(26, 11, 46, 0.3),
    0 0 30px rgba(110, 181, 255, 0.25);
  animation: matchGlow 2s ease-in-out infinite;
  text-align: left;
}

@keyframes matchGlow {
  0%, 100% {
    border-left-color: var(--cosmic-cyan);
    box-shadow: 
      0 4px 20px rgba(26, 11, 46, 0.3),
      0 0 30px rgba(110, 181, 255, 0.25);
  }
  50% {
    border-left-color: var(--galaxy-blue);
    box-shadow: 
      0 4px 25px rgba(26, 11, 46, 0.4),
      0 0 40px rgba(110, 181, 255, 0.35);
  }
}

/* Search Counter */
.search-counter {
  position: absolute;
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  background: linear-gradient(135deg, 
    var(--nebula-purple), 
    var(--galaxy-blue)
  );
  color: #ffffff;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 
    0 2px 10px rgba(26, 11, 46, 0.4),
    0 0 15px rgba(110, 181, 255, 0.3);
  display: none;
  animation: counterFadeIn 0.3s var(--transition-smooth);
  z-index: 10;
  pointer-events: none;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

@keyframes counterFadeIn {
  from {
    opacity: 0;
    transform: translateY(-50%) scale(0.8);
  }
  to {
    opacity: 1;
    transform: translateY(-50%) scale(1);
  }
}

/* Enhanced Search Input States */
#linkSearch:not(:placeholder-shown) {
  padding-right: 5rem;
}

#linkSearch.has-results {
  border-color: var(--cosmic-cyan);
  box-shadow: 
    0 0 0 2px rgba(77, 212, 232, 0.3),
    0 4px 20px rgba(77, 212, 232, 0.2);
}

#linkSearch.no-results {
  border-color: var(--supernova-pink);
  box-shadow: 
    0 0 0 2px rgba(255, 121, 198, 0.3),
    0 4px 20px rgba(255, 121, 198, 0.2);
}

/* 🌌✨ Cosmic Text Selection */
::selection {
  background: var(--galaxy-blue);
  color: #ffffff;
  border-radius: 3px;
  text-shadow: 0 0 8px rgba(110, 181, 255, 0.5);
}

::-moz-selection {
  background: var(--galaxy-blue);
  color: #ffffff;
  border-radius: 3px;
  text-shadow: 0 0 8px rgba(110, 181, 255, 0.5);
}

/* 🎇 Animations */
.animate-fade {
  animation: fadeIn 0.8s ease both;
}

/* ⚡ Link Loading Animation - Fast & Smooth */
.link-loading {
  opacity: 0;
  transform: translateY(15px);
  animation: linkSlideIn 0.5s ease forwards;
}

.link-loading:nth-child(1) { animation-delay: 0.05s; }
.link-loading:nth-child(2) { animation-delay: 0.1s; }
.link-loading:nth-child(3) { animation-delay: 0.15s; }
.link-loading:nth-child(4) { animation-delay: 0.2s; }
.link-loading:nth-child(5) { animation-delay: 0.25s; }
.link-loading:nth-child(6) { animation-delay: 0.3s; }
.link-loading:nth-child(7) { animation-delay: 0.35s; }
.link-loading:nth-child(8) { animation-delay: 0.4s; }
.link-loading:nth-child(9) { animation-delay: 0.45s; }
.link-loading:nth-child(10) { animation-delay: 0.5s; }
.link-loading:nth-child(11) { animation-delay: 0.55s; }

@keyframes linkSlideIn {
  0% {
    opacity: 0;
    transform: translateY(15px) scale(0.95);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Link Click Feedback - Instant Response */
.list-group-item a:active {
  transform: scale(0.97);
  transition: transform 0.1s ease;
}

.list-group-item a.link-clicked {
  animation: linkClick 0.4s ease;
}

@keyframes linkClick {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(0.95);
    box-shadow: 0 0 20px rgba(110, 181, 255, 0.6);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0px); }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes starPulse {
  0%, 100% { 
    transform: scale(1); 
    opacity: 0.85;
    filter: brightness(1);
  }
  50% { 
    transform: scale(1.08); 
    opacity: 1;
    filter: brightness(1.2);
  }
}

@keyframes starGlow {
  0%, 100% { 
    text-shadow: 
      0 0 20px rgba(77, 212, 232, 0.9),
      0 0 35px rgba(77, 212, 232, 0.6);
  }
  50% { 
    text-shadow: 
      0 0 30px rgba(77, 212, 232, 1), 
      0 0 50px rgba(77, 212, 232, 0.8),
      0 0 70px rgba(110, 181, 255, 0.6);
  }
}

/* 🌌 Go to Top Button - Cosmic Circle */
#goTopBtn {
  display: none;
  position: fixed;
  bottom: 25px;
  right: 25px;
  z-index: 100;
  border: none;
  outline: none;
  background: linear-gradient(135deg, 
    var(--nebula-purple), 
    var(--galaxy-blue), 
    var(--cosmic-cyan),
    var(--supernova-pink)
  );
  background-size: 200% 200%;
  color: #ffffff;
  font-size: 1.5rem;
  width: 55px;
  height: 55px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 
    0 4px 25px rgba(26, 11, 46, 0.5),
    0 0 0 2px rgba(110, 181, 255, 0.3),
    0 0 20px rgba(110, 181, 255, 0.2);
  transition: 
    all 0.5s var(--transition-elastic),
    background-position 0.8s var(--transition-smooth),
    transform 0.5s var(--transition-smooth);
  transform: scale(1) rotate(0deg);
  will-change: transform;
  animation: buttonPulse 3s ease-in-out infinite;
}

#goTopBtn:hover {
  transform: scale(1.25) rotate(360deg);
  box-shadow: 
    0 8px 40px rgba(26, 11, 46, 0.7),
    0 0 0 3px rgba(110, 181, 255, 0.5),
    0 0 60px rgba(110, 181, 255, 0.5),
    0 0 90px rgba(77, 212, 232, 0.3);
  background-position: 100% 100%;
}

#goTopBtn i {
  transition: transform 0.5s var(--transition-smooth);
}

#goTopBtn:hover i {
  transform: rotate(-360deg) scale(1.1);
}

@keyframes buttonPulse {
  0%, 100% { 
    box-shadow: 
      0 4px 25px rgba(26, 11, 46, 0.5),
      0 0 0 2px rgba(110, 181, 255, 0.3),
      0 0 20px rgba(110, 181, 255, 0.2);
  }
  50% { 
    box-shadow: 
      0 6px 30px rgba(26, 11, 46, 0.6),
      0 0 0 2px rgba(110, 181, 255, 0.4),
      0 0 35px rgba(110, 181, 255, 0.3);
  }
}

/* ✧ Footer - Balanced */
footer.footer {
  background: linear-gradient(90deg, 
    rgba(220, 201, 255, 0.08), 
    rgba(255, 212, 240, 0.08), 
    rgba(212, 212, 224, 0.06)
  );
  color: #ffffff;
  padding: 1.2rem 0;
  text-align: center;
  transition: all 0.3s ease;
}

/* ✧ Footer - Cosmic */
footer.footer {
  background: linear-gradient(90deg, 
    rgba(183, 148, 246, 0.1), 
    rgba(110, 181, 255, 0.08), 
    rgba(77, 212, 232, 0.06)
  );
  color: #ffffff;
  padding: 1.2rem 0;
  text-align: center;
  transition: all 0.3s ease;
}

footer.footer p {
  margin: 0;
  line-height: 1.6;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
}

footer.footer a {
  color: #ffffff;
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
}

footer.footer a:hover {
  color: var(--cosmic-cyan);
  text-shadow: 0 0 10px rgba(77, 212, 232, 0.8);
}

footer.footer i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* 🌍 Smooth Scrolling */
html {
  scroll-behavior: smooth;
}

/* 🌌 Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 10px;
  border: 2px solid var(--scrollbar-track);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--cosmic-cyan);
  box-shadow: 0 0 10px rgba(77, 212, 232, 0.5);
}

/* Firefox scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

/* 🌌 Fullscreen Canvas - Pure Cosmic Background */
#starCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: 
    radial-gradient(
      ellipse at bottom,
      var(--void-purple) 0%,
      var(--deep-space) 50%,
      var(--space-navy) 100%
    ), 
    radial-gradient(
      circle at 20% 80%,
      rgba(110, 181, 255, 0.08) 0%,
      transparent 4%
    ),
    radial-gradient(
      circle at 80% 20%,
      rgba(183, 148, 246, 0.06) 0%,
      transparent 4%
    ),
    radial-gradient(
      circle at 50% 50%,
      rgba(77, 212, 232, 0.04) 0%,
      transparent 5%
    );
}

/* 📱 Ultra Responsive Design - Unique Adaptive Features */

/* Tablets & Medium Devices (768px - 1024px) */
@media (max-width: 1024px) and (min-width: 769px) {
  .glass-card {
    width: 85%;
    padding: 1.8rem;
    margin: 1.5rem auto;
    backdrop-filter: blur(15px) saturate(1.15);
  }
  
  .card-title {
    font-size: 1.75rem;
    letter-spacing: 0.5px;
  }
  
  .list-group-item a {
    font-size: 1.02rem;
    padding: 0.3rem 0;
  }
  
  .list-group-item a:hover {
    transform: translateX(8px);
  }
  
  #goTopBtn {
    width: 52px;
    height: 52px;
    font-size: 1.4rem;
    bottom: 20px;
    right: 20px;
  }
}

/* Small Tablets & Large Phones (481px - 768px) */
@media (max-width: 768px) and (min-width: 481px) {
  body {
    background: 
      radial-gradient(
        circle at top left,
        var(--nebula-purple) 0%,
        transparent 60%
      ),
      radial-gradient(
        circle at bottom right,
        var(--galaxy-blue) 0%,
        transparent 60%
      ),
      radial-gradient(
        circle at center,
        var(--cosmic-cyan) 0%,
        transparent 70%
      ),
      var(--deep-space);
  }
  
  .glass-card {
    width: 92%;
    padding: 1.6rem;
    margin: 1.2rem auto;
    border-radius: 1.3rem;
    backdrop-filter: blur(14px) saturate(1.15);
    animation: float 8s ease-in-out infinite;
  }
  
  .glass-card:hover {
    transform: translateY(-8px) scale(1.015);
  }
  
  .card-title {
    font-size: 1.65rem;
    margin-bottom: 0.6rem;
  }
  
  .subtitle {
    font-size: 0.95rem;
    margin-bottom: 1.3rem;
  }
  
  .list-group-item {
    padding: 0.8rem 0;
  }
  
  .list-group-item a {
    font-size: 1rem;
  }
  
  .list-group-item a:hover {
    transform: translateX(7px);
  }
  
  .list-group-item a:hover i {
    transform: scale(1.3) rotate(12deg);
  }
  
  #linkSearch {
    padding: 0.65rem 1.3rem 0.65rem 2.7rem;
    font-size: 0.98rem;
  }
  
  .search-container::before {
    left: 1.1rem;
    font-size: 0.95rem;
  }
  
  #goTopBtn {
    width: 50px;
    height: 50px;
    font-size: 1.3rem;
    bottom: 18px;
    right: 18px;
  }
  
  #goTopBtn:hover {
    transform: scale(1.22) rotate(360deg);
  }
}

/* Mobile Phones (320px - 480px) */
@media (max-width: 480px) {
  :root {
    --transition-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --transition-elastic: cubic-bezier(0.175, 0.885, 0.32, 1.2);
  }
  
  .search-highlight {
    padding: 0.1rem 0.3rem;
    font-size: 0.95rem;
    border-radius: 4px;
  }
  
  .search-counter {
    padding: 0.25rem 0.6rem;
    font-size: 0.8rem;
    right: 1rem;
  }
  
  .list-group-item.search-match {
    border-left-width: 2px;
    padding-left: 0.9rem;
  }
  
  .list-group-item a {
    font-size: 0.95rem;
    line-height: 1.4;
  }
  
  body {
    background: 
      radial-gradient(
        circle at top,
        var(--nebula-purple) 0%,
        transparent 70%
      ),
      radial-gradient(
        circle at bottom,
        var(--cosmic-cyan) 0%,
        transparent 70%
      ),
      var(--deep-space);
    padding: 0.5rem;
  }
  
  .glass-card {
    width: 100%;
    padding: 1.3rem;
    margin: 0.8rem auto;
    border-radius: 1.2rem;
    backdrop-filter: blur(12px) saturate(1.1);
    animation: float 10s ease-in-out infinite;
  }
  
  .glass-card:hover {
    transform: translateY(-5px) scale(1.008);
  }
  
  .card-title {
    font-size: 1.5rem;
    margin-bottom: 0.4rem;
    letter-spacing: 0.3px;
  }
  
  .subtitle {
    font-size: 0.88rem;
    margin-bottom: 1.2rem;
    opacity: 0.95;
  }
  
  .list-group-item {
    padding: 0.75rem 0;
    margin: 0.2rem 0;
  }
  
  .list-group-item:hover {
    padding-left: 0.8rem;
  }
  
  .list-group-item a i {
    width: 1rem;
    margin-right: 0.4rem;
  }
  
  .list-group-item a {
    font-size: 0.96rem;
    font-weight: 600;
  }
  
  .list-group-item a:hover {
    transform: translateX(5px);
  }
  
  .list-group-item a i {
    font-size: 0.9rem;
    margin-right: 0.5rem;
  }
  
  .list-group-item a:hover i {
    transform: scale(1.25) rotate(10deg);
  }
  
  .list-group-item a::after {
    height: 2px;
  }
  
  #linkSearch {
    padding: 0.6rem 1rem 0.6rem 2.4rem;
    font-size: 0.92rem;
    border-radius: 40px;
  }
  
  #linkSearch:focus {
    transform: translateY(-2px) scale(1.005);
  }
  
  .search-container::before {
    left: 0.9rem;
    font-size: 0.9rem;
  }
  
  #goTopBtn {
    width: 46px;
    height: 46px;
    font-size: 1.15rem;
    bottom: 12px;
    right: 12px;
    box-shadow: 
      0 3px 15px rgba(61, 32, 102, 0.5),
      0 0 0 2px rgba(255, 255, 255, 0.25);
  }
  
  #goTopBtn:hover {
    transform: scale(1.18) rotate(360deg);
  }
  
  footer.footer {
    padding: 1rem 0;
    font-size: 0.9rem;
  }
}

/* Extra Small Phones (< 360px) */
@media (max-width: 360px) {
  .glass-card {
    padding: 1.1rem;
    margin: 0.6rem auto;
  }
  
  .card-title {
    font-size: 1.35rem;
  }
  
  .subtitle {
    font-size: 0.85rem;
  }
  
  .list-group-item a {
    font-size: 0.92rem;
  }
  
  #linkSearch {
    padding: 0.55rem 0.9rem 0.55rem 2.2rem;
    font-size: 0.9rem;
  }
  
  .search-container::before {
    left: 0.8rem;
    font-size: 0.85rem;
  }
  
  #goTopBtn {
    width: 42px;
    height: 42px;
    font-size: 1.05rem;
    bottom: 10px;
    right: 10px;
  }
}

/* Large Desktops (1200px - 1600px) */
@media (min-width: 1200px) and (max-width: 1600px) {
  .glass-card {
    width: 34rem;
    padding: 2.2rem;
  }
  
  .glass-card:hover {
    transform: translateY(-15px) scale(1.025);
  }
  
  .card-title {
    font-size: 2rem;
  }
  
  .list-group-item a {
    font-size: 1.08rem;
  }
  
  .list-group-item a:hover {
    transform: translateX(14px);
  }
  
  .list-group-item a:hover i {
    transform: scale(1.45) rotate(18deg);
  }
  
  #goTopBtn {
    width: 62px;
    height: 62px;
    font-size: 1.65rem;
  }
  
  #goTopBtn:hover {
    transform: scale(1.35) rotate(360deg);
  }
}

/* Ultra Wide Screens (> 1600px) */
@media (min-width: 1601px) {
  .glass-card {
    width: 36rem;
    padding: 2.5rem;
  }
  
  .glass-card:hover {
    transform: translateY(-18px) scale(1.03);
  }
  
  .card-title {
    font-size: 2.1rem;
    letter-spacing: 1px;
  }
  
  .subtitle {
    font-size: 1.1rem;
  }
  
  .list-group-item a {
    font-size: 1.12rem;
  }
  
  .list-group-item a:hover {
    transform: translateX(16px);
  }
  
  .list-group-item a:hover i {
    transform: scale(1.5) rotate(20deg);
  }
  
  #linkSearch {
    padding: 0.85rem 1.7rem 0.85rem 3.2rem;
    font-size: 1.05rem;
  }
  
  .search-container::before {
    left: 1.4rem;
    font-size: 1.1rem;
  }
  
  #goTopBtn {
    width: 68px;
    height: 68px;
    font-size: 1.8rem;
    bottom: 30px;
    right: 30px;
  }
  
  #goTopBtn:hover {
    transform: scale(1.4) rotate(360deg);
  }
}

/* Landscape Orientation - Unique Adjustments */
@media (max-height: 600px) and (orientation: landscape) {
  .glass-card {
    margin: 0.5rem auto;
    padding: 1rem;
    animation: none;
  }
  
  .card-title {
    font-size: 1.4rem;
    margin-bottom: 0.3rem;
  }
  
  .subtitle {
    font-size: 0.85rem;
    margin-bottom: 0.8rem;
  }
  
  .list-group-item {
    padding: 0.5rem 0;
  }
  
  .list-group-item a {
    font-size: 0.9rem;
  }
  
  #linkSearch {
    padding: 0.5rem 1rem 0.5rem 2.2rem;
  }
  
  #goTopBtn {
    width: 40px;
    height: 40px;
    font-size: 1rem;
    bottom: 10px;
    right: 10px;
  }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
  .list-group-item a:active {
    transform: translateX(8px) scale(0.98);
    background: linear-gradient(110deg, 
      rgba(183, 148, 246, 0.28), 
      rgba(110, 181, 255, 0.24), 
      rgba(77, 212, 232, 0.2)
    );
    border-radius: 8px;
    padding: 0.3rem 0.5rem;
  }
  
  #goTopBtn:active {
    transform: scale(0.95) rotate(180deg);
  }
  
  #linkSearch:active {
    transform: scale(0.99);
  }
}