/* Pacifico-Regular — chữ chúc canvas (imageFly.js); file trong assets/fonts */
@font-face {
  font-family: "Pacifico-Regular";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/Pacifico-Regular.ttf") format("truetype");
}

body.scene-imagefly {
  overflow: hidden;
}

#image-fly-screen {
  position: fixed;
  inset: 0;
  z-index: 25;
  width: 100%;
  min-height: 100dvh;
  margin: 0;
  padding: 0;
  /* Nền do WebGL #cake-background vẽ; tránh lớp đen che canvas dưới */
  background: transparent;
  box-sizing: border-box;
}

#image-fly-screen #cake-background {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
}

#image-fly-screen #cake-background canvas {
  display: block;
  width: 100%;
  height: 100%;
}

#image-fly-screen #canvas {
  position: fixed;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100vw;
  height: 100vh;
  pointer-events: auto;
  touch-action: manipulation;
  cursor: pointer;
}

/* Tránh display:grid “thắng” [hidden] — bắt buộc ẩn hết khi load xong */
#imagefly-load-overlay[hidden],
.imagefly-load-overlay[hidden] {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.imagefly-load-overlay {
  position: fixed;
  inset: 0;
  /* Trên toàn bộ .page-stack (z-index 10) và #image-fly-screen (25) */
  z-index: 99999;
  display: grid;
  place-items: center;
  padding: 24px;
  box-sizing: border-box;
  background: radial-gradient(
      ellipse 120% 80% at 50% 40%,
      rgba(255, 250, 252, 0.97) 0%,
      rgba(255, 228, 241, 0.94) 45%,
      rgba(248, 196, 224, 0.9) 100%
    ),
    rgba(40, 12, 32, 0.35);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.imagefly-load-card {
  width: min(360px, 100%);
  text-align: center;
  padding: 28px 24px 24px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 20px 56px rgba(160, 51, 110, 0.28),
    0 0 0 1px rgba(255, 182, 213, 0.6);
}

.imagefly-load-title {
  margin: 0 0 8px;
  font-size: 1.15rem;
  font-weight: 700;
  color: #b8326e;
  letter-spacing: 0.02em;
}

.imagefly-load-sub {
  margin: 0 0 20px;
  font-size: 0.88rem;
  line-height: 1.45;
  color: #8e3a62;
  opacity: 0.95;
}

.imagefly-load-track {
  height: 10px;
  border-radius: 999px;
  background: rgba(200, 53, 121, 0.15);
  overflow: hidden;
  margin-bottom: 12px;
}

.imagefly-load-bar {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff7eb9 0%, #ff5fa8 45%, #e91e8c 100%);
  transition: width 0.22s ease-out;
  box-shadow: 0 0 12px rgba(255, 95, 168, 0.55);
}

.imagefly-load-pct {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: #c83579;
}
