@import url(https://fonts.googleapis.com/css?family=Noto+Sans);

/* Dark Mode (Default) */
:root[data-theme="dark"],
:root {
  --maincolor: #0a1014;
  --primarycolor: #E4E4E4;
  --secondarycolor: #9E9E9E;
  --tertiarycolor: #7377c6;
  --postbackground: #0a1014;
  --linkcolor: #7377c6;
  --linkcoloralternate: #abaddd;
  --white: #FFFFFF;
  --text: #898c8d;
  --quote: #979797;
  --blue: #979797;
  --code: #131e25;
  --comments: #131e25;
  --note: #2b3249;
  --warning: #272700;
}

/* Light Mode */
:root[data-theme="light"] {
  --maincolor: #F9FAFB;
  --primarycolor: #0a1014;
  --secondarycolor: #4b4f52;
  --tertiarycolor: #3f419e;
  --postbackground: #F5F6F7;
  --linkcolor: #3f419e;
  --linkcoloralternate: #6e70ff;
  --white: #FFFFFF;
  --text: #0a1014;
  --quote: #6b6f72;
  --blue: #6b6f72;
  --code: #F5F6F7;
  --comments: #F5F6F7;
  --note: #d4dde8;
  --warning: #f0d888;
}

/* Text styles */
body {
  font-family: "Noto Sans", sans-serif;
  background-color: var(--maincolor);
  color: var(--text);
  margin: 0 auto;
  max-width: 50em;
  padding-left: 50px;
  padding-right: 50px;
  padding-top: 50px;
  padding-bottom: 50px;
  hyphens: auto;
  overflow-wrap: break-word;
  text-rendering: optimizeLegibility;
  font-kerning: normal;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  background: none;
  border: 1px solid var(--tertiarycolor);
  color: var(--text);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 1000;
  padding: 0;
}

@media (max-width: 780px) {
  body {
    font-size: 0.9em;
    padding: 1em;
    padding-top: 80px; /* Space for button in flow */
  }

  .theme-toggle {
    position: static; /* Remove fixed positioning */
    width: 45px;
    height: 45px;
    font-size: 20px;
    margin: 10px;
    top: 20px !important;
    right: 20px !important;
    font-size: 12px;
  
  }
}

.theme-toggle:hover {
  border-color: var(--linkcoloralternate);
  color: var(--linkcoloralternate);
}

.theme-toggle:active {
  transform: scale(0.95);
}



h1 {
  color: var(--primarycolor) !important;
  font-family: "Noto Sans", sans-serif;
  font-weight: bold;
  text-align: center;
}

h2 {
  color: var(--tertiarycolor) !important;
  font-family: "Noto Sans", sans-serif;
  font-style: normal;
  font-weight: bold;
}

h3,
h4,
h5,
h6 {
  color: var(--secondarycolor) !important;
  font-family: "Noto Sans", sans-serif;
  font-weight: bold;
}

.title {
  color: var(--tertiarycolor) !important;
  font-family: "Noto Sans", sans-serif;
  font-style: normal;
  font-weight: bold;
}

p {
  font-family: "Noto Sans", sans-serif !important;
}

#toc.toc2 a:link {
  color: var(--linkcoloralternate);
}

blockquote {
  border-left: 5px solid var(--linkcoloralternate) !important;
  padding-left: 25px;
}

blockquote p {
  color: var(--linkcoloralternate) !important;
  font-style: italic;
}

hr {
  color: var(--text);
}

.post {
  display: flex;
  flex-direction: column;
  background: var(--postbackground);
  border: 1px solid var(--text);
  border-radius: 15px;
  padding: 10px;
  margin-top: 25px;
  margin-bottom: 25px;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.post p {
  margin-top: 7px;
  margin-bottom: 7px;
}

.post h2 {
  margin-top: 5px;
  margin-bottom: 7px;
  color: var(--tertiarycolor) !important;
  font-family: "Noto Sans", sans-serif;
  font-style: normal;
  font-weight: bold;
}

.post p:last-child {
  display: flex;
}

.post p:last-child a {
  margin-left: auto;
  border: 1px solid var(--tertiarycolor);
  border-radius: 999px;
  padding: 7px;
  color: var(--tertiarycolor);
  text-decoration: none;
  transition: all 0.3s ease;
}

.post a:hover {
  color: var(--linkcoloralternate) !important;
  border: 1px solid var(--linkcoloralternate) !important;
}

a {
  color: var(--tertiarycolor);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--linkcoloralternate) !important;
  text-decoration: none !important;
}

.center p {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  align-items: center;
}

.center a {
  padding-right: 25px;
}

.center p a:hover {
  border: 0px solid var(--linkcoloralternate) !important;
}

.center-img {
  display: block;
  margin-left: auto;
  margin-right: auto;
  width: 23%;
}

header#title-block-header {
  display: none;
}

pre {
  background-color: var(--code);
  border: 1px solid var(--primarycolor) !important;
  border-radius: 3px;
  padding: 10px;
  transition: background-color 0.3s ease;
}

pre,
code,
.sourceCode,
pre > code.sourceCode,
pre.numberSource {
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
}

figure {
  text-align: center;
}

figure figcaption {
  display: block;
  text-align: center;
  color: var(--primarycolor);
  margin-top: 0.5rem;
  font-size: 0.95rem;
}

.note {
  background-color: var(--note);
  border: 1px solid var(--note);
  border-radius: 3px;
  padding: 5px;
}

.warning {
  background-color: var(--warning);
  border: 1px solid var(--warning);
  border-radius: 3px;
  padding: 5px;
}

.filter {
  padding-top: 25px;
}

#filter {
  background-color: var(--maincolor);
  color: var(--text);
  border: 1px solid #979797;
  border-radius: 5px;
  padding: 7px;
  transition: all 0.3s ease;
}

#filter:active {
  background-color: var(--maincolor);
  color: var(--text);
  border: 1px solid var(--tertiarycolor);
  border-radius: 5px;
  padding: 7px;
}

#filter:hover {
  background-color: var(--maincolor);
  color: var(--text);
  border: 1px solid var(--tertiarycolor);
  border-radius: 5px;
  padding: 7px;
}

.tagCheckbox {
  appearance: none;
  -webkit-appearance: none;
  background-color: var(--maincolor);
  color: var(--text);
  width: 15px;
  height: 15px;
  cursor: pointer;
  border: 2px solid var(--text);
  margin-right: 5px;
  vertical-align: middle;
  transition: all 0.3s ease;
}

.tagCheckbox:checked {
  background-color: var(--tertiarycolor);
}

/* Comments */
:root {
  --comment-indent: 1.5rem; /* if unset, default to 1.5rem */
}

.comments {
  margin-top: 1rem;
}

.comment-notice,
.comment-cta {
  color: var(--text);
  background: var(--comments);
  border: 1px solid var(--text);
  border-radius: 10px;
  padding: 0.5rem 0.75rem;
  margin: 0.5rem 0;
}

.comments .comment-notice a,
.comments .comment-cta a {
  color: var(--tertiarycolor);
}

.mastodon-comment {
  border: 1px solid var(--text);
  border-radius: 12px;
  padding: 0.75rem;
  background: var(--comments);
  margin: 0.75rem 0;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.mastodon-comment.active,
.comment-action.active,
.comments .active {
  border-color: var(--linkcoloralternate);
  background: rgba(115, 119, 198, 0.12);
}

/* Author/header */
.comment-author {
  display: flex;
  align-items: left;
  gap: 0.6rem;
  margin-bottom: 0.4rem;
  vertical-align: middle;
  
}

.comment-avatar {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  object-fit: cover;
  padding-left: 20px;
  padding-right: 5px;
}

.comment-author-info {
  min-width: 0;
}

.comment-name {
  color: var(--primarycolor);
  font-weight: 700;
  line-height: 1.2;
}

.comment-handle {
  color: var(--secondarycolor);
  font-size: 0.95em;
  margin-left: 0.35rem;
}

.comment-date {
  color: var(--quote);
  font-size: 0.9em;
  margin-top: 0.15rem;
}

/* Content */
.comment-content {
  color: var(--text);
  line-height: 1.5;
  padding: 20px;
}

.comment-content a {
  color: var(--tertiarycolor);
}

.comment-content a:hover {
  color: var(--linkcoloralternate) !important;
}

/* Attachments */
.comment-attachments {
  margin-top: 0.65rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.comment-attachments img,
.comment-attachments video {
  border: 1px solid var(--text);
  border-radius: 6px;
  max-width: 100%;
  height: auto;
  display: block;
}

/* Footer/status/actions */
.comment-status {
  color: var(--quote);
  font-size: 0.9em;
  margin-top: 0.5rem;
}

.comment-action {
  margin-top: 0.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid var(--text);
  border-radius: 999px;
  padding: 0.35rem 0.65rem;
  color: var(--text);
  background: transparent;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.05s ease;
}

.comment-action:hover {
  border-color: var(--linkcoloralternate);
  color: var(--linkcoloralternate);
}

.comment-action:active {
  transform: scale(0.98);
}

/* Reply nesting (controlled by --comment-indent) */
/* If the script outputs a nesting level class, these will work:
   e.g., .comment-reply-0, .comment-reply-1, ... (adjust if your emitter uses a different pattern). */
.mastodon-comment[class*="comment-reply-"],
.mastodon-comment[class*="reply-"] {
  position: relative;
}

/* Generic: if the nesting depth is reflected via inline style on each node:
   style="--depth: N" then this will indent correctly. */
.mastodon-comment {
  padding-left: calc(var(--depth, 0) * var(--comment-indent) + 0px);
}

/* Fallback: if the emitter uses .active to indicate “is a reply”, you can
   indent active replies a bit without depth info. */
.mastodon-comment.active {
  padding-left: calc(1 * var(--comment-indent));
}

table, th, td {
  padding: 5px;
  border: 1px solid var(--text);
  border-collapse: collapse;
}


