/* ==========================================================================
   Haozhen — legal.css
   Shared stylesheet for privacy.html and terms-of-service.html (DARK theme)
   ========================================================================== */

.legal-page {
  background-color: #0E0F14;
  color: #ECE8EA;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-size: 16px;
  font-family: "Segoe UI", "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.75;
  background-color: #0E0F14;
  color: #ECE8EA;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

.container {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Scope-isolation so the legal section backgrounds never inherit a shared ID. */
.legal-page .legal-content section {
  background-color: transparent !important;
}

/* ==========================================================================
   LEGAL HEADER (a <header> element, never a <section>)
   ========================================================================== */

.legal-header {
  background: linear-gradient(135deg, #7A0D2B 0%, #9F1239 55%, #BE123C 100%);
  padding: 72px 0 56px;
  border-bottom: 3px solid #E8B04B;
}

.legal-header .container {
  position: relative;
}

.legal-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: #F9A8D4;
  text-decoration: none;
  margin-bottom: 22px;
}

.legal-back:hover {
  color: #FFFFFF;
}

.legal-header h1 {
  font-size: clamp(30px, 5vw, 44px);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #FFFFFF;
  margin-bottom: 12px;
}

.legal-meta {
  font-size: 15px;
  color: #F4D9E3;
}

.legal-meta strong {
  color: #FFFFFF;
}

/* ==========================================================================
   TABLE OF CONTENTS
   ========================================================================== */

.toc {
  background-color: #14151C;
  border-bottom: 1px solid #262833;
  padding: 34px 0;
}

.toc h2 {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #F9A8D4;
  margin-bottom: 18px;
}

.toc ol {
  list-style: none;
  columns: 2;
  column-gap: 40px;
}

.toc ol li {
  margin-bottom: 10px;
  break-inside: avoid;
}

.toc ol li a {
  display: inline-block;
  font-size: 15px;
  color: #C7C2CB;
  text-decoration: none;
  transition: color 0.2s ease;
}

.toc ol li a:hover {
  color: #F9A8D4;
}

/* ==========================================================================
   LEGAL CONTENT
   ========================================================================== */

.legal-content {
  padding: 56px 0 24px;
}

.legal-content .container {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 24px;
}

.legal-content section {
  margin-bottom: 52px;
}

.legal-content section:last-child {
  margin-bottom: 8px;
}

.legal-content h2 {
  font-size: 25px;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: #E11D48;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #262833;
}

.legal-content h3 {
  font-size: 18px;
  font-weight: 700;
  color: #F9A8D4;
  margin: 24px 0 10px;
}

.legal-content p {
  font-size: 16px;
  color: #C7C2CB;
  margin-bottom: 16px;
}

.legal-content ul,
.legal-content ol {
  margin: 0 0 18px 24px;
}

.legal-content li {
  font-size: 16px;
  color: #C7C2CB;
  margin-bottom: 8px;
}

.legal-content li::marker {
  color: #E11D48;
}

.legal-content strong {
  color: #ECE8EA;
  font-weight: 700;
}

.legal-content a {
  color: #F9A8D4;
  text-decoration: underline;
}

.legal-content a:hover {
  color: #FFFFFF;
}

.legal-note {
  background-color: #14151C;
  border-left: 3px solid #9F1239;
  border-radius: 0 8px 8px 0;
  padding: 20px 22px;
  margin: 22px 0;
}

.legal-note p {
  margin-bottom: 0;
}

/* ==========================================================================
   LEGAL FOOTER
   ========================================================================== */

.legal-footer {
  background-color: #0B0C10;
  border-top: 3px solid #9F1239;
  padding: 48px 0 40px;
  margin-top: 40px;
}

.legal-footer .container {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 24px;
}

.legal-footer .footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.legal-footer .coin-mark {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 30%, #BE123C 0%, #9F1239 70%);
  border: 1px solid #E8B04B;
  position: relative;
  flex: none;
}

.legal-footer .coin-mark::before {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  border: 1px solid #E8B04B;
}

.legal-footer .coin-mark::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 9px;
  height: 9px;
  background-color: #0B0C10;
  border-radius: 2px;
}

.legal-footer .wordmark {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: #ECE8EA;
}

.legal-footer .wordmark span {
  color: #F9A8D4;
}

.legal-footer .footer-company {
  font-size: 14px;
  color: #9A95A1;
  margin-bottom: 6px;
  line-height: 1.7;
}

.legal-footer .footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #262833;
  font-size: 14px;
}

.legal-footer .footer-links a {
  color: #C7C2CB;
  text-decoration: none;
}

.legal-footer .footer-links a:hover {
  color: #F9A8D4;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 640px) {
  .legal-header {
    padding: 56px 0 44px;
  }

  .toc ol {
    columns: 1;
  }

  .legal-content h2 {
    font-size: 22px;
  }
}
