/* Fonts */

@font-face {
  font-family: 'ShareTech-Regular';
  src: url('../fonts/ShareTech-Regular/ShareTech-Regular.ttf') format('truetype');
  font-display: swap;
  
}



/* Block html, body /////////////////////////////////////////////////////////////////////////////////////////////////////////////////// */

:root {
  --background-color: #000000C0;
}


html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;

  font-family: Arial, sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;

  overflow: hidden;
  scrollbar-width: none;
}

#wallpaper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

    display: flex;
    justify-content: center;
    align-items: center;

    overflow: hidden;

    background: var(--background-color);
    transition: background 3.0s cubic-bezier(0.6, 0, 1, 1);
}

#interface {
    position: absolute;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    
    background:#00000000;
    
    width: 100%;
    height: 100%;
}

#container {
  display: flex;
  justify-content: center;


  height: 100%;
  width: 100%;
}


/* 左側功能區容器 START ////////////////////////////////////////////////////////////////////////////////////*/
#left-section {

  position: flex;
  width: 100px;
  height: 100%;
  background: var(--left-section-color);

  display: flex;
  flex-direction: column;
  /* 垂直排列 */
  align-items: center;
  /* 水平置中 */

  transition: background 3.0s cubic-bezier(0.6, 0, 1, 1);

}

#left-section .buttom {
  width: 50px;
  height: 50px;
  border-radius: 50%;

  position: relative;
  cursor: pointer;

  --buttom-margin: 20px;
}

/* menu buttom //////////////////////////////////////////*/
#left-section .menu {
  background: var(--buttom-menu-color);
  margin-top: var(--buttom-margin);
}


/* chat buttom //////////////////////////////////////////*/
#left-section .chat {
  margin-top: var(--buttom-margin);
}

#left-section .chatBtn-ON {
  background: var(--buttom-chat_ON-color);
}

#left-section .chatBtn-OFF {
  background: var(--buttom-chat_OFF-color);
}


/* summary buttom //////////////////////////////////////////*/
#left-section .summary {
  background: var(--buttom-summary-color);
  margin-top: var(--buttom-margin);
}

/* subtitles buttom //////////////////////////////////////////*/
#left-section .subtitles {
  background: var(--buttom-subtitles-color);
  margin-top: var(--buttom-margin);;
}

/* colorpalette buttom //////////////////////////////////////////*/
#left-section .colorpalette {
  background: var(--buttom-colorpalette_ON-color);
  margin-top: var(--buttom-margin);;
}

/* home buttom //////////////////////////////////////////*/
#left-section .home {
  background: var(--buttom-home-color);
  margin-top: auto;
  margin-bottom: var(--buttom-margin);;
}


/* 左側功能區容器 END ////////////////////////////////////////////////////////////////////////////////////*/




/* 收納欄 START /////////////////////////////////////////////////////////////////////////////////*/
.sidebar {
  width: 20%;
  height: 100%;
  background-color: #53a9b9;
  /* color: white; */
  padding: 1rem;
  position: fixed;
  top: 0;
  left: 0;
  box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
  transform: translateX(-100%);
  z-index: 1000;

  display: flex;
  flex-direction: column;

  overflow-y: auto;             /* 只讓側邊欄垂直滾動 */
  overflow-x: hidden; 
  scrollbar-width: none;
}

/* 打開側邊欄 */
.sidebar.active {
  transform: translateX(0);
}


.sidebar .sidebar-top_0 {
  display: flex;
  align-items: center;
  padding: 0 1rem;
  /* 建議保留內距 */
  gap: 1rem;
  /* 元素間距 */
  color: black;
}


.sidebar .sidebar-top_0 .menuback {
  width: 50px;
  height: 50px;
  border-radius: 50%;

  background: var(--buttom-menuback-color);

  cursor: pointer;
  display: flex;
}


.sidebar .sidebar-top_1 {
  display: flex;
  white-space: nowrap;
  color: rgb(252, 252, 252);
  font-size: 1.4rem;
  margin: 0;
}

/* 輸入欄 START ////////////////////////////////////////////////////////////////////////////////// */

.sidebar .option-group {
  display: flex;
  flex-direction: column;
  align-items: left;
  /* gap: 10px; */
  width: auto;
  margin-bottom: 10px;
}

.sidebar .option-group label {
  font-weight: bold;
  margin-top: 1rem;
  display: block;
  font-size: 16px;
  /* 調整文字大小 */
  color: #333333;
  /* 設定文字顏色，這裡是深灰色 */

  white-space: nowrap;
  margin-bottom: 0.5rem;
}

.sidebar .option-group select,
.sidebar .option-group input {
  width: 100%;
  padding: 10px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 5px;
  box-sizing: border-box;
}


/* 輸入欄 END ////////////////////////////////////////////////////////////////////////////////// */


.sidebar .buttons {
  display: flex;
  gap: 20px;
  justify-content: center;

  margin-top: auto;
  /* ✅ 推到底部 */
  margin-bottom: 4rem;
}


.sidebar .buttons .button {
  display: inline-block;
  padding: 10px 20px;
  font-size: 18px;
  color: white;
  background-color: #0c535f;
  text-decoration: none;
  border-radius: 50px;
    
  transition: background 0.5s  cubic-bezier(0.6, 0, 1, 1);
}

.sidebar .buttons .button:hover {
  background-color: #073037;
}

/* 收納欄 END /////////////////////////////////////////////////////////////////////////////////*/



/* 顯示區 START /////////////////////////////////////////////////////////////////////////////////////////////// */
#middle-section {
  
  height: 100%;
  width: 95vw;

  display: flex;
  justify-content: center;
  /* 水平置中 */
  align-items: top;
  /* 垂直置中 */
  background-color: transparent;
  padding-left: 10px;
  padding-right: 10px;
}

/* 直播區 START ///////////////////////////////////////////////////////////////////////////////////////////// */
#stream-container {
  width: 75%;
  height: 97%;
  background-color: transparent;
  margin: 10px;
  /* padding: 10px; */

  display: flex;
  flex-direction: column;
  justify-content: center;
  /* 水平置中 */
  align-items: center;
  /* 垂直置中 */
}


.video-container {
  width: 100%;
  height: 80%;
  background-color: #0231623a;
  border-radius: 10px;
  padding: 0;
  /* 移除內部 padding，避免 iframe 被縮小 */
  overflow: hidden;
  /* 圓角生效 */
  position: relative;
  /* 方便 iframe 絕對定位 */

  display: flex;
  justify-content: center;
  align-items: center;

  color: white;
  font-size: 20px;
  text-align: center;
}

.video-container pre {
  font-size: 20px;
}


.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 10px;
  /* 保持圓角 */
}


.stream_translate-container {
  /* 外觀與尺寸 */
  position: relative;
  width: 100%;
  height: 20%;
  background: var(--contain-color_1);
  border-radius: 10px;
  margin-top: 5px;
    
  transition: background 3.0s  cubic-bezier(0.6, 0, 1, 1);

  display: flex;
  justify-content: center;
  align-items: center;
}

/* 直播區 END //////////////////////////////////////////////////////////////////////// */



/* Chat START //////////////////////////////////////////////////////////////////////////*/
.chat-container {
  /* 定位、尺寸與外觀 */
  position: relative;
  width: 25%;
  height: 97%;
  background: var(--contain-color_1);
  margin-top: 10px;
  border-radius: 10px;

  transition: background 3.0s  cubic-bezier(0.6, 0, 1, 1);

  display: flex;
  justify-content: center;
}

.message-container_inner {
  display: flex;
  justify-content: flex-start;
  align-items: center;

  width: 100%;
  height: 100%;
  overflow-y: auto;

  flex-direction: column;


  scrollbar-width: none;
  -ms-overflow-style: none;
}


#chat-box::-webkit-scrollbar {
  display: none;
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  margin-right: 8px;
  vertical-align: middle;
}

/* 回底部按鈕 //////////////////////////////////////////////*/
.scroll-indicator {
  position: absolute;
  bottom: 10px;
  left: 50%;
  width: 40px;
  height: 40px;
  transform: translateX(-50%);
  display: none;

  /* 置中 */
  justify-content: center;
  align-items: center;

  /* style */
  background-color: rgba(144, 238, 144, 0.5);
  color: white;
  font-weight: bold;
  font-size: 20px;

  /* 圓形按鈕 */
  border-radius: 50%;
  cursor: pointer;

  /* 增加陰影效果 */
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* 回底部按鈕 /////////////////////////////////////////////*/

/* Chat EMD //////////////////////////////////////////////////////////////////////////////////////////////*/



/* 訊息 START //////////////////////////////////////////////////////////////////////////////////*/
.message {
  background: var(--message-box-color);
  padding: 10px;
  margin-bottom: 10px;
  border-radius: 5px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  animation: fadeSlideIn 0.6s ease-out;
  transition: 
    transform 0.3s,
    background 3.0s  cubic-bezier(0.6, 0, 1, 1);

  flex: none;
  box-sizing: border-box;
}

#stream_translate-box .message {
  width: 99%;
} 

#stream_translate-box .message-subtitle {
  position: relative;
}

#chat-box_inner .message {
  width: 95%;
}

#chat-box_inner .message-subtitle {
  position: relative;
}

@keyframes fadeSlideIn {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.card-message .avatar {
  width: 24px; 
  height: 24px; 
  border-radius: 50%; 
  margin-right: 6px;
}

.card-message .emoji_1 {
  width: 24px;
  height: 24px;
  vertical-align: middle;
  margin: -1px 2px 1px;
}

.card-message .emoji_2 {
  width: 20px;
  height: 20px;
  vertical-align: middle;
  margin: -1px 2px 1px;
}


/* 文字樣式 START //////////////////////////////////////////////////////////////////// */

.message-box-text_1 {
  color: transparent;
  background: var(--message-CT-background-color) text;
}

/* Message Stream ////////////////////////////////////////////////// */

.message-box-stream_timestamp {
  --message-CT-background-color: var(--message-box-streamTime-color); 
  margin-bottom: 6px; 
  font-size: 18px; 
  font-family: 'ShareTech-Regular';
}

.message-box-stream_original {
  --message-CT-background-color: var(--message-box-translate-color); 
  margin-bottom: 6px; 
  font-size: 16px;
  opacity: 0.6;
}

.message-box-stream_translate {
  --message-CT-background-color: var(--message-box-translate-color); 
  margin-bottom: 6px; 
  font-size: 18px; 
}

.message-box-stream_error {
  --message-CT-background-color: var(--message-box-error-color);
  margin-bottom: 12px; 
  font-size: 13px;
}

.message-box-stream_system {
  --message-CT-background-color: var(--message-box-system-color); 
  margin-bottom: 12px; 
  font-size: 13px; 
}


/* Message Chat ////////////////////////////////////////////////// */

.message-box-chat_name {
  --message-CT-background-color: var(--message-box-name-color); 
  font-size: 16px;
  font-weight: bold;
}

.message-box-chat_timestamp {
  --message-CT-background-color: var(--message-box-chatTime-color); 
  font-size: 16px;
  margin-left: 10px;
}

.message-box-chat_original {
  --message-CT-background-color: var(--message-box-translate-color); 
  font-size: 16px;
  margin-bottom: 6px;
  overflow-wrap: break-word;
  opacity: 0.6;
}

.message-box-chat_translate {
  --message-CT-background-color: var(--message-box-translate-color); 
  font-size: 18px;
  margin-bottom: 6px;
  overflow-wrap: break-word;
}

.message-box-chat_error {
  --message-CT-background-color: var(--message-box-error-color); 
  font-size: 13px; 
  margin-bottom: 12px; 
  overflow-wrap: break-word;
}

.message-box-chat_system {
  --message-CT-background-color: var(--message-box-system-color);
  font-size: 13px;
  margin-bottom: 12px; 
  overflow-wrap: break-word; 
}

/* 文字樣式 END //////////////////////////////////////////////////////////////////// */



/* 字幕封鎖 START /////////////////////////////////////////// */

#stream_translate-box .message-lock-background {
  position: absolute;
  top: -10px;
  left: -10px;
  padding: 10px;
  padding-bottom: 20px;
  border-radius: 5px;

  width: 100%;
  height: 100%;
  display: none;
  justify-content: center;
  align-items: center;
  padding: auto;

  background: #aa00ff7c center / 100% no-repeat;
  z-index: 11;

  animation: message-lock-in 0.3s ease-in forwards;
}

@keyframes message-lock-in {
  0%{transform: scale(0,0);}
  100%{transform: scale(1,1);}
}

#stream_translate-box .message-lock-background:hover {
  background-color: #aa00ffc3;
}

#stream_translate-box .message-lock-img {
  width: 70%;
  height: 70%;
  background: url('../wallpaper/Original/img/Lock.png') center / contain no-repeat;
  opacity: 1;
  z-index: 12;
}


#stream_translate-box .message-subtitle .delete-btn {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 20px;
  height: 20px;
  background: 
    url('../wallpaper/Original/img/Lock.png')center / 70% no-repeat,
    #aa00ff center / 100% no-repeat;

  border: none;
  border-radius: 50%;
  cursor: pointer;

  opacity: 0;
  transition: opacity 0.2s ease;
}

#stream_translate-box .message-subtitle:hover .delete-btn {
  opacity: 1;
}


/* 字幕封鎖 END //////////////////////////////////// */

/* 訊息 END //////////////////////////////////////////////////////////////////////////////////////////*/

/* 顯示區 END /////////////////////////////////////////////////////////////////////////////////////////////// */



/* 畫面調整 START ///////////////////////////////////////////////////////////////////////////////////// */

@media (max-aspect-ratio: 4/3) {

  #middle-section {
    width: 93vw;
    flex-wrap: wrap;
  }

  #stream-container {
    width: 100%;
    height: 70%;
    margin: 5px;
  }

  .video-container {
    height: 70%;
  }

  .stream_translate-container {
    height: 30%;
  }

  .chat-container {
    width: 100%;
    height: 25%;
    margin: 5px;
  }
}


@media (max-width: 1250px) {

  #left-section {
    width: 80px;
  }

  #left-section .buttom {
    width: 40px;
    height: 40px;
    --buttom-margin: 10px;
  }

  .sidebar {
    width: 40%;
  }

  .sidebar .sidebar-top_0 .menuback {
    width: 40px;
    height: 40px;
  }

  .sidebar .sidebar-top_0 h2 {
    font-size: 20px;
  }

  .video-container pre {
    font-size: 15px;
  }
}



@media (max-width: 600px) {
  .container {
    padding: 10px;
  }

  .video-container pre {
    font-size: 10px;
  }
}



@media (max-height: 400px) {
  .sidebar .buttons {
    margin-top: 50px;
  }
}


/* 畫面調整 END ///////////////////////////////////////////////////////////////////////////////////// */
