/* ---------- Tokens (Kawaii cat) ---------- */
:root {
  --pink-bg: #f4b7c0;

  --rose: #ff7eab;          /* primary button */
  --rose-light: #ff9cc1;
  --rose-dark: #e85f92;

  --sky: #6cc5ef;           /* telegram button */
  --sky-light: #8fd5f5;
  --sky-dark: #36a7e0;

  --ink: #4f4a4d;           /* soft charcoal outline (like the cat stickers) */
  --cheek: #ffb3c4;
  --mint: #b8e6cf;
  --cream: #fffdfb;
  --white: #ffffff;

  --text-dark: #5b4750;
  --text-muted: #a37e8b;

  --card-bg: #fffdfb;
  --card-border: #4f4a4d;
  --card-shadow: 0 16px 0 -2px rgba(79, 74, 77, 0.10),
    0 30px 60px -12px rgba(196, 90, 120, 0.45);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  color: var(--text-dark);
  font-family: "Quicksand", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100%;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 36px 20px;
  overflow-x: hidden;
  position: relative;
  background: var(--pink-bg);
}

/* ---------- Tiled cat pattern background ---------- */
.bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image: url("catbackground.png");
  background-repeat: repeat;
  background-size: 420px auto;
  background-position: center top;
  animation: bg-pan 90s linear infinite;
}

/* gentle drift of the tile so the cats softly wander */
@keyframes bg-pan {
  from { background-position: 0 0; }
  to   { background-position: 420px 840px; }
}

/* soft pink wash so the white card and text pop a touch more */
.bg-tint {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(
      120% 90% at 50% 22%,
      rgba(255, 255, 255, 0.28) 0%,
      transparent 60%
    ),
    linear-gradient(
      180deg,
      rgba(244, 183, 192, 0.10) 0%,
      rgba(244, 183, 192, 0.34) 100%
    );
  pointer-events: none;
}

/* ---------- Floating paw prints ---------- */
.sky {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.paw {
  position: absolute;
  font-size: 30px;
  opacity: 0.35;
  filter: drop-shadow(0 3px 4px rgba(150, 80, 100, 0.25));
}

.paw--1 { top: 14%; left: 8%;  transform: rotate(-18deg); animation: bob 7s ease-in-out infinite; }
.paw--2 { top: 64%; right: 9%; transform: rotate(16deg);  animation: bob 9s ease-in-out infinite 0.6s; font-size: 38px; opacity: 0.28; }
.paw--3 { bottom: 10%; left: 16%; transform: rotate(8deg); animation: bob 8s ease-in-out infinite 1.2s; font-size: 24px; opacity: 0.3; }

@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(var(--r, 0deg)); }
  50%      { transform: translateY(-12px); }
}

/* ---------- Card ---------- */
.card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  padding: 40px 26px 26px;
  border-radius: 30px;
  background: var(--card-bg);
  border: 3px solid var(--card-border);
  box-shadow: var(--card-shadow);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 24px;
  animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

/* faint paw watermark glow inside the card */
.card::before {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 27px;
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 126, 171, 0.06) 0%, transparent 42%),
    radial-gradient(circle at 0% 100%, rgba(108, 197, 239, 0.06) 0%, transparent 42%);
  pointer-events: none;
}

/* pastel rounded corner dots */
.card__corner {
  position: absolute;
  width: 14px;
  height: 14px;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: var(--cheek);
}
.card__corner--tl { top: -8px; left: -8px; }
.card__corner--tr { top: -8px; right: -8px; background: var(--sky-light); }
.card__corner--bl { bottom: -8px; left: -8px; background: var(--mint); }
.card__corner--br { bottom: -8px; right: -8px; }

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Hero ---------- */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  position: relative;
}

.avatar-wrap {
  position: relative;
  width: 128px;
  height: 128px;
}

/* Cat ears */
.ear {
  position: absolute;
  top: -16px;
  width: 46px;
  height: 46px;
  background: var(--cream);
  border: 3px solid var(--ink);
  border-radius: 60% 60% 12% 60%;
  z-index: 0;
}
.ear::after {
  content: "";
  position: absolute;
  inset: 7px 9px 12px 7px;
  background: var(--cheek);
  border-radius: 60% 60% 12% 60%;
}
.ear--l { left: 8px;  transform: rotate(-26deg); }
.ear--r { right: 8px; transform: rotate(64deg); border-radius: 60% 60% 60% 12%; }
.ear--r::after { border-radius: 60% 60% 60% 12%; inset: 7px 7px 12px 9px; }

.avatar {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(140deg, #ffe1ee 0%, #ff9ec7 55%, #8fd5f5 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid var(--ink);
  box-shadow:
    0 0 0 5px var(--white),
    0 0 0 8px var(--ink),
    0 12px 22px -8px rgba(196, 90, 120, 0.5);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
}

.avatar.has-image .avatar__initial { display: none; }

/* When a real photo is set: show the full width so her face AND the
   mirror reflection are both in frame */
.avatar.has-image {
  background-size: cover;
  background-position: center 6%;
}

.avatar__initial {
  font-family: "Lilita One", system-ui, sans-serif;
  font-weight: 400;
  font-size: 60px;
  color: #fff;
  line-height: 1;
  text-shadow: 0 3px 0 var(--ink);
}

/* little blush cheeks on the avatar */
.avatar-cheek {
  position: absolute;
  z-index: 2;
  bottom: 40px;
  width: 18px;
  height: 11px;
  border-radius: 50%;
  background: var(--cheek);
  opacity: 0.85;
  filter: blur(0.4px);
}
.avatar.has-image ~ .avatar-cheek { display: none; }
.avatar-cheek--l { left: 20px; }
.avatar-cheek--r { right: 20px; }

.hero__ornament {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 230px;
}

.hero__line {
  flex: 1;
  height: 3px;
  background: var(--ink);
  border-radius: 3px;
  opacity: 0.85;
}

.hero__icon {
  font-size: 22px;
  line-height: 1;
  filter: drop-shadow(1px 2px 1px rgba(79, 74, 77, 0.3));
}

/* Bubbly kawaii name */
.name {
  position: relative;
  font-family: "Lilita One", system-ui, sans-serif;
  font-weight: 400;
  font-size: 46px;
  line-height: 1;
  letter-spacing: 0.01em;
  margin: 0;
  color: var(--rose);
  -webkit-text-stroke: 2.5px var(--ink);
  paint-order: stroke fill;
  text-shadow:
    0 3px 0 var(--rose-dark),
    0 4px 0 rgba(79, 74, 77, 0.25);
  transform: rotate(-1.5deg);
}

/* ---------- Links ---------- */
.links {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 2px;
}

.link-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 60px;
  padding: 16px 22px;
  border-radius: 20px;
  border: 3px solid var(--ink);
  background: var(--sky);
  color: #fff;
  font-family: "Quicksand", sans-serif;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;
  box-shadow:
    0 0 0 3px var(--white) inset,
    0 5px 0 0 var(--sky-dark),
    0 5px 0 3px var(--ink);
  text-shadow: 0 2px 0 rgba(79, 74, 77, 0.25);
  transition:
    transform 0.12s cubic-bezier(0.2, 0.7, 0.2, 1),
    box-shadow 0.12s cubic-bezier(0.2, 0.7, 0.2, 1),
    background-color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

/* glossy sheen */
.link-btn::before {
  content: "";
  position: absolute;
  inset: 5px 5px 50% 5px;
  border-radius: 14px 14px 8px 8px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.5) 0%,
    rgba(255, 255, 255, 0.05) 100%
  );
  pointer-events: none;
}

.link-btn:hover {
  background: var(--sky-light);
  transform: translateY(-2px);
  box-shadow:
    0 0 0 3px var(--white) inset,
    0 7px 0 0 var(--sky-dark),
    0 7px 0 3px var(--ink);
}
.link-btn:active {
  transform: translateY(3px);
  box-shadow:
    0 0 0 3px var(--white) inset,
    0 2px 0 0 var(--sky-dark),
    0 2px 0 3px var(--ink);
}
.link-btn:focus-visible {
  outline: 3px solid var(--rose);
  outline-offset: 3px;
}

/* Primary — kawaii rose */
.link-btn--primary {
  background: var(--rose);
  box-shadow:
    0 0 0 3px var(--white) inset,
    0 5px 0 0 var(--rose-dark),
    0 5px 0 3px var(--ink);
}
.link-btn--primary:hover {
  background: var(--rose-light);
  box-shadow:
    0 0 0 3px var(--white) inset,
    0 7px 0 0 var(--rose-dark),
    0 7px 0 3px var(--ink);
}
.link-btn--primary:active {
  box-shadow:
    0 0 0 3px var(--white) inset,
    0 2px 0 0 var(--rose-dark),
    0 2px 0 3px var(--ink);
}

/* ---------- Footer ---------- */
.footer {
  margin-top: 2px;
  color: var(--text-muted);
  font-family: "Quicksand", sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.footer p { margin: 0; }
.footer-paw { font-size: 12px; }

/* ---------- Small screens ---------- */
@media (max-width: 380px) {
  .card { padding: 34px 20px 22px; border-radius: 26px; }
  .name { font-size: 38px; }
  .avatar-wrap { width: 112px; height: 112px; }
  .avatar__initial { font-size: 52px; }
  .avatar-cheek { bottom: 34px; }
  .link-btn { min-height: 56px; font-size: 14.5px; }
}

/* ---------- Larger screens ---------- */
@media (min-width: 720px) {
  .card { max-width: 450px; padding: 50px 34px 30px; }
  .name { font-size: 50px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .bg, .paw, .card, .link-btn {
    animation: none !important;
    transition: none !important;
  }
  .link-btn:hover, .link-btn:active { transform: none; }
}
