@charset "UTF-8";

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; font-family: Inter, system-ui, sans-serif; }

body {
  cursor: url('../images/leaf2.png') 8 8, auto;
}

.bg-wrap {
  position: relative;
  width: 100%;
  max-width: 1920px;
  margin: 0 auto;
  aspect-ratio: 1920 / 1080;    
  background-color: #ffe5f1;
  overflow: hidden;
}


.hotspot {
  position: absolute;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  transform-origin: center;
  transform: translate(-50%, -50%);
  will-change: left, top;
  cursor: inherit;

  background: transparent;
  border: none;
  outline: none;
}

.hotspot::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('../images/single_ladybug.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  transform: scale(1.8) rotate(var(--rotation, 0deg));
  transition: transform 0.4s ease;
  transform-origin: center;
  pointer-events: none;
}

.hotspot[data-spinner="true"]::after {
  animation: ladybug-spin 1s linear infinite;
  transition: none;
}

@keyframes ladybug-spin {
  from { transform: scale(1.8) rotate(0deg); }
  to { transform: scale(1.8) rotate(360deg); }
}



.tooltip {
  position: absolute;
  bottom: calc(100% + 10px);    
  left: 50%;
  transform: translateX(-50%);
  transform-origin: bottom center;
  padding: 8px 12px;
  border-radius: 10px;
  white-space: nowrap;
  font-size: 14px;
  font-family: "Comic Sans MS", "Comic Sans", cursive;
  line-height: 1.1;
  border: 2px solid var(--tooltip-border, #ffb3d4);
  background: var(--tooltip-bg, #fff1f8);
  color: var(--tooltip-text, #8a1053);
  box-shadow: 0 8px 30px rgba(255, 105, 180, 0.25);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 20;
}

.tooltip::before {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 8px solid var(--tooltip-bg, #fff1f8);
}


.tooltip::after {
  content: '';
  position: absolute;
  top: calc(100% + 2px);
  left: 50%;
  width: 6px;
  height: 6px;
  border-radius: 1px;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 10px) scale(0.3) rotate(0deg);
  transform-origin: bottom center;
  background: #ff7eb6;
  box-shadow:
    -24px -16px 0 0 #ffe066,
    18px -14px 0 0 #7af0ff,
    -34px -8px 0 0 #b2ff59,
    8px -6px 0 0 #ff9bd4,
    30px -2px 0 0 #ffd166,
    -16px 6px 0 0 #ff6fe1,
    4px 10px 0 0 #cba6ff,
    24px 10px 0 0 #aef4c4,
    -6px 15px 0 0 #ffa8d2,
    16px 18px 0 0 #ffdd6f;
  filter: drop-shadow(0 4px 5px rgba(0,0,0,0.15));
  z-index: -1;
}




.hotspot:hover .tooltip,
.hotspot:focus .tooltip {
  opacity: 1;
  animation: tooltip-pop 0.35s ease-out;
}

.hotspot:hover .tooltip::after,
.hotspot:focus .tooltip::after {
  animation: confetti-burst 0.85s cubic-bezier(0.42, 0, 0.3, 1) forwards;
}


.hotspot:focus {
  box-shadow: 0 0 0 3px rgba(0, 120, 255, 0.18);
}

.tooltip[data-theme="sunny"] {
  --tooltip-bg: #fff8c9;
  --tooltip-border: #ffd84b;
  --tooltip-text: #b46000;
  box-shadow: 0 8px 26px rgba(255, 216, 75, 0.4);
}

.tooltip[data-theme="sky"] {
  --tooltip-bg: #e7f3ff;
  --tooltip-border: #5ebeff;
  --tooltip-text: #0058a2;
  box-shadow: 0 8px 26px rgba(94, 190, 255, 0.35);
}

.tooltip[data-theme="mint"] {
  --tooltip-bg: #e8fff2;
  --tooltip-border: #61d89a;
  --tooltip-text: #0d7c4b;
  box-shadow: 0 8px 26px rgba(97, 216, 154, 0.35);
}

.tooltip[data-theme="berry"] {
  --tooltip-bg: #ffe4ff;
  --tooltip-border: #ff6fe1;
  --tooltip-text: #9b007c;
  box-shadow: 0 8px 26px rgba(255, 111, 225, 0.35);
}

.tooltip[data-tone="big"] {
  font-size: 16px;
  padding: 12px 18px;
  letter-spacing: 0.5px;
}

.tooltip[data-tone="loud"] {
  font-size: 18px;
  padding: 14px 20px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

@keyframes tooltip-pop {
  0% { transform: translateX(-50%) scale(0.8); }
  60% { transform: translateX(-50%) scale(1.05); }
  100% { transform: translateX(-50%) scale(1); }
}

@keyframes confetti-burst {
  0% { opacity: 0; transform: translate(-50%, 15px) scale(0.2) rotate(-30deg); }
  45% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -45px) scale(1.05) rotate(25deg); }
}


@media (max-width: 480px) {
  .tooltip { font-size: 13px; bottom: calc(100% + 6px); }
  .bg-wrap { aspect-ratio: auto; height: auto; } 
}
