/* --------------------------------------------------------------------------
   Valentine-Event (hinter Flag deaktiviert — Styles bewusst erhalten)
   -------------------------------------------------------------------------- */
.valentine-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: radial-gradient(circle at 50% 50%, rgba(126, 31, 56, 0.5), rgba(28, 17, 24, 0.75) 60%, rgba(13, 7, 9, 0.9));
  opacity: 0;
  pointer-events: none;
  transition: opacity 400ms ease;
  z-index: 1000;
  overflow: hidden;
}

.valentine-overlay--visible {
  opacity: 1;
  pointer-events: auto;
}

.valentine-puzzle-container {
  position: absolute;
  width: min(380px, 90vw);
  height: 220px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 3px;
  z-index: 1;
}

.valentine-puzzle-piece {
  background: linear-gradient(145deg, var(--paper), #f3dbe2);
  border: 1px solid rgba(193, 75, 102, 0.25);
  opacity: 0;
  transform: var(--start-transform, translate(0, -200px) rotate(45deg) scale(0.3));
  animation: puzzlePieceIn 600ms cubic-bezier(0.34, 1.56, 0.64, 1) var(--delay, 0ms) forwards;
  box-shadow: 0 4px 12px rgba(193, 75, 102, 0.2);
}

.valentine-puzzle-piece:first-child { border-top-left-radius: 20px; }
.valentine-puzzle-piece:nth-child(4) { border-top-right-radius: 20px; }
.valentine-puzzle-piece:nth-child(9) { border-bottom-left-radius: 20px; }
.valentine-puzzle-piece:last-child { border-bottom-right-radius: 20px; }

@keyframes puzzlePieceIn {
  0%   { opacity: 0; transform: var(--start-transform, translate(0, -200px) rotate(45deg) scale(0.3)); }
  60%  { opacity: 1; }
  100% { opacity: 1; transform: translate(0, 0) rotate(0deg) scale(1); }
}

.valentine-popup {
  position: absolute;
  z-index: 2;
  background: transparent;
  border: none;
  padding: 36px 44px;
  text-align: center;
  max-width: min(380px, 90vw);
  opacity: 0;
  pointer-events: none;
}

.valentine-popup--ready {
  opacity: 1;
  pointer-events: auto;
}

.valentine-question {
  margin: 0 0 28px;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 5.5vw, 2rem);
  color: var(--rose-blush);
  font-weight: 600;
  line-height: 1.3;
  text-shadow: 0 2px 14px rgba(193, 75, 102, 0.4);
  opacity: 0;
  transform: translateY(-120px) scale(0.8);
}

.valentine-question--falling {
  animation: textFallIn 800ms cubic-bezier(0.34, 1.2, 0.64, 1) forwards;
}

@keyframes textFallIn {
  0%   { opacity: 0; transform: translateY(-120px) scale(0.8) rotate(-5deg); }
  50%  { opacity: 1; transform: translateY(8px) scale(1.02) rotate(2deg); }
  70%  { transform: translateY(-4px) scale(0.98) rotate(-1deg); }
  85%  { transform: translateY(2px) scale(1.01) rotate(0.5deg); }
  100% { opacity: 1; transform: translateY(0) scale(1) rotate(0deg); }
}

.valentine-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
  min-height: 60px;
  opacity: 0;
  transform: translateY(20px);
}

.valentine-buttons--visible {
  animation: buttonsSlideIn 500ms ease forwards;
}

@keyframes buttonsSlideIn {
  0%   { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}

.valentine-btn {
  padding: 14px 36px;
  border-radius: 14px;
  border: none;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.valentine-btn--yes {
  background: linear-gradient(135deg, var(--rose), #d96a85);
  color: #fff;
  box-shadow: 0 8px 24px rgba(193, 75, 102, 0.45);
  position: relative;
  z-index: 1005;
}

.valentine-btn--yes:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 32px rgba(193, 75, 102, 0.55);
}

.valentine-btn--yes:active {
  transform: scale(0.98);
}

.valentine-btn--no {
  background: linear-gradient(135deg, #4a3a44, #382b34);
  color: #c0aa90;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
  position: absolute;
  transition: left 80ms ease-out, top 80ms ease-out, transform 150ms ease;
}

.valentine-btn--no:hover {
  transform: scale(1.02);
}

.valentine-btn--clone {
  position: fixed;
  z-index: 1003;
  animation: neinButtonSpawn 400ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  pointer-events: auto;
}

@keyframes neinButtonSpawn {
  0%   { opacity: 0; transform: scale(0) rotate(-20deg); }
  50%  { opacity: 1; transform: scale(1.2) rotate(10deg); }
  100% { opacity: 1; transform: scale(1) rotate(0deg); }
}

.valentine-btn--clone:active {
  transform: scale(0.95);
}

.valentine-puzzle-piece::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 40%, rgba(255, 255, 255, 0.4) 50%, transparent 60%);
  opacity: 0;
  animation: puzzleSparkle 1.5s ease var(--sparkle-delay, 0ms) forwards;
}

@keyframes puzzleSparkle {
  0%, 40% { opacity: 0; transform: translateX(-100%); }
  60%     { opacity: 1; }
  100%    { opacity: 0; transform: translateX(100%); }
}

@keyframes valentineShake {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  10% { transform: translate(-12px, -8px) rotate(-2deg); }
  20% { transform: translate(14px, 6px) rotate(2deg); }
  30% { transform: translate(-10px, 10px) rotate(-1deg); }
  40% { transform: translate(12px, -6px) rotate(1.5deg); }
  50% { transform: translate(-8px, 8px) rotate(-1.5deg); }
  60% { transform: translate(10px, -10px) rotate(1deg); }
  70% { transform: translate(-6px, 6px) rotate(-0.5deg); }
  80% { transform: translate(8px, -4px) rotate(0.5deg); }
  90% { transform: translate(-4px, 4px) rotate(0deg); }
}

.valentine-shaking {
  animation: valentineShake 600ms ease-in-out;
}

.valentine-celebration {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1001;
  overflow: hidden;
}

.valentine-celebration--active {
  pointer-events: none;
}

.valentine-confetti {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.valentine-confetti-piece {
  position: absolute;
  top: -5%;
  width: var(--size, 12px);
  height: calc(var(--size, 12px) * 1.4);
  background: var(--color);
  opacity: 0;
  transform: translate3d(var(--tx, 0), 0, 0) rotate3d(1, 1, 1, var(--rot, 0deg)) scale(var(--scale, 1));
  animation: valentineConfettiFall var(--duration, 3s) ease-out var(--delay, 0ms) forwards;
  border-radius: 4px;
}

@keyframes valentineConfettiFall {
  0% {
    opacity: 0;
    transform: translate3d(var(--tx, 0), -60px, 0) rotate3d(1, 1, 1, var(--rot, 0deg)) scale(var(--scale, 1));
  }
  15% { opacity: 1; }
  100% {
    opacity: 0;
    transform: translate3d(calc(var(--tx, 0) + var(--drift, 0px)), 110vh, 0) rotate3d(1, 1, 1, calc(var(--rot, 0deg) + 720deg)) scale(var(--scale, 1));
  }
}

.valentine-hearts {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.valentine-float-heart {
  position: absolute;
  width: var(--size, 30px);
  height: var(--size, 30px);
  background: var(--color, var(--rose));
  transform: translate(-50%, -50%) rotate(45deg) scale(0);
  border-radius: 4px;
  opacity: 0;
  animation: valentineHeartFloat var(--duration, 2.5s) ease-out var(--delay, 0ms) forwards;
  filter: drop-shadow(0 4px 12px rgba(193, 75, 102, 0.45));
}

.valentine-float-heart::before,
.valentine-float-heart::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  background: inherit;
  border-radius: 50%;
}

.valentine-float-heart::before { top: -50%; left: 0; }
.valentine-float-heart::after  { left: -50%; top: 0; }

@keyframes valentineHeartFloat {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(45deg) scale(0);
  }
  20% {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(45deg) scale(var(--scale, 1));
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--drift, 0px)), calc(-50% - 200px)) rotate(45deg) scale(var(--scale, 1));
  }
}

.valentine-success {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  background: linear-gradient(145deg, var(--paper), #f3dbe2);
  border: 2px solid rgba(193, 75, 102, 0.4);
  border-radius: 24px;
  padding: 30px 40px;
  text-align: center;
  box-shadow: 0 30px 80px rgba(193, 75, 102, 0.4);
  z-index: 1002;
  animation: valentineSuccessIn 500ms cubic-bezier(0.34, 1.56, 0.64, 1) 600ms forwards;
}

.valentine-success-text {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 6vw, 2.4rem);
  font-weight: 700;
  background: linear-gradient(90deg, var(--rose), var(--rose-soft), var(--gold-bright), var(--rose));
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: valentineShine 2s linear infinite;
}

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

@keyframes valentineShine {
  0%   { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

