html,
body {
  width: 100%;
  height: 100%;
  background-color: var(--light-colour);
  overflow: hidden;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* -------------------------------------------------------------------------- */
/*                              REVEAL CONTAINER                              */
/* -------------------------------------------------------------------------- */

.reveal-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100vw;
  height: 100vh;
  height: 100svh;
}

/* -------------------------------------------------------------------------- */
/*                                TILES AREA                                  */
/* -------------------------------------------------------------------------- */

.reveal-tiles {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  align-content: center;
  gap: 0.75vmin;
  width: 100%;
  height: 90%;
  padding: 2vmin;
  box-sizing: border-box;
}

/* -------------------------------------------------------------------------- */
/*                                 TOOLBAR                                    */
/* -------------------------------------------------------------------------- */

.reveal-toolbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4vmin;
  width: 100%;
  height: 10%;
  background-color: var(--light-colour);
}

/* -------------------------------------------------------------------------- */
/*                               INDIVIDUAL TILE                              */
/* -------------------------------------------------------------------------- */

.reveal-tile {
  font-size: 3.5vmin;
  font-weight: 400;
  color: var(--dark-colour);
  text-align: center;
  padding: 1.5vmin 2.5vmin;
  background-color: var(--white-colour);
  border-radius: 1vmin;
  white-space: nowrap;
  border: 0.1vmin dashed rgba(0, 0, 0, 0.3);
  box-shadow: none;
  user-select: none;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    background-color 0.3s ease,
    color 0.3s ease,
    padding 0.4s ease-out,
    font-size 0.4s ease-out,
    width 0.4s ease-out,
    height 0.4s ease-out;
}

/* -------------------------------------------------------------------------- */
/*                          LETTER MODE (DYNAMIC SIZE)                        */
/* -------------------------------------------------------------------------- */

.reveal-tiles.letter-mode {
  flex-wrap: nowrap;
}

.reveal-tiles.letter-mode .reveal-tile {
  font-size: var(--tile-size, 5vw);
  padding: 0;
  width: calc(var(--tile-size, 5vw) * 2);
  height: calc(var(--tile-size, 5vw) * 2);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* -------------------------------------------------------------------------- */
/*                            HIDDEN / REVEALED                               */
/* -------------------------------------------------------------------------- */

.reveal-tile {
  position: relative;
}

.reveal-tile.hidden-tile .tile-text {
  visibility: hidden;
}

.reveal-tile.revealed .tile-text {
  visibility: visible;
}

/* Tile number label — visible on hidden tiles only */
.tile-number {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -45%);
  font-size: 2vmin;
  font-weight: 700;
  color: rgba(0, 0, 0, 0.4);
  pointer-events: none;
}

.reveal-tile.revealed .tile-number {
  display: none;
}

.reveal-tile.revealed {
  color: var(--dark-colour);
  background-color: var(--white-colour);
  border: 0.1vmin solid rgba(0, 0, 0, 0.15);
  box-shadow:
    rgba(9, 30, 66, 0.15) 0px 2px 4px -1px,
    rgba(9, 30, 66, 0.06) 0px 0px 0px 1px;
}

/* Pop animation when a tile is revealed */
.reveal-tile.just-revealed {
  animation: tile-pop 0.3s ease-out;
}

@keyframes tile-pop {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.15);
  }
  100% {
    transform: scale(1);
  }
}

/* -------------------------------------------------------------------------- */
/*                              HIGHLIGHTED TILE                              */
/* -------------------------------------------------------------------------- */

.reveal-tile.highlighted {
  background-color: var(--dark-colour);
  color: var(--light-colour);
  border-color: var(--dark-colour);
  box-shadow:
    rgba(0, 0, 0, 0.2) 0px 3px 6px,
    rgba(0, 0, 0, 0.15) 0px 0px 0px 1px;
}

.reveal-tile.highlighted .tile-text {
  color: var(--light-colour);
}

/* -------------------------------------------------------------------------- */
/*                               NAVIGATION                                   */
/* -------------------------------------------------------------------------- */

.reveal-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2vmin;
}

.reveal-counter {
  font-size: 2vmin;
  font-weight: 300;
  color: var(--dark-colour);
  min-width: 8vmin;
  text-align: center;
  opacity: 0.75;
}

#pause-btn,
#reveal-btn {
  padding: 1.5vmin 4vmin;
  min-width: 20vmin;
  font-size: 2vmin;
}

#reveal-btn.disabled,
#pause-btn.disabled {
  box-shadow: none;
  background-color: #ddd;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  border-bottom: 1px solid #fff;
  pointer-events: none;
  color: #ccc;
}

#next-btn,
#prev-btn {
  background-color: var(--dark-colour);
}

#next-btn svg,
#prev-btn svg {
  fill: var(--light-colour);
}

.dialog-note {
  position: absolute;
  top: 50%;
  line-height: 1.2;
  font-size: 1.5vmin !important;
}

.inactive {
  background-color: rgba(0, 0, 0, 0.2) !important;
  box-shadow: none !important;
  border-top: 2px solid rgba(0, 0, 0, 0.1) !important;
  border-bottom: 1px solid white !important;
  color: rgba(0, 0, 0, 0.3) !important;
  pointer-events: none;
}

/* -------------------------------------------------------------------------- */
/*                           RESPONSIVE ADJUSTMENTS                           */
/* -------------------------------------------------------------------------- */

@media (max-width: 600px) {
  .reveal-tile {
    font-size: 5vmin;
    padding: 2vmin 3vmin;
  }

  .reveal-counter {
    font-size: 3.5vmin;
  }
}
