/* ── Miss You page ── */

.miss-you-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 10rem);
  padding: 2rem 1rem 4rem;
  position: relative;
  overflow: hidden;
  max-width: 100%;
}

/* ── Floating particles ── */
.my-particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.my-particle {
  position: absolute;
  font-size: 1rem;
  opacity: 0;
  animation: myFloat 6s ease-in-out infinite;
  pointer-events: none;
  user-select: none;
}

@keyframes myFloat {
  0% {
    opacity: 0;
    transform: translateY(0) scale(0.5) rotate(0deg);
  }
  15% {
    opacity: 0.7;
  }
  85% {
    opacity: 0.5;
  }
  100% {
    opacity: 0;
    transform: translateY(-100vh) scale(1.2) rotate(45deg);
  }
}

/* ── Heart container ── */
.my-heart-wrap {
  position: relative;
  width: clamp(220px, 45vw, 340px);
  height: clamp(220px, 45vw, 340px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  margin-bottom: 1rem;
}

.my-heart-svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 8px 32px rgba(201, 68, 107, 0.35));
  transition: filter 0.3s ease;
}

/* ── Idle gentle float ── */
.my-heart-svg {
  animation: myIdleFloat 3.5s ease-in-out infinite;
}

@keyframes myIdleFloat {
  0%, 100% { transform: scale(1) translateY(0); }
  50%      { transform: scale(1.03) translateY(-8px); }
}

/* ── Heartbeat animation ── */
.my-heart-wrap.is-beating .my-heart-svg {
  animation: myHeartbeat 0.85s ease-in-out infinite;
  filter: drop-shadow(0 8px 48px rgba(255, 107, 157, 0.6));
}

@keyframes myHeartbeat {
  0%   { transform: scale(1); }
  14%  { transform: scale(1.18); }
  28%  { transform: scale(1); }
  42%  { transform: scale(1.12); }
  56%  { transform: scale(1); }
  100% { transform: scale(1); }
}

/* ── Ripple rings ── */
.my-ripple {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid rgba(255, 107, 157, 0.4);
  transform: translate(-50%, -50%) scale(1);
  opacity: 0;
  pointer-events: none;
}

.my-heart-wrap.is-beating .my-ripple-1 {
  animation: myRipple 1.7s ease-out infinite;
}

.my-heart-wrap.is-beating .my-ripple-2 {
  animation: myRipple 1.7s ease-out 0.85s infinite;
}

@keyframes myRipple {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.5;
  }
  100% {
    transform: translate(-50%, -50%) scale(2.2);
    opacity: 0;
  }
}

/* ── The button ── */
.my-miss-btn {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.9rem 2.2rem;
  font-family: var(--serif, "Crafty Girls", cursive);
  font-size: 1.25rem;
  font-weight: 600;
  color: #fffdfb;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  background: linear-gradient(135deg, #ff6b9d 0%, #c9446b 50%, #8b1a3a 100%);
  box-shadow:
    0 6px 24px rgba(201, 68, 107, 0.4),
    0 2px 8px rgba(139, 26, 58, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
  overflow: hidden;
  letter-spacing: 0.02em;
  margin-top: 0.5rem;
}

.my-miss-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 60%);
  pointer-events: none;
}

.my-miss-btn:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow:
    0 10px 36px rgba(201, 68, 107, 0.5),
    0 4px 12px rgba(139, 26, 58, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  filter: brightness(1.08);
}

.my-miss-btn:active {
  transform: translateY(0) scale(0.97);
  box-shadow:
    0 3px 12px rgba(201, 68, 107, 0.35),
    0 1px 4px rgba(139, 26, 58, 0.15);
}

.my-miss-btn.is-sending {
  pointer-events: none;
  opacity: 0.8;
}

.my-miss-btn-icon {
  font-size: 1.35rem;
  transition: transform 0.3s ease;
}

.my-miss-btn:hover .my-miss-btn-icon {
  transform: scale(1.25);
}

.my-miss-btn-text {
  position: relative;
}

/* ── Status + counter ── */
.my-status {
  z-index: 2;
  margin: 1rem 0 0;
  font-family: var(--sans, "Crafty Girls", cursive);
  font-size: 0.95rem;
  color: var(--accent, #a35f7b);
  min-height: 1.5em;
  text-align: center;
  transition: opacity 0.3s ease;
}

.my-sent-count {
  z-index: 2;
  margin: 0.4rem 0 0;
  font-family: var(--sans, "Crafty Girls", cursive);
  font-size: 0.85rem;
  color: var(--muted, #2b1f2a);
  opacity: 0.65;
  text-align: center;
}

/* ── Button press burst ── */
.my-burst {
  position: fixed;
  pointer-events: none;
  z-index: 999;
  font-size: 1.4rem;
  opacity: 1;
  animation: myBurst 1s ease-out forwards;
}

@keyframes myBurst {
  0% {
    opacity: 1;
    transform: translate(0, 0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(var(--dx), var(--dy)) scale(0.3);
  }
}

/* ── Responsive ── */
@media (max-width: 480px) {
  .my-heart-wrap {
    width: 200px;
    height: 200px;
  }
  .my-miss-btn {
    font-size: 1.1rem;
    padding: 0.75rem 1.6rem;
  }
}

/* ── Dark-mode refinements ── */
html[data-theme="dark"] .my-heart-svg {
  filter: drop-shadow(0 8px 40px rgba(241, 182, 255, 0.3));
}

html[data-theme="dark"] .my-heart-wrap.is-beating .my-heart-svg {
  filter: drop-shadow(0 8px 56px rgba(241, 182, 255, 0.55));
}

html[data-theme="dark"] .my-ripple {
  border-color: rgba(241, 182, 255, 0.35);
}

html[data-theme="dark"] .my-miss-btn {
  background: linear-gradient(135deg, #d87bff 0%, #a84fcc 50%, #6e2d99 100%);
  box-shadow:
    0 6px 24px rgba(168, 79, 204, 0.4),
    0 2px 8px rgba(110, 45, 153, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

html[data-theme="dark"] .my-miss-btn:hover {
  box-shadow:
    0 10px 36px rgba(168, 79, 204, 0.55),
    0 4px 12px rgba(110, 45, 153, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}
