body {
  margin: 0;
  background: black;
  overflow: hidden;
}

#frame-area {
  width: 100vw;
  height: 100vh;
  position: relative;
}

.frame {
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
  display: none;
}

#thumbnail-grid {
  position: absolute;
  top: 30%;
  left: 50%;
  width: 500px;
  transform: translateX(-50%);
  display: none;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  justify-items: center;
  align-items: center;
  gap: 12px;
  z-index: 10;
}

.thumb {
  width: 65%;
  border-radius: 8px;
  cursor: pointer;
  transform: perspective(800px) rotateX(25deg);
  transition: transform 0.2s ease;
}

.thumb:hover {
  transform: perspective(800px) rotateX(15deg) scale(1.03);
}

#overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-size: cover;
  background-position: center;
  justify-content: center;
  align-items: center;
  z-index: 20;
}

#overlay-box {
  width: 80vw;
  height: 70vh;
  display: flex;
  align-items: center;
  gap: 40px;
}

#overlay-img {
  max-width: 40%;
  max-height: 90%;
  border-radius: 10px;
}

#overlay-info {
  width: 40%;
  color: black;
  font-size: 20px;
  background: rgba(255,255,255,0.72);
  padding: 20px;
  border-radius: 12px;
}

#overlay-info h2 {
  font-size: 32px;
  margin-bottom: 10px;
}

#overlay-info p {
  line-height: 1.4;
}

#close-btn {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 40px;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
}
