/* Base Styles */
:root {
  --bg-dark: #000000;
  --bg-sidebar: #111111;
  --bg-code: #151515;
  --bg-hover: #222222;
  --text-primary: #ffffff;
  --text-secondary: #e0e0e0;
  --text-tertiary: #a0a0a0;
  --border-color: #333333;
  --accent-color: #ffffff;
  --accent-hover: #dddddd;
  --success-color: #ffffff;
  --warning-color: #ffffff;
  --error-color: #ffffff;
  --info-color: #ffffff;
  --radius-sm: 0px;
  --radius-md: 0px;
  --radius-lg: 0px;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --font-mono: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --sidebar-width: 280px;
  --sidebar-width-collapsed: 60px;
  --header-height: 60px;
  --transition-speed: 0.3s;
  --method-get: #ffffff;
  --method-post: #ffffff;
  --method-put: #ffffff;
  --method-delete: #ffffff;
  --method-patch: #ffffff;
}

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

body {
  font-family: var(--font-sans);
  color: var(--text-primary);
  background-color: var(--bg-dark);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

h1 {
  font-size: 2.25rem;
}

h2 {
  font-size: 1.8rem;
  margin-top: 2.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

h3 {
  font-size: 1.5rem;
  margin-top: 2rem;
}

h4 {
  font-size: 1.25rem;
  margin-top: 1.5rem;
}

p {
  margin-bottom: 1.5rem;
}

a {
  color: var(--accent-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

pre {
  margin: 0;
  border-radius: var(--radius-md);
  overflow: auto;
}

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  padding: 0.2em 0.4em;
  border-radius: var(--radius-sm);
  background-color: rgba(255, 255, 255, 0.1);
}

pre code {
  display: block;
  padding: 1rem;
  overflow-x: auto;
}

ul, ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.5rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 2rem;
  border-radius: var(--radius-md);
  overflow: hidden;
}

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

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

td {
  font-size: 0.95rem;
}

tr:last-child td {
  border-bottom: none;
}

.dark-theme {
  color-scheme: dark;
}

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

.sidebar {
  width: var(--sidebar-width);
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  position: fixed;
  height: 100vh;
  overflow-y: auto;
  transition: width var(--transition-speed) ease;
  z-index: 100;
}

.sidebar.collapsed {
  width: var(--sidebar-width-collapsed);
}

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

.sidebar-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
}

.sidebar-toggle {
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.25rem;
  line-height: 1;
  border-radius: var(--radius-sm);
  transition: background-color 0.2s ease;
}

.sidebar-toggle:hover {
  background-color: var(--bg-hover);
}

.sidebar-content {
  padding: 1.5rem;
}

.sidebar-search {
  margin-bottom: 1.5rem;
}

.sidebar-search input {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s ease;
}

.sidebar-search input:focus {
  border-color: var(--accent-color);
}

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

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

.nav-title {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-link {
  display: block;
  padding: 0.5rem 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
  border-radius: var(--radius-sm);
  transition: color 0.2s ease;
  text-decoration: none;
}

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

.nav-link.active {
  color: var(--accent-color);
  font-weight: 500;
}

.main-content {
  flex: 1;
  padding: 2rem;
  margin-left: var(--sidebar-width);
  transition: margin-left var(--transition-speed) ease;
  max-width: 900px;
}

.main-content.expanded {
  margin-left: var(--sidebar-width-collapsed);
}

.content-section {
  margin-bottom: 3rem;
  animation: fadeIn 0.5s ease;
}

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

/* Code Blocks */
.code-wrapper {
  margin-bottom: 2rem;
  border-radius: var(--radius-md);
  background-color: var(--bg-code);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background-color: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid var(--border-color);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-tertiary);
}

.code-actions {
  display: flex;
  gap: 0.5rem;
}

.copy-button {
  padding: 0.25rem 0.5rem;
  background-color: rgba(255, 255, 255, 0.1);
  border: none;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.copy-button:hover {
  background-color: rgba(255, 255, 255, 0.2);
  color: var(--text-primary);
}

.copy-button.copied {
  background-color: var(--success-color);
  color: black;
}

/* Code Tabs */
.code-tabs {
  margin-bottom: 2rem;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  background-color: var(--bg-code);
}

.tabs {
  display: flex;
  background-color: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid var(--border-color);
}

.tab-button {
  padding: 0.75rem 1.25rem;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab-button:hover {
  color: var(--text-primary);
}

.tab-button.active {
  color: var(--accent-color);
  border-bottom-color: var(--accent-color);
  background-color: rgba(255, 255, 255, 0.05);
}

.tab-content .code-wrapper {
  margin-bottom: 0;
  border-radius: 0;
  display: none;
}

.tab-content .code-wrapper.active {
  display: block;
}

/* Alerts */
.alert {
  display: flex;
  padding: 1rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  border-left: 4px solid transparent;
}

.alert-icon {
  flex-shrink: 0;
  margin-right: 0.75rem;
  font-size: 1.25rem;
}

.alert-content {
  flex: 1;
}

.alert-content strong {
  display: block;
  margin-bottom: 0.25rem;
}

.alert.info {
  background-color: rgba(255, 255, 255, 0.05);
  border-color: var(--info-color);
}

.alert.warning {
  background-color: rgba(255, 255, 255, 0.05);
  border-color: var(--warning-color);
}

.alert.error {
  background-color: rgba(255, 255, 255, 0.05);
  border-color: var(--error-color);
}

.alert.success {
  background-color: rgba(255, 255, 255, 0.05);
  border-color: var(--success-color);
}

/* Endpoints */
.endpoint {
  margin-bottom: 2.5rem;
  padding: 1.5rem;
  border-radius: var(--radius-md);
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
}

.endpoint h3 {
  margin-top: 0;
}

.endpoint-detail {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
  font-family: var(--font-mono);
  font-size: 0.95rem;
}

.method {
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  color: black;
  text-transform: uppercase;
  font-weight: 700;
  font-size: 0.8rem;
  margin-right: 0.75rem;
}

.method.get {
  background-color: var(--method-get);
}

.method.post {
  background-color: var(--method-post);
}

.method.put {
  background-color: var(--method-put);
}

.method.delete {
  background-color: var(--method-delete);
}

.method.patch {
  background-color: var(--method-patch);
}

.url {
  color: var(--text-primary);
}

/* Key Points */
.key-points {
  background-color: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 2rem;
  border: 1px solid var(--border-color);
}

.key-points h3 {
  margin-top: 0;
}

.key-points ul {
  margin-bottom: 0;
}

/* Feature Lists */
.feature-list {
  list-style: none;
  padding-left: 0;
}

.feature-list li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-color);
}

.feature-list li:last-child {
  border-bottom: none;
}

.feature-list strong {
  color: var(--text-primary);
}

/* Parameters Table */
.params-table {
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  width: 100%;
  margin-bottom: 1.5rem;
}

.params-table th, .params-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.params-table th {
  background-color: rgba(255, 255, 255, 0.05);
  font-weight: 600;
  color: var(--text-primary);
}

/* Media Queries */
@media (max-width: 1024px) {
  .sidebar {
    width: 240px;
  }
  
  .main-content {
    margin-left: 240px;
    padding: 1.5rem;
  }
  
  .main-content.expanded {
    margin-left: var(--sidebar-width-collapsed);
  }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    width: 100%;
    max-width: 300px;
  }
  
  .sidebar.active {
    transform: translateX(0);
  }
  
  .main-content {
    margin-left: 0;
    padding: 1rem;
  }
  
  .main-content.expanded {
    margin-left: 0;
  }
  
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  h3 {
    font-size: 1.25rem;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.75rem;
  }
  
  h2 {
    font-size: 1.35rem;
  }
  
  h3 {
    font-size: 1.15rem;
  }
  
  .endpoint {
    padding: 1rem;
  }
  
  .endpoint-detail {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .method {
    margin-bottom: 0.5rem;
  }
}
