/* 语言适配的响应式样式 */

/* bilibili 链接样式 - 确保图标和文字在同一行 */
.bilibili-link {
  display: flex;
  align-items: center;
  padding: 5px 10px;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
}

.bilibili-link img {
  height: 20px;
  margin-right: 10px;
  flex-shrink: 0;
}

#bilibili-text {
  color: black;
  font-family: 'HarmonyOS_Sans_Medium';
  flex-shrink: 1;
  white-space: nowrap;
}

/* 日语和英语版本的文本大小调整 */
html[lang="en"] #bilibili-text,
html[lang="ja"] #bilibili-text {
  font-size: 0.9rem;
  letter-spacing: -0.2px;
}

/* 基础样式 - 所有屏幕尺寸通用 */
/* 日语宣传片标题在所有屏幕尺寸下都缩小字体 */
html[lang="ja"] #video .wu-h2.no-wrap {
  font-size: 1.4rem;
  letter-spacing: -0.7px;
  padding-right: 3px;
  transform: scale(0.95, 1); /* 水平缩放文本 */
  transform-origin: left;
  display: inline-block;
  max-width: 100%;
}

/* 日语版本 PhosoftWebPages 标题特殊处理 */
html[lang="ja"] .wu-block.wu-mw:first-child .wu-h1.no-wrap {
  font-size: 1.9rem;
  letter-spacing: -1px;
  transform: scale(0.9, 1);
  transform-origin: left;
  display: inline-block;
  max-width: 100%;
}

/* 移除欢迎来到的特殊处理，恢复正常字号 */
html[lang="ja"] .wu-block.wu-mw:first-child .wu-h2.no-wrap {
  /* 不需要特别处理 */
}

/* 基础样式 */
html[lang="en"] .wu-h2,
html[lang="ja"] .wu-h2 {
  word-break: normal;
  hyphens: auto;
}

html[lang="en"] .wu-links a,
html[lang="ja"] .wu-links a {
  word-break: normal;
}

/* 特别处理视频区域标题和页脚文本 */
html[lang="en"] .wu-block.wu-mw:last-child .wu-box p.no-wrap,
html[lang="ja"] .wu-block.wu-mw:last-child .wu-box p.no-wrap {
  line-height: 1.3;
}

/* 移动设备适配 */
@media (max-width: 768px) {
  /* 英文版本字体缩小 */
  html[lang="en"] .wu-h1 {
    font-size: 1.8rem;
  }

  html[lang="en"] .wu-h2 {
    font-size: 1.4rem;
  }

  html[lang="en"] #video .wu-h2.no-wrap {
    font-size: 20px;
    line-height: 1.2;
    letter-spacing: -0.3px;
  }

  html[lang="en"] .wu-links a {
    font-size: 0.9rem;
  }

  /* 英文版页脚优化 */
  html[lang="en"] .wu-block.wu-mw:last-child .wu-box p.no-wrap {
    font-size: 0.85rem;
  }

  /* 中文版标题 */
  #video .wu-h2.no-wrap {
    font-size: 20px;
  }

  /* 日语版本字体缩小 */
  html[lang="ja"] .wu-h1 {
    font-size: 1.5rem;
    letter-spacing: -0.5px;
  }

  html[lang="ja"] .wu-h2 {
    font-size: 1.1rem;
    letter-spacing: -0.5px;
  }

  html[lang="ja"] #video .wu-h2.no-wrap {
    font-size: 1.15rem;
    letter-spacing: -0.8px;
    padding: 0;
    transform: scale(0.95, 1);
  }

  /* 日语版 PhosoftWebPages 文字特殊处理 */
  html[lang="ja"] .wu-block.wu-mw:first-child .wu-h1.no-wrap {
    font-size: 1.4rem;
    letter-spacing: -1.2px;
    transform: scale(0.85, 1);
  }
}

/* 小屏幕设备额外优化 */
@media (max-width: 480px) {
  /* 中文版小屏幕标题 */
  #video .wu-h2.no-wrap {
    font-size: 18px;
  }

  /* 日语版本超小屏幕优化 */
  html[lang="ja"] #video .wu-h2.no-wrap {
    font-size: 1.05rem;
    letter-spacing: -0.9px;
    padding: 0;
    transform: scale(0.92, 1);
  }

  /* 日语版 PhosoftWebPages 文字特殊处理 */
  html[lang="ja"] .wu-block.wu-mw:first-child .wu-h1.no-wrap {
    font-size: 1.2rem;
    letter-spacing: -1.4px;
    transform: scale(0.8, 1);
  }
}

/* 超小屏幕额外优化 */
@media (max-width: 360px) {
  /* 中文版超小屏幕 */
  #video .wu-h2.no-wrap {
    font-size: 16px;
  }

  html[lang="ja"] #video .wu-h2.no-wrap {
    font-size: 0.95rem;
    letter-spacing: -1px;
    transform: scale(0.9, 1);
  }

  html[lang="ja"] .wu-block.wu-mw:first-child .wu-h1.no-wrap {
    font-size: 1.1rem;
    letter-spacing: -1.6px;
    transform: scale(0.75, 1);
  }
}

/* 繁体中文和日语字体优化 */
@font-face {
    font-family: 'Noto Sans TC';
    src: url('https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@400;500;700&display=swap');
    font-display: swap;
}

@font-face {
    font-family: 'Noto Sans JP';
    src: url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;700&display=swap');
    font-display: swap;
}

/* 对特定元素增强字体清晰度 */
.wu-h1, .wu-h2, .wu-h3,
.wu-links a, .wu-box p, #bilibili-text {
    font-weight: 500;
}

/* 特别处理繁体中文和日语中的标题元素 */
html[lang="zh-tw"] .wu-h1,
html[lang="zh-tw"] .wu-h2,
html[lang="zh-hk"] .wu-h1,
html[lang="zh-hk"] .wu-h2,
html[lang="ja"] .wu-h1,
html[lang="ja"] .wu-h2 {
    letter-spacing: 0.02em;
    font-weight: 600;
}

/* 提高繁体中文和日语文本的清晰度 */
html[lang="zh-tw"] .wu-box,
html[lang="zh-hk"] .wu-box,
html[lang="ja"] .wu-box {
    text-shadow: 0 0 1px rgba(0,0,0,0.05);
}
