@import url('https://fonts.googleapis.com/css2?family=M+PLUS+Rounded+1c:wght@400;700&display=swap');

.lottery {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-family: "M PLUS Rounded 1c", sans-serif;
}

.lottery .container {
  z-index: 1;
}

.lottery-title {
    animation: dropDown 1s ease-out both;
}

.lottery-title img {
  max-width: 100%;
}

@keyframes dropDown {
    0% {
        transform: translateY(-50px);
    }

    65% {
        transform: translateY(10px);
    }

    100% {
        transform: translateY(0);
    }
}

.wheel {
    display: block;
    position: relative;
    width: 280px;
    height: 280px;
    margin: 20px auto 60px;
}

.wheel-spin {
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 1;
}

.wheel-spin img {
  max-width: 100%;
}

.wheel.animate .wheel-spin {
    animation: spin 1.5s .1s cubic-bezier(0.65, 0, 0.35, 1);
}

.wheel.skipped .wheel-spin {
    animation: none;
}

.wheel-base {
    position: relative;
    top: -25px;
    left: -25px;
}

.wheel-base img {
  max-width: 60%;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.wheel-ball {
    position: absolute;
    left: calc(50% - 90px);
    top: 50%;
    width: 30px;
    height: 30px;
    border-radius: 50%;
}

.wheel-ball.animate {
    animation: drop .5s 2.5s ease-out both;
}

.wheel-ball.skipped {
    animation: drop 0s both;
}

@keyframes drop {
    60% {
        top: calc(100% - 10px);
    }

    95% {
      top: calc(100% - 20px);
    }

    100% {
        top: calc(100% - 10px);
    }
}

.lottery-button {
    margin: 10px auto 10px;
    padding: 8px 80px;
    border-radius: 12px;
    background: linear-gradient(180deg, #EC5E6B 0%, #EC5E6B 50%, #D3594E 50%, #D3594E 100%);
    cursor: pointer;
    font-size: 32px;
    font-weight: 700;
    color: #fff;
    transition: all ease .5s;
  }

.lottery-button:not(:disabled):hover {
    transform: scale(.97);
}

.lottery-button:disabled {
    cursor: default;
    opacity: .3;
}

.information {
  height: 0;
  margin-top: 10px;
  opacity: 0;
  overflow: hidden;
}

.information.show {
  animation: fade-in 1s 3s ease-in-out forwards;
}

.information.skipped {
  animation: fade-in 0s ease-in-out forwards;
}

.ribbon {
  height: 64px;
  padding: 12px 20px;
  background: #E85764;
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  text-shadow: 2px 3px 3px rgba(0, 0, 0, 0.4);
  line-height: 1;
  display: inline-block;
  position: relative;
}

.ribbon::before,
.ribbon::after {
  content: "";
  width: 32px;
  height: 50px;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: url(/media/img/ribbon_edge.svg) no-repeat left center;
}

.ribbon::before {
  left: -32px;
}

.ribbon::after {
  right: -32px;
  transform: translateY(-50%) rotate(180deg);
}

.ribbon small {
  font-size: 14px;
}

.ribbon span {
  word-break: keep-all;
}

@keyframes fade-in {
  0% {
    opacity: 0;
    height: 0;
  }
  100% {
    opacity: 1;
    height: 100%;
  }
}

@keyframes spread {
  20% {
    width: 0;
  }
  80% {
    width: 100%;
  }
}

.result {
    position: absolute;
    top: 52%;
    left: 50%;
    text-align: center;
    z-index: 3;
    transform: scale(0) translate(50%, 50%);
}

.result.win {
    color: #e71d23;
    animation: win .8s 3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.result.win.skipped {
    animation: win 0s 0s forwards;
}

.result.lose {
    color: #000;
    animation: lose 1s 3s ease-in-out forwards;
}

.result.lose.skipped {
    animation: lose 0s 0s forwards;
}

@keyframes win {
    0% {
      transform: translate(-50%, -50%) scale(0);
    }
    25% {
      transform: translate(-50%, -50%) scale(2);
    }
    50% {
      transform: translate(-50%, -50%) scale(0.7);
    }
    100% {
      transform: translate(-50%, -50%) scale(1);
    }
}

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

    20% {
        transform: translate(-50%, -50%) scale(1);
    }

    100% {
        transform: translate(-50%, -50%) scale(1);
    }
}

.confetti-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.confetti {
    position: absolute;
    top: 0;
    width: 10px;
    height: 10px;
    background-color: var(--color);
    opacity: 0;
    animation: fall ease-out forwards infinite;
}

@keyframes fall {
    0% {
    transform: translateY(-150%);
    opacity: 1;
    }
    100% {
    transform: translateY(100vh) rotate(360deg);
    opacity: 1;
    }
}

.close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  background: url(/media/img/close_black.svg) no-repeat;
  background-size: contain;
  z-index: 2;
}

/* SP: ダイアログのstyleを無効化 */
@media only screen and (max-width:599px) {
    .v-dialog {
        margin: 0;
        box-shadow: none;
        overflow-x: hidden;
    }
    .v-dialog:not(.v-dialog--fullscreen) {
        max-height: 100%;
    }
    .theme--light.v-card {
        background: transparent;
    }
    .lottery-title,
    .close-btn.theme--light.v-btn,
    .information {
      color: #fff;
    }
    .v-sheet.v-card:not(.v-sheet--outlined) {
        box-shadow: none;
    }
    .lottery {
        width: 100%;
        min-height: 100vh;
    }
    .close-btn {
      width: 48px;
      height: 48px;
      background: url(/media/img/close_white.svg) no-repeat;
      background-size: contain;
    }
}
