@charset "UTF-8";

/* さくら + 光 + 宝石 */

.cherry-blossom-container {
  position: relative;
  height: 100vh;
  width: 100%;
  overflow: hidden;
}

#container {
  position: relative;
  height: 100%;
  width: 100%;
  overflow: hidden;
}

/* 桜 */
.petal {
  position: absolute;
  background-color: #ffc0cb;
  border-radius: 150% 0 150% 0;
  animation: animate-petal 10s linear;
}

.petal::after {
  content: "";
  position: absolute;
  top: -14%;
  left: -10%;
  display: block;
  width: 100%;
  height: 100%;
  background-color: #ffc0cb;
  border-radius: 150% 0 150% 0;
  transform: rotate(15deg);
}

/* 光 */
.sparkle {
  position: absolute;
  width: 2px;
  height: 14px;
  background: linear-gradient(to bottom, rgba(255, 240, 102, 1), rgba(255, 240, 102, 0.6));
  border-radius: 2px;
  box-shadow: 0 0 6px rgba(255, 240, 102, 0.8), 0 0 12px rgba(255, 240, 102, 0.5);
  animation: animate-particle 10s linear;
}

.sparkle::before {
  content: "";
  position: absolute;
  width: 12px;
  height: 2px;
  background: linear-gradient(to right, rgba(255, 240, 102, 1), rgba(255, 240, 102, 0.6));
  border-radius: 2px;
  top: 50%;
  left: -5px;
}

/* 宝石 */
.jewel {
  position: absolute;
  width: 50px;
  height: 60px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  background-image: url('images/sakura-jewel.png');
  filter:
    drop-shadow(0 1px 2px rgba(255,255,255,.28))
    drop-shadow(0 0 5px rgba(255, 220, 120, .3));
  animation: animate-jewel 11s linear;
  z-index: 25;
}

/* 花びら */
@keyframes animate-petal {
  0% {
    top: 0;
    opacity: 0;
    transform: rotate(0deg);
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    top: 100vh;
    transform: rotate(3000deg);
  }
}

/* 光 */
@keyframes animate-particle {
  0% {
    top: 0;
    opacity: 0;
    transform: translateX(0) rotate(0deg);
  }
  10% {
    opacity: 1;
  }
  50% {
    transform: translateX(20px) rotate(180deg);
  }
  90% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    top: 100vh;
    transform: translateX(-20px) rotate(360deg);
  }
}

/* 宝石はシマエナガ寄りのゆらぎ */
@keyframes animate-jewel {
  0%   { top: 0;     opacity: 0; transform: translateX(0) rotate(-8deg); }
  10%  { opacity: 1; }
  50%  {              transform: translateX(12px) rotate(8deg); }
  90%  { opacity: 1; }
  100% { top: 100vh; opacity: 0; transform: translateX(-12px) rotate(-8deg); }
}
