/* friends.css */

/* =========================
   Wallpaper tiling + blends
   ========================= */
:root {
  --tile-size: 512px;  /* adjust to your image’s true width/height */
  --wallpaper: url('https://i.postimg.cc/1znqKvVq/image.png');
}

body {
  margin: 0;
  background-image: var(--wallpaper);
  background-repeat: repeat;
  background-size: var(--tile-size) auto;
  background-position: 0 0;
  position: relative;
}

/* Blended overlay for seamless look */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;

  background-image: var(--wallpaper);
  background-repeat: repeat;
  background-size: var(--tile-size) auto;
  background-position: calc(var(--tile-size) / 2) calc(var(--tile-size) / 2);

  opacity: 0.45;
  mix-blend-mode: soft-light;
  filter: blur(0.8px);
  z-index: 0;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(1200px 800px at 20% 30%, rgba(255,255,255,0.03), transparent 60%),
    radial-gradient(900px 700px at 80% 70%, rgba(0,0,0,0.03), transparent 60%);
  mix-blend-mode: overlay;
  opacity: 0.6;
  z-index: 0;
}

/* =========================
   Confetti layer
   ========================= */
#confetti-layer {
  position: fixed;
  inset: 0;
  z-index: 4;           /* above wallpaper overlays, below title/nav */
  pointer-events: none;
  overflow: hidden;
}

/* Wrapper handles fall + sway */
.confetti {
  position: absolute;
  top: -15vh;
  left: var(--confetti-start-x, 50vw);
  width: var(--confetti-size, 48px);
  height: var(--confetti-size, 48px);
  opacity: var(--confetti-opacity, 0.5);
  mix-blend-mode: var(--confetti-blend, soft-light);
  will-change: transform, opacity;
  animation:
    confetti-fall var(--confetti-dur, 10s) linear var(--confetti-delay, 0s) forwards,
    confetti-sway calc(var(--confetti-dur, 10s) * 0.8) ease-in-out var(--confetti-delay, 0s) infinite alternate;
}

/* Inner handles spin + image */
.confetti-inner {
  width: 100%;
  height: 100%;
  background-image: var(--confetti-img);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  transform: rotate(var(--confetti-rot, 0deg));
  will-change: transform;
  animation: confetti-spin calc(var(--confetti-dur, 10s) * 0.9) linear var(--confetti-delay, 0s) infinite;
}

/* Keyframes */
@keyframes confetti-fall {
  to { transform: translateY(110vh); }
}

@keyframes confetti-sway {
  from { transform: translateX(calc(var(--confetti-sway, 40px) * -1)); }
  to   { transform: translateX(var(--confetti-sway, 40px)); }
}

@keyframes confetti-spin {
  to { transform: rotate(calc(var(--confetti-rot, 0deg) + 1turn)); }
}

/* Respect reduced motion users */
@media (prefers-reduced-motion: reduce) {
  .confetti, .confetti-inner { animation: none; display: none; }
}

/* =========================
   Angelic title
   ========================= */
.angel-title {
  position: fixed;
  top: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;

  font-family: "Great Vibes", cursive;
  font-size: clamp(42px, 8vw, 120px);
  letter-spacing: 1px;

  background: linear-gradient(180deg, #fff, #f6eaff 40%, #d8c8ff 75%, #ffffff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;

  text-shadow:
    0 0 6px rgba(255,255,255,0.85),
    0 0 18px rgba(220,200,255,0.55),
    0 0 36px rgba(170,150,255,0.35);
  filter: drop-shadow(0 2px 2px rgba(0,0,0,0.15));

  animation: twinkle 3.5s ease-in-out infinite;
}

/* Halo above the word */
.angel-title::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -28px;
  transform: translateX(-50%) rotate(-8deg);
  width: 55%;
  height: 14px;
  border: 2px solid rgba(255,255,255,0.9);
  border-radius: 999px;
  box-shadow:
    0 0 8px rgba(255,255,255,0.9),
    0 0 22px rgba(210,190,255,0.6);
  background: radial-gradient(circle at 50% 60%, rgba(255,255,255,0.6), rgba(255,255,255,0.1) 60%, transparent 70%);
  pointer-events: none;
}

/* Twinkle animation */
@keyframes twinkle {
  0%, 100% { opacity: 0.7; filter: blur(0.6px); }
  50%      { opacity: 1;   filter: blur(0); }
}

/* =========================
   Angelic nav buttons
   ========================= */
.angel-nav {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 15; /* above confetti */
  display: flex;
  gap: 16px;
  padding: 0 12px;
}

.angel-btn {
  position: relative;
  display: inline-block;
  padding: 10px 18px;
  border-radius: 999px;

  background: linear-gradient(180deg, rgba(255,255,255,0.28), rgba(255,255,255,0.12));
  border: 1px solid rgba(255,255,255,0.55);
  box-shadow:
    0 6px 20px rgba(120, 100, 200, 0.25),
    inset 0 1px 0 rgba(255,255,255,0.6);

  font-family: "Great Vibes", cursive;
  font-size: clamp(20px, 3.2vw, 34px);
  color: #ffffff;
  text-decoration: none;
  letter-spacing: 0.5px;

  text-shadow:
    0 0 6px rgba(255,255,255,0.85),
    0 0 14px rgba(210,190,255,0.5);
  transition: transform 0.2s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.angel-btn::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -10px;
  transform: translateX(-50%);
  width: 60%;
  height: 10px;
  border: 1.5px solid rgba(255,255,255,0.85);
  border-radius: 999px;
  box-shadow:
    0 0 6px rgba(255,255,255,0.85),
    0 0 14px rgba(210,190,255,0.55);
  background: radial-gradient(circle at 50% 55%, rgba(255,255,255,0.5), rgba(255,255,255,0.05) 60%, transparent 70%);
  pointer-events: none;
  opacity: 0.85;
}

.angel-btn:hover {
  transform: translateY(-2px);
  background: linear-gradient(180deg, rgba(255,255,255,0.38), rgba(255,255,255,0.18));
  box-shadow:
    0 10px 28px rgba(140, 120, 220, 0.35),
    inset 0 1px 0 rgba(255,255,255,0.75);
}

.angel-btn:active {
  transform: translateY(0);
}
