/**
 * SpikePrimeGit Documentation Styles
 * Kid-friendly and accessible design with left sidebar navigation
 */

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: #2d3748;
  background: #f7fafc;
  display: flex;
  min-height: 100vh;
}

/* Left Sidebar Navigation */
#sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 280px;
  height: 100vh;
  background: linear-gradient(180deg, #2d3748 0%, #1a202c 100%);
  color: #e2e8f0;
  overflow-y: auto;
  z-index: 1000;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.sidebar-header {
  padding: 2rem 1.5rem;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.2);
}

.sidebar-logo {
  width: 48px;
  height: 48px;
  margin-bottom: 0.75rem;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.sidebar-header h2 {
  color: #f5c402;
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0;
}

.nav-links {
  padding: 1.5rem 0;
}

.nav-link {
  display: block;
  padding: 0.75rem 1.5rem;
  color: #e2e8f0;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
}

.nav-link:hover {
  background: rgba(245, 196, 2, 0.1);
  border-left-color: #f5c402;
  color: #f5c402;
}

.nav-link.active {
  background: rgba(245, 196, 2, 0.15);
  border-left-color: #f5c402;
  color: #f5c402;
}

.nav-subsection {
  background: rgba(0, 0, 0, 0.2);
  padding: 0.5rem 0;
  margin-bottom: 0.5rem;
}

.nav-sublink {
  display: block;
  padding: 0.5rem 1.5rem 0.5rem 2.5rem;
  color: #cbd5e0;
  text-decoration: none;
  font-size: 0.85rem;
  transition: all 0.2s ease;
  border-left: 2px solid transparent;
}

.nav-sublink:hover {
  background: rgba(245, 196, 2, 0.05);
  color: #f5c402;
  padding-left: 2.75rem;
}

.nav-sublink.active {
  background: rgba(245, 196, 2, 0.1);
  color: #f5c402;
  border-left-color: #f5c402;
  font-weight: 500;
}

/* Main Content Area */
#main-content {
  margin-left: 280px;
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Container */
.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}

/* Header */
header {
  background: linear-gradient(135deg, #f5c402 0%, #f5a302 100%);
  color: #1a202c;
  padding: 2rem 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-content {
  text-align: center;
}

header h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.tagline {
  font-size: 1.2rem;
  opacity: 0.95;
  font-weight: 500;
}

/* Main Content */
main {
  padding: 3rem 0;
  flex: 1;
}

/* Sections */
.section {
  background: white;
  border-radius: 12px;
  padding: 2.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.section h2 {
  font-size: 2rem;
  color: #1a202c;
  margin-bottom: 1.5rem;
  border-bottom: 3px solid #f5c402;
  padding-bottom: 0.75rem;
}

.section h3 {
  font-size: 1.4rem;
  color: #2d3748;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.section-intro {
  font-size: 1.1rem;
  color: #4a5568;
  margin-bottom: 2rem;
  font-weight: 500;
}

/* Content Boxes */
.content-box {
  background: #f7fafc;
  border-left: 4px solid #4299e1;
  padding: 1.5rem;
  margin: 1.5rem 0;
  border-radius: 4px;
}

.content-box h3 {
  color: #2d3748;
  margin-bottom: 1rem;
  margin-top: 0;
}

.content-box h4 {
  color: #4a5568;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  font-size: 1.1rem;
}

/* Info Boxes */
.info-box {
  background: #ebf8ff;
  border: 2px solid #4299e1;
  border-radius: 8px;
  padding: 1.5rem;
  margin: 1.5rem 0;
}

.info-box h3 {
  color: #2c5282;
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

.info-box ul {
  list-style: none;
  padding-left: 0;
}

.info-box ul li {
  padding: 0.5rem 0;
  padding-left: 1.75rem;
  position: relative;
}

.info-box ul li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #4299e1;
  font-weight: bold;
  font-size: 1.2rem;
}

/* Tip Boxes */
.tip-box {
  background: #f0fff4;
  border: 2px solid #48bb78;
  border-radius: 8px;
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
}

.tip-box strong {
  color: #22543d;
}

/* Warning Boxes */
.warning-box {
  background: #fffaf0;
  border: 2px solid #ed8936;
  border-radius: 8px;
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
}

.warning-box strong {
  color: #c05621;
}

/* Success Boxes */
.success-box {
  background: #f0fff4;
  border: 3px solid #48bb78;
  border-radius: 12px;
  padding: 2rem;
  margin: 2rem 0;
  text-align: center;
}

.success-box h3 {
  color: #22543d;
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.success-box p {
  color: #2d3748;
  font-size: 1.1rem;
}

/* Feature List */
.feature-list {
  list-style: none;
  padding-left: 0;
}

.feature-list li {
  padding: 0.75rem 0;
  padding-left: 2rem;
  position: relative;
}

.feature-list li::before {
  content: "🚀";
  position: absolute;
  left: 0;
  font-size: 1.2rem;
}

/* Steps */
.step {
  margin: 2.5rem 0;
  border-left: 4px solid #f5c402;
  padding-left: 0;
}

.step-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  background: #fffbeb;
  padding: 1rem;
  border-radius: 8px;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  background: #f5c402;
  color: #1a202c;
  border-radius: 50%;
  font-size: 1.5rem;
  font-weight: bold;
  flex-shrink: 0;
}

.step-header h3 {
  color: #2d3748;
  margin: 0;
  font-size: 1.3rem;
}

.step-content {
  padding-left: 1rem;
  margin-top: 1rem;
}

.step-content ol,
.step-content ul {
  margin: 1rem 0;
  padding-left: 2rem;
}

.step-content li {
  margin: 0.75rem 0;
  line-height: 1.7;
}

.step-content ul ul {
  margin: 0.5rem 0;
  padding-left: 1.5rem;
}

/* Screenshot Boxes */
.screenshot-box {
  background: #f7fafc;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  padding: 1rem;
  margin: 1.5rem 0;
  text-align: center;
}

.screenshot-box img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.screenshot-box .caption {
  margin-top: 0.75rem;
  color: #4a5568;
  font-size: 0.9rem;
  font-style: italic;
}

/* Usage Methods */
.usage-method {
  margin: 2rem 0;
}

.usage-method h3 {
  color: #2d3748;
  font-size: 1.4rem;
  margin-bottom: 1rem;
  padding-left: 1rem;
  border-left: 4px solid #48bb78;
}

.usage-method h4 {
  color: #4a5568;
  font-size: 1.1rem;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

/* FAQ */
.faq {
  margin-top: 2rem;
}

.faq-item {
  background: #f7fafc;
  border-radius: 8px;
  padding: 1.5rem;
  margin: 1.5rem 0;
  border-left: 4px solid #f5c402;
}

.faq-item h3 {
  color: #2d3748;
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
  margin-top: 0;
}

.faq-item ul,
.faq-item ol {
  margin: 0.75rem 0;
  padding-left: 2rem;
}

.faq-item li {
  margin: 0.5rem 0;
}

/* Code Styling */
code {
  background: #2d3748;
  color: #68d391;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-family: 'Monaco', 'Courier New', monospace;
  font-size: 0.9em;
}

/* Links */
a {
  color: #4299e1;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

a:hover {
  color: #2b6cb0;
  text-decoration: underline;
}

/* Lists */
ul, ol {
  margin: 1rem 0;
}

li {
  margin: 0.5rem 0;
}

/* Footer */
footer {
  background: #2d3748;
  color: #e2e8f0;
  text-align: center;
  padding: 2rem 0;
  margin-top: auto;
}

footer p {
  margin: 0.5rem 0;
  font-size: 0.9rem;
}

footer a {
  color: #f5c402;
}

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
  display: none;
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 1001;
  background: #2d3748;
  border: none;
  border-radius: 8px;
  width: 50px;
  height: 50px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

.mobile-menu-toggle span {
  display: block;
  width: 25px;
  height: 3px;
  background: #f5c402;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.mobile-menu-toggle:hover {
  background: #1a202c;
}

.mobile-menu-toggle.active span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

/* Responsive Design */
@media (max-width: 1024px) {
  #sidebar {
    width: 250px;
  }

  #main-content {
    margin-left: 250px;
  }
}

@media (max-width: 768px) {
  body {
    flex-direction: column;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  #sidebar {
    position: fixed;
    width: 280px;
    height: 100vh;
    left: -280px;
    top: 0;
    transition: left 0.3s ease;
    z-index: 1000;
  }

  #sidebar.active {
    left: 0;
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.3);
  }

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

  .sidebar-header {
    padding: 1.5rem 1rem;
  }

  .nav-links {
    padding: 1rem 0;
  }

  header h1 {
    font-size: 2rem;
  }

  .tagline {
    font-size: 1rem;
  }

  .section {
    padding: 1.5rem;
  }

  .section h2 {
    font-size: 1.5rem;
  }

  .step-header {
    flex-direction: column;
    text-align: center;
  }

  .step-content {
    padding-left: 0;
  }
}

/* Print Styles */
@media print {
  #sidebar {
    display: none;
  }

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

  header {
    position: relative;
    background: #f5c402;
  }

  .section {
    page-break-inside: avoid;
    box-shadow: none;
    border: 1px solid #e2e8f0;
  }
}

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

.section {
  animation: fadeIn 0.5s ease;
}

/* Accessibility */
:focus {
  outline: 3px solid #f5c402;
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }

  html {
    scroll-behavior: auto;
  }
}

/* Scrollbar Styling for Sidebar */
#sidebar::-webkit-scrollbar {
  width: 8px;
}

#sidebar::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}

#sidebar::-webkit-scrollbar-thumb {
  background: rgba(245, 196, 2, 0.3);
  border-radius: 4px;
}

#sidebar::-webkit-scrollbar-thumb:hover {
  background: rgba(245, 196, 2, 0.5);
}
