* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  height: 100%;
}

body {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  color: #fff;
  background: linear-gradient(135deg, #d4a574, #c9a0dc, #ffb7d5, #9b6b47, #d4a574);
  background-size: 400% 400%;
  background-attachment: fixed;
  animation: gradientShift 18s ease infinite;
  min-height: 100vh;
  min-height: 100dvh;
  min-height: -webkit-fill-available;
  height: 100%;
  overflow-x: hidden;
  position: relative;
}

@supports (-webkit-touch-callout: none) {
  body {
    min-height: -webkit-fill-available;
  }
}

/* Decorative background */
.bg-decoration {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}

.floating-element {
  position: absolute;
  width: 220px;
  height: 220px;
  background: linear-gradient(45deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04));
  border-radius: 50%;
  animation: float 8s ease-in-out infinite;
  animation-delay: var(--delay);
  filter: blur(2px);
}

.floating-element:nth-child(1) {
  top: 8%;
  left: 8%;
  transform: scale(0.8);
}

.floating-element:nth-child(2) {
  top: 55%;
  right: 5%;
  transform: scale(1.2);
}

.floating-element:nth-child(3) {
  bottom: 12%;
  left: 18%;
  transform: scale(0.6);
}

.boba-pearl {
  position: absolute;
  width: 18px;
  height: 18px;
  background: radial-gradient(circle at 35% 30%, #5a3a2a, #2a1a10);
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3), inset -2px -2px 4px rgba(0, 0, 0, 0.4);
  animation: float 7s ease-in-out infinite;
  animation-delay: var(--delay);
  opacity: 0.55;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0) rotate(0);
  }
  50% {
    transform: translateY(-20px) rotate(180deg);
  }
}

/* Layout container */
.container {
  max-width: 480px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  position: relative;
  z-index: 1;
}

.header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.profile-section {
  animation: fadeInUp 0.8s ease-out;
}

/* Avatar */
.avatar {
  width: 150px;
  height: 150px;
  background: linear-gradient(45deg, #c9a0dc, #ffb7d5);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
}

.avatar::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transform: rotate(45deg);
  animation: shimmer 3s infinite;
  z-index: 2;
  pointer-events: none;
}

.profile-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  z-index: 1;
  position: relative;
}

.avatar-fallback {
  display: none;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  z-index: 1;
  position: relative;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%) rotate(45deg);
  }
  100% {
    transform: translateX(100%) rotate(45deg);
  }
}

/* Username + bio */
.username {
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  background: linear-gradient(45deg, #fff, #fdf0f7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
}

.bio {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.88);
  font-weight: 300;
  max-width: 320px;
  margin: 1rem auto 0;
}

.boba-emoji {
  display: inline-block;
  font-size: 1.1rem;
  margin-left: 0.25rem;
}

/* Main content */
.main-content {
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

/* Tip / merch button */
.merch-section {
  margin-bottom: 3rem;
}

.merch-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(45deg, #00d54b, #00b03d);
  padding: 1.5rem 2rem;
  border-radius: 16px;
  text-decoration: none;
  color: #fff;
  font-weight: 600;
  font-size: 1.1rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  border: none;
  cursor: pointer;
  box-shadow: 0 8px 25px rgba(0, 213, 75, 0.35);
}

.merch-link::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
  transition: left 0.5s;
}

.merch-link:hover::before {
  left: 100%;
}

.merch-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 35px rgba(0, 213, 75, 0.5);
}

.merch-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.merch-text {
  flex: 1;
  text-align: center;
}

.merch-arrow {
  font-size: 1rem;
  transition: transform 0.3s ease;
}

.merch-link:hover .merch-arrow {
  transform: translateX(4px);
}

/* Social section */
.social-section {
  margin-bottom: 3rem;
}

.section-title {
  font-size: 1.4rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 1.5rem;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.links-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.12);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 1.25rem 1.5rem;
  border-radius: 12px;
  text-decoration: none;
  color: #fff;
  font-weight: 500;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.social-link::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
  transition: left 0.5s;
}

.social-link:hover::before {
  left: 100%;
}

.social-link:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.18);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.link-content {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.icon-wrapper {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.link-arrow {
  font-size: 1rem;
  transition: transform 0.3s ease;
}

.social-link:hover .link-arrow {
  transform: translateX(4px);
}

/* Platform brand colors */
.kick .icon-wrapper {
  background: #53fc18;
}

.twitch .icon-wrapper {
  background: #9146ff;
}

.youtube .icon-wrapper {
  background: #ff0000;
}

.tiktok .icon-wrapper {
  background: #000;
}

.instagram .icon-wrapper {
  background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}

.x .icon-wrapper {
  background: #000;
}

/* Footer */
.footer {
  text-align: center;
  margin-top: 3rem;
  padding-top: 2rem;
}

.footer p {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.powered-by {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.85rem;
  transition: all 0.3s ease;
}

.powered-by:hover {
  color: #fff;
  transform: translateY(-1px);
}

.powered-text {
  font-size: 0.75rem;
  opacity: 0.85;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.powerirl-logo {
  height: 32px;
  width: auto;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.powered-by:hover .powerirl-logo {
  opacity: 1;
}

/* Animations */
@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* Mobile */
@media (max-width: 768px) {
  body {
    background: #c9a0dc;
    background-attachment: scroll;
    animation: none;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 1.5rem 1rem;
  }
  .username {
    font-size: 1.75rem;
  }
  .avatar {
    width: 130px;
    height: 130px;
  }
  .merch-link {
    padding: 1.25rem 1.5rem;
    font-size: 1rem;
  }
  .social-link {
    padding: 1rem 1.25rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
