* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #ffffff;
  color: #1a1a2e;
  line-height: 1.7;
}

a {
  color: #6c47ff;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Layout */
.tutorials-layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 280px;
  background: #f8f9fc;
  border-right: 1px solid #e8eaf0;
  padding: 32px 0;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 100;
}

.sidebar-header {
  padding: 0 24px 24px;
  border-bottom: 1px solid #e8eaf0;
  margin-bottom: 16px;
}

.sidebar-logo {
  font-size: 20px;
  font-weight: 700;
  color: #6c47ff;
}

.sidebar-logo span {
  color: #1a1a2e;
}

.sidebar-subtitle {
  font-size: 13px;
  color: #6b7280;
  margin-top: 4px;
}

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

.sidebar-nav li {
  margin-bottom: 2px;
}

.sidebar-nav a {
  display: block;
  padding: 10px 16px;
  border-radius: 8px;
  color: #4b5563;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
}

.sidebar-nav a:hover {
  background: #ede9fe;
  color: #6c47ff;
  text-decoration: none;
}

.sidebar-nav a.active {
  background: #6c47ff;
  color: #ffffff;
}

.sidebar-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #9ca3af;
  padding: 16px 16px 8px;
}

/* Main Content */
.main-content {
  margin-left: 280px;
  flex: 1;
  padding: 48px 64px;
  max-width: 900px;
}

/* Hero Section */
.tutorial-hero {
  margin-bottom: 48px;
  padding-bottom: 32px;
  border-bottom: 1px solid #e8eaf0;
}

.tutorial-hero h1 {
  font-size: 36px;
  font-weight: 800;
  color: #1a1a2e;
  margin-bottom: 16px;
  line-height: 1.2;
}

.tutorial-hero p {
  font-size: 18px;
  color: #6b7280;
  max-width: 640px;
}

.tutorial-meta {
  display: flex;
  gap: 24px;
  margin-top: 20px;
  font-size: 14px;
  color: #9ca3af;
}

.tutorial-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Problem Section */
.problem-section {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 12px;
  padding: 32px;
  margin-bottom: 40px;
}

.problem-section h2 {
  font-size: 22px;
  font-weight: 700;
  color: #dc2626;
  margin-bottom: 16px;
}

.problem-section ul {
  list-style: none;
  padding: 0;
}

.problem-section ul li {
  padding: 8px 0;
  padding-left: 28px;
  position: relative;
  color: #7f1d1d;
  font-size: 15px;
}

.problem-section ul li::before {
  content: "\2717";
  position: absolute;
  left: 0;
  color: #dc2626;
  font-weight: bold;
  font-size: 16px;
}

/* Solution Section */
.solution-section {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  padding: 32px;
  margin-bottom: 40px;
}

.solution-section h2 {
  font-size: 22px;
  font-weight: 700;
  color: #16a34a;
  margin-bottom: 16px;
}

.solution-section ul {
  list-style: none;
  padding: 0;
}

.solution-section ul li {
  padding: 8px 0;
  padding-left: 28px;
  position: relative;
  color: #14532d;
  font-size: 15px;
}

.solution-section ul li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  color: #16a34a;
  font-weight: bold;
  font-size: 16px;
}

/* Steps Section */
.steps-section {
  margin-bottom: 48px;
}

.steps-section > h2 {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 32px;
  color: #1a1a2e;
}

.step-card {
  background: #ffffff;
  border: 1px solid #e8eaf0;
  border-radius: 16px;
  padding: 32px;
  margin-bottom: 32px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: box-shadow 0.2s;
}

.step-card:hover {
  box-shadow: 0 4px 12px rgba(108, 71, 255, 0.08);
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: #6c47ff;
  color: #ffffff;
  border-radius: 50%;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
}

.step-card h3 {
  font-size: 20px;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 12px;
}

.step-card p {
  color: #4b5563;
  font-size: 15px;
  margin-bottom: 16px;
}

.step-card .step-tip {
  background: #ede9fe;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 14px;
  color: #5b21b6;
  margin-top: 16px;
}

.step-card .step-tip strong {
  font-weight: 600;
}

.step-screenshot {
  margin-top: 20px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e8eaf0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.step-screenshot img {
  width: 100%;
  height: auto;
  display: block;
}

/* CTA Section */
.cta-section {
  background: linear-gradient(135deg, #6c47ff 0%, #9333ea 100%);
  border-radius: 16px;
  padding: 48px;
  text-align: center;
  margin-top: 48px;
}

.cta-section h2 {
  font-size: 28px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 12px;
}

.cta-section p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 16px;
  margin-bottom: 24px;
}

.cta-button {
  display: inline-block;
  background: #ffffff;
  color: #6c47ff;
  padding: 14px 32px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 700;
  transition: transform 0.2s, box-shadow 0.2s;
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  text-decoration: none;
}

/* Mobile Sidebar Toggle */
.sidebar-toggle {
  display: none;
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  background: #6c47ff;
  color: #ffffff;
  border: none;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  z-index: 200;
  box-shadow: 0 4px 12px rgba(108, 71, 255, 0.3);
  align-items: center;
  justify-content: center;
}

/* Table of contents numbering */
.toc-number {
  display: inline-block;
  width: 20px;
  height: 20px;
  background: #e8eaf0;
  color: #6b7280;
  border-radius: 50%;
  text-align: center;
  line-height: 20px;
  font-size: 11px;
  font-weight: 600;
  margin-right: 8px;
}

.sidebar-nav a.active .toc-number {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

/* Collapsible Sidebar Sections */
.sidebar-section {
  margin-bottom: 4px;
}

.sidebar-section-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: none;
  border: none;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #9ca3af;
  padding: 12px 16px 8px;
  cursor: pointer;
  transition: color 0.2s;
}

.sidebar-section-toggle:hover {
  color: #6c47ff;
}

.sidebar-section-toggle .chevron {
  font-size: 10px;
  transition: transform 0.2s;
}

.sidebar-section-toggle.collapsed .chevron {
  transform: rotate(-90deg);
}

.sidebar-section-content {
  overflow: hidden;
  transition: max-height 0.3s ease;
  max-height: 800px;
}

.sidebar-section-content.collapsed {
  max-height: 0;
}

/* Benefits Section */
.benefits-section {
  background: #f5f3ff;
  border: 1px solid #ddd6fe;
  border-radius: 12px;
  padding: 32px;
  margin-bottom: 40px;
}

.benefits-section h2 {
  font-size: 22px;
  font-weight: 700;
  color: #6c47ff;
  margin-bottom: 16px;
}

.benefits-section ul {
  list-style: none;
  padding: 0;
}

.benefits-section ul li {
  padding: 8px 0;
  padding-left: 28px;
  position: relative;
  color: #3b0764;
  font-size: 15px;
}

.benefits-section ul li::before {
  content: "\2022";
  position: absolute;
  left: 8px;
  color: #6c47ff;
  font-weight: bold;
  font-size: 18px;
}

/* Mode Card */
.mode-card {
  background: #f8f9fc;
  border: 1px solid #e8eaf0;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
}

.mode-card h4 {
  font-size: 17px;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 8px;
}

.mode-card p {
  color: #4b5563;
  font-size: 14px;
  margin-bottom: 0;
}

/* FAQ Section */
.faq-section {
  margin-bottom: 48px;
}

.faq-section h2 {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 32px;
  color: #1a1a2e;
}

.faq-item {
  background: #ffffff;
  border: 1px solid #e8eaf0;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 16px;
  transition: box-shadow 0.2s;
}

.faq-item:hover {
  box-shadow: 0 4px 12px rgba(108, 71, 255, 0.08);
}

.faq-item h3 {
  font-size: 17px;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 8px;
}

.faq-item p {
  color: #4b5563;
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 0;
}

/* Responsive */
@media (max-width: 1024px) {
  .main-content {
    padding: 40px 32px;
  }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }

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

  .sidebar-toggle {
    display: flex;
  }

  .main-content {
    margin-left: 0;
    padding: 32px 20px;
  }

  .tutorial-hero h1 {
    font-size: 28px;
  }

  .step-card {
    padding: 24px;
  }

  .cta-section {
    padding: 32px 20px;
  }
}
