/* ===================================
   MAZECRAFT DOCUMENTATION STYLES
   GitBook-inspired Design
   =================================== */

/* === LAYOUT === */
.docs-layout {
  display: flex;
  min-height: 100vh;
  padding-top: var(--navbar-height);
  background: var(--color-black);
}

/* === SIDEBAR === */
.docs-sidebar {
  position: fixed;
  left: 0;
  top: var(--navbar-height);
  width: 280px;
  height: calc(100vh - var(--navbar-height));
  background: #0a0a0a;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  overflow-y: auto;
  z-index: 100;
  transition: transform 0.3s ease;
}

.docs-sidebar-header {
  padding: var(--spacing-md);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  background: #0a0a0a;
  z-index: 10;
}

.docs-sidebar-header h2 {
  font-size: 1.25rem;
  color: var(--color-white);
  margin: 0;
}

.docs-sidebar-close {
  display: none;
  background: transparent;
  border: none;
  color: var(--color-white);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
}

.docs-sidebar-close:hover {
  background: rgba(255, 255, 255, 0.1);
}

.docs-sidebar-close svg {
  width: 20px;
  height: 20px;
}

.docs-sidebar-content {
  padding: var(--spacing-sm) 0;
}

/* === NAVIGATION === */
.docs-nav-section {
  margin-bottom: 0.25rem;
}

.docs-nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem var(--spacing-md);
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  position: relative;
}

.docs-nav-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.7;
}

.docs-nav-item:hover {
  color: var(--color-white);
  background: rgba(255, 255, 255, 0.05);
}

.docs-nav-item.active {
  color: var(--color-orange);
  background: rgba(255, 34, 0, 0.1);
  border-left: 3px solid var(--color-orange);
  padding-left: calc(var(--spacing-md) - 3px);
}

.docs-nav-item.active svg {
  opacity: 1;
}

.docs-nav-toggle {
  position: relative;
}

.docs-nav-arrow {
  width: 16px;
  height: 16px;
  margin-left: auto;
  transition: transform 0.3s ease;
}

.docs-nav-toggle.expanded .docs-nav-arrow {
  transform: rotate(180deg);
}

.docs-nav-submenu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.docs-nav-submenu.expanded {
  max-height: 500px;
}

.docs-nav-subitem {
  display: flex;
  align-items: center;
  padding: 0.5rem var(--spacing-md) 0.5rem 3.5rem;
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  font-size: 0.875rem;
  transition: all 0.2s ease;
  position: relative;
}

.docs-nav-subitem:hover {
  color: var(--color-white);
  background: rgba(255, 255, 255, 0.05);
}

.docs-nav-subitem.active {
  color: var(--color-orange);
  background: rgba(255, 34, 0, 0.05);
}

.docs-nav-subitem.active::before {
  content: '';
  position: absolute;
  left: 2.5rem;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 4px;
  background: var(--color-orange);
  border-radius: 50%;
}

/* === MOBILE SIDEBAR TOGGLE === */
.docs-sidebar-toggle {
  position: fixed;
  left: 1rem;
  bottom: 1.5rem;
  width: 48px;
  height: 48px;
  background: var(--gradient-orange);
  border: none;
  border-radius: 50%;
  color: var(--color-white);
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(255, 34, 0, 0.4);
  z-index: 99;
  display: none;
  align-items: center;
  justify-content: center;
  transition: var(--transition-normal);
}

.docs-sidebar-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(255, 34, 0, 0.6);
}

.docs-sidebar-toggle svg {
  width: 24px;
  height: 24px;
}

/* === MAIN CONTENT === */
.docs-content {
  flex: 1;
  margin-left: 280px;
  padding: var(--spacing-lg) var(--spacing-xl);
  max-width: 100%;
}

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

.docs-section {
  display: none;
  animation: fadeInUp 0.4s ease;
}

.docs-section.active {
  display: block;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* === TYPOGRAPHY === */
.docs-section h1 {
  font-size: 2.5rem;
  color: var(--color-white);
  margin-bottom: 1rem;
  font-weight: 700;
  line-height: 1.2;
}

.docs-section h2 {
  font-size: 1.75rem;
  color: var(--color-white);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  font-weight: 600;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.docs-section h3 {
  font-size: 1.35rem;
  color: var(--color-white);
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.docs-section h4 {
  font-size: 1.1rem;
  color: var(--color-white);
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.docs-lead {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 2rem;
  line-height: 1.6;
}

.docs-section p {
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.7;
  margin-bottom: 1rem;
  font-size: 1rem;
}

.docs-section ul,
.docs-section ol {
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.docs-section li {
  margin-bottom: 0.5rem;
  line-height: 1.7;
}

.docs-section code {
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-orange);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-size: 0.9em;
  font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', 'Monaco', 'Courier New', monospace;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.docs-section strong {
  color: var(--color-white);
  font-weight: 600;
}

/* === CALLOUTS === */
.docs-callout {
  display: flex;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  margin: 1.5rem 0;
  border-left: 4px solid;
}

.docs-callout svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  margin-top: 0.125rem;
}

.docs-callout strong {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 1rem;
}

.docs-callout p {
  margin: 0;
  font-size: 0.95rem;
}

.docs-callout-info {
  background: rgba(59, 130, 246, 0.1);
  border-left-color: #3b82f6;
  color: #93c5fd;
}

.docs-callout-info svg {
  fill: #3b82f6;
}

.docs-callout-warning {
  background: rgba(245, 158, 11, 0.1);
  border-left-color: #f59e0b;
  color: #fbbf24;
}

.docs-callout-warning svg {
  fill: #f59e0b;
}

.docs-callout-success {
  background: rgba(34, 197, 94, 0.1);
  border-left-color: #22c55e;
  color: #86efac;
}

.docs-callout-success svg {
  fill: #22c55e;
}

.docs-callout-danger {
  background: rgba(239, 68, 68, 0.1);
  border-left-color: #ef4444;
  color: #fca5a5;
}

.docs-callout-danger svg {
  fill: #ef4444;
}

/* === TABLES === */
.docs-table-wrapper {
  overflow-x: auto;
  margin: 1.5rem 0;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.docs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.docs-table thead {
  background: rgba(255, 255, 255, 0.05);
}

.docs-table th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
  color: var(--color-white);
  border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.docs-table td {
  padding: 0.75rem 1rem;
  color: rgba(255, 255, 255, 0.75);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.docs-table tr:last-child td {
  border-bottom: none;
}

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

/* === RECIPE GRID === */
.docs-recipe {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-lg);
  margin: 1.5rem 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.docs-recipe-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  width: 180px;
}

.docs-recipe-item {
  aspect-ratio: 1;
  background: rgba(0, 0, 0, 0.5);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  text-align: center;
  padding: 0.25rem;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.2;
}

.docs-recipe-arrow {
  font-size: 2rem;
  color: var(--color-orange);
  font-weight: bold;
}

.docs-recipe-result {
  width: 80px;
}

.docs-recipe-result .docs-recipe-item {
  width: 100%;
  height: 80px;
  border-color: var(--color-orange);
  background: rgba(255, 34, 0, 0.1);
  font-weight: 600;
  color: var(--color-white);
}

/* === IMAGE PLACEHOLDER === */
.docs-image-placeholder {
  background: rgba(255, 255, 255, 0.03);
  border: 2px dashed rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-lg);
  padding: 3rem;
  text-align: center;
  margin: 1.5rem 0;
}

.docs-image-placeholder svg {
  width: 64px;
  height: 64px;
  fill: rgba(255, 255, 255, 0.3);
  margin: 0 auto 1rem;
}

.docs-image-placeholder p {
  color: rgba(255, 255, 255, 0.5);
  font-style: italic;
  margin: 0;
}

/* === PERKS GRID === */
.docs-perks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.docs-perk-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: var(--transition-normal);
}

.docs-perk-card:hover {
  transform: translateY(-4px);
  border-color: var(--color-orange);
  box-shadow: 0 8px 24px rgba(255, 34, 0, 0.2);
}

.docs-perk-card svg {
  width: 32px;
  height: 32px;
  fill: var(--color-orange);
  margin-bottom: 1rem;
}

.docs-perk-card h4 {
  margin: 0 0 0.5rem 0;
  font-size: 1.1rem;
  color: var(--color-white);
}

.docs-perk-card p {
  margin: 0;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
  .docs-content {
    padding: var(--spacing-md) var(--spacing-lg);
  }
  
  .docs-section h1 {
    font-size: 2rem;
  }
  
  .docs-section h2 {
    font-size: 1.5rem;
  }
}

@media (max-width: 768px) {
  .docs-sidebar {
    transform: translateX(-100%);
  }
  
  .docs-sidebar.active {
    transform: translateX(0);
  }
  
  .docs-sidebar-close {
    display: block;
  }
  
  .docs-sidebar-toggle {
    display: flex;
  }
  
  .docs-content {
    margin-left: 0;
    padding: var(--spacing-md);
  }
  
  .docs-section h1 {
    font-size: 1.75rem;
  }
  
  .docs-lead {
    font-size: 1.1rem;
  }
  
  .docs-recipe {
    flex-direction: column;
    padding: 1.5rem;
  }
  
  .docs-recipe-grid {
    width: 150px;
  }
  
  .docs-recipe-arrow {
    transform: rotate(90deg);
  }
  
  .docs-perks-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .docs-content {
    padding: var(--spacing-sm);
  }
  
  .docs-section h1 {
    font-size: 1.5rem;
  }
  
  .docs-section h2 {
    font-size: 1.25rem;
  }
  
  .docs-recipe-grid {
    width: 120px;
    gap: 0.25rem;
  }
  
  .docs-recipe-item {
    font-size: 0.65rem;
  }
}

/* === SCROLLBAR === */
.docs-sidebar::-webkit-scrollbar {
  width: 6px;
}

.docs-sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.docs-sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

.docs-sidebar::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}
