@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Manrope:wght@200..800&display=swap');

:root {
  --primary:      #00d4e8;
  --primary-dark: #00b4c8;
  --secondary:    #e8edf2;
  --bg:           #090c0f;
  --card:         #0f1419;
  --text:         #e8edf2;
  --muted:        #7a8fa6;
  --border:       rgba(0, 212, 232, 0.14);
  --border-hard:  rgba(0, 212, 232, 0.28);
  --signal-red:   #e84855;
  --signal-amber: #f5a623;
  --font-display: -apple-system, "Inter", sans-serif;
  --font-mono:    -apple-system, "Manrope", monospace;
  --radius-sm:    4px;
  --radius-md:    8px;
  --radius-lg:    14px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-display);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 15px;
  display: flex;
  min-height: 100vh;
  background-image:
    linear-gradient(rgba(0, 212, 232, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 212, 232, 0.025) 1px, transparent 1px);
  background-size: 40px 40px;
}

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  display: flex;
  align-items: center;
}

.navbar-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 0 20px;
  max-width: 100%;
}

.logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1rem;
  color: var(--primary);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.nav-menu {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.nav-link {
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  transition: color 0.2s;
}

.nav-link:hover {
  color: var(--primary);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.2rem;
  cursor: pointer;
  flex-direction: column;
  gap: 4px;
}

.menu-toggle span {
  width: 20px;
  height: 2px;
  background: var(--text);
  display: block;
  transition: all 0.2s;
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(8px, -8px);
}

.sidebar {
  position: fixed;
  left: 0;
  top: 60px;
  width: 250px;
  height: calc(100vh - 60px);
  background: var(--card);
  border-right: 1px solid var(--border);
  padding: 30px 0;
  overflow-y: auto;
  z-index: 90;
}

.sidebar-header {
  padding: 0 20px 20px;
  border-bottom: 1px solid var(--border);
}

.sidebar-header h3 {
  font-size: 0.8rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--primary);
  font-weight: 700;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
}

.sidebar-link {
  display: block;
  padding: 12px 20px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.2s;
  border-left: 3px solid transparent;
}

.sidebar-link:hover {
  background: rgba(0, 212, 232, 0.05);
  color: var(--primary);
  border-left-color: var(--primary);
  padding-left: 24px;
}

.sidebar-link.active {
  color: var(--primary);
  background: rgba(0, 212, 232, 0.08);
  border-left-color: var(--primary);
  font-weight: 600;
}

.sidebar-section {
  padding: 20px 0;
  border-top: 1px solid var(--border);
}

.sidebar-title {
  display: block;
  padding: 0 20px 10px;
  font-size: 0.7rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--primary);
  font-weight: 700;
}

.docs-main {
  flex: 1;
  margin-left: 250px;
  margin-top: 60px;
  padding: 60px 40px;
  margin-right: auto;
}

.page {
  display: none;
  animation: fadeIn 0.3s ease;
}

.page.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.page-header {
  margin-bottom: 50px;
}

.page-header h1 {
  font-size: 2.8rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 10px;
}

.page-subtitle {
  font-size: 1.1rem;
  color: var(--muted);
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}

.content {
  line-height: 1.85;
}

.content h2 {
  font-size: 1.8rem;
  color: var(--text);
  margin: 40px 0 20px;
  font-weight: 700;
  border-bottom: 1px solid var(--border);
  padding-bottom: 15px;
}

.content h3 {
  font-size: 1.2rem;
  color: var(--primary);
  margin: 25px 0 12px;
  font-weight: 600;
}

.content h4 {
  font-size: 1rem;
  color: var(--text);
  margin: 15px 0 8px;
  font-weight: 600;
}

.content p {
  margin-bottom: 15px;
  color: var(--text);
}

.content ul,
.content ol {
  margin-left: 30px;
  margin-bottom: 20px;
  color: var(--text);
}

.content li {
  margin-bottom: 8px;
  line-height: 1.75;
}

.content b {
  color: var(--primary);
  font-weight: 600;
}

.inline-link {
  color: var(--primary);
  text-decoration: none;
  border-bottom: 1px solid var(--primary);
  cursor: pointer;
  transition: color 0.2s;
}

.inline-link:hover {
  color: #fff;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin: 30px 0;
}

.feature-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 25px;
  text-align: center;
  transition: all 0.25s ease;
}

.feature-card:hover {
  transform: translateY(-6px);
  border-color: var(--primary);
}

.feature-card h3 {
  font-size: 1.1rem;
  color: var(--primary);
  margin-bottom: 10px;
  border: none;
  padding: 0;
}

.feature-card p {
  font-size: 0.95rem;
  color: var(--muted);
}

.info-box,
.warning-box {
  border-radius: var(--radius-lg);
  padding: 25px;
  margin: 25px 0;
  border-left: 4px solid;
}

.info-box {
  background: rgba(0, 212, 232, 0.05);
  border-left-color: var(--primary);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
}

.info-box h4 {
  color: var(--primary);
  margin-bottom: 8px;
}

.info-box p {
  color: var(--text);
  font-size: 0.95rem;
}

.warning-box {
  background: rgba(232, 72, 85, 0.05);
  border-left-color: var(--signal-red);
  border: 1px solid var(--border);
  border-left: 4px solid var(--signal-red);
}

.warning-box h4 {
  color: var(--signal-red);
  margin-bottom: 8px;
}

.warning-box p {
  color: var(--text);
  font-size: 0.95rem;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  overflow: hidden;
  transition: all 0.2s;
}

.faq-item:hover {
  border-color: var(--primary);
}

.faq-toggle {
  width: 100%;
  background: var(--card);
  border: none;
  padding: 18px 25px;
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s;
}

.faq-toggle:hover {
  background: rgba(0, 212, 232, 0.05);
  color: var(--primary);
}

.faq-toggle::after {
  content: '';
  width: 6px;
  height: 6px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  display: inline-block;
  transform: rotate(-45deg);
  transition: transform 0.3s;
  margin-left: 10px;
}

.faq-item.active .faq-toggle::after {
  transform: rotate(135deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background: rgba(0, 212, 232, 0.02);
  border-top: 1px solid var(--border);
}

.faq-item.active .faq-answer {
  max-height: 1000px;
  padding: 20px 25px;
}

.faq-answer p {
  margin-bottom: 0;
  font-size: 0.95rem;
}

@media (max-width: 768px) {
  .docs-main {
    margin-left: 0;
    padding: 60px 20px 20px;
  }

  .sidebar {
    position: fixed;
    left: -250px;
    transition: left 0.3s;
    z-index: 95;
    height: calc(100vh - 60px);
  }

  .sidebar.open {
    left: 0;
  }

  .menu-toggle {
    display: flex;
  }

  .menu-toggle.active span {
    background: var(--primary);
  }

  .nav-menu {
    gap: 0.5rem;
  }

  .page-header h1 {
    font-size: 2rem;
  }

  .content h2 {
    font-size: 1.4rem;
  }

  .content h3 {
    font-size: 1.1rem;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .navbar-container {
    padding: 0 15px;
  }

  .logo {
    font-size: 0.9rem;
  }

  .nav-menu {
    gap: 1rem;
    font-size: 0.8rem;
  }

  .docs-main {
    padding: 60px 15px 15px;
  }

  .page-header h1 {
    font-size: 1.6rem;
  }

  .content h2 {
    font-size: 1.2rem;
    margin: 30px 0 15px;
  }

  .content ul,
  .content ol {
    margin-left: 20px;
    font-size: 0.9rem;
  }
}