.video-project {
  margin: 2rem 0 4rem;
}

.video-header {
  margin-bottom: 2rem;
}

.video-title {
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.video-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.25);
  background: #000;
  overflow: hidden;
}

.video-container iframe {
  position: absolute;
  top: -8%;
  left: -8%;
  width: 116%;
  height: 116%;
  border: 0;
  pointer-events: none; /* Block default YouTube pointer events/clicks */
}

/* Transparent click-interceptor overlay */
.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 5;
  cursor: pointer;
}

/* Custom Minimalist Controls Overlay */
.custom-video-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 60px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.3) 50%, transparent 100%);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 24px;
  box-sizing: border-box;
  opacity: 1;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 10;
}

.control-btn {
  background: none;
  border: none;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform 0.2s, background-color 0.2s;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.control-btn:hover {
  transform: scale(1.08);
  background: rgba(255, 255, 255, 0.2);
}

.control-btn:active {
  transform: scale(0.95);
}

/* Hide controls class */
.video-container.hide-controls .custom-video-controls {
  opacity: 0;
  pointer-events: none;
}

/* Hide cursor when controls are hidden and video is playing */
.video-container.hide-controls {
  cursor: none;
}

/* Fullscreen browser layout overrides */
.video-container:fullscreen {
  width: 100vw;
  height: 100vh;
  max-width: none;
  box-shadow: none;
}

.video-container:-webkit-full-screen { /* Safari */
  width: 100vw;
  height: 100vh;
  max-width: none;
  box-shadow: none;
}



.video-container:fullscreen .custom-video-controls {
  height: 80px;
  padding: 0 40px;
}

/* Large Minimalist Middle Play Button */
.middle-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1);
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.7); /* Sleek black theme */
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #fff;
  font-size: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 15; /* Sit on top of video overlay */
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.2s;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  padding-left: 5px; /* Offset to center the visual weight of the play arrow triangle */
  box-sizing: border-box;
}

.middle-play-btn:hover {
  transform: translate(-50%, -50%) scale(1.08);
  background: rgba(0, 0, 0, 0.85);
  border-color: rgba(255, 255, 255, 0.35);
}

.middle-play-btn:active {
  transform: translate(-50%, -50%) scale(0.95);
}

/* Hide middle play button when video is playing */
.video-container.playing .middle-play-btn {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.85);
}

/* Custom Timeline Progress Bar */
.custom-progress-bar {
  position: absolute;
  bottom: 60px; /* Sits exactly on top of controls */
  left: 0;
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  cursor: pointer;
  z-index: 12;
  transition: height 0.2s, opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 1;
}

.custom-progress-bar:hover {
  height: 6px;
}

.progress-filled {
  height: 100%;
  width: 0%;
  background: rgb(40, 153, 96); /* Brand green */
  transition: width 0.1s linear;
}

/* Display video duration readout */
.video-time {
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
  font-family: var(--font-family-sans);
  font-weight: 500;
  user-select: none;
}

/* Hide seekbar when controls hide */
.video-container.hide-controls .custom-progress-bar {
  opacity: 0;
  pointer-events: none;
}

.video-container:fullscreen .custom-progress-bar {
  bottom: 80px;
}

