:root {
  --primary: #FF9933;
  --secondary: #2D2D2D;
  --text: #F0F0F0;
  --accent: #4A90D9;
  --background: #1A1A1A;
  --dark-bg: #0D0D0D;
  --code-highlight: #00FF00;
  --warning: #FF6B6B;
}

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

html, body {
  background-color: var(--dark-bg);
  color: var(--text);
  font-family: 'Segoe UI', Tahoma, Geneva, sans-serif;
  font-size: 16px;
  line-height: 1.8;
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
}

/* Header */
header {
  background-color: var(--dark-bg);
  border-bottom: 2px solid var(--primary);
  padding: 1rem 2rem;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 1.2rem;
  font-weight: bold;
}

.logo-text {
  color: var(--primary);
  font-family: 'Courier New', monospace;
  letter-spacing: 2px;
}

.beta-badge {
  background-color: var(--primary);
  color: var(--dark-bg);
  padding: 0.3rem 0.8rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: bold;
  margin-left: 1rem;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--primary);
  font-size: 1.5rem;
  cursor: pointer;
}

/* Main container */
main {
  display: flex;
  margin-top: 70px;
  flex: 1;
}

/* Sidebar navigation */
.sidebar {
  width: 250px;
  background-color: var(--background);
  padding: 2rem 0;
  border-right: 1px solid var(--secondary);
  overflow-y: auto;
  height: calc(100vh - 70px);
  position: sticky;
  top: 70px;
}

.nav-category {
  margin-bottom: 1.5rem;
  padding: 0 1rem;
}

.nav-category-title {
  color: var(--primary);
  font-weight: bold;
  margin-bottom: 0.8rem;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-category-title:hover {
  background-color: var(--secondary);
  border-radius: 4px;
}

.nav-item {
  margin-left: 1rem;
  margin-bottom: 0.5rem;
}

.nav-item a {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.9rem;
  display: block;
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  transition: all 0.3s;
}

.nav-item a:hover {
  background-color: var(--secondary);
  color: var(--primary);
}

/* Content area */
.content {
  flex: 1;
  padding: 2rem 3rem;
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
  background-color: var(--background);
}

/* Typography */
h1 {
  font-size: 2.5em;
  color: var(--primary);
  margin: 1rem 0 0.5rem 0;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--primary);
  font-family: 'Courier New', monospace;
  letter-spacing: 1px;
}

h2 {
  font-size: 1.8em;
  color: var(--accent);
  margin: 1.5rem 0 0.8rem 0;
}

h3 {
  font-size: 1.3em;
  color: var(--primary);
  margin: 1.2rem 0 0.5rem 0;
}

p {
  margin-bottom: 1rem;
  text-align: justify;
}

strong {
  color: var(--primary);
  font-weight: bold;
}

em {
  color: var(--accent);
  font-style: italic;
}

/* Links */
a {
  color: var(--accent);
  text-decoration: underline;
  transition: color 0.3s;
}

a:hover {
  color: var(--primary);
}

/* Code blocks */
code, pre {
  background-color: var(--dark-bg);
  color: var(--code-highlight);
  font-family: 'Courier New', monospace;
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
}

pre {
  border-left: 3px solid var(--primary);
  padding: 1.5rem;
  margin: 1.5rem 0;
  overflow-x: auto;
  font-size: 0.9rem;
}

/* Lists */
ul, ol {
  margin-left: 2rem;
  margin-bottom: 1rem;
}

li {
  margin-bottom: 0.5rem;
}

/* Images */
img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.5);
  margin: 1.5rem 0;
  display: block;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.8rem 1.5rem;
  border: 1px solid var(--primary);
  color: var(--primary);
  text-decoration: none;
  border-radius: 4px;
  transition: all 0.3s;
  cursor: pointer;
  background-color: transparent;
  font-family: inherit;
}

.btn:hover {
  background-color: var(--primary);
  color: var(--dark-bg);
}

/* Navigation links */
.nav-links {
  display: flex;
  justify-content: space-between;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--secondary);
}

.nav-links a {
  text-decoration: none;
  color: var(--primary);
  font-weight: bold;
}

/* Footer */
footer {
  background-color: var(--dark-bg);
  border-top: 1px solid var(--primary);
  padding: 2rem;
  margin-top: 3rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  text-align: center;
}

.footer-col h3 {
  color: var(--primary);
  margin-bottom: 1rem;
}

.footer-col p {
  font-size: 0.9rem;
  color: #AAA;
  margin-bottom: 0.5rem;
}

.footer-col a {
  color: var(--primary);
}

/* Breadcrumbs */
.breadcrumbs {
  margin-bottom: 2rem;
  font-size: 0.9rem;
  color: #AAA;
}

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

/* Table of contents */
.toc {
  background-color: var(--secondary);
  border-left: 3px solid var(--primary);
  padding: 1.5rem;
  margin: 2rem 0;
  border-radius: 4px;
}

.toc h3 {
  color: var(--primary);
  margin-top: 0;
}

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

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

/* Hero section */
.hero {
  background-color: var(--secondary);
  padding: 3rem;
  border-radius: 6px;
  margin-bottom: 2rem;
  border-left: 4px solid var(--primary);
}

.hero h2 {
  margin-top: 0;
}

/* Featured cards */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.card {
  background-color: var(--secondary);
  padding: 1.5rem;
  border-radius: 6px;
  border: 1px solid #333;
  transition: all 0.3s;
}

.card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(255, 153, 51, 0.2);
  transform: translateY(-2px);
}

.card h3 {
  margin-top: 0;
}

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

/* 404 page */
.error-page {
  text-align: center;
  padding: 3rem 0;
}

.error-page h1 {
  font-size: 4em;
  margin-bottom: 1rem;
}

/* Responsive design */
@media (max-width: 768px) {
  header {
    padding: 1rem;
  }

  .nav-toggle {
    display: block;
  }

  .sidebar {
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--secondary);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s;
    z-index: 999;
  }

  .sidebar.active {
    max-height: 500px;
  }

  main {
    flex-direction: column;
    margin-top: 70px;
  }

  .content {
    padding: 1.5rem;
  }

  h1 {
    font-size: 2em;
  }

  h2 {
    font-size: 1.5em;
  }

  .footer-content {
    grid-template-columns: 1fr;
  }

  .nav-links {
    flex-direction: column;
    gap: 1rem;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.6em;
  }

  h2 {
    font-size: 1.2em;
  }

  .content {
    padding: 1rem;
  }

  pre {
    font-size: 0.8rem;
    padding: 1rem;
  }
}
