body,
html {
  font-family: "Poppins", Arial, Helvetica, sans-serif;
  font-size: 16px;
}
:root {
  color-scheme: dark;
  --bg: #121212;
  --text: #e0e0e0;
  --highlight: #1e1e1e;
  --border: #333;
  --link: #8ab4f8;
  --accent: #4f8cff;
  --accent-bg: #1a2a4f;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

body {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

nav {
  width: 250px;
  background: var(--highlight);
  border-right: 1px solid var(--border);
  padding: 1rem;
  overflow-y: auto;
}

.nav-header {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.nav-header h1 {
  margin: 0;
  color: var(--accent);
  text-shadow: 0 0 5px rgba(79, 140, 255, 0.3);
}

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

nav li {
  margin-bottom: 0.5rem;
}

.step-link {
  display: block;
  padding: 0.4rem 0.8rem;
  font-size: 0.9rem;
  border-radius: 6px;
  color: var(--link);
  text-decoration: none;
  font-weight: 500;
  background-color: transparent;
  transition: background 0.2s, color 0.2s;
}

.step-link:hover,
.step-link:focus {
  background-color: var(--accent-bg);
  color: var(--accent);
  text-decoration: underline;
}

.step-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.step-link.active {
  background-color: var(--accent-bg);
  color: var(--accent);
}

main {
  flex: 1;
  padding: 2rem;
  overflow-y: auto;
}

article {
  display: none;
}

article.active {
  display: block;
}

article h2 {
  margin-top: 0;
  color: var(--accent);
  border-bottom: 1px solid var(--accent);
  text-shadow: 0 0 5px rgba(79, 140, 255, 0.3);
}

pre {
  background: #1e1e1e;
  padding: 1em;
  border-radius: 4px;
  overflow-x: auto;
  border: 1px solid var(--border);
}

code {
  font-family: "Courier New", Courier, monospace;
  font-size: 0.9em;
}

/* Watermark styling */
.watermark {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  font-size: 0.75rem;
  color: var(--text);
  opacity: 0.6;
  background: var(--highlight);
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  border: 1px solid var(--border);
  z-index: 1000;
}

.watermark a {
  color: var(--link);
  text-decoration: none;
}

.watermark a:hover {
  color: var(--accent);
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
  .step-link {
    transition: none;
  }
}

@media (prefers-contrast: high) {
  :root {
    --border: #666;
    --text: #ffffff;
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  body {
    flex-direction: column;
    height: auto;
    overflow: auto;
  }

  nav {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 1rem;
    overflow-y: visible;
  }

  nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  nav li {
    margin-bottom: 0;
    flex: 1;
    min-width: fit-content;
  }

  .step-link {
    text-align: center;
    padding: 0.8rem 1rem;
    font-size: 0.85rem;
  }

  main {
    padding: 1.5rem 1rem;
    height: auto;
    overflow-y: visible;
  }
}

@media (max-width: 480px) {
  nav ul {
    flex-direction: column;
  }

  nav li {
    flex: none;
  }

  .step-link {
    font-size: 0.9rem;
    padding: 1rem;
  }

  main {
    padding: 1rem;
  }

  .watermark {
    position: static;
    margin-top: 2rem;
    text-align: center;
    bottom: auto;
    right: auto;
  }
}
