/* KWIKmotion AI Live Captions - Documentation Styles */
/* Professional, Modern Design with KWIKmotion Branding */

/* ============================================
   CSS VARIABLES - KWIKmotion Brand Colors
   ============================================ */
:root {
  --kwik-yellow: #FFD107;
  --kwik-red: #E3463C;
  --kwik-purple: #5039DD;
  --text-primary: #2C3E50;
  --text-secondary: #5A6C7D;
  --text-light: #8892A0;
  --bg-primary: #FFFFFF;
  --bg-secondary: #F8F9FA;
  --bg-dark: #2C3E50;
  --border-color: #E1E8ED;
  --code-bg: #F4F6F8;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.15);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-secondary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   LAYOUT STRUCTURE
   ============================================ */
.layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 280px;
  background: var(--bg-primary);
  border-right: 1px solid var(--border-color);
  position: fixed;
  height: 100vh;
  overflow-y: auto;
  z-index: 100;
  box-shadow: var(--shadow-md);
}

.sidebar-header {
  padding: 24px 20px;
  background: linear-gradient(135deg, var(--bg-dark) 0%, #34495e 100%);
  border-bottom: 3px solid var(--kwik-yellow);
}

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

.logo {
  height: 40px;
  width: auto;
}

.logo-text {
  color: white;
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
  letter-spacing: -0.3px;
}

.logo-text .kwik {
  color: var(--kwik-yellow);
}

/* Search Box */
.search-container {
  padding: 16px 20px;
  background: white;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 10;
}

.search-box {
  position: relative;
}

.search-input {
  width: 100%;
  padding: 10px 36px 10px 12px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  font-size: 14px;
  transition: var(--transition);
}

.search-input:focus {
  outline: none;
  border-color: var(--kwik-purple);
  box-shadow: 0 0 0 3px rgba(80, 57, 221, 0.1);
}

.search-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  pointer-events: none;
}

/* Navigation */
.nav-menu {
  padding: 8px 0;
}

.nav-section {
  margin-bottom: 4px;
}

.nav-section-title {
  padding: 12px 20px 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-light);
}

.nav-link {
  display: block;
  padding: 10px 20px 10px 32px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition);
  border-left: 3px solid transparent;
}

.nav-link:hover {
  background: var(--bg-secondary);
  color: var(--kwik-purple);
  border-left-color: var(--kwik-purple);
}

.nav-link.active {
  background: linear-gradient(90deg, rgba(80, 57, 221, 0.08) 0%, transparent 100%);
  color: var(--kwik-purple);
  border-left-color: var(--kwik-purple);
  font-weight: 600;
}

.nav-link.highlight {
  background: linear-gradient(90deg, rgba(255, 209, 7, 0.12) 0%, transparent 100%);
}

/* Main Content */
.main-content {
  margin-left: 280px;
  flex: 1;
  min-width: 0;
}

.content-container {
  max-width: 1000px;
  padding: 48px 40px;
}

/* Header */
.page-header {
  margin-bottom: 48px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border-color);
}

.page-title {
  font-size: 42px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 16px;
  line-height: 1.2;
  letter-spacing: -1px;
}

.page-subtitle {
  font-size: 20px;
  color: var(--text-secondary);
  font-weight: 400;
  line-height: 1.5;
}

.version-badge {
  display: inline-block;
  background: var(--kwik-yellow);
  color: var(--text-primary);
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  margin-left: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ============================================
   CONTENT SECTIONS
   ============================================ */
.section {
  margin-bottom: 64px;
  scroll-margin-top: 24px;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--kwik-yellow);
}

.section-icon {
  font-size: 32px;
}

h1 {
  font-size: 42px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 16px;
  letter-spacing: -1px;
}

h2 {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  letter-spacing: -0.5px;
}

h3 {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 40px 0 20px;
}

h4 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-secondary);
  margin: 32px 0 16px;
}

p {
  margin: 16px 0;
  line-height: 1.8;
  color: var(--text-secondary);
}

/* ============================================
   CODE BLOCKS & INLINE CODE
   ============================================ */
code {
  background: var(--code-bg);
  color: var(--kwik-purple);
  padding: 3px 8px;
  border-radius: 4px;
  font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
  font-size: 0.9em;
  font-weight: 500;
}

pre {
  background: #1E1E1E;
  color: #D4D4D4;
  padding: 24px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 24px 0;
  border-left: 4px solid var(--kwik-purple);
  box-shadow: var(--shadow-sm);
}

pre code {
  background: transparent;
  color: inherit;
  padding: 0;
  font-size: 14px;
  line-height: 1.6;
}

/* Syntax highlighting */
.keyword { color: #C586C0; }
.string { color: #CE9178; }
.comment { color: #6A9955; }
.function { color: #DCDCAA; }
.number { color: #B5CEA8; }

/* ============================================
   TABLES
   ============================================ */
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 24px 0;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

thead th {
  background: linear-gradient(135deg, var(--bg-dark) 0%, #34495e 100%);
  color: white;
  padding: 16px;
  text-align: left;
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

tbody td {
  padding: 16px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
}

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

tbody tr:hover {
  background: var(--bg-secondary);
}

/* ============================================
   ALERT BOXES
   ============================================ */
.alert {
  padding: 20px;
  margin: 24px 0;
  border-radius: 8px;
  border-left: 4px solid;
  box-shadow: var(--shadow-sm);
}

.alert-info {
  background: #E8F4FD;
  border-color: var(--kwik-purple);
  color: #1E3A5F;
}

.alert-success {
  background: #E8F8F5;
  border-color: #27AE60;
  color: #1B5E3F;
}

.alert-warning {
  background: #FFF9E6;
  border-color: var(--kwik-yellow);
  color: #7C6A1F;
}

.alert-danger {
  background: #FDECEA;
  border-color: var(--kwik-red);
  color: #7C2D28;
}

.alert-title {
  font-weight: 700;
  margin-bottom: 8px;
  font-size: 16px;
}

.alert ul {
  margin: 12px 0 0 20px;
}

.alert li {
  margin: 6px 0;
}

/* ============================================
   BADGES
   ============================================ */
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 6px 6px 0;
}

.badge-required {
  background: var(--kwik-red);
  color: white;
}

.badge-optional {
  background: #95A5A6;
  color: white;
}

.badge-json {
  background: #27AE60;
  color: white;
}

.badge-binary {
  background: var(--kwik-purple);
  color: white;
}

/* ============================================
   LISTS
   ============================================ */
ul, ol {
  margin: 16px 0;
  padding-left: 28px;
}

li {
  margin: 10px 0;
  color: var(--text-secondary);
  line-height: 1.7;
}

li strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* ============================================
   BUTTONS & INTERACTIVE
   ============================================ */
.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  border: none;
  cursor: pointer;
  font-size: 14px;
}

.btn-primary {
  background: var(--kwik-purple);
  color: white;
}

.btn-primary:hover {
  background: #4030BD;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: white;
  color: var(--kwik-purple);
  border: 2px solid var(--kwik-purple);
}

.btn-secondary:hover {
  background: var(--kwik-purple);
  color: white;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: linear-gradient(135deg, var(--bg-dark) 0%, #1a252f 100%);
  color: #BDC3C7;
  padding: 48px 40px;
  margin-left: 280px;
  margin-top: 80px;
}

.footer-content {
  max-width: 1000px;
  margin: 0 auto;
  text-align: center;
}

.footer-brand {
  font-size: 24px;
  font-weight: 700;
  color: white;
  margin-bottom: 12px;
}

.footer-brand .yellow {
  color: var(--kwik-yellow);
}

.footer-links {
  display: flex;
  gap: 32px;
  margin: 24px auto;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-link {
  color: #BDC3C7;
  text-decoration: none;
  transition: var(--transition);
}

.footer-link:hover {
  color: var(--kwik-yellow);
}

.copyright {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 14px;
  opacity: 0.8;
  text-align: center;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s;
  }

  .sidebar.mobile-open {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
  }

  .footer {
    margin-left: 0;
  }

  .content-container {
    padding: 24px 20px;
  }

  .page-title {
    font-size: 32px;
  }

  h2 {
    font-size: 24px;
  }

  h3 {
    font-size: 20px;
  }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-center {
  text-align: center;
}

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }

/* ============================================
   SCROLL HIGHLIGHTING
   ============================================ */
.highlight-target {
  animation: highlight 2s ease-out;
}

@keyframes highlight {
  0% {
    background: rgba(255, 209, 7, 0.3);
  }
  100% {
    background: transparent;
  }
}

/* ============================================
   SEARCH RESULTS
   ============================================ */
.search-results {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  margin-top: 8px;
  max-height: 400px;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  z-index: 1000;
}

.search-result-item {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  transition: var(--transition);
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover {
  background: var(--bg-secondary);
}

.search-result-title {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.search-result-excerpt {
  font-size: 13px;
  color: var(--text-light);
}

.no-results {
  padding: 24px;
  text-align: center;
  color: var(--text-light);
}

/* ============================================
   LOADING STATE
   ============================================ */
.spinner {
  border: 3px solid rgba(80, 57, 221, 0.1);
  border-top-color: var(--kwik-purple);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 0.8s linear infinite;
}

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

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
  .sidebar,
  .footer {
    display: none;
  }

  .main-content {
    margin-left: 0;
  }

  .section {
    page-break-inside: avoid;
  }
}

