:root {
  --bg-a: #000000;
  --bg-b: #0b0b0d;
  --bg-c: #19191e;
  --text: #f3f3f3;
  --muted: #9c9ca3;
  --line: #2f2f36;
  --accent-soft: #202025;
  --accent-strong: #2d2d35;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  width: 100%;
  min-height: 100%;
}

body {
  font-family: Georgia, "Times New Roman", serif;
  color: var(--text);
  background:
    radial-gradient(120% 90% at 50% 0%, #1a1a20 0%, #09090b 42%, #000000 100%),
    linear-gradient(180deg, #060608 0%, #000000 100%);
  overflow: hidden;
}

.backdrop {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(70% 55% at 8% 14%, rgba(150, 150, 170, 0.2), rgba(0, 0, 0, 0) 70%),
    radial-gradient(80% 60% at 92% 78%, rgba(85, 85, 105, 0.22), rgba(0, 0, 0, 0) 74%),
    linear-gradient(150deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0) 42%),
    linear-gradient(330deg, rgba(65, 65, 80, 0.28), rgba(0, 0, 0, 0) 56%);
  animation: drift 18s ease-in-out infinite alternate;
}

.backdrop::before,
.backdrop::after {
  content: "";
  position: absolute;
  inset: -8%;
  pointer-events: none;
}

.backdrop::before {
  background:
    radial-gradient(36% 30% at 20% 30%, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0) 74%),
    radial-gradient(44% 36% at 78% 65%, rgba(160, 160, 180, 0.1), rgba(255, 255, 255, 0) 76%);
  filter: blur(16px);
  opacity: 0.7;
  animation: pulse 12s ease-in-out infinite;
}

.backdrop::after {
  background:
    radial-gradient(100% 100% at 50% 50%, rgba(0, 0, 0, 0) 45%, rgba(0, 0, 0, 0.45) 100%);
}

.rain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.rain-drop {
  position: absolute;
  top: -20vh;
  width: 2px;
  height: 20px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(190, 190, 210, 0.62));
  animation: fall linear infinite;
  will-change: transform;
}

@keyframes fall {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(135vh);
  }
}

.fog {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background:
    radial-gradient(ellipse at 50% 100%, rgba(100, 100, 120, 0.15) 0%, transparent 70%),
    radial-gradient(ellipse at 20% 80%, rgba(80, 80, 100, 0.1) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 90%, rgba(90, 90, 110, 0.12) 0%, transparent 55%);
  animation: fogMove 20s ease-in-out infinite alternate, fogTone 16s ease-in-out infinite;
  filter: blur(30px);
}

@keyframes fogMove {
  0% {
    transform: translateX(-5%) translateY(2%);
  }
  100% {
    transform: translateX(5%) translateY(-2%);
  }
}

@keyframes fogTone {
  0%, 85%, 100% {
    filter: blur(30px) brightness(0.95) saturate(0.78);
  }
  90%, 95% {
    filter: blur(30px) brightness(0.85) saturate(0.58);
  }
}

.avatar {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  border: 1px solid #3b3b42;
  display: block;
  margin: 0 auto 16px;
  object-fit: cover;
  transition: all 0.3s ease;
  cursor: pointer;
}

.avatar:hover {
  filter: contrast(1.5) brightness(0.8) saturate(0.5);
  animation: avatarDistort 0.1s infinite;
  border-color: var(--accent-strong);
  box-shadow: 0 0 20px rgba(20, 20, 28, 0.55);
}

@keyframes avatarDistort {
  0% {
    transform: scale(1) skew(0deg);
  }
  25% {
    transform: scale(1.02) skew(2deg);
  }
  50% {
    transform: scale(0.98) skew(-1deg);
  }
  75% {
    transform: scale(1.01) skew(1deg);
  }
  100% {
    transform: scale(1) skew(0deg);
  }
}

.glitch {
  position: relative;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.glitch::before {
  left: 2px;
  text-shadow: -1px 0 rgba(210, 210, 220, 0.35);
  clip: rect(24px, 550px, 90px, 0);
  animation: glitch-anim 3s infinite linear alternate-reverse;
}

.glitch::after {
  left: -2px;
  text-shadow: -1px 0 rgba(95, 95, 110, 0.4);
  clip: rect(85px, 550px, 140px, 0);
  animation: glitch-anim 2s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
  0% {
    clip: rect(14px, 9999px, 127px, 0);
  }
  5% {
    clip: rect(68px, 9999px, 8px, 0);
  }
  10% {
    clip: rect(6px, 9999px, 86px, 0);
  }
  15% {
    clip: rect(98px, 9999px, 16px, 0);
  }
  20% {
    clip: rect(32px, 9999px, 93px, 0);
  }
  25% {
    clip: rect(69px, 9999px, 52px, 0);
  }
  30% {
    clip: rect(5px, 9999px, 112px, 0);
  }
  35% {
    clip: rect(74px, 9999px, 28px, 0);
  }
  40% {
    clip: rect(19px, 9999px, 83px, 0);
  }
  45% {
    clip: rect(44px, 9999px, 61px, 0);
  }
  50% {
    clip: rect(88px, 9999px, 39px, 0);
  }
  55% {
    clip: rect(27px, 9999px, 104px, 0);
  }
  60% {
    clip: rect(56px, 9999px, 71px, 0);
  }
  65% {
    clip: rect(13px, 9999px, 94px, 0);
  }
  70% {
    clip: rect(79px, 9999px, 47px, 0);
  }
  75% {
    clip: rect(36px, 9999px, 118px, 0);
  }
  80% {
    clip: rect(62px, 9999px, 25px, 0);
  }
  85% {
    clip: rect(91px, 9999px, 77px, 0);
  }
  90% {
    clip: rect(21px, 9999px, 109px, 0);
  }
  95% {
    clip: rect(48px, 9999px, 65px, 0);
  }
  100% {
    clip: rect(83px, 9999px, 34px, 0);
  }
}

@keyframes drift {
  from {
    transform: scale(1) translate3d(0, 0, 0);
  }
  to {
    transform: scale(1.04) translate3d(-1.2%, 1%, 0);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.52;
  }
  50% {
    opacity: 0.82;
  }
}

.wrap {
  position: relative;
  z-index: 3;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.card {
  width: min(92vw, 420px);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 20px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.03) 45%, rgba(0, 0, 0, 0.28)),
    linear-gradient(180deg, rgba(20, 20, 26, 0.58), rgba(8, 8, 11, 0.52));
  backdrop-filter: blur(16px) saturate(125%);
  -webkit-backdrop-filter: blur(16px) saturate(125%);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  text-align: center;
  padding: 34px 24px 28px;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(130deg, rgba(255, 255, 255, 0.26), rgba(255, 255, 255, 0.03) 38%, rgba(255, 255, 255, 0));
  mix-blend-mode: screen;
}

h1 {
  font-size: clamp(1.35rem, 3.8vw, 1.7rem);
  font-weight: 600;
  letter-spacing: 0.01em;
  margin-bottom: 5px;
}

#username {
  color: var(--muted);
  font-size: 0.96rem;
  margin-bottom: 0;
}

.prompt {
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.75rem;
  margin-top: 12px;
  font-style: italic;
  animation: promptDistort 0.15s infinite;
}

@keyframes promptDistort {
  0% {
    transform: skew(0deg);
    opacity: 0.4;
  }
  50% {
    transform: skew(1deg);
    opacity: 0.6;
  }
  100% {
    transform: skew(-1deg);
    opacity: 0.4;
  }
}

.socials {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.3s ease;
}

.socials.hidden {
  display: none;
}

.social-link {
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
  padding: 8px 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.3);
  transition: all 0.2s ease;
  display: block;
}

.social-link:hover {
  background: rgba(28, 28, 34, 0.45);
  border-color: rgba(78, 78, 88, 0.6);
  transform: skew(-2deg);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
}

.modal.hidden {
  display: none;
}

.modal-content {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.03) 45%, rgba(0, 0, 0, 0.4)),
    linear-gradient(180deg, rgba(20, 20, 26, 0.7), rgba(8, 8, 11, 0.6));
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 32px;
  text-align: center;
  max-width: 320px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  animation: modalAppear 0.3s ease;
}

@keyframes modalAppear {
  from {
    opacity: 0;
    transform: scale(0.9) skew(5deg);
  }
  to {
    opacity: 1;
    transform: scale(1) skew(0deg);
  }
}

.modal-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 2px solid var(--accent-strong);
  display: block;
  margin: 0 auto 16px;
  object-fit: cover;
  box-shadow: 0 0 20px rgba(20, 20, 28, 0.55);
}

.modal-content h2 {
  font-size: 1.4rem;
  margin-bottom: 8px;
}

.modal-content p {
  color: var(--muted);
  font-size: 1rem;
  margin-bottom: 20px;
}

.close-btn {
  background: rgba(28, 28, 34, 0.45);
  border: 1px solid rgba(78, 78, 88, 0.6);
  color: var(--text);
  padding: 10px 24px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.close-btn:hover {
  background: rgba(40, 40, 48, 0.62);
  transform: skew(-2deg);
}

@media (max-width: 520px) {
  .card {
    border-radius: 16px;
    padding: 30px 20px 24px;
  }

  .avatar {
    width: 96px;
    height: 96px;
  }
}
