/* Final stylesheet for the generated book */
@font-face {
  font-family: 'BookFont';
  src: url('../fonts/NotoSansSC-Regular.ttf') format('truetype');
}

/* This new @page rule adds page numbers to the footer of every page */
@page {
  @bottom-center {
    content: counter(page);
    font-size: 9pt;
    color: #888888;
  }
}

body {
  font-family: 'BookFont', sans-serif;
  line-height: 1.5;
  font-size: 11pt;
  margin: 0;
}

/* 1. STYLING THE COVER PAGE */
.cover-page {
  page-break-after: always;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  height: 90vh;
}
.cover-page h1 {
  font-size: 32pt;
}

/* Styling for the Notice Page */
.notice-page {
  page-break-after: always;
  padding: 2in 1in;
  font-size: 10pt;
  line-height: 1.6;
}
.notice-page h3 {
  font-size: 14pt;
  text-align: center;
  margin-bottom: 2em;
}

/* 2. STYLING THE MAIN TABLE OF CONTENTS */
.main-toc {
  page-break-after: always;
  /* ADJUSTMENT 2: Changed left/right padding from 1in to 0.7in */
  padding: 0.5in;
}
.main-toc h1 {
  text-align: center;
  border-bottom: 2px solid black;
  padding-bottom: 0.25em;
}
.toc-category-heading {
  font-size: 18pt;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
}
.toc-post-list {
  list-style: none;
  padding-left: 0; /* Changed from 1em */
  line-height: 1.8;
}
.toc-post-list li {
  display: flex; /* Using flexbox for alignment */
  justify-content: space-between;
}
.toc-post-list a {
  text-decoration: none;
  color: black;
}
/* This is the magic that adds page numbers to the TOC */
.toc-post-list a::after {
  /* Fills the space with leader dots and adds the page number of the linked article */
  content: leader('.') " " target-counter(attr(href), page);
  font-size: 11pt;
}


/* 3. STYLING THE FULL ARTICLES */
article {
  page-break-before: always;
  padding: 0.1in 0.5in;
}
article:first-of-type {
  page-break-before: auto;
}
article .post-title {
  font-size: 18pt;
  margin-top: 0;
}

/* 4. REPEATING WATERMARK PATTERN (DYNAMIC) */
body::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='300'%3E%3Ctext x='-50' y='120' font-size='18' font-weight='bold' fill='rgba(0,0,0,0.08)' transform='rotate(-30)'%3E生成于 2025年08月20日%3C/text%3E%3Ctext x='-50' y='140' font-size='18' font-weight='bold' fill='rgba(0,0,0,0.08)' transform='rotate(-30)'%3E内容更新中 严禁商用%3Ctspan dy='1.2em' x='-50'%3E请以lyxmemo.github.io为准%3C/tspan%3E%3C/text%3E%3C/svg%3E");
  z-index: -1000;
  pointer-events: none;
}