/* ECC Help Center - Responsive Styles */

:root {
  --primary-color: #7c3aed;
  --primary-hover: #6d28d9;
  --bg-color: #f8fafc;
  --sidebar-bg: #ffffff;
  --content-bg: #ffffff;
  --text-color: #1e293b;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --code-bg: #f1f5f9;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --error-color: #ef4444;
  --sidebar-width: 280px;
  --header-height: 60px;
}

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

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

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

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border-color);
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 100;
  transition: transform 0.3s ease;
}

.sidebar-header {
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  background: var(--sidebar-bg);
  z-index: 10;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-color);
}

.sidebar-logo:hover {
  text-decoration: none;
}

.sidebar-logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary-color), #a855f7);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 14px;
}

.sidebar-logo-text {
  font-size: 18px;
  font-weight: 600;
}

.sidebar-logo-text-wrapper {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-logo-powered {
  font-size: 11px;
  font-weight: 400;
  color: var(--text-muted);
}

.sidebar-nav {
  padding: 16px;
}

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

.nav-section-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  padding: 8px 12px;
  margin-bottom: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--text-color);
  text-decoration: none;
  font-size: 14px;
  transition: all 0.15s ease;
}

.nav-item:hover {
  background: var(--code-bg);
  text-decoration: none;
}

.nav-item.active {
  background: linear-gradient(135deg, var(--primary-color), #a855f7);
  color: white;
}

.nav-item-icon {
  font-size: 16px;
  width: 20px;
  text-align: center;
}

.nav-item-badge {
  margin-left: auto;
  background: var(--code-bg);
  color: var(--text-muted);
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 10px;
}

.nav-item.active .nav-item-badge {
  background: rgba(255,255,255,0.2);
  color: white;
}

.nav-subitems {
  margin-left: 30px;
  border-left: 2px solid var(--border-color);
  padding-left: 8px;
  margin-top: 4px;
}

.nav-subitem {
  display: block;
  padding: 8px 12px;
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.nav-subitem:hover {
  color: var(--text-color);
  background: var(--code-bg);
  text-decoration: none;
}

.nav-subitem.active {
  color: var(--primary-color);
  font-weight: 500;
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 200;
  width: 44px;
  height: 44px;
  background: var(--sidebar-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 99;
}

/* Main Content */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  padding: 40px;
  max-width: 100%;
}

.content-wrapper {
  max-width: 900px;
  margin: 0 auto;
}

/* Typography */
h1 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 16px;
  line-height: 1.2;
}

h2 {
  font-size: 24px;
  font-weight: 600;
  margin-top: 40px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border-color);
}

h3 {
  font-size: 18px;
  font-weight: 600;
  margin-top: 32px;
  margin-bottom: 12px;
}

h4 {
  font-size: 16px;
  font-weight: 600;
  margin-top: 24px;
  margin-bottom: 8px;
}

p {
  margin-bottom: 16px;
  color: var(--text-color);
}

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

a:hover {
  text-decoration: underline;
}

/* Cards */
.card {
  background: var(--content-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
}

.card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.card-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--primary-color), #a855f7);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
}

.card-title {
  font-size: 18px;
  font-weight: 600;
}

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

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
  margin: 24px 0;
}

.stat-card {
  background: var(--content-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
}

.stat-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--primary-color);
}

.stat-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Code Blocks */
pre {
  background: #1e293b;
  border-radius: 8px;
  padding: 16px;
  overflow-x: auto;
  margin: 16px 0;
}

code {
  font-family: 'Fira Code', 'Monaco', 'Consolas', monospace;
  font-size: 14px;
}

pre code {
  color: #e2e8f0;
  background: transparent;
}

:not(pre) > code {
  background: var(--code-bg);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
  color: var(--primary-color);
}

/* Code with language label */
.code-block {
  position: relative;
  margin: 16px 0;
}

.code-label {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 11px;
  color: #64748b;
  background: rgba(255,255,255,0.1);
  padding: 2px 8px;
  border-radius: 4px;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 14px;
}

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

th {
  background: var(--code-bg);
  font-weight: 600;
}

tr:hover td {
  background: var(--code-bg);
}

/* Lists */
ul, ol {
  margin: 12px 0;
  padding-left: 24px;
}

li {
  margin-bottom: 8px;
}

/* Callouts */
.callout {
  padding: 16px 20px;
  border-radius: 8px;
  margin: 16px 0;
}

.callout-title {
  font-weight: 600;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.callout-info {
  background: #eff6ff;
  border-left: 4px solid #3b82f6;
}

.callout-warning {
  background: #fffbeb;
  border-left: 4px solid var(--warning-color);
}

.callout-success {
  background: #ecfdf5;
  border-left: 4px solid var(--success-color);
}

.callout-danger {
  background: #fef2f2;
  border-left: 4px solid var(--error-color);
}

/* Tabs */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid var(--border-color);
  margin-bottom: 20px;
  overflow-x: auto;
}

.tab {
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
}

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

.tab.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
}

.tab-content {
  display: none;
}

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

/* Feature Grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin: 24px 0;
}

.feature-card {
  background: var(--content-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px;
  transition: all 0.2s ease;
}

.feature-card:hover {
  border-color: var(--primary-color);
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.1);
}

.feature-icon {
  width: 40px;
  height: 40px;
  background: var(--code-bg);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  font-size: 18px;
}

.feature-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

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

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}

.badge-primary {
  background: #ede9fe;
  color: var(--primary-color);
}

.badge-success {
  background: #d1fae5;
  color: #059669;
}

.badge-warning {
  background: #fef3c7;
  color: #d97706;
}

.badge-info {
  background: #dbeafe;
  color: #2563eb;
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.breadcrumb a {
  color: var(--text-muted);
}

.breadcrumb a:hover {
  color: var(--primary-color);
}

.breadcrumb-separator {
  color: var(--border-color);
}

/* Level indicators */
.level {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 20px;
}

.level-beginner {
  background: #dcfce7;
  color: #16a34a;
}

.level-intermediate {
  background: #fef9c3;
  color: #ca8a04;
}

.level-advanced {
  background: #fee2e2;
  color: #dc2626;
}

/* Command reference */
.command-item {
  background: var(--content-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin-bottom: 16px;
  overflow: hidden;
}

.command-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background: var(--code-bg);
  cursor: pointer;
}

.command-name {
  font-family: 'Fira Code', monospace;
  font-weight: 600;
}

.command-toggle {
  color: var(--text-muted);
}

.command-body {
  padding: 16px;
  display: none;
}

.command-body.open {
  display: block;
}

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

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

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

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

/* Responsive */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }

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

  .menu-toggle {
    display: flex;
  }

  .overlay.open {
    display: block;
  }

  .main-content {
    margin-left: 0;
    padding: 60px 16px 24px;
  }

  h1 {
    font-size: 24px;
  }

  h2 {
    font-size: 20px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .tabs {
    margin-left: -16px;
    margin-right: -16px;
    padding: 0 16px;
  }

  table {
    display: block;
    overflow-x: auto;
  }

  pre {
    margin-left: -16px;
    margin-right: -16px;
    border-radius: 0;
    padding: 16px;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .card {
    padding: 16px;
  }
}

/* Utility classes */
.mt-4 { margin-top: 16px; }
.mt-8 { margin-top: 32px; }
.mb-4 { margin-bottom: 16px; }
.mb-8 { margin-bottom: 32px; }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 14px; }
.font-mono { font-family: 'Fira Code', monospace; }