/* 声盾 & 数盾 使用说明 - 文档全屏 + 浮动切换在下方 */

:root {
  --color-secondary: #4a5568;
  --color-primary: #2d3748;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  color: var(--color-primary);
  line-height: 1.6;
  overflow: hidden;
}

#app {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* Main：文档组件全屏 */
.component.main {
  width: 100%;
  height: 100%;
  padding: 0;
}

.pdf-viewer-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* PDF.js 渲染容器 */
.pdf-viewer-container {
  flex: 1;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px;
  padding-bottom: 80px;
  background: #525659;
}

.pdf-viewer-container .pdf-loading {
  color: #fff;
  text-align: center;
  padding: 2rem;
  font-size: 0.9375rem;
}

.pdf-viewer-container .pdf-error {
  color: #fff;
  text-align: center;
  padding: 2rem;
  font-size: 0.9375rem;
}

/* 由 JS 设置 width/height，仅限制最大宽度防止溢出 */
.pdf-viewer-container .pdf-page-canvas {
  display: block;
  margin: 0 auto 16px;
  max-width: 100%;
  width: auto;
  height: auto;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  vertical-align: top;
}

/* 语言切换 - 浮动在文档下方，固定尺寸不随缩放/切换语言改变 */
.lang-switch-float {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  display: flex;
  justify-content: center;
  flex-shrink: 0;
}

.lang-switch {
  display: inline-flex;
  align-items: stretch;
  border-radius: 999px;
  overflow: hidden;
  width: 180px;
  height: 48px;
  flex-shrink: 0;
}

.lang-switch.glass {
  background: rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.lang-switch-btn {
  flex: 1;
  width: 90px;
  min-width: 90px;
  max-width: 90px;
  height: 48px;
  padding: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 48px;
  color: var(--color-secondary);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: color 0.2s, background 0.2s, box-shadow 0.2s;
  flex-shrink: 0;
}

.lang-switch-btn:hover {
  color: var(--color-primary);
}

.lang-switch-btn.active {
  color: var(--color-primary);
  background: rgba(255, 255, 255, 0.65);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.lang-switch-btn:first-child {
  border-radius: 999px 0 0 999px;
}

.lang-switch-btn:last-child {
  border-radius: 0 999px 999px 0;
}

.lang-switch-btn:focus {
  outline: none;
}

.lang-switch-btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* PC / 大屏 - 保持相同固定尺寸 */
@media (min-width: 640px) {
  .lang-switch-float {
    bottom: 24px;
  }
}
