/* Modern Glassmorphism Theme */
:root {
  /* Colors */
  --bg-dark: #0f172a;
  --bg-gradient: radial-gradient(circle at 50% 0%, #1e293b, #0f172a);
  
  --surface-light: rgba(255, 255, 255, 0.7);
  --surface-dark: rgba(30, 41, 59, 0.7);
  
  --border-light: rgba(255, 255, 255, 0.5);
  --border-dark: rgba(255, 255, 255, 0.1);
  
  --text-main: #1e293b;
  --text-sub: #64748b;
  
  --text-main-dark: #f8fafc;
  --text-sub-dark: #94a3b8;
  
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  
  /* Spacing */
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;
  
  /* Effects */
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  --shadow-glow: 0 0 20px rgba(59, 130, 246, 0.5);
  --glass-blur: blur(12px);
}

/* Base Setup */
* { box-sizing: border-box; }

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-dark); /* Default fallback */
  color: var(--text-main);
  padding: 0;
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow-x: hidden;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Dynamic Background Handling */
#dynamic-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

#dynamic-bg::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.3); /* Slightly lighter overlay */
  backdrop-filter: blur(3px); /* Reduced blur for better visibility */
}

/* Container */
.container {
  width: 100%;
  max-width: 480px; /* Tighter width for better mobile feel */
  padding: 20px;
  position: relative;
  z-index: 10;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Glass Card */
.neo-card {
  /* We remove the background on the card itself to let the page flow better, 
     or we can keep it for a "card in center" look. 
     For a modern Linktree look, usually elements float directly.
     Let's make it transparent but keep layout. */
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Profile Section */
.profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 40px;
  margin-top: 40px;
  width: 100%;
}

.avatar {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid rgba(255, 255, 255, 0.2);
  box-shadow: var(--shadow-lg);
  margin-bottom: 16px;
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.avatar:hover {
  transform: scale(1.05) rotate(5deg);
  border-color: rgba(255, 255, 255, 0.5);
}

.title {
  font-weight: 800;
  font-size: 28px;
  color: #fff;
  margin: 0 0 8px 0;
  letter-spacing: -0.5px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.bio {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
  max-width: 90%;
  font-weight: 500;
  text-shadow: 0 1px 4px rgba(0,0,0,0.3);
  white-space: pre-line; /* Respect newlines */
}

/* Links Section */
.links {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: 40px;
}

.category-header {
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 700;
  margin: 20px 0 8px 0;
  text-align: center;
  width: 100%;
  opacity: 0;
  animation: fadeSlideUp 0.6s forwards;
}

.link-item {
  width: 100%;
  opacity: 0; /* Hidden initially for animation */
}

.link-button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center; /* Centered text */
  padding: 18px 24px;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  border-radius: var(--radius-lg); /* Pill shape */
  
  /* Premium Glossy Effect Base */
  /* background-color is set inline by JS */
  background-image: linear-gradient(135deg, rgba(255,255,255,0.25) 0%, rgba(255,255,255,0) 50%, rgba(0,0,0,0.1) 100%);
  
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 
    0 4px 6px rgba(0, 0, 0, 0.1), 
    inset 0 1px 0 rgba(255, 255, 255, 0.3); /* Inner highlight */
    
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.link-button:hover {
  transform: translateY(-3px) scale(1.01);
  box-shadow: 
    0 12px 20px rgba(0, 0, 0, 0.2), 
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
  border-color: rgba(255, 255, 255, 0.6);
  filter: brightness(1.1);
}

.link-button:active {
  transform: scale(0.98);
}

/* Icon spacing inside button */
.link-button::before {
  margin-right: 10px;
}

/* Footer */
.site-footer {
  margin-top: auto;
  padding: 40px 0 20px;
  width: 100%;
  display: flex;
  justify-content: center;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.footer-name {
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.footer-icons {
  display: flex;
  gap: 24px;
}

.footer-icons a {
  color: #fff;
  font-size: 22px;
  opacity: 0.7;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-icons a:hover {
  opacity: 1;
  transform: translateY(-3px);
  filter: drop-shadow(0 0 8px rgba(255,255,255,0.4));
}

.footer-icons i {
  /* Reset default styles */
  background: transparent !important; 
  color: inherit !important;
}

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

.animate-enter {
  animation: fadeSlideUp 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Scroll Buttons */
.scroll-btn {
  position: fixed;
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 100;
  color: #fff;
  font-size: 24px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  transition: all 0.3s ease, opacity 0.3s ease, transform 0.3s ease;
  animation: pulse-glow 2s infinite;
}

.scroll-btn:hover {
  background: rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
}

/* Specific Positioning */
#scroll-down-btn {
  bottom: 30px;
  right: 30px;
}

#scroll-up-btn {
  top: 30px;
  right: 30px;
}

/* Visibility State Classes */
.scroll-btn {
  opacity: 1; /* Default visible unless hidden class added */
  transform: scale(1);
}

.scroll-btn.hidden {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.8);
}

.scroll-btn.visible {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

@keyframes pulse-glow {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(255, 255, 255, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
  }
}

/* Mobile Tweaks */
@media (max-width: 600px) {
  .container {
    padding: 16px;
  }
  .avatar {
    width: 90px;
    height: 90px;
  }
  .title {
    font-size: 24px;
  }
  .link-button {
    padding: 16px 20px;
  }
  .scroll-btn {
    width: 45px;
    height: 45px;
    font-size: 20px;
  }
  #scroll-down-btn {
    bottom: 20px;
    right: 20px;
  }
  #scroll-up-btn {
    top: 20px;
    right: 20px;
  }
}
