/* Custom Styles for Archestra Beginner Goldmine */

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Animations */
@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fade-in 0.8s ease-out;
}

/* Code blocks */
.code-block {
  position: relative;
}

.copy-button {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 6px 12px;
  background: rgba(59, 130, 246, 0.8);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
  opacity: 0;
}

.code-block:hover .copy-button {
  opacity: 1;
}

.copy-button:hover {
  background: rgba(59, 130, 246, 1);
  transform: scale(1.05);
}

.copy-button.copied {
  background: rgba(34, 197, 94, 0.8);
}

pre {
  background: #1e293b;
  color: #e2e8f0;
  padding: 1.5rem;
  border-radius: 8px;
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.6;
}

code {
  font-family: "Consolas", "Monaco", "Courier New", monospace;
}

/* Inline code */
:not(pre) > code {
  background: rgba(139, 92, 246, 0.1);
  color: #8b5cf6;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}

.dark :not(pre) > code {
  background: rgba(139, 92, 246, 0.2);
  color: #a78bfa;
}

/* Sidebar styles */
.sidebar {
  position: fixed;
  top: 64px;
  left: 0;
  width: 280px;
  height: calc(100vh - 64px);
  overflow-y: auto;
  background: white;
  border-right: 1px solid #e5e7eb;
  padding: 1.5rem;
  transition: transform 0.3s ease;
}

.dark .sidebar {
  background: #1f2937;
  border-right-color: #374151;
}

.sidebar-hidden {
  transform: translateX(-100%);
}

.main-content {
  margin-left: 280px;
  padding: 2rem;
  transition: margin-left 0.3s ease;
}

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

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    z-index: 40;
  }

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

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

/* Table of contents */
.toc {
  position: sticky;
  top: 80px;
}

.toc a {
  display: block;
  padding: 0.5rem 0;
  color: inherit;
  opacity: 0.7;
  transition: all 0.2s;
}

.toc a:hover,
.toc a.active {
  opacity: 1;
  color: #3b82f6;
  padding-left: 8px;
}

/* Alert boxes */
.alert {
  padding: 1rem 1.5rem;
  border-radius: 8px;
  margin: 1rem 0;
  border-left: 4px solid;
}

.alert-info {
  background: rgba(59, 130, 246, 0.1);
  border-color: #3b82f6;
  color: #1e40af;
}

.dark .alert-info {
  background: rgba(59, 130, 246, 0.2);
  color: #93c5fd;
}

.alert-warning {
  background: rgba(245, 158, 11, 0.1);
  border-color: #f59e0b;
  color: #92400e;
}

.dark .alert-warning {
  background: rgba(245, 158, 11, 0.2);
  color: #fcd34d;
}

.alert-success {
  background: rgba(34, 197, 94, 0.1);
  border-color: #22c55e;
  color: #166534;
}

.dark .alert-success {
  background: rgba(34, 197, 94, 0.2);
  color: #86efac;
}

.alert-error {
  background: rgba(239, 68, 68, 0.1);
  border-color: #ef4444;
  color: #991b1b;
}

.dark .alert-error {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
}

/* Search highlights */
.search-highlight {
  background: yellow;
  color: black;
  padding: 2px 0;
}

.dark .search-highlight {
  background: #fbbf24;
}

/* Diagram container */
.diagram {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  margin: 2rem 0;
}

.dark .diagram {
  background: #1f2937;
}

/* Progress indicators */
.step-indicator {
  display: flex;
  align-items: center;
  margin-bottom: 2rem;
}

.step {
  flex: 1;
  text-align: center;
  position: relative;
}

.step::after {
  content: "";
  position: absolute;
  top: 20px;
  left: 50%;
  width: 100%;
  height: 2px;
  background: #e5e7eb;
  z-index: -1;
}

.dark .step::after {
  background: #374151;
}

.step:last-child::after {
  display: none;
}

.step-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #e5e7eb;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  font-weight: bold;
}

.dark .step-circle {
  background: #374151;
}

.step.active .step-circle {
  background: #3b82f6;
  color: white;
}

.step.completed .step-circle {
  background: #22c55e;
  color: white;
}

/* Mobile menu button */
.mobile-menu-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #3b82f6;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
  z-index: 50;
  cursor: pointer;
  transition: all 0.3s;
}

.mobile-menu-btn:hover {
  transform: scale(1.1);
}

@media (min-width: 769px) {
  .mobile-menu-btn {
    display: none;
  }
}

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

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.dark ::-webkit-scrollbar-thumb {
  background: #475569;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Loading animation */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(59, 130, 246, 0.3);
  border-radius: 50%;
  border-top-color: #3b82f6;
  animation: spin 1s linear infinite;
}

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

/* Tooltip */
.tooltip {
  position: relative;
  display: inline-block;
}

.tooltip .tooltip-text {
  visibility: hidden;
  background-color: #1f2937;
  color: white;
  text-align: center;
  padding: 8px 12px;
  border-radius: 6px;
  position: absolute;
  z-index: 1;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.3s;
  font-size: 14px;
}

.tooltip .tooltip-text::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: #1f2937 transparent transparent transparent;
}

.tooltip:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}
