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

:root {
  --background: oklch(0.98 0 0);
  --foreground: oklch(0.25 0 0);
  --muted-foreground: oklch(0.55 0 0);
  --border: oklch(0.88 0 0);
}

.dark {
  --background: oklch(0.12 0 0);
  --foreground: oklch(0.92 0 0);
  --muted-foreground: oklch(0.62 0 0);
  --border: oklch(0.25 0 0);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--background);
  color: var(--foreground);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Added relative positioning for background layering */
  position: relative;
  overflow-x: hidden;
}

/* Added background wrapper with blur effect */
.background-wrapper {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}

.background-image {
  position: absolute;
  inset: 0;
  background-image: url("https://bing.img.run/uhd.php");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: blur(20px);
  transform: scale(1.1);
}

.background-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, oklch(0.12 0 0 / 0.7), oklch(0.12 0 0 / 0.85));
}

/* Container */
.container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
  /* Added relative positioning to ensure content appears above background */
  position: relative;
  z-index: 1;
}

.content {
  width: 100%;
  max-width: 42rem;
  margin: 0 auto;
}

/* Avatar Section */
.avatar-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
}

.gradient-border {
  position: relative;
  border-radius: 9999px;
}

.gradient-border::before {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 9999px;
  padding: 4px;
  background: linear-gradient(
    135deg,
    oklch(0.7 0.25 330),
    oklch(0.75 0.25 280),
    oklch(0.7 0.25 220),
    oklch(0.75 0.25 180),
    oklch(0.7 0.25 330)
  );
  background-size: 200% 200%;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: gradient-rotate 4s linear infinite;
}

@keyframes gradient-rotate {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.glow-effect {
  box-shadow: 0 0 20px oklch(0.7 0.25 280 / 0.3), 0 0 40px oklch(0.7 0.25 280 / 0.2), 0 0 60px oklch(0.7 0.25 280 / 0.1);
}

.avatar {
  width: 8rem;
  height: 8rem;
  border-radius: 9999px;
  object-fit: cover;
  display: block;
}

/* Text Center */
.text-center {
  text-align: center;
  margin-bottom: 1.5rem;
}

/* Name */
.name {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  line-height: 1.2;
}

.gradient-text {
  background: linear-gradient(135deg, oklch(0.75 0.25 330), oklch(0.8 0.25 280), oklch(0.75 0.25 220));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 200% 200%;
  animation: gradient-shift 3s ease infinite;
}

@keyframes gradient-shift {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

/* Title */
.title {
  font-size: 1.25rem;
  color: var(--muted-foreground);
  font-weight: 300;
}

/* Bio */
.bio {
  text-align: center;
  margin-bottom: 3rem;
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
}

.bio p {
  font-size: 1rem;
  color: var(--muted-foreground);
  line-height: 1.6;
}

/* Social Links */
.social-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.social-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--foreground);
  background-color: transparent;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.social-button::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, oklch(0.7 0.2 330 / 0.1), oklch(0.75 0.2 280 / 0.1), oklch(0.7 0.2 220 / 0.1));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.social-button:hover::before {
  opacity: 1;
}

.social-button:hover {
  transform: translateY(-2px);
}

.icon {
  width: 1.25rem;
  height: 1.25rem;
  position: relative;
  z-index: 1;
}

.button-text {
  position: relative;
  z-index: 1;
}

/* Footer */
.footer {
  text-align: center;
  margin-top: 4rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.footer a {
  text-decoration: none;
  color: var(--muted-foreground);
  transition: all 0.3s ease;
  position: relative;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
}

.footer a:hover {
  color: var(--foreground);
  background: linear-gradient(135deg, oklch(0.7 0.2 330 / 0.1), oklch(0.75 0.2 280 / 0.1));
  transform: translateY(-1px);
}

.footer a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -2px;
  left: 50%;
  background: linear-gradient(135deg, oklch(0.75 0.25 330), oklch(0.8 0.25 280));
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.footer a:hover::after {
  width: 80%;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal-content {
  background-color: var(--background);
  margin: 15% auto;
  padding: 2rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  width: 90%;
  max-width: 400px;
  text-align: center;
  position: relative;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-content h2 {
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.wechat-id {
  font-size: 1.25rem;
  font-weight: 600;
  color: oklch(0.75 0.25 280);
  padding: 1rem;
  background-color: oklch(0.16 0 0);
  border-radius: 0.5rem;
  margin-top: 1rem;
}

.close {
  position: absolute;
  right: 1rem;
  top: 1rem;
  font-size: 2rem;
  font-weight: 300;
  color: var(--muted-foreground);
  cursor: pointer;
  transition: color 0.3s ease;
}

.close:hover {
  color: var(--foreground);
}

/* Responsive Design */
@media (min-width: 768px) {
  .container {
    padding: 5rem 1rem;
  }

  .avatar {
    width: 10rem;
    height: 10rem;
  }

  .name {
    font-size: 3rem;
  }

  .title {
    font-size: 1.5rem;
  }

  .bio p {
    font-size: 1.125rem;
  }

  .social-links {
    gap: 1rem;
  }

  .button-text {
    display: inline;
  }
}

@media (max-width: 767px) {
  .button-text {
    display: none;
  }
}
