@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

.waifu { 
  color:var(--waifu-txt);
  background: var(--waifu-bg);
  display:inline-block;
  padding:2px 7px;
  margin-right: 10px;
  margin-bottom:10px;
  text-align: center;
  font-weight: normal;
  background-position: center center;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges; 
}

.light-mode .waifu {
  color: #0e0e0e;
  background: #e0e0e0;
}

.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  justify-content: center;
  align-items: center;
  flex-direction: column;
  padding: 20px;
  box-sizing: border-box;
}

.modal-content {
  display: block;
  max-height: 50vh;
  max-width: 80vw;
  object-fit: contain;
  cursor: pointer;
  flex-shrink: 0;
}

/* Fallback for div.modal-content (if used) */
div.modal-content {
  width: 500px;
  max-width: 500px;
  background-color: #141414;
  border: 5px solid #000000;
  box-sizing: border-box;
  color: #ffffff;
  padding: 20px;
}

.light-mode div.modal-content {
  background-color: #FFF;
  border-color: #000;
  color: #000;
}

@media only screen and (max-width: 480px) {
  div.modal-content {
    width: 100%;
  }
}

.modal-content, .caption, .name {
  animation-name: zoom;
  animation-duration: 0.6s;
}

@keyframes zoom {
  from {transform:scale(0)}
  to {transform:scale(1)}
}

.caption {
  text-align: center;
  color: #00fff2;
  background-color: rgba(0, 0, 0, 0.925);
  padding: 20px;
  width: 100%;
  max-width: 80vw;
  margin-top: 10px;
  box-sizing: border-box;
  text-shadow: 2px 2px 4px #000000;
  flex-shrink: 0;
  max-height: 30vh;
  overflow-y: auto;
}

.light-mode .caption {
  color: #000;
  background-color: #FFF;
  border-style: solid;
  border-color: #000;
  text-shadow: none;
}

@media only screen and (max-width: 480px) {
  .caption {
    max-width: 95vw;
  }
  .name {
    max-width: 95vw;
  }
  .modal-content {
    max-width: 95vw;
    max-height: 40vh;
  }
}

.name {
  text-align: center;
  color: #00e1ff;
  background-color: rgba(0, 0, 0, 0.925);
  font-size: 1.2em;
  margin-bottom: 10px;
  width: 100%;
  max-width: 80vw;
  font-family: 'Press Start 2P', cursive;
  font-weight: bold;
  padding: 20px;
  text-shadow: 2px 2px 4px #000000;
  box-sizing: border-box;
  flex-shrink: 0;
}

.light-mode .name {
  color: #000;
  background-color: #FFF;
  border-style: solid;
  border-color: #000;
  text-shadow: none;
}


.waifu img {
  cursor: pointer;
}

.clickable {
  cursor: pointer;
  color: #00e1ff;
  text-decoration: underline;
}