@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable.min.css");

button {
  background: transparent;
  box-shadow: 0px 0px 0px transparent;
  border: 0px solid transparent;
  text-shadow: 0px 0px 0px transparent;
}

button:hover {
  opacity: 0.5;
  box-shadow: 0px 0px 0px transparent;
  border: 0px solid transparent;
  text-shadow: 0px 0px 0px transparent;
}

button:active {
  outline: none;
  border: none;
}

button:focus {
  outline: 0;
}

html {
  height: 100%;
}

body {
  height: 100%;
  margin: 0;
  padding: 0;
  color: white;
  font-family: Pretendard, "Montserrat", sans-serif;
}

.main_container {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
}

.dashboard_container {
  width: 25%;
  height: 100%;
  background: linear-gradient(168.68deg, #7c3aed 1.12%, #c084fc 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  position: relative;
}

.call_container {
  width: 50%;
  height: 100%;
  position: relative;
}

.messenger_container {
  width: 25%;
  height: 100%;
  background: #f4f9fd;
  display: flex;
  flex-direction: column;
}

.logo_container {
  margin-left: 40px;
  width: 180px;
  height: 120px;
}

.logo_container img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.description_container {
  margin: 0 40px;
}

.description_container_paragraph {
  font-weight: 500;
  font-size: 14px;
  color: white;
}

.personal_code_container {
  height: 110px;
  margin: 0 40px;
  background: rgba(196, 196, 196, 0.2);
  background-filter: blur(80px);
  border-radius: 15px;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
}

.personal_code_title_container {
  padding: 0 25px;
}

.personal_code_title_paragraph {
  font-size: 16px;
  font-weight: 500;
}

.personal_code_value_container {
  display: flex;
  justify-content: space-between;
  margin: 0 25px;
  align-items: center;
}

.personal_code_value_paragraph {
  font-size: 15px;
  font-weight: 500;
  word-break: break-all;
  overflow-wrap: break-word;
  max-width: calc(100% - 50px);
}

.personal_code_copy_button {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: white;
  transition: 0.5s;
}

.personal_code_connecting_container {
  display: flex;
  flex-direction: column;
  margin: 0 40px;
}

.personal_code_connecting_paragraph {
  font-weight: 500;
  font-size: 18px;
}

.personal_code_connecting_input_container {
  width: 100%;
  height: 40px;
}

.personal_code_input:focus {
  outline: none;
}

.personal_code_input {
  width: 100%;
  height: 100%;
  background: rgba(196, 196, 196, 0.2);
  background-filter: blur(80px);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: white;
  padding: 0 20px;
  box-sizing: border-box;
}

.personal_code_connecting_buttons_container {
  margin-top: 30px;
  display: flex;
  justify-content: space-between;
}

.connecting_button {
  width: calc(50% - 10px);
  height: 55px;
  background: white;
  border-radius: 15px;
  box-shadow: 0px 2px 2px 10px rgba(192, 132, 252, 0.3);
  transition: 0.5s;
}

.stranger_connecting_container {
  display: flex;
  flex-direction: column;
  margin: 0 40px;
}

.stranger_title_container {
  font-weight: 500;
  font-size: 18px;
}

.stranger_buttons_container {
  display: flex;
  justify-content: space-between;
}

.checkbox_container {
  display: flex;
  margin: 0 40px;
  margin-bottom: 25px;
  align-items: center;
}

.checkbox_connection {
  width: 30px;
  height: 30px;
  background: rgba(196, 196, 196, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 8px;
  backdrop-filter: blur(80px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.checkbox_container_paragraph {
  font-weight: 500;
  font-size: 16px;
  margin-left: 15px;
}

.connecting_buttons_image {
  max-width: 100%;
  max-height: 100%;
}

.new_message_container {
  position: relative;
}
.new_message_input {
  margin: 0 40px;
  margin-bottom: 30px;
  width: calc(100% - 80px);
  height: 60px;
  color: #676f7a;
  font-size: 16px;
  font-weight: 400;
  border: 1px solid #e9d5f5;
  border-radius: 15px;
  box-shadow: 0px 2px 20px 5px rgba(192, 132, 252, 0.08);
  padding: 0 60px 0 20px;
  z-index: 2;
  box-sizing: border-box;
}

.new_message_input:focus {
  outline: none;
  color: #676f7a;
}

.messages_container {
  flex-grow: 1;
  margin: 40px 30px;
  overflow-y: scroll;
}

.message_left_container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.message_left_paragraph {
  background: #ffffff;
  border: 1px solid #e9d5f5;
  border-radius: 8px 8px 8px 0px;
  padding: 20px 13px;
  color: #545c68;
  min-width: 60px;
}

.message_right_container {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.message_right_paragraph {
  background: linear-gradient(168.68deg, #7c3aed 1.12%, #c084fc 100%);
  border: 1px solid #e9d5f5;
  border-radius: 8px 8px 8px 0px;
  padding: 20px 13px;
  color: #ffffff;
  min-width: 60px;
}

.send_message_button {
  width: 40px;
  height: 40px;
  position: absolute;
  right: 50px;
  top: 10px;
  box-shadow: 0px 2px 20px 5px rgba(192, 132, 252, 0.08);
  background: linear-gradient(180deg, #ec4899 0%, #f9a8d4 100%);
  border-radius: 8px;
  transition: 0.5s;
}

.send_message_button_image {
  max-width: 100%;
  max-height: 100%;
}

.videos_container {
  position: relative;
  height: calc(100% - 70px);
  margin: 30px 40px 40px 40px;
  border-radius: 15px;
  background: linear-gradient(168.68deg, #7c3aed 1.12%, #c084fc 100%);
  /* background-image: url('../utils/images/logo.png'); */
}

.videos_placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.videos_placeholder img {
  max-width: 80%;
  max-height: 80%;
  object-fit: contain;
}

.local_video_container {
  position: absolute;
  width: 180px;
  height: 180px;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 15px;
  background: rgba(196, 196, 196, 0.2);
  top: 15px;
  left: 15px;
}

.local_video {
  width: 100%;
  height: 100%;
}

.remote_video {
  width: 100%;
  height: 100%;
  object-fit: contain; /* 비율 유지하면서 꽉 채움 (잘림 없음) */
  background-color: #000; /* 빈 공간은 검은색 */
}

.call_buttons_container {
  position: absolute;
  width: 395px;
  height: 75px;
  bottom: 40px;
  left: calc(50% - 200px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100; /* UI 버튼이 원격 제어 비디오 위에 표시 */
  pointer-events: none; /* 컨테이너는 클릭 방지, 버튼만 클릭 가능하게 */
}

.finish_chat_button_container {
  position: absolute;
  width: 395px;
  height: 75px;
  bottom: 40px;
  left: calc(50% - 200px);
  display: flex;
  justify-content: center;
  align-items: center;
}

.call_button_small {
  width: 50px;
  height: 50px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 50px;
  transition: 0.3s;
  pointer-events: auto; /* 버튼은 클릭 가능 */
}

.call_button_large {
  width: 75px;
  height: 75px;
  border-radius: 75px;
  background: #fc5d5b;
  transition: 0.3s;
  pointer-events: auto; /* 버튼은 클릭 가능 */
}

.dialog_wrapper {
  position: fixed;
  z-index: 2;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(30px);
  display: flex;
  align-items: center;
  justify-content: center;
  left: 0;
  top: 0;
}

.dialog_content {
  width: 520px;
  height: 530px;
  background: white;
  border: 1px solid #d5deeb;
  box-shadow: 0px 2px 20px 5px rgba(10, 145, 219, 0.05);
  border-radius: 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-evenly;
}

.dialog_title {
  font-weight: 600;
  font-size: 22px;
  color: black;
}

.dialog_image_container {
  width: 275px;
  height: 275px;
  border-radius: 275px;
  background: linear-gradient(168.68deg, #7c3aed 1.12%, #c084fc 100%);
  display: flex;
  justify-content: center;
  align-items: center;
}

.dialog_description {
  font-size: 20px;
  color: black;
  font-weight: 500;
  padding: 0 40px;
}

.dialog_button_container {
  height: 55px;
  width: 100%;
  display: flex;
  justify-content: space-evenly;
}

.dialog_accept_call_button {
  width: 180px;
  height: 55px;
  background: linear-gradient(180deg, #00c920 0%, #2fe24b 100%);
  box-shadow: 0px 2px 42px 10px rgba(47, 226, 75, 0.15);
  border-radius: 15px;
  transition: 0.5s;
}

.dialog_reject_call_button {
  width: 180px;
  height: 55px;
  background: linear-gradient(180deg, #ff3b3b 0%, #ff6262 100%);
  box-shadow: 0px 2px 42px 10px rgba(255, 59, 59, 0.15);
  border-radius: 15px;
  transition: 0.5s;
}

.dialog_button_image {
  max-width: 100%;
  max-height: 100%;
}

.dashboard_blur {
  position: absolute;
  width: 100%;
  height: 100%;
  left: 0;
  top: 0;
  background: rgba(196, 196, 196, 0.2);
  background-filter: blur(80px);
}

.video_recording_buttons_container {
  position: absolute;
  width: 180px;
  height: 50px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 15px;
  backdrop-filter: blur(60px);
  right: 50px;
  top: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#stop_recording_button {
  color: white;
  height: 28px;
}

.display_none {
  display: none;
}

/* Responsive Design */
@media screen and (max-width: 1200px) {
  .dashboard_container {
    width: 30%;
  }

  .call_container {
    width: 40%;
  }

  .messenger_container {
    width: 30%;
  }

  .logo_container {
    margin-left: 20px;
    width: 150px;
    height: 100px;
  }

  .description_container,
  .personal_code_container,
  .personal_code_connecting_container,
  .stranger_connecting_container,
  .checkbox_container {
    margin-left: 20px;
    margin-right: 20px;
  }

  .videos_container {
    margin: 20px;
  }

  .call_buttons_container,
  .finish_chat_button_container {
    width: 320px;
    left: calc(50% - 160px);
  }
}

@media screen and (max-width: 768px) {
  .main_container {
    flex-direction: column;
    overflow-y: auto;
  }

  .dashboard_container {
    width: 100%;
    height: auto;
    min-height: 400px;
    padding-bottom: 20px;
  }

  .call_container {
    width: 100%;
    height: 500px;
    min-height: 400px;
  }

  .messenger_container {
    width: 100%;
    height: 400px;
    min-height: 300px;
  }

  .logo_container {
    margin-left: 20px;
    margin-top: 20px;
    width: 120px;
    height: 80px;
  }

  .description_container,
  .personal_code_container,
  .personal_code_connecting_container,
  .stranger_connecting_container,
  .checkbox_container {
    margin-left: 20px;
    margin-right: 20px;
  }

  .description_container_paragraph {
    font-size: 14px;
  }

  .personal_code_connecting_paragraph,
  .stranger_title_container {
    font-size: 16px;
  }

  .videos_container {
    margin: 20px;
    height: calc(100% - 40px);
  }

  .local_video_container {
    width: 120px;
    height: 120px;
    top: 10px;
    left: 10px;
  }

  .call_buttons_container,
  .finish_chat_button_container {
    width: 280px;
    left: calc(50% - 140px);
    bottom: 20px;
  }

  .call_button_small {
    width: 45px;
    height: 45px;
  }

  .call_button_large {
    width: 65px;
    height: 65px;
  }

  .new_message_input {
    margin: 0 20px;
    margin-bottom: 20px;
    width: calc(100% - 40px);
    height: 50px;
    padding: 0 50px 0 15px;
  }

  .send_message_button {
    right: 30px;
    top: 5px;
  }

  .messages_container {
    margin: 20px 15px;
  }

  .dialog_content {
    width: 90%;
    max-width: 400px;
    height: auto;
    min-height: 400px;
    padding: 30px 20px;
  }

  .dialog_image_container {
    width: 200px;
    height: 200px;
  }

  .dialog_description {
    font-size: 16px;
    padding: 0 20px;
  }

  .dialog_button_container {
    flex-direction: column;
    height: auto;
    gap: 15px;
  }

  .dialog_accept_call_button,
  .dialog_reject_call_button {
    width: 90%;
  }

  .video_recording_buttons_container {
    right: 20px;
    top: 20px;
    width: 160px;
    height: 45px;
  }

  #stop_recording_button {
    font-size: 12px;
    height: 24px;
  }
}

@media screen and (max-width: 480px) {
  .logo_container {
    width: 100px;
    height: 70px;
  }

  .description_container,
  .personal_code_container,
  .personal_code_connecting_container,
  .stranger_connecting_container,
  .checkbox_container {
    margin-left: 15px;
    margin-right: 15px;
  }

  .personal_code_container {
    height: 100px;
  }

  .personal_code_title_paragraph {
    font-size: 14px;
  }

  .personal_code_value_paragraph {
    font-size: 16px;
  }

  .personal_code_copy_button {
    width: 35px;
    height: 35px;
  }

  .connecting_button {
    height: 50px;
  }

  .checkbox_container_paragraph {
    font-size: 14px;
  }

  .videos_container {
    margin: 15px;
  }

  .local_video_container {
    width: 100px;
    height: 100px;
  }

  .call_buttons_container,
  .finish_chat_button_container {
    width: 240px;
    left: calc(50% - 120px);
    height: 60px;
  }

  .call_button_small {
    width: 40px;
    height: 40px;
  }

  .call_button_large {
    width: 60px;
    height: 60px;
  }

  .new_message_input {
    margin: 0 15px;
    margin-bottom: 15px;
    width: calc(100% - 30px);
    height: 45px;
    font-size: 14px;
  }

  .send_message_button {
    width: 35px;
    height: 35px;
    right: 20px;
    top: 5px;
  }

  .messages_container {
    margin: 15px 10px;
  }

  .message_left_paragraph,
  .message_right_paragraph {
    padding: 15px 10px;
    font-size: 14px;
  }

  .dialog_title {
    font-size: 18px;
  }

  .dialog_image_container {
    width: 150px;
    height: 150px;
  }

  .dialog_description {
    font-size: 14px;
  }
}

/* 원격 제어 스타일 */
.remote_control_container {
  position: absolute;
  bottom: 80px;
  right: 20px;
  background: rgba(0, 0, 0, 0.8);
  border-radius: 10px;
  padding: 15px 20px;
  z-index: 100;
  backdrop-filter: blur(10px);
}

.remote_control_panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.remote_control_title {
  margin: 0;
  font-size: 16px;
  font-weight: bold;
  color: #ffffff;
  margin-bottom: 10px;
}

.remote_control_options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.remote_control_label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #ffffff;
  cursor: pointer;
  user-select: none;
}

.remote_control_label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #7c3aed;
}

.remote_control_label span {
  flex: 1;
}

.remote_control_label:hover {
  opacity: 0.8;
}

/* 전체화면 모드 */
.remote_video.fullscreen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 9999;
  object-fit: contain;
}

/* 전체화면 버튼 */
.fullscreen_button {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 48px;
  height: 48px;
  background-color: rgba(0, 0, 0, 0.5);
  border-radius: 50%;
  cursor: pointer;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease;
}

.fullscreen_button:hover {
  background-color: rgba(0, 0, 0, 0.8);
}

/* 원격 제어 Canvas 레이어 */
.remote_screen_container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  background: #000;
}

#remote_screen {
  width: 100%;
  height: 100%;
  cursor: crosshair;
  object-fit: contain;
}
