#tool-body {
  --bar-bg: #fff;
  --bar-text: #333;
  --bar-sub: #888;
  --loading-bg: #f5f5f5;
  --primary: #16baaa;
}
.theme-dark-mode #tool-body {
  --bar-bg: #2d2d2d;
  --bar-text: #eee;
  --bar-sub: #999;
  --loading-bg: #222;
}

#tool-body .lr-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--bar-bg);
  border-radius: 8px 8px 0 0;
}
#tool-body .lr-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--bar-text);
}
#tool-body .lr-title .lr-sub {
  font-size: 12px;
  font-weight: 400;
  color: var(--bar-sub);
  margin-left: 8px;
}
#tool-body .lr-fullscreen-btn {
  cursor: pointer;
  font-size: 13px;
  color: var(--bar-text);
  padding: 6px 12px;
  border-radius: 4px;
  transition: background 0.2s;
  white-space: nowrap;
}
#tool-body .lr-fullscreen-btn:hover {
  background: rgba(22, 186, 170, 0.12);
  color: var(--primary);
}
#tool-body .lr-fullscreen-btn i {
  margin-right: 4px;
}

#tool-body .lr-frame-wrap {
  position: relative;
  width: 100%;
  border-radius: 0 0 8px 8px;
  overflow: hidden;
  background: var(--loading-bg);
}
#tool-body .lr-frame-wrap.is-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 9999999;
  border-radius: 0;
}
#tool-body .lr-frame-wrap.is-fullscreen iframe {
  height: 100% !important;
}

#tool-body .lr-iframe {
  display: block;
  width: 100%;
  border: none;
  min-height: 600px;
  height: calc(100vh - 250px);
  opacity: 0;
  transition: opacity 0.35s ease;
}
#tool-body .lr-iframe.loaded {
  opacity: 1;
}
@media (max-width: 768px) {
  #tool-body .lr-iframe {
    min-height: 300px;
  }

  #tool-body .lr-exit-fullscreen {
    width: 26px !important;
    height: 26px !important;
  }
}

#tool-body .lr-loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--bar-sub);
  font-size: 13px;
  transition: opacity 0.3s ease;
}
#tool-body .lr-loading.hidden {
  opacity: 0;
  pointer-events: none;
}
#tool-body .lr-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(22, 186, 170, 0.2);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: lr-spin 0.8s linear infinite;
}
@keyframes lr-spin {
  to { transform: rotate(360deg); }
}

#tool-body .lr-exit-fullscreen {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 10000000;
  background: rgba(0,0,0,0.55);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}
#tool-body .lr-exit-fullscreen.show {
  display: flex;
}