@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;500;600;700&display=swap');

:root {
  /* Modern Colors */
  --primary-color: #2153fd; /* Vibrant Blue */
  --primary-dark: #1a42ca; /* Darker Blue */
  --primary-light: #4d75fe; /* Light Blue */

  /* Secondary Colors */
  --accent-color: #7c3aed; /* Vibrant Purple */
  --accent-light: #9d67ff; /* Light Purple */

  /* Neutral Colors */
  --text-color: #111827; /* Near Black */
  --text-light: #6b7280; /* Medium Gray */
  --background: #ffffff; /* Pure White */
  --background-alt: #fafafa; /* Off White */
  --background-code: #f8fafc; /* Light Blue Gray */

  /* Border Colors */
  --border-light: #e5e7eb; /* Light Gray */
  --border-dark: #d1d5db; /* Medium Gray */

  /* Status Colors */
  --success: #22c55e; /* Green */
  --warning: #eab308; /* Yellow */
  --error: #ef4444; /* Red */
  --info: #3b82f6; /* Blue */

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}

/* Base Styles */
body {
  font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text-color);
  background: var(--background);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Navigation */
.app-nav {
  background: var(--background);
  padding: 8px 0;
  box-shadow: var(--shadow-sm);
}

.app-nav a {
  color: var(--text-color);
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.app-nav a:hover {
  color: var(--primary-color);
  background: var(--background-alt);
}

.app-nav a.active {
  color: var(--primary-color);
  background: var(--background-alt);
  font-weight: 600;
}

/* Sidebar */
.sidebar {
  background: var(--background);
  border-right: 1px solid var(--border-light);
  padding: 12px 0;
}

.sidebar > h1 {
  font-size: 24px;
  font-weight: 700;
  margin: 0 12px 12px;
}

.sidebar ul li a {
  font-size: 15px;
  color: var(--text-light);
  padding: 4px 12px;
  margin: 2px 0;
  transition: all 0.2s ease;
}

.sidebar ul li.active > a {
  color: var(--primary-color);
  background: linear-gradient(to right, transparent, var(--background-alt));
  border-right: 3px solid var(--primary-color);
  font-weight: 600;
}

.sidebar ul li a:hover {
  color: var(--primary-color);
  background: var(--background-alt);
  text-decoration: none !important;
}

.sidebar-toggle {
  background-color: var(--background);
  border-radius: 50%;
  padding: 10px;
  box-shadow: var(--shadow-md);
  transition: transform 0.2s ease;
}

.sidebar-toggle:hover {
  transform: scale(1.1);
}

.sidebar-toggle span {
  background-color: var(--primary-color);
  height: 2px;
  margin: 4px 0;
}

/* Content */
.markdown-section {
  padding: 20px 24px;
  max-width: 900px;
  margin: 0 auto;
}

.markdown-section a {
  color: var(--primary-color);
  text-decoration: none;
}

.markdown-section a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* Headers */
.markdown-section h1,
.markdown-section h2,
.markdown-section h3,
.markdown-section h4,
.markdown-section h5,
.markdown-section h6 {
  color: var(--text-color);
  font-weight: 700;
  line-height: 1.3;
  margin-top: 1.5em;
  margin-bottom: 0.75em;
}

.markdown-section h1 {
  font-size: 2.5rem;
  border-bottom: 2px solid var(--border-light);
  padding-bottom: 0.5em;
}

.markdown-section h2 {
  font-size: 1.75rem;
}

.markdown-section h3 {
  font-size: 1.375rem;
}

.markdown-section h4 {
  font-size: 1.125rem;
}

/* Blockquotes */
.markdown-section blockquote {
  border-left: 4px solid var(--primary-light);
  background: var(--background-light);
  padding: 1rem;
  color: var(--text-light);
  margin: 1.5rem 0;
}

/* Code Blocks */
.markdown-section pre {
  background: var(--background-code);
  border-radius: 10px;
  padding: 20px;
  box-shadow: var(--shadow-sm);
  margin: 1em 0;
  overflow: auto;
  position: relative;
}

.markdown-section pre + .docsify-copy-code-button {
  position: absolute;
  top: 5px;
  right: 5px;
  background: var(--background);
  border: 1px solid var(--border-light);
  border-radius: 4px;
  padding: 6px 12px;
  font-size: 13px;
  color: var(--text-color);
  opacity: 0.8;
  transition: all 0.2s ease;
  z-index: 1;
}

.markdown-section pre:hover + .docsify-copy-code-button,
.docsify-copy-code-button:hover {
  opacity: 1;
}

.markdown-section code {
  font-family: 'Fira Code', 'Source Code Pro', monospace;
  font-size: 0.9em;
  background: var(--background-code);
  padding: 3px 6px;
  border-radius: 4px;
  color: var(--primary-color);
}

.markdown-section pre > code {
  color: var(--text-color);
  padding: 0;
  background: transparent;
  font-size: 0.85em;
  line-height: 1.6;
}

/* Tables */
.markdown-section table {
  width: 100%;
  margin: 1em 0;
  border-spacing: 0;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.markdown-section table thead tr {
  background: var(--background-alt);
  text-align: left;
}

.markdown-section table th {
  font-weight: 600;
  padding: 8px 12px;
  border-bottom: 2px solid var(--border-dark);
}

.markdown-section table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-light);
}

.markdown-section table tr:last-child td {
  border-bottom: none;
}

.markdown-section table tbody tr {
  transition: background-color 0.2s ease;
}

.markdown-section table tbody tr:hover {
  background: var(--background-alt);
}

/* API Method Tags */
.api-method {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-right: 8px;
}

.api-method::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
}

.api-method.get {
  color: var(--success);
  background: color-mix(in srgb, var(--success) 10%, transparent);
}

.api-method.get::before {
  background: var(--success);
}

.api-method.post {
  color: var(--primary-color);
  background: color-mix(in srgb, var(--primary-color) 10%, transparent);
}

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

.api-method.put {
  color: var(--warning);
  background: color-mix(in srgb, var(--warning) 10%, transparent);
}

.api-method.put::before {
  background: var(--warning);
}

.api-method.delete {
  color: var(--error);
  background: color-mix(in srgb, var(--error) 10%, transparent);
}

.api-method.delete::before {
  background: var(--error);
}

/* Status Indicators */
.status {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 500;
}

.status.success {
  background: color-mix(in srgb, var(--success-color) 15%, transparent);
  color: var(--success-color);
}

.status.warning {
  background: color-mix(in srgb, var(--warning-color) 15%, transparent);
  color: var(--warning-color);
}

.status.error {
  background: color-mix(in srgb, var(--error-color) 15%, transparent);
  color: var(--error-color);
}

/* Cover Page */
section.cover {
  background: linear-gradient(120deg, var(--primary-color), var(--accent-color)) !important;
  position: relative;
  overflow: hidden;
}

section.cover::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><rect width="20" height="20" fill="none"/><circle cx="3" cy="3" r="1" fill="rgba(255,255,255,0.1)"/></svg>')
    repeat;
  opacity: 0.5;
}

section.cover .cover-main {
  position: relative;
  z-index: 1;
  max-width: 1000px;
  margin: 0 auto;
  padding: 40px 20px;
}

section.cover .cover-main h1 {
  font-size: 4rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
  background: linear-gradient(to right, #fff, rgba(255, 255, 255, 0.8));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

section.cover .cover-main blockquote {
  font-size: 1.5rem;
  border-left: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.9);
  padding: 0;
  margin: 2rem 0;
}

/* Search */
.search {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.5rem;
}

.search input {
  font-size: 1rem;
  color: var(--text-color);
}

.search input:focus {
  box-shadow: 0 0 0 2px var(--primary-light);
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--background-light);
}

::-webkit-scrollbar-thumb {
  background: var(--primary-light);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-color);
}
