:root {
  --theme-color: #ff0037;
  --theme-color-rgb: 255, 0, 55;
  --theme-color-light: #ff335c;
  --theme-color-lighter: #ffe6ec;
  --selected-color: #ff0037;
  --sidebar-width: 280px;
  --text-primary: #1a1a1a;
  --text-secondary: #4a4a4a;
  --text-muted: #666666;
  --border-color: #e5e5e5;
  --bg-light: #f8f9fa;
  --bg-code: #f5f7fa;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
}

body {
  font-family: "Lato", sans-serif;
  margin: 0;
  background: linear-gradient(135deg, #fafbfc 0%, #ffffff 100%);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
}

.h1,
.h2,
.h3,
.h4,
.h5,
.h6,
h1,
h2,
h3,
h4,
h5,
h6,
p {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-weight: 500;
  line-height: 1.2;
}

.documentation-container {
  display: flex;
  min-height: 100vh;
  position: relative;
}

.sidebar {
  width: var(--sidebar-width);
  background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
  box-shadow: var(--shadow-lg);
  padding-top: 0;
  position: fixed;
  top: 0;
  left: -100%;
  height: 100%;
  overflow-y: auto;
  transition: var(--transition);
  z-index: 999;
  border-right: 1px solid var(--border-color);
}

.sidebar::-webkit-scrollbar {
  width: 6px;
}

.sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
  background: rgba(var(--theme-color-rgb), 0.3);
  border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
  background: rgba(var(--theme-color-rgb), 0.5);
}

.sidebar.active-sidebar {
  left: 0;
}

.sidebar-header {
  background: #ffffff;
  padding: 50px 20px 25px 20px;
  margin-bottom: 0;
  display: flex;
  gap: 15px;
  position: relative;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  border-bottom: 3px solid var(--theme-color);
}

.sidebar-header::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, 
    var(--theme-color) 0%,
    var(--theme-color-light) 50%,
    var(--theme-color) 100%
  );
}

@media (max-width: 992px) {
  .sidebar-header {
    padding: 70px 20px 25px 20px;
  }
}

.sidebar-header .theme-name {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text-primary);
}

.sidebar-header .content p {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 400;
}

.sidebar-header img {
  max-width: 45px;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.1));
  border-radius: 8px;
}

.sidebar ul {
  list-style-type: none;
  padding: 16px 12px;
  margin: 0;
}

.sidebar li {
  margin-bottom: 4px;
}

.sidebar li a {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  text-decoration: none;
  color: var(--text-secondary);
  transition: var(--transition);
  position: relative;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 15px;
}

.sidebar li a::before {
  position: absolute;
  content: "";
  height: 100%;
  width: 3px;
  background: var(--theme-color);
  top: 0;
  left: 0;
  border-radius: 0 3px 3px 0;
  visibility: hidden;
  opacity: 0;
  transition: var(--transition);
  transform: scaleY(0);
}

.sidebar li a.active {
  color: var(--theme-color);
  background: var(--theme-color-lighter);
  font-weight: 600;
}

.sidebar li a.active::before {
  visibility: visible;
  opacity: 1;
  transform: scaleY(1);
}

.sidebar li a.active .sidebar-icon {
  color: var(--theme-color);
  transform: scale(1.1);
}

.sidebar li a:hover:not(.active) {
  background-color: var(--bg-light);
  color: var(--text-primary);
  transform: translateX(4px);
}

.sidebar li a:hover::before {
  visibility: visible;
  opacity: 0.5;
  transform: scaleY(1);
}

.sidebar-icon {
  padding-right: 12px;
  font-size: 18px;
  width: 28px;
  text-align: center;
  transition: var(--transition);
}

.main-content {
  flex-grow: 1;
  padding: 16px;
  margin-left: 0;
  transition: margin-left 0.3s ease-in-out;
  width: 100%;
  box-sizing: border-box;
}

.section {
  padding: 24px;
  margin-bottom: 32px;
  animation: fadeInUp 0.6s ease-out;
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.section-title {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 24px;
  color: var(--text-primary);
  position: relative;
  padding-bottom: 16px;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--theme-color), var(--theme-color-light));
  border-radius: 2px;
}

.section-intro,
.section-setup,
.section-run,
.section-publish,
.section-support,
.section-folder,
.section-screens,
.section-requirements,
.section-installation,
.section-mobile-settings {
  padding: 16px;
}

.section-intro p,
.section-folder p,
.section-requirements p,
.section-setup p,
.section-run p,
.section-publish p,
.section-support p,
.section-mobile-settings p {
  font-size: 15px;
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 16px;
}

.section p strong {
  color: var(--text-primary);
  font-weight: 600;
}

.code-block {
  background: var(--bg-code);
  border-radius: var(--radius-md);
  padding: 20px;
  font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
  word-wrap: break-word;
  margin: 16px 0;
  font-size: 13px;
  border: 1px solid var(--border-color);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
  position: relative;
  overflow-x: auto;
  line-height: 1.6;
  color: #2d3748;
}

.code-block::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--theme-color), var(--theme-color-light));
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.code-block-run {
  display: inline-block;
  text-align: center;
  background: linear-gradient(135deg, var(--theme-color-lighter) 0%, #fff 100%);
  border: 2px solid var(--theme-color);
  border-radius: var(--radius-md);
  font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
  font-size: 18px;
  font-weight: 600;
  padding: 16px 32px;
  box-sizing: border-box;
  margin: 20px 0;
  color: var(--theme-color);
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.code-block-run:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.image-container {
  text-align: left;
  margin: 32px 0;
}

.image-container img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.image-container img:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-lg);
}

.list-item {
  margin: 12px 0;
  padding-left: 24px;
  color: var(--text-secondary);
  line-height: 1.8;
}

.list-item li {
  margin-bottom: 10px;
  position: relative;
  padding-left: 8px;
}

.list-item li::marker {
  color: var(--theme-color);
  font-weight: 600;
}

.list-item code {
  background: var(--theme-color-lighter);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 13px;
  color: var(--theme-color);
  font-family: 'Monaco', 'Menlo', monospace;
  border: 1px solid rgba(var(--theme-color-rgb), 0.2);
}

.video-cards {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 24px;
}

.video-card {
  width: 100%;
  background: white;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.video-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.video-card .heading-2 {
  padding: 20px;
  margin: 0;
  background: var(--bg-light);
  font-size: 18px;
}

.video-card .heading-2::before {
  display: none;
}

.video-container {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.package-item {
  padding: 10px 16px;
  color: var(--text-secondary);
  font-size: 15px;
  background: var(--bg-light);
  border-left: 3px solid var(--theme-color);
  margin: 8px 0;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  transition: var(--transition);
}

.package-item:hover {
  background: var(--theme-color-lighter);
  transform: translateX(4px);
}

.package-item strong {
  color: var(--text-primary);
  font-weight: 600;
}

.link {
  color: var(--theme-color);
  text-decoration: none;
  cursor: pointer;
  font-weight: 500;
  border-bottom: 1px solid transparent;
  transition: var(--transition);
}

.link:hover {
  border-bottom-color: var(--theme-color);
  color: var(--theme-color-light);
}

.heading-2 {
  font-size: 22px;
  font-weight: 700;
  margin-top: 32px;
  margin-bottom: 16px;
  color: var(--text-primary);
  position: relative;
  padding-left: 16px;
}

.heading-2::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 24px;
  background: linear-gradient(180deg, var(--theme-color), var(--theme-color-light));
  border-radius: 2px;
}

.heading-3 {
  font-size: 18px;
  font-weight: 600;
  margin-top: 24px;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.nav-toggle {
  display: block;
  position: fixed;
  top: 16px;
  left: 16px;
  background: linear-gradient(135deg, var(--theme-color), var(--theme-color-light));
  color: white;
  border: none;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  cursor: pointer;
  z-index: 1000;
  font-size: 20px;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.nav-toggle:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-lg);
}

.nav-toggle:active {
  transform: scale(0.98);
}

footer {
  text-align: center;
  padding: 32px 20px;
  margin-top: 60px;
  color: var(--text-muted);
  border-top: 2px solid var(--border-color);
  background: var(--bg-light);
  font-size: 14px;
}

/* Info blocks styling */
.info-block {
  background: var(--bg-light);
  border-left: 4px solid var(--theme-color);
  padding: 20px 24px;
  margin: 20px 0;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  box-shadow: var(--shadow-sm);
}

.info-block p {
  margin-bottom: 12px;
}

/* Settings table styling */
.settings-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 16px 0;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: white;
}

.settings-table tr {
  border-bottom: 1px solid var(--border-color);
}

.settings-table tr:last-child {
  border-bottom: none;
}

.settings-table td {
  padding: 14px 16px;
  vertical-align: top;
}

.settings-table td:first-child {
  background: var(--bg-light);
  font-weight: 600;
  color: var(--text-primary);
}

.settings-table td:last-child {
  color: var(--text-secondary);
}

/* Subsection styling */
.subsection {
  margin-top: 32px;
}

.subsection .heading-2 {
  display: flex;
  align-items: center;
  gap: 12px;
}

.subsection .heading-2 i {
  color: var(--theme-color);
}

.dir-path {
  font-family: "Courier New", monospace;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.section-requirements strong {
  color: var(--text-primary);
}

.settings-image-placeholder img {
  max-width: 100%;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

/* Smooth scroll behavior */
html {
  scroll-behavior: smooth;
}

/* Selection styling */
::selection {
  background: var(--theme-color-lighter);
  color: var(--theme-color);
}

::-moz-selection {
  background: var(--theme-color-lighter);
  color: var(--theme-color);
}

/* Desktop styles */
@media (min-width: 900px) {
  .documentation-container {
    display: flex;
  }

  .sidebar {
    display: block;
    left: 0;
    position: fixed;
  }

  .main-content {
    margin-left: var(--sidebar-width);
    padding: 40px 60px;
    max-width: 1400px;
  }

  .section {
    padding: 32px;
    margin-bottom: 32px;
  }

  .section-title {
    font-size: 42px;
    margin-bottom: 32px;
    padding-bottom: 20px;
  }

  .section-title::after {
    width: 80px;
    height: 5px;
  }

  .section-intro,
  .section-setup,
  .section-run,
  .section-publish,
  .section-support,
  .section-folder,
  .section-screens,
  .section-requirements,
  .section-installation,
  .section-mobile-settings {
    padding: 32px;
  }

  .section-intro p,
  .section-folder p,
  .section-requirements p,
  .section-setup p,
  .section-run p,
  .section-publish p,
  .section-support p,
  .section-mobile-settings p {
    font-size: 16px;
    line-height: 1.9;
  }

  .list-item {
    padding-left: 32px;
    font-size: 15px;
  }

  .video-cards {
    flex-direction: row;
    gap: 24px;
  }

  .video-card {
    flex: 1;
    max-width: 560px;
  }

  .code-block {
    font-size: 14px;
    padding: 24px;
  }

  .heading-2 {
    font-size: 26px;
    margin-top: 40px;
  }

  .heading-3 {
    font-size: 20px;
  }

  .nav-toggle {
    display: none;
  }

  .package-item {
    font-size: 15px;
    padding: 12px 18px;
  }
}
