@charset "UTF-8";

/*さくらヒラヒラCSS*/

/* 桜を表示するコンテナのスタイル */
.cherry-blossom-container {
  position: relative;
  height: 100vh; /* コンテナの高さ */
  width: 100%; /* コンテナの横幅 */
  overflow: hidden; /* コンテナからはみ出した要素を隠す */
}
#container {
  position: relative;
  /* height: 100vh; コンテナの高さ */
  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);
}

/* 雪の結晶のスタイル */
.snowflake {
  position: absolute;
  width: 12px;
  height: 12px;
  background-color: #f2f5ff; /* 雪の色 */
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
  animation: animate-petal 10s linear; /* 同じアニメーションを使用 */
}

/* 縦長の光の粒子 */
.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;    
}

/* 新緑の葉と四葉のクローバー */
.leaf, .clover {
  position: absolute;
  width: 32px;
  height: 32px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  animation: animate-particle 10s linear;
}

.leaf {
  background-image: url('images/leaf.png');
}

.clover {
  background-image: url('images/clover.png');
}

/* 青い鳥と秋の葉 */
.autumn-leaf, .blue-bird {
  position: absolute;
  width: 32px;
  height: 32px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  animation: animate-particle 10s linear;
}

.autumn-leaf {
  background-image: url('images/autumn_leaf.png');
}

.blue-bird {
  background-image: url('images/blue_bird.png');
}

/* 花びらと雪が降るアニメーション */
@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);
  }
}
