/* Base styles and variables - adjusted for new color theme */
:root {
  --point: #D4AF37;
  --spectrum: var(--point), #D4AF37;
  --blur: 12;
  --brightness: 1.4;
  --speed: 1;
  --button-color: #D4AF37;
  --button-glow: #FFD700;
  --custom-flicker: linear(
    0 0% 0.5%, 0.1723 0.7925%,
    0.2408 0.865%, 0.1991 1.6425%,
    0 7.69% 13.69%, 0.3451 3.795%,
    0.0006 3.94%, 0.5332 4.37%,
    0.0001 4.895%, 0.595 5.175%,
    0.0001 6.29%, 0.6263 6.755%,
    0.0004 7.7775%, 0.4634 7.8725%,
    0.4869 8.075%, 0.6052 8.455%,
    0.6504 8.9525%, 0.0011 9.0925%,
    0.6832 10.3875%, 0.2716 11.5425%,
    0.5783 11.6675%, 0.5956 13.0475%,
    0.1565 13.6625%, 0.869 15.095%,
    0.4566 15.745%, 0.3918 15.975%,
    0.4768 16.1675%, 0.3041 17.29%,
    0.5036 17.295%, 0.9561 17.96%,
    0.4202 18.1475%, 0.9997 18.59%,
    0.9389 18.9675%, 0.5199 19.5325%,
    0.9878 19.6325%, 0.5212 19.8075%,
    0.8476 21.1625%, 0.5724 21.615%,
    0.7517 21.9%, 0.5716 22.4%,
    0.8177 22.8325%, 0.9997 23.865%, 1 25%, 1 100%
  );
}

/* Base styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: system-ui, sans-serif;
  color-scheme: dark;
  background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url("https://motionbgs.com/hunt-showdown-veil-of-thorns") center/cover fixed no-repeat;
  background-color: #000;
  overflow-x: hidden;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

/* Container for main content */
.content-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  padding: 1rem;
  gap: 0.8rem; /* Reduced gap to bring elements closer */
  backdrop-filter: blur(1px);
  border-radius: 16px;
}

/* Profile Picture */
.profile-container {
  position: relative;
  width: 150px;
  height: 150px;
}

.profile-frame {
  position: absolute;
  top: -25%;
  left: -25%;
  width: 150%;
  height: 150%;
  z-index: 2;
  pointer-events: none;
  animation: loadFade 1s ease-out;
}

.profile-pic {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--button-color);
  box-shadow: 0 0 15px var(--button-glow);
  position: relative;
  z-index: 1;
  animation: loadFade 1s ease-out, starglow 4s infinite alternate ease-in-out;
  pointer-events: none;
}

.profile-pic::before {
  content: "";
  position: absolute;
  top: -25%;
  left: -25%;
  width: 150%;
  height: 150%;
  background: url("frame.gif") center/contain no-repeat;
  z-index: 2;
  pointer-events: none;
  opacity: 1;
}
  /* Loading animation for profile picture */
  @keyframes loadFade {
    0% { opacity: 0; transform: scale(0.8); }
    100% { opacity: 1; transform: scale(1); }
  }
  
  .profile-pic {
    animation: loadFade 1s ease-out, starglow 4s infinite alternate ease-in-out;
  }
  
  /* Enhanced button styles with tooltips */
  .button {
    position: relative;
  }
  
  .button::before {
    content: attr(aria-label);
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border-radius: 4px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    border: 1px solid var(--button-color);
    box-shadow: 0 0 10px var(--button-glow);
  }
  
  .button:hover::before {
    opacity: 1;
    visibility: visible;
    bottom: 130%;
  }

.profile-pic {
  margin-bottom: 0.2rem; /* Reduced margin to bring closer to name */
  pointer-events: none; /* Added pointer-events: none to prevent image right-click menu */
}

/* Name container for effect */
.name-container {
  position: relative;
  padding: 0.5rem;
  filter: drop-shadow(0 0 15px rgba(212, 175, 55, 0.5));
  margin-bottom: 0.2rem; /* Reduced margin to bring buttons closer */
}

/* Name text styles with new color and removed border effect */
.name-text {
  position: relative;
  font-size: clamp(1.5rem, 1rem + 3vw, 3rem);
  padding: 0.5rem 1.5rem;
  margin: 0;
  
  /* Gradient text - updated colors */
  background: linear-gradient(90deg, #B8860B 0%, #FFD700 25%, #D4AF37 50%, #FFD700 75%, #B8860B 100%);
  background-size: 500% 100%;
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  
  /* Animations */
  animation: blend 15s infinite linear;
}

/* Name container flicker animation */
.name-container {
  animation: flicker 5s infinite var(--custom-flicker) alternate;
}

/* Glow effect for name */
.name-text::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  
  /* Text glow with updated colors */
  background: linear-gradient(90deg, #B8860B 0%, #FFD700 25%, #D4AF37 50%, #FFD700 75%, #B8860B 100%);
  background-size: 500% 100%;
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  
  /* Blur and mix blend */
  filter: blur(calc(var(--blur) * 1px)) brightness(calc(var(--brightness)));
  mix-blend-mode: plus-lighter;
  
  /* Animations */
  animation: blend 100s infinite linear;
  z-index: -1;
}

/* Social buttons container */
.social-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 0.2rem; /* Reduced margin to bring closer to name */
}

/* Button styles - updated with new color */
.button {
  position: relative;
  padding: 0.6rem 1.2rem;
  font-size: 0.9rem;
  font-weight: bold;
  text-decoration: none;
  background-color: rgba(0, 0, 0, 0.5);
  color: #FFD700;
  border-radius: 6px;
  border: 2px solid var(--button-color);
  cursor: pointer;
  transition: all 0.3s ease;
  overflow: hidden;
  box-shadow: 0 0 8px var(--button-glow);
  z-index: 1;
  backdrop-filter: blur(3px);
}

/* Button hover effect */
.button:hover {
  box-shadow: 0 0 15px var(--button-glow), 0 0 30px var(--button-glow);
  transform: translateY(-2px);
  background-color: rgba(0, 0, 0, 0.6);
}

/* Button after element for glow */
.button::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--button-color);
  opacity: 0.1;
  z-index: -1;
  transition: opacity 0.3s ease;
}

.button:hover::after {
  opacity: 0.3;
}

/* Keyframes */
@keyframes blend {
  to { background-position: 500% 100%; }
}

@keyframes flicker {
  25% { 
    opacity: 0.9; 
    filter: drop-shadow(0 0 10px transparent);
  }
  50% {
    opacity: 1;
    filter: drop-shadow(0 0 15px rgba(212, 175, 55, 0.4));
  }
  75% {
    opacity: 0.95;
    filter: drop-shadow(0 0 5px transparent);
  }
}

@keyframes starglow {
  0% {
    box-shadow: 0 0 5px #D4AF37, 0 0 10px rgba(212, 175, 55, 0.3);
  }
  50% {
    box-shadow: 0 0 10px #D4AF37, 0 0 15px rgba(212, 175, 55, 0.5);
  }
  100% {
    box-shadow: 0 0 15px #FFD700, 0 0 25px rgba(255, 215, 0, 0.7);
  }
}

/* Adding a subtle twinkling effect to the buttons */
@keyframes twinkle {
  0% { opacity: 0.8; }
  50% { opacity: 1; }
  100% { opacity: 0.8; }
}

.button:nth-child(1) { animation: twinkle 3s infinite ease-in-out; }
.button:nth-child(2) { animation: twinkle 4s infinite ease-in-out; }
.button:nth-child(3) { animation: twinkle 5s infinite ease-in-out; }
.button:nth-child(4) { animation: twinkle 4.5s infinite ease-in-out; }
.button:nth-child(5) { animation: twinkle 3.5s infinite ease-in-out; }

/* Media queries for responsiveness */
@media (max-width: 768px) {
  .content-container {
    padding: 0.8rem;
    gap: 0.7rem;
  }
  
  .profile-container {
    width: 120px;
    height: 120px;
  }

  .profile-pic {
    width: 100%;
    height: 100%;
  }

  .profile-frame {
    width: 140%;
    height: 140%;
    top: -20%;
    left: -20%;
  }
  
  .social-buttons {
    gap: 0.7rem;
  }
  
  .button {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .profile-container {
    width: 100px;
    height: 100px;
  }

  .profile-pic {
    width: 100%;
    height: 100%;
  }

  .profile-frame {
    width: 140%;
    height: 140%;
    top: -20%;
    left: -20%;
  }
  
  .name-text {
    font-size: 1.5rem;
    padding: 0.4rem 1rem;
  }
  
  .social-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    width: 100%;
    max-width: 300px;
    padding: 0 0.5rem;
  }
  
  .button {
    width: 100%;
    text-align: center;
    padding: 0.5rem;
    font-size: 0.85rem;
  }
}
