body, html {

  margin: 0;

  padding: 0;

  width: 100%;

  height: 100%;

  overflow: hidden;

  background-color: #000;

  font-family: 'Lato', sans-serif;

  color: white;

}



#video-background {

  position: absolute;

  top: 0;

  left: 0;

  width: 100%;

  height: 100%;

  z-index: -1;

  overflow: hidden;

  pointer-events: none; /* Prevent interaction with video */

}



/*

   To simulate background-size: cover for an iframe,

   we can make it much larger than the screen and center it.

   Or use a CSS aspect-ratio trick.

   A simple robust way for 16:9 videos:

*/

#video-background iframe {

  position: absolute;

  top: 50%;

  left: 50%;

  width: 177.77vh; /* 100 * 16 / 9 */

  height: 100vh;

  transform: translate(-50%, -50%);

}



@media (min-aspect-ratio: 16/9) {

  #video-background iframe {

    width: 100vw;

    height: 56.25vw; /* 100 * 9 / 16 */

  }

}

/* 기존 CSS의 #overlay 부분을 이렇게 수정하세요 */
#overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, 0.6); /* 처음에 불이 살짝 보이도록 투명도 조절 */
  transition: background 2s ease, opacity 1.5s ease; /* 배경과 글자 투명도 전환 */
}

/* 글자가 사라질 때 사용할 클래스 */
.fade-out {
  opacity: 0 !important;
  pointer-events: none;
}


#content {

  text-align: center;

  z-index: 10;

}



h1 {

  font-size: 4rem;

  font-weight: 300;

  margin-bottom: 0.5rem;

  text-shadow: 0 2px 4px rgba(0,0,0,0.5);

  letter-spacing: 2px;

}



p {

  font-size: 1.2rem;

  font-weight: 400;

  opacity: 0.9;

  margin-bottom: 2rem;

  text-shadow: 0 1px 2px rgba(0,0,0,0.5);

}



button {

  background: transparent;

  border: 2px solid white;

  color: white;

  padding: 10px 20px;

  font-size: 1rem;

  cursor: pointer;

  border-radius: 30px;

  transition: all 0.3s ease;

  font-family: 'Lato', sans-serif;

  text-transform: uppercase;

  letter-spacing: 1px;

}



button:hover {

  background: white;

  color: black;

}



#controls {

  position: absolute;

  bottom: 30px;

  right: 30px;

  z-index: 20;

}



.icon-btn {

  border: none;

  background: rgba(0,0,0,0.5);

  border-radius: 50%;

  width: 50px;

  height: 50px;

  padding: 0;

  display: flex;

  justify-content: center;

  align-items: center;

}



.icon-btn:hover {

  background: rgba(255,255,255,0.2);

  color: white;

}



/* Hide content when playing if desired, or keep it. Rainy mood keeps title usually but subtle. */

body.playing #overlay {

  background: rgba(0, 0, 0, 0.1);

}



body.playing #content {

  /* optional: fade out title text after starting?

     Rainy Mood keeps it. Let's keep it but maybe smaller or just there. */

}