/* ---------- base ---------- */
@font-face {
  font-family: "W95FA";
  src: url("W95FA.otf") format("opentype");
  font-weight: normal;
  font-style: normal;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: #6B8994;
  font-family: "W95FA", "MS Sans Serif", "Tahoma", Geneva, sans-serif;
  color: #000;
  overflow-x: hidden;
  min-height: 100vh;
}

/* ---------- main stage ---------- */
#stage {
  position: relative;
  width: 100%;
  min-height: 100vh;
  padding: 40px 20px 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  transition: opacity 0.2s ease;
}

/* ---------- load-in animations ---------- */
@keyframes slide-from-top {
  0%   { opacity: 0; transform: translateY(-120vh) rotate(-20deg); }
  100% { opacity: 1; transform: translateY(0) rotate(-4deg); }
}
@keyframes slide-from-bottom {
  0%   { opacity: 0; transform: translateY(120vh); }
  100% { opacity: 1; transform: translateY(0); }
}
@keyframes slide-from-left {
  0%   { opacity: 0; transform: translateX(-120vw); }
  100% { opacity: 1; transform: translateX(0); }
}
@keyframes slide-from-right {
  0%   { opacity: 0; transform: translateX(120vw); }
  100% { opacity: 1; transform: translateX(0); }
}
@keyframes pop-in {
  0%   { opacity: 0; transform: scale(0); }
  70%  { opacity: 1; transform: scale(1.2); }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes fade-in {
  0%   { opacity: 0; }
  100% { opacity: 1; }
}

/* ---------- logo ---------- */
.logo {
  width: min(640px, 70vw);
  height: auto;
  transform: rotate(-4deg);
  margin-top: 10px;
  margin-bottom: -30px;
  pointer-events: none;
  user-select: none;
  animation: slide-from-top 0.9s cubic-bezier(.2,.9,.3,1.2) both;
}

/* ---------- characters ---------- */
.characters {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 0;
  margin-top: 10px;
  position: relative;
  z-index: 1;
}

.char-group {
  width: min(900px, 85vw);
  height: auto;
  object-fit: contain;
  image-rendering: -webkit-optimize-contrast;
  user-select: none;
  pointer-events: none;
  position: relative;
  animation: slide-from-bottom 0.7s cubic-bezier(.2,.8,.3,1.1) both;
  animation-delay: 0.45s;
}

/* ---------- welcome box ---------- */
.welcome-box {
  position: relative;
  z-index: 2; /* above characters */
  margin-top: -18px; /* overlap bottom ~8% of 228px characters */
  animation: slide-from-left 0.8s cubic-bezier(.2,.8,.3,1.1) both;
  animation-delay: 1s;
  background: #d9d9d9;
  border: 3px solid #000;
  box-shadow:
    inset -3px -3px 0 #7a7a7a,
    inset  3px  3px 0 #ffffff,
    5px 5px 0 #000;
  padding: 18px 40px;
  min-width: 955px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 0.2px;
  text-align: center;
}

.welcome-new {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 77px;
  height: auto;
  pointer-events: none;
}

.welcome-text {
  color: #000;
}

/* ---------- enter button ---------- */
#enter-btn {
  margin-top: 70px;
  position: relative;
  display: inline-block;
  cursor: pointer;
  animation: pop-in 0.6s cubic-bezier(.2,.9,.3,1.4) both;
  animation-delay: 1.4s;
  transition: transform 0.1s ease;
}

#enter-btn img {
  width: 320px;
  height: auto;
  display: block;
}

#enter-btn:hover { transform: scale(1.06); }
#enter-btn:active { transform: scale(0.96); }

.coming-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "W95FA", "MS Sans Serif", "Tahoma", Geneva, sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: #000;
  text-transform: uppercase;
  letter-spacing: 2px;
  pointer-events: none;
}

/* ---------- bottom NEW banner ---------- */
.new-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 48px;
  background-image: url("new.gif");
  background-repeat: repeat-x;
  background-size: auto 100%;
  z-index: 50;
  pointer-events: none;
  border-top: 1px solid #000;
  animation: slide-from-bottom 0.7s ease-out both;
  animation-delay: 1.6s;
}

/* ---------- floating gif layer ---------- */
.float-layer {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 9999; /* above everything */
}

.floater {
  position: absolute;
  will-change: transform;
  user-select: none;
  pointer-events: none;
}

/* drift animation: pure CSS — JS sets per-element duration/delay/translate vars */
@keyframes drift {
  0%   { transform: translate(0, 0)        rotate(0deg); }
  25%  { transform: translate(20px, -15px) rotate(8deg); }
  50%  { transform: translate(-10px, 18px) rotate(-6deg); }
  75%  { transform: translate(15px, 10px)  rotate(4deg); }
  100% { transform: translate(0, 0)        rotate(0deg); }
}

.floater {
  animation: drift var(--dur, 6s) ease-in-out infinite,
             fade-in 0.6s ease-out both;
  animation-delay: var(--delay, 0s), 1.8s;
}

/* ---------- explosion ---------- */
@keyframes explode-piece {
  0%   { transform: translate(0,0) rotate(0deg) scale(1); opacity: 1; }
  100% { transform: translate(var(--tx), var(--ty)) rotate(var(--tr)) scale(0.4); opacity: 0; }
}

.exploding {
  animation: explode-piece 1s cubic-bezier(.2,.7,.3,1) forwards !important;
}

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

/* ---------- responsive tweaks ---------- */
@media (max-width: 640px) {
  .char-group { width: 90vw; }
  .welcome-box { min-width: 0; width: 90%; font-size: 14px; padding: 10px 16px 10px 56px; margin-top: -6px; }
  .welcome-new { width: 34px; left: 10px; }
  .logo { width: 80vw; margin-bottom: -18px; }
  #enter-btn { max-width: 90vw; }
  #enter-btn img { width: 100%; max-width: 260px; }
  .coming-text { font-size: 14px; letter-spacing: 1px; }
}
