/* MOY 工作室 PC 端增强：主题 / 版权 / AI 润色 / 音色时长 */
:root {
  --ld-footer-h: 46px;
  --ld-theme-bg: rgba(255, 255, 255, 0.92);
  --ld-theme-border: rgba(0, 0, 0, 0.08);
  --ld-theme-text: #64748b;
  --ld-theme-btn-bg: rgba(255, 255, 255, 0.9);
  --ld-theme-btn-border: rgba(0, 0, 0, 0.1);
  --ld-footer-shimmer: linear-gradient(
    90deg,
    #312e81 0%,
    #4338ca 20%,
    #0369a1 45%,
    #6366f1 70%,
    #312e81 100%
  );
}
html.dark {
  --ld-footer-bg: rgba(15, 18, 28, 0.96);
  --ld-footer-shimmer: linear-gradient(
    90deg,
    #c7d2fe 0%,
    #67e8f9 25%,
    #ddd6fe 50%,
    #a5b4fc 75%,
    #c7d2fe 100%
  );
  --ld-theme-bg: rgba(15, 18, 28, 0.92);
  --ld-theme-border: rgba(255, 255, 255, 0.08);
  --ld-theme-text: #94a3b8;
  --ld-theme-btn-bg: rgba(30, 35, 50, 0.95);
  --ld-theme-btn-border: rgba(255, 255, 255, 0.12);
}
html:not(.dark) {
  --ld-footer-bg: rgba(248, 250, 252, 0.96);
}
body.ld-has-footer {
  padding-bottom: calc(var(--ld-footer-h) + 8px) !important;
}
#ld-copyright-footer,
#ld-copyright-footer-clone {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 99999;
  height: var(--ld-footer-h);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  background: var(--ld-footer-bg);
  border-top: 1px solid var(--ld-theme-border);
  text-align: center;
  backdrop-filter: blur(10px);
  pointer-events: none;
  overflow: hidden;
}
#ld-copyright-footer-clone {
  display: none !important;
}
.ld-footer-text {
  display: inline-block;
  max-width: 100%;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background-image: var(--ld-footer-shimmer);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: ld-footer-breathe 3.2s ease-in-out infinite, ld-footer-shimmer 7s linear infinite;
}
@keyframes ld-footer-breathe {
  0%,
  100% {
    opacity: 0.78;
    filter: brightness(0.95);
  }
  50% {
    opacity: 1;
    filter: brightness(1.12);
  }
}
@keyframes ld-footer-shimmer {
  0% {
    background-position: 0% center;
  }
  100% {
    background-position: 200% center;
  }
}
@media (max-width: 768px) {
  .ld-footer-text {
    font-size: 12px;
    white-space: normal;
    text-overflow: unset;
  }
}
.ld-hide-profile-nav {
  display: none !important;
}
.ld-sidebar-bottom-compact {
  gap: 0 !important;
  padding-bottom: 8px !important;
}
#ld-user-menu {
  position: fixed !important;
  top: 12px !important;
  right: 56px !important;
  z-index: 2147483646 !important;
}
#ld-user-menu-btn {
  width: 36px;
  height: 36px;
  margin: 0;
  padding: 0;
  border-radius: 999px;
  border: 2px solid var(--ld-theme-btn-border);
  background: var(--ld-theme-btn-bg);
  color: var(--ld-theme-text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  transition: transform 0.2s, box-shadow 0.2s;
}
#ld-user-menu-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
#ld-user-menu-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.18);
}
.ld-user-menu-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 168px;
  padding: 8px;
  border-radius: 12px;
  border: 1px solid var(--ld-theme-border);
  background: var(--ld-theme-bg);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
}
html.dark .ld-user-menu-panel {
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}
.ld-user-menu-panel.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}
.ld-user-menu-head {
  padding: 8px 10px 6px;
  border-bottom: 1px solid var(--ld-theme-border);
  margin-bottom: 4px;
}
.ld-user-menu-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--ld-theme-text);
  line-height: 1.4;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ld-user-menu-uid {
  margin-top: 2px;
  font-size: 11px;
  color: #94a3b8;
}
.ld-user-menu-items {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ld-user-menu-item {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 9px 10px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  text-decoration: none;
  font-size: 13px;
  line-height: 1.2;
  cursor: pointer;
  text-align: left;
}
.ld-user-menu-item:hover {
  background: rgba(99, 102, 241, 0.1);
  color: #6366f1;
}
html.dark .ld-user-menu-item:hover {
  color: #a5b4fc;
}
.ld-user-menu-logout {
  color: #ef4444 !important;
}
.ld-user-menu-logout:hover {
  background: rgba(239, 68, 68, 0.1) !important;
  color: #ef4444 !important;
}
#ld-theme-toggle {
  position: fixed !important;
  top: 12px !important;
  right: 12px !important;
  left: auto !important;
  bottom: auto !important;
  z-index: 2147483646 !important;
  width: 36px;
  height: 36px;
  margin: 0 !important;
  padding: 0;
  border-radius: 10px;
  border: 1px solid var(--ld-theme-btn-border);
  background: var(--ld-theme-btn-bg);
  color: var(--ld-theme-text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  transition: transform 0.2s, box-shadow 0.2s;
  pointer-events: auto;
  transform: none;
}
#ld-theme-toggle:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.18);
}
@media (max-width: 768px) {
  #ld-user-menu {
    display: none !important;
  }
  #ld-theme-toggle {
    top: 10px !important;
    right: 10px !important;
  }
}
.ld-polish-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.ld-polish-row label,
.ld-polish-row .ld-polish-label {
  flex: 1;
  min-width: 0;
}
.ld-polish-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.ld-polish-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid rgba(99, 102, 241, 0.35);
  background: rgba(99, 102, 241, 0.1);
  color: #6366f1;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.2s;
}
html.dark .ld-polish-btn {
  color: #a5b4fc;
  background: rgba(99, 102, 241, 0.18);
}
.ld-polish-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.ld-restore-btn {
  padding: 2px 8px;
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 11px;
  cursor: pointer;
  text-decoration: underline;
}
.ld-restore-btn:hover {
  color: #6366f1;
}
.ld-polish-label {
  font-size: 13px;
  color: inherit;
  flex: 1;
  min-width: 0;
}
.ld-polish-wrap {
  width: 100%;
}
