.header {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  padding: 1.25rem 0;
  position: sticky;
  top: 64px;
  z-index: 99;
  backdrop-filter: blur(10px);
}

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

.header h1 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
}

.version-badge {
  background: rgba(102, 184, 234, 0.1);
  border: 1px solid var(--accent);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  color: var(--accent);
}

.nav-pills {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.nav-pill {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.3s ease;
}

.nav-pill:hover {
  background: var(--accent);
  color: var(--bg-primary);
}

.nav-pill.active {
  background: var(--accent);
  color: var(--bg-primary);
}

/* Layout */
.container {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2rem;
  padding: 2rem;
  padding-top: 140px;
}

/* Sidebar Navigation */
.sidebar {
  position: sticky;
  top: 180px;
  z-index: 1;
  height: fit-content;
  max-height: calc(100vh - 150px);
  overflow-y: auto;
}

.sidebar::-webkit-scrollbar {
  width: 6px;
}

.sidebar::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}

.sidebar::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 3px;
}

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

.nav-section h3 {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
  padding-left: 1rem;
}

.sidebar .nav-link {
  display: block;
  padding: 0.75rem 1rem;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.2s ease;
  margin-bottom: 0.25rem;
}

.sidebar .nav-link.active {
  background: linear-gradient(90deg, rgba(0, 212, 255, 0.2), rgba(0, 212, 255, 0.05));
  color: var(--accent);
  border-left: 3px solid var(--accent);
}

/* Main Content */
.content {
  max-width: 900px;
}

.section {
  margin-bottom: 4rem;
  scroll-margin-top: 160px;
}

.section h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, white, var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section h3 {
  font-size: 1.5rem;
  margin: 2rem 0 1rem;
  color: white;
}

.section h4 {
  font-size: 1.2rem;
  margin: 1.5rem 0 1rem;
  color: var(--accent);
}

.section p {
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 1rem;
  line-height: 1.8;
}

/* Endpoint Cards */
.endpoint-card {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 2rem;
  margin: 2rem 0;
}

.endpoint-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.method-badge {
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
}

.method-badge.subscribe {
  background: rgba(0, 255, 136, 0.2);
  color: var(--green);
  border: 1px solid var(--green);
}

.method-badge.get {
  background: rgba(0, 212, 255, 0.2);
  color: var(--accent);
  border: 1px solid var(--accent);
}

.endpoint-title {
  font-size: 1.3rem;
  font-weight: 600;
}

.endpoint-description {
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 1.5rem;
}

/* Code Blocks */
.code-block {
  background: var(--code-bg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  margin: 1rem 0;
  position: relative;
}

.code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.code-label {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.9rem;
  font-weight: 500;
}

.copy-button {
  background: rgba(102, 184, 234, 0.1);
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.copy-button:hover {
  background: var(--accent);
  color: var(--bg-primary);
}

.copy-button.copied {
  background: var(--green);
  border-color: var(--green);
  color: var(--bg-primary);
}

pre {
  padding: 1rem;
  overflow-x: auto;
  margin: 0;
  max-width: calc(100vw - 460px);
}

@media (max-width: 1024px) {
  pre {
    max-width: calc(100vw - 150px);
  }
}

pre::-webkit-scrollbar {
  height: 6px;
}

pre::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}

pre::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 3px;
}

code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  color: #e6e6e6;
}

/* JSON Syntax Highlighting */
.json-key {
  color: #9CDCFE;
}

.json-string {
  color: #CE9178;
}

.json-number {
  color: #B5CEA8;
}

.json-null {
  color: #569CD6;
}

/* Alert Boxes */
.alert {
  padding: 1rem 1.5rem;
  border-radius: 8px;
  margin: 1.5rem 0;
  border-left: 4px solid;
}

.alert.info {
  background: rgba(102, 184, 234, 0.1);
  border-color: var(--accent);
}

.alert.warning {
  background: rgba(255, 184, 0, 0.1);
  border-color: var(--orange);
}

.alert.danger {
  background: rgba(255, 51, 102, 0.1);
  border-color: var(--red);
}

.alert.success {
  background: rgba(0, 255, 136, 0.1);
  border-color: var(--green);
}

.alert strong {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

/* Connection URLs */
.url-box {
  background: var(--code-bg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 1rem;
  margin: 1rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.url-label {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.9rem;
  margin-right: 1rem;
}

.url-text {
  font-family: 'JetBrains Mono', monospace;
  color: var(--accent);
  flex: 1;
}

/* Precision Box */
.precision-box {
  background: rgba(123, 63, 242, 0.1);
  border: 1px solid var(--purple);
  border-radius: 8px;
  padding: 1rem;
  margin: 1rem 0;
}

.precision-box h4 {
  color: var(--purple);
  margin-bottom: 0.5rem;
}

/* Lists */
ul, ol {
  margin: 1rem 0 1rem 2rem;
  color: rgba(255, 255, 255, 0.8);
}

li {
  margin-bottom: 0.5rem;
  line-height: 1.8;
}

/* Mobile Responsive */
@media (max-width: 1024px) {
  .container {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    max-height: none;
    order: 2;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    margin-top: 2rem;
  }

  .content {
    order: 1;
  }

  .nav-pills {
    flex-direction: column;
    width: 100%;
  }

  .nav-pill {
    width: 100%;
    text-align: center;
  }
}
