/* docs/styles.css */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Fira+Code:wght@400;500&display=swap');

:root {
  --bg-primary: #090d16;
  --bg-secondary: #111827;
  --bg-sidebar: #0d121f;
  --accent-blue: #3b82f6;
  --accent-indigo: #6366f1;
  --accent-purple: #a855f7;
  --accent-emerald: #10b981;
  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  --border-color: rgba(255, 255, 255, 0.07);
  --glass-bg: rgba(17, 24, 39, 0.7);
  --glass-border: rgba(255, 255, 255, 0.05);
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'Fira Code', monospace;
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Layout */
.app-container {
  display: flex;
  min-height: 100vh;
}

/* Sidebar styling */
.sidebar {
  width: 280px;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: var(--transition-smooth);
}

.sidebar-header {
  padding: 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--accent-indigo), var(--accent-purple));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.2rem;
  color: white;
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.4);
}

.logo-text {
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.5px;
  background: linear-gradient(to right, #ffffff, #9ca3af);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.search-container {
  padding: 16px 20px;
}

.search-input {
  width: 100%;
  padding: 10px 16px;
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition-smooth);
}

.search-input:focus {
  border-color: var(--accent-indigo);
  background-color: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.nav-menu {
  flex: 1;
  overflow-y: auto;
  padding: 10px 20px 30px;
}

.nav-section-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin: 20px 0 8px 10px;
  font-weight: 600;
}

.nav-item {
  display: block;
  padding: 8px 12px;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 4px;
  transition: var(--transition-smooth);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-item:hover {
  color: var(--text-primary);
  background-color: rgba(255, 255, 255, 0.04);
  transform: translateX(4px);
}

.nav-item.active {
  color: white;
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.15) 0%, rgba(168, 85, 247, 0.05) 100%);
  border-left: 3px solid var(--accent-indigo);
  padding-left: 9px;
}

/* Main Content Area */
.main-content {
  margin-left: 280px;
  flex: 1;
  padding: 48px 64px;
  max-width: 1012px;
  transition: var(--transition-smooth);
}

/* Header actions (mobile toggle) */
.mobile-header {
  display: none;
  background-color: var(--bg-sidebar);
  border-bottom: 1px solid var(--border-color);
  padding: 16px 24px;
  position: sticky;
  top: 0;
  z-index: 99;
  justify-content: space-between;
  align-items: center;
}

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

/* Headings */
h1 {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #ffffff 0%, #a5b4fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 48px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 8px;
  color: var(--text-primary);
}

h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-top: 32px;
  margin-bottom: 12px;
  color: #c7d2fe;
}

p {
  margin-bottom: 20px;
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.7;
}

/* Lists */
ul, ol {
  margin-left: 24px;
  margin-bottom: 20px;
  color: var(--text-secondary);
}

li {
  margin-bottom: 8px;
}

/* Inline code */
code:not(pre code) {
  font-family: var(--font-mono);
  background-color: rgba(99, 102, 241, 0.1);
  color: #a5b4fc;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.88em;
  border: 1px solid rgba(99, 102, 241, 0.2);
}

/* Alerts */
blockquote, .alert {
  padding: 16px 20px;
  border-radius: 8px;
  margin: 24px 0;
  border-left: 4px solid;
  line-height: 1.6;
}

.alert-note, blockquote {
  background-color: rgba(59, 130, 246, 0.05);
  border-left-color: var(--accent-blue);
  color: #93c5fd;
}

.alert-warning {
  background-color: rgba(245, 158, 11, 0.05);
  border-left-color: #f59e0b;
  color: #fde047;
}

.alert-important {
  background-color: rgba(168, 85, 247, 0.05);
  border-left-color: var(--accent-purple);
  color: #e9d5ff;
}

.alert-title {
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 0.95rem;
}

th, td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

th {
  background-color: rgba(255, 255, 255, 0.02);
  color: var(--text-primary);
  font-weight: 600;
}

tr:hover td {
  background-color: rgba(255, 255, 255, 0.01);
}

/* Code block container */
.code-block-wrapper {
  margin: 32px 0;
  background-color: #0b0f19;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  font-family: var(--font-mono);
}

.code-block-header {
  background-color: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border-color);
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.code-block-title {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-copy {
  background-color: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: var(--transition-smooth);
}

.btn-copy:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
}

.code-block-wrapper pre {
  margin: 0;
  padding: 20px;
  overflow-x: auto;
  font-size: 0.9rem;
}

.code-block-wrapper code {
  font-family: var(--font-mono);
  background: none !important;
  border: none !important;
  color: #e2e8f0;
  padding: 0 !important;
  display: block;
}

/* Specific Endpoint Badge Styles */
.endpoint-badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.8rem;
  font-family: var(--font-sans);
  text-transform: uppercase;
  margin-right: 12px;
}

.badge-post {
  background-color: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-get {
  background-color: rgba(59, 130, 246, 0.15);
  color: var(--accent-blue);
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.badge-patch {
  background-color: rgba(168, 85, 247, 0.15);
  color: var(--accent-purple);
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.badge-delete {
  background-color: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.endpoint-row {
  display: flex;
  align-items: center;
  margin: 20px 0;
  background-color: rgba(255, 255, 255, 0.01);
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.endpoint-path {
  font-family: var(--font-mono);
  font-weight: 600;
  color: white;
}

/* Custom separator line */
hr {
  border: 0;
  height: 1px;
  background-color: var(--border-color);
  margin: 48px 0;
}

/* Syntax Highlighting overrides */
.token.comment { color: #6272a4; }
.token.keyword { color: #ff79c6; }
.token.string { color: #f1fa8c; }
.token.number { color: #bd93f9; }
.token.function { color: #50fa7b; }
.token.operator { color: #ff79c6; }

/* Responsive adjustments */
@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .main-content {
    margin-left: 0;
    padding: 32px 24px;
  }
  .mobile-header {
    display: flex;
  }
}
