html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: none;
  background-color: #2c3e50;
  font-family: sans-serif;
}

#container {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  touch-action: none;
}

#start-btn {
  position: absolute;
  bottom: 10%;
  left: 50%;
  transform: translateX(-50%);
  padding: 15px 40px;
  font-size: 20px;
  background: #E63946;
  color: white;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  z-index: 100;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s;
}

#start-btn:hover {
  transform: translateX(-50%) scale(1.05);
}

.text-source-host {
  position: absolute;
  visibility: hidden;
  pointer-events: none;
}

.card-copy {
  box-sizing: border-box;
  width: 440px;
  color: #29221d;
  font-family: "Caveat", "Segoe Print", "Comic Sans MS", cursive;
  font-size: 22px;
  font-weight: 500;
  line-height: 1.08;
}

.card-copy h2 {
  margin: 10px 0 6px;
  font-size: 30px;
  font-weight: 600;
  line-height: 1;
  text-align: center;
  color: #0064E9;
}

.card-copy--right {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.card-copy--right p {
  margin: 0;
}

.card-copy--mario {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 390px;
  text-align: center;
}

.card-copy--mario-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  transform: rotate(180deg);
}

.image-zoom-trigger {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 360px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #29221d;
  font: inherit;
  cursor: zoom-in;
}

.image-zoom-trigger img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: #fff;
  box-shadow: 0 3px 12px rgba(41, 34, 29, 0.25);
}

.image-zoom-trigger span {
  margin-top: 5px;
  font-size: 18px;
  line-height: 1;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.card-copy--mario h2 {
  margin: 7px 0 0;
}

#credits-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  font-size: 24px;
  font-weight: bold;
  background: #E63946;
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  z-index: 100;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s;
}

#credits-btn:hover {
  transform: scale(1.1);
}

#credits-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 200;
  justify-content: center;
  align-items: center;
}

#image-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: 48px 20px 20px;
  background: rgba(0, 0, 0, 0.86);
  cursor: zoom-out;
}

#image-modal[hidden] {
  display: none;
}

#image-modal-image {
  display: block;
  max-width: min(100%, 1100px);
  max-height: 100%;
  object-fit: contain;
  background: #fff;
  cursor: default;
}

#image-modal-close {
  position: absolute;
  top: 16px;
  right: 20px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: #29221d;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}

.modal-content {
  background: white;
  padding: 30px;
  border-radius: 15px;
  text-align: center;
  max-width: 400px;
  position: relative;
}

.close-modal {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 24px;
  cursor: pointer;
  color: #333;
}

#controls {
  position: absolute;
  bottom: 20px;
  right: 20px;
  display: none;
  align-items: center;
  gap: 10px;
  z-index: 100;
}

#next-page-btn {
  position: fixed;
  left: 50%;
  bottom: 24px;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  padding: 0;
  transform: translateX(-50%);
  border: 0;
  border-radius: 50%;
  background: #E63946;
  color: white;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  cursor: pointer;
  z-index: 110;
}

#next-page-btn[hidden] {
  display: none;
}

#next-page-btn svg {
  display: block;
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

#next-page-btn:hover {
  background: #d92f3d;
}

.control-btn {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  padding: 0;
  background: #E63946;
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s;
}

.control-btn:hover {
  transform: scale(1.1);
}

#mute-btn .control-icon {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

#reload-btn {
  font-size: 24px;
}

#mute-btn[data-playing="true"] .icon-play,
#mute-btn[data-playing="false"] .icon-pause {
  display: none;
}

#loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #0064E9;
  z-index: 2000;
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
  font-size: 24px;
  transition: opacity 1.5s ease-in-out;
}

@media (max-width: 767px) {
  #controls {
    left: 0;
    right: 0;
    justify-content: center;
  }
}
