@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Shadows+Into+Light+Two&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Indie+Flower&family=Just+Another+Hand&display=swap');

@font-face {
  font-family: "CustomFont1";
  src: url(../asset/fonts/KGSimplytheBest.otf) format("opentype");
}

/* === RESET === */
html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
  overflow: hidden;
  font-family: "CustomFont1", sans-serif;
}

/* === CONTAINER === */
#viewport {
  width: 100vw;
  height: calc(var(--vh, 1vh) * 100);
  overflow: hidden;
  position: relative;
}

/* === GRID SETUP === */
#grid {
  display: grid;
  grid-template-columns: repeat(5, 100vw);
  grid-template-rows: repeat(2, calc(var(--vh, 1vh) * 100));
  width: calc(5 * 100vw);
  height: calc(2 * calc(var(--vh, 1vh) * 100));
  transition: transform 1.2s ease-in-out;
}


/* === GRID CELL === */
.cell {
  width: 100vw;
  height: calc(var(--vh, 1vh) * 100);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3vh;
  font-weight: bold;
  position: relative;
  background: url("../asset/images/background2.webp") center/cover no-repeat;
  flex-direction: column;
}

/* Per-cell overlay images using ::before */
.cell::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: none;
}

/* === FOOTER === */
footer {
  position: fixed;
  left: 0;
  width: 100%;
  z-index: 10;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: space-between;
  align-items: center;
  bottom: 0;
  font-size: 2vh;
  color: white;
  padding: 0.5vw 0;
}

footer a {
  color: white;
  padding: 0 4px;
}

/* === LOADER === */
#loader {
  position: fixed;
  z-index: 9999;
  background: #fff;
  width: 100vw;
  height: 100vh;
  top: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.spinner {
  border: 0.6vw solid #eee;
  border-top: 0.6vw solid #c10d4d;
  border-radius: 50%;
  width: 4vw;
  height: 4vw;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

#loader .loader-text {
  display: block;
  margin-top: 2vh;
  font-family: "Shadows Into Light Two", cursive;
  font-size: 2vw;
  font-weight: bold;
  color: #c10d4d;
  letter-spacing: 0.2vw;
  text-align: center;
}