/* ==========================================================================
   掌中世界云 (zhangzhongshijie.cyou) - 极简法务合规风 (Legal Document Clean) Style System
   ========================================================================== */

:root {
  --bg-main: #0B0F17;
  --bg-card: rgba(17, 24, 39, 0.7);
  --bg-card-hover: rgba(30, 41, 59, 0.8);
  --bg-glass: rgba(255, 255, 255, 0.03);
  
  --border-legal: rgba(255, 255, 255, 0.12);
  --border-legal-active: rgba(6, 182, 212, 0.5);
  
  --text-primary: #F3F4F6;
  --text-secondary: #9CA3AF;
  --text-muted: #6B7280;
  --text-highlight: #06B6D4;
  --text-gold: #F59E0B;
  
  --accent-cyan: #06B6D4;
  --accent-blue: #3B82F6;
  --accent-gold: #D97706;
  --accent-emerald: #10B981;
  
  --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", Consolas, "Courier New", monospace;
  
  --line-height-legal: 1.75;
  --container-max: 1280px;
}

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

html {
  scroll-behavior: smooth;
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-family: var(--font-main);
  line-height: var(--line-height-legal);
  -webkit-font-smoothing: antialiased;
}

body {
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Mouse Tail Canvas overlay */
#cursor-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 9999;
}

/* Container */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Legal Header Bar */
.legal-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(11, 15, 23, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-legal);
  padding: 0.75rem 0;
}

.legal-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-badge {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-primary);
}

.brand-seal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  color: #fff;
  font-weight: 800;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.3);
}

.brand-title-wrap {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-doc-id {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--accent-cyan);
}

.header-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 1.1rem;
  border-radius: 4px;
  background: var(--accent-cyan);
  color: #0B0F17;
  font-weight: 700;
  font-size: 0.85rem;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.4);
}

.header-cta-btn:hover {
  background: #22d3ee;
  transform: translateY(-1px);
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.6);
}

/* Legal Document Main Dual Column Layout */
.document-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 2.5rem;
  padding: 3rem 0;
}

/* Sidebar Legal Index Navigation */
.legal-sidebar {
  position: sticky;
  top: 90px;
  height: fit-content;
  background: var(--bg-card);
  border: 1px solid var(--border-legal);
  border-radius: 8px;
  padding: 1.25rem;
  backdrop-filter: blur(10px);
}

.sidebar-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px dashed var(--border-legal);
}

.toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.toc-list a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  transition: all 0.2s ease;
}

.toc-num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-cyan);
  opacity: 0.8;
}

.toc-list a:hover {
  color: var(--text-primary);
  transform: translateX(3px);
}

.toc-status-widget {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-legal);
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent-emerald);
  box-shadow: 0 0 10px var(--accent-emerald);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Legal Document Main Content Area */
.legal-main {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

/* Hero Section with Line Numbers Margin */
.legal-doc-hero {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-legal);
  border-radius: 12px;
  padding: 2.5rem;
  backdrop-filter: blur(12px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}

.doc-stamp-bg {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  width: 130px;
  height: 130px;
  border: 2px dashed rgba(217, 119, 6, 0.3);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transform: rotate(-12deg);
  pointer-events: none;
  color: rgba(217, 119, 6, 0.4);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  text-align: center;
  line-height: 1.2;
}

.stamp-inner {
  font-weight: 800;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  margin-bottom: 2px;
}

/* Legal Line Numbers Container */
.legal-block {
  display: grid;
  grid-template-columns: 45px 1fr;
  gap: 1.5rem;
}

.line-numbers {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.2);
  user-select: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  text-align: right;
  border-right: 1px solid var(--border-legal);
  padding-right: 0.75rem;
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.legal-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.75rem;
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.3);
  border-radius: 4px;
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  width: fit-content;
}

.hero-title {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #FFFFFF 0%, #9CA3AF 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 700px;
}

.legal-hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
}

.btn-primary-lg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.85rem 2rem;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  color: #FFFFFF;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(6, 182, 212, 0.4);
  transition: all 0.25 ease;
}

.btn-primary-lg:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 30px rgba(6, 182, 212, 0.6);
}

.btn-secondary-lg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-legal);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-secondary-lg:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--accent-cyan);
}

/* Feature Clauses Section */
.clause-section {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-legal);
  padding-bottom: 0.75rem;
}

.section-title {
  font-size: 1.4rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.clause-badge {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 0.15rem 0.5rem;
  background: rgba(245, 158, 11, 0.15);
  color: var(--text-gold);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 3px;
}

.clause-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.clause-card {
  background: var(--bg-card);
  border: 1px solid var(--border-legal);
  border-radius: 8px;
  padding: 1.5rem;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.clause-card:hover {
  border-color: var(--border-legal-active);
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(6, 182, 212, 0.15);
}

.clause-num-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-cyan);
  letter-spacing: 0.05em;
}

.clause-card-title {
  font-size: 1.1rem;
  font-weight: 700;
}

.clause-card-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Pricing Grid Section */
.pricing-section {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.pricing-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.pricing-toggle-wrap {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-legal);
  padding: 3px;
  border-radius: 20px;
}

.toggle-btn {
  padding: 0.4rem 1.2rem;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  border-radius: 16px;
  transition: all 0.2s ease;
}

.toggle-btn.active {
  background: var(--accent-cyan);
  color: #0B0F17;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--border-legal);
  border-radius: 10px;
  padding: 1.75rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  position: relative;
  transition: all 0.3s ease;
}

.pricing-card.featured {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 30px rgba(6, 182, 212, 0.2);
  background: rgba(17, 24, 39, 0.9);
}

.featured-ribbon {
  position: absolute;
  top: -12px;
  right: 15px;
  background: linear-gradient(90deg, var(--accent-gold), #F59E0B);
  color: #000;
  font-weight: 800;
  font-size: 0.7rem;
  font-family: var(--font-mono);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  text-transform: uppercase;
}

.price-title {
  font-size: 1.15rem;
  font-weight: 700;
}

.price-amount {
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
}

.price-currency {
  font-size: 1.2rem;
  color: var(--accent-cyan);
  font-weight: 700;
}

.price-num {
  font-size: 2.2rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: #FFF;
}

.price-period {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.price-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  border-top: 1px dashed var(--border-legal);
  padding-top: 1rem;
}

.price-features li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.price-features li::before {
  content: "✓";
  color: var(--accent-emerald);
  font-weight: 800;
}

.btn-pricing {
  margin-top: auto;
  padding: 0.65rem 1rem;
  border-radius: 6px;
  border: 1px solid var(--accent-cyan);
  background: transparent;
  color: var(--accent-cyan);
  text-align: center;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.pricing-card.featured .btn-pricing {
  background: var(--accent-cyan);
  color: #0B0F17;
}

.btn-pricing:hover {
  background: var(--accent-cyan);
  color: #0B0F17;
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.4);
}

/* User Reviews Section */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.review-card {
  background: var(--bg-card);
  border: 1px solid var(--border-legal);
  border-radius: 8px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.review-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.reviewer-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.reviewer-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3B82F6, #8B5CF6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  color: #fff;
}

.reviewer-name {
  font-size: 0.9rem;
  font-weight: 700;
}

.reviewer-tag {
  font-size: 0.7rem;
  color: var(--accent-emerald);
  font-family: var(--font-mono);
}

.review-stars {
  color: var(--text-gold);
  font-size: 0.8rem;
}

.review-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.review-latency-chip {
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  background: rgba(16, 185, 129, 0.1);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

/* FAQ Accordion Section */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-legal);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.faq-question {
  width: 100%;
  padding: 1.2rem 1.5rem;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 600;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

.faq-toggle-icon {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  color: var(--accent-cyan);
  transition: transform 0.3s ease;
}

.faq-item.active .faq-toggle-icon {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding: 0 1.5rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
}

.faq-item.active .faq-answer {
  max-height: 300px;
  padding: 0 1.5rem 1.2rem 1.5rem;
}

/* Articles Showcase Section */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.article-card {
  background: var(--bg-card);
  border: 1px solid var(--border-legal);
  border-radius: 8px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

.article-card:hover {
  border-color: var(--accent-cyan);
  transform: translateY(-2px);
  background: var(--bg-card-hover);
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent-cyan);
}

.article-card-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text-primary);
}

.article-card-excerpt {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.article-card-link {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: auto;
}

/* Page Article Detail Template Styling */
.article-detail-container {
  max-width: 900px;
  margin: 3rem auto;
  padding: 2.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-legal);
  border-radius: 12px;
  backdrop-filter: blur(12px);
}

.article-header-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-legal);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.article-h1 {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 1.5rem;
  color: #FFF;
}

.article-body {
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.article-body h2 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-top: 1.5rem;
  color: var(--accent-cyan);
  border-left: 3px solid var(--accent-cyan);
  padding-left: 0.75rem;
}

.article-body h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-top: 1rem;
  color: #FFF;
}

.article-body ul, .article-body ol {
  padding-left: 1.5rem;
}

.article-cta-box {
  margin: 2.5rem 0 1rem 0;
  padding: 1.75rem;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.1), rgba(59, 130, 246, 0.1));
  border: 1px solid var(--border-legal-active);
  border-radius: 8px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

/* Footer PBN Internal Links Section (核心任务 2) */
footer.legal-footer {
  margin-top: 5rem;
  background: #070A0F;
  border-top: 1px solid var(--border-legal);
  padding: 3rem 0 2rem 0;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  text-align: center;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.footer-brand-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.footer-brand-sub {
  font-size: 0.8rem;
  color: var(--text-secondary);
  max-width: 600px;
}

/* PBN Internal Links Pipeline Styling */
.pbn-links-pipeline {
  width: 100%;
  max-width: 1100px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed var(--border-legal);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.pbn-pipeline-header {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pbn-links-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem 1.2rem;
  list-style: none;
}

.pbn-links-grid a {
  color: #8E9BAE;
  text-decoration: none;
  font-size: 0.78rem;
  transition: color 0.2s ease;
}

.pbn-links-grid a:hover {
  color: var(--accent-cyan);
  text-decoration: underline;
}

.footer-copyright {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 1.5rem;
  width: 100%;
}

/* Responsive Rules */
@media (max-width: 960px) {
  .document-layout {
    grid-template-columns: 1fr;
  }
  
  .legal-sidebar {
    display: none;
  }
}

@media (max-width: 640px) {
  .legal-header-inner {
    flex-wrap: wrap;
    gap: 0.75rem;
  }
  
  .nav-links {
    display: none;
  }
  
  .legal-block {
    grid-template-columns: 1fr;
  }
  
  .line-numbers {
    display: none;
  }
  
  .hero-title {
    font-size: 1.6rem;
  }
  
  .article-detail-container {
    padding: 1.25rem;
  }
}
