﻿/*紙吹雪のスタイル*/
.confetti {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
}
  
.confetti span {
    position: absolute;
    top: -100%;/*アニメーション以外の紙吹雪を非表示*/
    left: 0;
}
  
/*アニメーションの記述*/
.confetti span:nth-child(2n + 1) {
    animation: confetti1 3s 0s linear infinite;
}
  
.confetti span:nth-child(2n + 2) {
    animation: confetti2 3s 0s linear infinite;
}
@media (min-width: 769px){
    .confetti span:nth-child(2n + 1) {
        animation: confetti1 6s 0s linear infinite;
    }
      
    .confetti span:nth-child(2n + 2) {
        animation: confetti2 6s 0s linear infinite;
    }
}
  
/*紙吹雪を回転させる記述*/
@keyframes confetti1 {
    0% {
        top: -10%;
        transform: translateX(0) rotateX(0) rotateY(0);
    }
    100% {
        top: 100%;
        transform: translateX(50vw) rotateX(180deg) rotateY(180deg);
    }
}
  
@keyframes confetti2 {
    0% {
        top: -10%;
        transform: translateX(0) rotateX(0) rotateY(0);
    }
    100% {
        top: 100%;
        transform: translateX(80vw) rotateX(180deg) rotateY(180deg);
    }
}
  
/*紙吹雪の配置*/
.confetti span:nth-child(1) {
    left: 0%;
}
  
.confetti span:nth-child(2) {
    left: 10%;
}
  
.confetti span:nth-child(3) {
    left: 20%;
}
  
.confetti span:nth-child(4) {
    left: 30%;
}
 
.confetti span:nth-child(5) {
    left: 40%;
}
  
.confetti span:nth-child(6) {
    left: 50%;
}
  
.confetti span:nth-child(7) {
    left: 60%;
}
  
.confetti span:nth-child(8) {
    left: 70%;
}
  
.confetti span:nth-child(9) {
    left: -40%;
}
  
.confetti span:nth-child(10) {
    left: -30%;
}
  
.confetti span:nth-child(11) {
    left: -20%;
}

.confetti span:nth-child(12) {
    left: -10%;
}

.confetti span:nth-child(13) {
    left: 15%;
}

.confetti span:nth-child(14) {
    left: 25%;
}

.confetti span:nth-child(15) {
    left: 35%;
}

.confetti span:nth-child(16) {
    left: 45%;
}

.confetti span:nth-child(17) {
    left: 55%;
}

.confetti span:nth-child(18) {
    left: 65%;
}
  
/*紙吹雪の大きさ*/
.confetti span:nth-child(3n + 1) {
    width: 6vw;
    height: 6vw;
}
  
.confetti span:nth-child(3n + 2) {
    width: 4vw;
    height: 4vw;
}
  
.confetti span:nth-child(3n + 3) {
    width: 3vw;
    height: 3vw;
}
@media (min-width: 769px){
    .confetti span:nth-child(3n + 1) {
        width: 3vw;
        height: 3vw;
    }
      
    .confetti span:nth-child(3n + 2) {
        width: 2vw;
        height: 2vw;
    }
      
    .confetti span:nth-child(3n + 3) {
        width: 1.5vw;
        height: 1.5w;
    }
}
  
/*紙吹雪の色*/
.confetti span:nth-child(2n + 1) {
    background: url(../img/flower/flower1.svg) no-repeat center/contain;
}
  
.confetti span:nth-child(2n + 2) {
    background: url(../img/flower/flower2.svg) no-repeat center/contain;
}
  
.confetti span:nth-child(2n + 3) {
    background: url(../img/flower/flower3.svg) no-repeat center/contain;
}
  
.confetti span:nth-child(2n + 4) {
    background: url(../img/flower/flower4.svg) no-repeat center/contain;
}
  
.confetti span:nth-child(2n + 5) {
    background: url(../img/flower/flower5.svg) no-repeat center/contain;
}
  
.confetti span:nth-child(2n + 6) {
    background: url(../img/flower/flower6.svg) no-repeat center/contain;
}
/*  
.confetti span:nth-child(2n + 7) {
    background: url(../img/flower/flower7.svg) no-repeat center/contain;
}
*/
  
/*アニメーションの秒数*/
.confetti span:nth-child(2n + 1) {
    animation-duration: 7.5s;
}
  
.confetti span:nth-child(2n + 2) {
    animation-duration: 9s;
}
  
.confetti span:nth-child(2n + 3) {
    animation-duration: 15s;
}
  
.confetti span:nth-child(2n + 4) {
    animation-duration: 6s;
}
@media (min-width: 769px){
    .confetti span:nth-child(2n + 1) {
        animation-duration: 10s;
    }
      
    .confetti span:nth-child(2n + 2) {
        animation-duration: 12s;
    }
      
    .confetti span:nth-child(2n + 3) {
        animation-duration: 20s;
    }
      
    .confetti span:nth-child(2n + 4) {
        animation-duration: 8s;
    }
}
  
  
/*紙吹雪が降り始めるまでの時間*/
.confetti span:nth-child(2n + 1) {
    animation-delay: 0s;
}
  
.confetti span:nth-child(2n + 2) {
    animation-delay: 4s;
}
  
.confetti span:nth-child(2n + 3) {
    animation-delay: 6s;
}
  
.confetti span:nth-child(2n + 4) {
    animation-delay: 2s;
}
  
.confetti span:nth-child(2n + 5) {
    animation-delay: 6s;
}
  
.confetti span:nth-child(2n + 6) {
    animation-delay: 10s;
}
  
.confetti span:nth-child(2n + 7) {
    animation-delay: 2s;
}
  
.confetti span:nth-child(2n + 8) {
    animation-delay: 4s;
}
  
.confetti span:nth-child(2n + 9) {
    animation-delay: 11s;
}
  
.confetti span:nth-child(2n + 10) {
    animation-delay: 1s;
}
  
.confetti span:nth-child(2n + 11) {
    animation-delay: 5s;
}