*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  overflow-x: clip;
  width: 100vw;
  max-width: 100%;
}

html {
  font-family: "Georgia", "Merriweather", "Times New Roman", serif;
  font-size: 20px;
  line-height: 1.6;
}

body {
  color: #bbb;
  background-color: #151515;
  -webkit-font-smoothing: antialiased;
  margin: 0;
  padding: 0;
}

::selection {
  background: #a41818;
  color: #fff;
}

a {
  color: #5865F2;
  text-decoration: none;
  transition: color 0.2s ease-in-out;
}
a strong {
  color: inherit;
}
a:hover, a:focus {
  color: #a41818;
  text-decoration: underline;
}

h1, h2, h3, h4, h5, h6 {
  margin-bottom: .5rem;
  font-weight: bold;
  line-height: 1.25;
  color: #e0e0e0;
  text-rendering: optimizeLegibility;
  font-family: sans-serif;
}

h1 {
  font-size: 2rem;
}

h2 {
  margin-top: 1.5rem;
  font-size: 1.5rem;
}

h3 {
  margin-top: 1.5rem;
  font-size: 1.25rem;
}

h4, h5, h6 {
  margin-top: 1rem;
  font-size: 1rem;
}

p {
  margin-top: 0;
  margin-bottom: 1.2rem;
}

strong {
  color: #fff;
}

ul, ol, dl {
  margin-top: 0;
  margin-bottom: 1rem;
}

hr {
  border: 0;
  border-top: 1px solid #333;
  margin: 2rem auto;
  width: 50%;
}

img {
  display: block;
  max-width: 100%;
  margin: 0 auto 1rem;
  border-radius: 5px;
  border: 1px solid #333;
}

blockquote {
  padding: .5rem 1rem;
  margin: 1.5rem 0;
  color: #888;
  border-left: .25rem solid #a41818;
  background: rgba(255, 255, 255, 0.05);
  font-style: italic;
  border-radius: 0 4px 4px 0;
}
blockquote p:last-child {
  margin-bottom: 0;
}

.container {
  max-width: 36rem;
  width: 90%;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
  padding-top: 2rem;
}

.chapter-list {
  list-style: none;
  padding: 0;
  margin-top: 1rem;
}

.chapter-list li {
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid #252525;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 15px;
}

.chapter-list a {
  text-decoration: none;
  color: #ccc;
  flex: 1;
  display: block;
  transition: all 0.2s ease;
}

.chapter-list a:hover {
  color: #a41818;
  padding-left: 8px;
}

input[type="text"]#chapterSearch {
  width: 100%;
  padding: 12px 15px;
  margin-bottom: 20px;
  background-color: #151515;
  border: 1px solid #333;
  color: #eee;
  border-radius: 6px;
  font-size: 1rem;
  transition: border-color 0.2s;
  box-sizing: border-box;
}
input[type="text"]#chapterSearch:focus {
  outline: none;
  border-color: #a41818;
}
input[type="text"]#chapterSearch::placeholder {
  color: #555;
}

.reading-meta-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: sans-serif;
  font-size: 0.9rem;
  color: #888;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #222;
  width: 100%;
}

.font-adjusters {
  display: flex;
  align-items: center;
  gap: 8px;
}
.font-adjusters #currentFontSize {
  color: #ccc;
  font-weight: bold;
  min-width: 40px;
  text-align: center;
  font-size: 0.9rem;
}
.font-adjusters button {
  background-color: #2a2a2a;
  color: #fff;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  font-size: 0.9rem;
  transition: background-color 0.2s ease;
}
.font-adjusters button:hover {
  background-color: #a41818;
}
.font-adjusters button:focus {
  outline: none;
}

.chapter-body {
  transition: font-size 0.15s ease-in-out;
}

.chapter-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 3.5rem 0 2rem 0;
  padding-top: 2rem;
  border-top: 1px solid #252525;
  width: 100%;
  box-sizing: border-box;
  gap: 10px;
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 4px;
  font-size: 0.95rem;
  font-family: sans-serif;
  font-weight: bold;
  text-decoration: none;
  transition: all 0.2s ease-in-out;
  border: none;
  background-color: #2a2a2a;
  color: #fff;
  flex: 1;
  box-sizing: border-box;
}
.nav-btn:hover {
  background-color: #444;
  color: #fff;
}
.nav-btn.archive-btn {
  background-color: #a41818;
  color: white;
}
.nav-btn.archive-btn:hover {
  background-color: #c21c1c;
}
.nav-btn.disabled {
  background-color: #151515;
  color: #555;
  border: 1px solid #333;
  pointer-events: none;
}

@media (max-width: 600px) {
  .chapter-nav {
    flex-direction: column;
    gap: 10px;
  }

  .nav-btn {
    width: 100%;
    margin: 0;
  }
}
.dynamic-spoiler {
  filter: blur(6px);
  opacity: 0.6;
  user-select: none;
  pointer-events: none;
  transition: filter 0.8s ease, opacity 0.8s ease;
  background-color: rgba(21, 21, 21, 0.5);
  padding: 0 4px;
  border-radius: 3px;
}

.dynamic-spoiler.unlocked {
  filter: blur(0);
  opacity: 1;
  user-select: auto;
  pointer-events: auto;
  background-color: transparent;
}

.quick-access-hub {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 15px;
  margin-bottom: 3.5rem;
  border-top: 1px solid #252525;
  border-bottom: 1px solid #252525;
  padding: 2rem 0;
}

.hub-card {
  background: #151515;
  padding: 20px 15px;
  border-radius: 8px;
  color: #ccc;
  text-decoration: none;
  border: 1px solid #222;
  text-align: center;
  transition: all 0.25s ease-in-out;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.hub-card h3 {
  margin: 0 0 10px 0;
  font-size: 1.15rem;
}
.hub-card span {
  font-size: 0.85rem;
  color: #777;
  transition: color 0.25s ease;
}
.hub-card:hover {
  background: #1a1a1a;
  border-color: #555;
  transform: translateY(-4px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
  text-decoration: none;
}
.hub-card:hover span {
  color: #bbb;
}

.chapter-date {
  color: #666;
  font-size: 0.85rem;
  min-width: 95px;
  display: inline-block;
  font-family: monospace;
}

.imperium-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: rgba(21, 21, 21, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #333;
  width: 100%;
  padding: 12px 0;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.header-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.header-brand .header-logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
  display: block;
  transform: translateY(3px);
}
.header-brand .header-title {
  font-family: 'Georgia', serif;
  font-size: 1.15rem;
  font-weight: bold;
  color: #e0e0e0;
  line-height: 1;
  transition: color 0.2s ease;
}
.header-brand:hover .header-title {
  color: #d4af37;
}

.header-nav {
  display: flex;
  gap: 20px;
}
.header-nav a {
  text-decoration: none;
  color: #ccc;
  font-size: 0.95rem;
  font-family: sans-serif;
  font-weight: bold;
  transition: color 0.2s ease;
}
.header-nav a:hover {
  color: #a41818;
}

@media (max-width: 600px) {
  .header-title {
    display: none;
  }

  .header-content {
    padding: 0 15px;
  }

  .header-nav {
    gap: 15px;
  }
}
