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

:root {
  --primary-blue: #4F8EF7;
  --light-blue: #E8F2FF;
  --dark-blue: #2563EB;
  --gray-50: #F9FAFB;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-300: #D1D5DB;
  --gray-400: #9CA3AF;
  --gray-500: #6B7280;
  --gray-600: #4B5563;
  --gray-700: #374151;
  --gray-800: #1F2937;
  --gray-900: #111827;
  --white: #FFFFFF;
  --border-color: #E5E7EB;
  --text-primary: #111827;
  --text-secondary: #6B7280;
  --sidebar-width: 320px;
  --header-height: 60px;
  --nav-height: 48px;
  --left-gap: 200px; /* Gap only on the left side */
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-primary);
  background-color: var(--white);
  overflow-x: hidden;
}

/* Header - Full width */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background-color: var(--white);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  margin-left:200px;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0 32px;
}

.header-left {
  display: flex;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 16px;
  color: var(--text-primary);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-info {
  font-size: 14px;
  color: var(--text-secondary);
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--gray-100);
}

.settings-btn {
  background: none;
  border: none;
  padding: 8px;
  border-radius: 6px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.settings-btn:hover {
  background-color: var(--gray-100);
  color: var(--text-primary);
}

/* Navigation Bar - Full width */
.nav-bar {
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  height: var(--nav-height);
  background-color: var(--white);
  border-bottom: 1px solid var(--border-color);
  z-index: 999;
  margin-left:200px;
}

.nav-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0 32px;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 24px;
}

.language-select {
  background: none;
  border: none;
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.language-select:hover {
  background-color: var(--gray-100);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.nav-link:hover {
  background-color: var(--gray-100);
  color: var(--text-primary);
}

.nav-link.active {
  background-color: var(--light-blue);
  color: var(--primary-blue);
}

.nav-right {
  display: flex;
  align-items: center;
}

.search-container {
  position: relative;
  display: flex;
  align-items: center;
  background-color: var(--gray-50);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 8px 12px;
  gap: 8px;
  min-width: 240px;
}

.search-container svg {
  color: var(--text-secondary);
  flex-shrink: 0;
}

.search-input {
  background: none;
  border: none;
  outline: none;
  flex: 1;
  font-size: 14px;
  color: var(--text-primary);
}

.search-input::placeholder {
  color: var(--text-secondary);
}

.search-shortcut {
  font-size: 12px;
  color: var(--text-secondary);
  background-color: var(--white);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  font-weight: 500;
}

/* Main Layout - Only left gap */
.main-layout {
  display: flex;
  margin-top: calc(var(--header-height) + var(--nav-height));
  margin-left: var(--left-gap);
  min-height: calc(100vh - var(--header-height) - var(--nav-height));
}

/* Sidebar - Positioned with left gap */
.sidebar {
  width: var(--sidebar-width);
  background-color: var(--white);
  border-right: 1px solid var(--border-color);
  padding: 24px 0;
  overflow-y: auto;
  position: fixed;
  left: var(--left-gap);
  top: calc(var(--header-height) + var(--nav-height));
  bottom: 0;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px 16px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
}

.jump-to-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
}

.jump-to-shortcut {
  font-size: 11px;
  color: var(--text-secondary);
  background-color: var(--gray-100);
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 500;
}

.sidebar-section {
  margin-bottom: 32px;
}

.sidebar-section-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
  padding: 0 24px 12px;
  margin-bottom: 8px;
}

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

.sidebar-menu li {
  margin-bottom: 2px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 14px;
  padding: 8px 24px;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
}

.sidebar-link:hover {
  background-color: var(--gray-50);
  color: var(--text-primary);
}

.sidebar-link.active {
  background-color: var(--light-blue);
  color: var(--primary-blue);
  border-left-color: var(--primary-blue);
  font-weight: 500;
}

.sidebar-link.expandable {
  cursor: pointer;
}

.sidebar-link.expandable svg {
  width: 12px;
  height: 12px;
  color: var(--text-secondary);
  transition: transform 0.2s ease;
}

.sidebar-link.expandable:hover svg {
  color: var(--text-primary);
}

.sidebar-link.expandable.expanded svg {
  transform: rotate(90deg);
}

/* Dropdown Submenu */
.sidebar-submenu {
  list-style: none;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background-color: var(--gray-50);
}

.sidebar-submenu.expanded {
  max-height: 500px;
}

.sidebar-submenu li {
  margin-bottom: 1px;
}

.sidebar-submenu .sidebar-link {
  padding: 6px 24px 6px 48px;
  font-size: 13px;
  border-left: none;
  position: relative;
}

.sidebar-submenu .sidebar-link:before {
  content: '';
  position: absolute;
  left: 36px;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 4px;
  background-color: var(--text-secondary);
  border-radius: 50%;
}

.sidebar-submenu .sidebar-link:hover:before {
  background-color: var(--text-primary);
}

.sidebar-submenu .sidebar-link.active {
  background-color: var(--light-blue);
  color: var(--primary-blue);
  font-weight: 500;
}

.sidebar-submenu .sidebar-link.active:before {
  background-color: var(--primary-blue);
}

/* API Method Tags */
.api-method {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.api-method.get {
  background-color: #10B981;
  color: white;
}

.api-method.post {
  background-color: #3B82F6;
  color: white;
}

.api-method.put {
  background-color: #F59E0B;
  color: white;
}

.api-method.delete {
  background-color: #EF4444;
  color: white;
}

.sidebar-footer {
  position: absolute;
  bottom: 24px;
  left: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.powered-by {
  font-size: 12px;
  color: var(--text-secondary);
}

/* Main Content - No right margin */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  padding: 40px 64px;
  max-width: none;
}

.content-wrapper {
  max-width: 800px;
}

.page-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--primary-blue);
  margin-bottom: 32px;
  line-height: 1.2;
}

.content-section {
  line-height: 1.6;
}

.intro-text {
  font-size: 16px;
  color: var(--text-primary);
  margin-bottom: 32px;
  line-height: 1.6;
}

/* API Actions */
.api-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.action-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px;
  background-color: var(--light-blue);
  border-radius: 12px;
  text-align: center;
  transition: all 0.2s ease;
}

.action-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(79, 142, 247, 0.15);
}

.action-icon {
  margin-bottom: 12px;
}

.action-text {
  font-size: 14px;
  font-weight: 500;
  color: var(--primary-blue);
}

.features-intro {
  font-size: 16px;
  color: var(--text-primary);
  margin-bottom: 24px;
}

/* Feature Cards */
.feature-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-bottom: 32px;
}

.feature-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 24px;
  background-color: var(--gray-50);
  border-radius: 12px;
  transition: all 0.2s ease;
}

.feature-card:hover {
  background-color: var(--light-blue);
  transform: translateY(-2px);
}

.feature-icon {
  flex-shrink: 0;
  padding: 8px;
  background-color: var(--white);
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.feature-text {
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.5;
}

/* Technical Info */
.technical-info {
  margin-bottom: 32px;
}

.technical-info p {
  font-size: 16px;
  color: var(--text-primary);
  margin-bottom: 16px;
  line-height: 1.6;
}

.technical-info strong {
  font-weight: 600;
  color: var(--text-primary);
}

/* Info Buttons */
.info-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 32px;
}

.info-btn {
  background-color: var(--primary-blue);
  color: var(--white);
  border: none;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.info-btn:hover {
  background-color: var(--dark-blue);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(79, 142, 247, 0.3);
}

/* Update Info */
.update-info {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 32px;
  font-size: 14px;
  color: var(--text-secondary);
}

/* Next Section */
.next-section {
  margin-bottom: 32px;
}

.next-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-decoration: none;
  color: var(--primary-blue);
  font-size: 16px;
  font-weight: 500;
  padding: 16px 20px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  transition: all 0.2s ease;
}

.next-link:hover {
  background-color: var(--light-blue);
  border-color: var(--primary-blue);
  transform: translateX(4px);
}

/* Feedback Section */
.feedback-section {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 0;
  border-top: 1px solid var(--border-color);
}

.feedback-text {
  font-size: 14px;
  color: var(--text-secondary);
}

.feedback-buttons {
  display: flex;
  gap: 8px;
}

.feedback-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 1px solid var(--border-color);
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.feedback-btn:hover {
  background-color: var(--gray-50);
  border-color: var(--gray-300);
  color: var(--text-primary);
}

.feedback-btn.positive:hover {
  background-color: #F0F9FF;
  border-color: var(--primary-blue);
  color: var(--primary-blue);
}

.feedback-btn.negative:hover {
  background-color: #FEF2F2;
  border-color: #EF4444;
  color: #EF4444;
}

/* Endpoint Specific Styles */
.endpoint-header {
  margin-bottom: 32px;
}

.endpoint-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 32px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
  line-height: 1.2;
}

.endpoint-description {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

.endpoint-url {
  background-color: var(--gray-50);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.url-label {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 14px;
}

.url-code {
  background: none;
  padding: 0;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 14px;
  color: var(--primary-blue);
  font-weight: 500;
}

.section-title {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 32px 0 12px 0;
}

.section-description {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.6;
}

.parameters-table {
  margin: 24px 0;
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.parameters-table table {
  width: 100%;
  border-collapse: collapse;
}

.parameters-table th,
.parameters-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
  font-size: 14px;
}

.parameters-table th {
  background-color: var(--gray-50);
  font-weight: 600;
  color: var(--text-primary);
}

.parameters-table tbody tr:last-child td {
  border-bottom: none;
}

.parameters-table td code {
  background-color: var(--gray-100);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
  color: var(--text-primary);
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

.code-example {
  margin: 24px 0;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  overflow: hidden;
}

.code-header {
  background-color: var(--gray-50);
  padding: 12px 20px;
  border-bottom: 1px solid var(--border-color);
}

.code-title {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 14px;
}

.code-block {
  background-color: var(--gray-900);
  padding: 20px;
  overflow-x: auto;
}

.code-block pre {
  margin: 0;
  color: #e5e7eb;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 14px;
  line-height: 1.5;
}

.code-block code {
  background: none;
  padding: 0;
  color: inherit;
}

.navigation-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 40px 0;
  padding: 20px 0;
  border-top: 1px solid var(--border-color);
}

.nav-link-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--primary-blue);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.nav-link-btn:hover {
  background-color: var(--light-blue);
}

.nav-previous .nav-link-btn {
  flex-direction: row;
}

.nav-next .nav-link-btn {
  flex-direction: row-reverse;
}

/* Responsive Design */
@media (max-width: 1400px) {
  :root {
    --left-gap: 100px;
  }
}

@media (max-width: 1024px) {
  :root {
    --left-gap: 0px;
  }
  
  .main-layout {
    margin-left: 0;
  }
  
  .sidebar {
    left: 0;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }
  
  .sidebar.open {
    transform: translateX(0);
  }
  
  .main-content {
    margin-left: 0;
    padding: 24px;
  }
  
  .api-actions,
  .feature-cards {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .header-content,
  .nav-content {
    padding: 0 16px;
  }
  
  .nav-links {
    gap: 16px;
  }
  
  .search-container {
    min-width: 200px;
  }
  
  .main-content {
    padding: 16px;
  }
  
  .page-title {
    font-size: 24px;
  }
  
  .info-buttons {
    flex-direction: column;
  }
  
  .info-btn {
    width: 100%;
    text-align: center;
  }
  
  .navigation-section {
    flex-direction: column;
    gap: 16px;
  }
  
  .nav-link-btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .header-right {
    gap: 8px;
  }
  
  .user-info {
    display: none;
  }
  
  .search-container {
    min-width: 160px;
  }
  
  .search-shortcut {
    display: none;
  }
  
  .nav-links {
    gap: 8px;
  }
  
  .nav-link {
    padding: 6px 8px;
    font-size: 13px;
  }
  
  .nav-link svg {
    width: 14px;
    height: 14px;
  }
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Focus styles for accessibility */
button:focus,
a:focus,
input:focus,
select:focus {
  outline: 2px solid var(--primary-blue);
  outline-offset: 2px;
}

/* Loading states */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

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

.fade-in {
  animation: fadeIn 0.3s ease-out;
}

/* Print styles */
@media print {
  .header,
  .nav-bar,
  .sidebar,
  .feedback-section {
    display: none;
  }
  
  .main-content {
    margin-left: 0;
    padding: 0;
  }
}