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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", 
    "Noto Sans", Helvetica, Arial, sans-serif;
  background: #000000;
  color: #ededed;
  overflow-x: hidden;
}

/* Next.js style header */
.header {
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid #262626;
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 100;
  height: 64px;
}

.header-content {
  max-width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 2rem;
  height: 100%;
}

.logo {
  font-size: 1.125rem;
  font-weight: 600;
  color: #ffffff;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-icon {
  width: 24px;
  height: 24px;
  background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  border-radius: 4px;
}

.logo-text {
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.02em;

  background: linear-gradient(
    120deg,
    #6FF5A0,
    #25D366,
    #1FAF5F,
    #6FF5A0
  );
  background-size: 200% auto;

  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;

  animation: gradientShift 8s ease infinite;
}

@keyframes gradientShift {
  0% {
    background-position: 0% center;
  }
  100% {
    background-position: 200% center;
  }
}

/* Next.js style tabs */
.nav-tabs {
  display: flex;
  height: 100%;
  gap: 0;
}

.nav-tab {
  background: transparent;
  color: #a1a1a1;
  border: none;
  padding: 0 1rem;
  height: 100%;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s ease;
  font-family: inherit;
  border-bottom: 2px solid transparent;
  position: relative;
}

.nav-tab:hover {
  color: #ededed;
}

.nav-tab.active {
  color: #ededed;
  border-bottom-color: #3b82f6;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.version-badge {
  background: #171717;
  color: #a1a1a1;
  padding: 0.375rem 0.75rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 500;
  border: 1px solid #262626;
}

.github-link {
  color: #a1a1a1;
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.2s;
}

.github-link:hover {
  color: #ededed;
}

/* Content container */
.content-container {
  min-height: calc(100vh - 64px);
}

.content-view {
  display: none;
}

.content-view.active {
  display: flex;
}

/* Next.js style documentation layout */
.docs-layout {
  display: flex;
  width: 100%;
  height: calc(100vh - 64px);
}

/* Sidebar navigation */
.docs-sidebar {
  width: 280px;
  background: #000000;
  border-right: 1px solid #262626;
  overflow-y: auto;
  padding: 2rem 0;
}

.sidebar-section {
  margin-bottom: 2rem;
}

.sidebar-title {
  color: #ededed;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0 1.5rem;
  margin-bottom: 0.75rem;
}

.sidebar-links {
  list-style: none;
}

.sidebar-link {
  display: block;
  color: #a1a1a1;
  text-decoration: none;
  padding: 0.5rem 1.5rem;
  font-size: 0.875rem;
  transition: all 0.2s;
  border-left: 2px solid transparent;
  cursor: pointer;
}

.sidebar-link:hover {
  color: #ededed;
  background: #0a0a0a;
}

.sidebar-link.active {
  color: #3b82f6;
  border-left-color: #3b82f6;
  background: #0a0a0a;
}

/* Main content area */
.docs-content {
  flex: 1;
  overflow-y: auto;
  background: #000000;
}

.docs-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

/* Next.js style markdown content */
.markdown-content {
  line-height: 1.8;
  color: #ededed;
}

.markdown-content h1 {
  font-size: 3rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 1rem;
  letter-spacing: -0.025em;
  line-height: 1.1;
  scroll-margin-top: 80px;
}

.markdown-content h2 {
  font-size: 2rem;
  font-weight: 600;
  color: #ffffff;
  margin-top: 3rem;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
  padding-top: 2rem;
  border-top: 1px solid #262626;
  scroll-margin-top: 80px;
}

.markdown-content h2:first-child {
  border-top: none;
  padding-top: 0;
}

/* Anchor link styling */
.markdown-content h1 .heading-anchor,
.markdown-content h2 .heading-anchor {
  opacity: 0;
  margin-left: 0.5rem;
  color: #3b82f6;
  text-decoration: none;
  font-weight: 400;
  transition: opacity 0.2s;
}

.markdown-content h1:hover .heading-anchor,
.markdown-content h2:hover .heading-anchor {
  opacity: 1;
}

.markdown-content h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #ededed;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  letter-spacing: -0.015em;
}

.markdown-content h4 {
  font-size: 1.125rem;
  font-weight: 600;
  color: #ededed;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.markdown-content p {
  color: #a1a1a1;
  margin-bottom: 1.5rem;
  font-size: 1rem;
}

.markdown-content a {
  color: #3b82f6;
  text-decoration: none;
  transition: color 0.2s;
}

.markdown-content a:hover {
  color: #60a5fa;
}

.markdown-content code {
  background: #171717;
  color: #e879f9;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-family: 'JetBrains Mono', 'SF Mono', Monaco, monospace;
  font-size: 0.875em;
  border: 1px solid #262626;
}

.markdown-content pre {
  background: #0a0a0a;
  border: 1px solid #262626;
  border-radius: 8px;
  padding: 1.5rem;
  overflow-x: auto;
  margin: 1.5rem 0;
  line-height: 1.6;
}

.markdown-content pre code {
  background: transparent;
  padding: 0;
  color: #ededed;
  border: none;
  font-size: 0.875rem;
}

.markdown-content ul, .markdown-content ol {
  margin-left: 1.5rem;
  margin-bottom: 1.5rem;
  color: #a1a1a1;
}

.markdown-content li {
  margin-bottom: 0.5rem;
  padding-left: 0.5rem;
}

.markdown-content blockquote {
  border-left: 3px solid #3b82f6;
  padding-left: 1.5rem;
  margin: 1.5rem 0;
  color: #a1a1a1;
}

.markdown-content blockquote strong {
  color: #ededed;
}

.markdown-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-size: 0.875rem;
}

.markdown-content th,
.markdown-content td {
  border: 1px solid #262626;
  padding: 0.75rem 1rem;
  text-align: left;
}

.markdown-content th {
  background: #0a0a0a;
  color: #ededed;
  font-weight: 600;
}

.markdown-content td {
  color: #a1a1a1;
}

.markdown-content td code {
  font-size: 0.8125rem;
}

.markdown-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 2rem 0;
  border: 1px solid #262626;
}

.markdown-content hr {
  border: none;
  border-top: 1px solid #262626;
  margin: 3rem 0;
}

/* Next.js style info box */
.info-box {
  background: #0a0a0a;
  border: 1px solid #262626;
  border-left: 3px solid #3b82f6;
  border-radius: 8px;
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
}

.info-box strong {
  color: #3b82f6;
}

/* Scrollbar styling */
.docs-sidebar::-webkit-scrollbar,
.docs-content::-webkit-scrollbar {
  width: 8px;
}

.docs-sidebar::-webkit-scrollbar-track,
.docs-content::-webkit-scrollbar-track {
  background: #000000;
}

.docs-sidebar::-webkit-scrollbar-thumb,
.docs-content::-webkit-scrollbar-thumb {
  background: #262626;
  border-radius: 4px;
}

.docs-sidebar::-webkit-scrollbar-thumb:hover,
.docs-content::-webkit-scrollbar-thumb:hover {
  background: #404040;
}

/* RapiDoc custom styles */
rapi-doc {
  --bg-color: #000000;
  --bg2-color: #0a0a0a;
  --bg3-color: #171717;
  --fg-color: #ededed;
  --fg2-color: #a1a1a1;
  --fg3-color: #737373;
  --primary-color: #3b82f6;
  --primary-color-hover: #2563eb;
  --border-color: #262626;
  --nav-bg-color: #000000;
  --nav-hover-bg-color: #0a0a0a;
  --nav-text-color: #ededed;
  --nav-accent-color: #3b82f6;
  --code-bg-color: #0a0a0a;
  --code-fg-color: #ededed;
  --input-bg-color: #0a0a0a;
  --input-border-color: #262626;
  --font-regular: -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Monaco, monospace;
  --border-radius: 6px;
}

/* Ensure RapiDoc content doesn't get covered by header */
#api-view {
  padding-top: 64px;
  margin-top: -64px;
}

/* Alternative: Add top padding to RapiDoc itself */
rapi-doc {
  display: block;
  padding-top: 20px;
}

/* Loading spinner */
.loading-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 400px;
  color: #a1a1a1;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #262626;
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* Mobile menu button */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 24px;
  height: 20px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  margin-right: 1rem;
}

.hamburger-line {
  width: 100%;
  height: 2px;
  background: #ededed;
  border-radius: 2px;
  transition: all 0.2s ease;
}

/* Sidebar overlay */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 90;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
  opacity: 1;
}

/* Hide mobile-desktop-notice on desktop */
.mobile-desktop-notice {
  display: none;
}

/* Mobile responsive styles */
@media (max-width: 768px) {
  /* Show hamburger menu on mobile */
  .mobile-menu-btn {
    display: flex;
  }

  /* Hide desktop nav tabs on mobile */
  .nav-tabs {
    display: none;
  }

  /* Hide mobile view switcher - API not available on mobile */
  .mobile-view-switcher {
    display: none;
  }

  /* Show desktop-only notice in sidebar */
  .mobile-desktop-notice {
    display: block;
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid #262626;
  }

  .mobile-desktop-notice .note-box {
    background: #0a0a0a;
    border: 1px solid #262626;
    border-radius: 6px;
    padding: 0.75rem 1rem;
    font-size: 0.8125rem;
    color: #a1a1a1;
    line-height: 1.5;
  }

  .mobile-desktop-notice .note-box strong {
    color: #ededed;
  }

  /* Sidebar becomes slide-out drawer */
  .docs-sidebar {
    position: fixed;
    top: 64px;
    left: 0;
    bottom: 0;
    width: 280px;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 100;
  }

  .docs-sidebar.open {
    transform: translateX(0);
  }

  /* Show overlay when sidebar is open */
  .sidebar-overlay {
    display: block;
  }

  /* Adjust content for mobile */
  .docs-inner {
    padding: 1.5rem 1rem;
  }

  /* Smaller headings on mobile */
  .markdown-content h1 {
    font-size: 2rem;
  }

  .markdown-content h2 {
    font-size: 1.5rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
  }

  .markdown-content h3 {
    font-size: 1.25rem;
  }

  /* Better code block handling */
  .markdown-content pre {
    padding: 1rem;
    font-size: 0.8125rem;
  }

  /* Adjust header */
  .header-content {
    padding: 0 1rem;
  }

  .header-left {
    gap: 0.5rem;
  }

  .logo-text {
    font-size: 1rem;
  }

  .github-link {
    font-size: 0.8125rem;
  }
}
