/* ========================================
   报告查看 - 样式（精确匹配原页面）
   ======================================== */

/* ---------- 全局 ---------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

#app {
  width: 100%;
  height: 100%;
}

.page-wrap {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: linear-gradient(135deg, #f5f7fa, #c3cfe2);
  background-attachment: fixed;
}

/* ---------- 顶部固定栏 ---------- */
.header-fixed {
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  z-index: 999;
  height: 70px;
  background: linear-gradient(135deg, #3a6bc5, #4a90d9 50%, #5ba0e9);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 0 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.logo-section {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  padding-right: 20px;
}

.logo-img {
  height: 58px;
  width: auto;
  max-width: 280px;
  object-fit: contain;
  display: block;
}

.title-section {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  border-left: 2px solid hsla(0, 0%, 100%, 0.3);
  padding-left: 20px;
}

.report-title {
  font-size: 24px;
  color: #fff;
  margin: 0;
  font-weight: 600;
  white-space: nowrap;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  letter-spacing: 1px;
}

/* ---------- 中间内容区 ---------- */
.content-middle {
  flex: 1;
  width: calc(100% - 30px);
  height: calc(100vh - 140px);
  position: relative;
  background-color: hsla(0, 0%, 100%, 0.2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 12px;
  margin: 70px 15px 70px 15px;
  box-shadow: inset 0 4px 12px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

/* PDF 加载状态(模仿原站 YDUI loading 胶囊) */
.pdf-loading {
  position: absolute;
  inset: 0;
  z-index: 10;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f5f7fa, #c3cfe2);
}

/* 深色半透明胶囊 */
.loading-box {
  display: flex;
  align-items: center;
  padding: 0 23px 0 24px;
  height: 48px;
  background: rgba(40, 40, 40, 0.85);
  border-radius: 3px;
  -webkit-animation: loading-zoom-in 0.1s ease forwards;
  animation: loading-zoom-in 0.1s ease forwards;
}

/* 旋转菊花 */
.loading-spinner {
  width: 28px;
  height: 28px;
  background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAMAAAC5zwKfAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAGzUExURUxpcaSmo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo6Smo7OajWMAAACQdFJOUwDzVSjxAgf0ChUBCd/hpyn6+ai70Qz1uB92XuuOR5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e98nvUd1u4L79dO2w9n+8bPX1/5LPv9IWtIbtNVe6GS3mYMyQNeN9LRXGSZLnuXSi3TJe9ywTJNf+SpPSWmrmrK+sx7m755P9hvnSqxtg0Bvk9b5+RjOwd1AgpohtsYnxHaC3Gte+gMnjN75Z8L9jOPFB3WnJK/P7I/VuUfs0V7TrncmP8jtvO4FdRBjgAAAABJRU5ErkJggg==") no-repeat;
  background-size: 28px 28px;
  margin-right: 10px;
  -webkit-animation: loading-rotate 0.45s linear infinite;
  animation: loading-rotate 0.45s linear infinite;
}

.loading-text {
  color: #fff;
  font-size: 15px;
  font-weight: 400;
  margin: 0;
  font-family: SimSun;
  max-width: 140px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

@-webkit-keyframes loading-zoom-in {
  0%   { opacity: 0; -webkit-transform: scale(0.3); transform: scale(0.3); }
  50%  { opacity: 1; }
  100% { opacity: 1; -webkit-transform: scale(1); transform: scale(1); }
}
@keyframes loading-zoom-in {
  0%   { opacity: 0; -webkit-transform: scale(0.3); transform: scale(0.3); }
  50%  { opacity: 1; }
  100% { opacity: 1; -webkit-transform: scale(1); transform: scale(1); }
}

@-webkit-keyframes loading-rotate {
  to { -webkit-transform: rotate(360deg); transform: rotate(360deg); }
}
@keyframes loading-rotate {
  to { -webkit-transform: rotate(360deg); transform: rotate(360deg); }
}

/* PDF 错误提示 */
.pdf-error {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #fff5f5, #ffe0e0);
}

.retry-btn {
  margin-top: 12px;
}

/* PDF 查看器 */
.pdf-wrapper {
  width: 100%;
  height: 100%;
  background-color: #fff;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: #a0a0a0 transparent;
}

.pdf-wrapper::-webkit-scrollbar {
  width: 4px;
}

.pdf-wrapper::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 2px;
}

.pdf-wrapper::-webkit-scrollbar-thumb {
  background-color: #a0a0a0;
  border-radius: 2px;
  transition: background-color 0.3s;
}

.pdf-wrapper::-webkit-scrollbar-thumb:hover {
  background-color: #888;
}

.pdf-canvas-container {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #f5f5f5;
  position: relative;
}

.pdf-all-pages-wrapper {
  overflow: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: 100%;
  height: 100%;
}

.pdf-page-container {
  display: flex;
  justify-content: center;
  width: 100%;
}

.pdf-canvas {
  display: block;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  aspect-ratio: 595 / 842;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
  background: #fff;
}

/* ---------- 底部固定栏 ---------- */
.footer-fixed {
  position: fixed;
  width: 100%;
  bottom: 0;
  left: 0;
  z-index: 999;
  height: 70px;
  background: hsla(0, 0%, 100%, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.footer-row {
  height: 100%;
  padding: 10px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  width: calc(100% - 32px);
  max-width: 800px;
  margin: 0 auto;
}

.footer-col {
  display: flex;
  justify-content: center;
  align-items: center;
}

.footer-btn {
  display: inline-flex !important;
  justify-content: center;
  align-items: center;
  width: 160px;
  height: 44px;
  border-radius: 22px;
  gap: 8px;
  border: none !important;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.contact-btn {
  background: linear-gradient(135deg, #ff6b6b, #ff8e8e) !important;
  color: #fff !important;
  box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
}

.contact-btn:hover {
  background: linear-gradient(135deg, #ff5252, #ff7675) !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
}

.share-btn {
  background: linear-gradient(135deg, #3a6bc5, #4a90d9) !important;
  color: #fff !important;
  box-shadow: 0 2px 8px rgba(58, 107, 197, 0.3);
}

.share-btn:hover {
  background: linear-gradient(135deg, #2a5298, #3a6bc5) !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(58, 107, 197, 0.4);
}

.btn-text {
  font-size: 15px;
}

/* ---------- 分享遮罩 ---------- */
.share-overlay {
  position: fixed;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(101, 45, 147, 0.8) 0, rgba(0, 0, 0, 0.7) 100%);
  z-index: 1001;
  inset: 0;
}

/* ---------- 二维码弹窗 ---------- */
.qr-code-container {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10001;
  background: #fff;
  padding: 20px;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  width: 190px;
  height: 190px;
}

@keyframes popIn {
  0% {
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0;
  }
  to {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
}

.qrcode {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 150px;
  height: 150px;
}

.qrcode canvas,
.qrcode img {
  width: 150px !important;
  height: 150px !important;
}

.qr-tip {
  font-size: 12px;
  color: #999;
  margin: 0;
}

/* ---------- 关闭按钮 ---------- */
.close-btn {
  position: fixed;
  top: calc(50% + 130px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 10002;
  background: linear-gradient(135deg, #3a6bc5, #4a90d9) !important;
  border: none !important;
  color: #fff !important;
  min-width: 90px;
  height: 40px;
  line-height: 38px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.close-btn:hover {
  transform: translateX(-50%) translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* ---------- 响应式 ---------- */
@media screen and (max-width: 768px) {
  .header-fixed {
    height: 68px;
  }

  .header-content {
    padding: 0 15px;
  }

  .logo-section {
    padding-right: 12px;
  }

  .logo-img {
    height: 48px;
    max-width: 220px;
  }

  .title-section {
    padding-left: 12px;
  }

  .report-title {
    font-size: 20px;
  }

  .footer-fixed {
    height: 70px;
  }

  .footer-row {
    padding: 8px 0;
    gap: 16px;
  }

  .footer-btn {
    width: 140px;
    height: 40px;
    border-radius: 20px;
    gap: 6px;
  }

  .btn-text {
    font-size: 14px;
  }

  .qr-code-container {
    width: 190px;
    height: 190px;
  }

  .close-btn {
    top: calc(50% + 140px);
  }
}

@media screen and (max-width: 480px) {
  .header-fixed {
    height: 64px;
  }

  .logo-img {
    height: 42px;
    max-width: 250px;
  }

  .report-title {
    font-size: 18px;
    letter-spacing: 0.5px;
  }

  .title-section {
    border-left-width: 1px;
    padding-left: 10px;
  }

  .logo-section {
    padding-right: 10px;
  }

  .footer-fixed {
    height: 66px;
  }

  .footer-row {
    padding: 6px 0;
    gap: 12px;
  }

  .footer-btn {
    width: 130px;
    height: 38px;
    border-radius: 19px;
    gap: 5px;
  }

  .btn-text {
    font-size: 13px;
  }
}

@media screen and (max-width: 375px) {
  .header-fixed {
    height: 60px;
  }

  .logo-img {
    height: 38px;
    max-width: 160px;
  }

  .report-title {
    font-size: 16px;
  }

  .footer-fixed {
    height: 62px;
  }

  .footer-row {
    gap: 10px;
  }

  .footer-btn {
    width: 120px;
    height: 36px;
    gap: 4px;
  }

  .btn-text {
    font-size: 12px;
  }
}

/* ---------- 打印 ---------- */
@media print {
  .header-fixed,
  .footer-fixed,
  .share-overlay,
  .qr-code-container,
  .close-btn {
    display: none !important;
  }

  .content-middle {
    margin: 0;
    border-radius: 0;
    background: #fff;
    width: 100%;
    height: auto;
  }

  .pdf-page-container {
    page-break-after: always;
  }
}