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

:root {
  --primary: #2563eb;
  --primary-dark: #1e40af;
  --secondary: #7c3aed;
  --success: #10b981;
  --danger: #ef4444;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --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);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
  line-height: 1.6;
  color: var(--gray-800);
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
}

/* Home Page Styles */
.home-page {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
}

.hero-section {
  text-align: center;
  padding: 4rem 2rem;
  background: white;
  border-radius: 20px;
  margin-bottom: 3rem;
  box-shadow: var(--shadow-xl);
}

.hero-badge {
  display: inline-block;
  padding: 0.5rem 1.5rem;
  background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
  color: white;
  border-radius: 50px;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-md);
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 1rem;
  line-height: 1.2;
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.5rem;
  color: var(--gray-600);
  margin-bottom: 3rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.stat-card {
  background: linear-gradient(135deg, var(--gray-50) 0%, white 100%);
  padding: 2rem;
  border-radius: 12px;
  border: 2px solid var(--gray-100);
  transition: all 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.stat-number {
  font-size: 3rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: 1rem;
  color: var(--gray-600);
  font-weight: 500;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  padding: 1rem 2rem;
  border-radius: 10px;
  font-size: 1.1rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-block;
  box-shadow: var(--shadow-md);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

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

.btn-secondary:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* Sections Grid */
.sections-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.section-card {
  background: white;
  padding: 2rem;
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  transition: all 0.3s ease;
}

.section-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
}

.section-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--gray-100);
}

.section-icon {
  font-size: 2rem;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gray-900);
}

.doc-list {
  list-style: none;
}

.doc-list li {
  margin-bottom: 0.5rem;
}

.doc-link {
  display: block;
  padding: 1rem;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.doc-link:hover {
  background: var(--gray-50);
  border-color: var(--primary);
  transform: translateX(5px);
}

.doc-link-title {
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 0.25rem;
}

.doc-link-desc {
  font-size: 0.875rem;
  color: var(--gray-600);
}

/* Footer Section */
.footer-section {
  background: white;
  padding: 3rem;
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
}

.footer-content h3 {
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
  color: var(--gray-900);
}

.quick-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
}

.quick-link {
  display: block;
  padding: 1rem;
  background: var(--gray-50);
  border-radius: 8px;
  text-decoration: none;
  color: var(--gray-700);
  transition: all 0.2s ease;
  border: 2px solid transparent;
}

.quick-link:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary-dark);
  transform: translateY(-2px);
}

.quick-link strong {
  display: block;
  margin-bottom: 0.25rem;
}

/* Document Page Styles */
.doc-page {
  min-height: 100vh;
  background: white;
}

.doc-nav {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  gap: 2rem;
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-home {
  color: white;
  text-decoration: none;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  transition: all 0.2s ease;
}

.nav-home:hover {
  background: rgba(255, 255, 255, 0.2);
}

.nav-title {
  font-size: 1.25rem;
  font-weight: 600;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.doc-container {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 0;
  min-height: calc(100vh - 80px);
}

.doc-sidebar {
  background: var(--gray-50);
  padding: 2rem 1rem;
  border-right: 1px solid var(--gray-200);
  overflow-y: auto;
  max-height: calc(100vh - 80px);
  position: sticky;
  top: 80px;
}

.doc-sidebar h3 {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  color: var(--gray-900);
  padding: 0 1rem;
}

.sidebar-section {
  margin-bottom: 2rem;
}

.sidebar-section-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--gray-700);
  padding: 0.5rem 1rem;
  margin-bottom: 0.5rem;
}

.sidebar-links {
  list-style: none;
}

.sidebar-links li {
  margin-bottom: 0.25rem;
}

.sidebar-links a {
  display: block;
  padding: 0.5rem 1rem;
  color: var(--gray-600);
  text-decoration: none;
  border-radius: 6px;
  font-size: 0.875rem;
  transition: all 0.2s ease;
}

.sidebar-links a:hover {
  background: white;
  color: var(--primary);
}

.sidebar-links a.active {
  background: var(--primary);
  color: white;
  font-weight: 600;
}

.doc-content {
  padding: 3rem;
  max-width: 900px;
  background: white;
}

/* Markdown Styles */
.markdown-body {
  color: var(--gray-800);
  line-height: 1.8;
}

.markdown-body h1 {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--gray-900);
  margin: 2rem 0 1rem 0;
  padding-bottom: 0.5rem;
  border-bottom: 3px solid var(--primary);
}

.markdown-body h2 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--gray-900);
  margin: 1.5rem 0 1rem 0;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--gray-200);
}

.markdown-body h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--gray-800);
  margin: 1.5rem 0 0.75rem 0;
}

.markdown-body p {
  margin-bottom: 1rem;
}

.markdown-body ul,
.markdown-body ol {
  margin-left: 2rem;
  margin-bottom: 1rem;
}

.markdown-body li {
  margin-bottom: 0.5rem;
}

.markdown-body code {
  background: var(--gray-100);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 0.9em;
  color: var(--danger);
}

.markdown-body pre {
  background: var(--gray-900);
  color: #f8f8f2;
  padding: 1.5rem;
  border-radius: 8px;
  overflow-x: auto;
  margin-bottom: 1rem;
}

.markdown-body pre code {
  background: transparent;
  padding: 0;
  color: inherit;
}

.markdown-body blockquote {
  border-left: 4px solid var(--primary);
  padding-left: 1.5rem;
  margin: 1.5rem 0;
  color: var(--gray-600);
  font-style: italic;
}

.markdown-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  box-shadow: var(--shadow-sm);
}

.markdown-body th,
.markdown-body td {
  padding: 0.75rem;
  border: 1px solid var(--gray-200);
  text-align: left;
}

.markdown-body th {
  background: var(--gray-100);
  font-weight: 600;
  color: var(--gray-900);
}

.markdown-body a {
  color: var(--primary);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: all 0.2s ease;
}

.markdown-body a:hover {
  border-bottom-color: var(--primary);
}

.markdown-body img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1.5rem 0;
  box-shadow: var(--shadow-md);
}

/* SQL Code Styles */
.sql-code {
  background: var(--gray-900);
  color: #f8f8f2;
  padding: 2rem;
  border-radius: 8px;
  overflow-x: auto;
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
  line-height: 1.6;
}

/* Error Page */
.error-page {
  max-width: 600px;
  margin: 4rem auto;
  padding: 3rem;
  background: white;
  border-radius: 16px;
  box-shadow: var(--shadow-xl);
  text-align: center;
}

.error-page h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--danger);
}

.error-page p {
  color: var(--gray-600);
  margin-bottom: 2rem;
}

.error-page code {
  background: var(--gray-100);
  padding: 0.5rem 1rem;
  border-radius: 6px;
  display: inline-block;
  margin: 1rem 0;
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-subtitle {
    font-size: 1.1rem;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .sections-grid {
    grid-template-columns: 1fr;
  }
  
  .doc-container {
    grid-template-columns: 1fr;
  }
  
  .doc-sidebar {
    display: none;
  }
  
  .doc-content {
    padding: 1.5rem;
  }
  
  .quick-links {
    grid-template-columns: 1fr;
  }
}
