@font-face {
  font-family: 'Noto Sans';
  src:
    url('../fonts/NotoSans-Medium.woff2') format('woff2'),
    url('NotoSans-Medium.woff') format('woff');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Noto Sans';
  src:
    url('../fonts/NotoSans-Regular.woff2') format('woff2'),
    url('NotoSans-Regular.woff') format('woff');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Noto Sans';
  src:
    url('../fonts/NotoSans-Bold.woff2') format('woff2'),
    url('NotoSans-Bold.woff') format('woff');
  font-weight: bold;
  font-style: normal;
  font-display: swap;
}

:root {
  --vh: 1vh;
  --app-height: 100vh;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  height: var(--app-height, 100vh);
  height: 100dvh;
  overflow: hidden;
  font-family:
    'Noto Sans',
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    Roboto,
    sans-serif;
  overscroll-behavior: none;
  -webkit-user-select: none;
  user-select: none;
  touch-action: none;
}

.game-page {
  width: 100vw;
  height: 100vh;
  height: var(--app-height, 100vh);
  height: 100dvh;
  margin: 0;
  padding: 0;
  position: fixed;
  top: 0;
  left: 0;
  overflow: hidden;
  max-width: 2560px;
  margin: 0 auto;
}

#game-container {
  width: 100vw;
  height: 100vh;
  height: var(--app-height, 100vh);
  height: 100dvh;
  position: fixed;
  top: 0;
  left: 0;
  overflow: hidden;
  touch-action: manipulation;
  background: #ba0020;
}

#game-container canvas {
  display: block;
  width: 100%;
  height: 100%;
}

#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  height: var(--app-height, 100vh);
  height: 100dvh;
  background-color: #ba0020;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  transition: opacity 0.5s ease-out;
}

#preloader.hidden {
  opacity: 0;
  pointer-events: none;
}

.preloader-logo__wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
}

.preloader-logo__left {
  width: auto;
  max-height: 80px;
}

.preloader-logo__right {
  width: auto;
  max-height: 80px;
}

.preloader-bar__wrapper {
  width: 280px;
  height: 20px;
  border-radius: 10px;
  border: 2px solid #770518;
  margin-top: 32px;
  overflow: hidden;
  background: #770518;
}

.preloader-bar__fill {
  width: 0%;
  height: 100%;
  background: #ffffff;
  border-radius: 10px;
  transition: width 0.15s ease;
}

@media (max-width: 768px) {
  .preloader-logo__wrapper {
    gap: 16px;
  }
  .preloader-logo__left {
    max-height: 60px;
  }
  .preloader-logo__right {
    max-height: 60px;
  }
  .preloader-bar__wrapper {
    width: 220px;
    margin-top: 20px;
  }
}

#rotate-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  height: var(--app-height, 100vh);
  height: 100dvh;
  background-position: top;
  background-repeat: repeat-y;
  background-size: 100% auto;
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

.rotate-content {
  text-align: center;
  color: #fff;
}

.rotate-content.is-reverse {
  display: none;
  opacity: 0;
}

.rotate-content.is-reverse.show {
  display: block;
  animation: fade-in 0.3s forwards;
}

.rotate-icon {
  font-size: 80px;
  animation:
    fade-in 0.3s 0.5s forwards,
    rotate-phone 1.5s 0.5s ease-in-out infinite;
  margin-bottom: 20px;
  opacity: 0;
}
.rotate-content.is-reverse .rotate-icon {
  animation:
    fade-in 0.3s 0.5s forwards,
    rotate-phone-reverse 1.5s 0.5s ease-in-out infinite;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes rotate-phone {
  0%,
  100% {
    transform: rotate(0deg);
  }

  50% {
    transform: rotate(90deg);
  }
}

@keyframes rotate-phone-reverse {
  0%,
  100% {
    transform: rotate(90deg);
  }

  50% {
    transform: rotate(0deg);
  }
}

.rotate-text {
  font-size: 24px;
  color: #ba0020;
}

#rules-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  height: var(--app-height, 100vh);
  height: 100dvh;
  background: transparent;
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1500;
}

.rules-popup {
  background: #ba0020;
  border-radius: 20px;
  padding: 24px;
  max-width: 600px;
  position: relative;
  width: 90%;
  border: 2px solid #e0a526;
  margin: 24px;
}

.rules-popup__container {
  overflow-y: auto;
  max-height: 70vh;
  padding: 12px 0;
}

.rules-title {
  color: #e0a526;
  font-size: 28px;
  text-align: center;
  margin-bottom: 20px;
}

.rules-content {
  color: #fff;
  font-size: 16px;
  line-height: 1.25;
  white-space: pre-wrap;
}
.rules-content p {
  margin-bottom: 16px;
}
.rules-content p:last-child {
  margin-bottom: 0;
}
.rules-content ul {
  margin-left: 16px;
  padding-left: 8px;
  margin-bottom: 16px;
}

.rules-close {
  position: absolute;
  z-index: 10;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 48px;
  border: none;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
  right: 6px;
  top: 6px;
  cursor: pointer;
  background: #fff;
}

.rules-close__icon {
  display: block;
  width: 28px;
  height: 28px;
  flex-basis: 28px;
  fill: #ba0020;
}

#win-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  margin-top: 24px;
  margin-bottom: 24px;
  background: transparent;
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1500;
}

.win-popup {
  background: #eedebb;
  border-radius: 20px;
  position: relative;
  width: 90%;
  max-width: 600px;
  height: 100%;
  display: none;
  flex-direction: column;
  opacity: 0;
}

.win-popup .loading-image {
  z-index: 5;
}

.win-popup.show {
  display: flex;
  animation: fade-in 0.3s forwards;
  align-items: center;
  justify-content: center;
}
.loading-image {
  position: absolute;
  bottom: 0px;
  left: 0px;
  right: 0px;
  top: 0px;
  z-index: 30;
  display: -webkit-box;
  display: -webkit-flex;
  display: -moz-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  -moz-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  -moz-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
}
.b-loading {
  width: 32px;
  height: 32px;
  margin: auto;
  -webkit-animation: sk-chase 2.5s infinite linear both;
  animation: sk-chase 2.5s infinite linear both;
}
.b-loading--absolute {
  position: absolute;
  z-index: 2;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
}
.b-loading__dot {
  width: 100%;
  height: 100%;
  position: absolute;
  left: 0;
  top: 0;
  -webkit-animation: preloader__dot 2s infinite ease-in-out both;
  animation: preloader__dot 2s infinite ease-in-out both;
}
.b-loading__dot:before {
  content: '';
  display: block;
  width: 25%;
  height: 25%;
  border-radius: 100%;
  -webkit-animation: preloader__dot-before 2s infinite ease-in-out both;
  animation: preloader__dot-before 2s infinite ease-in-out both;
  --tw-bg-opacity: 1;
  background-color: rgb(227 6 19 / var(--tw-bg-opacity));
}
.b-loading__dot:nth-child(1) {
  -webkit-animation-delay: -1.1s;
  animation-delay: -1.1s;
}
.b-loading__dot:nth-child(2) {
  -webkit-animation-delay: -1s;
  animation-delay: -1s;
}
.b-loading__dot:nth-child(3) {
  -webkit-animation-delay: -0.9s;
  animation-delay: -0.9s;
}
.b-loading__dot:nth-child(4) {
  -webkit-animation-delay: -0.8s;
  animation-delay: -0.8s;
}
.b-loading__dot:nth-child(5) {
  -webkit-animation-delay: -0.7s;
  animation-delay: -0.7s;
}
.b-loading__dot:nth-child(6) {
  -webkit-animation-delay: -0.6s;
  animation-delay: -0.6s;
}
.b-loading__dot:nth-child(1):before {
  -webkit-animation-delay: -1.1s;
  animation-delay: -1.1s;
}
.b-loading__dot:nth-child(2):before {
  -webkit-animation-delay: -1s;
  animation-delay: -1s;
}
.b-loading__dot:nth-child(3):before {
  -webkit-animation-delay: -0.9s;
  animation-delay: -0.9s;
}
.b-loading__dot:nth-child(4):before {
  -webkit-animation-delay: -0.8s;
  animation-delay: -0.8s;
}
.b-loading__dot:nth-child(5):before {
  -webkit-animation-delay: -0.7s;
  animation-delay: -0.7s;
}
.b-loading__dot:nth-child(6):before {
  -webkit-animation-delay: -0.6s;
  animation-delay: -0.6s;
}
@-webkit-keyframes sk-chase {
  100% {
    -webkit-transform: rotate(360deg);
    transform: rotate(360deg);
  }
}
@keyframes sk-chase {
  100% {
    -webkit-transform: rotate(360deg);
    transform: rotate(360deg);
  }
}
@-webkit-keyframes preloader__dot {
  80%,
  100% {
    -webkit-transform: rotate(360deg);
    transform: rotate(360deg);
  }
}
@keyframes preloader__dot {
  80%,
  100% {
    -webkit-transform: rotate(360deg);
    transform: rotate(360deg);
  }
}
@-webkit-keyframes preloader__dot-before {
  50% {
    -webkit-transform: scale(0.4);
    transform: scale(0.4);
  }
  100%,
  0% {
    -webkit-transform: scale(1);
    transform: scale(1);
  }
}
@keyframes preloader__dot-before {
  50% {
    -webkit-transform: scale(0.4);
    transform: scale(0.4);
  }
  100%,
  0% {
    -webkit-transform: scale(1);
    transform: scale(1);
  }
}
.win-popup .loading-error {
  display: none;
}
.win-popup iframe {
  flex: 1;
  width: 100%;
  border: none;
  border-radius: 20px;
  position: relative;
  z-index: 10;
}

.win-close {
  position: absolute;
  z-index: 10;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 48px;
  border: none;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
  right: -24px;
  top: -24px;
  cursor: pointer;
  background: #ba0020;
}

.win-close__icon {
  display: block;
  width: 28px;
  height: 28px;
  flex-basis: 28px;
  fill: #ffffff;
}

#attempt-end-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  height: var(--app-height, 100vh);
  height: 100dvh;
  background: transparent;
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1500;
  padding: 20px;
  overflow-y: auto;
}

.attempt-end-popup {
  background: #ba0020;
  border-radius: 20px;
  padding: 24px;
  max-width: 600px;
  width: 90%;
  border: 2px solid #e0a526;
  position: relative;
  margin: 32px;
}

.attempt-end-popup__container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.attempt-end-score {
  color: #e0a526;
  font-family: 'Noto Sans', sans-serif;
  font-size: 36px;
  font-weight: bold;
  text-align: center;
}

.attempt-end-hearts {
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}

.attempt-end-hearts img {
  width: 48px;
  height: auto;
}

@media (orientation: portrait) {
  .attempt-end-hearts img {
    width: 32px;
  }
}

.attempt-end-attempts {
  color: #eedebb;
  font-family: 'Noto Sans', sans-serif;
  font-size: 20px;
  text-align: center;
}

.attempt-end-btn {
  background: #4caf50;
  color: #eedebb;
  font-family: 'Noto Sans', sans-serif;
  font-size: 20px;
  font-weight: bold;
  border: none;
  margin-top: 24px;
  border-radius: 30px;
  padding: 14px 32px;
  cursor: pointer;
  transition: background 0.2s;
  width: 100%;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.attempt-end-btn:hover {
  background: #459949;
}

#cooldown-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  height: var(--app-height, 100vh);
  height: 100dvh;
  background: transparent;
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1500;
  padding: 20px;
  overflow-y: auto;
}

.cooldown-popup {
  background: #ba0020;
  border-radius: 20px;
  padding: 32px 24px;
  max-width: 600px;
  width: 90%;
  border: 3px solid #e0a526;
  position: relative;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  margin: 32px;
}

.cooldown-popup__container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
}

.cooldown-icon {
  font-size: 64px;
  line-height: 1;
}

.cooldown-message {
  color: #eedebb;
  font-family: 'Noto Sans', sans-serif;
  font-size: 24px;
  font-weight: bold;
  text-align: center;
}

.cooldown-score {
  color: #e0a526;
  font-family: 'Noto Sans', sans-serif;
  font-size: 32px;
  font-weight: bold;
  text-align: center;
}

.cooldown-timer {
  background: #960051;
  color: #eedebb;
  font-family: 'Noto Sans', sans-serif;
  font-size: 28px;
  font-weight: bold;
  text-align: center;
  border-radius: 15px;
  padding: 16px 40px;
  min-width: 220px;
  margin-top: 8px;
}

.cooldown-btn {
  background: #4caf50;
  color: #eedebb;
  font-family: 'Noto Sans', sans-serif;
  font-size: 20px;
  font-weight: bold;
  border: none;
  margin-top: 24px;
  border-radius: 30px;
  padding: 14px 32px;
  cursor: pointer;
  transition: background 0.2s;
  width: 100%;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.cooldown-btn:hover {
  background: #459949;
}

body.page-register2 {
  background-color: #ba0020;
}

body.page-register2.is-appeared {
  overflow: hidden;
}
body.page-register2.is-appeared .form-success {
  padding-left: 20px;
  padding-right: 20px;
}

body.page-register2.is-appeared .form-success .form-success-title {
  color: #e0a526;
}
body.page-register2.is-appeared
  .form-success
  .form-success-title
  .form-success-msg {
  color: #e0a526;
}
body.page-register2.is-appeared
  .form-success
  .form-success-title
  .form-success-msg
  p:last-child {
  color: #e0a526;
}
.rules-close-text__wrapper {
  display: flex;
  justify-content: center;
  margin-top: 24px;
}
.rules-close-text {
  background: #4caf50;
  color: #fff;
  font-family: 'Noto Sans', sans-serif;
  font-size: 20px;
  font-weight: bold;
  padding: 12px 24px;
  border-radius: 24px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}
.game-page .form-success-msg {
  display: flex;
  flex-flow: column;
  align-items: center;
  justify-items: center;
}
.form-success-msg a.button {
  display: none;
}
.game-page .form-success-msg a.button {
  margin-top: 24px;
  display: flex;
}
.page-register2 .form-success-msg {
  display: flex;
  flex-flow: column;
  align-items: center;
  justify-items: center;
}
.page-register2 .form-success-msg a.button {
  margin-top: 24px;
  display: flex;
}

.page-register2 .form-success {
  padding-left: 24px;
  padding-right: 24px;
}
.game-page .form-success {
  padding-left: 24px;
  padding-right: 24px;
}
