@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap");
@import url("./Zenbones-Brainy-Unhinted.css");

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

::selection {
  background-color: rgba(127, 238, 100, 0.3);
}

body {
  background-color: #0d180a;
  color: #7fee64;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto 1fr auto;
  grid-template-areas: "header" "main" "foot";
  gap: 0px 0px;
  font-size: 16px;
  font-family:
    "Inter Variable", "Inter", ui-sans-serif, system-ui, sans-serif,
    "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol",
    "Noto Color Emoji";
  min-height: 100vh;
}

/* Disable page scroll when dialog is open */
html.no-scroll,
body.no-scroll {
  overflow: hidden !important;
}

/* Themed scrollbars (Firefox) */
html,
.nav,
.aside,
.nav-dialog-content,
.main {
  scrollbar-color: rgba(127, 238, 100, 0.5) rgba(13, 24, 10, 0.7);
  scrollbar-width: thin;
}

/* Themed scrollbars (WebKit/Blink) */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background-color: rgba(13, 24, 10, 0.7);
  border-radius: 8px;
}

::-webkit-scrollbar-thumb {
  background-color: rgba(127, 238, 100, 0.35);
  border-radius: 8px;
  border: 2px solid rgba(13, 24, 10, 0.8);
}

::-webkit-scrollbar-thumb:hover {
  background-color: rgba(127, 238, 100, 0.55);
}

a {
  color: #7fee64;
  text-decoration: underline;
  text-decoration-color: rgba(127, 238, 100, 0.4);
  text-underline-offset: 2px;
  transition: text-decoration-color 0.2s;
}

a:visited {
  color: #7fee64;
}

a:hover {
  color: #9fff7a;
  text-decoration-color: #7fee64;
}

.header {
  grid-area: header;
  border-bottom: 1px solid rgba(127, 238, 100, 0.2);
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: rgba(13, 24, 10, 0.8);
}

.header h1 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
  font-family:
    "Zenbones Brainy Web", "Inter Variable", "Inter", ui-sans-serif, system-ui,
    sans-serif;
}

.header h1 a {
  text-decoration: none;
  color: #7fee64;
}

.nav {
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  border-right: 1px solid rgba(127, 238, 100, 0.2);
  background-color: rgba(13, 24, 10, 0.5);
  overflow-y: auto;
}

.nav h2 {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(127, 238, 100, 0.7);
  margin-bottom: 1rem;
  margin-top: 0;
  font-family:
    "Zenbones Brainy Web", "Inter Variable", "Inter", ui-sans-serif, system-ui,
    sans-serif;
}

.nav ul {
  padding: 0;
  margin-left: 0;
  list-style: none;
}

.nav li {
  margin: 0.25rem 0;
}

.nav a {
  display: block;
  padding: 0.25rem 0;
  color: rgba(127, 238, 100, 0.8);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.nav a:hover {
  color: #7fee64;
}

.nav a[aria-current="page"] {
  color: #7fee64;
  font-weight: 600;
  padding-left: 0.5rem;
  border-left: 2px solid #7fee64;
}

.nav ul ul {
  margin-left: 1rem;
  margin-top: 0.25rem;
}

.main-content {
  grid-area: main;
  display: grid;
  grid-template-columns: 250px 1fr;
  grid-template-areas: "nav main";
  overflow: hidden;
}

.main {
  grid-area: main;
  padding: 2rem;
  overflow-y: auto;
  max-width: 100%;
}

.aside {
  grid-area: aside;
  padding: 2rem;
  border-left: 1px solid rgba(127, 238, 100, 0.2);
  overflow-y: auto;
  background-color: rgba(13, 24, 10, 0.3);
}

.aside h2 {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(127, 238, 100, 0.7);
  margin-bottom: 1rem;
  margin-top: 0;
  font-family:
    "Zenbones Brainy Web", "Inter Variable", "Inter", ui-sans-serif, system-ui,
    sans-serif;
}

.aside a {
  color: rgba(127, 238, 100, 0.8);
  font-size: 0.9rem;
}

.aside a:hover {
  color: #7fee64;
}

.aside a[aria-current="page"] {
  color: #7fee64;
  font-weight: 600;
}

.page-toc-mobile {
  display: none;
  margin-bottom: 2rem;
  padding: 1.5rem;
  border: 1px solid rgba(127, 238, 100, 0.2);
  border-radius: 4px;
  background-color: rgba(13, 24, 10, 0.3);
}

.page-toc-mobile h2 {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(127, 238, 100, 0.7);
  margin-bottom: 1rem;
  margin-top: 0;
  font-family:
    "Zenbones Brainy Web", "Inter Variable", "Inter", ui-sans-serif, system-ui,
    sans-serif;
}

.page-toc-mobile a {
  color: rgba(127, 238, 100, 0.8);
  font-size: 0.9rem;
}

.page-toc-mobile a:hover {
  color: #7fee64;
}

.page-toc-mobile a[aria-current="page"] {
  color: #7fee64;
  font-weight: 600;
}

.foot {
  grid-area: foot;
  border-top: 1px solid rgba(127, 238, 100, 0.2);
  padding: 1.5rem 2rem;
  background-color: rgba(13, 24, 10, 0.8);
}

.foot p {
  text-align: center;
  padding: 0;
  margin: 0;
  color: rgba(127, 238, 100, 0.7);
  font-size: 0.9rem;
}

.foot a {
  color: rgba(127, 238, 100, 0.8);
}

.foot a:hover {
  color: #7fee64;
}

.fl-icon {
  position: absolute;
  text-decoration: none;
}

.fl-icon:hover {
  animation: shake 560ms ease-in-out;
}

.table-of-contents ol {
  margin-left: 1em;
}

h1,
h2,
h3,
h4,
h5,
h6,
p,
ul,
ol,
details {
  color: #7fee64;
}

hr {
  border-color: rgba(127, 238, 100, 0.2);
  margin: 1.5rem 0;
}

@media (min-width: 768px) {
  .main-content {
    grid-template-columns: 250px 1fr 250px;
    grid-template-areas: "nav main aside";
  }
}

/* Mobile navigation toggle button */
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid rgba(127, 238, 100, 0.3);
  color: #7fee64;
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s;
  margin: 0;
}

.nav-toggle:hover {
  background-color: rgba(127, 238, 100, 0.1);
  border-color: rgba(127, 238, 100, 0.5);
}

.nav-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 998;
  backdrop-filter: blur(2px);
}

.nav-overlay.active {
  display: block;
}

/* Navigation dialog */
.nav-dialog {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  max-width: 400px;
  height: 100vh;
  max-height: 100vh;
  margin: 0;
  padding: 0;
  border: none;
  border-right: 1px solid rgba(127, 238, 100, 0.2);
  background-color: rgba(13, 24, 10, 0.95);
  color: #7fee64;
  z-index: 999;
  display: flex;
  flex-direction: column;
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.3);
  transform: translateX(-100%);
  transition: transform 0.3s ease;
}

.nav-dialog[open] {
  transform: translateX(0);
}

.nav-dialog::backdrop {
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
}

.nav-dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid rgba(127, 238, 100, 0.2);
  background-color: rgba(13, 24, 10, 0.8);
}

.nav-dialog-header h2 {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(127, 238, 100, 0.7);
  margin: 0;
  font-family:
    "Zenbones Brainy Web", "Inter Variable", "Inter", ui-sans-serif, system-ui,
    sans-serif;
}

.nav-dialog-close {
  background: none;
  border: 1px solid rgba(127, 238, 100, 0.3);
  color: #7fee64;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
  transition: all 0.2s;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-dialog-close:hover {
  background-color: rgba(127, 238, 100, 0.1);
  border-color: rgba(127, 238, 100, 0.5);
  color: #9fff7a;
}

.nav-dialog-content {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
}

.nav-dialog-content ul {
  padding: 0;
  margin-left: 0;
  list-style: none;
}

.nav-dialog-content li {
  margin: 0.25rem 0;
}

.nav-dialog-content a {
  display: block;
  padding: 0.25rem 0;
  color: rgba(127, 238, 100, 0.8);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.nav-dialog-content a:hover {
  color: #7fee64;
}

.nav-dialog-content a[aria-current="page"] {
  color: #7fee64;
  font-weight: 600;
  padding-left: 0.5rem;
  border-left: 2px solid #7fee64;
}

.nav-dialog-content ul ul {
  margin-left: 1rem;
  margin-top: 0.25rem;
}

@media (max-width: 767px) {
  .main-content {
    grid-template-columns: 1fr;
    grid-template-areas: "main";
  }

  .nav {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

  .aside {
    display: none;
  }

  .page-toc-mobile {
    display: block;
  }

  .header {
    padding: 1rem;
  }

  .nav-dialog {
    max-width: 100%;
  }
}

@keyframes shake {
  0% {
    scale: 1;
    transform: rotate(0deg);
  }

  20% {
    transform: rotate(-25deg);
  }

  40% {
    transform: rotate(10deg);
  }

  50% {
    scale: 1.2;
  }

  60% {
    transform: rotate(-25deg);
  }

  80% {
    transform: rotate(10deg);
  }

  100% {
    scale: 1;
    transform: rotate(0deg);
  }
}
