#detailModal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.95);
  z-index: 9999;
  overflow: auto;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

#detailModal.show {
  opacity: 1;
  visibility: visible;
}

#detailContent {
  display: grid;
  grid-template-columns: 100px auto 30%;
  grid-gap: 20px;
  margin: 2%;
  align-items: flex-start;
}

#miniMenu {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: auto;
}

.mini-thumbnail {
  width: 80px;
  height: auto;
  cursor: pointer;
  border-radius: 0;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  margin: 5px
}

.mini-thumbnail:hover {
  transform: scale(1.1);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

#zoomControls {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 10px;
  gap: 10px;
}

#zoomControls button {
  padding: 6px 6px;
  background: #222;
  border: 1px solid #555;
  color: white;
  cursor: pointer;
}

#detailMedia {
  display: flex;
  justify-content: center;
  align-items: center;
  max-width: auto;
  max-height: 100%;
  overflow: auto;
}

#detailText {
  font-size: 16px;
  line-height: 1.6;
  overflow-y: auto;
  max-height: 90vh;
  padding-left: 20px;
}

#detailText h2 {
  margin-top: 0;
}

#detailText a {
  color: #0099ff;
  text-decoration: none;
}

#detailText a:hover {
  text-decoration: underline;
}

.media-content {
  display: flex;
  max-width: 100%;  
  max-height: 90vh;
  min-height: 90vh;
  width: auto;
  object-fit: contain;
  user-select: none;
  cursor: grab;
  transition: transform 0.2s ease;
  -webkit-user-drag: none;
}

.detailLabel {
  color: #777;
}

#closeDetail {
  position: fixed;
  top: 5px;
  right: 20px;
  font-size: 28px;
  cursor: pointer;
  color: white;
  z-index: 10000;
  user-select: none;
}

#closeDetail:hover {
  color: #f33;
}

.mini-thumb-wrapper {
  position: relative;
  display: inline-block;
}

.play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 28px;
  color: white;
  text-shadow: 0 0 5px black;
  pointer-events: none;
}

@media (max-width: 600px) {
  #detailContent {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    flex-wrap: nowrap !important;
  }
  
  #miniMenu {
    flex-direction: row;
  }
 
  .mini-thumbnail {    
    width: 60px;
  }
  
  #zoomControls {
    flex-direction: row;
  }
  
  #zoomContainer {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
  }

  #zoomContainer img {
    width: 100%;
    height: auto;
    object-fit: contain;
  }
  
  .media-content {  
    max-height: none;
    min-height: 100vw;
  }

  #detailText {
    width: 100%;
    max-height: none;
    max-width: 90%;
    padding: 0 10px;
    font-size: 15px;
  }
}