/* User Guide Specific Styles */

/* Global body adjustments for wider content */
/* Override container width for user guide page */
.container {
  max-width: 1400px;
}

/* Layout */
.guide-container {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: calc(100vh - 64px);
  background: var(--bg);
  width: 100%;
  max-width: 100vw;
}

/* Main content area */
.guide-content {
  padding: 20px 60px;
  overflow-y: auto;
  max-width: none;
  width: 100%;
}

/* Sidebar */
.guide-sidebar {
  background: var(--panel);
  border-right: 1px solid var(--line);
  position: sticky;
  top: 64px;
  height: calc(100vh - 64px);
  overflow-y: auto;
  padding: 0;
}

.sidebar-header {
  padding: 20px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sidebar-header h3 {
  margin: 0;
  font-size: 18px;
  color: var(--text);
}

.guide-controls {
  display: flex;
  gap: 8px;
}

.btn-sm {
  height: 32px;
  padding: 0 12px;
  font-size: 14px;
  border-radius: 8px;
}

/* Remove search styles - search functionality removed */

/* Operation Steps Styling */
.operation-step {
  margin: 24px 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.step-image {
  width: 100%;
  max-width: 1200px;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.step-image:hover {
  transform: scale(1.02);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.step-image:active {
  transform: scale(0.98);
}

.step-image::after {
  content: "点击图片放大查看";
  position: absolute;
  bottom: 8px;
  right: 12px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.operation-step {
  position: relative;
}

.operation-step:hover .step-image::after {
  opacity: 1;
}

.step-description {
  margin: 0;
  padding: 12px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  background: rgba(106, 161, 255, 0.05);
  border-radius: 4px;
  border-left: 3px solid var(--brand);
}

/* Step numbering and workflow styling */
.guide-content h4[id*="step"],
.guide-content h4:contains("Step"),
.guide-content h4:contains("第") {
  color: var(--brand);
  font-weight: 600;
  margin-top: 24px;
  margin-bottom: 12px;
}

/* Dark theme adjustments */
.dark-theme .operation-step {
  background: var(--panel);
  border-color: rgba(255, 255, 255, 0.1);
}

.dark-theme .step-image {
  border-color: rgba(255, 255, 255, 0.1);
}

/* Image Modal Styles */
.image-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  cursor: pointer;
}

.image-modal-content {
  position: relative;
  max-width: 95vw;
  max-height: 95vh;
  cursor: default;
}

.enlarged-image {
  max-width: 100%;
  max-height: 95vh;
  width: auto;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.close-modal {
  position: absolute;
  top: -15px;
  right: -15px;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #333;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: all 0.2s ease;
}

.close-modal:hover {
  background: rgba(255, 255, 255, 1);
  transform: scale(1.1);
}

/* Responsive design for mobile */
@media (max-width: 768px) {
  .operation-step {
    margin: 16px 0;
    padding: 12px;
  }
  
  .step-image {
    min-width: unset;
    max-width: 100%;
  }
  
  .step-description {
    font-size: 13px;
    padding: 10px;
  }
  
  .close-modal {
    top: 10px;
    right: 10px;
    width: 35px;
    height: 35px;
    font-size: 20px;
  }
}

/* Navigation */
.guide-nav {
  padding: 20px 0 8px 0;
}

.nav-section {
  margin-bottom: 2px;
}

.nav-section-title {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s ease;
  border-radius: 0 8px 8px 0;
  margin-right: 8px;
}

.nav-section-title:hover {
  background: rgba(106, 161, 255, 0.1);
  color: var(--brand);
}

.nav-section-title.active {
  background: rgba(106, 161, 255, 0.15);
  color: var(--brand);
  font-weight: 600;
  border-left: 3px solid var(--brand);
}

.section-icon {
  margin-right: 10px;
  font-size: 16px;
}

.section-title {
  flex: 1;
}

.nav-items {
  display: block;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-items.collapsed {
  display: none;
}

.nav-item {
  margin: 0;
}

.nav-link {
  display: block;
  padding: 6px 20px 6px 40px;
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
  transition: all 0.15s;
  border-left: 2px solid transparent;
}

.nav-link:hover {
  background: rgba(106, 161, 255, 0.1);
  color: var(--text);
}

.nav-link.active {
  background: rgba(106, 161, 255, 0.15);
  color: var(--brand);
  border-left-color: var(--brand);
}

/* Main Content */
.guide-content {
  background: var(--bg);
  overflow-y: auto;
}

.content-header {
  padding: 20px 40px 0;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  position: sticky;
  top: 64px;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 60px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
}

.breadcrumb-item {
  color: var(--muted);
}

.breadcrumb-item.current {
  color: var(--text);
  font-weight: 500;
}

.breadcrumb-separator {
  color: var(--muted);
}

.content-actions {
  display: flex;
  gap: 8px;
}

/* Article Content */
.guide-article {
  padding: 40px;
  max-width: 1600px;
  margin: 0 auto;
}

.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: var(--muted);
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--line);
  border-top: 3px solid var(--brand);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 16px;
}

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

/* Typography */
.guide-article h1 {
  font-size: 32px;
  line-height: 1.2;
  margin: 0 0 24px;
  color: var(--text);
}

.guide-article h2 {
  font-size: 24px;
  line-height: 1.3;
  margin: 32px 0 16px;
  color: var(--text);
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}

.guide-article h3 {
  font-size: 20px;
  line-height: 1.4;
  margin: 24px 0 12px;
  color: var(--text);
}

.guide-article h4 {
  font-size: 18px;
  line-height: 1.4;
  margin: 32px 0 16px;
  color: var(--brand);
  font-weight: 600;
  border-left: 4px solid var(--brand);
  padding-left: 12px;
  background: rgba(106, 161, 255, 0.05);
  padding: 12px;
  border-radius: 6px;
}

.guide-article p {
  margin: 0 0 16px;
  line-height: 1.6;
  color: var(--text);
}

.guide-article ul, .guide-article ol {
  margin: 0 0 16px 20px;
  padding: 0;
}

.guide-article li {
  margin: 4px 0;
  line-height: 1.5;
  color: var(--text);
}

.guide-article li ul, .guide-article li ol {
  margin: 8px 0 8px 20px;
}

/* Code */
.guide-article code {
  background: var(--panel);
  color: #e2e8f0;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.9em;
}

.guide-article pre {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  overflow-x: auto;
  margin: 16px 0;
  border-left: 3px solid var(--brand);
}

.guide-article pre code {
  background: none;
  padding: 0;
  border-radius: 0;
  color: #cbd5e1;
}

/* Tables */
.guide-article table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  background: var(--panel);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.guide-article th {
  background: rgba(106, 161, 255, 0.1);
  color: var(--text);
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  border-bottom: 1px solid var(--line);
}

.guide-article td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
}

.guide-article tr:last-child td {
  border-bottom: none;
}

.guide-article tr:hover {
  background: rgba(106, 161, 255, 0.05);
}

/* Links */
.guide-article a {
  color: var(--brand);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s;
}

.guide-article a:hover {
  border-bottom-color: var(--brand);
}

/* Blockquotes */
.guide-article blockquote {
  margin: 20px 0;
  padding: 16px 20px;
  background: var(--panel);
  border-left: 4px solid var(--brand);
  border-radius: 0 8px 8px 0;
  color: var(--muted);
  font-style: italic;
}

/* Content Footer */
.content-footer {
  padding: 40px;
  border-top: 1px solid var(--line);
  background: var(--panel);
}

.nav-pagination {
  display: flex;
  justify-content: space-between;
  margin-bottom: 24px;
}

.nav-pagination .btn {
  display: flex;
  align-items: center;
  gap: 8px;
}

.content-meta {
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.content-meta p {
  margin: 4px 0;
}

/* Responsive */
@media (max-width: 768px) {
  .guide-container {
    grid-template-columns: 1fr;
    position: relative;
  }
  
  .guide-sidebar {
    position: fixed;
    top: 64px;
    left: -280px;
    width: 280px;
    z-index: 50;
    transition: left 0.3s;
    height: calc(100vh - 64px);
  }
  
  .guide-sidebar.open {
    left: 0;
  }
  
  .guide-content {
    grid-column: 1;
  }
  
  .guide-article {
    padding: 20px;
  }
  
  .content-header {
    padding: 16px 20px 0;
  }
  
  .content-footer {
    padding: 20px;
  }
  
  .nav-pagination {
    flex-direction: column;
    gap: 12px;
  }
}

/* Mobile menu toggle */
.mobile-menu-toggle {
  display: none;
  position: fixed;
  top: 80px;
  left: 16px;
  z-index: 60;
  background: var(--brand);
  color: white;
  border: none;
  border-radius: 8px;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: flex;
  }
}

/* Dark theme adjustments */
body.dark-theme {
  --bg: #0f172a;
  --panel: #1e293b;
  --line: #334155;
  --text: #f1f5f9;
  --muted: #94a3b8;
}

/* Print styles */
@media print {
  .guide-sidebar,
  .content-header,
  .content-footer,
  .mobile-menu-toggle {
    display: none !important;
  }
  
  .guide-container {
    display: block;
  }
  
  .guide-content {
    background: white;
  }
  
  .guide-article {
    color: black;
    max-width: none;
    padding: 0;
  }
  
  .guide-article h1,
  .guide-article h2,
  .guide-article h3,
  .guide-article h4 {
    color: black;
  }
  
  .guide-article a {
    color: black;
    text-decoration: underline;
  }
} 