/* General styling */
body {
  background: #000;
  color: white;
  font-family: Arial, sans-serif;
  text-align: center;
  margin: 0;
  padding: 0;
}

.grid {
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
  margin-top: 40px;
}

.thumb {
  text-decoration: none;
  color: white;
  width: 200px;
  cursor: pointer;
}

.thumb img {
  width: 100%;
  border-radius: 8px;
  transition: 0.3s;
}

.thumb img:hover {
  transform: scale(1.05);
}

/* Modal styling */
.modal {
  display: none; /* hidden by default */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  z-index: 9999; /* on top of everything */
  padding: 20px;
  box-sizing: border-box;
}

.modal video {
  width: 80%;
  max-width: 900px;
  max-height: 90%; /* prevent overflow */
  border-radius: 10px;
  background: black;
}

/* Close button */
#closeModal {
  position: absolute;
  top: 20px;
  right: 40px;
  font-size: 40px;
  cursor: pointer;
  color: white;
  z-index: 10000;
  user-select: none;

  /* Ensure html and body fill the screen */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

/* Force modal to appear above all content and center properly */
.modal {
  display: none;           /* hidden by default */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.9);
  display: flex;           /* center content */
  justify-content: center;
  align-items: center;
  flex-direction: column;
  z-index: 9999;           /* always on top */
}

/* Ensure video scales and stays inside viewport */
.modal video {
  width: 80%;
  max-width: 900px;
  max-height: 90%;         /* prevents video from going below */
  border-radius: 10px;
  background: black;
}

/* Close button always clickable above video */
#closeModal {
  position: absolute;
  top: 20px;
  right: 40px;
  font-size: 40px;
  cursor: pointer;
  color: white;
  z-index: 10000;          /* above modal content */
}
}