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

body {
  background-color: #f6f6ef;
  color: #000;
  font-family: Georgia, 'Times New Roman', Times, serif;
  font-size: 15px;
  line-height: 1.65;
  transition: background-color 0.3s, color 0.3s;
}

body.dark-mode {
  background-color: #1a1a1a;
  color: #d4d4d4;
}

.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  background-color: #666;
  z-index: 1000;
  transition: width 0.1s;
}

body.dark-mode .progress-bar {
  background-color: #888;
}

.dark-toggle {
  position: fixed;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  color: #666;
  font-family: Georgia, serif;
  font-size: 11px;
  cursor: pointer;
  text-decoration: underline;
  z-index: 100;
}

body.dark-mode .dark-toggle {
  color: #888;
}

.page-container {
  min-height: 100vh;
}

.essay-container {
  max-width: 480px;
  margin: 0 auto;
  padding: 40px 20px 60px;
}

@media (max-width: 520px) {
  .essay-container {
    max-width: 100%;
    padding: 30px 16px 50px;
  }
}

.essay-header {
  margin-bottom: 30px;
}

.author-link {
  color: #000;
  text-decoration: none;
  font-size: 14px;
}

body.dark-mode .author-link {
  color: #d4d4d4;
}

.author-link:hover {
  text-decoration: underline;
}

.parody-note {
  color: #666;
  font-size: 12px;
  font-style: italic;
  margin-top: 2px;
}

body.dark-mode .parody-note {
  color: #888;
}

.title-section {
  margin-bottom: 20px;
}

.essay-title {
  font-size: 18px;
  font-weight: normal;
  margin-bottom: 4px;
}

.essay-meta {
  color: #666;
  font-size: 13px;
}

body.dark-mode .essay-meta {
  color: #888;
}

.tldr-section {
  margin-bottom: 25px;
  padding: 10px 0;
  border-top: 1px solid #ddd;
  border-bottom: 1px solid #ddd;
}

body.dark-mode .tldr-section {
  border-color: #333;
}

.tldr-toggle {
  background: none;
  border: none;
  color: #0000cc;
  font-family: Georgia, serif;
  font-size: 13px;
  cursor: pointer;
  padding: 0;
}

body.dark-mode .tldr-toggle {
  color: #6b9fff;
}

.tldr-toggle:hover {
  text-decoration: underline;
}

.tldr-list {
  margin-top: 12px;
  margin-left: 20px;
  font-size: 14px;
  color: #333;
}

body.dark-mode .tldr-list {
  color: #bbb;
}

.tldr-list li {
  margin-bottom: 6px;
}

.essay-content {
  margin-bottom: 40px;
}

.essay-paragraph {
  margin-bottom: 16px;
}

.essay-heading {
  font-size: 15px;
  font-weight: bold;
  margin-top: 28px;
  margin-bottom: 14px;
}

.essay-quote {
  margin: 20px 0;
  padding-left: 16px;
  border-left: 2px solid #ccc;
  color: #444;
  font-style: italic;
  cursor: pointer;
  transition: border-color 0.2s;
}

body.dark-mode .essay-quote {
  border-color: #555;
  color: #aaa;
}

.essay-quote:hover {
  border-color: #0000cc;
}

body.dark-mode .essay-quote:hover {
  border-color: #6b9fff;
}

.share-hint {
  font-size: 11px;
  color: #999;
  opacity: 0;
  transition: opacity 0.2s;
}

.essay-quote:hover .share-hint {
  opacity: 1;
}

.tooltip-container {
  position: relative;
  display: inline;
}

.tooltip-term {
  border-bottom: 1px dotted #666;
  cursor: help;
}

body.dark-mode .tooltip-term {
  border-color: #888;
}

.tooltip-content {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: #333;
  color: #fff;
  padding: 8px 12px;
  font-size: 12px;
  line-height: 1.4;
  border-radius: 4px;
  width: 220px;
  text-align: left;
  z-index: 10;
  margin-bottom: 6px;
}

body.dark-mode .tooltip-content {
  background: #555;
}

.tooltip-content::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #333;
}

body.dark-mode .tooltip-content::after {
  border-top-color: #555;
}

.footnotes-section {
  margin-top: 40px;
  font-size: 13px;
}

.footnotes-section hr {
  border: none;
  border-top: 1px solid #ccc;
  margin-bottom: 20px;
}

body.dark-mode .footnotes-section hr {
  border-color: #444;
}

.footnotes-section h3 {
  font-size: 14px;
  font-weight: normal;
  margin-bottom: 12px;
}

.footnote {
  margin-bottom: 10px;
  color: #444;
}

body.dark-mode .footnote {
  color: #999;
}

.footnote a {
  color: #0000cc;
  text-decoration: none;
  margin-right: 4px;
}

body.dark-mode .footnote a {
  color: #6b9fff;
}

.footnote a:hover {
  text-decoration: underline;
}

.related-section {
  margin-top: 30px;
}

.related-section h3 {
  font-size: 14px;
  font-weight: normal;
  margin-bottom: 10px;
}

.related-section ul {
  list-style: none;
}

.related-section li {
  margin-bottom: 6px;
}

.related-section a {
  color: #0000cc;
  text-decoration: none;
  font-size: 14px;
}

body.dark-mode .related-section a {
  color: #6b9fff;
}

.related-section a:hover {
  text-decoration: underline;
}

.share-section {
  margin-top: 30px;
  font-size: 12px;
  color: #666;
}

body.dark-mode .share-section {
  color: #888;
}

.share-section a {
  color: #0000cc;
  text-decoration: none;
}

body.dark-mode .share-section a {
  color: #6b9fff;
}

.share-section a:hover {
  text-decoration: underline;
}

.essay-footer {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid #ddd;
}

body.dark-mode .essay-footer {
  border-color: #333;
}

.remix-link {
  color: #999;
  text-decoration: none;
  font-size: 11px;
}

.remix-link:hover {
  color: #666;
  text-decoration: underline;
}

body.dark-mode .remix-link {
  color: #666;
}

body.dark-mode .remix-link:hover {
  color: #888;
}

a {
  color: #0000cc;
}

body.dark-mode a {
  color: #6b9fff;
}

a:hover {
  text-decoration: underline;
}

::selection {
  background: #b3d4fc;
}

body.dark-mode ::selection {
  background: #3a5f8a;
}