* {
  box-sizing: border-box;
}

/* Modal overlay, hidden by default via the [hidden] attribute */
.konami-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.75);
  z-index: 9999;
  animation: fadeIn 0.25s ease-out;
}

.konami-modal[hidden] {
  display: none;
}

.konami-modal-content {
  position: relative;
  max-width: 90vw;
  max-height: 85vh;
  background: #111;
  padding: 12px;
  border-radius: 12px;
  box-shadow: 0 0 40px rgba(233, 235, 184, 0.6);
  animation: popIn 0.3s ease-out;
}

.konami-modal-content img {
  display: block;
  max-width: 100%;
  max-height: 75vh;
  border-radius: 8px;
}

.konami-modal-content--game {
  width: min(960px, 92vw);
  height: min(680px, 85vh);
  padding: 0;
  display: flex;
}

.konami-game-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 12px;
  background: #000;
}

.konami-close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: #e9ebb8;
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.konami-close:hover {
  background: #e9ebb8;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes popIn {
  from { transform: scale(0.85); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
