:root {
  --aura-1: rgba(64, 224, 208, 0.7);
  --aura-2: rgba(216, 191, 216, 0.8);
  --aura-3: rgba(255, 182, 193, 0.6);
}

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

body {
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;
  background-color: #f8fafc;
  color: #0f172a;
  min-height: 100vh;
  overflow-x: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

/* --- KpopBg Special Effects --- */
.kpop-bg {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1;
  width: 100%;
  height: 100vh;
  overflow: visible;
  background-image:
    radial-gradient(at 0% 0%, var(--aura-1) 0%, transparent 50%),
    radial-gradient(at 100% 0%, var(--aura-2) 0%, transparent 50%),
    radial-gradient(at 50% 10%, var(--aura-3) 0%, transparent 60%);
  pointer-events: none;
}

.sparkles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  height: 400px;
}

.sparkle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: white;
  border-radius: 50%;
  box-shadow: 0 0 10px 2px rgba(255, 255, 255, 0.8);
  animation: twinkle 4s ease-in-out infinite;
}

@keyframes twinkle {
  0%, 100% { opacity: 0; transform: scale(0.5); }
  50% { opacity: 0.8; transform: scale(1.2); }
}

/* --- HD Layered Icon System --- */
.icon-layer {
  position: absolute;
  top: 0%;
  left: 0;
  width: 100%;
  height: 400px;
  transform: translateY(-3rem);
  pointer-events: none;
  z-index: 0;
}

@media (min-width: 768px) {
  .icon-layer {
    transform: translateY(-4rem);
  }
}

.i-w {
  position: absolute;
  display: inline-flex;
  transform: translateZ(0);
  opacity: 0.95;
  animation: float 6s ease-in-out infinite;
}

.i-w:nth-child(even) {
  animation-duration: 8s;
  animation-delay: -2s;
}

.i-w:nth-child(3n) {
  animation-duration: 10s;
  animation-delay: -4s;
}

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

.icon-fill { fill: rgba(255, 255, 255, 0.45); }
.icon-rim { fill: none; stroke: #ffffff; stroke-width: 1.5px; }
.icon-shadow { fill: none; stroke: rgba(0, 0, 0, 0.06); stroke-width: 2px; }

.sm-only {
  display: inline-flex;
}

@media (max-width: 640px) {
  .kpop-bg {
    width: 150%;
    left: -25%;
  }
  .i-w svg {
    transform: scale(0.8);
  }
  .sm-only {
    display: none;
  }
}

/* --- Instagram Overlay Style Container --- */
.page-wrapper {
  position: relative;
  z-index: 10;
  padding: 4rem 1.25rem 2rem 1.25rem;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ig-overlay-card {
  position: relative;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 2.75rem 1.25rem 1.25rem 1.25rem;
  border-radius: 1.5rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  border: 1px solid #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  max-width: 380px;
  animation: card-enter 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes card-enter {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Circular Profile Picture - Floating half-out over top */
.avatar-circle {
  position: absolute;
  top: -2.5rem;
  width: 5rem;
  height: 5rem;
  border-radius: 9999px;
  border: 4px solid #ffffff;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  flex-shrink: 0;
  background-color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.22);
  display: block;
}

/* Username Pill */
.username-pill {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  margin-top: -0.75rem;
  z-index: 10;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  padding: 0.125rem 0.625rem;
  border-radius: 9999px;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.username-text {
  font-size: 0.95rem;
  font-weight: 900;
  color: #1e293b;
  letter-spacing: -0.025em;
}

/* Inner Content Box (matching Categories Container in TemplateCanvas) */
.inner-box {
  width: 100%;
  margin-top: 0.25rem;
  margin-bottom: 0.15rem;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.5);
  padding: 1.15rem 1.1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  text-align: center;
}

.inner-box h1 {
  font-size: 1.05rem;
  font-weight: 900;
  color: #1e293b;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.inner-box p {
  font-size: 0.8125rem;
  font-weight: 500;
  color: #475569;
  line-height: 1.55;
}

.inner-box p strong {
  font-weight: 800;
  color: #1e293b;
}
