/* ==========================================================================
   Novaplex Documentation Styles - Optimized Version
   ========================================================================== */

/* Documentation Layout */
.docs-main {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.7) 0%, rgba(30, 58, 138, 0.7) 100%);
  min-height: calc(100vh - 70px);
  padding-top: 2rem;
  padding-bottom: 4rem;
}

.docs-container {
  display: grid;
  grid-template-columns: 280px 1fr 240px;
  gap: 2rem;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Sidebar */
.docs-sidebar {
  position: sticky;
  top: 2rem;
  height: calc(100vh - 8rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 1.5rem;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

/* Main Content */
.docs-content {
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  line-height: 1.7;
  color: #e2e8f0;
  font-size: 1rem;
}

/* Table of Contents */
.docs-toc {
  position: sticky;
  top: 2rem;
  height: fit-content;
  max-height: calc(100vh - 8rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 1.5rem;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

/* Navigation Header */
.docs-nav-header {
  display: flex;
  flex-direction: column;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.docs-nav-title {
  font-size: 1.25rem;
  font-weight: 700;
  background: linear-gradient(135deg, #00b4d8 0%, #4361ee 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 10px rgba(0, 180, 216, 0.5);
}

/* Version Selector */
.docs-version-wrapper {
  margin-top: 0.75rem;
  align-self: flex-end;
}

.docs-version-select {
  background: rgba(15, 23, 42, 0.8);
  color: #ffffff;
  border: 1px solid rgba(0, 180, 216, 0.3);
  border-radius: 0.5rem;
  padding: 0.35rem 0.75rem;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.3s ease;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2300b4d8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  background-size: 1rem;
  padding-right: 2rem;
}

.docs-version-select:hover, .docs-version-select:focus {
  border-color: rgba(0, 180, 216, 0.7);
  box-shadow: 0 0 0 2px rgba(0, 180, 216, 0.2);
  outline: none;
}

/* Sidebar Navigation */
.docs-nav {
  margin-bottom: 2rem;
}

.docs-nav-section {
  margin-bottom: 1.5rem;
}

.docs-nav-section-title {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #cbd5e1;
  margin-bottom: 0.75rem;
  padding-left: 0.5rem;
  border-left: 2px solid rgba(0, 180, 216, 0.5);
}

.docs-nav-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem 0;
}

.docs-nav-item {
  margin-bottom: 0.25rem;
}

.docs-nav-link {
  display: flex;
  align-items: center;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  color: #e2e8f0;
  font-size: 0.9375rem;
  transition: all 0.3s ease;
  text-decoration: none;
  border: 1px solid transparent;
}

.docs-nav-link:hover {
  background: rgba(0, 180, 216, 0.1);
  color: #ffffff;
  border-color: rgba(0, 180, 216, 0.3);
  transform: translateX(3px);
  box-shadow: 0 0 10px rgba(0, 180, 216, 0.2);
}

.docs-nav-link.active {
  background: rgba(0, 180, 216, 0.2);
  color: #ffffff;
  border-color: rgba(0, 180, 216, 0.5);
  box-shadow: 0 0 15px rgba(0, 180, 216, 0.3);
}

.docs-nav-link i {
  margin-right: 0.5rem;
  width: 1.25rem;
  text-align: center;
}

/* Article Header */
.docs-article-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.docs-article-badge {
  margin-bottom: 1rem;
}

.category-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  font-size: 0.875rem;
  font-weight: 600;
  background: rgba(0, 180, 216, 0.2);
  color: #ffffff;
  border: 1px solid rgba(0, 180, 216, 0.3);
  box-shadow: 0 0 15px rgba(0, 180, 216, 0.2);
}

.category-badge i {
  margin-right: 0.5rem;
}

.category-badge.getting-started {
  background: rgba(72, 187, 120, 0.2);
  border-color: rgba(72, 187, 120, 0.3);
  box-shadow: 0 0 15px rgba(72, 187, 120, 0.2);
}

.category-badge.api {
  background: rgba(66, 153, 225, 0.2);
  border-color: rgba(66, 153, 225, 0.3);
  box-shadow: 0 0 15px rgba(66, 153, 225, 0.2);
}

.category-badge.guides {
  background: rgba(237, 137, 54, 0.2);
  border-color: rgba(237, 137, 54, 0.3);
  box-shadow: 0 0 15px rgba(237, 137, 54, 0.2);
}

.docs-article-title {
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: #ffffff;
  text-shadow: 0 0 20px rgba(0, 180, 216, 0.3);
}

.docs-article-meta {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.875rem;
  color: #cbd5e1;
}

.docs-article-meta-item {
  display: flex;
  align-items: center;
}

.docs-article-meta-item i {
  margin-right: 0.5rem;
  color: rgba(0, 180, 216, 0.8);
}

/* Article Content Headings */
.docs-content h1,
.docs-content h2,
.docs-content h3,
.docs-content h4,
.docs-content h5,
.docs-content h6 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-weight: 600;
  line-height: 1.3;
  color: #ffffff;
}

.docs-content h1 {
  font-size: 2.25rem;
  font-weight: 700;
  margin-top: 0;
}

.docs-content h2 {
  font-size: 1.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.docs-content h3 {
  font-size: 1.5rem;
}

.docs-content h4 {
  font-size: 1.25rem;
}

.docs-content h5 {
  font-size: 1.125rem;
}

.docs-content h6 {
  font-size: 1rem;
}

/* Article Content Elements */
.docs-content p {
  margin-bottom: 1.5rem;
}

.docs-content a {
  color: #38bdf8;
  text-decoration: none;
  border-bottom: 1px dotted rgba(56, 189, 248, 0.5);
  transition: all 0.2s ease;
}

.docs-content a:hover {
  color: #0ea5e9;
  border-bottom-color: currentColor;
}

/* Article Navigation */
.docs-article-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.docs-article-nav-prev,
.docs-article-nav-next {
  display: flex;
  align-items: center;
  max-width: 48%;
  color: #e2e8f0;
  transition: all 0.3s ease;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.05);
  text-decoration: none;
}

.docs-article-nav-prev:hover,
.docs-article-nav-next:hover {
  background: rgba(0, 180, 216, 0.15);
  border-color: rgba(0, 180, 216, 0.3);
  color: #ffffff;
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.nav-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: rgba(0, 180, 216, 0.15);
  font-size: 1rem;
  margin: 0 0.75rem;
  transition: all 0.3s ease;
}

.docs-article-nav-prev:hover .nav-arrow,
.docs-article-nav-next:hover .nav-arrow {
  background: rgba(0, 180, 216, 0.3);
  transform: scale(1.1);
}

.docs-article-nav-prev span,
.docs-article-nav-next span {
  display: flex;
  flex-direction: column;
}

.docs-article-nav-prev small,
.docs-article-nav-next small {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #cbd5e1;
  margin-bottom: 0.25rem;
}

.docs-article-nav-prev strong,
.docs-article-nav-next strong {
  font-weight: 600;
  color: #ffffff;
}

/* Code Blocks */
.docs-content pre {
  background-color: rgba(10, 15, 30, 0.8);
  border-radius: 0.75rem;
  padding: 1.25rem;
  margin: 1.5rem 0;
  overflow-x: auto;
  position: relative;
  border: 1px solid rgba(0, 180, 216, 0.2);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.docs-content code {
  font-family: 'Fira Code', monospace;
  font-size: 0.9rem;
  background-color: rgba(15, 23, 42, 0.5);
  padding: 0.2em 0.4em;
  border-radius: 0.25rem;
}

.docs-content pre code {
  background-color: transparent;
  padding: 0;
  border-radius: 0;
  font-size: 0.9rem;
  color: #e2e8f0;
}

/* Special Containers */
.docs-container-base {
  padding: 1.5rem;
  margin: 1.5rem 0;
  border-radius: 0.75rem;
  position: relative;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.docs-container-base::before {
  content: attr(data-title);
  display: block;
  font-weight: 700;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  font-size: 0.875rem;
  letter-spacing: 0.05em;
}

.docs-info {
  background-color: rgba(66, 153, 225, 0.15);
  border: 1px solid rgba(66, 153, 225, 0.3);
  border-left: 4px solid #4299e1;
}

.docs-info::before {
  color: #4299e1;
}

.docs-warning {
  background-color: rgba(237, 137, 54, 0.15);
  border: 1px solid rgba(237, 137, 54, 0.3);
  border-left: 4px solid #ed8936;
}

.docs-warning::before {
  color: #ed8936;
}

.docs-danger {
  background-color: rgba(229, 62, 62, 0.15);
  border: 1px solid rgba(229, 62, 62, 0.3);
  border-left: 4px solid #e53e3e;
}

.docs-danger::before {
  color: #e53e3e;
}

.docs-success {
  background-color: rgba(72, 187, 120, 0.15);
  border: 1px solid rgba(72, 187, 120, 0.3);
  border-left: 4px solid #48bb78;
}

.docs-success::before {
  color: #48bb78;
}

/* Table of Contents */
.toc-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(135deg, #00b4d8 0%, #4361ee 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 10px rgba(0, 180, 216, 0.5);
}

.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.toc-item {
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

.toc-link {
  display: block;
  padding: 0.35rem 0.5rem;
  color: #cbd5e1;
  transition: all 0.3s ease;
  text-decoration: none;
  border-radius: 0.25rem;
  border-left: 2px solid transparent;
}

.toc-link:hover {
  color: #ffffff;
  background: rgba(0, 180, 216, 0.1);
  border-left-color: rgba(0, 180, 216, 0.3);
  transform: translateX(2px);
}

.toc-link.active {
  color: #ffffff;
  font-weight: 500;
  background: rgba(0, 180, 216, 0.15);
  border-left-color: rgba(0, 180, 216, 0.7);
  box-shadow: 0 0 10px rgba(0, 180, 216, 0.1);
}

.toc-h2 {
  padding-left: 0.5rem;
}

.toc-h3 {
  padding-left: 1.25rem;
  font-size: 0.8125rem;
}

.toc-h4 {
  padding-left: 2rem;
  font-size: 0.75rem;
  opacity: 0.9;
}

/* Empty State */
.docs-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  text-align: center;
}

.docs-empty-icon {
  font-size: 3rem;
  color: rgba(0, 180, 216, 0.5);
  margin-bottom: 1.5rem;
}

/* Responsive */
@media (max-width: 1200px) {
  .docs-container {
    grid-template-columns: 280px 1fr;
  }
  
  .docs-toc {
    display: none;
  }
}

@media (max-width: 768px) {
  .docs-container {
    grid-template-columns: 1fr;
    padding: 1rem;
    gap: 1.5rem;
  }
  
  .docs-sidebar {
    position: static;
    height: auto;
    max-height: none;
  }
  
  .docs-nav {
    margin-bottom: 1rem;
  }
  
  .docs-article-title {
    font-size: 1.875rem;
  }
  
  .docs-content h2 {
    font-size: 1.5rem;
    margin-top: 2.5rem;
  }
  
  .docs-article-nav {
    flex-direction: column;
    gap: 1rem;
  }
  
  .docs-article-nav-prev,
  .docs-article-nav-next {
    max-width: 100%;
  }
}
