html {
  /* A rich, deep navy-to-midnight blue */
  background-color: #0a192f;
  background-image: radial-gradient(circle, #112240 0%, #020c1b 100%);
  background-attachment: fixed;
  margin: 0;
  padding: 0;
}

.title-site h1 a {
  color: #fcfaf2;
  font-size: 2rem;
}

/* Add this to the body to layer the pattern over the blue gradient */
body::before {
  content: "";
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  z-index: -1; /* Keep it behind the forum */
  pointer-events: none;
  opacity: 0.15; /* Adjust this to make the pattern more or less subtle */

  /* Elegant Diamond Pattern */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'%3E%3Cpath d='M30 0l30 30-30 30L0 30z' fill='%23ffffff' fill-opacity='0.1'/%3E%3C/svg%3E");
  background-size: 60px 60px;
}

#pun-title {
  margin: 0;
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 122px;
  line-height: 80px;

  /* Lighter, rich sapphire blue with a subtle metallic sheen */
  background: linear-gradient(180deg, #1b3a6d 0%, #12284c 100%);

  /* Royal Bottom Border:
     A combination of a solid gold line and a decorative 'glow'
  */
  border-bottom: 4px solid #c2a67a;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3), 0 2px 0 #9c7d58;

  /* Center the text within the 122px height */
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

#pun-navlinks {
  position: relative;
  top: 82px;
}

/* Styling the Title Text (usually an H1 inside #pun-title) */
#pun-title h1 {
  color: #fcfaf2;
  font-family: 'Georgia', serif;
  font-variant: small-caps;
  letter-spacing: 3px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  margin: 0;
}

/* Optional: Add a subtle 'silk' stripe to the header for extra texture */
#pun-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 -2px 0 rgba(255, 255, 255, 0.05);
}

#pun {
  /* Center the forum and add a shadow */
  max-width: 1100px; /* Or your preferred width */
  margin: 40px auto;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

/* Target the main forum wrap */
#pun {
  border: 1px solid #c2a67a;
  background-color: #fcfaf2; /* Base parchment color */
  padding: 10px;
  /* Subtle inner shadow to mimic paper depth */
  box-shadow: inset 0 0 100px rgba(181, 153, 110, 0.15);
}

#pun-main {
  position: relative;
}

/* The Category Wrapper */
.category {
  margin-bottom: 25px;
  background: #fffdf7;
  /* This creates a gold/bronze outer frame effect */
  border: 1px solid #9c7d58;
  box-shadow:
    0 0 0 3px #fcfaf2,      /* Spacer (matches paper color) */
    0 0 0 4px #c2a67a,      /* Thin secondary frame */
    0 4px 15px rgba(0,0,0,0.1); /* Soft shadow for lift */
  position: relative;
}

/* The Category Header (Title Bar) */
.category h2 {
  /*background: linear-gradient(to right, #0a192f, #112240);*/
  border-bottom: 2px solid #9c7d58;
  color: #fcfaf2 !important;
  text-shadow: 1px 1px 2px #000;
  padding: 8px 15px;
  font-family: 'Georgia', serif;
  text-transform: uppercase;
  letter-spacing: 1px;
  /* Double line divider at the bottom of the title */
  border-bottom: 3px double #9c7d58;

  border-top: 1px solid #c2a67a; /* Gold top "cap" */
  background: #12284c; /* Using the deep blue for consistency */
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Decorative brackets on corners */
.category::before,
.category::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid #9c7d58;
  z-index: 10;
}

/* Top Left Bracket */
.category::before {
  top: -6px;
  left: -6px;
  border-right: none;
  border-bottom: none;
}

/* Bottom Right Bracket */
.category::after {
  bottom: -6px;
  right: -6px;
  border-left: none;
  border-top: none;
}

/* Standard PunBB Table Cells */
.pun table td,
.pun table th {
  border-color: rgba(156, 125, 88, 0.2) !important;
}

/* Row Hover effect - subtle paper highlight */
.pun tr:hover td {
  background-color: rgba(244, 236, 216, 0.4) !important;
}

/* Link styling to match the aesthetic */
.pun a {
  color: #7a5d3b;
  text-decoration: none;
  transition: 0.3s;
}

.pun a:hover {
  color: #3d2f21;
  text-decoration: underline;
}

.punbb .container {
  border: none!important;
}

.punbb td {
  border: none!important;
}

.punbb .post h3 {
  border: none!important;
}

#pun-statistics .main-content {
  display: flex;
  justify-content: space-between;
}

.linkst {
  margin-top: 1rem;
}

#pun-navlinks + div {
  margin-top: 95px!important;
}

#pun-navlinks {
  padding: 20px 0;
  border-bottom: 1px double #d1bc9b;
  margin-bottom: 20px;
  height: 55px!important;
}

#pun-navlinks ul {
  display: flex;
  justify-content: center;
  gap: 25px;
}

#pun-navlinks a {
  font-family: 'Georgia', serif;
  font-weight: bold;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #4a3b2a !important;
  text-decoration: none;
}

#pun-navlinks a:hover {
  color: #1b3a6d !important; /* Pulls the blue from the header down */
}

#pun-footer .container {
  text-align: center;
}

/* Episode Header Styles */
.episode-header {
  display: flex;
  gap: 20px;
  padding: 20px;
  background-color: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: 8px;
  margin-bottom: 20px;
}

.episode-info {
  flex: 1;
}

.episode-info h2 {
  margin-top: 0;
  font-size: 2em;
  color: #333;
}

.episode-summary {
  margin-bottom: 20px;
  font-size: 1.1em;
  color: #555;
}

.episode-characters h3,
.episode-custom-fields h3 {
  font-size: 1.2em;
  color: #444;
  border-bottom: 2px solid #eee;
  padding-bottom: 5px;
  margin-bottom: 10px;
}

.character-list {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}

.character-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: #fff;
  padding: 5px 10px;
  border: 1px solid #ccc;
  border-radius: 20px;
}

.character-item img {
  width: 30px;
  height: 30px;
  border-radius: 50%;
}

.character-item a {
  text-decoration: none;
  color: #007bff;
  font-weight: bold;
}

.character-item a:hover {
  text-decoration: underline;
}

.episode-custom-fields ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.episode-custom-fields li {
  margin-bottom: 10px;
}

.episode-image {
  flex-shrink: 0;
  width: 200px;
}

.episode-image img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

/* Custom Field Display Styles */
.custom-field-display {
  margin-bottom: 10px;
}

.custom-field-display label {
  font-weight: bold;
  color: #555;
  display: block;
  margin-bottom: 3px;
}

.custom-field-display span,
.custom-field-display div {
  font-size: 1em;
  color: #333;
}

.long-text-field div {
  white-space: pre-wrap; /* Preserve line breaks */
  background-color: #fdfdfd;
  border: 1px solid #eee;
  padding: 10px;
  border-radius: 4px;
}

.pa-avatar img {
  width: 180px;
  height: 180px;
}

/* Viewtopic Styles */
.post {
  margin-bottom: 20px;
  border: 1px solid #d1bc9b;
  background-color: #fffdf7;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.post h3 {
  background: #e9e3d5;
  border-bottom: 1px solid #d1bc9b;
  padding: 8px 15px;
  margin: 0;
  font-size: 0.9em;
  color: #555;
  display: flex;
  justify-content: space-between;
}

.post h3 span {
  display: flex;
  gap: 10px;
  align-items: center;
}

.post h3 a {
  color: #7a5d3b;
  text-decoration: none;
}

.post h3 a:hover {
  text-decoration: underline;
}

.post-main {
  display: flex;
  padding: 15px;
}

.post-author {
  flex: 0 0 200px;
  border-right: 1px solid #eee;
  padding-right: 15px;
}

.post-author ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.post-author li {
  margin-bottom: 8px;
  text-align: center;
}

.pa-author {
  font-weight: bold;
  font-size: 1.1em;
  margin-bottom: 10px;
}

.pa-author a {
  color: #1b3a6d;
  text-decoration: none;
}

.pa-avatar img {
  border: 3px solid #fff;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  border-radius: 4px;
}

.post-body {
  flex: 1;
  padding-left: 15px;
}

.punbb .post-body {
  margin-left: 0 !important;
  border-left: none !important;
}

.post-content {
  font-size: 1.05em;
  line-height: 1.6;
  color: #333;
}

.post-footer {
  background: #fcfaf2;
  border-top: none; /* Removed border */
  padding: 8px 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.post-contacts a,
.post-links a {
  color: #7a5d3b;
  text-decoration: none;
  font-size: 0.9em;
  margin-right: 10px;
}

.post-contacts a:hover,
.post-links a:hover {
  text-decoration: underline;
}

.sharelink {
  margin-right: 15px;
}

.post-meta {
  display: flex;
  align-items: center;
}

.punbb .post-links {
  border: none !important;
}

.punbb textarea,
.punbb .longinput input {
  width: 96%;
}

.punbb .post .post-author {
  margin-top: -3.5em;
}

.post-author li {
  margin-bottom: 2em;
}

.post-author li.pa-posts {
  margin-bottom: 0.2em;
}

.punbb .post h3 span {
  margin-left: 21em;
  border: none !important;
}

/* ── Direct Chat Messages ─────────────────────────────────────── */

.message {
  display: flex;
  margin-bottom: 16px;
}

.message .container {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  max-width: 70%;
}

/* Others' messages: left side */
.message .container {
  flex-direction: row;
}

/* My messages: right side */
.message.altstyle {
  justify-content: flex-end;
}

.message.altstyle .container {
  flex-direction: row-reverse;
}

/* Avatar */
.message-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid #d1bc9b;
}

.message-avatar-placeholder {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #1b3a6d;
  color: #fcfaf2;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Georgia', serif;
  font-size: 1rem;
  font-weight: bold;
  flex-shrink: 0;
  border: 2px solid #d1bc9b;
}

.message.altstyle .message-avatar-placeholder {
  background: #9c7d58;
}

/* Username + bubble wrapper */
.message-main {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.message-username {
  font-size: 0.78em;
  font-weight: bold;
  color: #7a5d3b;
  padding: 0 4px;
}

.message.altstyle .message-username {
  text-align: right;
}

/* Bubble */
.message-box {
  background: #fffdf7;
  border: 1px solid #d1bc9b;
  border-radius: 0 12px 12px 12px;
  padding: 8px 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.message.altstyle .message-box {
  background: #12284c;
  border-color: #1b3a6d;
  border-radius: 12px 0 12px 12px;
}

.message-content p {
  margin: 0;
  font-size: 0.95em;
  line-height: 1.5;
  color: #333;
  word-break: break-word;
}

.message.altstyle .message-content p {
  color: #e8dfc8;
}

/* Timestamp */
.message-metadata {
  margin: 0;
  font-size: 0.72em;
  color: #aaa;
  padding: 0 4px;
}

.message.altstyle .message-metadata {
  text-align: right;
}

/* ── Quote Block ──────────────────────────────────────────────── */

.punbb .post-content .quote-box {
  background: #f5f0e8;
  border-left: 3px solid #9c7d58;
  border-radius: 0 4px 4px 0;
  padding: 8px 14px 8px 14px;
  margin: 0.6em 0 0.6em 0;
  color: #4a3b2a;
}

.punbb .quote-box cite {
  font-weight: bold;
  font-style: normal;
  color: #7a5d3b;
  font-size: 0.85em;
  margin-bottom: 4px;
}

.punbb .quote-box cite::before {
  content: "✦ ";
  color: #9c7d58;
}

/* ══════════════════════════════════════════════════════════════
   DARK THEME  —  app-root.dark
   ══════════════════════════════════════════════════════════════ */

/* Base: make all text light inside the app */
app-root.dark {
  color: #c8c8e0;
}

app-root.dark #pun,
app-root.dark #pun * {
  color: #c8c8e0;
}

/* Main content container */
app-root.dark #pun {
  background-color: #1e1e2e;
  border-color: #3a3a5c;
  box-shadow: inset 0 0 100px rgba(0, 0, 0, 0.3), 0 20px 50px rgba(0, 0, 0, 0.8);
}

/* Categories */
app-root.dark .category {
  background: #252537;
  border-color: #3a3a5c;
  box-shadow:
    0 0 0 3px #1e1e2e,
    0 0 0 4px #3a3a5c,
    0 4px 15px rgba(0, 0, 0, 0.4);
}

app-root.dark .category::before,
app-root.dark .category::after {
  border-color: #4a4a7a;
}

app-root.dark .category h2 {
  background: #12122a;
  border-color: #3a3a5c;
}

/* Tables */
app-root.dark .pun table td,
app-root.dark .pun table th {
  border-color: rgba(80, 80, 130, 0.3) !important;
  color: #c8c8e0;
}

app-root.dark .pun tr:hover td {
  background-color: rgba(255, 255, 255, 0.04) !important;
}

/* Links */
app-root.dark .pun a,
app-root.dark #pun * a {
  color: #7c8dff !important;
}

app-root.dark .pun a:hover,
app-root.dark #pun * a:hover {
  color: #a8b4ff !important;
}

app-root.dark #pun-navlinks {
  border-bottom-color: #3a3a5c;
}

app-root.dark #pun-navlinks a {
  color: #a0a0c8 !important;
}

app-root.dark #pun-navlinks a:hover {
  color: #c8c8ff !important;
}

/* Posts */
app-root.dark .post {
  background-color: #252537;
  border-color: #3a3a5c;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

app-root.dark .post h3 {
  background: #1a1a2e;
  border-bottom-color: #3a3a5c;
  color: #a0a0c0;
}

app-root.dark .post h3 a {
  color: #7c8dff;
}

app-root.dark .post-author {
  border-right-color: #3a3a5c;
}

app-root.dark .pa-author a {
  color: #7c8dff;
}

app-root.dark .post-content {
  color: #c8c8e0;
}

app-root.dark .post-footer {
  background: #1e1e2e;
}

app-root.dark .post-contacts a,
app-root.dark .post-links a {
  color: #7c8dff;
}

/* Quote block */
app-root.dark .punbb .post-content .quote-box {
  background: #1a1a2e;
  border-left-color: #4a4a9a;
  color: #a8a8cc;
}

app-root.dark .punbb .quote-box cite {
  color: #7c8dff;
}

app-root.dark .punbb .quote-box cite::before {
  color: #4a4a9a;
}

/* Direct chat */
app-root.dark .message-box {
  background: #252537;
  border-color: #3a3a5c;
}

app-root.dark .message.altstyle .message-box {
  background: #1a1a3e;
  border-color: #3a3a6c;
}

app-root.dark .message-content p {
  color: #c8c8e0;
}

app-root.dark .message-username {
  color: #7c8dff;
}

app-root.dark .message-avatar {
  border-color: #3a3a5c;
}

app-root.dark .message-avatar-placeholder {
  background: #2a2a5a;
  border-color: #3a3a5c;
}

/* Episode & character items */
app-root.dark .episode-header {
  background-color: #252537;
  border-color: #3a3a5c;
}

app-root.dark .episode-info h2 {
  color: #c8c8f0;
}

app-root.dark .episode-summary {
  color: #a0a0c0;
}

app-root.dark .episode-characters h3,
app-root.dark .episode-custom-fields h3 {
  color: #b0b0d8;
  border-bottom-color: #3a3a5c;
}

app-root.dark .character-item {
  background-color: #1e1e2e;
  border-color: #3a3a5c;
}

app-root.dark .character-item a {
  color: #7c8dff;
}

/* Custom fields */
app-root.dark .custom-field-display label {
  color: #8080a8;
}

app-root.dark .custom-field-display span,
app-root.dark .custom-field-display div {
  color: #c0c0e0;
}

app-root.dark .long-text-field div {
  background-color: #1a1a2e;
  border-color: #3a3a5c;
  color: #c0c0e0;
}

/* Inputs & forms */
app-root.dark .punbb input,
app-root.dark .punbb textarea,
app-root.dark .punbb select {
  background-color: #1a1a2e;
  color: #c8c8e0;
  border-color: #3a3a5c;
}

/* Section blocks (e.g. #pun-active, #pun-stats, #pun-notifications) */
app-root.dark .punbb .section .container,
app-root.dark .punbb .info .container,
app-root.dark .punbb .main .container {
  background-color: #252537 !important;
  border-color: #3a3a5c !important;
  color: #c8c8e0 !important;
}

app-root.dark .punbb .section h2,
app-root.dark #pun-main h1,
app-root.dark #pun-main h2 {
  background-color: #12122a !important;
  color: #c8c8e0 !important;
  border-color: #3a3a5c !important;
}

/* Spoiler & blockquote */
app-root.dark spoiler-box .spoiler-header {
  background-color: #252537 !important;
  border-color: #3a3a5c !important;
  color: #c8c8e0 !important;
}

app-root.dark spoiler-box .spoiler-header:hover {
  background-color: #2e2e48 !important;
}

app-root.dark spoiler-box .spoiler-content {
  border-color: #3a3a5c !important;
  color: #c8c8e0 !important;
}

app-root.dark blockquote {
  background-color: #1a1a2e !important;
  border-left-color: #4a4a9a !important;
}

app-root.dark blockquote cite,
app-root.dark blockquote p,
app-root.dark blockquote > * {
  color: #c8c8e0 !important;
  border-color: #3a3a5c !important;
}

/* Alternating table rows */
app-root.dark tr.altstyle td {
  background-color: #252537 !important;
  color: #c8c8e0 !important;
}

/* Notification block */
app-root.dark .notification-block {
  background-color: #252537 !important;
  border-color: #3a3a5c !important;
  color: #c8c8e0 !important;
}

app-root.dark .notification-block:hover {
  background-color: #2e2e48 !important;
}

/* Notifications modal */
app-root.dark .modal-content {
  background-color: #1e1e2e !important;
  color: #c8c8e0 !important;
}

app-root.dark .feed-item {
  border-bottom-color: #3a3a5c !important;
  color: #c8c8e0 !important;
}

app-root.dark .feed-item h3,
app-root.dark .feed-item p {
  color: #c8c8e0 !important;
}

app-root.dark .feed-item .date {
  color: #7070a0 !important;
}

app-root.dark .data-table th,
app-root.dark .data-table td {
  border-color: #3a3a5c !important;
  color: #c8c8e0 !important;
}

app-root.dark .data-table th {
  background-color: #12122a !important;
}

app-root.dark .data-table td {
  background-color: #1e1e2e !important;
}

app-root.dark .dm-entry {
  color: #c8c8e0 !important;
}

app-root.dark .dm-unread-count {
  color: #a08040 !important;
}

/* Active PM contact */
app-root.dark .pm-contact.active {
  background: #2e2e48 !important;
}

.modmenu {
  margin-bottom: 10px;
}

.modmenu .container {
  padding: 10px;
  border: 1px solid #ccc;
  background-color: #f9f9f9;
}

.modmenu a {
  margin-left: 5px;
  text-decoration: none;
  font-weight: bold;
}

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

.group4 {
  color: #0066b3;
}

.notifications-container {
  display: flex;
  gap: 15px;
  align-items: center;
  font-size: 14px;
}

.notification-block {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 4px;
  background-color: #f0f0f0;
  border: 1px solid #ccc;
  cursor: pointer;
}

.notification-block:hover {
  background-color: #e0e0e0;
}

.count {
  font-weight: bold;
  background-color: #d9534f;
  color: white;
  border-radius: 50%;
  padding: 2px 6px;
  font-size: 12px;
}

/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background-color: white;
  padding: 20px;
  border-radius: 5px;
  width: 80%;
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
}

.close-button {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 24px;
  cursor: pointer;
}

.feed-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.feed-item {
  border-bottom: 1px solid #eee;
  padding-bottom: 10px;
}

.feed-item h3 {
  margin: 0 0 5px 0;
}

.feed-item .date {
  font-size: 0.8em;
  color: #888;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th, .data-table td {
  border: 1px solid #ddd;
  padding: 8px;
  text-align: left;
}

.data-table th {
  background-color: #f2f2f2;
}

/* Active Users page */
.active-users-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.active-user {
  padding: 6px 10px;
  border-bottom: 1px solid #eee;
  font-size: 0.95em;
}

.active-user:last-child {
  border-bottom: none;
}

.active-user:nth-child(even) {
  background-color: #f9f9f9;
}

.active-user .timestamp {
  color: #888;
  font-size: 0.9em;
  margin-right: 6px;
}

app-root.dark .active-user {
  border-bottom-color: #3a3a5c;
}

app-root.dark .active-user:nth-child(even) {
  background-color: #1e1e2e;
}

app-root.dark .active-user .timestamp {
  color: #888;
}

.dm-entry {
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-decoration: none;
  color: inherit;
  padding: 4px 0;
}

.dm-entry:hover {
  text-decoration: none;
}

.dm-chat-label {
  display: flex;
  gap: 4px;
  align-items: center;
}

.dm-unread-count {
  font-weight: bold;
  color: #9c6a1a;
}

/* Character list */
.character-list {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.main-header {
  margin-bottom: 20px;
}

.character-tree {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
}

.category {
  width: 100%;
  border: 1px solid #e9e3d5;
  background-color: #fcfaf2;
  margin-bottom: 15px;
}

.maintitle {
  background-color: #1b3a6d;
  color: #fcfaf2;
  padding: 10px;
}

.maintitle h2 {
  margin: 0;
  font-size: 1.2em;
}

.main-content {
  padding: 15px;
}

.faction-block {
  margin-bottom: 15px;
}

.faction-title {
  margin-top: 10px;
  margin-bottom: 5px;
  color: #1b3a6d;
  border-bottom: 1px solid #ccc;
  padding-bottom: 2px;
}

.level-1 { margin-left: 0; }
.level-2 { margin-left: 20px; }

.character-group {
  list-style: none;
  padding: 0;
  margin: 0;
}

.character-list-item {
  margin-bottom: 5px;
}

.character-link {
  font-weight: bold;
  text-decoration: none;
  color: #333;
}

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

.character-status {
  font-size: 0.8em;
  color: #666;
  margin-left: 5px;
}

/* === topic-create.component === */
.profile-sidebar {
  background: #f9f9f9;
  border: 1px solid #ccc;
  text-align: center;
}

.avatar-box img {
  border-radius: 4px;
}

.identity-name {
  font-weight: bold;
}

/* === episode-list.component === */
.filter-sidebar {
  background: #f4f4f4;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.filter-group h4 {
  font-size: 0.9em;
  text-transform: uppercase;
  border-bottom: 1px solid #ddd;
  color: #555;
}

.autocomplete-wrapper input {
  border: 1px solid #ccc;
  border-radius: 4px;
}

.suggestions-dropdown {
  background: white;
  border: 1px solid #ccc;
  border-top: none;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.suggestion-item {
  transition: background 0.2s;
}

.suggestion-item:hover {
  background: #f0f0f0;
}

.tag {
  background: #007bff;
  color: white;
  font-size: 0.85em;
}

.tag i {
  font-style: normal;
  font-weight: bold;
}

.tag i:hover {
  color: #ff0000;
}

.search-bar input {
  font-size: 1.1em;
  border: 1px solid #ccc;
}

.episode-table {
  border: 1px solid #ccc;
}

.episode-table th {
  background: #e1e1e1;
}

.episode-table td {
  border-bottom: 1px solid #eee;
}

.character-avatars img {
  border: 1px solid #fff;
  box-shadow: 0 0 3px rgba(0,0,0,0.2);
  transition: transform 0.2s;
}

.character-avatars img:hover {
  transform: scale(1.2);
}

.status-badge {
  color: white;
  font-size: 0.8em;
}

.status-badge.open { background: #27ae60; }
.status-badge.closed { background: #7f8c8d; }

/* === toast.component === */
.toast-item {
  background-color: #f1f1f1;
  border: 1px solid #0066b3;
  color: #333;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  font-family: Verdana, Helvetica, Arial, sans-serif;
  font-size: 11px;
}

.toast-side-accent {
  background: #0066b3;
}

.toast-item.error .toast-side-accent {
  background: #d9534f;
}

.toast-item.info .toast-side-accent {
  background: #5bc0de;
}

.toast-header {
  font-weight: bold;
  color: #0066b3;
  border-bottom: 1px solid #ccc;
}

.toast-sender {
  font-weight: bold;
  color: #333;
}

.toast-text {
  color: #333;
  line-height: 1.4;
}

.toast-close {
  background: none;
  border: none;
  color: #888;
  font-size: 16px;
}

.toast-close:hover {
  color: #333;
}

@keyframes slideInLeft {
  0% { transform: translateX(-100%); opacity: 0; }
  100% { transform: translateX(0); opacity: 1; }
}

/* === short-text-field-display.component === */
app-short-text-field-display label {
  font-weight: bold;
  font-size: 0.9em;
  color: #555;
}

app-short-text-field-display span {
  font-size: 1em;
  color: #333;
}

/* === number-field-display.component === */
app-number-field-display label {
  font-weight: bold;
  font-size: 0.9em;
  color: #555;
}

app-number-field-display span {
  font-size: 1em;
  color: #333;
}

/* === settings.component === */
.current-avatar img {
  border: 2px solid #ccc;
}

/* === user-list.component === */
table th {
  background-color: #1b3a6d;
  color: #fcfaf2;
  font-weight: bold;
}

table th, table td {
  border-bottom: 1px solid #e9e3d5;
}

tr.altstyle td {
  background-color: #fcfaf2;
}

/* === register.component === */
.input-error {
  border-color: #dc3545;
}

.error-msg {
  display: block;
  color: #dc3545;
  font-size: 0.875rem;
}

.alert-error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.toggle-password {
  background: none;
  border: none;
  color: #666;
  cursor: pointer;
  font-size: 0.8em;
}

.toggle-password:hover {
  color: #333;
}

/* === faction-create-modal.component === */
.faction-modal-input,
.faction-modal-textarea {
  border: 1px solid #ccc;
  border-radius: 4px;
}

.faction-modal-label {
  font-weight: bold;
}

/* === viewforum.component === */
.new-icon {
  background-color: #ffc107;
  color: #333;
  font-weight: bold;
  font-size: 0.7em;
  border-radius: 3px;
  text-transform: uppercase;
}

.new-posts .tclcon h3 a {
  font-weight: bold;
}

.new-posts-link {
  font-size: 0.8em;
  font-weight: normal;
  color: #d9534f;
}

.new-posts-link:hover {
  text-decoration: underline;
}

/* === mask-list.component === */
.mask-table th,
.mask-table td {
  border: 1px solid #e2e8f0;
}

.mask-table th {
  background-color: #f8fafc;
  font-weight: 600;
}

.mask-avatar {
  border-radius: 50%;
}

.no-avatar {
  border-radius: 50%;
  background-color: #cbd5e1;
  font-size: 0.75rem;
  color: #475569;
}

.error-message {
  color: #ef4444;
}

/* === recovery-codes.component === */
.warn-message {
  background-color: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: 4px;
}

.recovery-code {
  font-family: monospace;
  font-size: 1.5em;
  letter-spacing: 0.05em;
}

/* === characterview.component === */
.portrait-frame img {
  border: 2px solid #d1bc9b;
  background: #fcfaf2;
}

.char-meta-sidebar {
  font-size: 0.9em;
  color: #7a5d3b;
}

.char-name-title {
  font-size: 2em;
  color: #1b3a6d;
  border-bottom: 1px solid #d1bc9b;
}

.field-item {
  background: #fffdf7;
  border-left: 3px solid #9c7d58;
}

.field-item .label {
  font-size: 0.8em;
  color: #7a5d3b;
  text-transform: uppercase;
}

.field-item .value {
  font-weight: bold;
  font-size: 1.1em;
}

.char-biography h3 {
  color: #1b3a6d;
  border-bottom: 1px solid #d1bc9b;
}

.bio-text {
  line-height: 1.8;
  color: #333;
  white-space: pre-wrap;
}

.char-activity-table th,
.char-activity-table td {
  border: 1px solid #d1bc9b;
}

.char-activity-table th {
  background: #1b3a6d;
  color: #fcfaf2;
}

.char-group-path {
  background: rgba(0, 0, 0, 0.03);
  border-left: 3px solid #9c7d58;
  font-size: 0.95em;
}

.group-label {
  font-weight: bold;
  color: #7a5d3b;
  text-transform: uppercase;
  font-size: 0.8em;
}

.main-group {
  font-weight: 600;
  color: #1b3a6d;
}

.group-separator {
  color: #9c7d58;
  font-size: 0.8em;
}

.group-item {
  color: #444;
}

/* === direct-chat.component === */
.pm-container {
  border-top: 1px solid #000;
}

.pm-sidebar {
  border-right: 1px solid #d1bc9b;
}

.pm-contact {
  cursor: pointer;
  border-bottom: 1px solid #000;
}

.pm-contact.active {
  background: #e9e3d5;
}

.new-chat-block {
  border-bottom: 1px solid #d1bc9b;
}

.autocomplete-dropdown {
  border: 1px solid #d1bc9b;
  background: #fffdf7;
}

.autocomplete-dropdown li:hover {
  background: #e9e3d5;
}

.unread-badge {
  background: #9c7d58;
  color: #fcfaf2;
  font-size: 0.75em;
  font-weight: bold;
}

.pm-no-chat {
  color: var(--text-muted, #888);
  font-style: italic;
}

.loader-spinner {
  border: 2px solid #d1bc9b;
  border-top-color: #9c7d58;
  animation: spin 0.7s linear infinite;
}

.pm-history .post {
  border: none;
}

::ng-deep .search-highlight {
  background: #c2a67a;
  color: #000;
}

#pm-form-buttons td:hover {
  background: #e9e3d5;
}

.pm-input {
  border-top: 1px solid #d1bc9b;
}

.pm-input textarea {
  border: 1px solid #d1bc9b;
}

/* === image-upload.component === */
.btn-remove {
  background: none;
  border: none;
  font-size: 16px;
  color: #888;
}

.btn-remove:hover {
  color: #c00;
}

.loader-row {
  color: #555;
}

.loader {
  border: 3px solid #ccc;
  border-top-color: #555;
  animation: spin 0.7s linear infinite;
}

.thumbnail-preview {
  border: 1px solid #ddd;
}

.error-text {
  color: #c00;
  font-size: 13px;
}

.btn-primary {
  font-weight: bold;
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: default;
}

/* === preview.component === */
.preview-banner {
  background-color: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: 4px;
  font-weight: 500;
}

.preview-post-banner {
  background-color: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: 4px 4px 0 0;
  font-weight: 500;
}

.preview-post {
  border: 2px dashed #ffc107;
  border-top: none;
  border-radius: 0 0 4px 4px;
  opacity: 0.9;
}

/* === bb-toolbar.component === */
.spoiler-modal-backdrop {
  background: rgba(0, 0, 0, 0.4);
}

.spoiler-modal {
  background: #fffdf7;
  border: 1px solid #d1bc9b;
  border-radius: 4px;
}

.spoiler-modal p {
  color: #333;
  font-size: 0.9em;
}

.spoiler-modal input {
  border: 1px solid #d1bc9b;
  border-radius: 4px;
  font-size: 0.9em;
  background: #fff;
  color: #333;
}

.spoiler-modal-actions button {
  border: 1px solid #d1bc9b;
  border-radius: 4px;
  font-size: 0.9em;
  background: #e9e3d5;
  color: #333;
}

.spoiler-modal-actions button:first-child {
  background: #1b3a6d;
  color: #fff;
  border-color: #1b3a6d;
}

/* === post-form.component === */
.post-form-profile-sidebar {
  background: #f9f9f9;
  border: 1px solid #ccc;
  text-align: center;
}

.mention-dropdown {
  border: 1px solid #d1bc9b;
  background: #fffdf7;
}

.mention-dropdown li:hover {
  background: #e9e3d5;
}

.post-form-avatar-box img {
  border-radius: 4px;
}

.post-form-identity-name {
  font-weight: bold;
}

/* === image-field.component === */
.mode-toggle button {
  border: 1px solid #ccc;
  background: #f5f5f5;
  cursor: pointer;
  font-size: 0.875rem;
}

.mode-toggle button:first-child {
  border-radius: 4px 0 0 4px;
}

.mode-toggle button:last-child {
  border-radius: 0 4px 4px 0;
}

.mode-toggle button.active {
  background: #007bff;
  color: white;
  border-color: #007bff;
}

.btn-upload {
  background: #007bff;
  color: white;
}

.btn-upload:hover {
  background: #0069d9;
}

.preview {
  border: 1px solid #ddd;
}

.error-row {
  color: #dc3545;
}

.error-text {
  font-size: 0.875rem;
}

.spinner {
  border: 2px solid rgba(0, 0, 0, 0.15);
  border-top-color: #007bff;
  animation: spin 0.6s linear infinite;
}

/* === wanted-character-list.component === */
.wanted-filter-sidebar {
  background: #f4f4f4;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.view-toggle .button {
  font-size: 0.85em;
  background: #e0e0e0;
  border: 1px solid #bbb;
}

.view-toggle .button.active {
  background: #555;
  color: #fff;
  border-color: #555;
}

.wanted-filter-group h4 {
  font-size: 0.9em;
  text-transform: uppercase;
  border-bottom: 1px solid #ddd;
  color: #555;
}

.wanted-card {
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #fff;
}

.card-show-more {
  background: linear-gradient(to bottom, transparent, #fff);
}

.card-show-more span {
  font-size: 0.85em;
  color: #555;
  text-decoration: underline;
}

.card-hide span {
  font-size: 0.85em;
  color: #555;
  text-decoration: underline;
}

.card-name {
  font-size: 1.05em;
  font-weight: bold;
}

.card-factions {
  font-size: 0.85em;
  color: #666;
  font-style: italic;
}

.card-fields {
  font-size: 0.88em;
}

.field-name {
  font-weight: bold;
}

.field-value {
  color: #333;
}

.wanted-table {
  border: 1px solid #ccc;
}

.wanted-table th {
  background: #e1e1e1;
}

.wanted-table td {
  border-bottom: 1px solid #eee;
}

/* === user-profile.component === */
.user-avatar img {
  border: 1px solid #d1bc9b;
  background: #fcfaf2;
}

.add-char-link {
  cursor: pointer;
  color: #7a5d3b;
  text-decoration: underline;
}

:host ::ng-deep .punbb .main .category th,
.user-profile-th {
  background-color: #1b3a6d;
  color: #fcfaf2;
  border-bottom: 2px solid #c2a67a;
  font-weight: bold;
  text-transform: uppercase;
  font-size: 0.9em !important;
}

.user-profile-td {
  border-bottom: 1px solid #e9e3d5;
}

.user-profile-altstyle td {
  background-color: #fcfaf2;
}

.tclcon a {
  font-weight: bold;
  color: #7a5d3b;
  text-decoration: none;
}

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

.edit-link {
  font-weight: normal;
  font-size: 0.9em;
}

/* === character-profile-edit.component === */
.readonly-input {
  background-color: #f0f0f0;
  color: #666;
  cursor: not-allowed;
  border: 1px solid #ccc;
}

.btn-save {
  color: white;
  font-size: 0.95rem;
  transition: background-color 0.2s;
}

.btn-save--idle,
.btn-save--loading {
  background-color: #007bff;
}

.btn-save--idle:hover {
  background-color: #0069d9;
}

.btn-save--success {
  background-color: #28a745;
}

.btn-save--error {
  background-color: #dc3545;
}

.btn-save:disabled {
  opacity: 0.85;
}

.btn-save .spinner {
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: white;
  animation: spin 0.6s linear infinite;
}

/* === cropped-image-field.component === */
.dimensions {
  font-size: 0.8em;
  color: #666;
}

.cropped-mode-toggle button {
  border: 1px solid #ccc;
  background: #f5f5f5;
  cursor: pointer;
  font-size: 0.875rem;
}

.cropped-mode-toggle button:first-child {
  border-radius: 4px 0 0 4px;
}

.cropped-mode-toggle button:last-child {
  border-radius: 0 4px 4px 0;
}

.cropped-mode-toggle button.active {
  background: #007bff;
  color: white;
  border-color: #007bff;
}

.overlay {
  background: rgba(0, 0, 0, 0.5);
}

.crop-box {
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4);
}

.resize-handle {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.4);
  border-radius: 2px;
}

.crop-hint {
  font-size: 0.8em;
  color: #888;
}

.btn-crop {
  background: #007bff;
  color: white;
  font-size: 0.875rem;
}

.btn-crop:hover {
  background: #0069d9;
}

.btn-cancel {
  background: #f5f5f5;
  border: 1px solid #ccc;
  font-size: 0.875rem;
}

.btn-cancel:hover {
  background: #e8e8e8;
}

.cropped-preview {
  border: 1px solid #ddd;
}

.cropped-error-row {
  color: #dc3545;
}

.cropped-error-text {
  font-size: 0.875rem;
}

.cropped-spinner {
  border: 2px solid rgba(0, 0, 0, 0.15);
  border-top-color: #007bff;
  animation: spin 0.6s linear infinite;
}

/* === viewtopic.component === */
.topic-full-banner {
  border: 1px solid #d1bc9b;
  border-left: 4px solid #9c7d58;
  background-color: #fdf6ec;
  color: #5a4020;
  font-size: 0.95em;
}

.post-link-btn {
  cursor: pointer;
  opacity: 0.5;
}

.post-link-btn:hover {
  opacity: 1;
}

/* === navlinks.component === */
.navlink-inactive {
  opacity: 0.4;
}

/* === settings notification table === */
.notif-col-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.notif-check-cell {
  text-align: center;
}

.notif-save-row {
  margin-top: 10px;
}

/* === scroll-nav.component === */
.scroll-nav-btn {
  background: var(--link-color, #888);
  color: #fff;
  border-radius: 50%;
  opacity: 0.6;
  transition: opacity 0.2s;
}
.scroll-nav-btn:hover {
  opacity: 1;
}
