/*
 * Theme: theme-Serenity
 * Author: Serenity
 * Build: 2026-06-03 10:28:07
 * Fingerprint: 18f8d0015be24d2b
 * Copyright (c) 2026 Serenity. All rights reserved.
 */

.footer-legal-link {
  color: var(--text-tertiary, #9ca3af);
  text-decoration: none;
  transition: color 0.2s;
  margin: 0 2px;
}
.footer-legal-link:hover {
  color: var(--color-accent);
}
.footer-legal-separator {
  color: var(--text-tertiary, #9ca3af);
  margin: 0 4px;
}
.legal-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.legal-modal.active {
  display: flex;
}
.legal-modal-content {
  background: rgba(17, 17, 17, 0.65);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-radius: 20px;
  width: 90%;
  max-width: 720px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.15);
  animation: legalModalSlideIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  border: 2px solid var(--color-accent);
  overflow: hidden;
  position: relative;
}
@keyframes legalModalSlideIn {
  from { opacity: 0; transform: translateY(-30px) scale(0.9); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.legal-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border: none;
  background: var(--color-accent);
  border-radius: 10px;
  font-size: 18px;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.legal-modal-close:hover {
  filter: brightness(1.1);
  transform: rotate(90deg) scale(1.1);
}
.legal-modal-body {
  padding: 32px;
  overflow-y: auto;
  font-size: 15px;
  line-height: 1.9;
  color: rgba(255, 255, 255, 0.85) !important;
}
.legal-modal-body p,
.legal-modal-body li,
.legal-modal-body span {
  color: rgba(255, 255, 255, 0.85) !important;
}
/* Markdown 云朵标题样式 h1-h6 */
.legal-modal-body h1 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-accent);
  margin: 1.8em 0 0.8em;
  padding-left: 30px;
  position: relative;
}
.legal-modal-body h1::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  background-color: var(--color-accent);
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96z'/%3E%3C/svg%3E");
  mask-size: contain;
  -webkit-mask-size: contain;
  mask-repeat: no-repeat;
  -webkit-mask-repeat: no-repeat;
}
.legal-modal-body h1:first-child { margin-top: 0; }
.legal-modal-body h2 {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--color-accent);
  margin: 1.6em 0 0.6em;
  padding-left: 28px;
  position: relative;
}
.legal-modal-body h2::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  background-color: var(--color-accent);
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96z'/%3E%3C/svg%3E");
  mask-size: contain;
  -webkit-mask-size: contain;
  mask-repeat: no-repeat;
  -webkit-mask-repeat: no-repeat;
}
.legal-modal-body h2:first-child { margin-top: 0; }

.legal-modal-body h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--color-accent);
  margin: 1.4em 0 0.5em;
  padding-left: 26px;
  position: relative;
  opacity: 0.9;
}
.legal-modal-body h3::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  background-color: var(--color-accent);
  opacity: 0.85;
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 24'%3E%3Cpath d='M25.35 10.04C24.67 6.59 21.64 4 18 4c-2.89 0-5.4 1.64-6.65 4.04C8.34 8.36 6 10.91 6 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96z' opacity='0.5'/%3E%3Cpath d='M19.35 12.04C18.67 8.59 15.64 6 12 6 9.11 6 6.6 7.64 5.35 10.04 2.34 10.36 0 12.91 0 16c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 24'%3E%3Cpath d='M25.35 10.04C24.67 6.59 21.64 4 18 4c-2.89 0-5.4 1.64-6.65 4.04C8.34 8.36 6 10.91 6 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96z' opacity='0.5'/%3E%3Cpath d='M19.35 12.04C18.67 8.59 15.64 6 12 6 9.11 6 6.6 7.64 5.35 10.04 2.34 10.36 0 12.91 0 16c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96z'/%3E%3C/svg%3E");
  mask-size: contain;
  -webkit-mask-size: contain;
  mask-repeat: no-repeat;
  -webkit-mask-repeat: no-repeat;
}
.legal-modal-body h3:first-child { margin-top: 0; }
.legal-modal-body h4 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--color-accent);
  margin: 1.2em 0 0.4em;
  padding-left: 24px;
  position: relative;
  opacity: 0.8;
}
.legal-modal-body h4::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  background-color: var(--color-accent);
  opacity: 0.7;
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 36 26'%3E%3Cpath d='M29.35 8.04C28.67 4.59 25.64 2 22 2c-2.89 0-5.4 1.64-6.65 4.04C12.34 6.36 10 8.91 10 12c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96z' opacity='0.3'/%3E%3Cpath d='M25.35 11.04C24.67 7.59 21.64 5 18 5c-2.89 0-5.4 1.64-6.65 4.04C8.34 9.36 6 11.91 6 15c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96z' opacity='0.6'/%3E%3Cpath d='M19.35 14.04C18.67 10.59 15.64 8 12 8 9.11 8 6.6 9.64 5.35 12.04 2.34 12.36 0 14.91 0 18c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 36 26'%3E%3Cpath d='M29.35 8.04C28.67 4.59 25.64 2 22 2c-2.89 0-5.4 1.64-6.65 4.04C12.34 6.36 10 8.91 10 12c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96z' opacity='0.3'/%3E%3Cpath d='M25.35 11.04C24.67 7.59 21.64 5 18 5c-2.89 0-5.4 1.64-6.65 4.04C8.34 9.36 6 11.91 6 15c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96z' opacity='0.6'/%3E%3Cpath d='M19.35 14.04C18.67 10.59 15.64 8 12 8 9.11 8 6.6 9.64 5.35 12.04 2.34 12.36 0 14.91 0 18c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96z'/%3E%3C/svg%3E");
  mask-size: contain;
  -webkit-mask-size: contain;
  mask-repeat: no-repeat;
  -webkit-mask-repeat: no-repeat;
}
.legal-modal-body h4:first-child { margin-top: 0; }
.legal-modal-body h5 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-accent);
  margin: 1em 0 0.3em;
  padding-left: 22px;
  position: relative;
  opacity: 0.7;
}
.legal-modal-body h5::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  background-color: var(--color-accent);
  opacity: 0.6;
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96z'/%3E%3C/svg%3E");
  mask-size: contain;
  -webkit-mask-size: contain;
  mask-repeat: no-repeat;
  -webkit-mask-repeat: no-repeat;
}
.legal-modal-body h5:first-child { margin-top: 0; }
.legal-modal-body h6 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-accent);
  margin: 0.8em 0 0.3em;
  padding-left: 20px;
  position: relative;
  opacity: 0.6;
}
.legal-modal-body h6::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  background-color: var(--color-accent);
  opacity: 0.5;
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96z'/%3E%3C/svg%3E");
  mask-size: contain;
  -webkit-mask-size: contain;
  mask-repeat: no-repeat;
  -webkit-mask-repeat: no-repeat;
}
.legal-modal-body h6:first-child { margin-top: 0; }
.legal-modal-body p { 
  margin: 1em 0; 
  text-align: justify;
}
.legal-modal-body ul, .legal-modal-body ol { 
  padding-left: 1.8em; 
  margin: 1em 0; 
}
.legal-modal-body ul { list-style-type: disc; }
.legal-modal-body ol { list-style-type: decimal; }
.legal-modal-body li { 
  margin: 0.5em 0; 
  line-height: 1.8;
}
.legal-modal-body ul > li::marker,
.legal-modal-body ol > li::marker {
  color: var(--color-accent);
}
.legal-modal-body strong {
  color: rgba(255, 255, 255, 0.95) !important;
  font-weight: 600;
}
.legal-modal-body em {
  font-style: italic;
  color: rgba(255, 255, 255, 0.75) !important;
}
.legal-modal-body a {
  color: var(--color-accent);
  text-decoration: none;
  border-bottom: 1px dashed var(--color-accent);
  transition: all 0.2s;
}
.legal-modal-body a:hover {
  border-bottom-style: solid;
  opacity: 0.8;
}
.legal-modal-body blockquote {
  margin: 1.5em 0;
  padding: 1em 1.5em;
  background: rgba(255, 255, 255, 0.1);
  border-left: 4px solid var(--color-accent);
  border-radius: 0 12px 12px 0;
  font-style: italic;
  color: rgba(255, 255, 255, 0.75);
}
.legal-modal-body code {
  background: rgba(255, 255, 255, 0.15);
  padding: 0.2em 0.5em;
  border-radius: 4px;
  font-size: 0.9em;
  color: var(--color-accent);
  font-family: var(--font-global, var(--font-mono, "JetBrains Mono", "Fira Code", Consolas, monospace));
}
.legal-modal-body hr {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
  margin: 2em 0;
}
/* 滚动条样式 */
.legal-modal-body::-webkit-scrollbar {
  width: 6px;
}
.legal-modal-body::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 3px;
}
.legal-modal-body::-webkit-scrollbar-thumb {
  background: var(--color-accent);
  border-radius: 3px;
}
@media (max-width: 640px) {
  .legal-modal-content { 
    width: 95%; 
    max-height: 85vh; 
    border-radius: 16px; 
  }
  .legal-modal-close { top: 12px; right: 12px; }
  .legal-modal-body { padding: 24px; font-size: 14px; }
  .legal-modal-body h1 { font-size: 1.3rem; padding-left: 26px; }
  .legal-modal-body h2 { font-size: 1.15rem; padding-left: 24px; }
  .legal-modal-body h3 { font-size: 1.05rem; padding-left: 22px; }
  .legal-modal-body h4 { font-size: 0.95rem; padding-left: 20px; }
  .legal-modal-body h5 { font-size: 0.9rem; padding-left: 18px; }
  .legal-modal-body h6 { font-size: 0.85rem; padding-left: 16px; }
}
/* 亮色模式样式 */
[data-theme="light"] .legal-modal-content {
  background: rgba(255, 255, 255, 0.65);
}
[data-theme="light"] .legal-modal-body,
[data-theme="light"] .legal-modal-body p,
[data-theme="light"] .legal-modal-body li,
[data-theme="light"] .legal-modal-body span {
  color: rgba(0, 0, 0, 0.75) !important;
}
[data-theme="light"] .legal-modal-body strong {
  color: rgba(0, 0, 0, 0.9) !important;
}
[data-theme="light"] .legal-modal-body em {
  color: rgba(0, 0, 0, 0.65) !important;
}
[data-theme="light"] .legal-modal-body blockquote {
  background: rgba(0, 0, 0, 0.05);
  color: rgba(0, 0, 0, 0.7);
}
[data-theme="light"] .legal-modal-body code {
  background: rgba(0, 0, 0, 0.08);
}
