:root {
  --accent: #888;
  --accent-dark: #000;
  --accent-bg: #e0e0e0;
}

body {
  margin: 0;
  font-family: 'Segoe UI', Arial, sans-serif;
  background: #f4f5f7;
  color: #000;
  padding-top: 0;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
  border-bottom: 1px solid #e0e0e0;
  padding: 0 32px;
  height: 60px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.nav-left {
  font-size: 1.5em;
  font-weight: bold;
  color: #000;
}

.nav-right {
  display: flex;
  align-items: center;
}

.nav-btn {
  text-decoration: none;
  color: #000;
  background: #ededed;
  padding: 8px 20px;
  border-radius: 6px;
  margin-left: 12px;
  font-weight: 500;
  transition: background 0.2s, color 0.2s;
  border: none;
}

.nav-btn:hover, .nav-btn.active {
  background: #bdbdbd;
  color: #000;
}

.container {
  display: flex;
  max-width: 1400px;
  margin: 0 auto;
  padding-top: 30px;
}

.main-content {
  flex: 1;
  padding: 0 30px;
  background: #1a1d21;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
  max-width: 1200px;
  margin: 0 auto;
}

/* Docsify Sidebar Styles */
.sidebar {
  width: 250px !important;
  position: fixed;
  z-index: 1;
  top: 0;
  left: 0;
  background-color: #f8f9fa;
  overflow-x: hidden;
  padding: 20px 0;
  height: 100%;
  border-right: 1px solid #e9ecef;
}

.sidebar-nav {
  padding: 55px 0 0 0;
  margin: 0;
  list-style: none;
}

.sidebar-nav li {
  margin: 0;
  padding: 0;
}

.sidebar-nav a {
  display: block;
  padding: 8px 16px;
  text-decoration: none;
  color: #000;
  font-size: 14px;
  transition: all 0.3s ease;
}

.sidebar-nav a:hover {
  background-color: #e9ecef;
  color: #000;
}

.sidebar-nav .active {
  background-color: #e9ecef;
  color: #000 !important;
  font-weight: 500;
}

/* Force active sidebar link color to black with high specificity */
.sidebar-nav a.active {
  color: #000 !important;
}

/* Adjust main content to account for sidebar */
.markdown-section {
  margin-left: 5px !important;
  padding: 32px;
  max-width: calc(100% - 50px);
  line-height: 0.01;
  color: #000;
}

/* Add specific line spacing for lists */
.markdown-section ul li,
.markdown-section ol li {
  margin-bottom: 0.2px;
  color: #000;
}

/* Make images and videos smaller */
.markdown-section img {
  max-width: 60%;
  height: auto;
  display: block;
  margin: 10px auto;
  cursor: pointer;
  transition: transform 0.2s ease;
}

/* Make specific image smaller */
.markdown-section img[src*="mobilecontrol.jpg"] {
  max-width: 40%; /* Make this specific image even smaller */
}

.markdown-section img:hover {
  transform: scale(1.02);
}

.markdown-section video {
  max-width: 60%;
  height: auto;
  display: block;
  margin: 10px auto;
}

/* Lightbox styles */
.image-lightbox {
  display: none;
  position: fixed;
  z-index: 999;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  cursor: pointer;
}

.image-lightbox img {
  max-width: 90%;
  max-height: 90vh;
  margin: auto;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  cursor: default;
}

.image-lightbox img:hover {
  transform: translate(-50%, -50%) scale(1);
}

/* Close button styles */
.lightbox-close {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  cursor: pointer;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

.lightbox-close::before,
.lightbox-close::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 2px;
  background-color: white;
  transform-origin: center;
}

.lightbox-close::before {
  transform: rotate(45deg);
}

.lightbox-close::after {
  transform: rotate(-45deg);
}

/* Responsive sidebar */
@media screen and (max-width: 768px) {
  .sidebar {
    width: 100% !important;
    height: auto;
    position: relative;
  }
  .markdown-section {
    margin-left: 0 !important;
    max-width: 100%;
  }
}

h1 {
  margin-top: 0;
  color: #000;
}

h2 {
  color: #000;
  margin-top: 32px;
}

h3, h4 {
  color: #000;
}

ul, ol {
  padding-left: 20px;
}

li {
  margin-bottom: 8px;
}

/* Homepage Hero Section */
.home-hero {
  text-align: center;
  padding: 48px 0 24px 0;
  background: #1a1d21;
  border-radius: 0 0 32px 32px;
  box-shadow: 0 4px 24px rgba(62,175,124,0.07);
}
.home-hero img {
  margin-bottom: 16px;
}
.home-hero h1 {
  font-size: 2.8em;
  color: #000;
  margin-bottom: 8px;
}
.home-hero p {
  font-size: 1.3em;
  color: #000;
  margin-bottom: 0;
}

/* Highlights Section */
.home-highlights {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin: 32px 0;
}
.home-highlight-card {
  background: #23262b;
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(62,175,124,0.08);
  padding: 24px 18px;
  width: 220px;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}
.home-highlight-card:hover {
  transform: translateY(-6px) scale(1.04);
  box-shadow: 0 6px 24px rgba(62,175,124,0.13);
}
.home-highlight-card img {
  margin-bottom: 10px;
}
.home-highlight-card b {
  color: #000;
  font-size: 1.1em;
}

/* Call-to-Action Button */
.home-cta-btn {
  display: inline-block;
  background: #3eaf7c;
  color: #000 !important;
  padding: 16px 38px;
  border-radius: 10px;
  font-size: 1.2em;
  font-weight: bold;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(62,175,124,0.15);
  margin-top: 24px;
  transition: background 0.2s, box-shadow 0.2s;
}
.home-cta-btn:hover {
  background: #329e67;
  box-shadow: 0 6px 24px rgba(62,175,124,0.18);
  color: #000 !important;
}

/* Topbar Styles */
.topbar {
  width: 100vw;
  left: 0;
  right: 0;
  z-index: 1000;
  top:-25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
  border-bottom: 0px solid #e0e0e0;
  padding: 0 32px;
  height: 70px;
  box-shadow: none;
  position: fixed !important;
}
.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.topbar-left img {
  height: 32px;
  width: 32px;
  vertical-align: middle;
}
.topbar-left span {
  font-size: 1.7em;
  font-weight: 600;
  color: #000;
  letter-spacing: 1px;
}
.topbar-links {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0;
}
.topbar-links a {
  text-decoration: none;
  color: #000;
  font-weight: 500;
  font-size: 1.1em;
  padding: 8px 16px;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
}
.topbar-links a:hover {
  background: #e3e6ea;
  color: #000;
}
.dropdown {
  position: relative;
  display: inline-block;
}
.dropdown-content {
  display: none;
  position: absolute;
  background: #fff;
  min-width: 180px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  z-index: 1;
  border-radius: 8px;
  margin-top: 8px;
  right: 0;
}
.dropdown-content a {
  display: block;
  padding: 10px 18px;
  color: #000;
  text-decoration: none;
  border-radius: 0;
}
.dropdown-content a:hover {
  background: #f4f5f7;
}
.dropdown:hover .dropdown-content,
.dropdown:focus-within .dropdown-content {
  display: block;
}

.custom-sidebar {
  position: fixed;
  top: 64px;
  left: 0;
  width: 180px;
  height: 100vh;
  background: #f7f8fa;
  box-shadow: 2px 0 8px rgba(0,0,0,0.04);
  z-index: 2000;
  padding-top: 20px;
  padding-left: 20px;
  padding-right: 20px;
  border-radius: 0 12px 12px 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.custom-sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
  width: 100%;
}
.custom-sidebar li {
  margin-bottom: 18px;
  width: 100%;
}
.custom-sidebar a {
  color: #000 !important;
  font-size: 1.08em;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s, background 0.2s;
  display: block;
  padding: 8px 0 8px 8px;
  border-radius: 6px;
}
.custom-sidebar a:hover, .custom-sidebar a.active {
  color: #000 !important;
  background: #e0e0e0;
}

.topbar-left span {
  color: var(--accent-dark);
}
.custom-sidebar a {
  color: var(--accent-dark);
}
.custom-sidebar a:hover {
  color: var(--accent-dark);
  background: var(--accent-bg);
}
.home-highlight-card b {
  color: var(--accent-dark);
}

.home-cta-btn, .home-cta-btn:hover {
  background: var(--accent-dark) !important;
  color: #fff !important;
}

.custom-sidebar a,
.custom-sidebar a:visited {
  color: #000 !important;
}
.custom-sidebar a:hover {
  color: #000 !important;
  text-decoration: underline;
}
.custom-sidebar a.active {
  color: #000 !important;
}
.custom-sidebar li {
  margin-bottom: 18px;
}
.custom-sidebar a,
.custom-sidebar a:visited {
  color: #000 !important;
}
.custom-sidebar a:hover {
  color: #000 !important;
  text-decoration: underline;
}
.custom-sidebar a.active {
  color: #000 !important;
}
.custom-sidebar li {
  margin-bottom: 18px;
}

#custom-toc {
  position: fixed;
  top: 80px;
  right: 40px;
  width: 180px;
  background: #f7f8fa;
  border-radius: 10px;
  padding: 15px 10px;
  margin: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  max-width: 200px;
  max-height: 70vh;
  overflow-y: auto;
  z-index: 1000;
  font-size: 0.9em;
}
#custom-toc ul {
  list-style: none;
  padding-left: 0;
}
#custom-toc li {
  margin-bottom: 6px;
}
#custom-toc a {
  color: #000;
  text-decoration: none;
  font-size: 0.97em;
}
#custom-toc a:hover {
  text-decoration: underline;
}
@media (max-width: 900px) {
  #custom-toc {
    display: none;
  }
}

.markdown-section h2, .markdown-section h3 {
  scroll-margin-top: 90px;
}

@media (min-width: 1200px) {
  .markdown-section {
    margin-right: 140px;
  }
}

.sidebar-btn {
  display: inline-block;
  padding: 8px 16px;
  background: #2d8cf0;
  color: #fff !important;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  margin-bottom: 6px;
  transition: background 0.2s;
}
.sidebar-btn:hover {
  background: #1a6ed8;
}

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

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes scaleIn {
  from {
    transform: scale(0.95);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* Apply animations to markdown content */
.markdown-section h1 {
  color: #000;
  animation: fadeInUp 0.6s ease-out;
}

.markdown-section h2 {
  color: #000;
  animation: fadeInUp 0.5s ease-out;
  animation-fill-mode: both;
}

.markdown-section h3 {
  color: #000;
  animation: fadeInUp 0.5s ease-out;
  animation-fill-mode: both;
}

.markdown-section p {
  color: #000;
  animation: fadeIn 0.5s ease-out;
  animation-fill-mode: both;
}

.markdown-section ul li,
.markdown-section ol li {
  color: #000;
  animation: fadeIn 0.4s ease-out;
  animation-fill-mode: both;
}

/* Stagger list items animation */
.markdown-section ul li:nth-child(1) { animation-delay: 0.1s; }
.markdown-section ul li:nth-child(2) { animation-delay: 0.2s; }
.markdown-section ul li:nth-child(3) { animation-delay: 0.3s; }
.markdown-section ul li:nth-child(4) { animation-delay: 0.4s; }
.markdown-section ul li:nth-child(5) { animation-delay: 0.5s; }

/* Image animations */
.markdown-section img {
  animation: scaleIn 0.5s ease-out;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.markdown-section img:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Lightbox animations */
.image-lightbox {
  animation: fadeIn 0.3s ease-out;
}

.image-lightbox img {
  animation: scaleIn 0.3s ease-out;
}

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

/* Add subtle hover effect to links */
.markdown-section a {
  color: #000;
  transition: color 0.2s ease, transform 0.2s ease;
  display: inline-block;
}

.markdown-section a:hover {
  color: #000;
  transform: translateY(-1px);
}

/* Add subtle transition to code blocks */
.markdown-section pre {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.markdown-section pre:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Add animation to the custom TOC */
#custom-toc {
  animation: fadeInUp 0.5s ease-out;
}

#custom-toc ul {
  animation: fadeIn 0.5s ease-out;
  animation-delay: 0.2s;
  animation-fill-mode: both;
}

/* Add subtle animation to video elements */
.markdown-section video {
  animation: scaleIn 0.5s ease-out;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.markdown-section video:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Custom Sidebar Toggle Button */
.sidebar-toggle {
  position: fixed;
  top: 80px;
  left: 20px;
  z-index: 1000;
  width: 70px; /* Fixed width */
  padding: 10px 15px; /* Reduced padding */
  height: 30px; /* Fixed height */
  background: #444;
  border: none;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.9em; /* Smaller font size */
  font-weight: 600;
  transition: all 0.3s ease;
}

.sidebar-toggle:hover {
  background: var(--accent-dark);
  transform: scale(1.05);
}

/* When sidebar is open - Removed specific span animations for text button */
/*
.sidebar-open .sidebar-toggle span {
  background: transparent;
}

.sidebar-open .sidebar-toggle span::before {
  transform: rotate(45deg);
  top: 0;
}

.sidebar-open .sidebar-toggle span::after {
  transform: rotate(-45deg);
  bottom: 0;
}
*/

/* Force all text color to black */
.anchor span {
  color: #000 !important;
} 