body {
  height: 100%;
  margin: 0;
  background: #ffffff;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  /* 隐藏窗口滚动条（Firefox/旧版 Edge）但保留滚动 */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge (旧版) */
}
/* 隐藏窗口滚动条（Chrome/Safari/WebKit）但保留滚动 */
html::-webkit-scrollbar,
body::-webkit-scrollbar {
  width: 0;
  height: 0;
}
html {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
/* 缩放与高度变量：统一控制 app-main 的视觉与补偿 */
:root {
  --app-scale: 0.8;
  --app-height: 840px;
}
html[lang^="en"] {
  font-family: "Rubik", "Segoe UI", Roboto, Arial, "Microsoft YaHei",
    "Noto Sans CJK SC", sans-serif;
}

.rubik-regular {
  font-family: "Rubik", "Segoe UI", Roboto, Arial, "Microsoft YaHei",
    "Noto Sans CJK SC", sans-serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
}
/* 主内容区：固定尺寸并居中显示 */
.app-main {
  width: 1222px;
  height: var(--app-height);
  padding: 20px;
  display: flex;
  flex-direction: column;
  margin: 40px auto;
  margin-bottom: calc((1 - var(--app-scale)) * var(--app-height) * -1 + 40px);
  border-radius: 7px;
  opacity: 1;
  background: #f3f3f3;
  border: 1px solid #c8c8c8;
  box-sizing: border-box;
}

.app-main {
  transform: scale(var(--app-scale));
  transform-origin: top center;
}
.titlebar {
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  font-size: 14px;
  font-weight: medium;
  margin-top: 20px;
}

.titlebar .app-icon {
  width: 24px;
  height: 24px;
  margin-right: 8px;
  border-radius: 3px;
  opacity: 1;
}

.titlebar-left {
  display: flex;
  align-items: center;
  gap: 8px;
}
.titlebar-right {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-left: auto;
}
.titlebar-right .nav-link {
  font-size: 14px;
  color: #070707;
  font-weight: 700;
  text-decoration: none;
}
.titlebar-right .nav-link:hover {
  text-decoration: none;
}

.nav-dropdown {
  position: relative;
}
.nav-dropdown .dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.nav-dropdown .dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 120px;
  padding: 6px 8px;
  border-radius: 7px;
  background: rgba(243, 243, 243, 0.95);
  border: 1px solid #d1d1d1;
  display: none;
  z-index: 50;
}
.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu {
  display: block;
}
.dropdown-item {
  display: block;
  color: #070707;
  text-decoration: none;
  padding: 6px 8px;
  border-radius: 6px;
  font-weight: 700;
}
.dropdown-item:hover {
  background: rgba(0, 0, 0, 0.06);
}
.dropdown-item.disabled,
.dropdown-item[aria-disabled="true"] {
  color: #9b9b9b;
  cursor: not-allowed;
  pointer-events: none;
}

.docs-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 40px;
  box-sizing: border-box;
}
.docs-frame {
  width: 100%;
  height: calc(100vh - 140px);
  border: none;
  border-radius: 8px;
  background: #fff;
}

.page-header {
  text-align: center;
  padding: 8px 0 12px;
  margin-top: 100px;
}
.page-header h1 {
  margin: 4px 0;
  font-size: 80px;
}

.main-pane {
  display: flex;
  gap: 16px;
}
.pane-left {
  flex: 0 0 306px;
  width: 306px;
}
.pane-right {
  width: 860px;
  height: 800px;
  box-sizing: border-box;
  border-radius: 7px;
  opacity: 1;
  background: #f9f9f9;
  border: 1px solid #e5e5e5;
  display: block;
  position: relative;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  margin: 0;
}

.pane-right.drop-highlight {
  border-color: #52acff;
  box-shadow: 0 0 0 2px rgba(82, 172, 255, 0.25) inset;
}

.empty-state {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 197px;
  height: 197px;
  border-radius: 20px;
  opacity: 1;
  box-sizing: border-box;
  border: 1px dashed #e2e2e2;
  display: flex;
  align-items: center;
  justify-content: center;
}

.empty-state-text {
  text-align: center;
  width: 100%;
  color: #9b9b9b;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
}
.pane-left .input-row {
  display: flex;
  align-items: center;
  gap: 7px;
}
.pane-left .input-wrap {
  position: relative;
  width: 246px;
  height: 34px;
  display: flex;
  align-items: center;
}
.pane-left .input-wrap::before {
  content: "";
  position: absolute;
  left: 0px;
  top: 50%;
  width: 3px;
  height: 18px;
  background: #6d69d8;
  border-radius: 4px;
  transform: translateY(-50%);
  opacity: 0;
  transition: opacity 0.15s ease;
}
.pane-left .input-wrap:focus-within::before {
  opacity: 1;
}
.pane-left .album-input {
  width: 100%;
  height: 34px;
  border-radius: 4px;
  opacity: 1;
  background: rgba(0, 0, 0, 0.0373);
  box-sizing: border-box;
  padding: 0 10px;
  border: 1px solid #e5e5e5;
  outline: none;
}
.pane-left .btn-add {
  width: 53px;
  height: 34px;
  border-radius: 4px;
  opacity: 1;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid;
  border-image: linear-gradient(
      180deg,
      rgba(0, 0, 0, 0.0578) 90%,
      rgba(0, 0, 0, 0.1622) 100%
    )
    1;
  cursor: pointer;
}

.pane-left .btn-add:hover {
  background: rgba(247, 247, 247, 0.7);
  border-image: linear-gradient(
      180deg,
      rgba(0, 0, 0, 0.0578) 90%,
      rgba(0, 0, 0, 0.1622) 100%
    )
    1;
}

.app-toast {
  position: fixed;
  top: 16px;
  right: 16px;
  max-width: 60vw;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: bold;
  color: #ffffff;
  z-index: 2000;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  pointer-events: none;
}
.app-toast.show {
  opacity: 1;
  transform: translateY(0);
}
.app-toast.success {
  border-radius: 10px;
  opacity: 1;
  background: #66cfff;
  border: 1.4px solid #bfedff;
}
.app-toast.error {
  border-radius: 10px;
  opacity: 1;
  background: #f05517;
  border: 1.4px solid #b2311d;
}

.text-input {
  width: 265px;
  height: 28px;
  border-radius: 3px;
  opacity: 1;
  background: #f3f3f3;
  border: 1px solid #e5e5e5;
  box-sizing: border-box;
  padding: 0 8px;
  outline: none;
}

.image-preview-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.image-preview-modal.open {
  display: flex;
}
.image-preview-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.05);
}
.image-preview-panel {
  position: relative;
  max-width: 80vw;
  max-height: 80vh;
  border-radius: 7px;
  background: rgba(243, 243, 243, 0.3);
  border: 1px solid #d1d1d1;
  backdrop-filter: blur(10px);
  box-sizing: border-box;
  padding: 12px;
  display: flex;
  flex-direction: column;
}
.image-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.image-preview-title {
  font-weight: bold;
  font-size: 16px;
}
.image-preview-close {
  appearance: none;
  border: none;
  background: transparent;
  border-radius: 0;
  padding: 0;
  width: auto;
  height: auto;
  cursor: pointer;
}
.image-preview-close img {
  width: 14px;
  height: 14px;
}
.image-preview-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
}
.image-preview-body .preview-image {
  max-width: 76vw;
  max-height: 65vh;
  border-radius: 10px;
  display: block;
}

.preview-meta {
  font-size: 12px;
  color: #333;
  display: flex;
  gap: 10px;
}

.preview-filename-edit {
  height: 20px;
  min-width: 140px;
  border-radius: 3px;
  background: #f3f3f3;
  border: 1px solid #d1d1d1;
  box-sizing: border-box;
  padding: 0 6px;
  font-size: 12px;
  outline: none;
}
.btn-browse {
  padding: 0;
  width: 90px;
  height: 28px;
  border-radius: 3px;
  opacity: 1;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid;
  border-image: linear-gradient(
      180deg,
      rgba(0, 0, 0, 0.0578) 90%,
      rgba(0, 0, 0, 0.1622) 100%
    )
    1;
  cursor: pointer;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

.btn-browse:hover {
  background: rgba(231, 231, 231, 0.85);
  box-shadow: 0px 1px 0px 0px rgba(0, 0, 0, 0.06);
}

.btn-browse:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(82, 172, 255, 0.35);
}

.btn-change:hover {
  background: rgba(231, 231, 231, 0.85);
  box-shadow: 0px 1px 0px 0px rgba(0, 0, 0, 0.06);
}
.btn-change:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(82, 172, 255, 0.35);
}

.todo-list {
  margin-top: 20px;
  height: 586px;
  overflow-y: auto;
  box-sizing: border-box;
  scrollbar-width: none;
}
.todo-list::-webkit-scrollbar {
  display: none;
}
.todo-item {
  width: 296px;
  height: 34px;
  border-radius: 3px;
  opacity: 1;
  background: #eaeaea;
  font-size: 14px;
  display: flex;
  align-items: center;
  margin-bottom: 10px;
  padding-left: 10px;
  position: relative;
}
.todo-item:last-child {
  margin-bottom: 0;
}
.todo-item::before {
  content: "";
  position: absolute;
  left: 0px;
  top: 50%;
  width: 4px;
  height: 18px;
  border-radius: 999px;
  opacity: 0;
  background: #e16148;
  transform: translateY(-50%);
  pointer-events: none;
  transition: opacity 120ms ease;
}
.todo-item:hover::before {
  opacity: 1;
}
.todo-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 240px;
}
.todo-delete {
  margin-left: auto;
  appearance: none;
  border: none;
  background: transparent;
  width: 24px;
  height: 24px;
  line-height: 24px;
  border-radius: 4px;
  cursor: pointer;
  color: #777;
}
.todo-delete:hover {
  color: #000;
  background: rgba(0, 0, 0, 0.06);
}

.todo-delete .icon-x {
  display: inline-block;
  transition: transform 220ms ease;
}
.todo-delete:hover .icon-x {
  transform: rotate(180deg);
}

.todo-edit-input {
  max-width: 296px;
  height: 34px;
  border-radius: 3px;
  border: 1px solid#eaeaea;
  padding: 0 6px;
  font-size: 14px;
  outline: none;
  background: #eaeaea;
}

.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, 95px);
  gap: 12px;
  padding: 8px 10px;
  align-content: start;
}
.image-grid .image-item {
  width: 95px;
  height: 95px;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}
.image-grid .image-item.selected {
  box-shadow: 0 0 0 2px #52acff;
}
.image-grid .image-item img {
  width: 95px;
  height: 95px;
  border-radius: 10px;
  object-fit: cover;
  display: block;
}
.image-context-menu {
  position: absolute;
  left: 0;
  top: 0;
  display: none;
  min-width: 32px;
  height: 24px;
  padding: 6px;
  border-radius: 7px;
  background: rgba(243, 243, 243, 0.3);
  border: 1px solid #d1d1d1;
  backdrop-filter: blur(10px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
  z-index: 20;
}
.image-context-menu.open {
  display: block;
}
.image-context-menu .ctx-item {
  appearance: none;
  border: none;
  background: transparent;
  width: 100%;
  height: 24px;
  border-radius: 6px;
  cursor: pointer;
  text-align: left;
  padding: 0 8px;
  color: #070707;
}
.image-context-menu .ctx-item:hover {
  background: rgba(0, 0, 0, 0.06);
}
.footer-text {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 8px 12px;
  font-size: 12px;
  color: #777;
  margin-top: auto;
  margin-bottom: 10px;
}
.version-drawer {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 900;
}
.version-drawer.open {
  display: block;
}
.version-drawer .drawer-panel {
  position: absolute;
  right: 0;
  top: 0;
  width: 360px;
  height: 100%;
  border-left: 1px solid #d1d1d1;
  background: rgb(255, 255, 255);
  padding: 16px;
  box-sizing: border-box;
  transform: translateX(100%);
  transition: transform 0.2s ease;
  display: flex;
  flex-direction: column;
}
.version-drawer.open .drawer-panel {
  transform: translateX(0);
}
.vd-close {
  appearance: none;
  border: none;
  background: transparent;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  cursor: pointer;
  position: absolute;
  top: 10px;
  left: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}
.vd-close:hover {
  background: rgba(0, 0, 0, 0.06);
}
.vd-close img {
  width: 14px;
  height: 14px;
}
.vd-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.vd-list.vd-scroll {
  overflow-y: auto;
  scrollbar-width: none;
  flex: 1 1 auto;
}
.vd-list.vd-scroll::-webkit-scrollbar {
  display: none;
}
.vd-item {
  margin-top: 60px;
  margin-left: 10px;
  margin-right: 10px;
}
.vd-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}
.vd-date {
  color: #9b9b9b;
  font-size: 16px;
  letter-spacing: 2px;
  order: 2;
  text-align: right;
}
.vd-version {
  color: #070707;
  font-weight: 700;
  font-size: 16px;
  order: 1;
}
.vd-desc {
  color: #9b9b9b;
  font-size: 14px;
  margin-top: 10px;
  text-align: left;
}
