:root {
  --primary-color: #2563eb;
  --primary-hover: #1d4ed8;
  --bg-color: #f8fafc;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --card-bg: rgba(255, 255, 255, 0.8);
  --card-border: rgba(226, 232, 240, 0.8);
  --sidebar-bg: rgba(255, 255, 255, 0.9);
  --glass-blur: 10px;
  --radius-lg: 1rem;
  --radius-md: 0.5rem;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
}

/* Glassmorphism utility */
.glass {
  background: var(--card-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--card-border);
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

/* Landing Page Grid */
.landing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  padding: 2rem 0;
}

.landing-card {
  padding: 2rem;
  border-radius: var(--radius-lg);
  transition: var(--transition);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.landing-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  border-color: var(--primary-color);
}

.landing-card.disabled {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

.landing-card h3 {
  margin: 0 0 1rem 0;
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--primary-color);
}

.landing-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 1rem;
}

.landing-card .badge {
  align-self: center;
  margin-top: auto;
  padding: 0.4rem 0.9rem;
  border-radius: 2rem;
  font-size: 0.8rem;
  font-weight: 500;
  background: transparent;
  color: var(--text-muted);
}

/* Sidebar Styling */
#sidebar {
  padding: 1.5rem;
  height: calc(100vh - 2rem);
  position: sticky;
  top: 1rem;
  border-radius: var(--radius-lg);
  overflow-y: auto;
}

.nav-link {
  color: var(--text-main) !important;
  border-radius: var(--radius-md);
  margin-bottom: 0.25rem;
  transition: var(--transition);
  padding: 0.75rem 1rem !important;
  font-weight: 500;
}

.nav-link:hover {
  background: rgba(37, 99, 235, 0.05) !important;
  color: var(--primary-color) !important;
}

.nav-link.active {
  background: var(--primary-color) !important;
  color: white !important;
}

.sidebar-header {
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin: 1.5rem 0 0.75rem 0;
  padding-left: 1rem;
}

/* Content Area */
#content {
  background: white;
  padding: 3rem;
  border-radius: var(--radius-lg);
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
}

h2 {
  font-weight: 800;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--bg-color);
  padding-bottom: 0.5rem;
}

code {
  background: #f1f5f9;
  color: var(--primary-color);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-size: 0.9em;
  font-weight: 500;
}

/* 
 * Robust resets for code tags in specific skins
 * We use high specificity to ensure these take precedence over the global 'code' rule
 */
pre code,
.endpoint-header code,
.card-header code {
  background: transparent !important;
  background-color: transparent !important;
  color: inherit !important;
  padding: 0 !important;
  border-radius: 0 !important;
  font-size: inherit !important;
  box-shadow: none !important;
}

pre {
  background: #0f172a;
  color: #f8fafc;
  padding: 1.25rem;
  border-radius: var(--radius-md);
  overflow-x: auto;
  font-family: 'Fira Code', 'Monaco', 'Consolas', monospace;
  font-size: 0.875rem;
  line-height: 1.7;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Endpoint Header specific styles */
.endpoint-header {
  border: none !important;
  background: #334155 !important; /* Solid color for better reliability */
}

/* Ensure URI text is visible */
.endpoint-header code {
  color: #ffffff !important;
  opacity: 1 !important;
}

.method-badge {
  background: rgba(255, 255, 255, 0.2) !important;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white !important;
  padding: 0.4rem 0.8rem !important;
  font-weight: 700 !important;
  text-transform: uppercase;
}

/* Documentation Toggle Switch */
.docs-toggle {
  width: 60px;
  height: 32px;
  border-radius: 32px !important;
  display: flex !important;
  align-items: center;
  padding: 0 4px !important;
  transition: var(--transition);
  text-decoration: none !important;
  position: relative;
  background: var(--card-bg);
  border: 1px solid var(--card-border) !important;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}

.docs-toggle .toggle-handle {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  color: white;
  font-size: 0.85rem;
}

.docs-toggle:hover {
  transform: translateY(-1px);
  border-color: var(--primary-color) !important;
}

.docs-toggle.active {
  background: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
}

.docs-toggle.active .toggle-handle {
  transform: translateX(28px);
  background: white !important;
  color: var(--primary-color) !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
