@font-face {
  font-family: 'IBM Plex Mono';
  src: url('data/IBM_Plex_Mono/IBMPlexMono-Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'IBM Plex Mono';
  src: url('data/IBM_Plex_Mono/IBMPlexMono-Bold.ttf') format('truetype');
  font-weight: bold;
  font-style: normal;
}

@font-face {
  font-family: 'IBM Plex Mono';
  src: url('data/IBM_Plex_Mono/IBMPlexMono-Italic.ttf') format('truetype');
  font-weight: normal;
  font-style: italic;
}

@font-face {
  font-family: 'IBM Plex Mono';
  src: url('data/IBM_Plex_Mono/IBMPlexMono-BoldItalic.ttf') format('truetype');
  font-weight: bold;
  font-style: italic;
}

@font-face {
  font-family: 'IBM Plex Mono';
  src: url('data/IBM_Plex_Mono/IBMPlexMono-ExtraLight.ttf') format('truetype');
  font-weight: 200;
  font-style: normal;
}

@font-face {
  font-family: 'IBM Plex Mono';
  src: url('data/IBM_Plex_Mono/IBMPlexMono-ExtraLightItalic.ttf') format('truetype');
  font-weight: 200;
  font-style: italic;
}

@font-face {
  font-family: 'IBM Plex Mono';
  src: url('data/IBM_Plex_Mono/IBMPlexMono-Light.ttf') format('truetype');
  font-weight: 300;
  font-style: normal;
}

@font-face {
  font-family: 'IBM Plex Mono';
  src: url('data/IBM_Plex_Mono/IBMPlexMono-LightItalic.ttf') format('truetype');
  font-weight: 300;
  font-style: italic;
}

@font-face {
  font-family: 'IBM Plex Mono';
  src: url('data/IBM_Plex_Mono/IBMPlexMono-Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
}

@font-face {
  font-family: 'IBM Plex Mono';
  src: url('data/IBM_Plex_Mono/IBMPlexMono-MediumItalic.ttf') format('truetype');
  font-weight: 500;
  font-style: italic;
}

@font-face {
  font-family: 'IBM Plex Mono';
  src: url('data/IBM_Plex_Mono/IBMPlexMono-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
}

@font-face {
  font-family: 'IBM Plex Mono';
  src: url('data/IBM_Plex_Mono/IBMPlexMono-SemiBoldItalic.ttf') format('truetype');
  font-weight: 600;
  font-style: italic;
}

@font-face {
  font-family: 'IBM Plex Mono';
  src: url('data/IBM_Plex_Mono/IBMPlexMono-Thin.ttf') format('truetype');
  font-weight: 100;
  font-style: normal;
}

@font-face {
  font-family: 'IBM Plex Mono';
  src: url('data/IBM_Plex_Mono/IBMPlexMono-ThinItalic.ttf') format('truetype');
  font-weight: 100;
  font-style: italic;
}

html {
  height: 100%;
  width: 100%;
}

body {
  box-sizing: border-box;
  margin: 0;
  background-color: #041607e6;
  background-image: radial-gradient(#0c761b, #041607);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 1.25rem;
  letter-spacing: -0.5px;
  word-spacing: -4px;
  color: rgba(128, 255, 128, 0.8);
  text-shadow:
    0 0 0.5ex rgba(51, 255, 51, 0.75),
    0 0 2px rgba(255, 255, 255, 0.7);
}

.noise {
  pointer-events: none;
  position: fixed;
  height: 100%;
  width: 100%;
  overflow: hidden;
  z-index: -1;
  opacity: 0.1;
}

.noise::before,
.noise::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('data/nz5.webp');
  background-repeat: repeat;
  background-size: auto;
}

.noise::before {
  background-position: 0 0;
  background-size: 2.9px 2.7px;
  opacity: 0.5;
  z-index: -2;
}

.noise::after {
  background-size: 200px 350px;
  opacity: 0.1;
  z-index: -2;
}

.overlay {
  pointer-events: none;
  position: fixed;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background:
    repeating-linear-gradient(180deg,
      rgba(0, 0, 0, 0) 0,
      rgba(0, 0, 0, 0.15) 50%,
      rgba(0, 0, 0, 0) 138%),
    linear-gradient(rgba(18, 16, 16, 0) 50%,
      rgba(10, 8, 8, 0.25) 50%),
    linear-gradient(90deg,
      rgba(255, 0, 0, 0.06),
      rgba(0, 255, 0, 0.04),
      rgba(0, 0, 255, 0.09));
  background-size: auto 2px, 100% 1.3px, 5.5px 100%;
  z-index: 2000;
  resize: both;

  /* Radial gradient mask */
  mask-image: radial-gradient(circle, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0) 90%);
  -webkit-mask-image: radial-gradient(circle, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0) 90%);
}

.title {
  word-spacing: -1rem;
  letter-spacing: 2px;
  ;
  font-weight: normal;
}

h2 {
  color: white;
}

#socials {
  display: flex;
  justify-content: left;
  opacity: 0.9;
  text-shadow:
    0 0 0.5ex rgba(51, 255, 51, 0.75),
    0 0 2px rgba(255, 255, 255, 0.7);
}

#socials img {
  width: 23px;
  height: auto;
  margin-right: 10px;
  transition: transform 0.3s ease, filter 0.3s ease-in-out;
  filter: drop-shadow(0 0 0.25ex rgba(51, 255, 51, 0.5)) drop-shadow(0 0 1px rgba(255, 255, 255, 0.5));
}

#socials a:hover img {
  transform: scale(1.1);
  color: rgba(128, 255, 128, 0.8);
  filter: drop-shadow(0 0 0.5ex rgba(51, 255, 51, 0.5)) drop-shadow(0 0 3px rgba(255, 255, 255, 0.5));
}

.terminal,
.terminal-header {
  box-sizing: inherit;
  position: absolute;
  height: 85%;
  width: 100%;
  min-width: 300px;
  padding-left: 3rem;
  padding-top: 2rem;
  text-transform: uppercase;
}

.terminal-wrapper {
  display: flex;
  flex-direction: column;
  height: 75vh;
  padding-right: 10px;
  position: relative;
}

.terminal-content {
  flex-grow: 1;
  overflow-y: auto;
  max-width: 90%;
}

#musicUI {
  flex-grow: 0;
  flex-shrink: 0;
  word-spacing: -6px;
}

.music-player-buttons {
  width: 88vw;
  word-spacing: -6px;
}

.terminal-input-line {
  display: flex;
  position: relative;
  align-items: center;
  width: calc(100% - 10px);
}

.terminal-input-line input {
  flex-grow: 1;
  background-color: transparent;
  text-transform: uppercase;
  border: none;
  outline: none;
  padding: 0;
  margin: 0;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 1.25rem;
}

.terminal-input {
  background-color: transparent;
  border: none;
  color: rgba(128, 255, 128, 0.8);
  outline: none;
}

.terminal-input-line input:focus {
  outline: none;
}

.terminal .terminal-input-line input {
  text-shadow: 0 0 1ex rgba(51, 255, 51, 1), 0 0 2px rgba(255, 255, 255, 0.8) !important;
}

.terminal .terminal-input-line input::placeholder {
  color: white;
  text-shadow: 0 0 1ex rgba(51, 255, 51, 1), 0 0 2px rgba(255, 255, 255, 0.8) !important;
  opacity: 0.12;
}

.clearable {
  margin-top: 6px;
}

.output .menu .info {
  color: rgba(128, 255, 128, 0.8);
  text-shadow:
    0 0 1px rgba(51, 255, 51, 0.4),
    0 0 2px rgba(255, 255, 255, 0.8);
}

.toast-container {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  text-align: center;
  pointer-events: none;
  /* Allows clicks to pass through */
  z-index: 1550;
  margin-bottom: 1px;
}

.toast-message {
  background-color: rgba(17, 13.3, 16, 0.9);
  border: 1px solid rgba(128, 255, 128, 0.5);
  box-shadow: 0 0 25px rgba(0, 255, 0, 0.2);
  padding: 5px;
  text-transform: uppercase;
  margin-bottom: 1px;
  opacity: 0;
  transition: opacity 0.5s;
}

#playList {
  display: flex;
  flex-wrap: wrap;
  overflow: auto;
  max-height: 12vh;
  max-width: 90%;
  padding: 0;
  margin-bottom: 5px;
}

#playList li {
  width: fit-content;
  padding-right: 10px;
}

.menu {
  display: flex;
  flex-wrap: wrap;
  font-size: 1.5rem;
}

.menu a {
  margin-right: 10px;
}

.info {
  font-variant: text !important;
  -webkit-font-variant: text !important;
  font-variant-emoji: text !important;
  text-transform: lowercase;
}

#musicUI,
#montrealTime,
h1,
a {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  cursor: default;
}

#progressBar {
  letter-spacing: -7px;
}

#progressBar.has-waveform {
  font-size: 0.75em;
  letter-spacing: -1px;
  line-height: 1;
  font-feature-settings: "kern" 0;
  white-space: nowrap;
  vertical-align: baseline;
}

#progressBar.has-waveform .wf-played,
#progressBar.has-waveform .wf-unplayed {
  display: inline;
  vertical-align: baseline;
}

#progressBar.has-waveform .wf-played {
  opacity: 1;
}

#progressBar.has-waveform .wf-unplayed {
  opacity: 0.35;
}

.playlist {
  list-style-type: none;
}

.video-container {
  background-color: #000000e6;
  left: 10%;
  top: 8.5%;
  transform: translate(0%, 0%);
  position: fixed;
  z-index: 1605;
}

#videoPlayer {
  min-width: 80vw;
  max-height: 74vh;
  max-width: 80vw;
  box-shadow: 0 0 25px rgba(0, 255, 0, 0.2);
  border: 1px solid rgba(128, 255, 128, 0.5);
  background-color: rgba(42, 181, 0, 0.1);
}


#choiceContainer {
  position: absolute;
  top: 40%;
  left: 0;
  width: 100%;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

#choiceContainer li {
  list-style-type: none;
  font-size: 0.8rem;
  padding-top: 5px;
}

.video-container ul {
  padding-left: 0;
  margin: 0;
}

.video-container .video-button {
  letter-spacing: 0.2vh;
  text-align: center;
  box-shadow: 0 0 25px rgba(0, 255, 0, 0.15);
  background-color: #0416077b;
  border: 1px solid rgba(128, 255, 128, 0.4);
  display: block;
  padding-top: 5px;
  padding-bottom: 5px;
  margin-top: 2px;

}

@keyframes animatetop {
  from {
    top: 0;
    opacity: 0
  }

  to {
    top: 0;
    opacity: 1
  }
}

@keyframes darkentop {
  from {
    top: 0;
    opacity: 1
  }

  to {
    top: 0;
    opacity: 0.6
  }
}

.inactive-prompt {
  animation: none;
  opacity: 0.75;
  padding-right: 0.5em;
}

@keyframes blink {

  0%,
  75% {
    opacity: 1;
  }

  76%,
  100% {
    opacity: 0.66;
  }
}

#blinkingColon {
  animation: blink 1s step-start 0s infinite;
}

.blink {
  animation: blink 0.5s linear infinite;
}

.active-prompt {
  animation: blink 0.5s step-end infinite alternate;
  padding-right: 0.5em;
}

.tiny {
  font-size: 0.7rem;
  font-weight: 400;
  margin-top: -10px;
  letter-spacing: 0.04rem;
  text-shadow:
    0 0 0.5ex rgba(51, 255, 51, 0.25),
    0 0 2px rgba(255, 255, 255, 0.5);
}

span#version.tiny {
  letter-spacing: -1.5px;
}


.output {
  position: relative;
  /* Creates a positioning context */
  padding-left: 20px;
  /* Adjust as needed to make space for the `>` symbol */
}

.output::before {
  content: "> ";
  position: absolute;
  left: 0;
  /* Aligns the `>` symbol to the very left */
  top: 0;
  /* Aligns the `>` symbol to the top, adjust if needed */
}


.input::before {
  content: "█ ";
  z-index: -2;
}

a {
  color: #fff;
  text-decoration: none;
}

a.music-button {
  color: rgba(128, 255, 128, 0.8);
  text-decoration: none;
}

a.music-button.active {
  color: #fff;
  text-decoration: none;
}

a.playlist-button {
  color: rgba(128, 255, 128, 0.8);
  text-decoration: none;
}

a.playlist-button.active {
  color: #fff;
  text-decoration: none;
}

a.playlist-toggle {
  color: rgba(128, 255, 128, 0.8);
  text-decoration: none;
}

a.playlist-toggle.active {
  color: #fff;
  text-decoration: none;
}

a:not(.social-icon)::before {
  content: "[";
}

a:not(.social-icon)::after {
  content: "]";
}

.model {
  color: white;
}

.accent {
  color: white;
  cursor: pointer;
}

.othello-board {
  font-size: 1.5rem;
}

.othello-board .dot {
  width: 10px;
  height: 10px;
  background-color: #80ea7c46;
  position: absolute;
  top: 55%;
  left: 48%;
  transform: translate(-50%, -50%);
  z-index: -5;
}

/* Make sure the table cells are relatively positioned */
.othello-board td {
  position: relative;
  z-index: 2;
}

.new-move {
  animation: fadeIn 4s;
  color: rgba(128, 255, 128, 0.8);
  /* Starting color */
}

@keyframes fadeIn {
  from {
    color: white;
  }

  to {
    color: rgba(128, 255, 128, 0.8);
  }

  /* Use rgba for color */
}

#topRightContainer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 1500;
  text-align: center;
  box-shadow: 0 0 25px rgba(0, 255, 0, 0.2);
}

#montrealTime {
  padding: 5px;
  background: rgba(0, 0, 0, 0.3);
  font-size: 0.77em;
}

.map {
  background-color: rgba(17, 13.3, 16, 0.9);
  border: 1px solid rgba(128, 255, 128, 0.5);
  overflow: auto;
  max-width: 95vh;
  padding: 8px;
}

.map-header {
  font-size: 1rem;
  padding-bottom: 1rem;
}

.map-image {
  aspect-ratio: 1 / 1;
  background-color: transparent;
  margin-bottom: 1rem;
  box-shadow: 0 0 2px rgba(0, 255, 0, 0.3);
}

.map-image.minimized {
  width: 10vw;
  height: 10vw;
}

#imageModalOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none;
  justify-content: center;
  align-items: center;
  background-color: rgba(0, 0, 0, 0.4);
  z-index: 1401;
}

#imageModalOverlay img {
  max-width: 80%;
  max-height: 80%;
  object-fit: contain;
  box-shadow: 0 0 20px rgba(0, 255, 0, 0.2);
  border: 1px solid rgba(128, 255, 128, 0.3);
  pointer-events: none;
}

.map.expanded {
  top: 0;
  right: 0;
  width: 40vw;
}

.map.fullscreen .toast-container {
  display: block;
}

@media only screen and (min-width: 581px) {

  .map.fullscreen,
  .map.fullscreen.expanded {
    width: 85vw;
    max-width: 85vh;
    height: 85vh;
    z-index: 1500;
  }
}

.map-content {
  font-size: 0.8rem;
}

.map-list {
  font-size: 0.8rem;
  margin-top: 1rem;
  text-decoration: none;
  list-style-type: none;
  padding-left: 0;
  animation-name: animatetop;
  animation-duration: 2s;
}

a.map-buttons {
  font-size: 0.85rem;
}

#mapOverlay {
  display: grid;
  grid-template-rows: repeat(var(--grid-size), 1fr);
  grid-template-columns: repeat(var(--grid-size), 1fr);
  position: relative;
  grid-gap: 2px;
  max-height: 95vh;
}

#initialOverlay {
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  background: url('img/pete-philips-cover.jpg') no-repeat center center;
  background-size: cover;
  z-index: 1520;
  /* Higher than the map to overlay it */
}

#enterMessage {
  font-size: 20px;
  /* Adjust size as needed */
  color: white;
  /* Adjust color as needed */
  padding: 10px;
  background: rgba(0, 0, 0, 0.5);
  /* Semi-transparent background for readability */
}

.map-toggle {
  position: absolute;
  display: grid;
  background-color: #121212dd;
  width: 100%;
  box-shadow: 0 0 25px rgba(0, 255, 0, 0.2);
  border: 0.5px solid rgba(128, 255, 128, 0.5);
}

.fullscreen-container {
  display: grid;
  padding-top: 10px;
  align-content: space-evenly;
}

.fullscreen-container a {
  font-size: 0.8rem;
}

.key-container {
  padding-top: 10px;
}

.key-part {
  padding: 1px;
  text-decoration: underline;
  font-size: 14px;
}

.key-part-collected {
  display: none;
}

.cipher-sequence-message {
  visibility: hidden;
  opacity: 0;
  font-size: 12px;
  max-height: 0;
  transition: opacity 0.5s ease-in-out, color 0.5s ease-in-out, max-height 0.5s ease-in-out;
}

.cipher-sequence-message.active {
  visibility: visible;
  opacity: 1;
  max-height: 100px;
}

#mapCellTooltip {
  padding: 5px;
  font-size: 0.8rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  opacity: 0;
  transition: opacity 0.5s ease-out;
}

#tooltipText {
  overflow-x: wrap;
  text-overflow: ellipsis;
}

.tooltip-container {
  padding: 5px;
  font-size: 0.8rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.grid-cell {
  aspect-ratio: 1;
  position: relative;
  border: 0.5px solid rgba(63, 156, 0, 0.35);
  opacity: 1;
  transition: opacity 0.5s ease-in-out;
}

.sprite {
  background-size: 50%;
  background-repeat: no-repeat;
  background-position: center;
  position: relative;
}

.item,
.custom {
  background-size: 85%;
  background-repeat: no-repeat;
  background-position: center;
  position: relative;
}

.custom {
  background-image: url('img/custom/custom01.png');
}

.collected-key {
  background-image: none;
  background-color: transparent;
}

.item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    radial-gradient(circle at center,
      rgba(0, 0, 113, 1) 1%,
      rgba(128, 255, 158, 1) 91.1%),
    url(/data/noise02.png);
  background-position: center;
  background-size: 115%;
  background-repeat: no-repeat, repeat;
  pointer-events: none;
  opacity: 0.15;
}

.floor {
  background-size: cover;
  background-position: center;
  background-image: url('img/floor/floor1.png');
  background-color: rgba(128, 255, 128, 0.35);
}

.locked-with-keys {
  background-color: rgba(255, 0, 0, 0.25);
  /* red background */
}

.locked-no-keys {
  background-color: transparent;
  /* no background color */
}

.flicker {
  animation: flicker 0.05s infinite;
}

@keyframes flicker {

  0%,
  100% {
    opacity: 0.95;
  }

  50% {
    opacity: 0.85;
  }
}

.grid-cell::before {
  content: '';
  display: block;
  padding-top: 100%;
}

.grid-cell-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.grid-content {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: auto;
  animation: rapid-flash 3s linear infinite;
}

.central-cell::after {
  content: '✖';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1rem;
  pointer-events: none;
  animation: blink 3s infinite;
}

.grid-cell.adjacent-cell:hover {
  border-color: rgba(0, 255, 0, 0.7);
}

.grid-cell.non-adjacent-cell:hover {
  border-color: rgb(255, 0, 0, 1);
}

@keyframes rapid-flash {

  0%,
  100% {
    box-shadow: 0 0 12px rgba(0, 255, 0, 0.6);
  }

  50% {
    box-shadow: none;
  }
}

a:not(.music-button):hover {
  color: rgba(128, 255, 128, 0.8);
  transition: color 0.5s ease-in-out;
}

.policy {
  display: none;
  position: fixed;
  z-index: 1600;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgb(0, 0, 0);
  background-color: rgba(0, 0, 0, 0.4);
}

.policy-content {
  background-color: #121212f7;
  margin: 7% auto;
  padding: 7vw;
  font-size: 1.1rem;
  border: 1px solid rgba(128, 255, 128, 0.768);
  width: 70%;
  box-shadow: 0 4px 8px 0 rgba(51, 255, 51, 0.6), 0 6px 20px 0 rgba(51, 255, 51, 0.59);
}

.policy-content h1 {
  color: #fff;
  font-size: 1.6em;
  margin: 10px;
}

.policy-footer {
  display: flex;
  justify-content: center;
  padding-top: 20px;
}

.policy-footer a {
  background-color: rgb(0 0 0 / 20%);
  color: white;
  padding: 10px 20px;
  margin: 0 10px;
  text-align: center;
  text-decoration: none;
  font-size: 16px;
  border: none;
  cursor: pointer;
}

#epkContent img {
  width: 100%;
  height: auto;
  /* Maintain aspect ratio */
  object-fit: contain;
  /* Ensure the image is fully visible within the bounds */
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@media only screen and (min-width: 581px) {
  .toast-container {
    display: none;
  }
}

@media only screen and (max-width: 430px) and (-webkit-device-pixel-ratio: 3) {

  h1 {
    text-shadow:
      0 0 0.5ex rgba(51, 255, 51, 0.5),
      0 0 0.5px rgba(255, 255, 255, 0.7)
  }

  #version {
    display: none;
  }

  .fullscreen-container {
    display: none;
  }

  .terminal {
    padding-left: 3rem;
    padding-top: 2.2rem;
    padding-right: 1rem;
  }

  .terminal-wrapper {
    display: flex;
    flex-direction: column;
    height: 65svh;
    padding-right: 0;
  }

  .music-player-buttons {
    width: 80vw;
  }

  .map.expanded {
    top: 0;
    width: 95.5vw;
  }
}

@media only screen and (max-width: 429px) and (-webkit-device-pixel-ratio: 2),
only screen and (max-width: 429px) and (-webkit-device-pixel-ratio: 4) {
  h1 {
    text-shadow:
      0 0 0.5ex rgba(51, 255, 51, 0.5),
      0 0 0.5px rgba(255, 255, 255, 0.7)
  }

  #version {
    display: none;
  }

  .terminal {
    padding-left: 1.5rem;
  }

  .map.expanded {
    top: 0;
    width: 95vw;
  }

  .fullscreen-container {
    display: none;
  }
}

@media only screen and (max-width: 580px) and (min-height: 940px) {

  .fullscreen-container {
    display: none;
  }

  .terminal {
    padding-left: 3rem;
    padding-right: 1rem;
  }

  .map.expanded {
    top: 0;
    width: 95vw;
  }
}