/* ==========================================================================
   Reicon Brands Website Design System
   Color Palette, Styling, Layouts, Responsive design
   ========================================================================== */

/* --- CSS Variables & Custom Properties --- */
:root {
  /* Core Theme Colors */
  --bg-primary: #181818;
  --bg-secondary: #222222;
  --bg-tertiary: #2a2a2a;
  --bg-glass: rgba(30, 30, 30, 0.7);
  --bg-card: #202020;
  --bg-card-hover: #262626;

  /* Typography Accent Colors */
  --text-cream: #F4F0EA;       /* Main Creamish White for text & default icons */
  --text-muted: #A6A29C;       /* Alt Muted Creamish White for secondary text */
  --text-dark: #121212;        /* Dark text for highlighting on light backgrounds */
  
  /* Brand/Interaction Highlights */
  --accent-purple: #6c5ce7;      /* New premium purple brand accent color */
  --accent-purple-rgb: 108, 92, 231;
  --error: #FF6B6B;
  
  /* Layout Sizing & Constraints */
  --max-width: 1100px;
  --header-height: 80px;
  
  /* Shadow & Glow Effects (No Borders!) */
  --shadow-sm: none;
  --shadow-md: none;
  --shadow-lg: none;
  --glow-soft: none;

  /* Transitions */
  --ease-in-out: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: 0.2s var(--ease-in-out);
  --transition-normal: 0.35s var(--ease-in-out);
  --transition-slow: 0.6s var(--ease-in-out);
}

/* --- Global Resets & Body Styles --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

re-brand, re-icon {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

html {
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-cream);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

a {
  text-decoration: none;
  color: inherit;
}


/* --- Layout Structure --- */
.site-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* --- Main Header Styles (Strictly NO BORDERS) --- */
.main-header {
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 10;
  background: transparent;
  padding-top: 16px;
}

.header-content {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-img-icon {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  object-fit: cover;
  display: block;
}

.logo-emblem {
  width: 38px;
  height: 38px;
  background: linear-gradient(145deg, #7c6cf0, #5a4bd1);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.emblem-inner {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 20px;
  color: var(--bg-primary);
  margin-top: -1px;
}

.logo-text {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.5px;
  color: var(--text-cream);
}

.logo-text span {
  font-weight: 300;
  color: var(--text-muted);
}

/* --- NPM Install Pill --- */
.npm-install-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background-color: var(--bg-secondary);
  padding: 8px 16px;
  border-radius: 30px;
  cursor: pointer;
  transition: background-color var(--transition-fast), transform var(--transition-fast);
  user-select: none;
}

.npm-install-pill:hover {
  background-color: var(--bg-tertiary);
  transform: translateY(-1px);
}

.npm-install-pill:active {
  transform: translateY(1px);
}

.npm-command {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--text-cream);
  font-weight: 500;
}

.copy-badge {
  color: var(--text-muted);
  display: flex;
  align-items: center;
  transition: color var(--transition-fast);
}

.npm-install-pill:hover .copy-badge {
  color: var(--text-cream);
}

/* --- Hero Section --- */
.hero-section {
  padding: 80px 0 48px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.hero-title {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(32px, 5vw, 54px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -1.5px;
  color: var(--text-cream);
  margin-bottom: 20px;
}

.hero-subtitle {
  font-size: clamp(16px, 2vw, 19px);
  color: var(--text-muted);
  max-width: 600px;
  font-weight: 400;
  line-height: 1.6;
}

#hero-count-badge {
  color: var(--accent-purple);
  font-weight: 600;
}

/* --- Main Content & Sticky Toolbar --- */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding-bottom: 80px;
}

/* Toolbar & Filters (NO BORDERS) */
.toolbar-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
  background-color: var(--bg-primary); /* Blend seamlessly with body background */
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 5;
}

/* Borderless Search Input Container */
.search-box-container {
  display: flex;
  align-items: center;
  background-color: var(--bg-secondary);
  border-radius: 16px;
  padding: 0 20px;
  height: 60px;
  transition: background-color var(--transition-fast);
}

.search-box-container:focus-within {
  background-color: var(--bg-tertiary);
}

.search-icon-wrapper {
  color: var(--text-muted);
  display: flex;
  align-items: center;
  margin-right: 16px;
}

.search-box-container:focus-within .search-icon-wrapper {
  color: var(--text-cream);
}

#search-input {
  width: 100%;
  height: 100%;
  border: none;
  background: transparent;
  color: var(--text-cream);
  font-family: inherit;
  font-size: 16px;
  font-weight: 400;
  outline: none;
}

#search-input::placeholder {
  color: var(--text-muted);
  opacity: 0.7;
}

.clear-search-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border-radius: 50%;
  transition: color var(--transition-fast), background-color var(--transition-fast);
}

.clear-search-btn:hover {
  color: var(--text-cream);
  background-color: rgba(255, 255, 255, 0.05);
}

/* Controls row: stats + settings */
.controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 0 4px;
}

.stats-label {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 500;
}

.settings-group {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}

/* Slider Customizer */
.slider-control {
  display: flex;
  align-items: center;
  gap: 12px;
}

.slider-label {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 500;
  min-width: 75px;
}

#size-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100px;
  height: 4px;
  border-radius: 2px;
  background: var(--bg-tertiary);
  outline: none;
  transition: background var(--transition-fast);
}

#size-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--text-cream);
  cursor: pointer;
  transition: transform var(--transition-fast), background var(--transition-fast);
}

#size-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  background: var(--accent-purple);
}

#size-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: none;
  border-radius: 50%;
  background: var(--text-cream);
  cursor: pointer;
  transition: transform var(--transition-fast), background var(--transition-fast);
}

#size-slider::-moz-range-thumb:hover {
  transform: scale(1.2);
  background: var(--accent-purple);
}

/* Toggle Switch Control */
.color-mode-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  user-select: none;
}

.toggle-label {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 500;
}

.toggle-switch-btn {
  background-color: var(--bg-secondary);
  border: none;
  width: 46px;
  height: 24px;
  border-radius: 20px;
  cursor: pointer;
  position: relative;
  transition: background-color var(--transition-fast);
  padding: 0;
  display: flex;
  align-items: center;
}

.toggle-switch-btn:hover {
  background-color: var(--bg-tertiary);
}

.toggle-slider {
  display: block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background-color: var(--text-muted);
  position: absolute;
  left: 3px;
  transition: transform var(--transition-normal), background-color var(--transition-normal);
}

/* Checked/Active state class added by JS */
.toggle-switch-btn.active {
  background-color: rgba(var(--accent-purple-rgb), 0.15);
}

.toggle-switch-btn.active .toggle-slider {
  transform: translateX(22px);
  background-color: var(--accent-purple);
}

/* --- Brand Icons Grid (Strictly NO BORDERS) --- */
.icons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 20px;
  min-height: 200px;
}

/* Elegant Icon Card */
.icon-card {
  background-color: var(--bg-card);
  border-radius: 16px;
  aspect-ratio: 1 / 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px;
  cursor: pointer;
  transition: transform var(--transition-normal), background-color var(--transition-normal);
  position: relative;
  overflow: hidden;
}

/* Hover Zoom and Lift with zero border highlighting */
.icon-card:hover {
  background-color: var(--bg-card-hover);
  transform: translateY(-5px);
}

/* Custom shadow component rendering rules inside card */
.icon-container {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  transition: transform var(--transition-normal), color var(--transition-normal);
}

.icon-card:hover .icon-container {
  transform: scale(1.1);
}

.icon-card-label {
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  color: var(--text-muted);
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 12px;
  transition: color var(--transition-fast);
}

.icon-card:hover .icon-card-label {
  color: var(--text-cream);
}

/* Custom CSS variables applied per card for Real Brand Color */
.icon-card.brand-color-mode re-brand {
  --ri-brand-color: var(--brand-color-hex) !important;
}

.icon-card.brand-color-mode:hover .icon-container {
  filter: drop-shadow(0 2px 10px rgba(var(--brand-color-rgb), 0.3));
}

/* Loader & Status UI */
.grid-status-anchor {
  padding: 60px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.spinner-loader {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(244, 240, 234, 0.05);
  border-top-color: var(--text-cream);
  border-radius: 50%;
  animation: spinner 0.8s linear infinite;
}

#load-more-message {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 500;
}

@keyframes spinner {
  to { transform: rotate(360deg); }
}

/* --- Footer (Strictly NO BORDERS) --- */
.main-footer {
  margin-top: auto;
  padding: 40px 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-content {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-copy {
  font-size: 14px;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  font-size: 14px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--text-cream);
}

/* --- Slide-in Details Drawer (Borderless, Glassmorphic Backdrop) --- */
.details-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 100;
  pointer-events: none;
  visibility: hidden;
  transition: visibility var(--transition-normal);
}

.details-drawer.open {
  pointer-events: auto;
  visibility: visible;
}

/* Translucent backdrop overlay */
.drawer-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(10, 10, 10, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity var(--transition-normal) cubic-bezier(0.4, 0, 0.2, 1);
}

.details-drawer.open .drawer-overlay {
  opacity: 1;
}

/* Main sliding drawer panel (NO BORDERS) */
.drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 440px;
  height: 100%;
  background-color: var(--bg-card);
  transform: translateX(100%);
  transition: transform var(--transition-normal) cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.details-drawer.open .drawer-panel {
  transform: translateX(0);
}

/* Drawer Header Layout (NO BORDERS) */
.drawer-header {
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: rgba(32, 32, 32, 0.9);
  z-index: 2;
}

.drawer-header-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 20px;
  color: var(--text-cream);
}

.close-drawer-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border-radius: 50%;
  transition: color var(--transition-fast), background-color var(--transition-fast);
}

.close-drawer-btn:hover {
  color: var(--text-cream);
  background-color: rgba(255, 255, 255, 0.05);
}

/* Drawer Scrolling Content Container */
.drawer-content {
  padding: 0 24px 40px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* Brand Colored Showcase Block */
.preview-hero-block {
  height: 160px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-normal);
  background: #282828;
  position: relative;
  overflow: hidden;
}

/* Overlay gradient inside preview block */
.preview-hero-block::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0,0,0,0.2) 0%, transparent 100%);
  pointer-events: none;
}

.preview-icon-wrapper {
  background-color: rgba(24, 24, 24, 0.3);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  width: 80px;
  height: 80px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition-normal);
  color: var(--text-cream);
}

.preview-icon-wrapper:hover {
  transform: scale(1.08) rotate(2deg);
}

.brand-metadata {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.drawer-brand-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 8px;
}

.drawer-brand-icon {
  width: 48px;
  height: 48px;
  background-color: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.drawer-brand-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.drawer-brand-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 26px;
  letter-spacing: -0.5px;
  color: var(--text-cream);
}

.drawer-brand-slug {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--text-muted);
}

.metadata-grid {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.meta-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.brand-color-pill-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background-color: var(--bg-primary);
  padding: 8px 16px;
  border-radius: 12px;
  width: fit-content;
}

.color-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.color-hex {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-cream);
}

.copy-meta-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 4px;
  border-radius: 4px;
  transition: color var(--transition-fast), background-color var(--transition-fast);
}

.copy-meta-btn:hover {
  color: var(--text-cream);
  background-color: rgba(255, 255, 255, 0.05);
}

/* --- Visual Scales Preview --- */
.preview-scales-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.preview-scales-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  background-color: var(--bg-secondary);
  padding: 16px;
  border-radius: 12px;
  gap: 16px;
}

.scale-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.scale-box {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 64px;
  width: 100%;
}

.scale-label {
  font-family: 'Outfit', sans-serif;
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

/* Action Buttons */
.drawer-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.btn {
  font-family: inherit;
  font-weight: 600;
  font-size: 14px;
  height: 48px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background-color var(--transition-fast), transform var(--transition-fast);
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background-color: var(--text-cream);
  color: var(--bg-primary);
}

.btn-primary:hover {
  background-color: #FFFFFF;
}

.btn-secondary {
  background-color: var(--bg-primary);
  color: var(--text-cream);
}

.btn-secondary:hover {
  background-color: var(--bg-secondary);
}

/* Code Snippets Section */
.code-snippets-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.snippet-section-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.snippet-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.snippet-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
}

.snippet-box {
  background-color: var(--bg-primary);
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  position: relative;
}

.snippet-box pre {
  margin: 0;
  overflow-x: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px;
  color: var(--text-cream);
  flex: 1;
}

.snippet-box pre code {
  white-space: pre-wrap;
  word-break: break-all;
}

.copy-snippet-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border-radius: 6px;
  transition: color var(--transition-fast), background-color var(--transition-fast);
  margin-top: -2px;
}

.copy-snippet-btn:hover {
  color: var(--text-cream);
  background-color: rgba(255, 255, 255, 0.05);
}

/* --- Copy Toast Notification (Borderless, Glassmorphic Floating Panel) --- */
.toast-notification {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translate(-50%, 100px);
  background-color: rgba(24, 24, 24, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 12px 24px;
  border-radius: 30px;
  z-index: 1000;
  pointer-events: none;
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.35s ease;
}

.toast-notification.show {
  transform: translate(-50%, 0);
  opacity: 1;
}

.toast-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

.toast-icon {
  color: var(--accent-purple);
}

.toast-message {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-cream);
}

/* --- Mobile Responsiveness --- */
@media (max-width: 768px) {
  .site-container {
    padding: 0 16px;
  }
  
  .hero-section {
    padding: 48px 0 32px;
  }
  
  .npm-install-pill {
    padding: 6px 12px;
  }
  
  .npm-command {
    font-size: 12px;
  }
  
  .toolbar-section {
    gap: 12px;
    padding: 12px 0;
  }
  
  .search-box-container {
    height: 52px;
    padding: 0 16px;
  }
  
  .controls-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .settings-group {
    width: 100%;
    justify-content: space-between;
    gap: 16px;
  }
  
  .slider-control {
    flex: 1;
  }
  
  #size-slider {
    width: 100%;
    max-width: 140px;
  }
  
  .icons-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
  }
  
  .icon-card {
    border-radius: 12px;
    padding: 12px;
  }
  
  .icon-card-label {
    font-size: 11px;
    margin-top: 8px;
  }
  
  /* Details drawer turns into a responsive bottom sheet */
  .drawer-panel {
    max-width: 100%;
    height: 80vh;
    top: auto;
    bottom: 0;
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    transform: translateY(100%);
  }

  .drawer-content {
    padding-bottom: 80px;
  }
  
  .details-drawer.open .drawer-panel {
    transform: translateY(0);
  }
  
  .footer-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

/* Custom Scrollbar Styles for elegant browser matching */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

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

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

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ==========================================================================
   Documentation View Styles (Strictly NO BORDERS, Flat design)
   ========================================================================== */

/* Header Navbar Links */
.main-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.main-nav .nav-link {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  transition: color var(--transition-fast), background-color var(--transition-fast);
}

.main-nav .nav-link:hover {
  color: var(--text-cream);
  background-color: rgba(255, 255, 255, 0.05);
}

.main-nav .nav-link.active {
  color: var(--text-cream);
  background-color: var(--bg-secondary);
}

/* Docs Layout Structure */
.docs-hero-section {
  padding: 60px 0 32px;
}

.docs-main-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 48px;
  align-items: start;
  padding-bottom: 80px;
}

/* Docs Sidebar Navigation */
.docs-sidebar {
  position: sticky;
  top: 100px;
  z-index: 4;
}

.docs-sidebar-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.docs-sidebar .docs-nav-link {
  display: block;
  color: var(--text-muted);
  font-size: 14.5px;
  font-weight: 500;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 10px;
  transition: color var(--transition-fast), background-color var(--transition-fast);
}

.docs-sidebar .docs-nav-link:hover {
  color: var(--text-cream);
  background-color: rgba(255, 255, 255, 0.03);
}

.docs-sidebar .docs-nav-link.active {
  color: var(--text-cream);
  background-color: rgba(var(--accent-purple-rgb), 0.15);
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--accent-purple);
}

/* Docs Main Content Area */
.docs-content {
  display: flex;
  flex-direction: column;
  gap: 56px;
}

.docs-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.docs-section h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text-cream);
  margin-bottom: 4px;
}

.docs-section h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-cream);
  margin-top: 12px;
}

.docs-section p {
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-muted);
}

.docs-section code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13.5px;
  background-color: var(--bg-secondary);
  padding: 2px 6px;
  border-radius: 6px;
  color: var(--text-cream);
}

/* Code Snippet Box in Docs */
.docs-code-box {
  background-color: var(--bg-card);
  border-radius: 14px;
  padding: 16px 20px;
  overflow-x: auto;
  max-width: 100%;
}

.docs-code-box pre {
  margin: 0;
  white-space: pre;
  word-wrap: normal;
  word-break: normal;
}

.docs-code-box code {
  background-color: transparent;
  padding: 0;
  border-radius: 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--text-cream);
  line-height: 1.5;
}

/* Flat Table in Docs (NO BORDERS) */
.docs-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
  font-size: 14px;
  text-align: left;
}

.docs-table th {
  font-weight: 600;
  color: var(--text-cream);
  padding: 12px 16px;
  background-color: var(--bg-secondary);
}

.docs-table th:first-child {
  border-top-left-radius: 10px;
  border-bottom-left-radius: 10px;
}

.docs-table th:last-child {
  border-top-right-radius: 10px;
  border-bottom-right-radius: 10px;
}

.docs-table td {
  padding: 14px 16px;
  color: var(--text-muted);
  vertical-align: top;
  line-height: 1.5;
}

/* Zebra striping for structured legibility without borders */
.docs-table tbody tr:nth-child(even) {
  background-color: rgba(255, 255, 255, 0.02);
}

.docs-table tbody tr:hover {
  background-color: rgba(255, 255, 255, 0.04);
}

/* ==========================================================================
   Hamburger Button & Mobile Navigation Overlay (Strictly Borderless & Premium)
   ========================================================================== */

.hamburger-btn {
  display: none; /* Hidden by default on desktop */
  background: transparent;
  border: none;
  color: var(--text-cream);
  cursor: pointer;
  padding: 8px;
  border-radius: 10px;
  z-index: 120; /* Keep it above the overlay */
  transition: background-color var(--transition-fast), transform var(--transition-fast);
}

.hamburger-btn:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

.hamburger-btn:active {
  transform: scale(0.95);
}

.hamburger-icon {
  display: block;
}

.hamburger-icon line {
  transition: transform 0.3s var(--ease-in-out), opacity 0.3s var(--ease-in-out);
  transform-origin: center;
}

/* Morphing Hamburger lines to X */
.hamburger-btn.open .line-top {
  transform: translateY(6px) rotate(45deg);
}

.hamburger-btn.open .line-middle {
  opacity: 0;
}

.hamburger-btn.open .line-bottom {
  transform: translateY(-6px) rotate(-45deg);
}

/* Mobile Nav Overlay (Glassmorphic, zero borders) */
.mobile-nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(24, 24, 24, 0.96);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  z-index: 110;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.35s var(--ease-in-out), visibility 0.35s var(--ease-in-out);
}

.mobile-nav-overlay.open {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

.close-menu-btn {
  position: absolute;
  top: 24px;
  right: 24px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 8px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition-fast), background-color var(--transition-fast), transform var(--transition-fast);
}

.close-menu-btn:hover {
  color: var(--text-cream);
  background-color: rgba(255, 255, 255, 0.05);
}

.close-menu-btn:active {
  transform: scale(0.95);
}

.mobile-nav-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
  width: 100%;
  max-width: 300px;
  transform: translateY(30px);
  transition: transform 0.4s var(--ease-in-out);
}

.mobile-nav-overlay.open .mobile-nav-content {
  transform: translateY(0);
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: 100%;
}

.mobile-nav-link {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: 'Outfit', sans-serif;
  font-size: 28px;
  font-weight: 700;
  padding: 12px 24px;
  border-radius: 14px;
  cursor: pointer;
  width: 100%;
  text-align: center;
  transition: color var(--transition-fast), background-color var(--transition-fast), transform var(--transition-fast);
}

.mobile-nav-link:hover {
  color: var(--text-cream);
  background-color: rgba(255, 255, 255, 0.03);
}

.mobile-nav-link.active {
  color: var(--text-cream);
  background-color: var(--bg-secondary);
}

.mobile-npm-install-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background-color: var(--bg-secondary);
  padding: 14px 24px;
  border-radius: 30px;
  cursor: pointer;
  width: 100%;
  user-select: none;
  transition: background-color var(--transition-fast), transform var(--transition-fast);
}

.mobile-npm-install-pill:hover {
  background-color: var(--bg-tertiary);
  transform: translateY(-1px);
}

.mobile-npm-install-pill:active {
  transform: translateY(1px);
}

/* Responsive Table Wrapper & Custom Scrollbars */
.docs-table-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 16px 0 24px;
  border-radius: 12px;
  background-color: var(--bg-card);
}

.docs-table-wrapper::-webkit-scrollbar,
.docs-code-box::-webkit-scrollbar {
  height: 6px;
}

.docs-table-wrapper::-webkit-scrollbar-track,
.docs-code-box::-webkit-scrollbar-track {
  background: transparent;
}

.docs-table-wrapper::-webkit-scrollbar-thumb,
.docs-code-box::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

.docs-table-wrapper::-webkit-scrollbar-thumb:hover,
.docs-code-box::-webkit-scrollbar-thumb:hover {
  background: var(--accent-purple);
}

.docs-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 650px; /* Prevent squishing of table headers & cells on mobile! */
}

/* Mobile Table of Contents Sidebar Header Toggle Button (Desktop Hidden) */
.docs-sidebar-toggle-btn {
  display: none;
}

/* Docs Mobile TOC Sidebar Drawer Header Elements */
.docs-sidebar-header {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 20px;
}

.docs-sidebar-header span {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: var(--text-cream);
}

.close-toc-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition-fast), background-color var(--transition-fast);
}

.close-toc-btn:hover {
  color: var(--text-cream);
  background-color: rgba(255, 255, 255, 0.05);
}

/* Responsive documentation styling changes */
@media (max-width: 768px) {
  .main-nav {
    display: none !important; /* Hide desktop nav */
  }
  
  .npm-install-pill {
    display: none !important; /* Hide desktop npm pill */
  }
  
  .hamburger-btn {
    display: flex !important; /* Show mobile hamburger */
    align-items: center;
    justify-content: center;
  }
  
  .main-header {
    height: var(--header-height);
    padding-bottom: 0;
    padding-top: 0;
  }
  
  .header-content {
    flex-wrap: nowrap;
    justify-content: space-between;
  }

  .docs-main-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  /* Table of Contents Drawer Toggle on Mobile */
  .docs-sidebar-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text-cream);
    cursor: pointer;
    padding: 8px;
    border-radius: 10px;
    z-index: 10;
    transition: background-color var(--transition-fast), transform var(--transition-fast);
  }
  
  .docs-sidebar-toggle-btn:hover {
    background-color: rgba(255, 255, 255, 0.05);
  }
  
  .docs-sidebar-toggle-btn:active {
    transform: scale(0.95);
  }

  .docs-sidebar-header {
    display: flex;
  }

  .docs-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 290px;
    height: 100vh;
    background-color: rgba(24, 24, 24, 0.98);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    z-index: 120;
    padding: 32px 24px;
    transform: translateX(-100%);
    transition: transform 0.4s var(--ease-in-out);
    display: flex;
    flex-direction: column;
    box-shadow: 10px 0 40px rgba(0, 0, 0, 0.6);
  }
  
  .docs-sidebar.open {
    transform: translateX(0);
  }

  .docs-sidebar-list {
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
  }

  .docs-sidebar .docs-nav-link {
    font-size: 14.5px;
    padding: 10px 16px;
  }

  .docs-section h2 {
    font-size: 24px;
  }
  
  /* Prevent horizontal stretch for container elements */
  .docs-content {
    max-width: 100%;
    overflow-x: hidden;
  }

  /* Code boxes and table paddings on mobile */
  .docs-code-box {
    padding: 14px 16px;
    border-radius: 12px;
  }
}

