:root {
  /* Witch color palette */
  --witch-purple: #2b1b3d;
  --witch-purple-translucent: hsla(267, 40%, 17%, 0.85);
  --witch-plum: #44275a;
  --witch-rose: #a8577e;
  --witch-mauve: #d4a5c7;
  --witch-lavender: #e8d5e8;
  --witch-black: #0a0009;
  --witch-silver: #c0c0c0;
  --witch-moon: #f5f5f5;
  --witch-shadow: rgba(10, 0, 9, 0.7);

  /* Light theme uses lighter colors for background, darker for text */
  --primary-color: var(--witch-purple);
  --background-color: var(--witch-lavender) DC;
  --sl-color-text-accent: var(--witch-purple);

  /* Additional Starlight overrides */
  --sl-color-gray-1: var(--witch-moon);
  --sl-color-gray-2: var(--witch-lavender);
  --sl-color-gray-3: var(--witch-mauve);
  --sl-color-gray-4: var(--witch-rose);
  --sl-color-gray-5: var(--witch-plum);
  --sl-color-gray-6: var(--witch-purple);

  /* Translucent background */
  --content-bg: rgba(181, 185, 187, 0.85);
  --content-blur: 8px;
}

html[data-theme="dark"] {
  /* Dark theme uses darker colors for background, lighter for text */

  .page {
    --background-color: transparent;
  }
  --primary-color: var(--witch-lavender);
  --sl-color-text-accent: var(--witch-lavender);

  /* Additional Starlight overrides for dark theme */
  --sl-color-gray-1: var(--witch-purple);
  --sl-color-gray-2: var(--witch-plum);
  --sl-color-gray-3: var(--witch-rose);
  --sl-color-gray-4: var(--witch-mauve);
  --sl-color-gray-5: var(--witch-lavender);
  --sl-color-gray-6: var(--witch-moon);
}

.main-frame::before {
  background: url(https://cdn.nhcarrigan.com/background.png);
  background-size: cover;
  background-position: center;
  width: 100%;
  height: 100%;
  z-index: -1;
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  opacity: 1;
  pointer-events: none;
}

.main-pane {
  margin: auto;
  background-color: var(--background-color);
  color: var(--primary-color);
}

.sidebar-pane,
.right-sidebar {
  background-color: var(--background-color);
  color: var(--primary-color);
}

.right-sidebar-panel {
  color: var(--primary-color);
}

h1,
h2,
h3,
h4,
h5,
h6,
a {
  color: var(--primary-color) !important;
}

.page {
  background: var(--content-bg);
  backdrop-filter: var(--content-blur);
}

html[data-theme="dark"] .page {
  background: var(--witch-purple-translucent);
}

a[aria-current="page"] {
  color: var(--background-color) !important;
  background-color: var(--witch-rose) !important;
}

html[data-theme="dark"] a[aria-current="page"] {
  color: var(--witch-moon) !important;
}

header {
  color: var(--primary-color) !important;
  background-color: var(--witch-lavender) !important;
}

html[data-theme="dark"] header {
  background-color: var(--witch-purple) !important;
}

.large {
  color: var(--primary-color) !important;
}

.right-sidebar-panel :where(a) {
  color: var(--primary-color) !important;
}

.right-sidebar-panel :where(a):hover {
  color: var(--witch-moon) !important;
  background-color: var(--witch-rose) !important;
}

footer > div > a,
footer > div > a:visited,
footer > div > p {
  color: var(--primary-color) !important;
}

starlight-theme-select,
starlight-theme-select > label {
  color: var(--primary-color) !important;
}

starlight-theme-select select {
  color: var(--primary-color) !important;
  background-color: var(--background-color) !important;
}

starlight-theme-select select option {
  color: var(--primary-color);
  background-color: var(--background-color);
}

html[data-theme="dark"] starlight-theme-select select option {
  color: var(--witch-purple) !important;
  background-color: var(--witch-lavender) !important;
}

.social-icons::after {
  display: none;
}

.sidebar-content {
  color: var(--primary-color) !important;
}

.link-title {
  color: var(--primary-color) !important;
}

.pagination-links > a:hover {
  color: var(--witch-moon) !important;
  background-color: var(--witch-plum) !important;
}

.pagination-links > a:hover > span > .link-title {
  color: var(--witch-moon) !important;
  background-color: var(--witch-plum) !important;
}

.hero .tagline {
  color: var(--primary-color) !important;
}

site-search button[data-open-modal] {
  color: var(--primary-color) !important;
}

site-search button[data-open-modal] kbd {
  color: var(--primary-color) !important;
  background-color: var(--background-color) !important;
  border-color: var(--primary-color) !important;
}

:where(.sl-markdown-content, .content-panel, article) :not(pre) > code {
  font-family: "Courier New", monospace;
  font-weight: 600;
  background: rgba(43, 27, 61, 0.05) !important;
  color: var(--witch-purple) !important;
  padding: 2px 6px;
  border-radius: 4px;
}

html[data-theme="dark"] :where(.sl-markdown-content, .content-panel, article) :not(pre) > code {
  background: rgba(255, 255, 255, 0.08) !important;
  color: var(--witch-lavender) !important;
}

#starlight__search {
  --pagefind-ui-text: var(--primary-color);
  --pagefind-ui-primary: var(--witch-rose);
}

#starlight__search input::placeholder {
  color: var(--primary-color) !important;
  opacity: 0.8;
}

.pagefind-ui__result-excerpt {
  color: var(--primary-color) !important;
  opacity: 0.9;
}

#extra-footer-content {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-evenly;
}

#tree-nation-offset-website {
  display: inline;
  margin: 0 !important;
}
