html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
    }

canvas, #videoElement {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
object-fit: cover;
z-index: -1; /* Ensure the canvas and video are behind other elements */
    }


#controller {
position: absolute;
bottom: 10px; /* Adjust this value to change the distance from the bottom */
left: 50%;
transform: translateX(-50%);
text-align: center;
background-color: rgba(250, 235, 215, 0.7); /* 'antiquewhite' with 50% opacity */
box-shadow: inset;
padding-left: 10px;
padding-right: 10px;
border-radius: 10px;
}

#controller input[type="text"] {
    width: 60px;  /* Increase width */
    height: 30px; /* Increase height */
    font-size: 16px; /* Increase font size for better readability */
    padding: 5px; /* Add padding for better spacing */
}
    
#controller button{
    border-radius: 20px;
}
.toggle-grid {
    position: absolute;
    top: 20px; /* Distance from the top of the window */
    right: 20px; /* Distance from the right side of the window */
    z-index: 100; /* Ensure the button is above other elements */
    margin-left: 80px; /* 슬라이더와 겹치지 않게 왼쪽 여백 추가 */
    display: flex;
    flex-direction: column; /* 버튼을 세로로 정렬 */
    align-items: flex-end; /* 버튼을 우측 정렬 */
    gap: 10px; /* 버튼 사이의 간격 추가 */
}

.toggle-grid button {
    padding: 10px 20px;
    font-size: 16px;
    border-radius: 5px;
    background-color: #007BFF;
    color: white;
    border: none;
    cursor: pointer;
}

.toggle-grid button:hover {
    background-color: #0056b3; /* Darker blue on hover */
}

/* 슬라이더를 세로로 설정하는 CSS */
#cSlider {
  transform: rotate(-90deg); /* 슬라이더를 세로로 회전 */
  width: 500px; /* 슬라이더의 길이 */
  height: 30px;
  position: absolute;
  left: 5%; /* toggle-grid의 왼쪽에 배치 */
  top: 60%; /* 화면에서 중간에 배치 */
  margin-top: -75px; /* 슬라이더 위치 보정 */
}

#qValue {
  position: absolute;
  left: 60%; /* 슬라이더 옆에 위치 */
  top: calc(50% - 15px); /* 슬라이더 옆 중앙 */
  background-color: aliceblue;
  border-radius: 10px;
  padding: 0.5%;
}
#translation-info-q{
  position: absolute;
  left: 30%;
  top: 40%;
  text-align: right;
  display: none;
}

#translation-info-0{
  position: absolute;
  left: 30%;
  top: 55%;
  text-align: right;
  display: none;
}

   @media (max-width: 480px) {
     #controller input[type="number"] {
       width: 100px !important;
       height: 40px !important;
     }

     #controller button {
       width: 100px !important;
       height: 40px !important;
     }
   }