:root {
  --font: "Zen Maru Gothic", sans-serif;
}

body {
  margin: 0;
  font-family: sans-serif;
}

#bg,
#start-wrapper {
  background-color: #fff;
  left: 0;
  height: 100dvh;
  position: fixed;
  top: 0;
  width: 100dvw;
  z-index: -1;
}
#bg::before,
#start-wrapper::before {
  animation: bgloop 120s linear infinite;
  background-image: url(img/background-repeat.png);
  background-repeat: repeat;
  background-size: 5%;
  content: "";
  display: block;
  height: 1000dvh;
  left: -50%;
  opacity: 0.3;
  position: absolute;
  top: -50%;
  width: 1000dvw;
}
@keyframes bgloop {
  0% {
    transform: translate(-50%, 0);
  }
  100% {
    transform: translate(0, -50%);
  }
}
@media screen and (max-width: 768px) {
  #bg::before,
  #start-wrapper::before {
    animation: bgloop 80s linear infinite;
    background-size: 15%;
  }
}

h1 {
  font-family: var(--font);
  font-weight: 700;
  font-style: normal;
  font-size: clamp(30px, 9vw, 40px);
  text-align: center;
}
h1 span {
  display: block;
  font-size: 16px;
  font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN",
    "Hiragino Sans", Meiryo, sans-serif;
}
button {
  background-color: #f05a50;
  border-radius: 6px;
  color: #fff;
  font-family: var(--font);
  font-weight: 700;
  margin-top: 20px;
  padding: 0.25em 1em;
}
a {
  color: #0000ff;
  font-family: var(--font);
  font-weight: 500;
  font-size: 16px;
}
a:hover {
  text-decoration: none;
}
p {
  font-family: var(--font);
  font-weight: 500;
  font-size: 16px;
  text-align: center;
}
p span {
  display: block;
  font-size: 12px;
}

#start-wrapper {
  z-index: 99;
}
#start-wrapper .-inner {
  align-items: center;
  display: flex;
  height: 100%;
  flex-direction: column;
  gap: 30px;
  justify-content: center;
  position: relative;
}
#start-wrapper button {
  background-color: #fff;
  border: 3px solid #f05a50;
  color: #f05a50;
  font-family: var(--font);
  font-size: 20px;
  font-weight: 800;
  margin: 0;
  padding: 0.5em 2em;
}

.slot-wrapper {
  max-width: 750px;
  margin: 40px auto;
  text-align: center;
}
.e-title {
  max-width: 300px;
}
.e-copy {
  margin-bottom: 2em;
}
.e-copy img {
  height: 2em;
}

.reels {
  background-color: #f4f4f4;
  border: 2px solid #bbb;
  display: flex;
  height: 365px;
  gap: 10px;
  justify-content: center;
  overflow: hidden;
  padding: 0 10px;
  position: relative;
}

.reel {
  background: #fff;
  border: 2px solid #333;
  height: 450px;
  overflow: hidden;
  position: relative;
  top: -50px;
  width: 150px;
}

.symbol {
  align-items: center;
  border-bottom: 1px solid #ddd;
  display: flex;
  font-weight: bold;
  font-size: 18px;
  height: 150px;
  justify-content: center;
}

.symbol img {
  max-width: 100%;
  height: auto;
}

.payline {
  position: absolute;
  top: 100px;
  left: 0;
  right: 0;
  height: 150px;
  border-top: 5px solid #df3333aa;
  border-bottom: 5px solid #df3333aa;
  pointer-events: none;
}

#startBtn {
  margin-top: 20px;
  padding: 10px 30px;
  font-size: 18px;
}
#startBtn.m-disable {
  background-color: #bbb;
  pointer-events: none;
}

/* 当選演出 */
.win .payline {
  animation: flash 0.18s alternate 5;
}

@keyframes flash {
  from {
    background: rgba(255, 215, 0, 0.2);
  }
  to {
    background: rgba(255, 215, 0, 0.6);
  }
}

/* ハズレ演出 */
.lose {
  animation: shake 0.4s;
}

@keyframes shake {
  0% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px);
  }
  50% {
    transform: translateX(5px);
  }
  75% {
    transform: translateX(-5px);
  }
  100% {
    transform: translateX(0);
  }
}

/* モーダル */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  justify-content: center;
  align-items: center;
}

.modal-overlay.show {
  display: flex;
}

.modal {
  background: #fff;
  border: 6px solid #f05a50;
  padding: 20px;
  width: 90%;
  max-width: 400px;
  text-align: center;
}
.modal-content {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.modal h2 {
  color: #a33;
  font-family: var(--font);
  font-size: 22px;
  font-weight: 700;
}
.modal h2.m-lose {
  color: #33a;
  font-size: 18px;
}
.modal p {
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
}
.modal p span {
  display: block;
  font-size: 12px;
  margin-top: 0.5em;
  text-align: center;
}
.modal-content .msg {
  background-color: #f4f4f4;
  padding: 1em;
}
.modal-content .msg p {
  color: #f05a50;
  font-size: 18px;
  line-height: 1.76;
}
