html {
  height: 100%;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, PingFang SC, Hiragino Sans GB,
    Microsoft Yahei, 微软雅黑, sans-serif;
}

body {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
}

header {
  /* 固定在顶部 */
  position: fixed;
  top: 0;
  width: 100%;
  height: 60px;
  /* background-color: #4caf50; */
  backdrop-filter: blur(30px);
  color: rgb(255, 255, 255);
  text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px 2px rgba(0, 0, 0, 0.2);
  z-index: 1000;
}

.content {
  /* Adjust for header and footer height */
  /* min-height: calc(100vh - 100px); */
  width: 50%;
  margin: 100px auto 0 auto;
  padding: 10px;
}

footer {
  width: 100%;
  height: 80px;
  background-color: #333;
  color: white;
  display: flex;
  position: relative;
  margin-bottom: 0;
  bottom: 0;
  align-items: center;
  justify-content: center;
}

#input_link {
  width: 100%;
  box-sizing: border-box;
  margin-top: 1rem;
}

#videoLinkInput {
  width: 100%;
  height: 100;
  font-size: 16px;
  padding: 15px;
  box-sizing: border-box;
  border-radius: 5px;
  border: 1px solid #ccc;
  position: relative;
  z-index: 0;
  margin-bottom: 10px;
}

#clear_button {
  /* 清除按钮 与videoLinkInput重叠在右侧对齐*/
  width: 20px;
  height: 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  margin-left: 10px;
  /* 右对齐 */
  position: absolute;
  top: 16px;
  right: 10px;
  z-index: 1;
}

.input_with_clear {
  /* 输入框和清除按钮的容器 清除按钮覆盖在videoLinkInput，重叠在右侧对齐*/
  position: relative;
  width: 100%;
}

#videoLinkInput:focus {
  outline: none;
  border-color: #4caf50;
  box-shadow: 0 0 8px 2px #4caf50;
}

.input_div {
  /* 输入框和按钮的容器 */
  display: flex;
  flex-direction: row;
  align-items: center;
  width: 100%;
  /* margin-bottom: 10px; */
}

#paste_button {
  /* 粘贴按钮放在输入框右侧 */
  width: 80px;
  height: 40px;
  background-color: #4caf50;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  margin-left: 10px;
  /* 右对齐 */
  float: right;
}

#paste_button:hover,
#download_button:hover,
.btn:hover {
  background-color: #45a049;
}
#video_cancel,
#audio_cancel {
  width: 50px;
  height: 25px;
  margin-left: 5px;
}
.progressText {
  /* width: 6%; */
  display: inline-block;
}
.downloadProgress{
  width:100%;
}
.progress_bar{
  margin-top: 20px;
}

#paste_button:disabled,
#download_button:disabled,
#download_mp4:disabled,
#download_mp3:disabled,
#video_cancel:disabled,
#audio_cancel:disabled
{
  background-color: #8b8b8b;
}

#paste_button:focus,
#download_button:focus {
  outline: none;
  box-shadow: 0 0 5px rgba(76, 175, 80, 0.5);
}

#download_button {
  font-size: 22px;
  width: 100%;
  height: 40px;
  background-color: #4caf50;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

ul {
  list-style-type: none;
  padding: 0;

  /* 横向排列 */
  display: flex;
  flex-wrap: wrap;
  /* justify-content: space-between; */
  margin: 0;
}

li {
  margin: 5px;
  padding: 10px;
  background-color: #f4f4f4;
  border-radius: 5px;
  display: flex;
  align-items: center;
}

#video_preview {
  width: 100%;
  height: auto;
  max-width: 100%;
  border-radius: 5px;
  margin-top: 10px;
  display: flex;
  justify-content: center;
}

#download_options {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 20px;
  /* margin-left: 10px; */
}

.btn {
  width: 100%;
  height: 40px;
  background-color: #4caf50;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  margin-bottom: 10px;
}

.loader {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #3498db;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

#loading[style="display: flex;"] {
  width: 100%;
  height: 100%;
  display: flex;
  padding-top: 2rem;
  padding-bottom: 2rem;
  align-items: center;
  justify-content: center;
}

#preview_sec {
  /* width: 100%; */
  /* height: 300px; */
  display: none;
  flex-direction: column;
  align-items: center;
  margin-top: 20px;
  /* background-color: #3498db;
    border: #45a049;
    border-radius: 5px; */
}

#mandoc_sec {
  /* margin-top: 20px; */
}

h2 {
  margin-block-start: 0;
}

li a {
  text-decoration: none;
  color: #333;
  flex-grow: 1;
}

li a:hover {
  text-decoration: underline;
}

.half_body {
  display: block;
  background-image: url("https://bing.ee123.net/img/rand");
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  z-index: -1;
}
/* 使用 ::before 添加蒙版 */
.half_body::before {
  content: "";
  position: absolute;
  inset: 0; /* 等同于 top/right/bottom/left: 0 */
  background-color: rgba(0, 0, 0, 0.5); /* 黑色半透明 */
  z-index: 1;
}
.faq {
  margin-top: 50px;
  margin-bottom: 2rem;
}

.section {
  margin-top: 5em;
  margin-bottom: 4em;
  padding: 30px;
  background-color: #f9f9f9;
  border-radius: 20px;
  /* x 偏移量 | y 偏移量 | 阴影模糊半径 | 阴影扩散半径 | 阴影颜色 */
  box-shadow: 0px 0px 8px 2px rgba(0, 0, 0, 0.2);
}

#video_player {
  width: 100%;
  height: 400px;
  background-color: #000;
  border-radius: 5px;
  margin-top: 20px;
}

.hero {
  /* backdrop-filter: blur(1px);
  background-color: rgba(255, 255, 255, 0.254); */
  color: rgb(255, 255, 255);
  text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.663);
  padding: 10px;
  border-radius: 10px;
  /* margin-bottom: 50px; */
  /* margin-top: 4rem; */
}

.hero a {
  color: #c0ee35;
  text-decoration: none;
}

.hero a:hover {
  text-decoration: underline;
}

.error {
  color: rgb(234, 52, 52);
}

@media screen and (max-width: 768px) {
  body {
    font-size: 14px;
  }

  header {
    height: 50px;
    font-size: 16px;
  }

  .content {
    width: 90%;
    margin-top: 70px;
  }

  footer {
    height: 60px;
    font-size: 14px;
  }

  /* #videoLinkInput,
  #download_button {
    width: calc(100% - 20px);
    margin-left: 10px;
    margin-right: 10px;
  } */
}

header a {
  text-decoration: none;
  color: white;
}

