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

html, body {
  width: 100%; height: 100%; overflow: hidden; pointer-events: none;
  font-family: 'Segoe UI', system-ui, sans-serif;
}

body.preview-mode {
  background: radial-gradient(ellipse 80% 60% at 50% 40%, #1a1408 0%, #0c0a06 100%);
}

.follow-waiting {
  position: fixed; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  padding: 12px 16px; font-size: 0.85rem; font-weight: 600;
  color: rgba(255,248,231,0.5);
  background: transparent;
  border: none;
}
.follow-waiting.is-hidden { display: none; }

.follow-spotlight {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(320px, 90vw);
  display: flex;
  justify-content: center;
  align-items: center;
}

.follow-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 8px;
  background: none;
  border: none;
  box-shadow: none;
  opacity: 0;
  transform: scale(0.88);
  transition: opacity 0.35s ease, transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.follow-card.is-in {
  opacity: 1;
  transform: scale(1);
}

.follow-card.is-out {
  opacity: 0;
  transform: scale(0.92);
}

.electric-sparks {
  position: absolute;
  inset: -40px -56px;
  pointer-events: none;
  z-index: 0;
}

.spark {
  position: absolute;
  width: 2px;
  height: 32px;
  background: linear-gradient(to bottom, transparent, #fffef0 40%, #6dd5fa 60%, transparent);
  opacity: 0;
  filter: drop-shadow(0 0 8px #6dd5fa);
}

.follow-card.is-in .spark { animation: sparkFlicker 0.38s ease-out infinite; }
.spark--1 { left: 12%; top: 18%; transform: rotate(-25deg); }
.spark--2 { right: 12%; top: 14%; transform: rotate(20deg); animation-delay: 0.1s; }
.spark--3 { left: 8%; bottom: 22%; height: 26px; animation-delay: 0.18s; }
.spark--4 { right: 8%; bottom: 18%; animation-delay: 0.05s; }
.spark--5 { left: 50%; top: 0; transform: translateX(-50%) rotate(0deg); animation-delay: 0.22s; }
.spark--6 { left: 50%; bottom: 4%; height: 22px; transform: translateX(-50%); animation-delay: 0.14s; }

.avatar-wrap {
  position: relative;
  z-index: 2;
  margin-bottom: 14px;
  animation: avatarGlow 2.2s ease-in-out infinite;
}

.avatar {
  position: relative;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow:
    0 0 0 3px rgba(109, 213, 250, 0.55),
    0 0 24px rgba(109, 213, 250, 0.35),
    0 8px 28px rgba(0, 0, 0, 0.35);
}

.avatar-fallback {
  font-size: 2.2rem;
  font-weight: 800;
  color: #1a1408;
}

.avatar-fallback.is-hidden { display: none; }

.avatar-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.follow-body {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  max-width: 100%;
}

.follow-name {
  display: block;
  font-size: 1.35rem;
  font-weight: 800;
  color: #f0d878;
  text-shadow: 0 0 18px rgba(212, 175, 55, 0.45);
  line-height: 1.2;
  word-break: break-word;
}

.follow-thanks {
  display: block;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: rgba(168, 230, 255, 0.95);
  text-shadow: 0 0 12px rgba(109, 213, 250, 0.4);
}

@keyframes sparkFlicker {
  0%, 100% { opacity: 0; transform: scaleY(0.4); }
  12% { opacity: 1; transform: scaleY(1); }
  24% { opacity: 0; }
}

@keyframes avatarGlow {
  0%, 100% {
    filter: drop-shadow(0 0 8px rgba(109, 213, 250, 0.25));
  }
  50% {
    filter: drop-shadow(0 0 22px rgba(109, 213, 250, 0.55));
  }
}
