/* AO3-inspired fanfic archive styling */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Georgia', 'Times New Roman', serif;
  background: #eee;
  color: #2a2a2a;
  line-height: 1.6;
}

a { color: #900; text-decoration: none; }
a:hover { text-decoration: underline; }
a:visited { color: #551a8b; }

/* Header */
.header {
  background: #900;
  color: white;
  padding: 10px 0;
  border-bottom: 3px solid #600;
}
.header-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.header h1 {
  font-size: 1.4em;
  font-weight: normal;
}
.header h1 strong { font-weight: bold; }
.header nav a {
  color: white;
  margin-left: 20px;
  font-size: 0.9em;
}
.header nav a:hover { text-decoration: underline; }

/* Greeting bar */
.greeting-bar {
  background: #333;
  color: #ccc;
  font-size: 0.8em;
  padding: 4px 0;
  text-align: right;
}
.greeting-bar-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px;
}
.greeting-bar a { color: #ddd; }

/* Main content */
.main {
  max-width: 1000px;
  margin: 20px auto;
  padding: 0 20px;
}

/* Fandom header */
.fandom-header {
  background: white;
  border: 1px solid #ccc;
  padding: 20px;
  margin-bottom: 20px;
}
.fandom-header h2 {
  font-size: 1.8em;
  color: #900;
  margin-bottom: 5px;
}
.fandom-header .fandom-meta {
  color: #666;
  font-size: 0.9em;
}

/* Work index / listing */
.work-list { list-style: none; }
.work-item {
  background: white;
  border: 1px solid #ccc;
  margin-bottom: 15px;
  padding: 15px 20px;
}
.work-item .work-title {
  font-size: 1.2em;
  font-weight: bold;
  margin-bottom: 3px;
}
.work-item .work-author {
  font-size: 0.9em;
  color: #666;
  margin-bottom: 8px;
}
.work-item .work-tags {
  margin-bottom: 8px;
}
.work-item .work-tags .tag-label {
  font-weight: bold;
  font-size: 0.8em;
  color: #666;
}
.tag {
  display: inline-block;
  background: #f0e8e8;
  color: #900;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 0.8em;
  margin: 2px 2px;
}
.tag:hover { background: #e0d0d0; }
.tag-rating {
  background: #dfd;
  color: #060;
}
.tag-warning {
  background: #ffd;
  color: #660;
}
.tag-category {
  background: #ddf;
  color: #006;
}
.work-item .work-summary {
  font-size: 0.9em;
  color: #444;
  border-left: 3px solid #ddd;
  padding-left: 10px;
  margin-top: 8px;
}
.work-item .work-stats {
  font-size: 0.8em;
  color: #888;
  margin-top: 8px;
}
.work-stats span { margin-right: 15px; }

/* Story page */
.story-header {
  background: white;
  border: 1px solid #ccc;
  padding: 20px;
  margin-bottom: 15px;
}
.story-header h2 {
  font-size: 1.6em;
  color: #900;
  margin-bottom: 5px;
}
.story-header .byline {
  font-size: 1em;
  color: #666;
  margin-bottom: 10px;
}
.story-meta {
  background: #f9f9f9;
  border: 1px solid #ddd;
  padding: 15px;
  margin-bottom: 15px;
  font-size: 0.85em;
}
.story-meta dt {
  font-weight: bold;
  color: #666;
  float: left;
  width: 120px;
  clear: left;
}
.story-meta dd {
  margin-left: 130px;
  margin-bottom: 5px;
}
.story-body {
  background: white;
  border: 1px solid #ccc;
  padding: 30px 40px;
  margin-bottom: 15px;
  font-size: 1em;
  line-height: 1.8;
}
.story-body p {
  margin-bottom: 1em;
  text-indent: 2em;
}
.story-body p:first-child { text-indent: 0; }
.story-body hr {
  border: none;
  text-align: center;
  margin: 1.5em 0;
}
.story-body hr::after {
  content: "* * *";
  color: #999;
}
.story-body .story-notes {
  background: #f9f9f9;
  border: 1px solid #eee;
  padding: 10px 15px;
  margin-bottom: 1em;
  font-size: 0.9em;
  font-style: italic;
  text-indent: 0;
}

/* Navigation */
.story-nav {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
}
.story-nav a, .story-nav span {
  background: #900;
  color: white;
  padding: 8px 16px;
  border-radius: 3px;
  font-size: 0.9em;
}
.story-nav a:hover {
  background: #700;
  text-decoration: none;
}
.story-nav .disabled {
  background: #ccc;
  color: #999;
}

/* Kudos / comments section */
.interactions {
  background: white;
  border: 1px solid #ccc;
  padding: 15px 20px;
  margin-bottom: 15px;
}
.interactions h3 {
  font-size: 1em;
  color: #900;
  margin-bottom: 10px;
}
.kudos-btn {
  background: #900;
  color: white;
  border: none;
  padding: 8px 20px;
  border-radius: 3px;
  cursor: pointer;
  font-size: 0.9em;
}
.kudos-btn:hover { background: #700; }
.comment {
  border-top: 1px solid #eee;
  padding: 10px 0;
  font-size: 0.9em;
}
.comment .comment-author {
  font-weight: bold;
  color: #900;
}
.comment .comment-date {
  color: #999;
  font-size: 0.8em;
}

/* Footer */
.footer {
  text-align: center;
  padding: 20px;
  color: #999;
  font-size: 0.8em;
  border-top: 1px solid #ddd;
  margin-top: 30px;
}

/* Pagination */
.pagination {
  text-align: center;
  margin: 20px 0;
}
.pagination a, .pagination .current {
  display: inline-block;
  padding: 5px 12px;
  margin: 0 2px;
  border: 1px solid #ccc;
  background: white;
}
.pagination .current {
  background: #900;
  color: white;
  border-color: #900;
}

/* Stats sidebar */
.fandom-stats {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.stat-box {
  background: #f9f9f9;
  padding: 8px 15px;
  border-radius: 3px;
  font-size: 0.85em;
}
.stat-box strong { color: #900; }
